]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge 'akpm' patch series
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Jul 2011 04:00:19 +0000 (21:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Jul 2011 04:00:19 +0000 (21:00 -0700)
* Merge akpm patch series: (122 commits)
  drivers/connector/cn_proc.c: remove unused local
  Documentation/SubmitChecklist: add RCU debug config options
  reiserfs: use hweight_long()
  reiserfs: use proper little-endian bitops
  pnpacpi: register disabled resources
  drivers/rtc/rtc-tegra.c: properly initialize spinlock
  drivers/rtc/rtc-twl.c: check return value of twl_rtc_write_u8() in twl_rtc_set_time()
  drivers/rtc: add support for Qualcomm PMIC8xxx RTC
  drivers/rtc/rtc-s3c.c: support clock gating
  drivers/rtc/rtc-mpc5121.c: add support for RTC on MPC5200
  init: skip calibration delay if previously done
  misc/eeprom: add eeprom access driver for digsy_mtc board
  misc/eeprom: add driver for microwire 93xx46 EEPROMs
  checkpatch.pl: update $logFunctions
  checkpatch: make utf-8 test --strict
  checkpatch.pl: add ability to ignore various messages
  checkpatch: add a "prefer __aligned" check
  checkpatch: validate signature styles and To: and Cc: lines
  checkpatch: add __rcu as a sparse modifier
  checkpatch: suggest using min_t or max_t
  ...

Did this as a merge because of (trivial) conflicts in
 - Documentation/feature-removal-schedule.txt
 - arch/xtensa/include/asm/uaccess.h
that were just easier to fix up in the merge than in the patch series.

843 files changed:
.gitignore
.mailmap
Documentation/DocBook/v4l/io.xml
Documentation/RCU/NMI-RCU.txt
Documentation/arm/Samsung-S3C24XX/Overview.txt
Documentation/block/queue-sysfs.txt
Documentation/blockdev/README.DAC960
Documentation/blockdev/ramdisk.txt
Documentation/cpu-freq/cpu-drivers.txt
Documentation/devicetree/bindings/net/can/fsl-flexcan.txt [changed mode: 0755->0644]
Documentation/feature-removal-schedule.txt
Documentation/filesystems/Locking
Documentation/filesystems/nfs/nfsroot.txt
Documentation/filesystems/porting
Documentation/filesystems/vfs.txt
Documentation/hwmon/it87
Documentation/hwmon/lm78
Documentation/hwmon/sch5636 [new file with mode: 0644]
Documentation/i2o/ioctl
Documentation/isdn/README.HiSax
Documentation/kbuild/makefiles.txt
Documentation/magic-number.txt
Documentation/mca.txt
Documentation/scheduler/sched-arch.txt
Documentation/scsi/BusLogic.txt
Documentation/serial/computone.txt
Documentation/zh_CN/magic-number.txt
MAINTAINERS
arch/alpha/include/asm/floppy.h
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/common/scoop.c
arch/arm/configs/cm_x300_defconfig
arch/arm/configs/loki_defconfig [deleted file]
arch/arm/configs/mx51_defconfig
arch/arm/configs/mxs_defconfig
arch/arm/include/asm/hardware/scoop.h
arch/arm/mach-at91/at91sam9261_devices.c
arch/arm/mach-at91/board-snapper9260.c
arch/arm/mach-bcmring/dma.c
arch/arm/mach-cns3xxx/include/mach/vmalloc.h
arch/arm/mach-davinci/board-dm646x-evm.c
arch/arm/mach-davinci/clock.c
arch/arm/mach-davinci/clock.h
arch/arm/mach-davinci/dm646x.c
arch/arm/mach-davinci/include/mach/dm646x.h
arch/arm/mach-davinci/include/mach/psc.h
arch/arm/mach-dove/common.c
arch/arm/mach-ep93xx/simone.c
arch/arm/mach-ep93xx/snappercl15.c
arch/arm/mach-exynos4/Kconfig
arch/arm/mach-exynos4/clock.c
arch/arm/mach-exynos4/include/mach/clkdev.h [new file with mode: 0644]
arch/arm/mach-exynos4/mach-smdkc210.c
arch/arm/mach-exynos4/mach-smdkv310.c
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/dma-v1.c
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
arch/arm/mach-imx/mach-apf9328.c
arch/arm/mach-imx/mach-imx27_visstrim_m10.c
arch/arm/mach-imx/mach-mx27_3ds.c
arch/arm/mach-imx/mach-mx31_3ds.c
arch/arm/mach-imx/mach-mx31moboard.c
arch/arm/mach-imx/mach-mx35_3ds.c
arch/arm/mach-imx/mach-scb9328.c
arch/arm/mach-imx/mx31lite-db.c
arch/arm/mach-integrator/include/mach/bits.h [deleted file]
arch/arm/mach-loki/Kconfig [deleted file]
arch/arm/mach-loki/Makefile [deleted file]
arch/arm/mach-loki/Makefile.boot [deleted file]
arch/arm/mach-loki/addr-map.c [deleted file]
arch/arm/mach-loki/common.c [deleted file]
arch/arm/mach-loki/common.h [deleted file]
arch/arm/mach-loki/include/mach/bridge-regs.h [deleted file]
arch/arm/mach-loki/include/mach/debug-macro.S [deleted file]
arch/arm/mach-loki/include/mach/entry-macro.S [deleted file]
arch/arm/mach-loki/include/mach/hardware.h [deleted file]
arch/arm/mach-loki/include/mach/io.h [deleted file]
arch/arm/mach-loki/include/mach/irqs.h [deleted file]
arch/arm/mach-loki/include/mach/loki.h [deleted file]
arch/arm/mach-loki/include/mach/memory.h [deleted file]
arch/arm/mach-loki/include/mach/system.h [deleted file]
arch/arm/mach-loki/include/mach/timex.h [deleted file]
arch/arm/mach-loki/include/mach/uncompress.h [deleted file]
arch/arm/mach-loki/include/mach/vmalloc.h [deleted file]
arch/arm/mach-loki/irq.c [deleted file]
arch/arm/mach-loki/lb88rc8480-setup.c [deleted file]
arch/arm/mach-lpc32xx/include/mach/vmalloc.h
arch/arm/mach-msm/platsmp.c
arch/arm/mach-mv78xx0/pcie.c
arch/arm/mach-mx5/Kconfig
arch/arm/mach-mx5/board-cpuimx51.c
arch/arm/mach-mx5/board-mx51_3ds.c
arch/arm/mach-mx5/board-mx51_babbage.c
arch/arm/mach-mx5/board-mx51_efikamx.c
arch/arm/mach-mx5/board-mx51_efikasb.c
arch/arm/mach-mx5/clock-mx51-mx53.c
arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c
arch/arm/mach-mxs/Kconfig
arch/arm/mach-mxs/devices/platform-mxsfb.c
arch/arm/mach-mxs/include/mach/dma.h
arch/arm/mach-mxs/mach-tx28.c
arch/arm/mach-nuc93x/include/mach/vmalloc.h
arch/arm/mach-omap1/board-ams-delta.c
arch/arm/mach-omap1/board-fsample.c
arch/arm/mach-omap1/board-generic.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/board-htcherald.c
arch/arm/mach-omap1/board-innovator.c
arch/arm/mach-omap1/board-nokia770.c
arch/arm/mach-omap1/board-osk.c
arch/arm/mach-omap1/board-palmte.c
arch/arm/mach-omap1/board-palmtt.c
arch/arm/mach-omap1/board-palmz71.c
arch/arm/mach-omap1/board-perseus2.c
arch/arm/mach-omap1/board-sx1.c
arch/arm/mach-omap1/board-voiceblue.c
arch/arm/mach-omap1/irq.c
arch/arm/mach-omap1/mcbsp.c
arch/arm/mach-omap1/time.c
arch/arm/mach-omap1/timer32k.c
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-3630sdp.c
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-am3517crane.c
arch/arm/mach-omap2/board-am3517evm.c
arch/arm/mach-omap2/board-apollon.c
arch/arm/mach-omap2/board-cm-t35.c
arch/arm/mach-omap2/board-cm-t3517.c
arch/arm/mach-omap2/board-devkit8000.c
arch/arm/mach-omap2/board-flash.c
arch/arm/mach-omap2/board-generic.c
arch/arm/mach-omap2/board-h4.c
arch/arm/mach-omap2/board-igep0020.c
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-n8x0.c
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/board-omap3evm.c
arch/arm/mach-omap2/board-omap3logic.c
arch/arm/mach-omap2/board-omap3pandora.c
arch/arm/mach-omap2/board-omap3stalker.c
arch/arm/mach-omap2/board-omap3touchbook.c
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/board-overo.c
arch/arm/mach-omap2/board-rm680.c
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/board-rx51.c
arch/arm/mach-omap2/board-ti8168evm.c
arch/arm/mach-omap2/board-zoom-peripherals.c
arch/arm/mach-omap2/board-zoom.c
arch/arm/mach-omap2/clock44xx.h
arch/arm/mach-omap2/clock44xx_data.c
arch/arm/mach-omap2/clockdomains44xx_data.c
arch/arm/mach-omap2/cm-regbits-44xx.h
arch/arm/mach-omap2/cm1_44xx.h
arch/arm/mach-omap2/cm2_44xx.h
arch/arm/mach-omap2/common-board-devices.c
arch/arm/mach-omap2/common-board-devices.h
arch/arm/mach-omap2/gpmc-nand.c
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/irq.c
arch/arm/mach-omap2/omap4-common.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/omap_hwmod_2420_data.c
arch/arm/mach-omap2/omap_hwmod_2430_data.c
arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c [new file with mode: 0644]
arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c [new file with mode: 0644]
arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c [new file with mode: 0644]
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c [new file with mode: 0644]
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
arch/arm/mach-omap2/omap_hwmod_44xx_data.c
arch/arm/mach-omap2/omap_hwmod_common_data.c
arch/arm/mach-omap2/omap_hwmod_common_data.h
arch/arm/mach-omap2/pm-debug.c
arch/arm/mach-omap2/pm.h
arch/arm/mach-omap2/pm24xx.c
arch/arm/mach-omap2/pm34xx.c
arch/arm/mach-omap2/powerdomains44xx_data.c
arch/arm/mach-omap2/prcm_mpu44xx.h
arch/arm/mach-omap2/prm44xx.h
arch/arm/mach-omap2/smartreflex.c
arch/arm/mach-omap2/timer-gp.c [deleted file]
arch/arm/mach-omap2/timer-gp.h [deleted file]
arch/arm/mach-omap2/timer.c [new file with mode: 0644]
arch/arm/mach-omap2/twl-common.c [new file with mode: 0644]
arch/arm/mach-omap2/twl-common.h [new file with mode: 0644]
arch/arm/mach-orion5x/mpp.c
arch/arm/mach-pxa/cm-x300.c
arch/arm/mach-pxa/hx4700.c
arch/arm/mach-pxa/include/mach/corgi.h
arch/arm/mach-pxa/include/mach/magician.h
arch/arm/mach-pxa/include/mach/pxa27x-udc.h
arch/arm/mach-pxa/magician.c
arch/arm/mach-pxa/mioa701.c
arch/arm/mach-pxa/saarb.c
arch/arm/mach-s3c2400/Kconfig [deleted file]
arch/arm/mach-s3c2400/Makefile [deleted file]
arch/arm/mach-s3c2400/gpio.c [deleted file]
arch/arm/mach-s3c2400/include/mach/map.h [deleted file]
arch/arm/mach-s3c2410/h1940-bluetooth.c
arch/arm/mach-s3c2410/include/mach/gpio-fns.h
arch/arm/mach-s3c2410/include/mach/regs-gpio.h
arch/arm/mach-s3c2410/include/mach/regs-mem.h
arch/arm/mach-s3c2412/Kconfig
arch/arm/mach-s3c2412/clock.c
arch/arm/mach-s3c2416/clock.c
arch/arm/mach-s3c2440/clock.c
arch/arm/mach-s3c2443/clock.c
arch/arm/mach-s3c24a0/include/mach/debug-macro.S [deleted file]
arch/arm/mach-s3c24a0/include/mach/io.h [deleted file]
arch/arm/mach-s3c24a0/include/mach/irqs.h [deleted file]
arch/arm/mach-s3c24a0/include/mach/map.h [deleted file]
arch/arm/mach-s3c24a0/include/mach/memory.h [deleted file]
arch/arm/mach-s3c24a0/include/mach/regs-clock.h [deleted file]
arch/arm/mach-s3c24a0/include/mach/regs-irq.h [deleted file]
arch/arm/mach-s3c24a0/include/mach/system.h [deleted file]
arch/arm/mach-s3c24a0/include/mach/tick.h [deleted file]
arch/arm/mach-s3c24a0/include/mach/timex.h [deleted file]
arch/arm/mach-s3c24a0/include/mach/vmalloc.h [deleted file]
arch/arm/mach-s3c64xx/Kconfig
arch/arm/mach-s3c64xx/clock.c
arch/arm/mach-s3c64xx/dev-onenand1.c
arch/arm/mach-s3c64xx/include/mach/clkdev.h [new file with mode: 0644]
arch/arm/mach-s3c64xx/include/mach/regs-fb.h [deleted file]
arch/arm/mach-s3c64xx/mach-anw6410.c
arch/arm/mach-s3c64xx/mach-hmt.c
arch/arm/mach-s3c64xx/mach-mini6410.c
arch/arm/mach-s3c64xx/mach-ncp.c
arch/arm/mach-s3c64xx/mach-real6410.c
arch/arm/mach-s3c64xx/mach-smartq5.c
arch/arm/mach-s3c64xx/mach-smartq7.c
arch/arm/mach-s3c64xx/mach-smdk6410.c
arch/arm/mach-s3c64xx/setup-fb-24bpp.c
arch/arm/mach-s5p64x0/Kconfig
arch/arm/mach-s5p64x0/clock-s5p6440.c
arch/arm/mach-s5p64x0/clock-s5p6450.c
arch/arm/mach-s5p64x0/include/mach/clkdev.h [new file with mode: 0644]
arch/arm/mach-s5p64x0/mach-smdk6440.c
arch/arm/mach-s5p64x0/mach-smdk6450.c
arch/arm/mach-s5pc100/Kconfig
arch/arm/mach-s5pc100/clock.c
arch/arm/mach-s5pc100/include/mach/clkdev.h [new file with mode: 0644]
arch/arm/mach-s5pc100/include/mach/regs-fb.h [deleted file]
arch/arm/mach-s5pc100/mach-smdkc100.c
arch/arm/mach-s5pc100/setup-fb-24bpp.c
arch/arm/mach-s5pv210/Kconfig
arch/arm/mach-s5pv210/clock.c
arch/arm/mach-s5pv210/include/mach/clkdev.h [new file with mode: 0644]
arch/arm/mach-s5pv210/include/mach/regs-fb.h [deleted file]
arch/arm/mach-s5pv210/mach-aquila.c
arch/arm/mach-s5pv210/mach-goni.c
arch/arm/mach-s5pv210/mach-smdkv210.c
arch/arm/mach-s5pv210/setup-fb-24bpp.c
arch/arm/mach-shmobile/board-ap4evb.c
arch/arm/mach-tegra/board-seaboard.c
arch/arm/mach-tegra/board-trimslice-pinmux.c
arch/arm/mach-u300/core.c
arch/arm/mach-ux500/board-mop500-regulators.c
arch/arm/plat-mxc/avic.c
arch/arm/plat-mxc/devices/platform-imx-dma.c
arch/arm/plat-mxc/devices/platform-imx-ssi.c
arch/arm/plat-mxc/include/mach/debug-macro.S
arch/arm/plat-mxc/include/mach/hardware.h
arch/arm/plat-mxc/include/mach/iomux-mx25.h
arch/arm/plat-mxc/include/mach/iomux-mx53.h
arch/arm/plat-mxc/include/mach/iomux-v1.h
arch/arm/plat-mxc/include/mach/iomux-v3.h
arch/arm/plat-mxc/include/mach/iomux.h [deleted file]
arch/arm/plat-mxc/include/mach/mx53.h
arch/arm/plat-mxc/include/mach/mxc.h
arch/arm/plat-mxc/include/mach/timex.h
arch/arm/plat-mxc/iomux-v1.c
arch/arm/plat-mxc/pwm.c
arch/arm/plat-mxc/tzic.c
arch/arm/plat-omap/Kconfig
arch/arm/plat-omap/counter_32k.c
arch/arm/plat-omap/dmtimer.c
arch/arm/plat-omap/include/plat/clock.h
arch/arm/plat-omap/include/plat/common.h
arch/arm/plat-omap/include/plat/dmtimer.h
arch/arm/plat-omap/include/plat/irqs.h
arch/arm/plat-omap/include/plat/mcbsp.h
arch/arm/plat-omap/include/plat/nand.h
arch/arm/plat-omap/include/plat/omap-pm.h
arch/arm/plat-omap/include/plat/omap_hwmod.h
arch/arm/plat-omap/mcbsp.c
arch/arm/plat-omap/omap_device.c
arch/arm/plat-s3c24xx/Kconfig
arch/arm/plat-s3c24xx/clock-dclk.c
arch/arm/plat-s3c24xx/cpu.c
arch/arm/plat-s3c24xx/devs.c
arch/arm/plat-s3c24xx/include/mach/clkdev.h [new file with mode: 0644]
arch/arm/plat-s3c24xx/include/plat/regs-iis.h
arch/arm/plat-s3c24xx/include/plat/regs-spi.h
arch/arm/plat-s3c24xx/include/plat/s3c2400.h [deleted file]
arch/arm/plat-s3c24xx/s3c2410-clock.c
arch/arm/plat-s3c24xx/s3c2443-clock.c
arch/arm/plat-s5p/clock.c
arch/arm/plat-s5p/include/plat/s5p-clock.h
arch/arm/plat-s5p/s5p-time.c
arch/arm/plat-s5p/sysmmu.c
arch/arm/plat-samsung/Kconfig
arch/arm/plat-samsung/Makefile
arch/arm/plat-samsung/clock.c
arch/arm/plat-samsung/dev-backlight.c [new file with mode: 0644]
arch/arm/plat-samsung/dev-fb.c
arch/arm/plat-samsung/dev-hwmon.c
arch/arm/plat-samsung/dev-i2c0.c
arch/arm/plat-samsung/dev-i2c1.c
arch/arm/plat-samsung/dev-i2c2.c
arch/arm/plat-samsung/dev-i2c3.c
arch/arm/plat-samsung/dev-i2c4.c
arch/arm/plat-samsung/dev-i2c5.c
arch/arm/plat-samsung/dev-i2c6.c
arch/arm/plat-samsung/dev-i2c7.c
arch/arm/plat-samsung/dev-nand.c
arch/arm/plat-samsung/dev-ts.c
arch/arm/plat-samsung/dev-usb.c
arch/arm/plat-samsung/include/plat/backlight.h [new file with mode: 0644]
arch/arm/plat-samsung/include/plat/clock.h
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h
arch/arm/plat-samsung/include/plat/iic.h
arch/arm/plat-samsung/include/plat/regs-serial.h
arch/arm/plat-samsung/pm-check.c
arch/arm/plat-samsung/pwm-clock.c
arch/arm/plat-samsung/time.c
arch/avr32/kernel/setup.c
arch/avr32/mach-at32ap/extint.c
arch/avr32/mach-at32ap/hsmc.c
arch/avr32/mach-at32ap/intc.c
arch/avr32/mach-at32ap/pio.c
arch/h8300/kernel/setup.c
arch/ia64/include/asm/sn/tioce.h
arch/microblaze/pci/pci-common.c
arch/mips/bcm47xx/setup.c
arch/mips/include/asm/floppy.h
arch/mips/include/asm/mach-jz4740/gpio.h
arch/mips/lantiq/devices.c
arch/mips/lantiq/xway/devices.c
arch/mips/pci/pci-rc32434.c
arch/mips/pci/pci-vr41xx.c
arch/mips/powertv/asic/asic_devices.c
arch/parisc/include/asm/dma-mapping.h
arch/parisc/math-emu/decode_exc.c
arch/powerpc/include/asm/elf.h
arch/powerpc/include/asm/macio.h
arch/powerpc/include/asm/smu.h
arch/powerpc/kernel/machine_kexec.c
arch/powerpc/kernel/pci-common.c
arch/powerpc/platforms/52xx/mpc52xx_pci.c
arch/powerpc/platforms/83xx/km83xx.c
arch/powerpc/platforms/83xx/mpc832x_mds.c
arch/powerpc/platforms/83xx/mpc834x_mds.c
arch/powerpc/platforms/83xx/mpc836x_mds.c
arch/powerpc/platforms/83xx/usb.c
arch/powerpc/platforms/85xx/sbc8560.c
arch/powerpc/platforms/85xx/xes_mpc85xx.c
arch/powerpc/platforms/cell/celleb_scc_epci.c
arch/powerpc/platforms/cell/celleb_scc_pciex.c
arch/powerpc/platforms/cell/spu_manage.c
arch/powerpc/platforms/chrp/pci.c
arch/powerpc/platforms/pasemi/dma_lib.c
arch/powerpc/platforms/powermac/nvram.c
arch/powerpc/platforms/powermac/pci.c
arch/powerpc/platforms/powermac/time.c
arch/powerpc/platforms/pseries/smp.c
arch/powerpc/sysdev/axonram.c
arch/powerpc/sysdev/cpm1.c
arch/powerpc/sysdev/cpm_common.c
arch/powerpc/sysdev/dart_iommu.c
arch/powerpc/sysdev/fsl_msi.c
arch/powerpc/sysdev/fsl_pci.c
arch/powerpc/sysdev/fsl_rio.c
arch/powerpc/sysdev/ipic.c
arch/powerpc/sysdev/mmio_nvram.c
arch/powerpc/sysdev/mpc8xx_pic.c
arch/powerpc/sysdev/mv64x60_udbg.c
arch/powerpc/sysdev/ppc4xx_pci.c
arch/powerpc/sysdev/qe_lib/qe_ic.c
arch/powerpc/sysdev/qe_lib/qe_io.c
arch/powerpc/sysdev/xics/icp-native.c
arch/s390/oprofile/init.c
arch/sh/boards/mach-ap325rxa/setup.c
arch/sh/boards/mach-ecovec24/setup.c
arch/sh/boards/mach-kfr2r09/setup.c
arch/sh/boards/mach-migor/setup.c
arch/sh/boards/mach-se/7724/setup.c
arch/sh/kernel/io_trapped.c
arch/sh/kernel/machine_kexec.c
arch/sparc/include/asm/elf_64.h
arch/sparc/kernel/ioport.c
arch/sparc/kernel/pci.c
arch/tile/kernel/setup.c
arch/um/sys-i386/signal.c
arch/x86/Kconfig
arch/x86/kernel/i387.c
arch/x86/kernel/pci-calgary_64.c
arch/x86/kernel/probe_roms.c
arch/x86/kvm/mmu.c
arch/xtensa/include/asm/uaccess.h
arch/xtensa/variants/s6000/include/variant/dmac.h
block/blk-core.c
block/blk-ioc.c
block/blk-lib.c
block/blk-softirq.c
block/blk-sysfs.c
block/blk-throttle.c
block/bsg.c
block/cfq-iosched.c
block/compat_ioctl.c
block/deadline-iosched.c
block/elevator.c
block/genhd.c
crypto/Kconfig
drivers/acpi/ac.c
drivers/acpi/battery.c
drivers/acpi/sbs.c
drivers/base/devtmpfs.c
drivers/bcma/driver_chipcommon.c
drivers/bcma/driver_chipcommon_pmu.c
drivers/bcma/driver_pci.c
drivers/block/cciss.h
drivers/block/xen-blkback/blkback.c
drivers/char/bsr.c
drivers/char/hw_random/core.c
drivers/char/xilinx_hwicap/xilinx_hwicap.c
drivers/crypto/caam/ctrl.c
drivers/dma/imx-dma.c
drivers/dma/mv_xor.c
drivers/edac/cell_edac.c
drivers/edac/mpc85xx_edac.c
drivers/gpio/gpio-ab8500.c
drivers/gpio/gpio-bt8xx.c
drivers/gpio/gpio-ep93xx.c
drivers/gpio/gpio-u300.c
drivers/gpu/drm/nouveau/nv50_graph.c
drivers/gpu/drm/sis/sis_drv.h
drivers/hwmon/Kconfig
drivers/hwmon/Makefile
drivers/hwmon/gl520sm.c
drivers/hwmon/hwmon-vid.c
drivers/hwmon/it87.c
drivers/hwmon/lm78.c
drivers/hwmon/max1111.c
drivers/hwmon/sch5627.c
drivers/hwmon/sch5636.c [new file with mode: 0644]
drivers/hwmon/sch56xx-common.c [new file with mode: 0644]
drivers/hwmon/sch56xx-common.h [new file with mode: 0644]
drivers/hwmon/sht15.c
drivers/hwmon/via-cputemp.c
drivers/i2c/Kconfig
drivers/i2c/busses/i2c-ali1535.c
drivers/i2c/busses/i2c-cpm.c
drivers/i2c/busses/i2c-highlander.c
drivers/i2c/busses/i2c-omap.c
drivers/i2c/busses/i2c-pxa.c
drivers/i2c/busses/i2c-s6000.c
drivers/i2c/i2c-core.c
drivers/ide/palm_bk3710.c
drivers/ide/tx4939ide.c
drivers/input/serio/libps2.c
drivers/input/serio/sa1111ps2.c
drivers/isdn/i4l/isdn_bsdcomp.c
drivers/media/rc/ite-cir.c
drivers/media/video/davinci/vpif.c
drivers/media/video/m5mols/m5mols_capture.c
drivers/media/video/omap/omap_vout.c
drivers/media/video/omap24xxcam.c
drivers/media/video/videobuf2-memops.c
drivers/message/i2o/iop.c
drivers/mfd/tc6387xb.c
drivers/misc/atmel-ssc.c
drivers/misc/atmel_pwm.c
drivers/mmc/host/dw_mmc.c
drivers/mmc/host/mxcmmc.c
drivers/mmc/host/vub300.c
drivers/mtd/devices/sst25l.c
drivers/mtd/maps/bfin-async-flash.c
drivers/mtd/maps/ixp2000.c
drivers/mtd/maps/pxa2xx-flash.c
drivers/mtd/mtdchar.c
drivers/mtd/nand/atmel_nand.c
drivers/mtd/nand/bcm_umi_nand.c
drivers/mtd/nand/mpc5121_nfc.c
drivers/net/b44.c
drivers/net/bcm63xx_enet.c
drivers/net/bsd_comp.c
drivers/net/can/softing/softing_main.c
drivers/net/davinci_emac.c
drivers/net/eexpress.c
drivers/net/ethoc.c
drivers/net/fec_mpc52xx.c
drivers/net/fs_enet/mii-bitbang.c
drivers/net/fs_enet/mii-fec.c
drivers/net/gianfar_ptp.c
drivers/net/ibm_newemac/core.c
drivers/net/irda/toim3232-sir.c
drivers/net/macb.c
drivers/net/mv643xx_eth.c
drivers/net/natsemi.c
drivers/net/pxa168_eth.c
drivers/net/r8169.c
drivers/net/s2io.h
drivers/net/sb1250-mac.c
drivers/net/sungem.c
drivers/net/wan/lmc/lmc_var.h
drivers/net/wireless/ath/ath5k/ahb.c
drivers/net/wireless/b43/debugfs.c
drivers/net/wireless/b43/dma.c
drivers/net/wireless/b43/leds.c
drivers/net/wireless/b43/lo.c
drivers/net/wireless/b43/main.c
drivers/net/wireless/b43/main.h
drivers/net/wireless/b43/pcmcia.c
drivers/net/wireless/b43/phy_a.c
drivers/net/wireless/b43/phy_common.c
drivers/net/wireless/b43/phy_g.c
drivers/net/wireless/b43/phy_lp.c
drivers/net/wireless/b43/phy_n.c
drivers/net/wireless/b43/pio.c
drivers/net/wireless/b43/radio_2055.c
drivers/net/wireless/b43/rfkill.c
drivers/net/wireless/b43/sdio.c
drivers/net/wireless/b43/sysfs.c
drivers/net/wireless/b43/tables.c
drivers/net/wireless/b43/tables_lpphy.c
drivers/net/wireless/b43/tables_nphy.c
drivers/net/wireless/b43/wa.c
drivers/net/wireless/b43/xmit.c
drivers/net/wireless/b43legacy/debugfs.c
drivers/net/wireless/b43legacy/dma.c
drivers/net/wireless/b43legacy/ilt.c
drivers/net/wireless/b43legacy/leds.c
drivers/net/wireless/b43legacy/main.c
drivers/net/wireless/b43legacy/main.h
drivers/net/wireless/b43legacy/phy.c
drivers/net/wireless/b43legacy/phy.h
drivers/net/wireless/b43legacy/pio.c
drivers/net/wireless/b43legacy/radio.c
drivers/net/wireless/b43legacy/radio.h
drivers/net/wireless/b43legacy/rfkill.c
drivers/net/wireless/b43legacy/sysfs.c
drivers/net/wireless/b43legacy/xmit.c
drivers/net/wireless/iwlegacy/iwl-commands.h
drivers/net/wireless/iwlwifi/iwl-commands.h
drivers/net/wireless/rtlwifi/rtl8192ce/reg.h
drivers/parport/parport_ax88796.c
drivers/pci/hotplug/shpchp_sysfs.c
drivers/pci/pcie/aspm.c
drivers/pcmcia/at91_cf.c
drivers/pcmcia/electra_cf.c
drivers/pcmcia/pxa2xx_sharpsl.c
drivers/pcmcia/pxa2xx_trizeps4.c
drivers/pcmcia/rsrc_iodyn.c
drivers/pcmcia/rsrc_nonstatic.c
drivers/platform/x86/asus-wmi.c
drivers/pnp/pnpacpi/rsparser.c
drivers/pnp/pnpbios/rsparser.c
drivers/power/ds2782_battery.c
drivers/rtc/rtc-at32ap700x.c
drivers/rtc/rtc-cmos.c
drivers/rtc/rtc-ds1286.c
drivers/rtc/rtc-ds1511.c
drivers/rtc/rtc-ds1742.c
drivers/rtc/rtc-m48t35.c
drivers/rtc/rtc-m48t59.c
drivers/rtc/rtc-mrst.c
drivers/rtc/rtc-puv3.c
drivers/rtc/rtc-s3c.c
drivers/scsi/device_handler/scsi_dh_rdac.c
drivers/scsi/lpfc/lpfc_hw.h
drivers/scsi/qla2xxx/qla_isr.c
drivers/ssb/b43_pci_bridge.c
drivers/ssb/driver_chipcommon.c
drivers/ssb/driver_chipcommon_pmu.c
drivers/ssb/driver_extif.c
drivers/ssb/driver_gige.c
drivers/ssb/driver_mipscore.c
drivers/ssb/driver_pcicore.c
drivers/ssb/embedded.c
drivers/ssb/main.c
drivers/ssb/pci.c
drivers/ssb/pcihost_wrapper.c
drivers/ssb/pcmcia.c
drivers/ssb/scan.c
drivers/ssb/sdio.c
drivers/ssb/sprom.c
drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
drivers/staging/bcm/headers.h
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
drivers/staging/brcm80211/brcmfmac/wl_iw.c
drivers/staging/hv/hv_mouse.c
drivers/staging/hv/tools/hv_kvp_daemon.c
drivers/staging/nvec/nvec.c
drivers/staging/rtl8187se/r8180_core.c
drivers/staging/rtl8192e/ieee80211/ieee80211_module.c
drivers/staging/rtl8192e/r8192E_core.c
drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
drivers/staging/rtl8192u/r8192U_core.c
drivers/staging/rtl8712/drv_types.h
drivers/staging/rtl8712/osdep_service.h
drivers/staging/sep/sep_driver.c
drivers/staging/usbip/userspace/src/utils.h
drivers/target/tcm_fc/tfc_cmd.c
drivers/target/tcm_fc/tfc_conf.c
drivers/target/tcm_fc/tfc_io.c
drivers/target/tcm_fc/tfc_sess.c
drivers/tty/serial/8250_pci.c
drivers/tty/serial/Kconfig
drivers/tty/serial/Makefile
drivers/tty/serial/bfin_5xx.c
drivers/tty/serial/imx.c
drivers/tty/serial/m32r_sio.c
drivers/tty/serial/omap-serial.c
drivers/tty/serial/pxa.c
drivers/tty/serial/s3c2400.c [deleted file]
drivers/tty/serial/s3c2410.c
drivers/tty/serial/s3c2412.c
drivers/tty/serial/s3c2440.c
drivers/tty/serial/s3c24a0.c [deleted file]
drivers/tty/serial/s3c6400.c
drivers/tty/serial/s5pv210.c
drivers/tty/serial/samsung.c
drivers/tty/serial/samsung.h
drivers/tty/serial/sunsu.c
drivers/tty/serial/vt8500_serial.c
drivers/uio/uio_pdrv.c
drivers/uio/uio_pdrv_genirq.c
drivers/usb/gadget/atmel_usba_udc.c
drivers/usb/gadget/fsl_udc_core.c
drivers/usb/gadget/pxa27x_udc.h
drivers/usb/host/ehci-ath79.c
drivers/usb/host/ehci-cns3xxx.c
drivers/usb/host/ehci-fsl.c
drivers/usb/host/ehci-grlib.c
drivers/usb/host/ehci-ixp4xx.c
drivers/usb/host/ehci-octeon.c
drivers/usb/host/ehci-pmcmsp.c
drivers/usb/host/ehci-ppc-of.c
drivers/usb/host/ehci-w90x900.c
drivers/usb/host/ehci-xilinx-of.c
drivers/usb/host/fhci-hcd.c
drivers/usb/host/ohci-ath79.c
drivers/usb/host/ohci-cns3xxx.c
drivers/usb/host/ohci-da8xx.c
drivers/usb/host/ohci-octeon.c
drivers/usb/host/ohci-ppc-of.c
drivers/usb/host/ohci-ppc-soc.c
drivers/usb/host/ohci-sa1111.c
drivers/usb/host/ohci-sm501.c
drivers/usb/host/ohci-ssb.c
drivers/usb/host/ohci-tmio.c
drivers/usb/host/oxu210hp-hcd.c
drivers/usb/host/uhci-grlib.c
drivers/usb/host/whci/init.c
drivers/usb/misc/ftdi-elan.c
drivers/usb/musb/musb_core.c
drivers/usb/otg/isp1301_omap.c
drivers/usb/otg/otg_fsm.c
drivers/usb/otg/twl4030-usb.c
drivers/uwb/uwbd.c
drivers/uwb/whc-rc.c
drivers/video/atmel_lcdfb.c
drivers/video/aty/atyfb_base.c
drivers/video/au1100fb.c
drivers/video/cobalt_lcdfb.c
drivers/video/controlfb.c
drivers/video/ep93xx-fb.c
drivers/video/i810/i810.h
drivers/video/mb862xx/mb862xxfbdrv.c
drivers/video/msm/mdp.c
drivers/video/msm/msm_fb.c
drivers/video/nuc900fb.c
drivers/video/platinumfb.c
drivers/video/pxa168fb.c
drivers/video/udlfb.c
drivers/video/via/viafbdev.c
fs/9p/acl.c
fs/9p/acl.h
fs/9p/vfs_inode_dotl.c
fs/anon_inodes.c
fs/block_dev.c
fs/btrfs/acl.c
fs/btrfs/ctree.h
fs/btrfs/inode.c
fs/cifs/dir.c
fs/compat_ioctl.c
fs/ecryptfs/keystore.c
fs/ext2/acl.c
fs/ext2/acl.h
fs/ext2/file.c
fs/ext2/namei.c
fs/ext3/acl.c
fs/ext3/acl.h
fs/ext3/file.c
fs/ext3/namei.c
fs/ext4/acl.c
fs/ext4/acl.h
fs/ext4/file.c
fs/ext4/namei.c
fs/generic_acl.c
fs/gfs2/acl.c
fs/gfs2/acl.h
fs/gfs2/inode.c
fs/hugetlbfs/inode.c
fs/jffs2/acl.c
fs/jffs2/acl.h
fs/jffs2/dir.c
fs/jffs2/file.c
fs/jffs2/fs.c
fs/jffs2/os-linux.h
fs/jffs2/readinode.c
fs/jffs2/symlink.c
fs/jfs/acl.c
fs/jfs/file.c
fs/jfs/jfs_acl.h
fs/jfs/namei.c
fs/namei.c
fs/namespace.c
fs/nfs/idmap.c
fs/nfs/nfs3acl.c
fs/ocfs2/acl.c
fs/ocfs2/acl.h
fs/ocfs2/file.c
fs/ocfs2/move_extents.c
fs/ocfs2/namei.c
fs/partitions/check.c
fs/pipe.c
fs/posix_acl.c
fs/reiserfs/file.c
fs/reiserfs/inode.c
fs/reiserfs/journal.c
fs/reiserfs/namei.c
fs/reiserfs/xattr.c
fs/reiserfs/xattr_acl.c
fs/super.c
fs/xfs/linux-2.6/xfs_acl.c
fs/xfs/linux-2.6/xfs_file.c
fs/xfs/linux-2.6/xfs_iops.c
fs/xfs/linux-2.6/xfs_trace.h
fs/xfs/xfs_acl.h
fs/xfs/xfs_dir2_node.c
include/asm-generic/iomap.h
include/linux/blkdev.h
include/linux/ceph/libceph.h
include/linux/cgroup.h
include/linux/cred.h
include/linux/dio.h
include/linux/elevator.h
include/linux/fd.h
include/linux/fdtable.h
include/linux/fs.h
include/linux/generic_acl.h
include/linux/genhd.h
include/linux/hw_random.h
include/linux/init_task.h
include/linux/iocontext.h
include/linux/mfd/tps65910.h
include/linux/nl80211.h
include/linux/pnp.h
include/linux/posix_acl.h
include/linux/reiserfs_acl.h
include/linux/reiserfs_xattr.h
include/linux/rtnetlink.h
include/linux/sched.h
include/linux/ssb/ssb_driver_chipcommon.h
include/linux/stop_machine.h
include/linux/zorro.h
include/net/sock.h
include/scsi/osd_initiator.h
include/scsi/scsi.h
include/sound/soundfont.h
kernel/Makefile
kernel/cgroup.c
kernel/exit.c
kernel/fork.c
kernel/kexec.c
kernel/pid.c
kernel/power/Kconfig
kernel/rcutorture.c
kernel/sched.c
lib/vsprintf.c
mm/Kconfig
mm/backing-dev.c
mm/shmem.c
mm/slub.c
net/bridge/netfilter/ebt_ulog.c
net/mac80211/mesh_hwmp.c
net/mac80211/sta_info.c
net/netlabel/netlabel_domainhash.c
net/netlabel/netlabel_unlabeled.c
scripts/Kbuild.include
scripts/Makefile.lib
scripts/Makefile.modpost
scripts/bootgraph.pl
scripts/docproc.c
scripts/dtc/Makefile
scripts/dtc/dtc-lexer.lex.c_shipped
scripts/dtc/dtc-parser.tab.c_shipped
scripts/dtc/dtc-parser.tab.h_shipped
scripts/gcc-goto.sh
scripts/genksyms/.gitignore
scripts/genksyms/Makefile
scripts/genksyms/genksyms.c
scripts/genksyms/keywords.gperf
scripts/genksyms/keywords.hash.c_shipped [moved from scripts/genksyms/keywords.c_shipped with 94% similarity]
scripts/genksyms/lex.l
scripts/genksyms/lex.lex.c_shipped [moved from scripts/genksyms/lex.c_shipped with 89% similarity]
scripts/genksyms/parse.tab.c_shipped [moved from scripts/genksyms/parse.c_shipped with 92% similarity]
scripts/genksyms/parse.tab.h_shipped [moved from scripts/genksyms/parse.h_shipped with 96% similarity]
scripts/headers_install.pl
scripts/kconfig/.gitignore
scripts/kconfig/Makefile
scripts/kconfig/lkc.h
scripts/kconfig/zconf.gperf
scripts/kconfig/zconf.hash.c_shipped
scripts/kconfig/zconf.l
scripts/kconfig/zconf.lex.c_shipped [moved from scripts/kconfig/lex.zconf.c_shipped with 98% similarity]
scripts/kconfig/zconf.tab.c_shipped
scripts/kconfig/zconf.y
scripts/mkmakefile
scripts/package/Makefile
security/keys/keyring.c
security/selinux/selinuxfs.c
sound/aoa/soundbus/i2sbus/core.c
sound/atmel/abdac.c
sound/atmel/ac97c.c
sound/core/info.c
sound/pci/ice1712/ice1712.c
sound/ppc/pmac.c
sound/soc/ep93xx/ep93xx-i2s.c
sound/soc/ep93xx/ep93xx-pcm.c
sound/soc/ep93xx/snappercl15.c
sound/soc/fsl/mpc5200_dma.c
sound/soc/imx/imx-pcm-dma-mx2.c
sound/soc/omap/ams-delta.c

index 9dacde0a4b2dcec4ce33013354b6c46738daaef7..57af07cf7e682e77de69d96587b0ca315ea611a1 100644 (file)
@@ -45,6 +45,11 @@ modules.builtin
 /Module.markers
 /Module.symvers
 
+#
+# Debian directory (make deb-pkg)
+#
+/debian/
+
 #
 # git files that we don't want to ignore even it they are dot-files
 #
index 353ad5607156f0f2d4b5138f1b5d9db529933aa8..a4806f0de852079a2b2d093c30ba05d478df7ec5 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -73,8 +73,7 @@ Linas Vepstas <linas@austin.ibm.com>
 Mark Brown <broonie@sirena.org.uk>
 Matthieu CASTET <castet.matthieu@free.fr>
 Mayuresh Janorkar <mayur@ti.com>
-Michael Buesch <mb@bu3sch.de>
-Michael Buesch <mbuesch@freenet.de>
+Michael Buesch <m@bues.ch>
 Michel Dänzer <michel@tungstengraphics.com>
 Mitesh shah <mshah@teja.com>
 Morten Welinder <terra@gnome.org>
index 227e7ac45a06c4dbf3ac91973e492c3301df983f..c57d1ec6291cf00c7a3a2f87f13c84c0b53d5468 100644 (file)
@@ -210,7 +210,7 @@ for (i = 0; i &lt; reqbuf.count; i++)
       <programlisting>
 &v4l2-requestbuffers; reqbuf;
 /* Our current format uses 3 planes per buffer */
-#define FMT_NUM_PLANES = 3;
+#define FMT_NUM_PLANES = 3
 
 struct {
        void *start[FMT_NUM_PLANES];
index a8536cb88091744128d7b6f1d51e93304029bd30..bf82851a0e576e501137090a6550cee82f8cc3bb 100644 (file)
@@ -5,8 +5,8 @@ Although RCU is usually used to protect read-mostly data structures,
 it is possible to use RCU to provide dynamic non-maskable interrupt
 handlers, as well as dynamic irq handlers.  This document describes
 how to do this, drawing loosely from Zwane Mwaikambo's NMI-timer
-work in "arch/i386/oprofile/nmi_timer_int.c" and in
-"arch/i386/kernel/traps.c".
+work in "arch/x86/oprofile/nmi_timer_int.c" and in
+"arch/x86/kernel/traps.c".
 
 The relevant pieces of code are listed below, each followed by a
 brief explanation.
index c12bfc1a00c9812ebfa8c95314f34228dc7a1a1f..359587b2367b9287a22d20e525ad88e5de5410d9 100644 (file)
@@ -8,10 +8,13 @@ Introduction
 
   The Samsung S3C24XX range of ARM9 System-on-Chip CPUs are supported
   by the 's3c2410' architecture of ARM Linux. Currently the S3C2410,
-  S3C2412, S3C2413, S3C2416 S3C2440, S3C2442, S3C2443 and S3C2450 devices
+  S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443 and S3C2450 devices
   are supported.
 
-  Support for the S3C2400 and S3C24A0 series are in progress.
+  Support for the S3C2400 and S3C24A0 series was never completed and the
+  corresponding code has been removed after a while.  If someone wishes to
+  revive this effort, partial support can be retrieved from earlier Linux
+  versions.
 
   The S3C2416 and S3C2450 devices are very similar and S3C2450 support is
   included under the arch/arm/mach-s3c2416 directory. Note, whilst core
index f65274081c8d19a1c2f6f8b53712a1cf9cbee54d..d8147b336c354e203addd40bb85bcc0abbeeded6 100644 (file)
@@ -45,9 +45,13 @@ device.
 
 rq_affinity (RW)
 ----------------
-If this option is enabled, the block layer will migrate request completions
-to the CPU that originally submitted the request. For some workloads
-this provides a significant reduction in CPU cycles due to caching effects.
+If this option is '1', the block layer will migrate request completions to the
+cpu "group" that originally submitted the request. For some workloads this
+provides a significant reduction in CPU cycles due to caching effects.
+
+For storage configurations that need to maximize distribution of completion
+processing setting this option to '2' forces the completion to run on the
+requesting cpu (bypassing the "group" aggregation logic).
 
 scheduler (RW)
 --------------
index 0e8f618ab5344c3cbb6af186efcb4a0920a212db..bd85fb9dc6e57534afdf7bd6f044ef3838188c5b 100644 (file)
@@ -214,7 +214,7 @@ replacing "/usr/src" with wherever you keep your Linux kernel source tree:
   make config
   make bzImage (or zImage)
 
-Then install "arch/i386/boot/bzImage" or "arch/i386/boot/zImage" as your
+Then install "arch/x86/boot/bzImage" or "arch/x86/boot/zImage" as your
 standard kernel, run lilo if appropriate, and reboot.
 
 To create the necessary devices in /dev, the "make_rd" script included in
index 6c820baa19a6edb3a4bc5127d884377ebcd36b60..fa72e97dd66941c16213db1eb3a6a885e0d0c5c5 100644 (file)
@@ -64,9 +64,9 @@ the RAM disk dynamically grows as data is being written into it, a size field
 is not required. Bits 11 to 13 are not currently used and may as well be zero.
 These numbers are no magical secrets, as seen below:
 
-./arch/i386/kernel/setup.c:#define RAMDISK_IMAGE_START_MASK     0x07FF
-./arch/i386/kernel/setup.c:#define RAMDISK_PROMPT_FLAG          0x8000
-./arch/i386/kernel/setup.c:#define RAMDISK_LOAD_FLAG            0x4000
+./arch/x86/kernel/setup.c:#define RAMDISK_IMAGE_START_MASK     0x07FF
+./arch/x86/kernel/setup.c:#define RAMDISK_PROMPT_FLAG          0x8000
+./arch/x86/kernel/setup.c:#define RAMDISK_LOAD_FLAG            0x4000
 
 Consider a typical two floppy disk setup, where you will have the
 kernel on disk one, and have already put a RAM disk image onto disk #2.
@@ -85,7 +85,7 @@ The command line equivalent is: "prompt_ramdisk=1"
 Putting that together gives 2^15 + 2^14 + 0 = 49152 for an rdev word.
 So to create disk one of the set, you would do:
 
-       /usr/src/linux# cat arch/i386/boot/zImage > /dev/fd0
+       /usr/src/linux# cat arch/x86/boot/zImage > /dev/fd0
        /usr/src/linux# rdev /dev/fd0 /dev/fd0
        /usr/src/linux# rdev -r /dev/fd0 49152
 
index 6c30e930c1225d141cda19989cbb62462804b29d..c436096351f84ce15d13f02fe8f3148ea9940435 100644 (file)
@@ -168,7 +168,7 @@ in-chipset dynamic frequency switching to policy->min, the upper limit
 to policy->max, and -if supported- select a performance-oriented
 setting when policy->policy is CPUFREQ_POLICY_PERFORMANCE, and a
 powersaving-oriented setting when CPUFREQ_POLICY_POWERSAVE. Also check
-the reference implementation in arch/i386/kernel/cpu/cpufreq/longrun.c
+the reference implementation in drivers/cpufreq/longrun.c
 
 
 
index d093e550dbeb3e4faad2d5cf33dc2d2f9383c8e1..89e46d3dc642e1f88ddee780e085fea189130dc1 100644 (file)
@@ -199,7 +199,7 @@ Files:      drivers/staging/cs5535_gpio/*
 Check: drivers/staging/cs5535_gpio/cs5535_gpio.c
 Why:   A newer driver replaces this; it is drivers/gpio/cs5535-gpio.c, and
        integrates with the Linux GPIO subsystem.  The old driver has been
-       moved to staging, and will be removed altogether around 2.6.40.
+       moved to staging, and will be removed altogether around 3.0.
        Please test the new driver, and ensure that the functionality you
        need and any bugfixes from the old driver are available in the new
        one.
@@ -294,7 +294,7 @@ When:       The schedule was July 2008, but it was decided that we are going to keep t
 Why:   The support code for the old firmware hurts code readability/maintainability
        and slightly hurts runtime performance. Bugfixes for the old firmware
        are not provided by Broadcom anymore.
-Who:   Michael Buesch <mb@bu3sch.de>
+Who:   Michael Buesch <m@bues.ch>
 
 ---------------------------
 
@@ -430,7 +430,7 @@ Who:        Avi Kivity <avi@redhat.com>
 ----------------------------
 
 What:  iwlwifi 50XX module parameters
-When:  2.6.40
+When:  3.0
 Why:   The "..50" modules parameters were used to configure 5000 series and
        up devices; different set of module parameters also available for 4965
        with same functionalities. Consolidate both set into single place
@@ -441,7 +441,7 @@ Who:        Wey-Yi Guy <wey-yi.w.guy@intel.com>
 ----------------------------
 
 What:  iwl4965 alias support
-When:  2.6.40
+When:  3.0
 Why:   Internal alias support has been present in module-init-tools for some
        time, the MODULE_ALIAS("iwl4965") boilerplate aliases can be removed
        with no impact.
@@ -482,7 +482,7 @@ Who:        FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
 ----------------------------
 
 What:  iwlwifi disable_hw_scan module parameters
-When:  2.6.40
+When:  3.0
 Why:   Hareware scan is the prefer method for iwlwifi devices for
        scanning operation. Remove software scan support for all the
        iwlwifi devices.
@@ -493,7 +493,7 @@ Who:        Wey-Yi Guy <wey-yi.w.guy@intel.com>
 
 What:   access to nfsd auth cache through sys_nfsservctl or '.' files
         in the 'nfsd' filesystem.
-When:   2.6.40
+When:   3.0
 Why:    This is a legacy interface which have been replaced by a more
         dynamic cache.  Continuing to maintain this interface is an
         unnecessary burden.
@@ -536,7 +536,7 @@ Who:        Jean Delvare <khali@linux-fr.org>
 ----------------------------
 
 What:  Support for UVCIOC_CTRL_ADD in the uvcvideo driver
-When:  2.6.42
+When:  3.2
 Why:   The information passed to the driver by this ioctl is now queried
        dynamically from the device.
 Who:   Laurent Pinchart <laurent.pinchart@ideasonboard.com>
@@ -544,7 +544,7 @@ Who:        Laurent Pinchart <laurent.pinchart@ideasonboard.com>
 ----------------------------
 
 What:  Support for UVCIOC_CTRL_MAP_OLD in the uvcvideo driver
-When:  2.6.42
+When:  3.2
 Why:   Used only by applications compiled against older driver versions.
        Superseded by UVCIOC_CTRL_MAP which supports V4L2 menu controls.
 Who:   Laurent Pinchart <laurent.pinchart@ideasonboard.com>
@@ -552,7 +552,7 @@ Who:        Laurent Pinchart <laurent.pinchart@ideasonboard.com>
 ----------------------------
 
 What:  Support for UVCIOC_CTRL_GET and UVCIOC_CTRL_SET in the uvcvideo driver
-When:  2.6.42
+When:  3.2
 Why:   Superseded by the UVCIOC_CTRL_QUERY ioctl.
 Who:   Laurent Pinchart <laurent.pinchart@ideasonboard.com>
 
index ca7e25292542a6934f4d3210846167e4343228c4..7e4699146fe172d15fed459d8e702cc38035b59b 100644 (file)
@@ -52,7 +52,7 @@ ata *);
        void (*put_link) (struct dentry *, struct nameidata *, void *);
        void (*truncate) (struct inode *);
        int (*permission) (struct inode *, int, unsigned int);
-       int (*check_acl)(struct inode *, int);
+       int (*get_acl)(struct inode *, int);
        int (*setattr) (struct dentry *, struct iattr *);
        int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *);
        int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
@@ -80,7 +80,7 @@ put_link:     no
 truncate:      yes             (see below)
 setattr:       yes
 permission:    no (may not block if called in rcu-walk mode)
-check_acl:     no
+get_acl:       no
 getattr:       no
 setxattr:      yes
 getxattr:      no
index 90c71c6f0d005f6066a6c7932ad55f36f12667d5..ffdd9d866ad76cb4bb21553e238a45c8fd3d3c7d 100644 (file)
@@ -226,7 +226,7 @@ They depend on various facilities being available:
        cdrecord.
 
        e.g.
-         cdrecord dev=ATAPI:1,0,0 arch/i386/boot/image.iso
+         cdrecord dev=ATAPI:1,0,0 arch/x86/boot/image.iso
 
        For more information on isolinux, including how to create bootdisks
        for prebuilt kernels, see http://syslinux.zytor.com/
index 7f8861d341ea83321092db0b94e79953c795b5e1..b4a3d765ff9ac07aa41e8d12ddbd4e97be5b9bc6 100644 (file)
@@ -407,10 +407,11 @@ to some pointer to returning that pointer.  On errors return ERR_PTR(...).
 
 --
 [mandatory]
-       ->permission(), generic_permission() and ->check_acl() have lost flags
+       ->permission() and generic_permission()have lost flags
 argument; instead of passing IPERM_FLAG_RCU we add MAY_NOT_BLOCK into mask.
-       generic_permission() has also lost the check_acl argument; if you want
-non-NULL to be used for that inode, put it into ->i_op->check_acl.
+       generic_permission() has also lost the check_acl argument; ACL checking
+has been taken to VFS and filesystems need to provide a non-NULL ->i_op->get_acl
+to read an ACL from disk.
 
 --
 [mandatory]
index eff6617c9a0f6fe7c3824926c8a79b26ccd5b290..52d8fb81cffffdffe3cb8f4ddb1cd65d586855fb 100644 (file)
@@ -356,7 +356,7 @@ struct inode_operations {
         void (*put_link) (struct dentry *, struct nameidata *, void *);
        void (*truncate) (struct inode *);
        int (*permission) (struct inode *, int);
-       int (*check_acl)(struct inode *, int);
+       int (*get_acl)(struct inode *, int);
        int (*setattr) (struct dentry *, struct iattr *);
        int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
        int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
index 38425f0f264509289c30af96747e1efb7d70a2f8..6f496a5867324cc5750f90ecd0fd91d3547b554d 100644 (file)
@@ -76,7 +76,8 @@ IT8718F, IT8720F, IT8721F, IT8726F, IT8758E and SiS950 chips.
 These chips are 'Super I/O chips', supporting floppy disks, infrared ports,
 joysticks and other miscellaneous stuff. For hardware monitoring, they
 include an 'environment controller' with 3 temperature sensors, 3 fan
-rotation speed sensors, 8 voltage sensors, and associated alarms.
+rotation speed sensors, 8 voltage sensors, associated alarms, and chassis
+intrusion detection.
 
 The IT8712F and IT8716F additionally feature VID inputs, used to report
 the Vcore voltage of the processor. The early IT8712F have 5 VID pins,
index 60932e26abaaafb28f5aeb199d1a0f80d9c6a492..2bdc881a0c1238da62e9e3dd912057a817874f4c 100644 (file)
@@ -13,7 +13,8 @@ Supported chips:
     Datasheet: Publicly available at the National Semiconductor website
                http://www.national.com/
 
-Author: Frodo Looijaard <frodol@dds.nl>
+Authors: Frodo Looijaard <frodol@dds.nl>
+         Jean Delvare <khali@linux-fr.org>
 
 Description
 -----------
diff --git a/Documentation/hwmon/sch5636 b/Documentation/hwmon/sch5636
new file mode 100644 (file)
index 0000000..f83bd1c
--- /dev/null
@@ -0,0 +1,31 @@
+Kernel driver sch5636
+=====================
+
+Supported chips:
+  * SMSC SCH5636
+    Prefix: 'sch5636'
+    Addresses scanned: none, address read from Super I/O config space
+
+Author: Hans de Goede <hdegoede@redhat.com>
+
+
+Description
+-----------
+
+SMSC SCH5636 Super I/O chips include an embedded microcontroller for
+hardware monitoring solutions, allowing motherboard manufacturers to create
+their own custom hwmon solution based upon the SCH5636.
+
+Currently the sch5636 driver only supports the Fujitsu Theseus SCH5636 based
+hwmon solution. The sch5636 driver runs a sanity check on loading to ensure
+it is dealing with a Fujitsu Theseus and not with another custom SCH5636 based
+hwmon solution.
+
+The Fujitsu Theseus can monitor up to 5 voltages, 8 fans and 16
+temperatures. Note that the driver detects how many fan headers /
+temperature sensors are actually implemented on the motherboard, so you will
+likely see fewer temperature and fan inputs.
+
+An application note describing the Theseus' registers, as well as an
+application note describing the protocol for communicating with the
+microcontroller is available upon request. Please mail me if you want a copy.
index 1e77fac4e120b931ea6e5e17a9aa8ea069559c5d..22ca53a67e23af5324fbf6b73ca820927bc12c50 100644 (file)
@@ -110,7 +110,7 @@ V. Getting Logical Configuration Table
       ENOBUFS     Buffer not large enough.  If this occurs, the required
                   buffer length is written into *(lct->reslen)
 
-VI. Settting Parameters
+VI. Setting Parameters
 
    SYNOPSIS
 
index 99e87a61897d6b012c7979cc052799c39fe90668..b1a573cf4472e068878c97afed44ea47f940cb95 100644 (file)
@@ -506,7 +506,7 @@ to e.g. the Internet:
      <ISDN subsystem - ISDN support -- HiSax>
      make clean; make zImage; make modules; make modules_install
 2. Install the new kernel
-     cp /usr/src/linux/arch/i386/boot/zImage /etc/kernel/linux.isdn
+     cp /usr/src/linux/arch/x86/boot/zImage /etc/kernel/linux.isdn
      vi /etc/lilo.conf
      <add new kernel in the bootable image section>
      lilo
index 47435e56c5dae3970468003034decf2698caa0e6..f47cdefb4d1efc17d4e515df31996f134674649e 100644 (file)
@@ -441,7 +441,7 @@ more details, with real examples.
        specified if first option are not supported.
 
        Example:
-               #arch/i386/kernel/Makefile
+               #arch/x86/kernel/Makefile
                vsyscall-flags += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
 
        In the above example, vsyscall-flags will be assigned the option
@@ -460,7 +460,7 @@ more details, with real examples.
        supported to use an optional second option.
 
        Example:
-               #arch/i386/Makefile
+               #arch/x86/Makefile
                cflags-y += $(call cc-option,-march=pentium-mmx,-march=i586)
 
        In the above example, cflags-y will be assigned the option
@@ -522,7 +522,7 @@ more details, with real examples.
        even though the option was accepted by gcc.
 
        Example:
-               #arch/i386/Makefile
+               #arch/x86/Makefile
                cflags-y += $(shell \
                if [ $(call cc-version) -ge 0300 ] ; then \
                        echo "-mregparm=3"; fi ;)
@@ -802,7 +802,7 @@ but in the architecture makefiles where the kbuild infrastructure
 is not sufficient this sometimes needs to be explicit.
 
        Example:
-               #arch/i386/boot/Makefile
+               #arch/x86/boot/Makefile
                subdir- := compressed/
 
 The above assignment instructs kbuild to descend down in the
@@ -812,12 +812,12 @@ To support the clean infrastructure in the Makefiles that builds the
 final bootimage there is an optional target named archclean:
 
        Example:
-               #arch/i386/Makefile
+               #arch/x86/Makefile
                archclean:
-                       $(Q)$(MAKE) $(clean)=arch/i386/boot
+                       $(Q)$(MAKE) $(clean)=arch/x86/boot
 
-When "make clean" is executed, make will descend down in arch/i386/boot,
-and clean as usual. The Makefile located in arch/i386/boot/ may use
+When "make clean" is executed, make will descend down in arch/x86/boot,
+and clean as usual. The Makefile located in arch/x86/boot/ may use
 the subdir- trick to descend further down.
 
 Note 1: arch/$(ARCH)/Makefile cannot use "subdir-", because that file is
@@ -882,7 +882,7 @@ When kbuild executes, the following steps are followed (roughly):
        LDFLAGS_vmlinux uses the LDFLAGS_$@ support.
 
        Example:
-               #arch/i386/Makefile
+               #arch/x86/Makefile
                LDFLAGS_vmlinux := -e stext
 
     OBJCOPYFLAGS       objcopy flags
@@ -920,14 +920,14 @@ When kbuild executes, the following steps are followed (roughly):
        Often, the KBUILD_CFLAGS variable depends on the configuration.
 
        Example:
-               #arch/i386/Makefile
+               #arch/x86/Makefile
                cflags-$(CONFIG_M386) += -march=i386
                KBUILD_CFLAGS += $(cflags-y)
 
        Many arch Makefiles dynamically run the target C compiler to
        probe supported options:
 
-               #arch/i386/Makefile
+               #arch/x86/Makefile
 
                ...
                cflags-$(CONFIG_MPENTIUMII)     += $(call cc-option,\
@@ -1038,8 +1038,8 @@ When kbuild executes, the following steps are followed (roughly):
        into the arch/$(ARCH)/boot/Makefile.
 
        Example:
-               #arch/i386/Makefile
-               boot := arch/i386/boot
+               #arch/x86/Makefile
+               boot := arch/x86/boot
                bzImage: vmlinux
                        $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
@@ -1051,7 +1051,7 @@ When kbuild executes, the following steps are followed (roughly):
        To support this, $(archhelp) must be defined.
 
        Example:
-               #arch/i386/Makefile
+               #arch/x86/Makefile
                define archhelp
                  echo  '* bzImage      - Image (arch/$(ARCH)/boot/bzImage)'
                endif
@@ -1065,7 +1065,7 @@ When kbuild executes, the following steps are followed (roughly):
        from vmlinux.
 
        Example:
-               #arch/i386/Makefile
+               #arch/x86/Makefile
                all: bzImage
 
        When "make" is executed without arguments, bzImage will be built.
@@ -1083,7 +1083,7 @@ When kbuild executes, the following steps are followed (roughly):
        2) kbuild knows what files to delete during "make clean"
 
        Example:
-               #arch/i386/kernel/Makefile
+               #arch/x86/kernel/Makefile
                extra-y := head.o init_task.o
 
        In this example, extra-y is used to list object files that
@@ -1133,7 +1133,7 @@ When kbuild executes, the following steps are followed (roughly):
        Compress target. Use maximum compression to compress target.
 
        Example:
-               #arch/i386/boot/Makefile
+               #arch/x86/boot/Makefile
                LDFLAGS_bootsect := -Ttext 0x0 -s --oformat binary
                LDFLAGS_setup    := -Ttext 0x0 -s --oformat binary -e begtext
 
@@ -1193,7 +1193,7 @@ When kbuild executes, the following steps are followed (roughly):
 
        When updating the $(obj)/bzImage target, the line
 
-       BUILD    arch/i386/boot/bzImage
+       BUILD    arch/x86/boot/bzImage
 
        will be displayed with "make KBUILD_VERBOSE=0".
 
@@ -1207,7 +1207,7 @@ When kbuild executes, the following steps are followed (roughly):
        kbuild knows .lds files and includes a rule *lds.S -> *lds.
 
        Example:
-               #arch/i386/kernel/Makefile
+               #arch/x86/kernel/Makefile
                always := vmlinux.lds
 
                #Makefile
index 4b12abcb2ad3cf0eba636dd78c4848521bf9fc28..abf481f780ec4856ec455257f07f3e6bb9fa57df 100644 (file)
@@ -66,7 +66,7 @@ MKISS_DRIVER_MAGIC    0x04bf      mkiss_channel     drivers/net/mkiss.h
 RISCOM8_MAGIC         0x0907      riscom_port       drivers/char/riscom8.h
 SPECIALIX_MAGIC       0x0907      specialix_port    drivers/char/specialix_io8.h
 HDLC_MAGIC            0x239e      n_hdlc            drivers/char/n_hdlc.c
-APM_BIOS_MAGIC        0x4101      apm_user          arch/i386/kernel/apm.c
+APM_BIOS_MAGIC        0x4101      apm_user          arch/x86/kernel/apm_32.c
 CYCLADES_MAGIC        0x4359      cyclades_port     include/linux/cyclades.h
 DB_MAGIC              0x4442      fc_info           drivers/net/iph5526_novram.c
 DL_MAGIC              0x444d      fc_info           drivers/net/iph5526_novram.c
index 510375d4209a608c2452dc7b631fb045ba7e83fa..dfd130c2207dba8aace4d1ea41299e14a124346c 100644 (file)
@@ -11,7 +11,7 @@ Adapter Detection
 
 The ideal MCA adapter detection is done through the use of the
 Programmable Option Select registers.  Generic functions for doing
-this have been added in include/linux/mca.h and arch/i386/kernel/mca.c.
+this have been added in include/linux/mca.h and arch/x86/kernel/mca_32.c.
 Everything needed to detect adapters and read (and write) configuration
 information is there.  A number of MCA-specific drivers already use
 this.  The typical probe code looks like the following:
@@ -81,7 +81,7 @@ more people use shared IRQs on PCI machines.
 In general, an interrupt must be acknowledged not only at the ICU (which
 is done automagically by the kernel), but at the device level.  In
 particular, IRQ 0 must be reset after a timer interrupt (now done in
-arch/i386/kernel/time.c) or the first timer interrupt hangs the system.
+arch/x86/kernel/time.c) or the first timer interrupt hangs the system.
 There were also problems with the 1.3.x floppy drivers, but that seems
 to have been fixed.
 
index d43dbcbd163b4d45e3479614149c780b5e12778f..28aa1075e291c40e832db64a113e8328ff6b2a06 100644 (file)
@@ -66,7 +66,7 @@ Your cpu_idle routines need to obey the following rules:
            barrier issued (followed by a test of need_resched with
            interrupts disabled, as explained in 3).
 
-arch/i386/kernel/process.c has examples of both polling and
+arch/x86/kernel/process.c has examples of both polling and
 sleeping idle functions.
 
 
index d7fbc9488b9859f334e6ef41f193272f2355421d..48e982cd6fe76dbbb66ac60875857d5193bf2ea1 100644 (file)
@@ -553,7 +553,7 @@ replacing "/usr/src" with wherever you keep your Linux kernel source tree:
   make config
   make zImage
 
-Then install "arch/i386/boot/zImage" as your standard kernel, run lilo if
+Then install "arch/x86/boot/zImage" as your standard kernel, run lilo if
 appropriate, and reboot.
 
 
index c57ea4781e5d7426631eaf308b145fb05b921eef..60a6f657c37d23de5f9bab87b1047898a2908f47 100644 (file)
@@ -87,7 +87,7 @@ c) Set address on ISA cards then:
           edit /usr/src/linux/drivers/char/ip2.c  
            (Optional - may be specified on kernel command line now)
 d) Run "make zImage" or whatever target you prefer.
-e) mv /usr/src/linux/arch/i386/boot/zImage to /boot.
+e) mv /usr/src/linux/arch/x86/boot/zImage to /boot.
 f) Add new config for this kernel into /etc/lilo.conf, run "lilo"
        or copy to a floppy disk and boot from that floppy disk.
 g) Reboot using this kernel
index 4c4ce853577b97ef0f9898c19eadb897342de26b..c278f412dc6557284854b4761e7fc7345d0ffc7b 100644 (file)
@@ -66,7 +66,7 @@ MKISS_DRIVER_MAGIC    0x04bf      mkiss_channel     drivers/net/mkiss.h
 RISCOM8_MAGIC         0x0907      riscom_port       drivers/char/riscom8.h
 SPECIALIX_MAGIC       0x0907      specialix_port    drivers/char/specialix_io8.h
 HDLC_MAGIC            0x239e      n_hdlc            drivers/char/n_hdlc.c
-APM_BIOS_MAGIC        0x4101      apm_user          arch/i386/kernel/apm.c
+APM_BIOS_MAGIC        0x4101      apm_user          arch/x86/kernel/apm_32.c
 CYCLADES_MAGIC        0x4359      cyclades_port     include/linux/cyclades.h
 DB_MAGIC              0x4442      fc_info           drivers/net/iph5526_novram.c
 DL_MAGIC              0x444d      fc_info           drivers/net/iph5526_novram.c
index d13bd1536084a81bac4b9ff41f0d017145d4b21b..846f70ddc8dbd354cf48c70ab885c51e4b67f4b3 100644 (file)
@@ -696,7 +696,7 @@ T:  git git://git.infradead.org/users/cbou/linux-cns3xxx.git
 
 ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE
 M:     Hartley Sweeten <hsweeten@visionengravers.com>
-M:     Ryan Mallon <ryan@bluewatersys.com>
+M:     Ryan Mallon <rmallon@gmail.com>
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:     Maintained
 F:     arch/arm/mach-ep93xx/
@@ -1588,7 +1588,7 @@ F:        Documentation/sound/alsa/Bt87x.txt
 F:     sound/pci/bt87x.c
 
 BT8XXGPIO DRIVER
-M:     Michael Buesch <mb@bu3sch.de>
+M:     Michael Buesch <m@bues.ch>
 W:     http://bu3sch.de/btgpio.php
 S:     Maintained
 F:     drivers/gpio/bt8xxgpio.c
@@ -3960,6 +3960,13 @@ L:       lm-sensors@lm-sensors.org
 S:     Maintained
 F:     drivers/hwmon/lm73.c
 
+LM78 HARDWARE MONITOR DRIVER
+M:     Jean Delvare <khali@linux-fr.org>
+L:     lm-sensors@lm-sensors.org
+S:     Maintained
+F:     Documentation/hwmon/lm78
+F:     drivers/hwmon/lm78.c
+
 LM83 HARDWARE MONITOR DRIVER
 M:     Jean Delvare <khali@linux-fr.org>
 L:     lm-sensors@lm-sensors.org
@@ -5910,7 +5917,7 @@ S:        Maintained
 F:     drivers/net/sonic.*
 
 SONICS SILICON BACKPLANE DRIVER (SSB)
-M:     Michael Buesch <mb@bu3sch.de>
+M:     Michael Buesch <m@bues.ch>
 L:     netdev@vger.kernel.org
 S:     Maintained
 F:     drivers/ssb/
index 0be50413b2b5007ff2343d0be0b94d1d6dc378c3..46cefbd50e73453abc7d26c08e501c09ce8da5e9 100644 (file)
@@ -27,7 +27,7 @@
 #define fd_cacheflush(addr,size) /* nothing */
 #define fd_request_irq()        request_irq(FLOPPY_IRQ, floppy_interrupt,\
                                            IRQF_DISABLED, "floppy", NULL)
-#define fd_free_irq()           free_irq(FLOPPY_IRQ, NULL);
+#define fd_free_irq()           free_irq(FLOPPY_IRQ, NULL)
 
 #ifdef CONFIG_PCI
 
index 83a7aa2ca57a0aa7b8e4f6e480a67157c0da352b..9cb1f4bd7618ac30723f55b9b89889afc3bfac24 100644 (file)
@@ -493,14 +493,6 @@ config ARCH_KIRKWOOD
          Support for the following Marvell Kirkwood series SoCs:
          88F6180, 88F6192 and 88F6281.
 
-config ARCH_LOKI
-       bool "Marvell Loki (88RC8480)"
-       select CPU_FEROCEON
-       select GENERIC_CLOCKEVENTS
-       select PLAT_ORION
-       help
-         Support for the Marvell Loki (88RC8480) SoC.
-
 config ARCH_LPC32XX
        bool "NXP LPC32XX"
        select CLKSRC_MMIO
@@ -686,6 +678,7 @@ config ARCH_S3C2410
        select GENERIC_GPIO
        select ARCH_HAS_CPUFREQ
        select HAVE_CLK
+       select CLKDEV_LOOKUP
        select ARCH_USES_GETTIMEOFFSET
        select HAVE_S3C2410_I2C if I2C
        help
@@ -703,6 +696,7 @@ config ARCH_S3C64XX
        select CPU_V6
        select ARM_VIC
        select HAVE_CLK
+       select CLKDEV_LOOKUP
        select NO_IOPORT
        select ARCH_USES_GETTIMEOFFSET
        select ARCH_HAS_CPUFREQ
@@ -727,6 +721,8 @@ config ARCH_S5P64X0
        select CPU_V6
        select GENERIC_GPIO
        select HAVE_CLK
+       select CLKDEV_LOOKUP
+       select CLKSRC_MMIO
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select GENERIC_CLOCKEVENTS
        select HAVE_SCHED_CLOCK
@@ -740,6 +736,7 @@ config ARCH_S5PC100
        bool "Samsung S5PC100"
        select GENERIC_GPIO
        select HAVE_CLK
+       select CLKDEV_LOOKUP
        select CPU_V7
        select ARM_L1_CACHE_SHIFT_6
        select ARCH_USES_GETTIMEOFFSET
@@ -755,6 +752,8 @@ config ARCH_S5PV210
        select ARCH_SPARSEMEM_ENABLE
        select GENERIC_GPIO
        select HAVE_CLK
+       select CLKDEV_LOOKUP
+       select CLKSRC_MMIO
        select ARM_L1_CACHE_SHIFT_6
        select ARCH_HAS_CPUFREQ
        select GENERIC_CLOCKEVENTS
@@ -771,6 +770,7 @@ config ARCH_EXYNOS4
        select ARCH_SPARSEMEM_ENABLE
        select GENERIC_GPIO
        select HAVE_CLK
+       select CLKDEV_LOOKUP
        select ARCH_HAS_CPUFREQ
        select GENERIC_CLOCKEVENTS
        select HAVE_S3C_RTC if RTC_CLASS
@@ -856,6 +856,7 @@ config ARCH_OMAP
        select HAVE_CLK
        select ARCH_REQUIRE_GPIOLIB
        select ARCH_HAS_CPUFREQ
+       select CLKSRC_MMIO
        select GENERIC_CLOCKEVENTS
        select HAVE_SCHED_CLOCK
        select ARCH_HAS_HOLES_MEMORYMODEL
@@ -928,8 +929,6 @@ source "arch/arm/mach-kirkwood/Kconfig"
 
 source "arch/arm/mach-ks8695/Kconfig"
 
-source "arch/arm/mach-loki/Kconfig"
-
 source "arch/arm/mach-lpc32xx/Kconfig"
 
 source "arch/arm/mach-msm/Kconfig"
@@ -973,7 +972,6 @@ source "arch/arm/plat-spear/Kconfig"
 source "arch/arm/plat-tcc/Kconfig"
 
 if ARCH_S3C2410
-source "arch/arm/mach-s3c2400/Kconfig"
 source "arch/arm/mach-s3c2410/Kconfig"
 source "arch/arm/mach-s3c2412/Kconfig"
 source "arch/arm/mach-s3c2416/Kconfig"
index f5b2b390c8f227353eb26ce233b4786a65229808..206c34ecb9e35fdc5fa6d2ac8d62144b68d0c84b 100644 (file)
@@ -150,7 +150,6 @@ machine-$(CONFIG_ARCH_IXP23XX)              := ixp23xx
 machine-$(CONFIG_ARCH_IXP4XX)          := ixp4xx
 machine-$(CONFIG_ARCH_KIRKWOOD)                := kirkwood
 machine-$(CONFIG_ARCH_KS8695)          := ks8695
-machine-$(CONFIG_ARCH_LOKI)            := loki
 machine-$(CONFIG_ARCH_LPC32XX)         := lpc32xx
 machine-$(CONFIG_ARCH_MMP)             := mmp
 machine-$(CONFIG_ARCH_MSM)             := msm
@@ -172,8 +171,7 @@ machine-$(CONFIG_ARCH_PNX4008)              := pnx4008
 machine-$(CONFIG_ARCH_PXA)             := pxa
 machine-$(CONFIG_ARCH_REALVIEW)                := realview
 machine-$(CONFIG_ARCH_RPC)             := rpc
-machine-$(CONFIG_ARCH_S3C2410)         := s3c2410 s3c2400 s3c2412 s3c2416 s3c2440 s3c2443
-machine-$(CONFIG_ARCH_S3C24A0)         := s3c24a0
+machine-$(CONFIG_ARCH_S3C2410)         := s3c2410 s3c2412 s3c2416 s3c2440 s3c2443
 machine-$(CONFIG_ARCH_S3C64XX)         := s3c64xx
 machine-$(CONFIG_ARCH_S5P64X0)         := s5p64x0
 machine-$(CONFIG_ARCH_S5PC100)         := s5pc100
index c11af1e4bad309d4054b7eed7fe3c285cefc8fbf..a07b0e763a805109c007161d46efd6df5f45d6b6 100644 (file)
@@ -193,7 +193,7 @@ static int __devinit scoop_probe(struct platform_device *pdev)
        spin_lock_init(&devptr->scoop_lock);
 
        inf = pdev->dev.platform_data;
-       devptr->base = ioremap(mem->start, mem->end - mem->start + 1);
+       devptr->base = ioremap(mem->start, resource_size(mem));
 
        if (!devptr->base) {
                ret = -ENOMEM;
index 921e56a7572c355d538a54d4ccf15ee9aedadf09..f4b767256f95c7a7dbc5c82039329b70aa227e22 100644 (file)
@@ -5,7 +5,6 @@ CONFIG_SYSVIPC=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=18
-CONFIG_SYSFS_DEPRECATED_V2=y
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_MODULES=y
@@ -13,6 +12,7 @@ CONFIG_MODULE_UNLOAD=y
 CONFIG_MODULE_FORCE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_ARCH_PXA=y
+CONFIG_GPIO_PCA953X=y
 CONFIG_MACH_CM_X300=y
 CONFIG_NO_HZ=y
 CONFIG_AEABI=y
@@ -23,7 +23,6 @@ CONFIG_CMDLINE="root=/dev/mtdblock5 rootfstype=ubifs console=ttyS2,38400"
 CONFIG_CPU_FREQ=y
 CONFIG_CPU_FREQ_GOV_USERSPACE=y
 CONFIG_FPE_NWFPE=y
-CONFIG_PM=y
 CONFIG_APM_EMULATION=y
 CONFIG_NET=y
 CONFIG_PACKET=y
@@ -40,8 +39,8 @@ CONFIG_IP_PNP_RARP=y
 # CONFIG_INET_DIAG is not set
 # CONFIG_IPV6 is not set
 CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
+CONFIG_BT_L2CAP=y
+CONFIG_BT_SCO=y
 CONFIG_BT_RFCOMM=m
 CONFIG_BT_RFCOMM_TTY=y
 CONFIG_BT_BNEP=m
@@ -60,7 +59,6 @@ CONFIG_MTD_NAND_PXA3xx=y
 CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
-# CONFIG_MISC_DEVICES is not set
 CONFIG_SCSI=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_NETDEVICES=y
@@ -81,16 +79,15 @@ CONFIG_TOUCHSCREEN_WM97XX=m
 # CONFIG_TOUCHSCREEN_WM9705 is not set
 # CONFIG_TOUCHSCREEN_WM9713 is not set
 # CONFIG_SERIO is not set
+# CONFIG_LEGACY_PTYS is not set
 CONFIG_SERIAL_PXA=y
 CONFIG_SERIAL_PXA_CONSOLE=y
-# CONFIG_LEGACY_PTYS is not set
 # CONFIG_HW_RANDOM is not set
 CONFIG_I2C=y
 CONFIG_I2C_PXA=y
 CONFIG_SPI=y
 CONFIG_SPI_GPIO=y
 CONFIG_GPIO_SYSFS=y
-CONFIG_GPIO_PCA953X=y
 # CONFIG_HWMON is not set
 CONFIG_PMIC_DA903X=y
 CONFIG_REGULATOR=y
@@ -102,7 +99,6 @@ CONFIG_LCD_CLASS_DEVICE=y
 CONFIG_LCD_TDO24M=y
 # CONFIG_BACKLIGHT_GENERIC is not set
 CONFIG_BACKLIGHT_DA903X=m
-# CONFIG_VGA_CONSOLE is not set
 CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
 CONFIG_FONTS=y
@@ -131,7 +127,6 @@ CONFIG_HID_GREENASIA=y
 CONFIG_HID_SMARTJOYPLUS=y
 CONFIG_HID_TOPSEED=y
 CONFIG_HID_THRUSTMASTER=y
-CONFIG_HID_WACOM=m
 CONFIG_HID_ZEROPLUS=y
 CONFIG_USB=y
 CONFIG_USB_DEVICEFS=y
@@ -152,7 +147,6 @@ CONFIG_RTC_DRV_PXA=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
-CONFIG_INOTIFY=y
 CONFIG_MSDOS_FS=m
 CONFIG_VFAT_FS=m
 CONFIG_TMPFS=y
@@ -164,7 +158,6 @@ CONFIG_NFS_V3=y
 CONFIG_NFS_V3_ACL=y
 CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
-CONFIG_SMB_FS=m
 CONFIG_CIFS=m
 CONFIG_CIFS_WEAK_PW_HASH=y
 CONFIG_PARTITION_ADVANCED=y
@@ -172,9 +165,7 @@ CONFIG_NLS_CODEPAGE_437=m
 CONFIG_NLS_ISO8859_1=m
 CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_KERNEL=y
-# CONFIG_DETECT_SOFTLOCKUP is not set
 # CONFIG_SCHED_DEBUG is not set
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
 # CONFIG_FTRACE is not set
 CONFIG_DEBUG_USER=y
@@ -182,7 +173,6 @@ CONFIG_DEBUG_LL=y
 CONFIG_CRYPTO_ECB=m
 CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_ARC4=m
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
 # CONFIG_CRYPTO_HW is not set
 CONFIG_CRC_T10DIF=y
diff --git a/arch/arm/configs/loki_defconfig b/arch/arm/configs/loki_defconfig
deleted file mode 100644 (file)
index 1ba752b..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-CONFIG_EXPERIMENTAL=y
-CONFIG_SYSVIPC=y
-CONFIG_LOG_BUF_SHIFT=14
-CONFIG_EXPERT=y
-CONFIG_SLAB=y
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_BLK_DEV_BSG is not set
-CONFIG_ARCH_LOKI=y
-CONFIG_MACH_LB88RC8480=y
-# CONFIG_CPU_FEROCEON_OLD_ID is not set
-CONFIG_NO_HZ=y
-CONFIG_HIGH_RES_TIMERS=y
-CONFIG_PREEMPT=y
-CONFIG_AEABI=y
-CONFIG_ZBOOT_ROM_TEXT=0x0
-CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_NET=y
-CONFIG_PACKET=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-CONFIG_IP_PNP_BOOTP=y
-# CONFIG_IPV6 is not set
-CONFIG_NET_PKTGEN=m
-CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-CONFIG_MTD=y
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_CHAR=y
-CONFIG_MTD_BLOCK=y
-CONFIG_FTL=y
-CONFIG_NFTL=y
-CONFIG_MTD_CFI=y
-CONFIG_MTD_JEDECPROBE=y
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_GEOMETRY=y
-CONFIG_MTD_CFI_I4=y
-CONFIG_MTD_CFI_INTELEXT=y
-CONFIG_MTD_CFI_AMDSTD=y
-CONFIG_MTD_CFI_STAA=y
-CONFIG_MTD_PHYSMAP=y
-CONFIG_MTD_M25P80=y
-CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_VERIFY_WRITE=y
-CONFIG_MTD_NAND_ORION=y
-CONFIG_BLK_DEV_LOOP=y
-# CONFIG_MISC_DEVICES is not set
-# CONFIG_SCSI_PROC_FS is not set
-CONFIG_BLK_DEV_SD=y
-CONFIG_BLK_DEV_SR=m
-CONFIG_CHR_DEV_SG=m
-CONFIG_ATA=y
-CONFIG_SATA_MV=y
-CONFIG_NETDEVICES=y
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=y
-CONFIG_MV643XX_ETH=y
-# CONFIG_NETDEV_10000 is not set
-# CONFIG_INPUT_KEYBOARD is not set
-# CONFIG_INPUT_MOUSE is not set
-# CONFIG_SERIO is not set
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_RUNTIME_UARTS=2
-CONFIG_LEGACY_PTY_COUNT=16
-CONFIG_I2C=y
-CONFIG_I2C_CHARDEV=y
-CONFIG_I2C_MV64XXX=y
-CONFIG_SPI=y
-# CONFIG_HWMON is not set
-# CONFIG_VGA_CONSOLE is not set
-CONFIG_USB=y
-CONFIG_USB_DEVICEFS=y
-CONFIG_USB_PRINTER=y
-CONFIG_USB_STORAGE=y
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_NEW_LEDS=y
-CONFIG_EXT2_FS=y
-CONFIG_EXT3_FS=y
-# CONFIG_EXT3_FS_XATTR is not set
-CONFIG_XFS_FS=y
-CONFIG_INOTIFY=y
-CONFIG_ISO9660_FS=y
-CONFIG_UDF_FS=m
-CONFIG_MSDOS_FS=y
-CONFIG_VFAT_FS=y
-CONFIG_TMPFS=y
-CONFIG_JFFS2_FS=y
-CONFIG_CRAMFS=y
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-CONFIG_ROOT_NFS=y
-CONFIG_PARTITION_ADVANCED=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-CONFIG_LDM_PARTITION=y
-CONFIG_LDM_DEBUG=y
-CONFIG_SUN_PARTITION=y
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_850=y
-CONFIG_NLS_ISO8859_1=y
-CONFIG_NLS_ISO8859_2=y
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_SYSCTL_SYSCALL_CHECK=y
-CONFIG_DEBUG_USER=y
-CONFIG_CRYPTO_CBC=m
-CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_PCBC=m
-CONFIG_CRC_CCITT=y
-CONFIG_CRC16=y
-CONFIG_LIBCRC32C=y
index 0ace16cba9b5cc3ad3464d15757a4bc89795eaca..88c5802a23514b06d0c2c6b4e07cdc35a502c32d 100644 (file)
@@ -106,6 +106,7 @@ CONFIG_GPIO_SYSFS=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_MXC=y
+CONFIG_USB_STORAGE=y
 CONFIG_MMC=y
 CONFIG_MMC_BLOCK=m
 CONFIG_MMC_SDHCI=m
@@ -145,7 +146,7 @@ CONFIG_ROOT_NFS=y
 CONFIG_NLS_DEFAULT="cp437"
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_UTF8=y
 CONFIG_MAGIC_SYSRQ=y
index 2bf224310fb4d96df2a6a72c2828ce6caee13d7c..5a6ff7c605df1d60e6b1a0ac1844b2ede89a2a01 100644 (file)
@@ -89,7 +89,7 @@ CONFIG_DISPLAY_SUPPORT=m
 # CONFIG_USB_SUPPORT is not set
 CONFIG_MMC=y
 CONFIG_MMC_MXS=y
-CONFIG_RTC_CLASS=m
+CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_DS1307=m
 CONFIG_DMADEVICES=y
 CONFIG_MXS_DMA=y
index ebb3ceaa8facf0f277dd2c088cdd22611a7b011c..58cdf5d84122adc867598123c608894a4b1e226e 100644 (file)
@@ -61,7 +61,6 @@ struct scoop_pcmcia_dev {
 struct scoop_pcmcia_config {
        struct scoop_pcmcia_dev *devs;
        int num_devs;
-       void (*pcmcia_init)(void);
        void (*power_ctrl)(struct device *scoop, unsigned short cpr, int nr);
 };
 
index 5004bf0a05f2dc0c9e1eea84708ae9bd7accf408..0f917928eeb7782510f7b590d8e627a8b319795a 100644 (file)
@@ -525,7 +525,7 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
        if (ARRAY_SIZE(lcdc_resources) > 2) {
                void __iomem *fb;
                struct resource *fb_res = &lcdc_resources[2];
-               size_t fb_len = fb_res->end - fb_res->start + 1;
+               size_t fb_len = resource_size(fb_res);
 
                fb = ioremap(fb_res->start, fb_len);
                if (fb) {
index 3eb0a1153cc8f2ee50c5f5e2f6afd1947173de78..6010ce16b3cf79674ab9ca6cd44b345e810df05d 100644 (file)
@@ -4,7 +4,7 @@
  *  Copyright (C) 2010 Bluewater System Ltd
  *
  * Author: Andre Renaud <andre@bluewatersys.com>
- * Author: Ryan Mallon  <ryan@bluewatersys.com>
+ * Author: Ryan Mallon
  *
  * 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
index d87ad30dda35a8c2ed5689e3c50590b2320e7b5a..9f2a948e0e72a61083cf3038a03f4aa2bae4520c 100644 (file)
@@ -835,7 +835,7 @@ int dma_init(void)
 
        /* Create /proc/dma/channels and /proc/dma/devices */
 
-       gDmaDir = create_proc_entry("dma", S_IFDIR | S_IRUGO | S_IXUGO, NULL);
+       gDmaDir = proc_mkdir("dma", NULL);
 
        if (gDmaDir == NULL) {
                printk(KERN_ERR "Unable to create /proc/dma\n");
index 4d381ec052784f6eec2a910365e4a016c24f3b9e..1dd231d2f772fc1354b83ed5cee8b1528584ae64 100644 (file)
@@ -8,4 +8,4 @@
  * published by the Free Software Foundation.
  */
 
-#define VMALLOC_END            0xd8000000
+#define VMALLOC_END            0xd8000000UL
index 6d03643b9bd1bc9c9cc0228ce718cf8d5665d24a..993a3146fd358f21c0704893cb9f6557464a91a0 100644 (file)
@@ -719,9 +719,15 @@ static void __init cdce_clk_init(void)
        }
 }
 
+#define DM6467T_EVM_REF_FREQ           33000000
+
 static void __init davinci_map_io(void)
 {
        dm646x_init();
+
+       if (machine_is_davinci_dm6467tevm())
+               davinci_set_refclk_rate(DM6467T_EVM_REF_FREQ);
+
        cdce_clk_init();
 }
 
@@ -785,17 +791,6 @@ static __init void evm_init(void)
        soc_info->emac_pdata->phy_id = DM646X_EVM_PHY_ID;
 }
 
-#define DM646X_EVM_REF_FREQ            27000000
-#define DM6467T_EVM_REF_FREQ           33000000
-
-void __init dm646x_board_setup_refclk(struct clk *clk)
-{
-       if (machine_is_davinci_dm6467tevm())
-               clk->rate = DM6467T_EVM_REF_FREQ;
-       else
-               clk->rate = DM646X_EVM_REF_FREQ;
-}
-
 MACHINE_START(DAVINCI_DM6467_EVM, "DaVinci DM646x EVM")
        .boot_params  = (0x80000100),
        .map_io       = davinci_map_io,
index e4e3af179f0270e0c60698b66ed27eb321023b82..ae653194b64551a4051f2e05e23f823e2cfdb970 100644 (file)
@@ -368,6 +368,12 @@ static unsigned long clk_leafclk_recalc(struct clk *clk)
        return clk->parent->rate;
 }
 
+int davinci_simple_set_rate(struct clk *clk, unsigned long rate)
+{
+       clk->rate = rate;
+       return 0;
+}
+
 static unsigned long clk_pllclk_recalc(struct clk *clk)
 {
        u32 ctrl, mult = 1, prediv = 1, postdiv = 1;
@@ -506,6 +512,38 @@ int davinci_set_pllrate(struct pll_data *pll, unsigned int prediv,
 }
 EXPORT_SYMBOL(davinci_set_pllrate);
 
+/**
+ * davinci_set_refclk_rate() - Set the reference clock rate
+ * @rate:      The new rate.
+ *
+ * Sets the reference clock rate to a given value. This will most likely
+ * result in the entire clock tree getting updated.
+ *
+ * This is used to support boards which use a reference clock different
+ * than that used by default in <soc>.c file. The reference clock rate
+ * should be updated early in the boot process; ideally soon after the
+ * clock tree has been initialized once with the default reference clock
+ * rate (davinci_common_init()).
+ *
+ * Returns 0 on success, error otherwise.
+ */
+int davinci_set_refclk_rate(unsigned long rate)
+{
+       struct clk *refclk;
+
+       refclk = clk_get(NULL, "ref");
+       if (IS_ERR(refclk)) {
+               pr_err("%s: failed to get reference clock.\n", __func__);
+               return PTR_ERR(refclk);
+       }
+
+       clk_set_rate(refclk, rate);
+
+       clk_put(refclk);
+
+       return 0;
+}
+
 int __init davinci_clk_init(struct clk_lookup *clocks)
   {
        struct clk_lookup *c;
index 0dd22031ec6222467a4a3a5ccb0eb27405e1d510..50b2482e0ba23e090e603f86ad64f0592007a886 100644 (file)
@@ -123,6 +123,8 @@ int davinci_clk_init(struct clk_lookup *clocks);
 int davinci_set_pllrate(struct pll_data *pll, unsigned int prediv,
                                unsigned int mult, unsigned int postdiv);
 int davinci_set_sysclk_rate(struct clk *clk, unsigned long rate);
+int davinci_set_refclk_rate(unsigned long rate);
+int davinci_simple_set_rate(struct clk *clk, unsigned long rate);
 
 extern struct platform_device davinci_wdt_device;
 extern void davinci_watchdog_reset(struct platform_device *);
index e00d61e2efbe8b018be697a69a719d0034e4bdba..1802e711a2b8f7218131613365f19e4361ff04e2 100644 (file)
@@ -43,6 +43,7 @@
 /*
  * Device specific clocks
  */
+#define DM646X_REF_FREQ                27000000
 #define DM646X_AUX_FREQ                24000000
 
 static struct pll_data pll1_data = {
@@ -57,6 +58,8 @@ static struct pll_data pll2_data = {
 
 static struct clk ref_clk = {
        .name = "ref_clk",
+       .rate = DM646X_REF_FREQ,
+       .set_rate = davinci_simple_set_rate,
 };
 
 static struct clk aux_clkin = {
@@ -902,7 +905,6 @@ int __init dm646x_init_edma(struct edma_rsv_info *rsv)
 
 void __init dm646x_init(void)
 {
-       dm646x_board_setup_refclk(&ref_clk);
        davinci_common_init(&davinci_soc_info_dm646x);
 }
 
index 7a27f3f139137258b517d589606041e275f5cf13..2a00fe5ac253dc7a3f810cbeb4d58553bb51ad21 100644 (file)
@@ -15,7 +15,6 @@
 #include <mach/asp.h>
 #include <linux/i2c.h>
 #include <linux/videodev2.h>
-#include <linux/clk.h>
 #include <linux/davinci_emac.h>
 
 #define DM646X_EMAC_BASE               (0x01C80000)
@@ -31,7 +30,6 @@
 void __init dm646x_init(void);
 void __init dm646x_init_mcasp0(struct snd_platform_data *pdata);
 void __init dm646x_init_mcasp1(struct snd_platform_data *pdata);
-void __init dm646x_board_setup_refclk(struct clk *clk);
 int __init dm646x_init_edma(struct edma_rsv_info *rsv);
 
 void dm646x_video_init(void);
index a47e6f29206e2551688d91d442a187015358885d..1110fdd77ba42fd88b15a7f288b3cab4e97bf3dd 100644 (file)
 #define        DAVINCI_PWR_SLEEP_CNTRL_BASE    0x01C41000
 
 /* Power and Sleep Controller (PSC) Domains */
-#define DAVINCI_GPSC_ARMDOMAIN      0
-#define DAVINCI_GPSC_DSPDOMAIN      1
+#define DAVINCI_GPSC_ARMDOMAIN         0
+#define DAVINCI_GPSC_DSPDOMAIN         1
 
-#define DAVINCI_LPSC_VPSSMSTR       0
-#define DAVINCI_LPSC_VPSSSLV        1
-#define DAVINCI_LPSC_TPCC           2
-#define DAVINCI_LPSC_TPTC0          3
-#define DAVINCI_LPSC_TPTC1          4
-#define DAVINCI_LPSC_EMAC           5
-#define DAVINCI_LPSC_EMAC_WRAPPER   6
-#define DAVINCI_LPSC_USB            9
-#define DAVINCI_LPSC_ATA            10
-#define DAVINCI_LPSC_VLYNQ          11
-#define DAVINCI_LPSC_UHPI           12
-#define DAVINCI_LPSC_DDR_EMIF       13
-#define DAVINCI_LPSC_AEMIF          14
-#define DAVINCI_LPSC_MMC_SD         15
-#define DAVINCI_LPSC_McBSP          17
-#define DAVINCI_LPSC_I2C            18
-#define DAVINCI_LPSC_UART0          19
-#define DAVINCI_LPSC_UART1          20
-#define DAVINCI_LPSC_UART2          21
-#define DAVINCI_LPSC_SPI            22
-#define DAVINCI_LPSC_PWM0           23
-#define DAVINCI_LPSC_PWM1           24
-#define DAVINCI_LPSC_PWM2           25
-#define DAVINCI_LPSC_GPIO           26
-#define DAVINCI_LPSC_TIMER0         27
-#define DAVINCI_LPSC_TIMER1         28
-#define DAVINCI_LPSC_TIMER2         29
-#define DAVINCI_LPSC_SYSTEM_SUBSYS  30
-#define DAVINCI_LPSC_ARM            31
-#define DAVINCI_LPSC_SCR2           32
-#define DAVINCI_LPSC_SCR3           33
-#define DAVINCI_LPSC_SCR4           34
-#define DAVINCI_LPSC_CROSSBAR       35
-#define DAVINCI_LPSC_CFG27          36
-#define DAVINCI_LPSC_CFG3           37
-#define DAVINCI_LPSC_CFG5           38
-#define DAVINCI_LPSC_GEM            39
-#define DAVINCI_LPSC_IMCOP          40
+#define DAVINCI_LPSC_VPSSMSTR          0
+#define DAVINCI_LPSC_VPSSSLV           1
+#define DAVINCI_LPSC_TPCC              2
+#define DAVINCI_LPSC_TPTC0             3
+#define DAVINCI_LPSC_TPTC1             4
+#define DAVINCI_LPSC_EMAC              5
+#define DAVINCI_LPSC_EMAC_WRAPPER      6
+#define DAVINCI_LPSC_USB               9
+#define DAVINCI_LPSC_ATA               10
+#define DAVINCI_LPSC_VLYNQ             11
+#define DAVINCI_LPSC_UHPI              12
+#define DAVINCI_LPSC_DDR_EMIF          13
+#define DAVINCI_LPSC_AEMIF             14
+#define DAVINCI_LPSC_MMC_SD            15
+#define DAVINCI_LPSC_McBSP             17
+#define DAVINCI_LPSC_I2C               18
+#define DAVINCI_LPSC_UART0             19
+#define DAVINCI_LPSC_UART1             20
+#define DAVINCI_LPSC_UART2             21
+#define DAVINCI_LPSC_SPI               22
+#define DAVINCI_LPSC_PWM0              23
+#define DAVINCI_LPSC_PWM1              24
+#define DAVINCI_LPSC_PWM2              25
+#define DAVINCI_LPSC_GPIO              26
+#define DAVINCI_LPSC_TIMER0            27
+#define DAVINCI_LPSC_TIMER1            28
+#define DAVINCI_LPSC_TIMER2            29
+#define DAVINCI_LPSC_SYSTEM_SUBSYS     30
+#define DAVINCI_LPSC_ARM               31
+#define DAVINCI_LPSC_SCR2              32
+#define DAVINCI_LPSC_SCR3              33
+#define DAVINCI_LPSC_SCR4              34
+#define DAVINCI_LPSC_CROSSBAR          35
+#define DAVINCI_LPSC_CFG27             36
+#define DAVINCI_LPSC_CFG3              37
+#define DAVINCI_LPSC_CFG5              38
+#define DAVINCI_LPSC_GEM               39
+#define DAVINCI_LPSC_IMCOP             40
 
 #define DM355_LPSC_TIMER3              5
 #define DM355_LPSC_SPI1                        6
 /*
  * LPSC Assignments
  */
-#define DM646X_LPSC_ARM            0
-#define DM646X_LPSC_C64X_CPU       1
-#define DM646X_LPSC_HDVICP0        2
-#define DM646X_LPSC_HDVICP1        3
-#define DM646X_LPSC_TPCC           4
-#define DM646X_LPSC_TPTC0          5
-#define DM646X_LPSC_TPTC1          6
-#define DM646X_LPSC_TPTC2          7
-#define DM646X_LPSC_TPTC3          8
-#define DM646X_LPSC_PCI            13
-#define DM646X_LPSC_EMAC           14
-#define DM646X_LPSC_VDCE           15
-#define DM646X_LPSC_VPSSMSTR       16
-#define DM646X_LPSC_VPSSSLV        17
-#define DM646X_LPSC_TSIF0          18
-#define DM646X_LPSC_TSIF1          19
-#define DM646X_LPSC_DDR_EMIF       20
-#define DM646X_LPSC_AEMIF          21
-#define DM646X_LPSC_McASP0         22
-#define DM646X_LPSC_McASP1         23
-#define DM646X_LPSC_CRGEN0         24
-#define DM646X_LPSC_CRGEN1         25
-#define DM646X_LPSC_UART0          26
-#define DM646X_LPSC_UART1          27
-#define DM646X_LPSC_UART2          28
-#define DM646X_LPSC_PWM0           29
-#define DM646X_LPSC_PWM1           30
-#define DM646X_LPSC_I2C            31
-#define DM646X_LPSC_SPI            32
-#define DM646X_LPSC_GPIO           33
-#define DM646X_LPSC_TIMER0         34
-#define DM646X_LPSC_TIMER1         35
-#define DM646X_LPSC_ARM_INTC       45
+#define DM646X_LPSC_ARM                0
+#define DM646X_LPSC_C64X_CPU   1
+#define DM646X_LPSC_HDVICP0    2
+#define DM646X_LPSC_HDVICP1    3
+#define DM646X_LPSC_TPCC       4
+#define DM646X_LPSC_TPTC0      5
+#define DM646X_LPSC_TPTC1      6
+#define DM646X_LPSC_TPTC2      7
+#define DM646X_LPSC_TPTC3      8
+#define DM646X_LPSC_PCI                13
+#define DM646X_LPSC_EMAC       14
+#define DM646X_LPSC_VDCE       15
+#define DM646X_LPSC_VPSSMSTR   16
+#define DM646X_LPSC_VPSSSLV    17
+#define DM646X_LPSC_TSIF0      18
+#define DM646X_LPSC_TSIF1      19
+#define DM646X_LPSC_DDR_EMIF   20
+#define DM646X_LPSC_AEMIF      21
+#define DM646X_LPSC_McASP0     22
+#define DM646X_LPSC_McASP1     23
+#define DM646X_LPSC_CRGEN0     24
+#define DM646X_LPSC_CRGEN1     25
+#define DM646X_LPSC_UART0      26
+#define DM646X_LPSC_UART1      27
+#define DM646X_LPSC_UART2      28
+#define DM646X_LPSC_PWM0       29
+#define DM646X_LPSC_PWM1       30
+#define DM646X_LPSC_I2C                31
+#define DM646X_LPSC_SPI                32
+#define DM646X_LPSC_GPIO       33
+#define DM646X_LPSC_TIMER0     34
+#define DM646X_LPSC_TIMER1     35
+#define DM646X_LPSC_ARM_INTC   45
 
 /* PSC0 defines */
 #define DA8XX_LPSC0_TPCC               0
 #define PSC_STATE_DISABLE      2
 #define PSC_STATE_ENABLE       3
 
-#define MDSTAT_STATE_MASK 0x1f
+#define MDSTAT_STATE_MASK      0x1f
 
 #ifndef __ASSEMBLER__
 
index 5ed51b84c1b24693dd8eacc170ebc17ffa21201a..83dce859886dac5bbadf0ecdf92e047ab8582a28 100644 (file)
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/pci.h>
-#include <linux/serial_8250.h>
 #include <linux/clk.h>
 #include <linux/mbus.h>
 #include <linux/ata_platform.h>
-#include <linux/serial_8250.h>
 #include <linux/gpio.h>
 #include <asm/page.h>
 #include <asm/setup.h>
index d96dc1c5da20a26c0f3b4017d2411d16ceacadd7..8392e95d7cea69ef8729570712ba88380f240b37 100644 (file)
@@ -2,7 +2,7 @@
  * arch/arm/mach-ep93xx/simone.c
  * Simplemachines Sim.One support.
  *
- * Copyright (C) 2010 Ryan Mallon <ryan@bluewatersys.com>
+ * Copyright (C) 2010 Ryan Mallon
  *
  * Based on the 2.6.24.7 support:
  *   Copyright (C) 2009 Simplemachines
@@ -65,7 +65,7 @@ static void __init simone_init_machine(void)
 }
 
 MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
-/* Maintainer: Ryan Mallon <ryan@bluewatersys.com> */
+/* Maintainer: Ryan Mallon */
        .boot_params    = EP93XX_SDCE0_PHYS_BASE + 0x100,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
index ac601fe2b448b4ec06d08817d193f5c57b1376bc..2e9c614757e40f08e44e3e6e90073bd45b7f64a9 100644 (file)
@@ -3,7 +3,7 @@
  * Bluewater Systems Snapper CL15 system module
  *
  * Copyright (C) 2009 Bluewater Systems Ltd
- * Author: Ryan Mallon <ryan@bluewatersys.com>
+ * Author: Ryan Mallon
  *
  * NAND code adapted from driver by:
  *   Andre Renaud <andre@bluewatersys.com>
@@ -162,7 +162,7 @@ static void __init snappercl15_init_machine(void)
 }
 
 MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15")
-       /* Maintainer: Ryan Mallon <ryan@bluewatersys.com> */
+       /* Maintainer: Ryan Mallon */
        .boot_params    = EP93XX_SDCE0_PHYS_BASE + 0x100,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
index 1435fc31c4b29e55e2209050f0f51eab21fbb390..ae433a052df6da9b15f051416235386df9a7f0e7 100644 (file)
@@ -110,6 +110,8 @@ config MACH_SMDKC210
        select S3C_DEV_HSMMC1
        select S3C_DEV_HSMMC2
        select S3C_DEV_HSMMC3
+       select SAMSUNG_DEV_PWM
+       select SAMSUNG_DEV_BACKLIGHT
        select EXYNOS4_DEV_PD
        select EXYNOS4_DEV_SYSMMU
        select EXYNOS4_SETUP_I2C1
@@ -127,8 +129,10 @@ config MACH_SMDKV310
        select S3C_DEV_HSMMC1
        select S3C_DEV_HSMMC2
        select S3C_DEV_HSMMC3
+       select SAMSUNG_DEV_BACKLIGHT
        select SAMSUNG_DEV_KEYPAD
        select EXYNOS4_DEV_PD
+       select SAMSUNG_DEV_PWM
        select EXYNOS4_DEV_SYSMMU
        select EXYNOS4_SETUP_I2C1
        select EXYNOS4_SETUP_KEYPAD
index 871f9d508fde93898e0f1867ddb068c64a89fe31..66494f28bbef958051c859fadb96b7c28cc1c2cd 100644 (file)
 
 static struct clk clk_sclk_hdmi27m = {
        .name           = "sclk_hdmi27m",
-       .id             = -1,
        .rate           = 27000000,
 };
 
 static struct clk clk_sclk_hdmiphy = {
        .name           = "sclk_hdmiphy",
-       .id             = -1,
 };
 
 static struct clk clk_sclk_usbphy0 = {
        .name           = "sclk_usbphy0",
-       .id             = -1,
        .rate           = 27000000,
 };
 
 static struct clk clk_sclk_usbphy1 = {
        .name           = "sclk_usbphy1",
-       .id             = -1,
 };
 
 static int exynos4_clksrc_mask_top_ctrl(struct clk *clk, int enable)
@@ -132,7 +128,6 @@ static int exynos4_clk_ip_perir_ctrl(struct clk *clk, int enable)
 static struct clksrc_clk clk_mout_apll = {
        .clk    = {
                .name           = "mout_apll",
-               .id             = -1,
        },
        .sources        = &clk_src_apll,
        .reg_src        = { .reg = S5P_CLKSRC_CPU, .shift = 0, .size = 1 },
@@ -141,7 +136,6 @@ static struct clksrc_clk clk_mout_apll = {
 static struct clksrc_clk clk_sclk_apll = {
        .clk    = {
                .name           = "sclk_apll",
-               .id             = -1,
                .parent         = &clk_mout_apll.clk,
        },
        .reg_div        = { .reg = S5P_CLKDIV_CPU, .shift = 24, .size = 3 },
@@ -150,7 +144,6 @@ static struct clksrc_clk clk_sclk_apll = {
 static struct clksrc_clk clk_mout_epll = {
        .clk    = {
                .name           = "mout_epll",
-               .id             = -1,
        },
        .sources        = &clk_src_epll,
        .reg_src        = { .reg = S5P_CLKSRC_TOP0, .shift = 4, .size = 1 },
@@ -159,7 +152,6 @@ static struct clksrc_clk clk_mout_epll = {
 static struct clksrc_clk clk_mout_mpll = {
        .clk = {
                .name           = "mout_mpll",
-               .id             = -1,
        },
        .sources        = &clk_src_mpll,
        .reg_src        = { .reg = S5P_CLKSRC_CPU, .shift = 8, .size = 1 },
@@ -178,7 +170,6 @@ static struct clksrc_sources clkset_moutcore = {
 static struct clksrc_clk clk_moutcore = {
        .clk    = {
                .name           = "moutcore",
-               .id             = -1,
        },
        .sources        = &clkset_moutcore,
        .reg_src        = { .reg = S5P_CLKSRC_CPU, .shift = 16, .size = 1 },
@@ -187,7 +178,6 @@ static struct clksrc_clk clk_moutcore = {
 static struct clksrc_clk clk_coreclk = {
        .clk    = {
                .name           = "core_clk",
-               .id             = -1,
                .parent         = &clk_moutcore.clk,
        },
        .reg_div        = { .reg = S5P_CLKDIV_CPU, .shift = 0, .size = 3 },
@@ -196,7 +186,6 @@ static struct clksrc_clk clk_coreclk = {
 static struct clksrc_clk clk_armclk = {
        .clk    = {
                .name           = "armclk",
-               .id             = -1,
                .parent         = &clk_coreclk.clk,
        },
 };
@@ -204,7 +193,6 @@ static struct clksrc_clk clk_armclk = {
 static struct clksrc_clk clk_aclk_corem0 = {
        .clk    = {
                .name           = "aclk_corem0",
-               .id             = -1,
                .parent         = &clk_coreclk.clk,
        },
        .reg_div        = { .reg = S5P_CLKDIV_CPU, .shift = 4, .size = 3 },
@@ -213,7 +201,6 @@ static struct clksrc_clk clk_aclk_corem0 = {
 static struct clksrc_clk clk_aclk_cores = {
        .clk    = {
                .name           = "aclk_cores",
-               .id             = -1,
                .parent         = &clk_coreclk.clk,
        },
        .reg_div        = { .reg = S5P_CLKDIV_CPU, .shift = 4, .size = 3 },
@@ -222,7 +209,6 @@ static struct clksrc_clk clk_aclk_cores = {
 static struct clksrc_clk clk_aclk_corem1 = {
        .clk    = {
                .name           = "aclk_corem1",
-               .id             = -1,
                .parent         = &clk_coreclk.clk,
        },
        .reg_div        = { .reg = S5P_CLKDIV_CPU, .shift = 8, .size = 3 },
@@ -231,7 +217,6 @@ static struct clksrc_clk clk_aclk_corem1 = {
 static struct clksrc_clk clk_periphclk = {
        .clk    = {
                .name           = "periphclk",
-               .id             = -1,
                .parent         = &clk_coreclk.clk,
        },
        .reg_div        = { .reg = S5P_CLKDIV_CPU, .shift = 12, .size = 3 },
@@ -252,7 +237,6 @@ static struct clksrc_sources clkset_mout_corebus = {
 static struct clksrc_clk clk_mout_corebus = {
        .clk    = {
                .name           = "mout_corebus",
-               .id             = -1,
        },
        .sources        = &clkset_mout_corebus,
        .reg_src        = { .reg = S5P_CLKSRC_DMC, .shift = 4, .size = 1 },
@@ -261,7 +245,6 @@ static struct clksrc_clk clk_mout_corebus = {
 static struct clksrc_clk clk_sclk_dmc = {
        .clk    = {
                .name           = "sclk_dmc",
-               .id             = -1,
                .parent         = &clk_mout_corebus.clk,
        },
        .reg_div        = { .reg = S5P_CLKDIV_DMC0, .shift = 12, .size = 3 },
@@ -270,7 +253,6 @@ static struct clksrc_clk clk_sclk_dmc = {
 static struct clksrc_clk clk_aclk_cored = {
        .clk    = {
                .name           = "aclk_cored",
-               .id             = -1,
                .parent         = &clk_sclk_dmc.clk,
        },
        .reg_div        = { .reg = S5P_CLKDIV_DMC0, .shift = 16, .size = 3 },
@@ -279,7 +261,6 @@ static struct clksrc_clk clk_aclk_cored = {
 static struct clksrc_clk clk_aclk_corep = {
        .clk    = {
                .name           = "aclk_corep",
-               .id             = -1,
                .parent         = &clk_aclk_cored.clk,
        },
        .reg_div        = { .reg = S5P_CLKDIV_DMC0, .shift = 20, .size = 3 },
@@ -288,7 +269,6 @@ static struct clksrc_clk clk_aclk_corep = {
 static struct clksrc_clk clk_aclk_acp = {
        .clk    = {
                .name           = "aclk_acp",
-               .id             = -1,
                .parent         = &clk_mout_corebus.clk,
        },
        .reg_div        = { .reg = S5P_CLKDIV_DMC0, .shift = 0, .size = 3 },
@@ -297,7 +277,6 @@ static struct clksrc_clk clk_aclk_acp = {
 static struct clksrc_clk clk_pclk_acp = {
        .clk    = {
                .name           = "pclk_acp",
-               .id             = -1,
                .parent         = &clk_aclk_acp.clk,
        },
        .reg_div        = { .reg = S5P_CLKDIV_DMC0, .shift = 4, .size = 3 },
@@ -318,7 +297,6 @@ static struct clksrc_sources clkset_aclk = {
 static struct clksrc_clk clk_aclk_200 = {
        .clk    = {
                .name           = "aclk_200",
-               .id             = -1,
        },
        .sources        = &clkset_aclk,
        .reg_src        = { .reg = S5P_CLKSRC_TOP0, .shift = 12, .size = 1 },
@@ -328,7 +306,6 @@ static struct clksrc_clk clk_aclk_200 = {
 static struct clksrc_clk clk_aclk_100 = {
        .clk    = {
                .name           = "aclk_100",
-               .id             = -1,
        },
        .sources        = &clkset_aclk,
        .reg_src        = { .reg = S5P_CLKSRC_TOP0, .shift = 16, .size = 1 },
@@ -338,7 +315,6 @@ static struct clksrc_clk clk_aclk_100 = {
 static struct clksrc_clk clk_aclk_160 = {
        .clk    = {
                .name           = "aclk_160",
-               .id             = -1,
        },
        .sources        = &clkset_aclk,
        .reg_src        = { .reg = S5P_CLKSRC_TOP0, .shift = 20, .size = 1 },
@@ -348,7 +324,6 @@ static struct clksrc_clk clk_aclk_160 = {
 static struct clksrc_clk clk_aclk_133 = {
        .clk    = {
                .name           = "aclk_133",
-               .id             = -1,
        },
        .sources        = &clkset_aclk,
        .reg_src        = { .reg = S5P_CLKSRC_TOP0, .shift = 24, .size = 1 },
@@ -368,7 +343,6 @@ static struct clksrc_sources clkset_vpllsrc = {
 static struct clksrc_clk clk_vpllsrc = {
        .clk    = {
                .name           = "vpll_src",
-               .id             = -1,
                .enable         = exynos4_clksrc_mask_top_ctrl,
                .ctrlbit        = (1 << 0),
        },
@@ -389,7 +363,6 @@ static struct clksrc_sources clkset_sclk_vpll = {
 static struct clksrc_clk clk_sclk_vpll = {
        .clk    = {
                .name           = "sclk_vpll",
-               .id             = -1,
        },
        .sources        = &clkset_sclk_vpll,
        .reg_src        = { .reg = S5P_CLKSRC_TOP0, .shift = 8, .size = 1 },
@@ -398,161 +371,151 @@ static struct clksrc_clk clk_sclk_vpll = {
 static struct clk init_clocks_off[] = {
        {
                .name           = "timers",
-               .id             = -1,
                .parent         = &clk_aclk_100.clk,
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1<<24),
        }, {
                .name           = "csis",
-               .id             = 0,
+               .devname        = "s5p-mipi-csis.0",
                .enable         = exynos4_clk_ip_cam_ctrl,
                .ctrlbit        = (1 << 4),
        }, {
                .name           = "csis",
-               .id             = 1,
+               .devname        = "s5p-mipi-csis.1",
                .enable         = exynos4_clk_ip_cam_ctrl,
                .ctrlbit        = (1 << 5),
        }, {
                .name           = "fimc",
-               .id             = 0,
+               .devname        = "exynos4-fimc.0",
                .enable         = exynos4_clk_ip_cam_ctrl,
                .ctrlbit        = (1 << 0),
        }, {
                .name           = "fimc",
-               .id             = 1,
+               .devname        = "exynos4-fimc.1",
                .enable         = exynos4_clk_ip_cam_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "fimc",
-               .id             = 2,
+               .devname        = "exynos4-fimc.2",
                .enable         = exynos4_clk_ip_cam_ctrl,
                .ctrlbit        = (1 << 2),
        }, {
                .name           = "fimc",
-               .id             = 3,
+               .devname        = "exynos4-fimc.3",
                .enable         = exynos4_clk_ip_cam_ctrl,
                .ctrlbit        = (1 << 3),
        }, {
                .name           = "fimd",
-               .id             = 0,
+               .devname        = "exynos4-fb.0",
                .enable         = exynos4_clk_ip_lcd0_ctrl,
                .ctrlbit        = (1 << 0),
        }, {
                .name           = "fimd",
-               .id             = 1,
+               .devname        = "exynos4-fb.1",
                .enable         = exynos4_clk_ip_lcd1_ctrl,
                .ctrlbit        = (1 << 0),
        }, {
                .name           = "sataphy",
-               .id             = -1,
                .parent         = &clk_aclk_133.clk,
                .enable         = exynos4_clk_ip_fsys_ctrl,
                .ctrlbit        = (1 << 3),
        }, {
                .name           = "hsmmc",
-               .id             = 0,
+               .devname        = "s3c-sdhci.0",
                .parent         = &clk_aclk_133.clk,
                .enable         = exynos4_clk_ip_fsys_ctrl,
                .ctrlbit        = (1 << 5),
        }, {
                .name           = "hsmmc",
-               .id             = 1,
+               .devname        = "s3c-sdhci.1",
                .parent         = &clk_aclk_133.clk,
                .enable         = exynos4_clk_ip_fsys_ctrl,
                .ctrlbit        = (1 << 6),
        }, {
                .name           = "hsmmc",
-               .id             = 2,
+               .devname        = "s3c-sdhci.2",
                .parent         = &clk_aclk_133.clk,
                .enable         = exynos4_clk_ip_fsys_ctrl,
                .ctrlbit        = (1 << 7),
        }, {
                .name           = "hsmmc",
-               .id             = 3,
+               .devname        = "s3c-sdhci.3",
                .parent         = &clk_aclk_133.clk,
                .enable         = exynos4_clk_ip_fsys_ctrl,
                .ctrlbit        = (1 << 8),
        }, {
-               .name           = "hsmmc",
-               .id             = 4,
+               .name           = "dwmmc",
                .parent         = &clk_aclk_133.clk,
                .enable         = exynos4_clk_ip_fsys_ctrl,
                .ctrlbit        = (1 << 9),
        }, {
                .name           = "sata",
-               .id             = -1,
                .parent         = &clk_aclk_133.clk,
                .enable         = exynos4_clk_ip_fsys_ctrl,
                .ctrlbit        = (1 << 10),
        }, {
                .name           = "pdma",
-               .id             = 0,
+               .devname        = "s3c-pl330.0",
                .enable         = exynos4_clk_ip_fsys_ctrl,
                .ctrlbit        = (1 << 0),
        }, {
                .name           = "pdma",
-               .id             = 1,
+               .devname        = "s3c-pl330.1",
                .enable         = exynos4_clk_ip_fsys_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "adc",
-               .id             = -1,
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 15),
        }, {
                .name           = "keypad",
-               .id             = -1,
                .enable         = exynos4_clk_ip_perir_ctrl,
                .ctrlbit        = (1 << 16),
        }, {
                .name           = "rtc",
-               .id             = -1,
                .enable         = exynos4_clk_ip_perir_ctrl,
                .ctrlbit        = (1 << 15),
        }, {
                .name           = "watchdog",
-               .id             = -1,
                .parent         = &clk_aclk_100.clk,
                .enable         = exynos4_clk_ip_perir_ctrl,
                .ctrlbit        = (1 << 14),
        }, {
                .name           = "usbhost",
-               .id             = -1,
                .enable         = exynos4_clk_ip_fsys_ctrl ,
                .ctrlbit        = (1 << 12),
        }, {
                .name           = "otg",
-               .id             = -1,
                .enable         = exynos4_clk_ip_fsys_ctrl,
                .ctrlbit        = (1 << 13),
        }, {
                .name           = "spi",
-               .id             = 0,
+               .devname        = "s3c64xx-spi.0",
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 16),
        }, {
                .name           = "spi",
-               .id             = 1,
+               .devname        = "s3c64xx-spi.1",
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 17),
        }, {
                .name           = "spi",
-               .id             = 2,
+               .devname        = "s3c64xx-spi.2",
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 18),
        }, {
                .name           = "iis",
-               .id             = 0,
+               .devname        = "samsung-i2s.0",
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 19),
        }, {
                .name           = "iis",
-               .id             = 1,
+               .devname        = "samsung-i2s.1",
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 20),
        }, {
                .name           = "iis",
-               .id             = 2,
+               .devname        = "samsung-i2s.2",
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 21),
        }, {
@@ -562,125 +525,110 @@ static struct clk init_clocks_off[] = {
                .ctrlbit        = (1 << 27),
        }, {
                .name           = "fimg2d",
-               .id             = -1,
                .enable         = exynos4_clk_ip_image_ctrl,
                .ctrlbit        = (1 << 0),
        }, {
                .name           = "i2c",
-               .id             = 0,
+               .devname        = "s3c2440-i2c.0",
                .parent         = &clk_aclk_100.clk,
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 6),
        }, {
                .name           = "i2c",
-               .id             = 1,
+               .devname        = "s3c2440-i2c.1",
                .parent         = &clk_aclk_100.clk,
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 7),
        }, {
                .name           = "i2c",
-               .id             = 2,
+               .devname        = "s3c2440-i2c.2",
                .parent         = &clk_aclk_100.clk,
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 8),
        }, {
                .name           = "i2c",
-               .id             = 3,
+               .devname        = "s3c2440-i2c.3",
                .parent         = &clk_aclk_100.clk,
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 9),
        }, {
                .name           = "i2c",
-               .id             = 4,
+               .devname        = "s3c2440-i2c.4",
                .parent         = &clk_aclk_100.clk,
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 10),
        }, {
                .name           = "i2c",
-               .id             = 5,
+               .devname        = "s3c2440-i2c.5",
                .parent         = &clk_aclk_100.clk,
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 11),
        }, {
                .name           = "i2c",
-               .id             = 6,
+               .devname        = "s3c2440-i2c.6",
                .parent         = &clk_aclk_100.clk,
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 12),
        }, {
                .name           = "i2c",
-               .id             = 7,
+               .devname        = "s3c2440-i2c.7",
                .parent         = &clk_aclk_100.clk,
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 13),
        }, {
                .name           = "SYSMMU_MDMA",
-               .id             = -1,
                .enable         = exynos4_clk_ip_image_ctrl,
                .ctrlbit        = (1 << 5),
        }, {
                .name           = "SYSMMU_FIMC0",
-               .id             = -1,
                .enable         = exynos4_clk_ip_cam_ctrl,
                .ctrlbit        = (1 << 7),
        }, {
                .name           = "SYSMMU_FIMC1",
-               .id             = -1,
                .enable         = exynos4_clk_ip_cam_ctrl,
                .ctrlbit        = (1 << 8),
        }, {
                .name           = "SYSMMU_FIMC2",
-               .id             = -1,
                .enable         = exynos4_clk_ip_cam_ctrl,
                .ctrlbit        = (1 << 9),
        }, {
                .name           = "SYSMMU_FIMC3",
-               .id             = -1,
                .enable         = exynos4_clk_ip_cam_ctrl,
                .ctrlbit        = (1 << 10),
        }, {
                .name           = "SYSMMU_JPEG",
-               .id             = -1,
                .enable         = exynos4_clk_ip_cam_ctrl,
                .ctrlbit        = (1 << 11),
        }, {
                .name           = "SYSMMU_FIMD0",
-               .id             = -1,
                .enable         = exynos4_clk_ip_lcd0_ctrl,
                .ctrlbit        = (1 << 4),
        }, {
                .name           = "SYSMMU_FIMD1",
-               .id             = -1,
                .enable         = exynos4_clk_ip_lcd1_ctrl,
                .ctrlbit        = (1 << 4),
        }, {
                .name           = "SYSMMU_PCIe",
-               .id             = -1,
                .enable         = exynos4_clk_ip_fsys_ctrl,
                .ctrlbit        = (1 << 18),
        }, {
                .name           = "SYSMMU_G2D",
-               .id             = -1,
                .enable         = exynos4_clk_ip_image_ctrl,
                .ctrlbit        = (1 << 3),
        }, {
                .name           = "SYSMMU_ROTATOR",
-               .id             = -1,
                .enable         = exynos4_clk_ip_image_ctrl,
                .ctrlbit        = (1 << 4),
        }, {
                .name           = "SYSMMU_TV",
-               .id             = -1,
                .enable         = exynos4_clk_ip_tv_ctrl,
                .ctrlbit        = (1 << 4),
        }, {
                .name           = "SYSMMU_MFC_L",
-               .id             = -1,
                .enable         = exynos4_clk_ip_mfc_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "SYSMMU_MFC_R",
-               .id             = -1,
                .enable         = exynos4_clk_ip_mfc_ctrl,
                .ctrlbit        = (1 << 2),
        }
@@ -689,32 +637,32 @@ static struct clk init_clocks_off[] = {
 static struct clk init_clocks[] = {
        {
                .name           = "uart",
-               .id             = 0,
+               .devname        = "s5pv210-uart.0",
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 0),
        }, {
                .name           = "uart",
-               .id             = 1,
+               .devname        = "s5pv210-uart.1",
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "uart",
-               .id             = 2,
+               .devname        = "s5pv210-uart.2",
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 2),
        }, {
                .name           = "uart",
-               .id             = 3,
+               .devname        = "s5pv210-uart.3",
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 3),
        }, {
                .name           = "uart",
-               .id             = 4,
+               .devname        = "s5pv210-uart.4",
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 4),
        }, {
                .name           = "uart",
-               .id             = 5,
+               .devname        = "s5pv210-uart.5",
                .enable         = exynos4_clk_ip_peril_ctrl,
                .ctrlbit        = (1 << 5),
        }
@@ -750,7 +698,6 @@ static struct clksrc_sources clkset_mout_g2d0 = {
 static struct clksrc_clk clk_mout_g2d0 = {
        .clk    = {
                .name           = "mout_g2d0",
-               .id             = -1,
        },
        .sources        = &clkset_mout_g2d0,
        .reg_src        = { .reg = S5P_CLKSRC_IMAGE, .shift = 0, .size = 1 },
@@ -769,7 +716,6 @@ static struct clksrc_sources clkset_mout_g2d1 = {
 static struct clksrc_clk clk_mout_g2d1 = {
        .clk    = {
                .name           = "mout_g2d1",
-               .id             = -1,
        },
        .sources        = &clkset_mout_g2d1,
        .reg_src        = { .reg = S5P_CLKSRC_IMAGE, .shift = 4, .size = 1 },
@@ -788,7 +734,6 @@ static struct clksrc_sources clkset_mout_g2d = {
 static struct clksrc_clk clk_dout_mmc0 = {
        .clk            = {
                .name           = "dout_mmc0",
-               .id             = -1,
        },
        .sources = &clkset_group,
        .reg_src = { .reg = S5P_CLKSRC_FSYS, .shift = 0, .size = 4 },
@@ -798,7 +743,6 @@ static struct clksrc_clk clk_dout_mmc0 = {
 static struct clksrc_clk clk_dout_mmc1 = {
        .clk            = {
                .name           = "dout_mmc1",
-               .id             = -1,
        },
        .sources = &clkset_group,
        .reg_src = { .reg = S5P_CLKSRC_FSYS, .shift = 4, .size = 4 },
@@ -808,7 +752,6 @@ static struct clksrc_clk clk_dout_mmc1 = {
 static struct clksrc_clk clk_dout_mmc2 = {
        .clk            = {
                .name           = "dout_mmc2",
-               .id             = -1,
        },
        .sources = &clkset_group,
        .reg_src = { .reg = S5P_CLKSRC_FSYS, .shift = 8, .size = 4 },
@@ -818,7 +761,6 @@ static struct clksrc_clk clk_dout_mmc2 = {
 static struct clksrc_clk clk_dout_mmc3 = {
        .clk            = {
                .name           = "dout_mmc3",
-               .id             = -1,
        },
        .sources = &clkset_group,
        .reg_src = { .reg = S5P_CLKSRC_FSYS, .shift = 12, .size = 4 },
@@ -828,7 +770,6 @@ static struct clksrc_clk clk_dout_mmc3 = {
 static struct clksrc_clk clk_dout_mmc4 = {
        .clk            = {
                .name           = "dout_mmc4",
-               .id             = -1,
        },
        .sources = &clkset_group,
        .reg_src = { .reg = S5P_CLKSRC_FSYS, .shift = 16, .size = 4 },
@@ -839,7 +780,7 @@ static struct clksrc_clk clksrcs[] = {
        {
                .clk    = {
                        .name           = "uclk1",
-                       .id             = 0,
+                       .devname        = "s5pv210-uart.0",
                        .enable         = exynos4_clksrc_mask_peril0_ctrl,
                        .ctrlbit        = (1 << 0),
                },
@@ -849,7 +790,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "uclk1",
-                       .id             = 1,
+                       .devname        = "s5pv210-uart.1",
                        .enable         = exynos4_clksrc_mask_peril0_ctrl,
                        .ctrlbit        = (1 << 4),
                },
@@ -859,7 +800,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "uclk1",
-                       .id             = 2,
+                       .devname        = "s5pv210-uart.2",
                        .enable         = exynos4_clksrc_mask_peril0_ctrl,
                        .ctrlbit        = (1 << 8),
                },
@@ -869,7 +810,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "uclk1",
-                       .id             = 3,
+                       .devname        = "s5pv210-uart.3",
                        .enable         = exynos4_clksrc_mask_peril0_ctrl,
                        .ctrlbit        = (1 << 12),
                },
@@ -879,7 +820,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_pwm",
-                       .id             = -1,
                        .enable         = exynos4_clksrc_mask_peril0_ctrl,
                        .ctrlbit        = (1 << 24),
                },
@@ -889,7 +829,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_csis",
-                       .id             = 0,
+                       .devname        = "s5p-mipi-csis.0",
                        .enable         = exynos4_clksrc_mask_cam_ctrl,
                        .ctrlbit        = (1 << 24),
                },
@@ -899,7 +839,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_csis",
-                       .id             = 1,
+                       .devname        = "s5p-mipi-csis.1",
                        .enable         = exynos4_clksrc_mask_cam_ctrl,
                        .ctrlbit        = (1 << 28),
                },
@@ -909,7 +849,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_cam",
-                       .id             = 0,
+                       .devname        = "exynos4-fimc.0",
                        .enable         = exynos4_clksrc_mask_cam_ctrl,
                        .ctrlbit        = (1 << 16),
                },
@@ -919,7 +859,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_cam",
-                       .id             = 1,
+                       .devname        = "exynos4-fimc.1",
                        .enable         = exynos4_clksrc_mask_cam_ctrl,
                        .ctrlbit        = (1 << 20),
                },
@@ -929,7 +869,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_fimc",
-                       .id             = 0,
+                       .devname        = "exynos4-fimc.0",
                        .enable         = exynos4_clksrc_mask_cam_ctrl,
                        .ctrlbit        = (1 << 0),
                },
@@ -939,7 +879,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_fimc",
-                       .id             = 1,
+                       .devname        = "exynos4-fimc.1",
                        .enable         = exynos4_clksrc_mask_cam_ctrl,
                        .ctrlbit        = (1 << 4),
                },
@@ -949,7 +889,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_fimc",
-                       .id             = 2,
+                       .devname        = "exynos4-fimc.2",
                        .enable         = exynos4_clksrc_mask_cam_ctrl,
                        .ctrlbit        = (1 << 8),
                },
@@ -959,7 +899,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_fimc",
-                       .id             = 3,
+                       .devname        = "exynos4-fimc.3",
                        .enable         = exynos4_clksrc_mask_cam_ctrl,
                        .ctrlbit        = (1 << 12),
                },
@@ -969,7 +909,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_fimd",
-                       .id             = 0,
+                       .devname        = "exynos4-fb.0",
                        .enable         = exynos4_clksrc_mask_lcd0_ctrl,
                        .ctrlbit        = (1 << 0),
                },
@@ -979,7 +919,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_fimd",
-                       .id             = 1,
+                       .devname        = "exynos4-fb.1",
                        .enable         = exynos4_clksrc_mask_lcd1_ctrl,
                        .ctrlbit        = (1 << 0),
                },
@@ -989,7 +929,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_sata",
-                       .id             = -1,
                        .enable         = exynos4_clksrc_mask_fsys_ctrl,
                        .ctrlbit        = (1 << 24),
                },
@@ -999,7 +938,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_spi",
-                       .id             = 0,
+                       .devname        = "s3c64xx-spi.0",
                        .enable         = exynos4_clksrc_mask_peril1_ctrl,
                        .ctrlbit        = (1 << 16),
                },
@@ -1009,7 +948,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_spi",
-                       .id             = 1,
+                       .devname        = "s3c64xx-spi.1",
                        .enable         = exynos4_clksrc_mask_peril1_ctrl,
                        .ctrlbit        = (1 << 20),
                },
@@ -1019,7 +958,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_spi",
-                       .id             = 2,
+                       .devname        = "s3c64xx-spi.2",
                        .enable         = exynos4_clksrc_mask_peril1_ctrl,
                        .ctrlbit        = (1 << 24),
                },
@@ -1029,7 +968,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_fimg2d",
-                       .id             = -1,
                },
                .sources = &clkset_mout_g2d,
                .reg_src = { .reg = S5P_CLKSRC_IMAGE, .shift = 8, .size = 1 },
@@ -1037,7 +975,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_mmc",
-                       .id             = 0,
+                       .devname        = "s3c-sdhci.0",
                        .parent         = &clk_dout_mmc0.clk,
                        .enable         = exynos4_clksrc_mask_fsys_ctrl,
                        .ctrlbit        = (1 << 0),
@@ -1046,7 +984,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_mmc",
-                       .id             = 1,
+                       .devname        = "s3c-sdhci.1",
                        .parent         = &clk_dout_mmc1.clk,
                        .enable         = exynos4_clksrc_mask_fsys_ctrl,
                        .ctrlbit        = (1 << 4),
@@ -1055,7 +993,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_mmc",
-                       .id             = 2,
+                       .devname        = "s3c-sdhci.2",
                        .parent         = &clk_dout_mmc2.clk,
                        .enable         = exynos4_clksrc_mask_fsys_ctrl,
                        .ctrlbit        = (1 << 8),
@@ -1064,7 +1002,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_mmc",
-                       .id             = 3,
+                       .devname        = "s3c-sdhci.3",
                        .parent         = &clk_dout_mmc3.clk,
                        .enable         = exynos4_clksrc_mask_fsys_ctrl,
                        .ctrlbit        = (1 << 12),
@@ -1072,8 +1010,7 @@ static struct clksrc_clk clksrcs[] = {
                .reg_div = { .reg = S5P_CLKDIV_FSYS2, .shift = 24, .size = 8 },
        }, {
                .clk            = {
-                       .name           = "sclk_mmc",
-                       .id             = 4,
+                       .name           = "sclk_dwmmc",
                        .parent         = &clk_dout_mmc4.clk,
                        .enable         = exynos4_clksrc_mask_fsys_ctrl,
                        .ctrlbit        = (1 << 16),
diff --git a/arch/arm/mach-exynos4/include/mach/clkdev.h b/arch/arm/mach-exynos4/include/mach/clkdev.h
new file mode 100644 (file)
index 0000000..7dffa83
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef __MACH_CLKDEV_H__
+#define __MACH_CLKDEV_H__
+
+#define __clk_get(clk) ({ 1; })
+#define __clk_put(clk) do {} while (0)
+
+#endif
index e645f7a955f0dd504788547fc9753fabbe0178ae..f606ea75bf439a8b58e6aadbc34ae7cbb6df6403 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/smsc911x.h>
 #include <linux/io.h>
 #include <linux/i2c.h>
+#include <linux/pwm_backlight.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
@@ -27,6 +28,8 @@
 #include <plat/sdhci.h>
 #include <plat/iic.h>
 #include <plat/pd.h>
+#include <plat/gpio-cfg.h>
+#include <plat/backlight.h>
 
 #include <mach/map.h>
 
@@ -191,6 +194,17 @@ static void __init smdkc210_smsc911x_init(void)
                     (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1);
 }
 
+/* LCD Backlight data */
+static struct samsung_bl_gpio_info smdkc210_bl_gpio_info = {
+       .no = EXYNOS4_GPD0(1),
+       .func = S3C_GPIO_SFN(2),
+};
+
+static struct platform_pwm_backlight_data smdkc210_bl_data = {
+       .pwm_id = 1,
+       .pwm_period_ns  = 1000,
+};
+
 static void __init smdkc210_map_io(void)
 {
        s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -210,6 +224,8 @@ static void __init smdkc210_machine_init(void)
        s3c_sdhci2_set_platdata(&smdkc210_hsmmc2_pdata);
        s3c_sdhci3_set_platdata(&smdkc210_hsmmc3_pdata);
 
+       samsung_bl_set(&smdkc210_bl_gpio_info, &smdkc210_bl_data);
+
        platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices));
 }
 
index edd814110da86efcf451e1c1c0585651a447011b..df1107828abda612015fb0365736e7145d9d69c4 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/io.h>
 #include <linux/i2c.h>
 #include <linux/input.h>
+#include <linux/pwm_backlight.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
@@ -29,6 +30,8 @@
 #include <plat/sdhci.h>
 #include <plat/iic.h>
 #include <plat/pd.h>
+#include <plat/gpio-cfg.h>
+#include <plat/backlight.h>
 
 #include <mach/map.h>
 
@@ -209,6 +212,17 @@ static void __init smdkv310_smsc911x_init(void)
                     (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1);
 }
 
+/* LCD Backlight data */
+static struct samsung_bl_gpio_info smdkv310_bl_gpio_info = {
+       .no = EXYNOS4_GPD0(1),
+       .func = S3C_GPIO_SFN(2),
+};
+
+static struct platform_pwm_backlight_data smdkv310_bl_data = {
+       .pwm_id = 1,
+       .pwm_period_ns  = 1000,
+};
+
 static void __init smdkv310_map_io(void)
 {
        s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -230,6 +244,8 @@ static void __init smdkv310_machine_init(void)
 
        samsung_keypad_set_platdata(&smdkv310_keypad_data);
 
+       samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data);
+
        platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices));
 }
 
index 59c97a3311368cb9b2dddd8171fe7efdb73c79a8..e8dd22fa7d61ecd86e263565c70e5817c5e33356 100644 (file)
@@ -167,6 +167,7 @@ config MACH_EUKREA_MBIMXSD25_BASEBOARD
        bool "Eukrea MBIMXSD development board"
        select IMX_HAVE_PLATFORM_GPIO_KEYS
        select IMX_HAVE_PLATFORM_IMX_SSI
+       select LEDS_GPIO_REGISTER
        help
          This adds board specific devices that can be found on Eukrea's
          MBIMXSD evaluation board.
@@ -265,6 +266,7 @@ config MACH_EUKREA_MBIMX27_BASEBOARD
        select IMX_HAVE_PLATFORM_IMX_UART
        select IMX_HAVE_PLATFORM_MXC_MMC
        select IMX_HAVE_PLATFORM_SPI_IMX
+       select LEDS_GPIO_REGISTER
        help
          This adds board specific devices that can be found on Eukrea's
          MBIMX27 evaluation board.
@@ -403,6 +405,7 @@ config MACH_MX31LITE
        select IMX_HAVE_PLATFORM_MXC_NAND
        select IMX_HAVE_PLATFORM_MXC_RTC
        select IMX_HAVE_PLATFORM_SPI_IMX
+       select LEDS_GPIO_REGISTER
        help
          Include support for MX31 LITEKIT platform. This includes specific
          configurations for the board and its peripherals.
@@ -471,6 +474,7 @@ config MACH_MX31MOBOARD
        select IMX_HAVE_PLATFORM_MXC_EHCI
        select IMX_HAVE_PLATFORM_MXC_MMC
        select IMX_HAVE_PLATFORM_SPI_IMX
+       select LEDS_GPIO_REGISTER
        select MXC_ULPI if USB_ULPI
        help
          Include support for mx31moboard platform. This includes specific
@@ -577,6 +581,7 @@ config MACH_EUKREA_MBIMXSD35_BASEBOARD
        select IMX_HAVE_PLATFORM_GPIO_KEYS
        select IMX_HAVE_PLATFORM_IMX_SSI
        select IMX_HAVE_PLATFORM_IPU_CORE
+       select LEDS_GPIO_REGISTER
        help
          This adds board specific devices that can be found on Eukrea's
          MBIMXSD evaluation board.
index f8aa5be0eb150617599884145825995cd103bc3d..42afc29a7da84e632e38e4f6085560fc5364f5dc 100644 (file)
@@ -476,7 +476,6 @@ void imx_dma_enable(int channel)
        imx_dmav1_writel(imx_dmav1_readl(DMA_CCR(channel)) | CCR_CEN |
                CCR_ACRPT, DMA_CCR(channel));
 
-#ifdef CONFIG_ARCH_MX2
        if ((cpu_is_mx21() || cpu_is_mx27()) &&
                        imxdma->sg && imx_dma_hw_chain(imxdma)) {
                imxdma->sg = sg_next(imxdma->sg);
@@ -488,7 +487,6 @@ void imx_dma_enable(int channel)
                                DMA_CCR(channel));
                }
        }
-#endif
        imxdma->in_use = 1;
 
        local_irq_restore(flags);
@@ -519,7 +517,6 @@ void imx_dma_disable(int channel)
 }
 EXPORT_SYMBOL(imx_dma_disable);
 
-#ifdef CONFIG_ARCH_MX2
 static void imx_dma_watchdog(unsigned long chno)
 {
        struct imx_dma_channel *imxdma = &imx_dma_channels[chno];
@@ -531,7 +528,6 @@ static void imx_dma_watchdog(unsigned long chno)
        if (imxdma->err_handler)
                imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT);
 }
-#endif
 
 static irqreturn_t dma_err_handler(int irq, void *dev_id)
 {
@@ -655,10 +651,8 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
 {
        int i, disr;
 
-#ifdef CONFIG_ARCH_MX2
        if (cpu_is_mx21() || cpu_is_mx27())
                dma_err_handler(irq, dev_id);
-#endif
 
        disr = imx_dmav1_readl(DMA_DISR);
 
@@ -704,7 +698,6 @@ int imx_dma_request(int channel, const char *name)
        imxdma->name = name;
        local_irq_restore(flags); /* request_irq() can block */
 
-#ifdef CONFIG_ARCH_MX2
        if (cpu_is_mx21() || cpu_is_mx27()) {
                ret = request_irq(MX2x_INT_DMACH0 + channel,
                                dma_irq_handler, 0, "DMA", NULL);
@@ -718,7 +711,6 @@ int imx_dma_request(int channel, const char *name)
                imxdma->watchdog.function = &imx_dma_watchdog;
                imxdma->watchdog.data = channel;
        }
-#endif
 
        return ret;
 }
@@ -745,10 +737,8 @@ void imx_dma_free(int channel)
        imx_dma_disable(channel);
        imxdma->name = NULL;
 
-#ifdef CONFIG_ARCH_MX2
        if (cpu_is_mx21() || cpu_is_mx27())
                free_irq(MX2x_INT_DMACH0 + channel, NULL);
-#endif
 
        local_irq_restore(flags);
 }
@@ -804,21 +794,13 @@ static int __init imx_dma_init(void)
        int ret = 0;
        int i;
 
-#ifdef CONFIG_ARCH_MX1
        if (cpu_is_mx1())
                imx_dmav1_baseaddr = MX1_IO_ADDRESS(MX1_DMA_BASE_ADDR);
-       else
-#endif
-#ifdef CONFIG_MACH_MX21
-       if (cpu_is_mx21())
+       else if (cpu_is_mx21())
                imx_dmav1_baseaddr = MX21_IO_ADDRESS(MX21_DMA_BASE_ADDR);
-       else
-#endif
-#ifdef CONFIG_MACH_MX27
-       if (cpu_is_mx27())
+       else if (cpu_is_mx27())
                imx_dmav1_baseaddr = MX27_IO_ADDRESS(MX27_DMA_BASE_ADDR);
        else
-#endif
                return 0;
 
        dma_clk = clk_get(NULL, "dma");
@@ -829,7 +811,6 @@ static int __init imx_dma_init(void)
        /* reset DMA module */
        imx_dmav1_writel(DCR_DRST, DMA_DCR);
 
-#ifdef CONFIG_ARCH_MX1
        if (cpu_is_mx1()) {
                ret = request_irq(MX1_DMA_INT, dma_irq_handler, 0, "DMA", NULL);
                if (ret) {
@@ -844,7 +825,7 @@ static int __init imx_dma_init(void)
                        return ret;
                }
        }
-#endif
+
        /* enable DMA module */
        imx_dmav1_writel(DCR_DEN, DMA_DCR);
 
index 5911281da5f59cef0aed95f3e82e3da30750bdeb..5db3e1463af7714bff06e8b17f526804148e89b0 100644 (file)
@@ -112,7 +112,7 @@ eukrea_mbimx27_keymap_data __initconst = {
        .keymap_size    = ARRAY_SIZE(eukrea_mbimx27_keymap),
 };
 
-static struct gpio_led gpio_leds[] = {
+static const struct gpio_led eukrea_mbimx27_gpio_leds[] __initconst = {
        {
                .name                   = "led1",
                .default_trigger        = "heartbeat",
@@ -127,17 +127,10 @@ static struct gpio_led gpio_leds[] = {
        },
 };
 
-static struct gpio_led_platform_data gpio_led_info = {
-       .leds           = gpio_leds,
-       .num_leds       = ARRAY_SIZE(gpio_leds),
-};
-
-static struct platform_device leds_gpio = {
-       .name   = "leds-gpio",
-       .id     = -1,
-       .dev    = {
-               .platform_data  = &gpio_led_info,
-       },
+static const struct gpio_led_platform_data
+               eukrea_mbimx27_gpio_led_info __initconst = {
+       .leds           = eukrea_mbimx27_gpio_leds,
+       .num_leds       = ARRAY_SIZE(eukrea_mbimx27_gpio_leds),
 };
 
 static struct imx_fb_videomode eukrea_mbimx27_modes[] = {
@@ -293,10 +286,6 @@ static struct i2c_board_info eukrea_mbimx27_i2c_devices[] = {
        },
 };
 
-static struct platform_device *platform_devices[] __initdata = {
-       &leds_gpio,
-};
-
 static const struct imxmmc_platform_data sdhc_pdata __initconst = {
        .dat3_card_detect = 1,
 };
@@ -377,5 +366,5 @@ void __init eukrea_mbimx27_baseboard_init(void)
 
        imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data);
 
-       platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
+       gpio_led_register_device(-1, &eukrea_mbimx27_gpio_led_info);
 }
index f9ef04acdab1f6a37e767657d73ab5201644e40a..01ebcb31e4820fa976cd54e2263c597688c55c87 100644 (file)
@@ -173,7 +173,7 @@ static struct platform_device eukrea_mbimxsd_lcd_powerdev = {
        .dev.platform_data      = &eukrea_mbimxsd_lcd_power_data,
 };
 
-static struct gpio_led eukrea_mbimxsd_leds[] = {
+static const struct gpio_led eukrea_mbimxsd_leds[] __initconst = {
        {
                .name                   = "led1",
                .default_trigger        = "heartbeat",
@@ -182,19 +182,12 @@ static struct gpio_led eukrea_mbimxsd_leds[] = {
        },
 };
 
-static struct gpio_led_platform_data eukrea_mbimxsd_led_info = {
+static const struct gpio_led_platform_data
+               eukrea_mbimxsd_led_info __initconst = {
        .leds           = eukrea_mbimxsd_leds,
        .num_leds       = ARRAY_SIZE(eukrea_mbimxsd_leds),
 };
 
-static struct platform_device eukrea_mbimxsd_leds_gpio = {
-       .name   = "leds-gpio",
-       .id     = -1,
-       .dev    = {
-               .platform_data  = &eukrea_mbimxsd_led_info,
-       },
-};
-
 static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = {
        {
                .gpio           = GPIO_SWITCH1,
@@ -212,7 +205,6 @@ static const struct gpio_keys_platform_data
 };
 
 static struct platform_device *platform_devices[] __initdata = {
-       &eukrea_mbimxsd_leds_gpio,
        &eukrea_mbimxsd_lcd_powerdev,
 };
 
@@ -287,5 +279,6 @@ void __init eukrea_mbimxsd25_baseboard_init(void)
                                ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));
 
        platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
+       gpio_led_register_device(-1, &eukrea_mbimxsd_led_info);
        imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
 }
index 4909ea05855a13a83806e4760189a3c1100628b1..558eb526ba56fdb0a738587681c913373a63cd61 100644 (file)
@@ -193,19 +193,12 @@ static struct gpio_led eukrea_mbimxsd_leds[] = {
        },
 };
 
-static struct gpio_led_platform_data eukrea_mbimxsd_led_info = {
+static const struct gpio_led_platform_data
+               eukrea_mbimxsd_led_info __initconst = {
        .leds           = eukrea_mbimxsd_leds,
        .num_leds       = ARRAY_SIZE(eukrea_mbimxsd_leds),
 };
 
-static struct platform_device eukrea_mbimxsd_leds_gpio = {
-       .name   = "leds-gpio",
-       .id     = -1,
-       .dev    = {
-               .platform_data  = &eukrea_mbimxsd_led_info,
-       },
-};
-
 static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = {
        {
                .gpio           = GPIO_SWITCH1,
@@ -223,7 +216,6 @@ static const struct gpio_keys_platform_data
 };
 
 static struct platform_device *platform_devices[] __initdata = {
-       &eukrea_mbimxsd_leds_gpio,
        &eukrea_mbimxsd_lcd_powerdev,
 };
 
@@ -299,5 +291,6 @@ void __init eukrea_mbimxsd35_baseboard_init(void)
                                ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));
 
        platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
+       gpio_led_register_device(-1, &eukrea_mbimxsd_led_info);
        imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
 }
index 59d2a3b137d9987fab4fee9aaa6d584c1ea0edb6..a404c89485ca376541403d2b74aca709f152b323 100644 (file)
@@ -99,11 +99,6 @@ static struct platform_device dm9000x_device = {
        }
 };
 
-/* --- SERIAL RESSOURCE --- */
-static const struct imxuart_platform_data uart0_pdata __initconst = {
-       .flags = 0,
-};
-
 static const struct imxuart_platform_data uart1_pdata __initconst = {
        .flags = IMXUART_HAVE_RTSCTS,
 };
@@ -121,7 +116,7 @@ static void __init apf9328_init(void)
                        ARRAY_SIZE(apf9328_pins),
                        "APF9328");
 
-       imx1_add_imx_uart0(&uart0_pdata);
+       imx1_add_imx_uart0(NULL);
        imx1_add_imx_uart1(&uart1_pdata);
 
        platform_add_devices(devices, ARRAY_SIZE(devices));
index c6269d60ddbcf1328c74b4d7cc9f4fee6b83226f..6707de0ab71671ca07098f279aec78e8522305dc 100644 (file)
@@ -34,7 +34,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 #include <mach/common.h>
-#include <mach/iomux.h>
+#include <mach/iomux-mx27.h>
 
 #include "devices-imx27.h"
 
index 117ce0a50f4e59ca5f2a6c23a5c58d9c1f058239..b31d4129e10e6d0c801890e83684f3f94c313532 100644 (file)
 
 #include "devices-imx27.h"
 
-#define SD1_EN_GPIO (GPIO_PORTB + 25)
-#define OTG_PHY_RESET_GPIO (GPIO_PORTB + 23)
-#define SPI2_SS0 (GPIO_PORTD + 21)
-#define EXPIO_PARENT_INT       (MXC_INTERNAL_IRQS + GPIO_PORTC + 28)
+#define SD1_EN_GPIO            IMX_GPIO_NR(2, 25)
+#define OTG_PHY_RESET_GPIO     IMX_GPIO_NR(2, 23)
+#define SPI2_SS0               IMX_GPIO_NR(4, 21)
+#define EXPIO_PARENT_INT       gpio_to_irq(IMX_GPIO_NR(3, 28))
+#define PMIC_INT               IMX_GPIO_NR(3, 14)
+#define SD1_CD                 IMX_GPIO_NR(2, 26)
 
 static const int mx27pdk_pins[] __initconst = {
        /* UART1 */
@@ -98,9 +100,12 @@ static const int mx27pdk_pins[] __initconst = {
        PD22_PF_CSPI2_SCLK,
        PD23_PF_CSPI2_MISO,
        PD24_PF_CSPI2_MOSI,
+       SPI2_SS0 | GPIO_GPIO | GPIO_OUT,
        /* I2C1 */
        PD17_PF_I2C_DATA,
        PD18_PF_I2C_CLK,
+       /* PMIC INT */
+       PMIC_INT | GPIO_GPIO | GPIO_IN,
 };
 
 static const struct imxuart_platform_data uart_pdata __initconst = {
@@ -131,13 +136,13 @@ static const struct matrix_keymap_data mx27_3ds_keymap_data __initconst = {
 static int mx27_3ds_sdhc1_init(struct device *dev, irq_handler_t detect_irq,
                                void *data)
 {
-       return request_irq(IRQ_GPIOB(26), detect_irq, IRQF_TRIGGER_FALLING |
-                       IRQF_TRIGGER_RISING, "sdhc1-card-detect", data);
+       return request_irq(gpio_to_irq(SD1_CD), detect_irq,
+       IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, "sdhc1-card-detect", data);
 }
 
 static void mx27_3ds_sdhc1_exit(struct device *dev, void *data)
 {
-       free_irq(IRQ_GPIOB(26), data);
+       free_irq(gpio_to_irq(SD1_CD), data);
 }
 
 static const struct imxmmc_platform_data sdhc1_pdata __initconst = {
@@ -193,6 +198,13 @@ static int __init mx27_3ds_otg_mode(char *options)
 __setup("otg_mode=", mx27_3ds_otg_mode);
 
 /* Regulators */
+static struct regulator_init_data gpo_init = {
+       .constraints = {
+               .boot_on = 1,
+               .always_on = 1,
+       }
+};
+
 static struct regulator_consumer_supply vmmc1_consumers[] = {
        REGULATOR_SUPPLY("lcd_2v8", NULL),
 };
@@ -201,7 +213,9 @@ static struct regulator_init_data vmmc1_init = {
        .constraints = {
                .min_uV = 2800000,
                .max_uV = 2800000,
-               .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+               .apply_uV = 1,
+               .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+                                 REGULATOR_CHANGE_STATUS,
        },
        .num_consumer_supplies = ARRAY_SIZE(vmmc1_consumers),
        .consumer_supplies = vmmc1_consumers,
@@ -228,6 +242,12 @@ static struct mc13xxx_regulator_init_data mx27_3ds_regulators[] = {
        }, {
                .id = MC13783_REG_VGEN,
                .init_data = &vgen_init,
+       }, {
+               .id = MC13783_REG_GPO1, /* Turn on 1.8V */
+               .init_data = &gpo_init,
+       }, {
+               .id = MC13783_REG_GPO3, /* Turn on 3.3V */
+               .init_data = &gpo_init,
        },
 };
 
@@ -242,11 +262,11 @@ static struct mc13xxx_platform_data mc13783_pdata = {
 };
 
 /* SPI */
-static int spi2_internal_chipselect[] = {SPI2_SS0};
+static int spi2_chipselect[] = {SPI2_SS0};
 
 static const struct spi_imx_master spi2_pdata __initconst = {
-       .chipselect     = spi2_internal_chipselect,
-       .num_chipselect = ARRAY_SIZE(spi2_internal_chipselect),
+       .chipselect     = spi2_chipselect,
+       .num_chipselect = ARRAY_SIZE(spi2_chipselect),
 };
 
 static struct spi_board_info mx27_3ds_spi_devs[] __initdata = {
@@ -256,7 +276,7 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = {
                .bus_num        = 1,
                .chip_select    = 0, /* SS0 */
                .platform_data  = &mc13783_pdata,
-               .irq = IRQ_GPIOC(14),
+               .irq = gpio_to_irq(PMIC_INT),
                .mode = SPI_CS_HIGH,
        },
 };
index 441fbb83f39c6fbc86300cf4f5b2b520f03b7096..c20be7530927fc11345dcefeb8a93c408b463e53 100644 (file)
@@ -54,11 +54,8 @@ static int mx31_3ds_pins[] = {
        MX31_PIN_RXD1__RXD1,
        IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO),
        /*SPI0*/
-       MX31_PIN_CSPI1_SCLK__SCLK,
-       MX31_PIN_CSPI1_MOSI__MOSI,
-       MX31_PIN_CSPI1_MISO__MISO,
-       MX31_PIN_CSPI1_SPI_RDY__SPI_RDY,
-       MX31_PIN_CSPI1_SS2__SS2, /* CS for LCD */
+       IOMUX_MODE(MX31_PIN_DSR_DCE1, IOMUX_CONFIG_ALT1),
+       IOMUX_MODE(MX31_PIN_RI_DCE1, IOMUX_CONFIG_ALT1),
        /* SPI 1 */
        MX31_PIN_CSPI2_SCLK__SCLK,
        MX31_PIN_CSPI2_MOSI__MOSI,
@@ -692,6 +689,9 @@ static void __init mx31_3ds_init(void)
 
        imx31_soc_init();
 
+       /* Configure SPI1 IOMUX */
+       mxc_iomux_set_gpr(MUX_PGP_CSPI_BB, true);
+
        mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins),
                                      "mx31_3ds");
 
index a52fd36e2b52129b6f249e56c9e2f50a81672039..b358383120e7c3cb41b793b6c1e4aa71d6582b5a 100644 (file)
@@ -425,7 +425,7 @@ static int __init moboard_usbh2_init(void)
        return 0;
 }
 
-static struct gpio_led mx31moboard_leds[] = {
+static const struct gpio_led mx31moboard_leds[] __initconst = {
        {
                .name   = "coreboard-led-0:red:running",
                .default_trigger = "heartbeat",
@@ -442,26 +442,17 @@ static struct gpio_led mx31moboard_leds[] = {
        },
 };
 
-static struct gpio_led_platform_data mx31moboard_led_pdata = {
+static const struct gpio_led_platform_data mx31moboard_led_pdata __initconst = {
        .num_leds       = ARRAY_SIZE(mx31moboard_leds),
        .leds           = mx31moboard_leds,
 };
 
-static struct platform_device mx31moboard_leds_device = {
-       .name   = "leds-gpio",
-       .id     = -1,
-       .dev    = {
-               .platform_data = &mx31moboard_led_pdata,
-       },
-};
-
 static const struct ipu_platform_data mx3_ipu_data __initconst = {
        .irq_base = MXC_IPU_IRQ_START,
 };
 
 static struct platform_device *devices[] __initdata = {
        &mx31moboard_flash,
-       &mx31moboard_leds_device,
 };
 
 static struct mx3_camera_pdata camera_pdata __initdata = {
@@ -513,6 +504,7 @@ static void __init mx31moboard_init(void)
                "moboard");
 
        platform_add_devices(devices, ARRAY_SIZE(devices));
+       gpio_led_register_device(-1, &mx31moboard_led_pdata);
 
        imx31_add_imx_uart0(&uart0_pdata);
        imx31_add_imx_uart4(&uart4_pdata);
index 48b3c6fd5cf01f9c6cbd0481b86f56664abc25f9..b3b9bd8ac2a33f3bf5d993cd9ca9d9e189edd1c1 100644 (file)
@@ -43,7 +43,7 @@
 
 #include "devices-imx35.h"
 
-#define EXPIO_PARENT_INT       (MXC_INTERNAL_IRQS + GPIO_PORTA + 1)
+#define EXPIO_PARENT_INT       gpio_to_irq(IMX_GPIO_NR(1, 1))
 
 static const struct imxuart_platform_data uart_pdata __initconst = {
        .flags = IMXUART_HAVE_RTSCTS,
index 82805260e19cc5431dc0b609ed88e99cf08b21a8..db2d60470e1583a68b6d98a40b2cc35364b9edce 100644 (file)
@@ -101,21 +101,7 @@ static const int mxc_uart1_pins[] = {
        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 void uart1_mxc_exit(struct platform_device *pdev)
-{
-       mxc_gpio_release_multiple_pins(mxc_uart1_pins,
-                       ARRAY_SIZE(mxc_uart1_pins));
-}
-
 static const struct imxuart_platform_data uart_pdata __initconst = {
-       .init = uart1_mxc_init,
-       .exit = uart1_mxc_exit,
        .flags = IMXUART_HAVE_RTSCTS,
 };
 
@@ -131,6 +117,9 @@ static void __init scb9328_init(void)
 {
        imx1_soc_init();
 
+       mxc_gpio_setup_multiple_pins(mxc_uart1_pins,
+                       ARRAY_SIZE(mxc_uart1_pins), "UART1");
+
        imx1_add_imx_uart0(&uart_pdata);
 
        printk(KERN_INFO"Scb9328: Adding devices\n");
index 5aa053edc17cc1b5799676a50ab1a630e0629aaa..bf0fb87946ba40fbd1a0ee5222572034177ccc68 100644 (file)
@@ -161,7 +161,7 @@ static const struct spi_imx_master spi0_pdata __initconst = {
 
 /* GPIO LEDs */
 
-static struct gpio_led litekit_leds[] = {
+static const struct gpio_led litekit_leds[] __initconst = {
        {
                .name           = "GPIO0",
                .gpio           = IOMUX_TO_GPIO(MX31_PIN_COMPARE),
@@ -176,19 +176,12 @@ static struct gpio_led litekit_leds[] = {
        }
 };
 
-static struct gpio_led_platform_data litekit_led_platform_data = {
+static const struct gpio_led_platform_data
+               litekit_led_platform_data __initconst = {
        .leds           = litekit_leds,
        .num_leds       = ARRAY_SIZE(litekit_leds),
 };
 
-static struct platform_device litekit_led_device = {
-       .name   = "leds-gpio",
-       .id     = -1,
-       .dev    = {
-               .platform_data = &litekit_led_platform_data,
-       },
-};
-
 void __init mx31lite_db_init(void)
 {
        mxc_iomux_setup_multiple_pins(litekit_db_board_pins,
@@ -197,7 +190,7 @@ void __init mx31lite_db_init(void)
        imx31_add_imx_uart0(&uart_pdata);
        imx31_add_mxc_mmc(0, &mmc_pdata);
        imx31_add_spi_imx0(&spi0_pdata);
-       platform_device_register(&litekit_led_device);
+       gpio_led_register_device(-1, &litekit_led_platform_data);
        imx31_add_imx2_wdt(NULL);
        imx31_add_mxc_rtc(NULL);
 }
diff --git a/arch/arm/mach-integrator/include/mach/bits.h b/arch/arm/mach-integrator/include/mach/bits.h
deleted file mode 100644 (file)
index 09b024e..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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
- */
-/* DO NOT EDIT!! - this file automatically generated
- *                 from .s file by awk -f s2h.awk
- */
-/*  Bit field definitions
- *  Copyright (C) ARM Limited 1998. All rights reserved.
- */
-
-#ifndef __bits_h
-#define __bits_h                        1
-
-#define BIT0                            0x00000001
-#define BIT1                            0x00000002
-#define BIT2                            0x00000004
-#define BIT3                            0x00000008
-#define BIT4                            0x00000010
-#define BIT5                            0x00000020
-#define BIT6                            0x00000040
-#define BIT7                            0x00000080
-#define BIT8                            0x00000100
-#define BIT9                            0x00000200
-#define BIT10                           0x00000400
-#define BIT11                           0x00000800
-#define BIT12                           0x00001000
-#define BIT13                           0x00002000
-#define BIT14                           0x00004000
-#define BIT15                           0x00008000
-#define BIT16                           0x00010000
-#define BIT17                           0x00020000
-#define BIT18                           0x00040000
-#define BIT19                           0x00080000
-#define BIT20                           0x00100000
-#define BIT21                           0x00200000
-#define BIT22                           0x00400000
-#define BIT23                           0x00800000
-#define BIT24                           0x01000000
-#define BIT25                           0x02000000
-#define BIT26                           0x04000000
-#define BIT27                           0x08000000
-#define BIT28                           0x10000000
-#define BIT29                           0x20000000
-#define BIT30                           0x40000000
-#define BIT31                           0x80000000
-
-#endif
-
-/*         END */
diff --git a/arch/arm/mach-loki/Kconfig b/arch/arm/mach-loki/Kconfig
deleted file mode 100644 (file)
index 0045bdd..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-if ARCH_LOKI
-
-menu "Marvell Loki (88RC8480) Implementations"
-
-config MACH_LB88RC8480
-       bool "Marvell LB88RC8480 Development Board"
-       help
-         Say 'Y' here if you want your kernel to support the
-         Marvell LB88RC8480 Development Board.
-
-endmenu
-
-endif
diff --git a/arch/arm/mach-loki/Makefile b/arch/arm/mach-loki/Makefile
deleted file mode 100644 (file)
index d43233e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-obj-y                          += common.o addr-map.o irq.o
-
-obj-$(CONFIG_MACH_LB88RC8480)  += lb88rc8480-setup.o
diff --git a/arch/arm/mach-loki/Makefile.boot b/arch/arm/mach-loki/Makefile.boot
deleted file mode 100644 (file)
index 67039c3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-   zreladdr-y  := 0x00008000
-params_phys-y  := 0x00000100
-initrd_phys-y  := 0x00800000
diff --git a/arch/arm/mach-loki/addr-map.c b/arch/arm/mach-loki/addr-map.c
deleted file mode 100644 (file)
index b9537c9..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * arch/arm/mach-loki/addr-map.c
- *
- * Address map functions for Marvell Loki (88RC8480) SoCs
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/mbus.h>
-#include <linux/io.h>
-#include <mach/hardware.h>
-#include "common.h"
-
-/*
- * Generic Address Decode Windows bit settings
- */
-#define TARGET_DDR             0
-#define TARGET_DEV_BUS         1
-#define TARGET_PCIE0           3
-#define TARGET_PCIE1           4
-#define ATTR_DEV_BOOT          0x0f
-#define ATTR_DEV_CS2           0x1b
-#define ATTR_DEV_CS1           0x1d
-#define ATTR_DEV_CS0           0x1e
-#define ATTR_PCIE_IO           0x51
-#define ATTR_PCIE_MEM          0x59
-
-/*
- * Helpers to get DDR bank info
- */
-#define DDR_SIZE_CS(n)         DDR_REG(0x1500 + ((n) << 3))
-#define DDR_BASE_CS(n)         DDR_REG(0x1504 + ((n) << 3))
-
-/*
- * CPU Address Decode Windows registers
- */
-#define BRIDGE_REG(x)          (BRIDGE_VIRT_BASE | (x))
-#define CPU_WIN_CTRL(n)                BRIDGE_REG(0x000 | ((n) << 4))
-#define CPU_WIN_BASE(n)                BRIDGE_REG(0x004 | ((n) << 4))
-#define CPU_WIN_REMAP_LO(n)    BRIDGE_REG(0x008 | ((n) << 4))
-#define CPU_WIN_REMAP_HI(n)    BRIDGE_REG(0x00c | ((n) << 4))
-
-
-struct mbus_dram_target_info loki_mbus_dram_info;
-
-static void __init setup_cpu_win(int win, u32 base, u32 size,
-                                u8 target, u8 attr, int remap)
-{
-       u32 ctrl;
-
-       base &= 0xffff0000;
-       ctrl = ((size - 1) & 0xffff0000) | (attr << 8) | (1 << 5) | target;
-
-       writel(base, CPU_WIN_BASE(win));
-       writel(ctrl, CPU_WIN_CTRL(win));
-       if (win < 2) {
-               if (remap < 0)
-                       remap = base;
-
-               writel(remap & 0xffff0000, CPU_WIN_REMAP_LO(win));
-               writel(0, CPU_WIN_REMAP_HI(win));
-       }
-}
-
-void __init loki_setup_cpu_mbus(void)
-{
-       int i;
-       int cs;
-
-       /*
-        * First, disable and clear windows.
-        */
-       for (i = 0; i < 8; i++) {
-               writel(0, CPU_WIN_BASE(i));
-               writel(0, CPU_WIN_CTRL(i));
-               if (i < 2) {
-                       writel(0, CPU_WIN_REMAP_LO(i));
-                       writel(0, CPU_WIN_REMAP_HI(i));
-               }
-       }
-
-       /*
-        * Setup windows for PCIe IO+MEM space.
-        */
-       setup_cpu_win(2, LOKI_PCIE0_MEM_PHYS_BASE, LOKI_PCIE0_MEM_SIZE,
-                     TARGET_PCIE0, ATTR_PCIE_MEM, -1);
-       setup_cpu_win(3, LOKI_PCIE1_MEM_PHYS_BASE, LOKI_PCIE1_MEM_SIZE,
-                     TARGET_PCIE1, ATTR_PCIE_MEM, -1);
-
-       /*
-        * Setup MBUS dram target info.
-        */
-       loki_mbus_dram_info.mbus_dram_target_id = TARGET_DDR;
-
-       for (i = 0, cs = 0; i < 4; i++) {
-               u32 base = readl(DDR_BASE_CS(i));
-               u32 size = readl(DDR_SIZE_CS(i));
-
-               /*
-                * Chip select enabled?
-                */
-               if (size & 1) {
-                       struct mbus_dram_window *w;
-
-                       w = &loki_mbus_dram_info.cs[cs++];
-                       w->cs_index = i;
-                       w->mbus_attr = 0xf & ~(1 << i);
-                       w->base = base & 0xffff0000;
-                       w->size = (size | 0x0000ffff) + 1;
-               }
-       }
-       loki_mbus_dram_info.num_cs = cs;
-}
-
-void __init loki_setup_dev_boot_win(u32 base, u32 size)
-{
-       setup_cpu_win(4, base, size, TARGET_DEV_BUS, ATTR_DEV_BOOT, -1);
-}
diff --git a/arch/arm/mach-loki/common.c b/arch/arm/mach-loki/common.c
deleted file mode 100644 (file)
index 5f02664..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * arch/arm/mach-loki/common.c
- *
- * Core functions for Marvell Loki (88RC8480) SoCs
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/serial_8250.h>
-#include <linux/mbus.h>
-#include <linux/dma-mapping.h>
-#include <asm/page.h>
-#include <asm/timex.h>
-#include <asm/mach/map.h>
-#include <asm/mach/time.h>
-#include <mach/bridge-regs.h>
-#include <mach/loki.h>
-#include <plat/orion_nand.h>
-#include <plat/time.h>
-#include <plat/common.h>
-#include "common.h"
-
-/*****************************************************************************
- * I/O Address Mapping
- ****************************************************************************/
-static struct map_desc loki_io_desc[] __initdata = {
-       {
-               .virtual        = LOKI_REGS_VIRT_BASE,
-               .pfn            = __phys_to_pfn(LOKI_REGS_PHYS_BASE),
-               .length         = LOKI_REGS_SIZE,
-               .type           = MT_DEVICE,
-       },
-};
-
-void __init loki_map_io(void)
-{
-       iotable_init(loki_io_desc, ARRAY_SIZE(loki_io_desc));
-}
-
-
-/*****************************************************************************
- * GE00
- ****************************************************************************/
-void __init loki_ge0_init(struct mv643xx_eth_platform_data *eth_data)
-{
-       writel(0x00079220, GE0_VIRT_BASE + 0x20b0);
-
-       orion_ge00_init(eth_data, &loki_mbus_dram_info,
-                       GE0_PHYS_BASE, IRQ_LOKI_GBE_A_INT,
-                       0, LOKI_TCLK);
-}
-
-
-/*****************************************************************************
- * GE01
- ****************************************************************************/
-void __init loki_ge1_init(struct mv643xx_eth_platform_data *eth_data)
-{
-       writel(0x00079220, GE1_VIRT_BASE + 0x20b0);
-
-       orion_ge01_init(eth_data, &loki_mbus_dram_info,
-                       GE1_PHYS_BASE, IRQ_LOKI_GBE_B_INT,
-                       0, LOKI_TCLK);
-}
-
-
-/*****************************************************************************
- * SAS/SATA
- ****************************************************************************/
-static struct resource loki_sas_resources[] = {
-       {
-               .name   = "mvsas0 mem",
-               .start  = SAS0_PHYS_BASE,
-               .end    = SAS0_PHYS_BASE + 0x01ff,
-               .flags  = IORESOURCE_MEM,
-       }, {
-               .name   = "mvsas0 irq",
-               .start  = IRQ_LOKI_SAS_A,
-               .end    = IRQ_LOKI_SAS_A,
-               .flags  = IORESOURCE_IRQ,
-       }, {
-               .name   = "mvsas1 mem",
-               .start  = SAS1_PHYS_BASE,
-               .end    = SAS1_PHYS_BASE + 0x01ff,
-               .flags  = IORESOURCE_MEM,
-       }, {
-               .name   = "mvsas1 irq",
-               .start  = IRQ_LOKI_SAS_B,
-               .end    = IRQ_LOKI_SAS_B,
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device loki_sas = {
-       .name           = "mvsas",
-       .id             = 0,
-       .dev            = {
-               .coherent_dma_mask      = DMA_BIT_MASK(32),
-       },
-       .num_resources  = ARRAY_SIZE(loki_sas_resources),
-       .resource       = loki_sas_resources,
-};
-
-void __init loki_sas_init(void)
-{
-       writel(0x8300f707, DDR_REG(0x1424));
-       platform_device_register(&loki_sas);
-}
-
-
-/*****************************************************************************
- * UART0
- ****************************************************************************/
-void __init loki_uart0_init(void)
-{
-       orion_uart0_init(UART0_VIRT_BASE, UART0_PHYS_BASE,
-                        IRQ_LOKI_UART0, LOKI_TCLK);
-}
-
-/*****************************************************************************
- * UART1
- ****************************************************************************/
-void __init loki_uart1_init(void)
-{
-       orion_uart1_init(UART1_VIRT_BASE, UART1_PHYS_BASE,
-                        IRQ_LOKI_UART1, LOKI_TCLK);
-}
-
-
-/*****************************************************************************
- * Time handling
- ****************************************************************************/
-void __init loki_init_early(void)
-{
-       orion_time_set_base(TIMER_VIRT_BASE);
-}
-
-static void loki_timer_init(void)
-{
-       orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
-                       IRQ_LOKI_BRIDGE, LOKI_TCLK);
-}
-
-struct sys_timer loki_timer = {
-       .init = loki_timer_init,
-};
-
-
-/*****************************************************************************
- * General
- ****************************************************************************/
-void __init loki_init(void)
-{
-       printk(KERN_INFO "Loki ID: 88RC8480. TCLK=%d.\n", LOKI_TCLK);
-
-       loki_setup_cpu_mbus();
-}
diff --git a/arch/arm/mach-loki/common.h b/arch/arm/mach-loki/common.h
deleted file mode 100644 (file)
index a315dcf..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * arch/arm/mach-loki/common.h
- *
- * Core functions for Marvell Loki (88RC8480) SoCs
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __ARCH_LOKI_COMMON_H
-#define __ARCH_LOKI_COMMON_H
-
-struct mv643xx_eth_platform_data;
-
-/*
- * Basic Loki init functions used early by machine-setup.
- */
-void loki_map_io(void);
-void loki_init(void);
-void loki_init_early(void);
-void loki_init_irq(void);
-
-extern struct mbus_dram_target_info loki_mbus_dram_info;
-void loki_setup_cpu_mbus(void);
-void loki_setup_dev_boot_win(u32 base, u32 size);
-
-void loki_ge0_init(struct mv643xx_eth_platform_data *eth_data);
-void loki_ge1_init(struct mv643xx_eth_platform_data *eth_data);
-void loki_sas_init(void);
-void loki_uart0_init(void);
-void loki_uart1_init(void);
-
-extern struct sys_timer loki_timer;
-
-
-#endif
diff --git a/arch/arm/mach-loki/include/mach/bridge-regs.h b/arch/arm/mach-loki/include/mach/bridge-regs.h
deleted file mode 100644 (file)
index fd87732..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * arch/arm/mach-loki/include/mach/bridge-regs.h
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __ASM_ARCH_BRIDGE_REGS_H
-#define __ASM_ARCH_BRIDGE_REGS_H
-
-#include <mach/loki.h>
-
-#define RSTOUTn_MASK           (BRIDGE_VIRT_BASE | 0x0108)
-#define SOFT_RESET_OUT_EN      0x00000004
-
-#define SYSTEM_SOFT_RESET      (BRIDGE_VIRT_BASE | 0x010c)
-#define SOFT_RESET             0x00000001
-
-#define BRIDGE_INT_TIMER1_CLR  0x0004
-
-#define IRQ_VIRT_BASE          (BRIDGE_VIRT_BASE | 0x0200)
-#define IRQ_CAUSE_OFF          0x0000
-#define IRQ_MASK_OFF           0x0004
-
-#define TIMER_VIRT_BASE                (BRIDGE_VIRT_BASE | 0x0300)
-
-#endif
diff --git a/arch/arm/mach-loki/include/mach/debug-macro.S b/arch/arm/mach-loki/include/mach/debug-macro.S
deleted file mode 100644 (file)
index cc90d99..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-loki/include/mach/debug-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/loki.h>
-
-       .macro  addruart, rp, rv
-       ldr     \rp, =LOKI_REGS_PHYS_BASE
-       ldr     \rv, =LOKI_REGS_VIRT_BASE
-       orr     \rp, \rp, #0x00012000
-       orr     \rv, \rv, #0x00012000
-       .endm
-
-#define UART_SHIFT     2
-#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-loki/include/mach/entry-macro.S b/arch/arm/mach-loki/include/mach/entry-macro.S
deleted file mode 100644 (file)
index bc917ed..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * arch/arm/mach-loki/include/mach/entry-macro.S
- *
- * Low-level IRQ helper macros for Marvell Loki (88RC8480) platforms
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <mach/bridge-regs.h>
-
-       .macro  disable_fiq
-       .endm
-
-       .macro  arch_ret_to_user, tmp1, tmp2
-       .endm
-
-       .macro  get_irqnr_preamble, base, tmp
-       ldr     \base, =IRQ_VIRT_BASE
-       .endm
-
-       .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
-       ldr     \irqstat, [\base, #IRQ_CAUSE_OFF]
-       ldr     \tmp, [\base, #IRQ_MASK_OFF]
-       mov     \irqnr, #0
-       ands    \irqstat, \irqstat, \tmp
-       clzne   \irqnr, \irqstat
-       rsbne   \irqnr, \irqnr, #31
-       .endm
diff --git a/arch/arm/mach-loki/include/mach/hardware.h b/arch/arm/mach-loki/include/mach/hardware.h
deleted file mode 100644 (file)
index d7bfc8f..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * arch/arm/mach-loki/include/mach/hardware.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_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H
-
-#include "loki.h"
-
-
-#endif
diff --git a/arch/arm/mach-loki/include/mach/io.h b/arch/arm/mach-loki/include/mach/io.h
deleted file mode 100644 (file)
index a373cd5..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * arch/arm/mach-loki/include/mach/io.h
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __ASM_ARCH_IO_H
-#define __ASM_ARCH_IO_H
-
-#include "loki.h"
-
-#define IO_SPACE_LIMIT         0xffffffff
-
-static inline void __iomem *__io(unsigned long addr)
-{
-       return (void __iomem *)((addr - LOKI_PCIE0_IO_PHYS_BASE)
-                                       + LOKI_PCIE0_IO_VIRT_BASE);
-}
-
-#define __io(a)                        __io(a)
-#define __mem_pci(a)           (a)
-
-
-#endif
diff --git a/arch/arm/mach-loki/include/mach/irqs.h b/arch/arm/mach-loki/include/mach/irqs.h
deleted file mode 100644 (file)
index 9fbd332..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * arch/arm/mach-loki/include/mach/irqs.h
- *
- * IRQ definitions for Marvell Loki (88RC8480) SoCs
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __ASM_ARCH_IRQS_H
-#define __ASM_ARCH_IRQS_H
-
-#include "loki.h"      /* need GPIO_MAX */
-
-/*
- * Interrupt Controller
- */
-#define IRQ_LOKI_PCIE_A_CPU_DRBL       0
-#define IRQ_LOKI_CPU_PCIE_A_DRBL       1
-#define IRQ_LOKI_PCIE_B_CPU_DRBL       2
-#define IRQ_LOKI_CPU_PCIE_B_DRBL       3
-#define IRQ_LOKI_COM_A_ERR             6
-#define IRQ_LOKI_COM_A_IN              7
-#define IRQ_LOKI_COM_A_OUT             8
-#define IRQ_LOKI_COM_B_ERR             9
-#define IRQ_LOKI_COM_B_IN              10
-#define IRQ_LOKI_COM_B_OUT             11
-#define IRQ_LOKI_DMA_A                 12
-#define IRQ_LOKI_DMA_B                 13
-#define IRQ_LOKI_SAS_A                 14
-#define IRQ_LOKI_SAS_B                 15
-#define IRQ_LOKI_DDR                   16
-#define IRQ_LOKI_XOR                   17
-#define IRQ_LOKI_BRIDGE                        18
-#define IRQ_LOKI_PCIE_A_ERR            20
-#define IRQ_LOKI_PCIE_A_INT            21
-#define IRQ_LOKI_PCIE_B_ERR            22
-#define IRQ_LOKI_PCIE_B_INT            23
-#define IRQ_LOKI_GBE_A_INT             24
-#define IRQ_LOKI_GBE_B_INT             25
-#define IRQ_LOKI_DEV_ERR               26
-#define IRQ_LOKI_UART0                 27
-#define IRQ_LOKI_UART1                 28
-#define IRQ_LOKI_TWSI                  29
-#define IRQ_LOKI_GPIO_23_0             30
-#define IRQ_LOKI_GPIO_25_24            31
-
-/*
- * Loki General Purpose Pins
- */
-#define IRQ_LOKI_GPIO_START    32
-#define NR_GPIO_IRQS           GPIO_MAX
-
-#define NR_IRQS                        (IRQ_LOKI_GPIO_START + NR_GPIO_IRQS)
-
-
-#endif
diff --git a/arch/arm/mach-loki/include/mach/loki.h b/arch/arm/mach-loki/include/mach/loki.h
deleted file mode 100644 (file)
index bfca7c2..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * arch/arm/mach-loki/include/mach/loki.h
- *
- * Generic definitions for Marvell Loki (88RC8480) SoC flavors
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __ASM_ARCH_LOKI_H
-#define __ASM_ARCH_LOKI_H
-
-/*
- * Marvell Loki (88RC8480) address maps.
- *
- * phys
- * d0000000    on-chip peripheral registers
- * e0000000    PCIe 0 Memory space
- * e8000000    PCIe 1 Memory space
- * f0000000    PCIe 0 I/O space
- * f0100000    PCIe 1 I/O space
- *
- * virt                phys            size
- * fed00000    d0000000        1M      on-chip peripheral registers
- * fee00000    f0000000        64K     PCIe 0 I/O space
- * fef00000    f0100000        64K     PCIe 1 I/O space
- */
-
-#define LOKI_REGS_PHYS_BASE            0xd0000000
-#define LOKI_REGS_VIRT_BASE            0xfed00000
-#define LOKI_REGS_SIZE                 SZ_1M
-
-#define LOKI_PCIE0_IO_PHYS_BASE                0xf0000000
-#define LOKI_PCIE0_IO_VIRT_BASE                0xfee00000
-#define LOKI_PCIE0_IO_BUS_BASE         0x00000000
-#define LOKI_PCIE0_IO_SIZE             SZ_64K
-
-#define LOKI_PCIE1_IO_PHYS_BASE                0xf0100000
-#define LOKI_PCIE1_IO_VIRT_BASE                0xfef00000
-#define LOKI_PCIE1_IO_BUS_BASE         0x00000000
-#define LOKI_PCIE1_IO_SIZE             SZ_64K
-
-#define LOKI_PCIE0_MEM_PHYS_BASE       0xe0000000
-#define LOKI_PCIE0_MEM_SIZE            SZ_128M
-
-#define LOKI_PCIE1_MEM_PHYS_BASE       0xe8000000
-#define LOKI_PCIE1_MEM_SIZE            SZ_128M
-
-/*
- * Register Map
- */
-#define DEV_BUS_PHYS_BASE      (LOKI_REGS_PHYS_BASE | 0x10000)
-#define DEV_BUS_VIRT_BASE      (LOKI_REGS_VIRT_BASE | 0x10000)
-#define  UART0_PHYS_BASE       (DEV_BUS_PHYS_BASE | 0x2000)
-#define  UART0_VIRT_BASE       (DEV_BUS_VIRT_BASE | 0x2000)
-#define  UART1_PHYS_BASE       (DEV_BUS_PHYS_BASE | 0x2100)
-#define  UART1_VIRT_BASE       (DEV_BUS_VIRT_BASE | 0x2100)
-
-#define BRIDGE_VIRT_BASE       (LOKI_REGS_VIRT_BASE | 0x20000)
-
-#define PCIE0_VIRT_BASE                (LOKI_REGS_VIRT_BASE | 0x30000)
-
-#define PCIE1_VIRT_BASE                (LOKI_REGS_VIRT_BASE | 0x40000)
-
-#define SAS0_PHYS_BASE         (LOKI_REGS_PHYS_BASE | 0x80000)
-
-#define SAS1_PHYS_BASE         (LOKI_REGS_PHYS_BASE | 0x90000)
-
-#define GE0_PHYS_BASE          (LOKI_REGS_PHYS_BASE | 0xa0000)
-#define GE0_VIRT_BASE          (LOKI_REGS_VIRT_BASE | 0xa0000)
-
-#define GE1_PHYS_BASE          (LOKI_REGS_PHYS_BASE | 0xb0000)
-#define GE1_VIRT_BASE          (LOKI_REGS_VIRT_BASE | 0xb0000)
-
-#define DDR_VIRT_BASE          (LOKI_REGS_VIRT_BASE | 0xf0000)
-#define DDR_REG(x)             (DDR_VIRT_BASE | (x))
-
-
-#define GPIO_MAX               8
-
-
-#endif
diff --git a/arch/arm/mach-loki/include/mach/memory.h b/arch/arm/mach-loki/include/mach/memory.h
deleted file mode 100644 (file)
index 6636665..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * arch/arm/mach-loki/include/mach/memory.h
- */
-
-#ifndef __ASM_ARCH_MEMORY_H
-#define __ASM_ARCH_MEMORY_H
-
-#define PLAT_PHYS_OFFSET               UL(0x00000000)
-
-#endif
diff --git a/arch/arm/mach-loki/include/mach/system.h b/arch/arm/mach-loki/include/mach/system.h
deleted file mode 100644 (file)
index 7189519..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * arch/arm/mach-loki/include/mach/system.h
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-
-#include <mach/bridge-regs.h>
-
-static inline void arch_idle(void)
-{
-       cpu_do_idle();
-}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-       /*
-        * Enable soft reset to assert RSTOUTn.
-        */
-       writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
-
-       /*
-        * Assert soft reset.
-        */
-       writel(SOFT_RESET, SYSTEM_SOFT_RESET);
-
-       while (1)
-               ;
-}
-
-
-#endif
diff --git a/arch/arm/mach-loki/include/mach/timex.h b/arch/arm/mach-loki/include/mach/timex.h
deleted file mode 100644 (file)
index 9df2109..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
- * arch/arm/mach-loki/include/mach/timex.h
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#define CLOCK_TICK_RATE                (100 * HZ)
-
-#define LOKI_TCLK              180000000
diff --git a/arch/arm/mach-loki/include/mach/uncompress.h b/arch/arm/mach-loki/include/mach/uncompress.h
deleted file mode 100644 (file)
index 90b2a7e..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * arch/arm/mach-loki/include/mach/uncompress.h
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <linux/serial_reg.h>
-#include <mach/loki.h>
-
-#define SERIAL_BASE    ((unsigned char *)UART0_PHYS_BASE)
-
-static void putc(const char c)
-{
-       unsigned char *base = SERIAL_BASE;
-       int i;
-
-       for (i = 0; i < 0x1000; i++) {
-               if (base[UART_LSR << 2] & UART_LSR_THRE)
-                       break;
-               barrier();
-       }
-
-       base[UART_TX << 2] = c;
-}
-
-static void flush(void)
-{
-       unsigned char *base = SERIAL_BASE;
-       unsigned char mask;
-       int i;
-
-       mask = UART_LSR_TEMT | UART_LSR_THRE;
-
-       for (i = 0; i < 0x1000; i++) {
-               if ((base[UART_LSR << 2] & mask) == mask)
-                       break;
-               barrier();
-       }
-}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
-#define arch_decomp_wdog()
diff --git a/arch/arm/mach-loki/include/mach/vmalloc.h b/arch/arm/mach-loki/include/mach/vmalloc.h
deleted file mode 100644 (file)
index 5dcbd86..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-loki/include/mach/vmalloc.h
- */
-
-#define VMALLOC_END    0xfe800000UL
diff --git a/arch/arm/mach-loki/irq.c b/arch/arm/mach-loki/irq.c
deleted file mode 100644 (file)
index 76b211b..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * arch/arm/mach-loki/irq.c
- *
- * Marvell Loki (88RC8480) IRQ handling.
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/irq.h>
-#include <linux/io.h>
-#include <mach/bridge-regs.h>
-#include <plat/irq.h>
-#include "common.h"
-
-void __init loki_init_irq(void)
-{
-       orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_OFF));
-}
diff --git a/arch/arm/mach-loki/lb88rc8480-setup.c b/arch/arm/mach-loki/lb88rc8480-setup.c
deleted file mode 100644 (file)
index 35eae4e..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * arch/arm/mach-loki/lb88rc8480-setup.c
- *
- * Marvell LB88RC8480 Development Board Setup
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/irq.h>
-#include <linux/mtd/physmap.h>
-#include <linux/mtd/nand.h>
-#include <linux/timer.h>
-#include <linux/ata_platform.h>
-#include <linux/mv643xx_eth.h>
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <mach/loki.h>
-#include "common.h"
-
-#define LB88RC8480_FLASH_BOOT_CS_BASE  0xf8000000
-#define LB88RC8480_FLASH_BOOT_CS_SIZE  SZ_128M
-
-#define LB88RC8480_NOR_BOOT_BASE       0xff000000
-#define LB88RC8480_NOR_BOOT_SIZE       SZ_16M
-
-static struct mtd_partition lb88rc8480_boot_flash_parts[] = {
-       {
-               .name   = "kernel",
-               .offset = 0,
-               .size   = SZ_2M,
-       }, {
-               .name   = "root-fs",
-               .offset = SZ_2M,
-               .size   = (SZ_8M + SZ_4M + SZ_1M),
-       }, {
-               .name   = "u-boot",
-               .offset = (SZ_8M + SZ_4M + SZ_2M + SZ_1M),
-               .size   = SZ_1M,
-       },
-};
-
-static struct physmap_flash_data lb88rc8480_boot_flash_data = {
-       .parts          = lb88rc8480_boot_flash_parts,
-       .nr_parts       = ARRAY_SIZE(lb88rc8480_boot_flash_parts),
-       .width          = 1,    /* 8 bit bus width */
-};
-
-static struct resource lb88rc8480_boot_flash_resource = {
-       .flags  = IORESOURCE_MEM,
-       .start  = LB88RC8480_NOR_BOOT_BASE,
-       .end    = LB88RC8480_NOR_BOOT_BASE + LB88RC8480_NOR_BOOT_SIZE - 1,
-};
-
-static struct platform_device lb88rc8480_boot_flash = {
-       .name   = "physmap-flash",
-       .id     = 0,
-       .dev    = {
-               .platform_data  = &lb88rc8480_boot_flash_data,
-       },
-       .num_resources  = 1,
-       .resource       = &lb88rc8480_boot_flash_resource,
-};
-
-static struct mv643xx_eth_platform_data lb88rc8480_ge0_data = {
-       .phy_addr       = MV643XX_ETH_PHY_ADDR(1),
-       .mac_addr       = { 0x00, 0x50, 0x43, 0x11, 0x22, 0x33 },
-};
-
-static void __init lb88rc8480_init(void)
-{
-       /*
-        * Basic setup. Needs to be called early.
-        */
-       loki_init();
-
-       loki_ge0_init(&lb88rc8480_ge0_data);
-       loki_sas_init();
-       loki_uart0_init();
-       loki_uart1_init();
-
-       loki_setup_dev_boot_win(LB88RC8480_FLASH_BOOT_CS_BASE,
-                               LB88RC8480_FLASH_BOOT_CS_SIZE);
-       platform_device_register(&lb88rc8480_boot_flash);
-}
-
-MACHINE_START(LB88RC8480, "Marvell LB88RC8480 Development Board")
-       /* Maintainer: Ke Wei <kewei@marvell.com> */
-       .boot_params    = 0x00000100,
-       .init_machine   = lb88rc8480_init,
-       .map_io         = loki_map_io,
-       .init_early     = loki_init_early,
-       .init_irq       = loki_init_irq,
-       .timer          = &loki_timer,
-MACHINE_END
index d1d936c7236de7a729255b9b058824b24f28af9f..720fa43a60bfd4725791cc6254110f36c09b6a03 100644 (file)
@@ -19,6 +19,6 @@
 #ifndef __ASM_ARCH_VMALLOC_H
 #define __ASM_ARCH_VMALLOC_H
 
-#define VMALLOC_END    0xF0000000
+#define VMALLOC_END    0xF0000000UL
 
 #endif
index 315b9f365329a459bed0140f3d96f524cdfe655b..1a1af9e56250cf48a484b8f8d1f61ba987540321 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <asm/hardware/gic.h>
 #include <asm/cacheflush.h>
+#include <asm/cputype.h>
 #include <asm/mach-types.h>
 
 #include <mach/msm_iomap.h>
@@ -40,6 +41,12 @@ volatile int pen_release = -1;
 
 static DEFINE_SPINLOCK(boot_lock);
 
+static inline int get_core_count(void)
+{
+       /* 1 + the PART[1:0] field of MIDR */
+       return ((read_cpuid_id() >> 4) & 3) + 1;
+}
+
 void __cpuinit platform_secondary_init(unsigned int cpu)
 {
        /* Configure edge-triggered PPIs */
@@ -147,9 +154,9 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
  */
 void __init smp_init_cpus(void)
 {
-       unsigned int i;
+       unsigned int i, ncores = get_core_count();
 
-       for (i = 0; i < NR_CPUS; i++)
+       for (i = 0; i < ncores; i++)
                set_cpu_possible(i, true);
 
         set_smp_cross_call(gic_raise_softirq);
index a560439dcc3c81b9aa27127fbdd2358bd16664d1..f27c7d2fa9f728fdcfe3d5e267fb364abd604bcc 100644 (file)
@@ -129,12 +129,12 @@ static void __init mv78xx0_pcie_preinit(void)
                struct pcie_port *pp = pcie_port + i;
 
                mv78xx0_setup_pcie_io_win(win++, pp->res[0].start,
-                       pp->res[0].end - pp->res[0].start + 1,
-                       pp->maj, pp->min);
+                                         resource_size(&pp->res[0]),
+                                         pp->maj, pp->min);
 
                mv78xx0_setup_pcie_mem_win(win++, pp->res[1].start,
-                       pp->res[1].end - pp->res[1].start + 1,
-                       pp->maj, pp->min);
+                                          resource_size(&pp->res[1]),
+                                          pp->maj, pp->min);
        }
 }
 
index 799fbc40e53c22437420d9767cb6a18f10f7bb57..f25e9d7bf0f501fd1025718a2d25f72f76d7f4e3 100644 (file)
@@ -109,6 +109,7 @@ config MACH_EUKREA_MBIMX51_BASEBOARD
        bool
        select IMX_HAVE_PLATFORM_IMX_KEYPAD
        select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
+       select LEDS_GPIO_REGISTER
        help
          This adds board specific devices that can be found on Eukrea's
          MBIMX51 evaluation board.
@@ -135,6 +136,7 @@ config MACH_EUKREA_MBIMXSD51_BASEBOARD
        prompt "Eukrea MBIMXSD development board"
        bool
        select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
+       select LEDS_GPIO_REGISTER
        help
          This adds board specific devices that can be found on Eukrea's
          MBIMXSD evaluation board.
@@ -151,6 +153,7 @@ config MX51_EFIKA_COMMON
 
 config MACH_MX51_EFIKAMX
        bool "Support MX51 Genesi Efika MX nettop"
+       select LEDS_GPIO_REGISTER
        select MX51_EFIKA_COMMON
        help
          Include support for Genesi Efika MX nettop. This includes specific
@@ -158,6 +161,7 @@ config MACH_MX51_EFIKAMX
 
 config MACH_MX51_EFIKASB
        bool "Support MX51 Genesi Efika Smartbook"
+       select LEDS_GPIO_REGISTER
        select MX51_EFIKA_COMMON
        help
          Include support for Genesi Efika Smartbook. This includes specific
index add0d42de7af5a91dacebe27776fd669fb0c57a4..7c893fa70266928418aebff1f3140221d4355b30 100644 (file)
 #define CPUIMX51_QUARTB_GPIO   IMX_GPIO_NR(3, 25)
 #define CPUIMX51_QUARTC_GPIO   IMX_GPIO_NR(3, 26)
 #define CPUIMX51_QUARTD_GPIO   IMX_GPIO_NR(3, 27)
-#define CPUIMX51_QUARTA_IRQ    (MXC_INTERNAL_IRQS + CPUIMX51_QUARTA_GPIO)
-#define CPUIMX51_QUARTB_IRQ    (MXC_INTERNAL_IRQS + CPUIMX51_QUARTB_GPIO)
-#define CPUIMX51_QUARTC_IRQ    (MXC_INTERNAL_IRQS + CPUIMX51_QUARTC_GPIO)
-#define CPUIMX51_QUARTD_IRQ    (MXC_INTERNAL_IRQS + CPUIMX51_QUARTD_GPIO)
 #define CPUIMX51_QUART_XTAL    14745600
 #define CPUIMX51_QUART_REGSHIFT        17
 
@@ -61,7 +57,7 @@
 static struct plat_serial8250_port serial_platform_data[] = {
        {
                .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000),
-               .irq = CPUIMX51_QUARTA_IRQ,
+               .irq = gpio_to_irq(CPUIMX51_QUARTA_GPIO),
                .irqflags = IRQF_TRIGGER_HIGH,
                .uartclk = CPUIMX51_QUART_XTAL,
                .regshift = CPUIMX51_QUART_REGSHIFT,
@@ -69,7 +65,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
                .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
        }, {
                .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000),
-               .irq = CPUIMX51_QUARTB_IRQ,
+               .irq = gpio_to_irq(CPUIMX51_QUARTB_GPIO),
                .irqflags = IRQF_TRIGGER_HIGH,
                .uartclk = CPUIMX51_QUART_XTAL,
                .regshift = CPUIMX51_QUART_REGSHIFT,
@@ -77,7 +73,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
                .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
        }, {
                .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000),
-               .irq = CPUIMX51_QUARTC_IRQ,
+               .irq = gpio_to_irq(CPUIMX51_QUARTC_GPIO),
                .irqflags = IRQF_TRIGGER_HIGH,
                .uartclk = CPUIMX51_QUART_XTAL,
                .regshift = CPUIMX51_QUART_REGSHIFT,
@@ -85,7 +81,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
                .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
        }, {
                .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000),
-               .irq = CPUIMX51_QUARTD_IRQ,
+               .irq = irq_to_gpio(CPUIMX51_QUARTD_GPIO),
                .irqflags = IRQF_TRIGGER_HIGH,
                .uartclk = CPUIMX51_QUART_XTAL,
                .regshift = CPUIMX51_QUART_REGSHIFT,
index 3112d15feebce85a14a4ec5b51e065740af50c5c..07a38154da215b76cdc5409d64ccef405ead46f0 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/irq.h>
 #include <linux/platform_device.h>
 #include <linux/spi/spi.h>
+#include <linux/gpio.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -26,7 +27,7 @@
 #include "devices-imx51.h"
 #include "devices.h"
 
-#define EXPIO_PARENT_INT       (MXC_INTERNAL_IRQS + GPIO_PORTA + 6)
+#define EXPIO_PARENT_INT       gpio_to_irq(IMX_GPIO_NR(1, 6))
 #define MX51_3DS_ECSPI2_CS     (GPIO_PORTC + 28)
 
 static iomux_v3_cfg_t mx51_3ds_pads[] = {
index 6021dd00ec750fb0a410dac579e78f84d2bd13ba..e54e4bf61cfd8df21018110ccf59dccf94e3ff27 100644 (file)
@@ -36,7 +36,7 @@
 
 #define BABBAGE_USB_HUB_RESET  IMX_GPIO_NR(1, 7)
 #define BABBAGE_USBH1_STP      IMX_GPIO_NR(1, 27)
-#define BABBAGE_PHY_RESET      IMX_GPIO_NR(2, 5)
+#define BABBAGE_USB_PHY_RESET  IMX_GPIO_NR(2, 5)
 #define BABBAGE_FEC_PHY_RESET  IMX_GPIO_NR(2, 14)
 #define BABBAGE_POWER_KEY      IMX_GPIO_NR(2, 21)
 #define BABBAGE_ECSPI1_CS0     IMX_GPIO_NR(4, 24)
@@ -110,6 +110,9 @@ static iomux_v3_cfg_t mx51babbage_pads[] = {
        /* USB HUB reset line*/
        MX51_PAD_GPIO1_7__GPIO1_7,
 
+       /* USB PHY reset line */
+       MX51_PAD_EIM_D21__GPIO2_5,
+
        /* FEC */
        MX51_PAD_EIM_EB2__FEC_MDIO,
        MX51_PAD_EIM_EB3__FEC_RDATA1,
@@ -169,34 +172,31 @@ static struct imxi2c_platform_data babbage_hsi2c_data = {
        .bitrate = 400000,
 };
 
+static struct gpio mx51_babbage_usbh1_gpios[] = {
+       { BABBAGE_USBH1_STP, GPIOF_OUT_INIT_LOW, "usbh1_stp" },
+       { BABBAGE_USB_PHY_RESET, GPIOF_OUT_INIT_LOW, "usbh1_phy_reset" },
+};
+
 static int gpio_usbh1_active(void)
 {
        iomux_v3_cfg_t usbh1stp_gpio = MX51_PAD_USBH1_STP__GPIO1_27;
-       iomux_v3_cfg_t phyreset_gpio = MX51_PAD_EIM_D21__GPIO2_5;
        int ret;
 
        /* Set USBH1_STP to GPIO and toggle it */
        mxc_iomux_v3_setup_pad(usbh1stp_gpio);
-       ret = gpio_request(BABBAGE_USBH1_STP, "usbh1_stp");
+       ret = gpio_request_array(mx51_babbage_usbh1_gpios,
+                                       ARRAY_SIZE(mx51_babbage_usbh1_gpios));
 
        if (ret) {
-               pr_debug("failed to get MX51_PAD_USBH1_STP__GPIO_1_27: %d\n", ret);
+               pr_debug("failed to get USBH1 pins: %d\n", ret);
                return ret;
        }
-       gpio_direction_output(BABBAGE_USBH1_STP, 0);
-       gpio_set_value(BABBAGE_USBH1_STP, 1);
-       msleep(100);
-       gpio_free(BABBAGE_USBH1_STP);
-
-       /* De-assert USB PHY RESETB */
-       mxc_iomux_v3_setup_pad(phyreset_gpio);
-       ret = gpio_request(BABBAGE_PHY_RESET, "phy_reset");
 
-       if (ret) {
-               pr_debug("failed to get MX51_PAD_EIM_D21__GPIO_2_5: %d\n", ret);
-               return ret;
-       }
-       gpio_direction_output(BABBAGE_PHY_RESET, 1);
+       msleep(100);
+       gpio_set_value(BABBAGE_USBH1_STP, 1);
+       gpio_set_value(BABBAGE_USB_PHY_RESET, 1);
+       gpio_free_array(mx51_babbage_usbh1_gpios,
+                                       ARRAY_SIZE(mx51_babbage_usbh1_gpios));
        return 0;
 }
 
index 3be603b9075af50c68e65a6be6235b304ff8fd21..f70700dc0ec1d7bf3b4120c5645c96dbbb05db26 100644 (file)
@@ -139,7 +139,7 @@ static void __init mx51_efikamx_board_id(void)
        }
 }
 
-static struct gpio_led mx51_efikamx_leds[] = {
+static struct gpio_led mx51_efikamx_leds[] __initdata = {
        {
                .name = "efikamx:green",
                .default_trigger = "default-on",
@@ -157,19 +157,12 @@ static struct gpio_led mx51_efikamx_leds[] = {
        },
 };
 
-static struct gpio_led_platform_data mx51_efikamx_leds_data = {
+static const struct gpio_led_platform_data
+               mx51_efikamx_leds_data __initconst = {
        .leds = mx51_efikamx_leds,
        .num_leds = ARRAY_SIZE(mx51_efikamx_leds),
 };
 
-static struct platform_device mx51_efikamx_leds_device = {
-       .name = "leds-gpio",
-       .id = -1,
-       .dev = {
-               .platform_data = &mx51_efikamx_leds_data,
-       },
-};
-
 static struct gpio_keys_button mx51_efikamx_powerkey[] = {
        {
                .code = KEY_POWER,
@@ -250,7 +243,7 @@ static void __init mx51_efikamx_init(void)
                mx51_efikamx_leds[2].default_trigger = "mmc1";
        }
 
-       platform_device_register(&mx51_efikamx_leds_device);
+       gpio_led_register_device(-1, &mx51_efikamx_leds_data);
        imx_add_gpio_keys(&mx51_efikamx_powerkey_data);
 
        if (system_rev == 0x11) {
index 4b2e522de0f86b4ad3905b8a0d76112b7ef04e99..2e4d9d32a87c688061181939c318790ea3f52d37 100644 (file)
@@ -132,7 +132,7 @@ static void __init mx51_efikasb_usb(void)
                mxc_register_device(&mxc_usbh2_device, &usbh2_config);
 }
 
-static struct gpio_led mx51_efikasb_leds[] = {
+static const struct gpio_led mx51_efikasb_leds[] __initconst = {
        {
                .name = "efikasb:green",
                .default_trigger = "default-on",
@@ -146,19 +146,12 @@ static struct gpio_led mx51_efikasb_leds[] = {
        },
 };
 
-static struct gpio_led_platform_data mx51_efikasb_leds_data = {
+static const struct gpio_led_platform_data
+               mx51_efikasb_leds_data __initconst = {
        .leds = mx51_efikasb_leds,
        .num_leds = ARRAY_SIZE(mx51_efikasb_leds),
 };
 
-static struct platform_device mx51_efikasb_leds_device = {
-       .name = "leds-gpio",
-       .id = -1,
-       .dev = {
-               .platform_data = &mx51_efikasb_leds_data,
-       },
-};
-
 static struct gpio_keys_button mx51_efikasb_keys[] = {
        {
                .code = KEY_POWER,
@@ -258,9 +251,8 @@ static void __init efikasb_board_init(void)
        mx51_efikasb_usb();
        imx51_add_sdhci_esdhc_imx(1, NULL);
 
-       platform_device_register(&mx51_efikasb_leds_device);
+       gpio_led_register_device(-1, &mx51_efikasb_leds_data);
        imx_add_gpio_keys(&mx51_efikasb_keys_data);
-
 }
 
 static void __init mx51_efikasb_timer_init(void)
index cd79e3435e2835424a26f0fc49a979d5f9e298b0..0adeea17d123c1ddf44a5525d2b33f58128d908d 100644 (file)
@@ -1274,9 +1274,9 @@ DEFINE_CLOCK(pwm2_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG8_OFFSET,
 
 /* I2C */
 DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET,
-       NULL, NULL, &ipg_clk, NULL);
+       NULL, NULL, &ipg_perclk, NULL);
 DEFINE_CLOCK(i2c2_clk, 1, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG10_OFFSET,
-       NULL, NULL, &ipg_clk, NULL);
+       NULL, NULL, &ipg_perclk, NULL);
 DEFINE_CLOCK(hsi2c_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG11_OFFSET,
        NULL, NULL, &ipg_clk, NULL);
 
index 97292d20f1f39353fe63bdda41088ac9ff5fce94..bbf4564bd05076d7ead9dc6211fc2ccf90b72ca0 100644 (file)
 #include "devices.h"
 
 #define MBIMX51_TSC2007_GPIO   IMX_GPIO_NR(3, 30)
-#define MBIMX51_TSC2007_IRQ    (MXC_INTERNAL_IRQS + MBIMX51_TSC2007_GPIO)
 #define MBIMX51_LED0           IMX_GPIO_NR(3, 5)
 #define MBIMX51_LED1           IMX_GPIO_NR(3, 6)
 #define MBIMX51_LED2           IMX_GPIO_NR(3, 7)
 #define MBIMX51_LED3           IMX_GPIO_NR(3, 8)
 
-static struct gpio_led mbimx51_leds[] = {
+static const struct gpio_led mbimx51_leds[] __initconst = {
        {
                .name                   = "led0",
                .default_trigger        = "heartbeat",
@@ -64,23 +63,11 @@ static struct gpio_led mbimx51_leds[] = {
        },
 };
 
-static struct gpio_led_platform_data mbimx51_leds_info = {
+static const struct gpio_led_platform_data mbimx51_leds_info __initconst = {
        .leds           = mbimx51_leds,
        .num_leds       = ARRAY_SIZE(mbimx51_leds),
 };
 
-static struct platform_device mbimx51_leds_gpio = {
-       .name   = "leds-gpio",
-       .id     = -1,
-       .dev    = {
-               .platform_data  = &mbimx51_leds_info,
-       },
-};
-
-static struct platform_device *devices[] __initdata = {
-       &mbimx51_leds_gpio,
-};
-
 static iomux_v3_cfg_t mbimx51_pads[] = {
        /* UART2 */
        MX51_PAD_UART2_RXD__UART2_RXD,
@@ -173,7 +160,7 @@ struct tsc2007_platform_data tsc2007_data = {
 static struct i2c_board_info mbimx51_i2c_devices[] = {
        {
                I2C_BOARD_INFO("tsc2007", 0x49),
-               .irq  = MBIMX51_TSC2007_IRQ,
+               .irq  = gpio_to_irq(MBIMX51_TSC2007_GPIO),
                .platform_data = &tsc2007_data,
        }, {
                I2C_BOARD_INFO("tlv320aic23", 0x1a),
@@ -204,13 +191,14 @@ void __init eukrea_mbimx51_baseboard_init(void)
        gpio_direction_output(MBIMX51_LED3, 1);
        gpio_free(MBIMX51_LED3);
 
-       platform_add_devices(devices, ARRAY_SIZE(devices));
+       gpio_led_register_device(-1, &mbimx51_leds_info);
 
        imx51_add_imx_keypad(&mbimx51_map_data);
 
        gpio_request(MBIMX51_TSC2007_GPIO, "tsc2007_irq");
        gpio_direction_input(MBIMX51_TSC2007_GPIO);
-       irq_set_irq_type(MBIMX51_TSC2007_IRQ, IRQF_TRIGGER_FALLING);
+       irq_set_irq_type(gpio_to_irq(MBIMX51_TSC2007_GPIO),
+                                       IRQF_TRIGGER_FALLING);
        i2c_register_board_info(1, mbimx51_i2c_devices,
                                ARRAY_SIZE(mbimx51_i2c_devices));
 
index 31c871ec46a6f9cc060d8a24c72df591f0277dbd..261923997643b0c17091840593ab9d8d6e0599dd 100644 (file)
@@ -74,7 +74,7 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {
 #define GPIO_LED1      IMX_GPIO_NR(3, 30)
 #define GPIO_SWITCH1   IMX_GPIO_NR(3, 31)
 
-static struct gpio_led eukrea_mbimxsd_leds[] = {
+static const struct gpio_led eukrea_mbimxsd_leds[] __initconst = {
        {
                .name                   = "led1",
                .default_trigger        = "heartbeat",
@@ -83,19 +83,12 @@ static struct gpio_led eukrea_mbimxsd_leds[] = {
        },
 };
 
-static struct gpio_led_platform_data eukrea_mbimxsd_led_info = {
+static const struct gpio_led_platform_data
+               eukrea_mbimxsd_led_info __initconst = {
        .leds           = eukrea_mbimxsd_leds,
        .num_leds       = ARRAY_SIZE(eukrea_mbimxsd_leds),
 };
 
-static struct platform_device eukrea_mbimxsd_leds_gpio = {
-       .name   = "leds-gpio",
-       .id     = -1,
-       .dev    = {
-               .platform_data  = &eukrea_mbimxsd_led_info,
-       },
-};
-
 static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = {
        {
                .gpio           = GPIO_SWITCH1,
@@ -112,10 +105,6 @@ static const struct gpio_keys_platform_data
        .nbuttons       = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons),
 };
 
-static struct platform_device *platform_devices[] __initdata = {
-       &eukrea_mbimxsd_leds_gpio,
-};
-
 static const struct imxuart_platform_data uart_pdata __initconst = {
        .flags = IMXUART_HAVE_RTSCTS,
 };
@@ -154,6 +143,6 @@ void __init eukrea_mbimxsd51_baseboard_init(void)
        i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices,
                                ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));
 
-       platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
+       gpio_led_register_device(-1, &eukrea_mbimxsd_led_info);
        imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
 }
index f114960622e05079a1b2f9ddaaffbbd7b6c30fc5..162b0b0bc356fa83d944aed3b10ff720028a5691 100644 (file)
@@ -55,6 +55,7 @@ config MACH_MX28EVK
 config MODULE_TX28
        bool
        select SOC_IMX28
+       select LEDS_GPIO_REGISTER
        select MXS_HAVE_AMBA_DUART
        select MXS_HAVE_PLATFORM_AUART
        select MXS_HAVE_PLATFORM_FEC
index bf72c9b8dbdd19736b1f9090eafc479b0052bfdb..5a75b7180f74b616939b30c0aeeaa7c3f987f847 100644 (file)
@@ -5,6 +5,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  */
+#include <linux/dma-mapping.h>
 #include <asm/sizes.h>
 #include <mach/mx23.h>
 #include <mach/mx28.h>
index 7f4aeeaba8df2d74ae32f5e5a40a2278b37b9e45..203d7c4a3e1142e67979a74f6711040d83cbd5a6 100644 (file)
@@ -9,6 +9,8 @@
 #ifndef __MACH_MXS_DMA_H__
 #define __MACH_MXS_DMA_H__
 
+#include <linux/dmaengine.h>
+
 struct mxs_dma_data {
        int chan_irq;
 };
index b65e3719cbc4ae1cf43fe40ba253b581eb121d85..6766a12cca7ffcc186337b885641fac054eb14f6 100644 (file)
@@ -101,14 +101,6 @@ static const iomux_cfg_t tx28_stk5v3_pads[] __initconst = {
                (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
        MX28_PAD_SSP0_DATA3__SSP0_D3 |
                (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
-       MX28_PAD_SSP0_DATA4__SSP0_D4 |
-               (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
-       MX28_PAD_SSP0_DATA5__SSP0_D5 |
-               (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
-       MX28_PAD_SSP0_DATA6__SSP0_D6 |
-               (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
-       MX28_PAD_SSP0_DATA7__SSP0_D7 |
-               (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
        MX28_PAD_SSP0_CMD__SSP0_CMD |
                (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
        MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT |
@@ -117,7 +109,7 @@ static const iomux_cfg_t tx28_stk5v3_pads[] __initconst = {
                (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
 };
 
-static struct gpio_led tx28_stk5v3_leds[] = {
+static const struct gpio_led tx28_stk5v3_leds[] __initconst = {
        {
                .name = "GPIO-LED",
                .default_trigger = "heartbeat",
@@ -159,8 +151,7 @@ static void __init tx28_stk5v3_init(void)
        /* spi via ssp will be added when available */
        spi_register_board_info(tx28_spi_board_info,
                        ARRAY_SIZE(tx28_spi_board_info));
-       mxs_add_platform_device("leds-gpio", 0, NULL, 0,
-                       &tx28_stk5v3_led_data, sizeof(tx28_stk5v3_led_data));
+       gpio_led_register_device(0, &tx28_stk5v3_led_data);
        mx28_add_mxs_i2c(0);
        i2c_register_board_info(0, tx28_stk5v3_i2c_boardinfo,
                        ARRAY_SIZE(tx28_stk5v3_i2c_boardinfo));
index 98a21b81dec07039f89f9d6e2235aeef1701ee5e..7d11a5f07696c450366a228441ccdce86c148d20 100644 (file)
@@ -18,6 +18,6 @@
 #ifndef __ASM_ARCH_VMALLOC_H
 #define __ASM_ARCH_VMALLOC_H
 
-#define VMALLOC_END      (0xE0000000)
+#define VMALLOC_END      0xE0000000UL
 
 #endif /* __ASM_ARCH_VMALLOC_H */
index f49ce85d2448eab2a65b8875045504d5b9c44d98..312ea6b0409dcd5e93464e3fef1fe4334d63ddfe 100644 (file)
@@ -138,7 +138,7 @@ void ams_delta_latch2_write(u16 mask, u16 value)
 static void __init ams_delta_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static struct map_desc ams_delta_io_desc[] __initdata = {
@@ -391,7 +391,7 @@ MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)")
        .reserve        = omap_reserve,
        .init_irq       = ams_delta_init_irq,
        .init_machine   = ams_delta_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
 
 EXPORT_SYMBOL(ams_delta_latch1_write);
index 87f173d935578752cf60ec112800dbb1dd1d5e78..a6b1bea50371e7144492af17f4d9163116d1ac0d 100644 (file)
@@ -329,7 +329,7 @@ static void __init omap_fsample_init(void)
 static void __init omap_fsample_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 /* Only FPGA needs to be mapped here. All others are done with ioremap */
@@ -394,5 +394,5 @@ MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample")
        .reserve        = omap_reserve,
        .init_irq       = omap_fsample_init_irq,
        .init_machine   = omap_fsample_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 23f4ab9e265128bcc9ee0846b56789e2beadade4..04fc356c40fa9c0fd8ea8f7c69b4afa64852716e 100644 (file)
@@ -31,7 +31,7 @@
 static void __init omap_generic_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 /* assume no Mini-AB port */
@@ -99,5 +99,5 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")
        .reserve        = omap_reserve,
        .init_irq       = omap_generic_init_irq,
        .init_machine   = omap_generic_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index ba3bd09c4754562add074e2dec4864ce4acd8e14..cb7fb1aa3dca5e832374971add929ec1fdd49845 100644 (file)
@@ -376,7 +376,7 @@ static struct i2c_board_info __initdata h2_i2c_board_info[] = {
 static void __init h2_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static struct omap_usb_config h2_usb_config __initdata = {
@@ -466,5 +466,5 @@ MACHINE_START(OMAP_H2, "TI-H2")
        .reserve        = omap_reserve,
        .init_irq       = h2_init_irq,
        .init_machine   = h2_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index ac48677672ee6bcc990ce25487a373e4e4928850..31f34875ffad370fc1da66e3d930731687185200 100644 (file)
@@ -439,7 +439,7 @@ static void __init h3_init(void)
 static void __init h3_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static void __init h3_map_io(void)
@@ -454,5 +454,5 @@ MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
        .reserve        = omap_reserve,
        .init_irq       = h3_init_irq,
        .init_machine   = h3_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index ba05a51f9408dfe308f66e0cb36a717c3101a745..36e06ea7ec65c728e927cbdf27f07085c67d40fc 100644 (file)
@@ -605,7 +605,7 @@ static void __init htcherald_init_irq(void)
 {
        printk(KERN_INFO "htcherald_init_irq.\n");
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 MACHINE_START(HERALD, "HTC Herald")
@@ -616,5 +616,5 @@ MACHINE_START(HERALD, "HTC Herald")
        .reserve        = omap_reserve,
        .init_irq       = htcherald_init_irq,
        .init_machine   = htcherald_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 2d9b8cbd7a142ddfc9bc12e69522ec2ed727ad8b..0b1ba462d3885824561ebb3ea0b6047b6f0efe35 100644 (file)
@@ -292,7 +292,7 @@ static void __init innovator_init_smc91x(void)
 static void __init innovator_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 #ifdef CONFIG_ARCH_OMAP15XX
@@ -464,5 +464,5 @@ MACHINE_START(OMAP_INNOVATOR, "TI-Innovator")
        .reserve        = omap_reserve,
        .init_irq       = innovator_init_irq,
        .init_machine   = innovator_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index cfd0849261468edda8039cb127c1b21538e2d5eb..5469ce247ffe913a31e7a61d82a4a94aafc59362 100644 (file)
@@ -51,7 +51,7 @@ static void __init omap_nokia770_init_irq(void)
        omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004);
 
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static const unsigned int nokia770_keymap[] = {
@@ -269,5 +269,5 @@ MACHINE_START(NOKIA770, "Nokia 770")
        .reserve        = omap_reserve,
        .init_irq       = omap_nokia770_init_irq,
        .init_machine   = omap_nokia770_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index e68dfde1918e7dd437808e49c8e7fcf93089586c..b08a213807724d6027eb304fe3296a32cfdb31a1 100644 (file)
@@ -282,7 +282,7 @@ static void __init osk_init_cf(void)
 static void __init osk_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static struct omap_usb_config osk_usb_config __initdata = {
@@ -588,5 +588,5 @@ MACHINE_START(OMAP_OSK, "TI-OSK")
        .reserve        = omap_reserve,
        .init_irq       = osk_init_irq,
        .init_machine   = osk_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index c9d38f47845f1801e89d08f691ddff670bc333be..459cb6bfed55aa36e3e2dd8a6cdccf53ee355fb7 100644 (file)
@@ -62,7 +62,7 @@
 static void __init omap_palmte_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static const unsigned int palmte_keymap[] = {
@@ -280,5 +280,5 @@ MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
        .reserve        = omap_reserve,
        .init_irq       = omap_palmte_init_irq,
        .init_machine   = omap_palmte_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index f04f2d36e7d3471d8425d2c9f0c7463a0dfeb044..b214f45f646c558dcf18b65c0483dafed2940df6 100644 (file)
@@ -266,7 +266,7 @@ static struct spi_board_info __initdata palmtt_boardinfo[] = {
 static void __init omap_palmtt_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static struct omap_usb_config palmtt_usb_config __initdata = {
@@ -326,5 +326,5 @@ MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T")
        .reserve        = omap_reserve,
        .init_irq       = omap_palmtt_init_irq,
        .init_machine   = omap_palmtt_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 45f01d2c3a7a0c812c06d134cbd829f2277f11d6..9b0ea48d35fd873b2c981e78466de4195319281a 100644 (file)
@@ -61,7 +61,7 @@ static void __init
 omap_palmz71_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static const unsigned int palmz71_keymap[] = {
@@ -346,5 +346,5 @@ MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71")
        .reserve        = omap_reserve,
        .init_irq       = omap_palmz71_init_irq,
        .init_machine   = omap_palmz71_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 3c8ee8489458fc3456697e402b3fffa33aa8aba2..67acd4142639a56a88cbe6a9601b45a06652b099 100644 (file)
@@ -297,7 +297,7 @@ static void __init omap_perseus2_init(void)
 static void __init omap_perseus2_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 /* Only FPGA needs to be mapped here. All others are done with ioremap */
 static struct map_desc omap_perseus2_io_desc[] __initdata = {
@@ -355,5 +355,5 @@ MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2")
        .reserve        = omap_reserve,
        .init_irq       = omap_perseus2_init_irq,
        .init_machine   = omap_perseus2_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 0ad781db4e66d0bb0a2581323e6ec761ca0b6db8..9c3b7c52d9cf60b4ed0b1ec45b62eaba08f8c668 100644 (file)
@@ -411,7 +411,7 @@ static void __init omap_sx1_init(void)
 static void __init omap_sx1_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 /*----------------------------------------*/
 
@@ -426,5 +426,5 @@ MACHINE_START(SX1, "OMAP310 based Siemens SX1")
        .reserve        = omap_reserve,
        .init_irq       = omap_sx1_init_irq,
        .init_machine   = omap_sx1_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 65d24204937a9da268fb333bfda122448cc050ad..036edc0ee9b6e8d41f74f0eb16023f9caafeee8d 100644 (file)
@@ -162,7 +162,7 @@ static struct omap_board_config_kernel voiceblue_config[] = {
 static void __init voiceblue_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static void __init voiceblue_map_io(void)
@@ -306,5 +306,5 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
        .reserve        = omap_reserve,
        .init_irq       = voiceblue_init_irq,
        .init_machine   = voiceblue_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 5d3da7a63af308496fc11dde8e15b5a2dd152e42..e2b9c901ab67c4d07a274e34def39bb5ace47644 100644 (file)
@@ -175,7 +175,7 @@ static struct irq_chip omap_irq_chip = {
        .irq_set_wake   = omap_wake_irq,
 };
 
-void __init omap_init_irq(void)
+void __init omap1_init_irq(void)
 {
        int i, j;
 
index d9af9811dedd9ff36e3b02f8215b79237acfc961..ab7395d84bc856424e9ffcfad9ccd1233bc772e0 100644 (file)
@@ -38,7 +38,7 @@ static void omap1_mcbsp_request(unsigned int id)
         * On 1510, 1610 and 1710, McBSP1 and McBSP3
         * are DSP public peripherals.
         */
-       if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) {
+       if (id == 0 || id == 2) {
                if (dsp_use++ == 0) {
                        api_clk = clk_get(NULL, "api_ck");
                        dsp_clk = clk_get(NULL, "dsp_ck");
@@ -59,7 +59,7 @@ static void omap1_mcbsp_request(unsigned int id)
 
 static void omap1_mcbsp_free(unsigned int id)
 {
-       if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) {
+       if (id == 0 || id == 2) {
                if (--dsp_use == 0) {
                        if (!IS_ERR(api_clk)) {
                                clk_disable(api_clk);
index 03e1e1062ad4d782419ce3dd3d3489fad9eb55cd..a1837771e031bdd3836e054bf549f85af21a1640 100644 (file)
@@ -297,7 +297,7 @@ static inline int omap_32k_timer_usable(void)
  * Timer initialization
  * ---------------------------------------------------------------------------
  */
-static void __init omap_timer_init(void)
+static void __init omap1_timer_init(void)
 {
        if (omap_32k_timer_usable()) {
                preferred_sched_clock_init(1);
@@ -307,6 +307,6 @@ static void __init omap_timer_init(void)
        }
 }
 
-struct sys_timer omap_timer = {
-       .init           = omap_timer_init,
+struct sys_timer omap1_timer = {
+       .init           = omap1_timer_init,
 };
index 13d7b8f145bd3979f5ffeb08cf1e28652a512fce..96604a50c4fe54302f29c3b9872a7ff265bb0797 100644 (file)
@@ -183,10 +183,6 @@ static __init void omap_init_32k_timer(void)
 bool __init omap_32k_timer_init(void)
 {
        omap_init_clocksource_32k();
-
-#ifdef CONFIG_OMAP_DM_TIMER
-       omap_dm_timer_init();
-#endif
        omap_init_32k_timer();
 
        return true;
index b14807794401243fac61205cfcafdb925398dfbd..f34336560437655dfd24db7a52aa26983f8d2b6b 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 # Common support
-obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o pm.o \
+obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \
         common.o gpio.o dma.o wd_timer.o
 
 omap-2-3-common                                = irq.o sdrc.o
@@ -145,9 +145,19 @@ obj-$(CONFIG_SOC_OMAP2420)         += opp2420_data.o
 obj-$(CONFIG_SOC_OMAP2430)             += opp2430_data.o
 
 # hwmod data
-obj-$(CONFIG_SOC_OMAP2420)             += omap_hwmod_2420_data.o
-obj-$(CONFIG_SOC_OMAP2430)             += omap_hwmod_2430_data.o
-obj-$(CONFIG_ARCH_OMAP3)               += omap_hwmod_3xxx_data.o
+obj-$(CONFIG_SOC_OMAP2420)             += omap_hwmod_2xxx_ipblock_data.o \
+                                          omap_hwmod_2xxx_3xxx_ipblock_data.o \
+                                          omap_hwmod_2xxx_interconnect_data.o \
+                                          omap_hwmod_2xxx_3xxx_interconnect_data.o \
+                                          omap_hwmod_2420_data.o
+obj-$(CONFIG_SOC_OMAP2430)             += omap_hwmod_2xxx_ipblock_data.o \
+                                          omap_hwmod_2xxx_3xxx_ipblock_data.o \
+                                          omap_hwmod_2xxx_interconnect_data.o \
+                                          omap_hwmod_2xxx_3xxx_interconnect_data.o \
+                                          omap_hwmod_2430_data.o
+obj-$(CONFIG_ARCH_OMAP3)               += omap_hwmod_2xxx_3xxx_ipblock_data.o \
+                                          omap_hwmod_2xxx_3xxx_interconnect_data.o \
+                                          omap_hwmod_3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP4)               += omap_hwmod_44xx_data.o
 
 # EMU peripherals
@@ -269,4 +279,4 @@ obj-$(CONFIG_ARCH_OMAP4)            += hwspinlock.o
 disp-$(CONFIG_OMAP2_DSS)               := display.o
 obj-y                                  += $(disp-m) $(disp-y)
 
-obj-y                                  += common-board-devices.o
+obj-y                                  += common-board-devices.o twl-common.o
index 5de6eac0a72520a8b37e7a9d5cde73c3de40b1c5..2028464cf5b90596392a18eabe16a402929554ca 100644 (file)
@@ -260,7 +260,7 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
        .reserve        = omap_reserve,
        .map_io         = omap_2430sdp_map_io,
        .init_early     = omap_2430sdp_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap2_init_irq,
        .init_machine   = omap_2430sdp_init,
-       .timer          = &omap_timer,
+       .timer          = &omap2_timer,
 MACHINE_END
index 5dac974be6256bd4a22a4fc570142d56bee90efa..bd600cfb7f80cf1041faa89c76af1ea023e9a4ad 100644 (file)
@@ -231,22 +231,6 @@ static void __init omap_3430sdp_init_early(void)
        omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL);
 }
 
-static int sdp3430_batt_table[] = {
-/* 0 C*/
-30800, 29500, 28300, 27100,
-26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
-17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
-11600, 11200, 10800, 10400, 10000, 9630,   9280,   8950,   8620,   8310,
-8020,   7730,   7460,   7200,   6950,   6710,   6470,   6250,   6040,   5830,
-5640,   5450,   5260,   5090,   4920,   4760,   4600,   4450,   4310,   4170,
-4040,   3910,   3790,   3670,   3550
-};
-
-static struct twl4030_bci_platform_data sdp3430_bci_data = {
-       .battery_tmp_tbl        = sdp3430_batt_table,
-       .tblsize                = ARRAY_SIZE(sdp3430_batt_table),
-};
-
 static struct omap2_hsmmc_info mmc[] = {
        {
                .mmc            = 1,
@@ -292,14 +276,6 @@ static struct twl4030_gpio_platform_data sdp3430_gpio_data = {
        .setup          = sdp3430_twl_gpio_setup,
 };
 
-static struct twl4030_usb_data sdp3430_usb_data = {
-       .usb_mode       = T2_USB_MODE_ULPI,
-};
-
-static struct twl4030_madc_platform_data sdp3430_madc_data = {
-       .irq_line       = 1,
-};
-
 /* regulator consumer mappings */
 
 /* ads7846 on SPI */
@@ -307,16 +283,6 @@ static struct regulator_consumer_supply sdp3430_vaux3_supplies[] = {
        REGULATOR_SUPPLY("vcc", "spi1.0"),
 };
 
-static struct regulator_consumer_supply sdp3430_vdda_dac_supplies[] = {
-       REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
-};
-
-/* VPLL2 for digital video outputs */
-static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {
-       REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
-       REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
-};
-
 static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = {
        REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 };
@@ -433,54 +399,10 @@ static struct regulator_init_data sdp3430_vsim = {
        .consumer_supplies      = sdp3430_vsim_supplies,
 };
 
-/* VDAC for DSS driving S-Video */
-static struct regulator_init_data sdp3430_vdac = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(sdp3430_vdda_dac_supplies),
-       .consumer_supplies      = sdp3430_vdda_dac_supplies,
-};
-
-static struct regulator_init_data sdp3430_vpll2 = {
-       .constraints = {
-               .name                   = "VDVI",
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(sdp3430_vpll2_supplies),
-       .consumer_supplies      = sdp3430_vpll2_supplies,
-};
-
-static struct twl4030_codec_audio_data sdp3430_audio;
-
-static struct twl4030_codec_data sdp3430_codec = {
-       .audio_mclk = 26000000,
-       .audio = &sdp3430_audio,
-};
-
 static struct twl4030_platform_data sdp3430_twldata = {
-       .irq_base       = TWL4030_IRQ_BASE,
-       .irq_end        = TWL4030_IRQ_END,
-
        /* platform_data for children goes here */
-       .bci            = &sdp3430_bci_data,
        .gpio           = &sdp3430_gpio_data,
-       .madc           = &sdp3430_madc_data,
        .keypad         = &sdp3430_kp_data,
-       .usb            = &sdp3430_usb_data,
-       .codec          = &sdp3430_codec,
 
        .vaux1          = &sdp3430_vaux1,
        .vaux2          = &sdp3430_vaux2,
@@ -489,14 +411,21 @@ static struct twl4030_platform_data sdp3430_twldata = {
        .vmmc1          = &sdp3430_vmmc1,
        .vmmc2          = &sdp3430_vmmc2,
        .vsim           = &sdp3430_vsim,
-       .vdac           = &sdp3430_vdac,
-       .vpll2          = &sdp3430_vpll2,
 };
 
 static int __init omap3430_i2c_init(void)
 {
        /* i2c1 for PMIC only */
+       omap3_pmic_get_config(&sdp3430_twldata,
+                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
+                       TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO,
+                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
+       sdp3430_twldata.vdac->constraints.apply_uV = true;
+       sdp3430_twldata.vpll2->constraints.apply_uV = true;
+       sdp3430_twldata.vpll2->constraints.name = "VDVI";
+
        omap3_pmic_init("twl4030", &sdp3430_twldata);
+
        /* i2c2 on camera connector (for sensor control) and optional isp1301 */
        omap_register_i2c_bus(2, 400, NULL, 0);
        /* i2c3 on display connector (for DVI, tfp410) */
@@ -804,7 +733,7 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap_3430sdp_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap_3430sdp_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index a5933cc15caaff8fd6e0f90e4e3853fcf93a3e25..e4f37b57a0c4686f836b7ca1c8465b9739c896e2 100644 (file)
@@ -219,7 +219,7 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap_sdp_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap_sdp_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 63de2d396e2dddf84eaec2b6035aad64aba49385..933b25bb10de14458758665c3c07e00e46d13164 100644 (file)
@@ -40,7 +40,6 @@
 
 #include "mux.h"
 #include "hsmmc.h"
-#include "timer-gp.h"
 #include "control.h"
 #include "common-board-devices.h"
 
@@ -295,9 +294,6 @@ static void __init omap_4430sdp_init_early(void)
 {
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
-#ifdef CONFIG_OMAP_32K_TIMER
-       omap2_gp_clockevent_set_gptimer(1);
-#endif
 }
 
 static struct omap_musb_board_data musb_board_data = {
@@ -306,14 +302,6 @@ static struct omap_musb_board_data musb_board_data = {
        .power                  = 100,
 };
 
-static struct twl4030_usb_data omap4_usbphy_data = {
-       .phy_init       = omap4430_phy_init,
-       .phy_exit       = omap4430_phy_exit,
-       .phy_power      = omap4430_phy_power,
-       .phy_set_clock  = omap4430_phy_set_clk,
-       .phy_suspend    = omap4430_phy_suspend,
-};
-
 static struct omap2_hsmmc_info mmc[] = {
        {
                .mmc            = 2,
@@ -333,16 +321,7 @@ static struct omap2_hsmmc_info mmc[] = {
 };
 
 static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
-       {
-               .supply = "vmmc",
-               .dev_name = "omap_hsmmc.1",
-       },
-};
-static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
-       {
-               .supply = "vmmc",
-               .dev_name = "omap_hsmmc.0",
-       },
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
 };
 
 static int omap4_twl6030_hsmmc_late_init(struct device *dev)
@@ -399,65 +378,10 @@ static struct regulator_init_data sdp4430_vaux1 = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
+       .num_consumer_supplies  = ARRAY_SIZE(sdp4430_vaux_supply),
        .consumer_supplies      = sdp4430_vaux_supply,
 };
 
-static struct regulator_init_data sdp4430_vaux2 = {
-       .constraints = {
-               .min_uV                 = 1200000,
-               .max_uV                 = 2800000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct regulator_init_data sdp4430_vaux3 = {
-       .constraints = {
-               .min_uV                 = 1000000,
-               .max_uV                 = 3000000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-/* VMMC1 for MMC1 card */
-static struct regulator_init_data sdp4430_vmmc = {
-       .constraints = {
-               .min_uV                 = 1200000,
-               .max_uV                 = 3000000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = sdp4430_vmmc_supply,
-};
-
-static struct regulator_init_data sdp4430_vpp = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 2500000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
 static struct regulator_init_data sdp4430_vusim = {
        .constraints = {
                .min_uV                 = 1200000,
@@ -471,74 +395,10 @@ static struct regulator_init_data sdp4430_vusim = {
        },
 };
 
-static struct regulator_init_data sdp4430_vana = {
-       .constraints = {
-               .min_uV                 = 2100000,
-               .max_uV                 = 2100000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct regulator_init_data sdp4430_vcxio = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct regulator_init_data sdp4430_vdac = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct regulator_init_data sdp4430_vusb = {
-       .constraints = {
-               .min_uV                 = 3300000,
-               .max_uV                 = 3300000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  =      REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct regulator_init_data sdp4430_clk32kg = {
-       .constraints = {
-               .valid_ops_mask         = REGULATOR_CHANGE_STATUS,
-       },
-};
-
 static struct twl4030_platform_data sdp4430_twldata = {
-       .irq_base       = TWL6030_IRQ_BASE,
-       .irq_end        = TWL6030_IRQ_END,
-
        /* Regulators */
-       .vmmc           = &sdp4430_vmmc,
-       .vpp            = &sdp4430_vpp,
        .vusim          = &sdp4430_vusim,
-       .vana           = &sdp4430_vana,
-       .vcxio          = &sdp4430_vcxio,
-       .vdac           = &sdp4430_vdac,
-       .vusb           = &sdp4430_vusb,
        .vaux1          = &sdp4430_vaux1,
-       .vaux2          = &sdp4430_vaux2,
-       .vaux3          = &sdp4430_vaux3,
-       .clk32kg        = &sdp4430_clk32kg,
-       .usb            = &omap4_usbphy_data
 };
 
 static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = {
@@ -556,6 +416,16 @@ static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = {
 };
 static int __init omap4_i2c_init(void)
 {
+       omap4_pmic_get_config(&sdp4430_twldata, TWL_COMMON_PDATA_USB,
+                       TWL_COMMON_REGULATOR_VDAC |
+                       TWL_COMMON_REGULATOR_VAUX2 |
+                       TWL_COMMON_REGULATOR_VAUX3 |
+                       TWL_COMMON_REGULATOR_VMMC |
+                       TWL_COMMON_REGULATOR_VPP |
+                       TWL_COMMON_REGULATOR_VANA |
+                       TWL_COMMON_REGULATOR_VCXIO |
+                       TWL_COMMON_REGULATOR_VUSB |
+                       TWL_COMMON_REGULATOR_CLK32KG);
        omap4_pmic_init("twl6030", &sdp4430_twldata);
        omap_register_i2c_bus(2, 400, NULL, 0);
        omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
@@ -773,5 +643,5 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
        .init_early     = omap_4430sdp_init_early,
        .init_irq       = gic_init_irq,
        .init_machine   = omap_4430sdp_init,
-       .timer          = &omap_timer,
+       .timer          = &omap4_timer,
 MACHINE_END
index 5e438a77cd726f35e5df2ea43df0788f8e34d16b..5f2b55ff04ff5975dc56bdf991e0a560782b63a7 100644 (file)
@@ -104,7 +104,7 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = am3517_crane_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = am3517_crane_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 63af4171c0436d85c3d7ea35d6a21679380414fa..f3006c304150446c6fdedafabae77bf0c8381e89 100644 (file)
@@ -494,7 +494,7 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = am3517_evm_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = am3517_evm_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index b124bdfb4239ebfcf42c8ca5ab011322cdec3182..70211703ff9f3b7a0334930737d56f6b5b39acfa 100644 (file)
@@ -354,7 +354,7 @@ MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
        .reserve        = omap_reserve,
        .map_io         = omap_apollon_map_io,
        .init_early     = omap_apollon_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap2_init_irq,
        .init_machine   = omap_apollon_init,
-       .timer          = &omap_timer,
+       .timer          = &omap2_timer,
 MACHINE_END
index 77456dec93ea9640c60a7b48f7dcf3db4b68e568..35891d49c631991ac5e69ac995507b1e08b25624 100644 (file)
@@ -162,9 +162,7 @@ static struct mtd_partition cm_t35_nand_partitions[] = {
 static struct omap_nand_platform_data cm_t35_nand_data = {
        .parts                  = cm_t35_nand_partitions,
        .nr_parts               = ARRAY_SIZE(cm_t35_nand_partitions),
-       .dma_channel            = -1,   /* disable DMA in OMAP NAND driver */
        .cs                     = 0,
-
 };
 
 static void __init cm_t35_init_nand(void)
@@ -337,19 +335,17 @@ static void __init cm_t35_init_display(void)
        }
 }
 
-static struct regulator_consumer_supply cm_t35_vmmc1_supply = {
-       .supply                 = "vmmc",
+static struct regulator_consumer_supply cm_t35_vmmc1_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 };
 
-static struct regulator_consumer_supply cm_t35_vsim_supply = {
-       .supply                 = "vmmc_aux",
+static struct regulator_consumer_supply cm_t35_vsim_supply[] = {
+       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
 };
 
-static struct regulator_consumer_supply cm_t35_vdac_supply =
-       REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
-
-static struct regulator_consumer_supply cm_t35_vdvi_supply =
-       REGULATOR_SUPPLY("vdvi", "omapdss");
+static struct regulator_consumer_supply cm_t35_vdvi_supply[] = {
+       REGULATOR_SUPPLY("vdvi", "omapdss"),
+};
 
 /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
 static struct regulator_init_data cm_t35_vmmc1 = {
@@ -362,8 +358,8 @@ static struct regulator_init_data cm_t35_vmmc1 = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &cm_t35_vmmc1_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(cm_t35_vmmc1_supply),
+       .consumer_supplies      = cm_t35_vmmc1_supply,
 };
 
 /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -377,41 +373,8 @@ static struct regulator_init_data cm_t35_vsim = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &cm_t35_vsim_supply,
-};
-
-/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
-static struct regulator_init_data cm_t35_vdac = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &cm_t35_vdac_supply,
-};
-
-/* VPLL2 for digital video outputs */
-static struct regulator_init_data cm_t35_vpll2 = {
-       .constraints = {
-               .name                   = "VDVI",
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &cm_t35_vdvi_supply,
-};
-
-static struct twl4030_usb_data cm_t35_usb_data = {
-       .usb_mode       = T2_USB_MODE_ULPI,
+       .num_consumer_supplies  = ARRAY_SIZE(cm_t35_vsim_supply),
+       .consumer_supplies      = cm_t35_vsim_supply,
 };
 
 static uint32_t cm_t35_keymap[] = {
@@ -481,10 +444,6 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
        mmc[0].gpio_cd = gpio + 0;
        omap2_hsmmc_init(mmc);
 
-       /* link regulators to MMC adapters */
-       cm_t35_vmmc1_supply.dev = mmc[0].dev;
-       cm_t35_vsim_supply.dev = mmc[0].dev;
-
        return 0;
 }
 
@@ -496,21 +455,23 @@ static struct twl4030_gpio_platform_data cm_t35_gpio_data = {
 };
 
 static struct twl4030_platform_data cm_t35_twldata = {
-       .irq_base       = TWL4030_IRQ_BASE,
-       .irq_end        = TWL4030_IRQ_END,
-
        /* platform_data for children goes here */
        .keypad         = &cm_t35_kp_data,
-       .usb            = &cm_t35_usb_data,
        .gpio           = &cm_t35_gpio_data,
        .vmmc1          = &cm_t35_vmmc1,
        .vsim           = &cm_t35_vsim,
-       .vdac           = &cm_t35_vdac,
-       .vpll2          = &cm_t35_vpll2,
 };
 
 static void __init cm_t35_init_i2c(void)
 {
+       omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB,
+                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
+
+       cm_t35_twldata.vpll2->constraints.name = "VDVI";
+       cm_t35_twldata.vpll2->num_consumer_supplies =
+                                               ARRAY_SIZE(cm_t35_vdvi_supply);
+       cm_t35_twldata.vpll2->consumer_supplies = cm_t35_vdvi_supply;
+
        omap3_pmic_init("tps65930", &cm_t35_twldata);
 }
 
@@ -646,7 +607,7 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = cm_t35_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = cm_t35_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index c3a9fd35034a3b40ad33df50e2573c7f5a000cbb..05c72f4c1b57c49ed56200a39ea2b7dfaf1ba071 100644 (file)
@@ -236,7 +236,6 @@ static struct mtd_partition cm_t3517_nand_partitions[] = {
 static struct omap_nand_platform_data cm_t3517_nand_data = {
        .parts                  = cm_t3517_nand_partitions,
        .nr_parts               = ARRAY_SIZE(cm_t3517_nand_partitions),
-       .dma_channel            = -1,   /* disable DMA in OMAP NAND driver */
        .cs                     = 0,
 };
 
@@ -304,7 +303,7 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = cm_t3517_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = cm_t3517_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 34956ec832960f1e215241f196ef2d89b3006d91..b6002ec31c6aec28930765d1fe04e609cb75decd 100644 (file)
@@ -58,7 +58,6 @@
 
 #include "mux.h"
 #include "hsmmc.h"
-#include "timer-gp.h"
 #include "common-board-devices.h"
 
 #define OMAP_DM9000_GPIO_IRQ   25
@@ -130,13 +129,14 @@ static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev)
                gpio_set_value_cansleep(dssdev->reset_gpio, 0);
 }
 
-static struct regulator_consumer_supply devkit8000_vmmc1_supply =
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
-
+static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
+};
 
 /* ads7846 on SPI */
-static struct regulator_consumer_supply devkit8000_vio_supply =
-       REGULATOR_SUPPLY("vcc", "spi2.0");
+static struct regulator_consumer_supply devkit8000_vio_supply[] = {
+       REGULATOR_SUPPLY("vcc", "spi2.0"),
+};
 
 static struct panel_generic_dpi_data lcd_panel = {
        .name                   = "generic",
@@ -186,9 +186,6 @@ static struct omap_dss_board_info devkit8000_dss_data = {
        .default_device = &devkit8000_lcd_device,
 };
 
-static struct regulator_consumer_supply devkit8000_vdda_dac_supply =
-       REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
-
 static uint32_t board_keymap[] = {
        KEY(0, 0, KEY_1),
        KEY(1, 0, KEY_2),
@@ -284,22 +281,8 @@ static struct regulator_init_data devkit8000_vmmc1 = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &devkit8000_vmmc1_supply,
-};
-
-/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
-static struct regulator_init_data devkit8000_vdac = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &devkit8000_vdda_dac_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(devkit8000_vmmc1_supply),
+       .consumer_supplies      = devkit8000_vmmc1_supply,
 };
 
 /* VPLL1 for digital video outputs */
@@ -327,31 +310,14 @@ static struct regulator_init_data devkit8000_vio = {
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &devkit8000_vio_supply,
-};
-
-static struct twl4030_usb_data devkit8000_usb_data = {
-       .usb_mode       = T2_USB_MODE_ULPI,
-};
-
-static struct twl4030_codec_audio_data devkit8000_audio_data;
-
-static struct twl4030_codec_data devkit8000_codec_data = {
-       .audio_mclk = 26000000,
-       .audio = &devkit8000_audio_data,
+       .num_consumer_supplies  = ARRAY_SIZE(devkit8000_vio_supply),
+       .consumer_supplies      = devkit8000_vio_supply,
 };
 
 static struct twl4030_platform_data devkit8000_twldata = {
-       .irq_base       = TWL4030_IRQ_BASE,
-       .irq_end        = TWL4030_IRQ_END,
-
        /* platform_data for children goes here */
-       .usb            = &devkit8000_usb_data,
        .gpio           = &devkit8000_gpio_data,
-       .codec          = &devkit8000_codec_data,
        .vmmc1          = &devkit8000_vmmc1,
-       .vdac           = &devkit8000_vdac,
        .vpll1          = &devkit8000_vpll1,
        .vio            = &devkit8000_vio,
        .keypad         = &devkit8000_kp_data,
@@ -359,6 +325,9 @@ static struct twl4030_platform_data devkit8000_twldata = {
 
 static int __init devkit8000_i2c_init(void)
 {
+       omap3_pmic_get_config(&devkit8000_twldata,
+                         TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
+                         TWL_COMMON_REGULATOR_VDAC);
        omap3_pmic_init("tps65930", &devkit8000_twldata);
        /* Bus 3 is attached to the DVI port where devices like the pico DLP
         * projector don't work reliably with 400kHz */
@@ -438,10 +407,7 @@ static void __init devkit8000_init_early(void)
 
 static void __init devkit8000_init_irq(void)
 {
-       omap_init_irq();
-#ifdef CONFIG_OMAP_32K_TIMER
-       omap2_gp_clockevent_set_gptimer(12);
-#endif
+       omap3_init_irq();
 }
 
 #define OMAP_DM9000_BASE       0x2c000000
@@ -707,5 +673,5 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
        .init_early     = devkit8000_init_early,
        .init_irq       = devkit8000_init_irq,
        .init_machine   = devkit8000_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_secure_timer,
 MACHINE_END
index 729892fdcf2e545cec8f1469bf6e01181814cc98..aa1b0cbe19d2a63ecf7ce906ffab053af6194dad 100644 (file)
@@ -132,11 +132,7 @@ static struct gpmc_timings nand_timings = {
 };
 
 static struct omap_nand_platform_data board_nand_data = {
-       .nand_setup     = NULL,
        .gpmc_t         = &nand_timings,
-       .dma_channel    = -1,           /* disable DMA in OMAP NAND driver */
-       .dev_ready      = NULL,
-       .devsize        = 0,    /* '0' for 8-bit, '1' for 16-bit device */
 };
 
 void
index 73e3c31e85080bf619862c04aae235fe35ec2618..54db41a84a9bc71b07c44b874b0c58a1fad91a1a 100644 (file)
@@ -70,7 +70,7 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
        .reserve        = omap_reserve,
        .map_io         = omap_generic_map_io,
        .init_early     = omap_generic_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap2_init_irq,
        .init_machine   = omap_generic_init,
-       .timer          = &omap_timer,
+       .timer          = &omap2_timer,
 MACHINE_END
index bac7933b8cbb79cc644a4d4b388cbac52f2da439..45de2b319ec9b631d968c5c5fe8454f640121da8 100644 (file)
@@ -298,7 +298,7 @@ static void __init omap_h4_init_early(void)
 
 static void __init omap_h4_init_irq(void)
 {
-       omap_init_irq();
+       omap2_init_irq();
 }
 
 static struct at24_platform_data m24c01 = {
@@ -388,5 +388,5 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
        .init_early     = omap_h4_init_early,
        .init_irq       = omap_h4_init_irq,
        .init_machine   = omap_h4_init,
-       .timer          = &omap_timer,
+       .timer          = &omap2_timer,
 MACHINE_END
index 0c1bfca3f731cfdd4b8a9fa7aaa0793cca01e18b..35be778caf1b5840f8f5b07b04ce198b41fa7d68 100644 (file)
@@ -222,8 +222,9 @@ static inline void __init igep2_init_smsc911x(void)
 static inline void __init igep2_init_smsc911x(void) { }
 #endif
 
-static struct regulator_consumer_supply igep_vmmc1_supply =
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
+static struct regulator_consumer_supply igep_vmmc1_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
+};
 
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
 static struct regulator_init_data igep_vmmc1 = {
@@ -236,12 +237,13 @@ static struct regulator_init_data igep_vmmc1 = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &igep_vmmc1_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(igep_vmmc1_supply),
+       .consumer_supplies      = igep_vmmc1_supply,
 };
 
-static struct regulator_consumer_supply igep_vio_supply =
-       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
+static struct regulator_consumer_supply igep_vio_supply[] = {
+       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"),
+};
 
 static struct regulator_init_data igep_vio = {
        .constraints = {
@@ -254,20 +256,21 @@ static struct regulator_init_data igep_vio = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &igep_vio_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(igep_vio_supply),
+       .consumer_supplies      = igep_vio_supply,
 };
 
-static struct regulator_consumer_supply igep_vmmc2_supply =
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
+static struct regulator_consumer_supply igep_vmmc2_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
+};
 
 static struct regulator_init_data igep_vmmc2 = {
        .constraints            = {
                .valid_modes_mask       = REGULATOR_MODE_NORMAL,
                .always_on              = 1,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &igep_vmmc2_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(igep_vmmc2_supply),
+       .consumer_supplies      = igep_vmmc2_supply,
 };
 
 static struct fixed_voltage_config igep_vwlan = {
@@ -440,10 +443,6 @@ static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = {
        .setup          = igep_twl_gpio_setup,
 };
 
-static struct twl4030_usb_data igep_usb_data = {
-       .usb_mode       = T2_USB_MODE_ULPI,
-};
-
 static int igep2_enable_dvi(struct omap_dss_device *dssdev)
 {
        gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1);
@@ -480,26 +479,6 @@ static struct omap_dss_board_info igep2_dss_data = {
        .default_device = &igep2_dvi_device,
 };
 
-static struct regulator_consumer_supply igep2_vpll2_supplies[] = {
-       REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
-       REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
-};
-
-static struct regulator_init_data igep2_vpll2 = {
-       .constraints = {
-               .name                   = "VDVI",
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(igep2_vpll2_supplies),
-       .consumer_supplies      = igep2_vpll2_supplies,
-};
-
 static void __init igep2_display_init(void)
 {
        int err = gpio_request_one(IGEP2_GPIO_DVI_PUP, GPIOF_OUT_INIT_HIGH,
@@ -519,13 +498,6 @@ static void __init igep_init_early(void)
                                  m65kxxxxam_sdrc_params);
 }
 
-static struct twl4030_codec_audio_data igep2_audio_data;
-
-static struct twl4030_codec_data igep2_codec_data = {
-       .audio_mclk = 26000000,
-       .audio = &igep2_audio_data,
-};
-
 static int igep2_keymap[] = {
        KEY(0, 0, KEY_LEFT),
        KEY(0, 1, KEY_RIGHT),
@@ -558,11 +530,7 @@ static struct twl4030_keypad_data igep2_keypad_pdata = {
 };
 
 static struct twl4030_platform_data igep_twldata = {
-       .irq_base       = TWL4030_IRQ_BASE,
-       .irq_end        = TWL4030_IRQ_END,
-
        /* platform_data for children goes here */
-       .usb            = &igep_usb_data,
        .gpio           = &igep_twl4030_gpio_pdata,
        .vmmc1          = &igep_vmmc1,
        .vio            = &igep_vio,
@@ -578,6 +546,8 @@ static void __init igep_i2c_init(void)
 {
        int ret;
 
+       omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_USB, 0);
+
        if (machine_is_igep0020()) {
                /*
                 * Bus 3 is attached to the DVI port where devices like the
@@ -588,9 +558,12 @@ static void __init igep_i2c_init(void)
                if (ret)
                        pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret);
 
-               igep_twldata.codec      = &igep2_codec_data;
                igep_twldata.keypad     = &igep2_keypad_pdata;
-               igep_twldata.vpll2      = &igep2_vpll2;
+               /* Get common pmic data */
+               omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_AUDIO,
+                                     TWL_COMMON_REGULATOR_VPLL2);
+               igep_twldata.vpll2->constraints.apply_uV = true;
+               igep_twldata.vpll2->constraints.name = "VDVI";
        }
 
        omap3_pmic_init("twl4030", &igep_twldata);
@@ -703,9 +676,9 @@ MACHINE_START(IGEP0020, "IGEP v2 board")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = igep_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = igep_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
 
 MACHINE_START(IGEP0030, "IGEP OMAP3 module")
@@ -713,7 +686,7 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = igep_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = igep_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index f7d6038075f0721be241eff8a6b08859c1a86daa..218764c9377ee4c8dfd1c6500af1c1f84f586a8f 100644 (file)
@@ -199,22 +199,14 @@ static void __init omap_ldp_init_early(void)
        omap2_init_common_devices(NULL, NULL);
 }
 
-static struct twl4030_usb_data ldp_usb_data = {
-       .usb_mode       = T2_USB_MODE_ULPI,
-};
-
 static struct twl4030_gpio_platform_data ldp_gpio_data = {
        .gpio_base      = OMAP_MAX_GPIO_LINES,
        .irq_base       = TWL4030_GPIO_IRQ_BASE,
        .irq_end        = TWL4030_GPIO_IRQ_END,
 };
 
-static struct twl4030_madc_platform_data ldp_madc_data = {
-       .irq_line       = 1,
-};
-
-static struct regulator_consumer_supply ldp_vmmc1_supply = {
-       .supply                 = "vmmc",
+static struct regulator_consumer_supply ldp_vmmc1_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 };
 
 /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
@@ -228,8 +220,8 @@ static struct regulator_init_data ldp_vmmc1 = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &ldp_vmmc1_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(ldp_vmmc1_supply),
+       .consumer_supplies      = ldp_vmmc1_supply,
 };
 
 /* ads7846 on SPI */
@@ -253,12 +245,7 @@ static struct regulator_init_data ldp_vaux1 = {
 };
 
 static struct twl4030_platform_data ldp_twldata = {
-       .irq_base       = TWL4030_IRQ_BASE,
-       .irq_end        = TWL4030_IRQ_END,
-
        /* platform_data for children goes here */
-       .madc           = &ldp_madc_data,
-       .usb            = &ldp_usb_data,
        .vmmc1          = &ldp_vmmc1,
        .vaux1          = &ldp_vaux1,
        .gpio           = &ldp_gpio_data,
@@ -267,6 +254,8 @@ static struct twl4030_platform_data ldp_twldata = {
 
 static int __init omap_i2c_init(void)
 {
+       omap3_pmic_get_config(&ldp_twldata,
+                         TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC, 0);
        omap3_pmic_init("twl4030", &ldp_twldata);
        omap_register_i2c_bus(2, 400, NULL, 0);
        omap_register_i2c_bus(3, 400, NULL, 0);
@@ -341,8 +330,6 @@ static void __init omap_ldp_init(void)
                ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0);
 
        omap2_hsmmc_init(mmc);
-       /* link regulators to MMC adapters */
-       ldp_vmmc1_supply.dev = mmc[0].dev;
 }
 
 MACHINE_START(OMAP_LDP, "OMAP LDP board")
@@ -350,7 +337,7 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap_ldp_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap_ldp_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 8d74318ed495efcf2522c30e00035463cb0abb67..e11f0c5d608ac6f58aba83d7f57fc3954456efc2 100644 (file)
@@ -699,9 +699,9 @@ MACHINE_START(NOKIA_N800, "Nokia N800")
        .reserve        = omap_reserve,
        .map_io         = n8x0_map_io,
        .init_early     = n8x0_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap2_init_irq,
        .init_machine   = n8x0_init_machine,
-       .timer          = &omap_timer,
+       .timer          = &omap2_timer,
 MACHINE_END
 
 MACHINE_START(NOKIA_N810, "Nokia N810")
@@ -709,9 +709,9 @@ MACHINE_START(NOKIA_N810, "Nokia N810")
        .reserve        = omap_reserve,
        .map_io         = n8x0_map_io,
        .init_early     = n8x0_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap2_init_irq,
        .init_machine   = n8x0_init_machine,
-       .timer          = &omap_timer,
+       .timer          = &omap2_timer,
 MACHINE_END
 
 MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
@@ -719,7 +719,7 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
        .reserve        = omap_reserve,
        .map_io         = n8x0_map_io,
        .init_early     = n8x0_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap2_init_irq,
        .init_machine   = n8x0_init_machine,
-       .timer          = &omap_timer,
+       .timer          = &omap2_timer,
 MACHINE_END
index 7f21d24bd437732724a45af9302c50a514f56482..34f841112768bd31cf96e2352981ee2ef2434a8b 100644 (file)
@@ -50,7 +50,6 @@
 
 #include "mux.h"
 #include "hsmmc.h"
-#include "timer-gp.h"
 #include "pm.h"
 #include "common-board-devices.h"
 
@@ -210,14 +209,6 @@ static struct omap_dss_board_info beagle_dss_data = {
        .default_device = &beagle_dvi_device,
 };
 
-static struct regulator_consumer_supply beagle_vdac_supply =
-       REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
-
-static struct regulator_consumer_supply beagle_vdvi_supplies[] = {
-       REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
-       REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
-};
-
 static void __init beagle_display_init(void)
 {
        int r;
@@ -239,12 +230,12 @@ static struct omap2_hsmmc_info mmc[] = {
        {}      /* Terminator */
 };
 
-static struct regulator_consumer_supply beagle_vmmc1_supply = {
-       .supply                 = "vmmc",
+static struct regulator_consumer_supply beagle_vmmc1_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 };
 
-static struct regulator_consumer_supply beagle_vsim_supply = {
-       .supply                 = "vmmc_aux",
+static struct regulator_consumer_supply beagle_vsim_supply[] = {
+       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
 };
 
 static struct gpio_led gpio_leds[];
@@ -267,10 +258,6 @@ static int beagle_twl_gpio_setup(struct device *dev,
        mmc[0].gpio_cd = gpio + 0;
        omap2_hsmmc_init(mmc);
 
-       /* link regulators to MMC adapters */
-       beagle_vmmc1_supply.dev = mmc[0].dev;
-       beagle_vsim_supply.dev = mmc[0].dev;
-
        /*
         * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
         * high / others active low)
@@ -336,8 +323,8 @@ static struct regulator_init_data beagle_vmmc1 = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &beagle_vmmc1_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(beagle_vmmc1_supply),
+       .consumer_supplies      = beagle_vmmc1_supply,
 };
 
 /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -351,62 +338,15 @@ static struct regulator_init_data beagle_vsim = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &beagle_vsim_supply,
-};
-
-/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
-static struct regulator_init_data beagle_vdac = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &beagle_vdac_supply,
-};
-
-/* VPLL2 for digital video outputs */
-static struct regulator_init_data beagle_vpll2 = {
-       .constraints = {
-               .name                   = "VDVI",
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(beagle_vdvi_supplies),
-       .consumer_supplies      = beagle_vdvi_supplies,
-};
-
-static struct twl4030_usb_data beagle_usb_data = {
-       .usb_mode       = T2_USB_MODE_ULPI,
-};
-
-static struct twl4030_codec_audio_data beagle_audio_data;
-
-static struct twl4030_codec_data beagle_codec_data = {
-       .audio_mclk = 26000000,
-       .audio = &beagle_audio_data,
+       .num_consumer_supplies  = ARRAY_SIZE(beagle_vsim_supply),
+       .consumer_supplies      = beagle_vsim_supply,
 };
 
 static struct twl4030_platform_data beagle_twldata = {
-       .irq_base       = TWL4030_IRQ_BASE,
-       .irq_end        = TWL4030_IRQ_END,
-
        /* platform_data for children goes here */
-       .usb            = &beagle_usb_data,
        .gpio           = &beagle_gpio_data,
-       .codec          = &beagle_codec_data,
        .vmmc1          = &beagle_vmmc1,
        .vsim           = &beagle_vsim,
-       .vdac           = &beagle_vdac,
-       .vpll2          = &beagle_vpll2,
 };
 
 static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
@@ -417,6 +357,12 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
 
 static int __init omap3_beagle_i2c_init(void)
 {
+       omap3_pmic_get_config(&beagle_twldata,
+                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
+                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
+
+       beagle_twldata.vpll2->constraints.name = "VDVI";
+
        omap3_pmic_init("twl4030", &beagle_twldata);
        /* Bus 3 is attached to the DVI port where devices like the pico DLP
         * projector don't work reliably with 400kHz */
@@ -486,10 +432,7 @@ static void __init omap3_beagle_init_early(void)
 
 static void __init omap3_beagle_init_irq(void)
 {
-       omap_init_irq();
-#ifdef CONFIG_OMAP_32K_TIMER
-       omap2_gp_clockevent_set_gptimer(12);
-#endif
+       omap3_init_irq();
 }
 
 static struct platform_device *omap3_beagle_devices[] __initdata = {
@@ -599,5 +542,5 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
        .init_early     = omap3_beagle_init_early,
        .init_irq       = omap3_beagle_init_irq,
        .init_machine   = omap3_beagle_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_secure_timer,
 MACHINE_END
index b4d43464a303f43e5a6283c61dd09b55f657d624..c452b3f3331ae80ab6b590be86919a36d35b136c 100644 (file)
@@ -273,12 +273,12 @@ static struct omap_dss_board_info omap3_evm_dss_data = {
        .default_device = &omap3_evm_lcd_device,
 };
 
-static struct regulator_consumer_supply omap3evm_vmmc1_supply = {
-       .supply                 = "vmmc",
+static struct regulator_consumer_supply omap3evm_vmmc1_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 };
 
-static struct regulator_consumer_supply omap3evm_vsim_supply = {
-       .supply                 = "vmmc_aux",
+static struct regulator_consumer_supply omap3evm_vsim_supply[] = {
+       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
 };
 
 /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
@@ -292,8 +292,8 @@ static struct regulator_init_data omap3evm_vmmc1 = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &omap3evm_vmmc1_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(omap3evm_vmmc1_supply),
+       .consumer_supplies      = omap3evm_vmmc1_supply,
 };
 
 /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -307,8 +307,8 @@ static struct regulator_init_data omap3evm_vsim = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &omap3evm_vsim_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(omap3evm_vsim_supply),
+       .consumer_supplies      = omap3evm_vsim_supply,
 };
 
 static struct omap2_hsmmc_info mmc[] = {
@@ -365,10 +365,6 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
        mmc[0].gpio_cd = gpio + 0;
        omap2_hsmmc_init(mmc);
 
-       /* link regulators to MMC adapters */
-       omap3evm_vmmc1_supply.dev = mmc[0].dev;
-       omap3evm_vsim_supply.dev = mmc[0].dev;
-
        /*
         * Most GPIOs are for USB OTG.  Some are mostly sent to
         * the P2 connector; notably LEDA for the LCD backlight.
@@ -400,10 +396,6 @@ static struct twl4030_gpio_platform_data omap3evm_gpio_data = {
        .setup          = omap3evm_twl_gpio_setup,
 };
 
-static struct twl4030_usb_data omap3evm_usb_data = {
-       .usb_mode       = T2_USB_MODE_ULPI,
-};
-
 static uint32_t board_keymap[] = {
        KEY(0, 0, KEY_LEFT),
        KEY(0, 1, KEY_DOWN),
@@ -438,58 +430,10 @@ static struct twl4030_keypad_data omap3evm_kp_data = {
        .rep            = 1,
 };
 
-static struct twl4030_madc_platform_data omap3evm_madc_data = {
-       .irq_line       = 1,
-};
-
-static struct twl4030_codec_audio_data omap3evm_audio_data;
-
-static struct twl4030_codec_data omap3evm_codec_data = {
-       .audio_mclk = 26000000,
-       .audio = &omap3evm_audio_data,
-};
-
-static struct regulator_consumer_supply omap3_evm_vdda_dac_supply =
-       REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
-
-/* VDAC for DSS driving S-Video */
-static struct regulator_init_data omap3_evm_vdac = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &omap3_evm_vdda_dac_supply,
-};
-
-/* VPLL2 for digital video outputs */
-static struct regulator_consumer_supply omap3_evm_vpll2_supplies[] = {
-       REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
-       REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
-};
-
-static struct regulator_init_data omap3_evm_vpll2 = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(omap3_evm_vpll2_supplies),
-       .consumer_supplies      = omap3_evm_vpll2_supplies,
-};
-
 /* ads7846 on SPI */
-static struct regulator_consumer_supply omap3evm_vio_supply =
-       REGULATOR_SUPPLY("vcc", "spi1.0");
+static struct regulator_consumer_supply omap3evm_vio_supply[] = {
+       REGULATOR_SUPPLY("vcc", "spi1.0"),
+};
 
 /* VIO for ads7846 */
 static struct regulator_init_data omap3evm_vio = {
@@ -502,8 +446,8 @@ static struct regulator_init_data omap3evm_vio = {
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &omap3evm_vio_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(omap3evm_vio_supply),
+       .consumer_supplies      = omap3evm_vio_supply,
 };
 
 #ifdef CONFIG_WL12XX_PLATFORM_DATA
@@ -511,16 +455,17 @@ static struct regulator_init_data omap3evm_vio = {
 #define OMAP3EVM_WLAN_PMENA_GPIO       (150)
 #define OMAP3EVM_WLAN_IRQ_GPIO         (149)
 
-static struct regulator_consumer_supply omap3evm_vmmc2_supply =
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
+static struct regulator_consumer_supply omap3evm_vmmc2_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
+};
 
 /* VMMC2 for driving the WL12xx module */
 static struct regulator_init_data omap3evm_vmmc2 = {
        .constraints = {
                .valid_ops_mask = REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies = &omap3evm_vmmc2_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(omap3evm_vmmc2_supply),
+       .consumer_supplies      = omap3evm_vmmc2_supply,
 };
 
 static struct fixed_voltage_config omap3evm_vwlan = {
@@ -548,17 +493,9 @@ struct wl12xx_platform_data omap3evm_wlan_data __initdata = {
 #endif
 
 static struct twl4030_platform_data omap3evm_twldata = {
-       .irq_base       = TWL4030_IRQ_BASE,
-       .irq_end        = TWL4030_IRQ_END,
-
        /* platform_data for children goes here */
        .keypad         = &omap3evm_kp_data,
-       .madc           = &omap3evm_madc_data,
-       .usb            = &omap3evm_usb_data,
        .gpio           = &omap3evm_gpio_data,
-       .codec          = &omap3evm_codec_data,
-       .vdac           = &omap3_evm_vdac,
-       .vpll2          = &omap3_evm_vpll2,
        .vio            = &omap3evm_vio,
        .vmmc1          = &omap3evm_vmmc1,
        .vsim           = &omap3evm_vsim,
@@ -566,6 +503,14 @@ static struct twl4030_platform_data omap3evm_twldata = {
 
 static int __init omap3_evm_i2c_init(void)
 {
+       omap3_pmic_get_config(&omap3evm_twldata,
+                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
+                       TWL_COMMON_PDATA_AUDIO,
+                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
+
+       omap3evm_twldata.vdac->constraints.apply_uV = true;
+       omap3evm_twldata.vpll2->constraints.apply_uV = true;
+
        omap3_pmic_init("twl4030", &omap3evm_twldata);
        omap_register_i2c_bus(2, 400, NULL, 0);
        omap_register_i2c_bus(3, 400, NULL, 0);
@@ -740,7 +685,7 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap3_evm_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap3_evm_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 60d9be49dbab1a3595b12291a65abe36d6724bc4..703aeb5b8fd4e07487c08b3d8fa669bc88b61431 100644 (file)
@@ -35,7 +35,6 @@
 
 #include "mux.h"
 #include "hsmmc.h"
-#include "timer-gp.h"
 #include "control.h"
 #include "common-board-devices.h"
 
@@ -55,8 +54,8 @@
 #define OMAP3_TORPEDO_MMC_GPIO_CD              127
 #define OMAP3_TORPEDO_SMSC911X_GPIO_IRQ                129
 
-static struct regulator_consumer_supply omap3logic_vmmc1_supply = {
-       .supply                 = "vmmc",
+static struct regulator_consumer_supply omap3logic_vmmc1_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 };
 
 /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
@@ -71,8 +70,8 @@ static struct regulator_init_data omap3logic_vmmc1 = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &omap3logic_vmmc1_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(omap3logic_vmmc1_supply),
+       .consumer_supplies      = omap3logic_vmmc1_supply,
 };
 
 static struct twl4030_gpio_platform_data omap3logic_gpio_data = {
@@ -130,8 +129,6 @@ static void __init board_mmc_init(void)
        }
 
        omap2_hsmmc_init(board_mmc_info);
-       /* link regulators to MMC adapters */
-       omap3logic_vmmc1_supply.dev = board_mmc_info[0].dev;
 }
 
 static struct omap_smsc911x_platform_data __initdata board_smsc911x_data = {
@@ -215,16 +212,16 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
        .boot_params    = 0x80000100,
        .map_io         = omap3_map_io,
        .init_early     = omap3logic_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap3logic_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
 
 MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
        .boot_params    = 0x80000100,
        .map_io         = omap3_map_io,
        .init_early     = omap3logic_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap3logic_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 23f71d40883ea1fafbd2fd331d33fd9c581731dd..080d7bd6795e61410d6770414b3d44603ea5c8e7 100644 (file)
@@ -320,17 +320,17 @@ static struct twl4030_gpio_platform_data omap3pandora_gpio_data = {
        .setup          = omap3pandora_twl_gpio_setup,
 };
 
-static struct regulator_consumer_supply pandora_vmmc1_supply =
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
-
-static struct regulator_consumer_supply pandora_vmmc2_supply =
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
+static struct regulator_consumer_supply pandora_vmmc1_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
+};
 
-static struct regulator_consumer_supply pandora_vmmc3_supply =
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2");
+static struct regulator_consumer_supply pandora_vmmc2_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1")
+};
 
-static struct regulator_consumer_supply pandora_vdda_dac_supply =
-       REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
+static struct regulator_consumer_supply pandora_vmmc3_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"),
+};
 
 static struct regulator_consumer_supply pandora_vdds_supplies[] = {
        REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
@@ -338,11 +338,13 @@ static struct regulator_consumer_supply pandora_vdds_supplies[] = {
        REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
 };
 
-static struct regulator_consumer_supply pandora_vcc_lcd_supply =
-       REGULATOR_SUPPLY("vcc", "display0");
+static struct regulator_consumer_supply pandora_vcc_lcd_supply[] = {
+       REGULATOR_SUPPLY("vcc", "display0"),
+};
 
-static struct regulator_consumer_supply pandora_usb_phy_supply =
-       REGULATOR_SUPPLY("hsusb0", "ehci-omap.0");
+static struct regulator_consumer_supply pandora_usb_phy_supply[] = {
+       REGULATOR_SUPPLY("hsusb0", "ehci-omap.0"),
+};
 
 /* ads7846 on SPI and 2 nub controllers on I2C */
 static struct regulator_consumer_supply pandora_vaux4_supplies[] = {
@@ -351,8 +353,9 @@ static struct regulator_consumer_supply pandora_vaux4_supplies[] = {
        REGULATOR_SUPPLY("vcc", "3-0067"),
 };
 
-static struct regulator_consumer_supply pandora_adac_supply =
-       REGULATOR_SUPPLY("vcc", "soc-audio");
+static struct regulator_consumer_supply pandora_adac_supply[] = {
+       REGULATOR_SUPPLY("vcc", "soc-audio"),
+};
 
 /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
 static struct regulator_init_data pandora_vmmc1 = {
@@ -365,8 +368,8 @@ static struct regulator_init_data pandora_vmmc1 = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &pandora_vmmc1_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(pandora_vmmc1_supply),
+       .consumer_supplies      = pandora_vmmc1_supply,
 };
 
 /* VMMC2 for MMC2 pins CMD, CLK, DAT0..DAT3 (max 100 mA) */
@@ -380,38 +383,8 @@ static struct regulator_init_data pandora_vmmc2 = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &pandora_vmmc2_supply,
-};
-
-/* VDAC for DSS driving S-Video */
-static struct regulator_init_data pandora_vdac = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &pandora_vdda_dac_supply,
-};
-
-/* VPLL2 for digital video outputs */
-static struct regulator_init_data pandora_vpll2 = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(pandora_vdds_supplies),
-       .consumer_supplies      = pandora_vdds_supplies,
+       .num_consumer_supplies  = ARRAY_SIZE(pandora_vmmc2_supply),
+       .consumer_supplies      = pandora_vmmc2_supply,
 };
 
 /* VAUX1 for LCD */
@@ -425,8 +398,8 @@ static struct regulator_init_data pandora_vaux1 = {
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &pandora_vcc_lcd_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(pandora_vcc_lcd_supply),
+       .consumer_supplies      = pandora_vcc_lcd_supply,
 };
 
 /* VAUX2 for USB host PHY */
@@ -440,8 +413,8 @@ static struct regulator_init_data pandora_vaux2 = {
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &pandora_usb_phy_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(pandora_usb_phy_supply),
+       .consumer_supplies      = pandora_usb_phy_supply,
 };
 
 /* VAUX4 for ads7846 and nubs */
@@ -470,8 +443,8 @@ static struct regulator_init_data pandora_vsim = {
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &pandora_adac_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(pandora_adac_supply),
+       .consumer_supplies      = pandora_adac_supply,
 };
 
 /* Fixed regulator internal to Wifi module */
@@ -479,8 +452,8 @@ static struct regulator_init_data pandora_vmmc3 = {
        .constraints = {
                .valid_ops_mask         = REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &pandora_vmmc3_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(pandora_vmmc3_supply),
+       .consumer_supplies      = pandora_vmmc3_supply,
 };
 
 static struct fixed_voltage_config pandora_vwlan = {
@@ -501,29 +474,12 @@ static struct platform_device pandora_vwlan_device = {
        },
 };
 
-static struct twl4030_usb_data omap3pandora_usb_data = {
-       .usb_mode       = T2_USB_MODE_ULPI,
-};
-
-static struct twl4030_codec_audio_data omap3pandora_audio_data;
-
-static struct twl4030_codec_data omap3pandora_codec_data = {
-       .audio_mclk = 26000000,
-       .audio = &omap3pandora_audio_data,
-};
-
 static struct twl4030_bci_platform_data pandora_bci_data;
 
 static struct twl4030_platform_data omap3pandora_twldata = {
-       .irq_base       = TWL4030_IRQ_BASE,
-       .irq_end        = TWL4030_IRQ_END,
        .gpio           = &omap3pandora_gpio_data,
-       .usb            = &omap3pandora_usb_data,
-       .codec          = &omap3pandora_codec_data,
        .vmmc1          = &pandora_vmmc1,
        .vmmc2          = &pandora_vmmc2,
-       .vdac           = &pandora_vdac,
-       .vpll2          = &pandora_vpll2,
        .vaux1          = &pandora_vaux1,
        .vaux2          = &pandora_vaux2,
        .vaux4          = &pandora_vaux4,
@@ -541,6 +497,17 @@ static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = {
 
 static int __init omap3pandora_i2c_init(void)
 {
+       omap3_pmic_get_config(&omap3pandora_twldata,
+                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
+                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
+
+       omap3pandora_twldata.vdac->constraints.apply_uV = true;
+
+       omap3pandora_twldata.vpll2->constraints.apply_uV = true;
+       omap3pandora_twldata.vpll2->num_consumer_supplies =
+                                       ARRAY_SIZE(pandora_vdds_supplies);
+       omap3pandora_twldata.vpll2->consumer_supplies = pandora_vdds_supplies;
+
        omap3_pmic_init("tps65950", &omap3pandora_twldata);
        /* i2c2 pins are not connected */
        omap_register_i2c_bus(3, 100, omap3pandora_i2c3_boardinfo,
@@ -643,7 +610,7 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap3pandora_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap3pandora_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 0c108a212ea2190904bb6e66ee11aad696f40c15..8e104980ea26df2eef7050dc136e75ff5a54be78 100644 (file)
@@ -52,7 +52,6 @@
 #include "sdram-micron-mt46h32m32lf-6.h"
 #include "mux.h"
 #include "hsmmc.h"
-#include "timer-gp.h"
 #include "common-board-devices.h"
 
 #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
@@ -206,12 +205,12 @@ static struct omap_dss_board_info omap3_stalker_dss_data = {
        .default_device = &omap3_stalker_dvi_device,
 };
 
-static struct regulator_consumer_supply omap3stalker_vmmc1_supply = {
-       .supply         = "vmmc",
+static struct regulator_consumer_supply omap3stalker_vmmc1_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 };
 
-static struct regulator_consumer_supply omap3stalker_vsim_supply = {
-       .supply         = "vmmc_aux",
+static struct regulator_consumer_supply omap3stalker_vsim_supply[] = {
+       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
 };
 
 /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
@@ -224,8 +223,8 @@ static struct regulator_init_data omap3stalker_vmmc1 = {
                .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
                | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &omap3stalker_vmmc1_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(omap3stalker_vmmc1_supply),
+       .consumer_supplies      = omap3stalker_vmmc1_supply,
 };
 
 /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -238,8 +237,8 @@ static struct regulator_init_data omap3stalker_vsim = {
                .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
                | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &omap3stalker_vsim_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(omap3stalker_vsim_supply),
+       .consumer_supplies      = omap3stalker_vsim_supply,
 };
 
 static struct omap2_hsmmc_info mmc[] = {
@@ -321,10 +320,6 @@ omap3stalker_twl_gpio_setup(struct device *dev,
        mmc[0].gpio_cd = gpio + 0;
        omap2_hsmmc_init(mmc);
 
-       /* link regulators to MMC adapters */
-       omap3stalker_vmmc1_supply.dev = mmc[0].dev;
-       omap3stalker_vsim_supply.dev = mmc[0].dev;
-
        /*
         * Most GPIOs are for USB OTG.  Some are mostly sent to
         * the P2 connector; notably LEDA for the LCD backlight.
@@ -354,10 +349,6 @@ static struct twl4030_gpio_platform_data omap3stalker_gpio_data = {
        .setup          = omap3stalker_twl_gpio_setup,
 };
 
-static struct twl4030_usb_data omap3stalker_usb_data = {
-       .usb_mode       = T2_USB_MODE_ULPI,
-};
-
 static uint32_t board_keymap[] = {
        KEY(0, 0, KEY_LEFT),
        KEY(0, 1, KEY_DOWN),
@@ -392,68 +383,10 @@ static struct twl4030_keypad_data omap3stalker_kp_data = {
        .rep            = 1,
 };
 
-static struct twl4030_madc_platform_data omap3stalker_madc_data = {
-       .irq_line       = 1,
-};
-
-static struct twl4030_codec_audio_data omap3stalker_audio_data;
-
-static struct twl4030_codec_data omap3stalker_codec_data = {
-       .audio_mclk     = 26000000,
-       .audio          = &omap3stalker_audio_data,
-};
-
-static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply =
-       REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
-
-/* VDAC for DSS driving S-Video */
-static struct regulator_init_data omap3_stalker_vdac = {
-       .constraints            = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-               | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-               | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &omap3_stalker_vdda_dac_supply,
-};
-
-/* VPLL2 for digital video outputs */
-static struct regulator_consumer_supply omap3_stalker_vpll2_supplies[] = {
-       REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
-       REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
-};
-
-static struct regulator_init_data omap3_stalker_vpll2 = {
-       .constraints            = {
-               .name                   = "VDVI",
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .apply_uV = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-               | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-               | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(omap3_stalker_vpll2_supplies),
-       .consumer_supplies      = omap3_stalker_vpll2_supplies,
-};
-
 static struct twl4030_platform_data omap3stalker_twldata = {
-       .irq_base       = TWL4030_IRQ_BASE,
-       .irq_end        = TWL4030_IRQ_END,
-
        /* platform_data for children goes here */
        .keypad         = &omap3stalker_kp_data,
-       .madc           = &omap3stalker_madc_data,
-       .usb            = &omap3stalker_usb_data,
        .gpio           = &omap3stalker_gpio_data,
-       .codec          = &omap3stalker_codec_data,
-       .vdac           = &omap3_stalker_vdac,
-       .vpll2          = &omap3_stalker_vpll2,
        .vmmc1          = &omap3stalker_vmmc1,
        .vsim           = &omap3stalker_vsim,
 };
@@ -474,6 +407,15 @@ static struct i2c_board_info __initdata omap3stalker_i2c_boardinfo3[] = {
 
 static int __init omap3_stalker_i2c_init(void)
 {
+       omap3_pmic_get_config(&omap3stalker_twldata,
+                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
+                       TWL_COMMON_PDATA_AUDIO,
+                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
+
+       omap3stalker_twldata.vdac->constraints.apply_uV = true;
+       omap3stalker_twldata.vpll2->constraints.apply_uV = true;
+       omap3stalker_twldata.vpll2->constraints.name = "VDVI";
+
        omap3_pmic_init("twl4030", &omap3stalker_twldata);
        omap_register_i2c_bus(2, 400, NULL, 0);
        omap_register_i2c_bus(3, 400, omap3stalker_i2c_boardinfo3,
@@ -494,10 +436,7 @@ static void __init omap3_stalker_init_early(void)
 
 static void __init omap3_stalker_init_irq(void)
 {
-       omap_init_irq();
-#ifdef CONFIG_OMAP_32K_TIMER
-       omap2_gp_clockevent_set_gptimer(12);
-#endif
+       omap3_init_irq();
 }
 
 static struct platform_device *omap3_stalker_devices[] __initdata = {
@@ -560,5 +499,5 @@ MACHINE_START(SBC3530, "OMAP3 STALKER")
        .init_early             = omap3_stalker_init_early,
        .init_irq               = omap3_stalker_init_irq,
        .init_machine           = omap3_stalker_init,
-       .timer                  = &omap_timer,
+       .timer                  = &omap3_secure_timer,
 MACHINE_END
index 5f649faf7377ecb757c49c73e9430d91adf2940f..852ea046405719a4af2d4f470b8cf77756072ef6 100644 (file)
@@ -51,7 +51,6 @@
 
 #include "mux.h"
 #include "hsmmc.h"
-#include "timer-gp.h"
 #include "common-board-devices.h"
 
 #include <asm/setup.h>
@@ -114,12 +113,12 @@ static struct omap_lcd_config omap3_touchbook_lcd_config __initdata = {
        .ctrl_name      = "internal",
 };
 
-static struct regulator_consumer_supply touchbook_vmmc1_supply = {
-       .supply                 = "vmmc",
+static struct regulator_consumer_supply touchbook_vmmc1_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 };
 
-static struct regulator_consumer_supply touchbook_vsim_supply = {
-       .supply                 = "vmmc_aux",
+static struct regulator_consumer_supply touchbook_vsim_supply[] = {
+       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
 };
 
 static struct gpio_led gpio_leds[];
@@ -137,10 +136,6 @@ static int touchbook_twl_gpio_setup(struct device *dev,
        mmc[0].gpio_cd = gpio + 0;
        omap2_hsmmc_init(mmc);
 
-       /* link regulators to MMC adapters */
-       touchbook_vmmc1_supply.dev = mmc[0].dev;
-       touchbook_vsim_supply.dev = mmc[0].dev;
-
        /* REVISIT: need ehci-omap hooks for external VBUS
         * power switch and overcurrent detect
         */
@@ -167,14 +162,18 @@ static struct twl4030_gpio_platform_data touchbook_gpio_data = {
        .setup          = touchbook_twl_gpio_setup,
 };
 
-static struct regulator_consumer_supply touchbook_vdac_supply = {
+static struct regulator_consumer_supply touchbook_vdac_supply[] = {
+{
        .supply         = "vdac",
        .dev            = &omap3_touchbook_lcd_device.dev,
+},
 };
 
-static struct regulator_consumer_supply touchbook_vdvi_supply = {
+static struct regulator_consumer_supply touchbook_vdvi_supply[] = {
+{
        .supply         = "vdvi",
        .dev            = &omap3_touchbook_lcd_device.dev,
+},
 };
 
 /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
@@ -188,8 +187,8 @@ static struct regulator_init_data touchbook_vmmc1 = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &touchbook_vmmc1_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(touchbook_vmmc1_supply),
+       .consumer_supplies      = touchbook_vmmc1_supply,
 };
 
 /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -203,62 +202,15 @@ static struct regulator_init_data touchbook_vsim = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &touchbook_vsim_supply,
-};
-
-/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
-static struct regulator_init_data touchbook_vdac = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &touchbook_vdac_supply,
-};
-
-/* VPLL2 for digital video outputs */
-static struct regulator_init_data touchbook_vpll2 = {
-       .constraints = {
-               .name                   = "VDVI",
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &touchbook_vdvi_supply,
-};
-
-static struct twl4030_usb_data touchbook_usb_data = {
-       .usb_mode       = T2_USB_MODE_ULPI,
-};
-
-static struct twl4030_codec_audio_data touchbook_audio_data;
-
-static struct twl4030_codec_data touchbook_codec_data = {
-       .audio_mclk = 26000000,
-       .audio = &touchbook_audio_data,
+       .num_consumer_supplies  = ARRAY_SIZE(touchbook_vsim_supply),
+       .consumer_supplies      = touchbook_vsim_supply,
 };
 
 static struct twl4030_platform_data touchbook_twldata = {
-       .irq_base       = TWL4030_IRQ_BASE,
-       .irq_end        = TWL4030_IRQ_END,
-
        /* platform_data for children goes here */
-       .usb            = &touchbook_usb_data,
        .gpio           = &touchbook_gpio_data,
-       .codec          = &touchbook_codec_data,
        .vmmc1          = &touchbook_vmmc1,
        .vsim           = &touchbook_vsim,
-       .vdac           = &touchbook_vdac,
-       .vpll2          = &touchbook_vpll2,
 };
 
 static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = {
@@ -270,8 +222,20 @@ static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = {
 static int __init omap3_touchbook_i2c_init(void)
 {
        /* Standard TouchBook bus */
-       omap3_pmic_init("twl4030", &touchbook_twldata);
+       omap3_pmic_get_config(&touchbook_twldata,
+                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
+                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
+
+       touchbook_twldata.vdac->num_consumer_supplies =
+                                       ARRAY_SIZE(touchbook_vdac_supply);
+       touchbook_twldata.vdac->consumer_supplies = touchbook_vdac_supply;
 
+       touchbook_twldata.vpll2->constraints.name = "VDVI";
+       touchbook_twldata.vpll2->num_consumer_supplies =
+                                       ARRAY_SIZE(touchbook_vdvi_supply);
+       touchbook_twldata.vpll2->consumer_supplies = touchbook_vdvi_supply;
+
+       omap3_pmic_init("twl4030", &touchbook_twldata);
        /* Additional TouchBook bus */
        omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo,
                        ARRAY_SIZE(touchBook_i2c_boardinfo));
@@ -371,10 +335,7 @@ static void __init omap3_touchbook_init_early(void)
 
 static void __init omap3_touchbook_init_irq(void)
 {
-       omap_init_irq();
-#ifdef CONFIG_OMAP_32K_TIMER
-       omap2_gp_clockevent_set_gptimer(12);
-#endif
+       omap3_init_irq();
 }
 
 static struct platform_device *omap3_touchbook_devices[] __initdata = {
@@ -449,5 +410,5 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
        .init_early     = omap3_touchbook_init_early,
        .init_irq       = omap3_touchbook_init_irq,
        .init_machine   = omap3_touchbook_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_secure_timer,
 MACHINE_END
index 0cfe2005cb506a32c79d96f9864bb7e24bd35a0f..9aaa96057666936378e8270e689436f23dabe5fa 100644 (file)
@@ -41,7 +41,6 @@
 #include <plat/usb.h>
 #include <plat/mmc.h>
 #include <video/omap-panel-generic-dpi.h>
-#include "timer-gp.h"
 
 #include "hsmmc.h"
 #include "control.h"
@@ -155,14 +154,6 @@ static struct omap_musb_board_data musb_board_data = {
        .power                  = 100,
 };
 
-static struct twl4030_usb_data omap4_usbphy_data = {
-       .phy_init       = omap4430_phy_init,
-       .phy_exit       = omap4430_phy_exit,
-       .phy_power      = omap4430_phy_power,
-       .phy_set_clock  = omap4430_phy_set_clk,
-       .phy_suspend    = omap4430_phy_suspend,
-};
-
 static struct omap2_hsmmc_info mmc[] = {
        {
                .mmc            = 1,
@@ -182,24 +173,16 @@ static struct omap2_hsmmc_info mmc[] = {
        {}      /* Terminator */
 };
 
-static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = {
-       {
-               .supply = "vmmc",
-               .dev_name = "omap_hsmmc.0",
-       },
-};
-
-static struct regulator_consumer_supply omap4_panda_vmmc5_supply = {
-       .supply = "vmmc",
-       .dev_name = "omap_hsmmc.4",
+static struct regulator_consumer_supply omap4_panda_vmmc5_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.4"),
 };
 
 static struct regulator_init_data panda_vmmc5 = {
        .constraints = {
                .valid_ops_mask = REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies = 1,
-       .consumer_supplies = &omap4_panda_vmmc5_supply,
+       .num_consumer_supplies = ARRAY_SIZE(omap4_panda_vmmc5_supply),
+       .consumer_supplies = omap4_panda_vmmc5_supply,
 };
 
 static struct fixed_voltage_config panda_vwlan = {
@@ -274,128 +257,8 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
        return 0;
 }
 
-static struct regulator_init_data omap4_panda_vaux2 = {
-       .constraints = {
-               .min_uV                 = 1200000,
-               .max_uV                 = 2800000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct regulator_init_data omap4_panda_vaux3 = {
-       .constraints = {
-               .min_uV                 = 1000000,
-               .max_uV                 = 3000000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-/* VMMC1 for MMC1 card */
-static struct regulator_init_data omap4_panda_vmmc = {
-       .constraints = {
-               .min_uV                 = 1200000,
-               .max_uV                 = 3000000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = omap4_panda_vmmc_supply,
-};
-
-static struct regulator_init_data omap4_panda_vpp = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 2500000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct regulator_init_data omap4_panda_vana = {
-       .constraints = {
-               .min_uV                 = 2100000,
-               .max_uV                 = 2100000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct regulator_init_data omap4_panda_vcxio = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct regulator_init_data omap4_panda_vdac = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct regulator_init_data omap4_panda_vusb = {
-       .constraints = {
-               .min_uV                 = 3300000,
-               .max_uV                 = 3300000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  =      REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct regulator_init_data omap4_panda_clk32kg = {
-       .constraints = {
-               .valid_ops_mask         = REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct twl4030_platform_data omap4_panda_twldata = {
-       .irq_base       = TWL6030_IRQ_BASE,
-       .irq_end        = TWL6030_IRQ_END,
-
-       /* Regulators */
-       .vmmc           = &omap4_panda_vmmc,
-       .vpp            = &omap4_panda_vpp,
-       .vana           = &omap4_panda_vana,
-       .vcxio          = &omap4_panda_vcxio,
-       .vdac           = &omap4_panda_vdac,
-       .vusb           = &omap4_panda_vusb,
-       .vaux2          = &omap4_panda_vaux2,
-       .vaux3          = &omap4_panda_vaux3,
-       .clk32kg        = &omap4_panda_clk32kg,
-       .usb            = &omap4_usbphy_data,
-};
+/* Panda board uses the common PMIC configuration */
+static struct twl4030_platform_data omap4_panda_twldata;
 
 /*
  * Display monitor features are burnt in their EEPROM as EDID data. The EEPROM
@@ -409,6 +272,16 @@ static struct i2c_board_info __initdata panda_i2c_eeprom[] = {
 
 static int __init omap4_panda_i2c_init(void)
 {
+       omap4_pmic_get_config(&omap4_panda_twldata, TWL_COMMON_PDATA_USB,
+                       TWL_COMMON_REGULATOR_VDAC |
+                       TWL_COMMON_REGULATOR_VAUX2 |
+                       TWL_COMMON_REGULATOR_VAUX3 |
+                       TWL_COMMON_REGULATOR_VMMC |
+                       TWL_COMMON_REGULATOR_VPP |
+                       TWL_COMMON_REGULATOR_VANA |
+                       TWL_COMMON_REGULATOR_VCXIO |
+                       TWL_COMMON_REGULATOR_VUSB |
+                       TWL_COMMON_REGULATOR_CLK32KG);
        omap4_pmic_init("twl6030", &omap4_panda_twldata);
        omap_register_i2c_bus(2, 400, NULL, 0);
        /*
@@ -716,5 +589,5 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
        .init_early     = omap4_panda_init_early,
        .init_irq       = gic_init_irq,
        .init_machine   = omap4_panda_init,
-       .timer          = &omap_timer,
+       .timer          = &omap4_timer,
 MACHINE_END
index 175e1ab2b04d7225a0a13485e12e239e9692030d..f1f18d03d24c082bebc78b33c683bdc67657b072 100644 (file)
        defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
 
 /* fixed regulator for ads7846 */
-static struct regulator_consumer_supply ads7846_supply =
-       REGULATOR_SUPPLY("vcc", "spi1.0");
+static struct regulator_consumer_supply ads7846_supply[] = {
+       REGULATOR_SUPPLY("vcc", "spi1.0"),
+};
 
 static struct regulator_init_data vads7846_regulator = {
        .constraints = {
                .valid_ops_mask         = REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &ads7846_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(ads7846_supply),
+       .consumer_supplies      = ads7846_supply,
 };
 
 static struct fixed_voltage_config vads7846 = {
@@ -264,14 +265,6 @@ static struct omap_dss_board_info overo_dss_data = {
        .default_device = &overo_dvi_device,
 };
 
-static struct regulator_consumer_supply overo_vdda_dac_supply =
-       REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
-
-static struct regulator_consumer_supply overo_vdds_dsi_supply[] = {
-       REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
-       REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
-};
-
 static struct mtd_partition overo_nand_partitions[] = {
        {
                .name           = "xloader",
@@ -319,8 +312,8 @@ static struct omap2_hsmmc_info mmc[] = {
        {}      /* Terminator */
 };
 
-static struct regulator_consumer_supply overo_vmmc1_supply = {
-       .supply                 = "vmmc",
+static struct regulator_consumer_supply overo_vmmc1_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 };
 
 #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
@@ -415,8 +408,6 @@ static int overo_twl_gpio_setup(struct device *dev,
 {
        omap2_hsmmc_init(mmc);
 
-       overo_vmmc1_supply.dev = mmc[0].dev;
-
 #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
        /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
        gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
@@ -433,10 +424,6 @@ static struct twl4030_gpio_platform_data overo_gpio_data = {
        .setup          = overo_twl_gpio_setup,
 };
 
-static struct twl4030_usb_data overo_usb_data = {
-       .usb_mode       = T2_USB_MODE_ULPI,
-};
-
 static struct regulator_init_data overo_vmmc1 = {
        .constraints = {
                .min_uV                 = 1850000,
@@ -447,59 +434,23 @@ static struct regulator_init_data overo_vmmc1 = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &overo_vmmc1_supply,
-};
-
-/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
-static struct regulator_init_data overo_vdac = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &overo_vdda_dac_supply,
-};
-
-/* VPLL2 for digital video outputs */
-static struct regulator_init_data overo_vpll2 = {
-       .constraints = {
-               .name                   = "VDVI",
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = ARRAY_SIZE(overo_vdds_dsi_supply),
-       .consumer_supplies      = overo_vdds_dsi_supply,
-};
-
-static struct twl4030_codec_audio_data overo_audio_data;
-
-static struct twl4030_codec_data overo_codec_data = {
-       .audio_mclk = 26000000,
-       .audio = &overo_audio_data,
+       .num_consumer_supplies  = ARRAY_SIZE(overo_vmmc1_supply),
+       .consumer_supplies      = overo_vmmc1_supply,
 };
 
 static struct twl4030_platform_data overo_twldata = {
-       .irq_base       = TWL4030_IRQ_BASE,
-       .irq_end        = TWL4030_IRQ_END,
        .gpio           = &overo_gpio_data,
-       .usb            = &overo_usb_data,
-       .codec          = &overo_codec_data,
        .vmmc1          = &overo_vmmc1,
-       .vdac           = &overo_vdac,
-       .vpll2          = &overo_vpll2,
 };
 
 static int __init overo_i2c_init(void)
 {
+       omap3_pmic_get_config(&overo_twldata,
+                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
+                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
+
+       overo_twldata.vpll2->constraints.name = "VDVI";
+
        omap3_pmic_init("tps65950", &overo_twldata);
        /* i2c2 pins are used for gpio */
        omap_register_i2c_bus(3, 400, NULL, 0);
@@ -615,7 +566,7 @@ MACHINE_START(OVERO, "Gumstix Overo")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = overo_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = overo_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 42d10b12da3ccedadacf35f05be4273b37214964..7dfed24ee12eccfb776d86ed8bbceb39cf632c84 100644 (file)
@@ -79,20 +79,14 @@ static struct twl4030_gpio_platform_data rm680_gpio_data = {
        .pulldowns              = BIT(1) | BIT(2) | BIT(8) | BIT(15),
 };
 
-static struct twl4030_usb_data rm680_usb_data = {
-       .usb_mode               = T2_USB_MODE_ULPI,
-};
-
 static struct twl4030_platform_data rm680_twl_data = {
-       .irq_base               = TWL4030_IRQ_BASE,
-       .irq_end                = TWL4030_IRQ_END,
        .gpio                   = &rm680_gpio_data,
-       .usb                    = &rm680_usb_data,
        /* add rest of the children here */
 };
 
 static void __init rm680_i2c_init(void)
 {
+       omap3_pmic_get_config(&rm680_twl_data, TWL_COMMON_PDATA_USB, 0);
        omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data);
        omap_register_i2c_bus(2, 400, NULL, 0);
        omap_register_i2c_bus(3, 400, NULL, 0);
@@ -163,7 +157,7 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
        .reserve        = omap_reserve,
        .map_io         = rm680_map_io,
        .init_early     = rm680_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = rm680_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 88bd6f7705f0317808575cd8ecda856e4e36ec87..bdb24db360043dad0e3181be17c38317eb574a9d 100644 (file)
@@ -288,10 +288,6 @@ static struct twl4030_keypad_data rx51_kp_data = {
        .rep            = 1,
 };
 
-static struct twl4030_madc_platform_data rx51_madc_data = {
-       .irq_line               = 1,
-};
-
 /* Enable input logic and pull all lines up when eMMC is on. */
 static struct omap_board_mux rx51_mmc2_on_mux[] = {
        OMAP3_MUX(SDMMC2_CMD, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
@@ -358,14 +354,17 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
        {}      /* Terminator */
 };
 
-static struct regulator_consumer_supply rx51_vmmc1_supply =
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
+static struct regulator_consumer_supply rx51_vmmc1_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
+};
 
-static struct regulator_consumer_supply rx51_vaux3_supply =
-       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
+static struct regulator_consumer_supply rx51_vaux3_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
+};
 
-static struct regulator_consumer_supply rx51_vsim_supply =
-       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
+static struct regulator_consumer_supply rx51_vsim_supply[] = {
+       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"),
+};
 
 static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {
        /* tlv320aic3x analog supplies */
@@ -395,10 +394,6 @@ static struct regulator_consumer_supply rx51_vaux1_consumers[] = {
        REGULATOR_SUPPLY("vdd", "2-0063"),
 };
 
-static struct regulator_consumer_supply rx51_vdac_supply[] = {
-       REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
-};
-
 static struct regulator_init_data rx51_vaux1 = {
        .constraints = {
                .name                   = "V28",
@@ -452,8 +447,8 @@ static struct regulator_init_data rx51_vaux3_mmc = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &rx51_vaux3_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(rx51_vaux3_supply),
+       .consumer_supplies      = rx51_vaux3_supply,
 };
 
 static struct regulator_init_data rx51_vaux4 = {
@@ -479,8 +474,8 @@ static struct regulator_init_data rx51_vmmc1 = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &rx51_vmmc1_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(rx51_vmmc1_supply),
+       .consumer_supplies      = rx51_vmmc1_supply,
 };
 
 static struct regulator_init_data rx51_vmmc2 = {
@@ -511,23 +506,8 @@ static struct regulator_init_data rx51_vsim = {
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &rx51_vsim_supply,
-};
-
-static struct regulator_init_data rx51_vdac = {
-       .constraints = {
-               .name                   = "VDAC",
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = rx51_vdac_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(rx51_vsim_supply),
+       .consumer_supplies      = rx51_vsim_supply,
 };
 
 static struct regulator_init_data rx51_vio = {
@@ -600,10 +580,6 @@ static struct twl4030_gpio_platform_data rx51_gpio_data = {
        .setup                  = rx51_twlgpio_setup,
 };
 
-static struct twl4030_usb_data rx51_usb_data = {
-       .usb_mode               = T2_USB_MODE_ULPI,
-};
-
 static struct twl4030_ins sleep_on_seq[] __initdata = {
 /*
  * Turn off everything
@@ -775,14 +751,9 @@ struct twl4030_codec_data rx51_codec_data __initdata = {
 };
 
 static struct twl4030_platform_data rx51_twldata __initdata = {
-       .irq_base               = TWL4030_IRQ_BASE,
-       .irq_end                = TWL4030_IRQ_END,
-
        /* platform_data for children goes here */
        .gpio                   = &rx51_gpio_data,
        .keypad                 = &rx51_kp_data,
-       .madc                   = &rx51_madc_data,
-       .usb                    = &rx51_usb_data,
        .power                  = &rx51_t2scripts_data,
        .codec                  = &rx51_codec_data,
 
@@ -791,7 +762,6 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
        .vaux4                  = &rx51_vaux4,
        .vmmc1                  = &rx51_vmmc1,
        .vsim                   = &rx51_vsim,
-       .vdac                   = &rx51_vdac,
        .vio                    = &rx51_vio,
 };
 
@@ -847,6 +817,13 @@ static int __init rx51_i2c_init(void)
                rx51_twldata.vaux3 = &rx51_vaux3_cam;
        }
        rx51_twldata.vmmc2 = &rx51_vmmc2;
+       omap3_pmic_get_config(&rx51_twldata,
+                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC,
+                       TWL_COMMON_REGULATOR_VDAC);
+
+       rx51_twldata.vdac->constraints.apply_uV = true;
+       rx51_twldata.vdac->constraints.name = "VDAC";
+
        omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata);
        omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2,
                              ARRAY_SIZE(rx51_peripherals_i2c_board_info_2));
index fec4cac8fa0ab858fd6c09f55af0b08ce8e0ad1a..5ea142f9bc9741368928ca83e09b3573947c7021 100644 (file)
@@ -160,7 +160,7 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
        .reserve        = rx51_reserve,
        .map_io         = rx51_map_io,
        .init_early     = rx51_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = rx51_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 09fa7bfff8d6b2a75a170caab975e1f08b29b93f..a85d5b0b11da23cfafc831d3c53e64a2e7ac93ed 100644 (file)
@@ -33,11 +33,6 @@ static void __init ti8168_init_early(void)
        omap2_init_common_devices(NULL, NULL);
 }
 
-static void __init ti8168_evm_init_irq(void)
-{
-       omap_init_irq();
-}
-
 static void __init ti8168_evm_init(void)
 {
        omap_serial_init();
@@ -56,7 +51,7 @@ MACHINE_START(TI8168EVM, "ti8168evm")
        .boot_params    = 0x80000100,
        .map_io         = ti8168_evm_map_io,
        .init_early     = ti8168_init_early,
-       .init_irq       = ti8168_evm_init_irq,
-       .timer          = &omap_timer,
+       .init_irq       = ti816x_init_irq,
+       .timer          = &omap3_timer,
        .init_machine   = ti8168_evm_init,
 MACHINE_END
index 118c6f53c5eb00f3815ba3f21d72623aacdcc828..13a644233667d9ee54995d018d6eb044bde808d7 100644 (file)
@@ -105,21 +105,20 @@ static struct twl4030_keypad_data zoom_kp_twl4030_data = {
        .rep            = 1,
 };
 
-static struct regulator_consumer_supply zoom_vmmc1_supply = {
-       .supply         = "vmmc",
+static struct regulator_consumer_supply zoom_vmmc1_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 };
 
-static struct regulator_consumer_supply zoom_vsim_supply = {
-       .supply         = "vmmc_aux",
+static struct regulator_consumer_supply zoom_vsim_supply[] = {
+       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
 };
 
-static struct regulator_consumer_supply zoom_vmmc2_supply = {
-       .supply         = "vmmc",
+static struct regulator_consumer_supply zoom_vmmc2_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
 };
 
-static struct regulator_consumer_supply zoom_vmmc3_supply = {
-       .supply         = "vmmc",
-       .dev_name       = "omap_hsmmc.2",
+static struct regulator_consumer_supply zoom_vmmc3_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"),
 };
 
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
@@ -133,8 +132,8 @@ static struct regulator_init_data zoom_vmmc1 = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &zoom_vmmc1_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(zoom_vmmc1_supply),
+       .consumer_supplies      = zoom_vmmc1_supply,
 };
 
 /* VMMC2 for MMC2 card */
@@ -148,8 +147,8 @@ static struct regulator_init_data zoom_vmmc2 = {
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &zoom_vmmc2_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(zoom_vmmc2_supply),
+       .consumer_supplies      = zoom_vmmc2_supply,
 };
 
 /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
@@ -163,16 +162,16 @@ static struct regulator_init_data zoom_vsim = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &zoom_vsim_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(zoom_vsim_supply),
+       .consumer_supplies      = zoom_vsim_supply,
 };
 
 static struct regulator_init_data zoom_vmmc3 = {
        .constraints = {
                .valid_ops_mask = REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies = &zoom_vmmc3_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(zoom_vmmc3_supply),
+       .consumer_supplies      = zoom_vmmc3_supply,
 };
 
 static struct fixed_voltage_config zoom_vwlan = {
@@ -227,40 +226,6 @@ static struct omap2_hsmmc_info mmc[] = {
        {}      /* Terminator */
 };
 
-static struct regulator_consumer_supply zoom_vpll2_supplies[] = {
-       REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
-       REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
-};
-
-static struct regulator_consumer_supply zoom_vdda_dac_supply =
-       REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
-
-static struct regulator_init_data zoom_vpll2 = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies          = ARRAY_SIZE(zoom_vpll2_supplies),
-       .consumer_supplies              = zoom_vpll2_supplies,
-};
-
-static struct regulator_init_data zoom_vdac = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask         = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies          = 1,
-       .consumer_supplies              = &zoom_vdda_dac_supply,
-};
-
 static int zoom_twl_gpio_setup(struct device *dev,
                unsigned gpio, unsigned ngpio)
 {
@@ -270,13 +235,6 @@ static int zoom_twl_gpio_setup(struct device *dev,
        mmc[0].gpio_cd = gpio + 0;
        omap2_hsmmc_init(mmc);
 
-       /* link regulators to MMC adapters ... we "know" the
-        * regulators will be set up only *after* we return.
-       */
-       zoom_vmmc1_supply.dev = mmc[0].dev;
-       zoom_vsim_supply.dev = mmc[0].dev;
-       zoom_vmmc2_supply.dev = mmc[1].dev;
-
        ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW,
                               "lcd enable");
        if (ret)
@@ -292,26 +250,6 @@ static void zoom2_set_hs_extmute(int mute)
        gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute);
 }
 
-static int zoom_batt_table[] = {
-/* 0 C*/
-30800, 29500, 28300, 27100,
-26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
-17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
-11600, 11200, 10800, 10400, 10000, 9630,  9280,  8950,  8620,  8310,
-8020,  7730,  7460,  7200,  6950,  6710,  6470,  6250,  6040,  5830,
-5640,  5450,  5260,  5090,  4920,  4760,  4600,  4450,  4310,  4170,
-4040,  3910,  3790,  3670,  3550
-};
-
-static struct twl4030_bci_platform_data zoom_bci_data = {
-       .battery_tmp_tbl        = zoom_batt_table,
-       .tblsize                = ARRAY_SIZE(zoom_batt_table),
-};
-
-static struct twl4030_usb_data zoom_usb_data = {
-       .usb_mode       = T2_USB_MODE_ULPI,
-};
-
 static struct twl4030_gpio_platform_data zoom_gpio_data = {
        .gpio_base      = OMAP_MAX_GPIO_LINES,
        .irq_base       = TWL4030_GPIO_IRQ_BASE,
@@ -319,41 +257,29 @@ static struct twl4030_gpio_platform_data zoom_gpio_data = {
        .setup          = zoom_twl_gpio_setup,
 };
 
-static struct twl4030_madc_platform_data zoom_madc_data = {
-       .irq_line       = 1,
-};
-
-static struct twl4030_codec_audio_data zoom_audio_data;
-
-static struct twl4030_codec_data zoom_codec_data = {
-       .audio_mclk = 26000000,
-       .audio = &zoom_audio_data,
-};
-
 static struct twl4030_platform_data zoom_twldata = {
-       .irq_base       = TWL4030_IRQ_BASE,
-       .irq_end        = TWL4030_IRQ_END,
-
        /* platform_data for children goes here */
-       .bci            = &zoom_bci_data,
-       .madc           = &zoom_madc_data,
-       .usb            = &zoom_usb_data,
        .gpio           = &zoom_gpio_data,
        .keypad         = &zoom_kp_twl4030_data,
-       .codec          = &zoom_codec_data,
        .vmmc1          = &zoom_vmmc1,
        .vmmc2          = &zoom_vmmc2,
        .vsim           = &zoom_vsim,
-       .vpll2          = &zoom_vpll2,
-       .vdac           = &zoom_vdac,
 };
 
 static int __init omap_i2c_init(void)
 {
+       omap3_pmic_get_config(&zoom_twldata,
+                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
+                       TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO,
+                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
+
        if (machine_is_omap_zoom2()) {
-               zoom_audio_data.ramp_delay_value = 3;   /* 161 ms */
-               zoom_audio_data.hs_extmute = 1;
-               zoom_audio_data.set_hs_extmute = zoom2_set_hs_extmute;
+               struct twl4030_codec_audio_data *audio_data;
+               audio_data = zoom_twldata.codec->audio;
+
+               audio_data->ramp_delay_value = 3;       /* 161 ms */
+               audio_data->hs_extmute = 1;
+               audio_data->set_hs_extmute = zoom2_set_hs_extmute;
        }
        omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata);
        omap_register_i2c_bus(2, 400, NULL, 0);
index 4b133d75c9354ae1da9e08615ba336e78830519d..8a98c3c303fc6a46fa9d0a26efa36cec9da6cf88 100644 (file)
@@ -137,9 +137,9 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap_zoom_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap_zoom_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
 
 MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
@@ -147,7 +147,7 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap_zoom_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap_zoom_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 6be1095936db2348a26ce02b4c20d578f8c99579..7ceb870e7ab8d6abf330227c0f266eb8aef03561 100644 (file)
@@ -8,13 +8,6 @@
 #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H
 #define __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H
 
-/*
- * XXX Missing values for the OMAP4 DPLL_USB
- * XXX Missing min_multiplier values for all OMAP4 DPLLs
- */
-#define OMAP4430_MAX_DPLL_MULT 2047
-#define OMAP4430_MAX_DPLL_DIV  128
-
 int omap4xxx_clk_init(void);
 
 #endif
index 8c965671b4d486aae235439483204ccef4d2fbe7..044df38f65ce951c01a11729b09030023b0ee465 100644 (file)
@@ -53,9 +53,9 @@ static struct clk extalt_clkin_ck = {
 static struct clk pad_clks_ck = {
        .name           = "pad_clks_ck",
        .rate           = 12000000,
-       .ops            = &clkops_omap2_dflt,
-       .enable_reg     = OMAP4430_CM_CLKSEL_ABE,
-       .enable_bit     = OMAP4430_PAD_CLKS_GATE_SHIFT,
+       .ops            = &clkops_omap2_dflt,
+       .enable_reg     = OMAP4430_CM_CLKSEL_ABE,
+       .enable_bit     = OMAP4430_PAD_CLKS_GATE_SHIFT,
 };
 
 static struct clk pad_slimbus_core_clks_ck = {
@@ -73,9 +73,9 @@ static struct clk secure_32k_clk_src_ck = {
 static struct clk slimbus_clk = {
        .name           = "slimbus_clk",
        .rate           = 12000000,
-       .ops            = &clkops_omap2_dflt,
-       .enable_reg     = OMAP4430_CM_CLKSEL_ABE,
-       .enable_bit     = OMAP4430_SLIMBUS_CLK_GATE_SHIFT,
+       .ops            = &clkops_omap2_dflt,
+       .enable_reg     = OMAP4430_CM_CLKSEL_ABE,
+       .enable_bit     = OMAP4430_SLIMBUS_CLK_GATE_SHIFT,
 };
 
 static struct clk sys_32k_ck = {
@@ -258,8 +258,8 @@ static struct dpll_data dpll_abe_dd = {
        .enable_mask    = OMAP4430_DPLL_EN_MASK,
        .autoidle_mask  = OMAP4430_AUTO_DPLL_MODE_MASK,
        .idlest_mask    = OMAP4430_ST_DPLL_CLK_MASK,
-       .max_multiplier = OMAP4430_MAX_DPLL_MULT,
-       .max_divider    = OMAP4430_MAX_DPLL_DIV,
+       .max_multiplier = 2047,
+       .max_divider    = 128,
        .min_divider    = 1,
 };
 
@@ -278,10 +278,10 @@ static struct clk dpll_abe_ck = {
 static struct clk dpll_abe_x2_ck = {
        .name           = "dpll_abe_x2_ck",
        .parent         = &dpll_abe_ck,
+       .clksel_reg     = OMAP4430_CM_DIV_M2_DPLL_ABE,
        .flags          = CLOCK_CLKOUTX2,
        .ops            = &clkops_omap4_dpllmx_ops,
        .recalc         = &omap3_clkoutx2_recalc,
-       .clksel_reg     = OMAP4430_CM_DIV_M2_DPLL_ABE,
 };
 
 static const struct clksel_rate div31_1to31_rates[] = {
@@ -434,8 +434,8 @@ static struct dpll_data dpll_core_dd = {
        .enable_mask    = OMAP4430_DPLL_EN_MASK,
        .autoidle_mask  = OMAP4430_AUTO_DPLL_MODE_MASK,
        .idlest_mask    = OMAP4430_ST_DPLL_CLK_MASK,
-       .max_multiplier = OMAP4430_MAX_DPLL_MULT,
-       .max_divider    = OMAP4430_MAX_DPLL_DIV,
+       .max_multiplier = 2047,
+       .max_divider    = 128,
        .min_divider    = 1,
 };
 
@@ -622,11 +622,11 @@ static struct clk dpll_core_m3x2_ck = {
        .clksel_reg     = OMAP4430_CM_DIV_M3_DPLL_CORE,
        .clksel_mask    = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK,
        .ops            = &clkops_omap2_dflt,
-       .enable_reg     = OMAP4430_CM_DIV_M3_DPLL_CORE,
-       .enable_bit     = OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT,
        .recalc         = &omap2_clksel_recalc,
        .round_rate     = &omap2_clksel_round_rate,
        .set_rate       = &omap2_clksel_set_rate,
+       .enable_reg     = OMAP4430_CM_DIV_M3_DPLL_CORE,
+       .enable_bit     = OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT,
 };
 
 static struct clk dpll_core_m7x2_ck = {
@@ -672,8 +672,8 @@ static struct dpll_data dpll_iva_dd = {
        .enable_mask    = OMAP4430_DPLL_EN_MASK,
        .autoidle_mask  = OMAP4430_AUTO_DPLL_MODE_MASK,
        .idlest_mask    = OMAP4430_ST_DPLL_CLK_MASK,
-       .max_multiplier = OMAP4430_MAX_DPLL_MULT,
-       .max_divider    = OMAP4430_MAX_DPLL_DIV,
+       .max_multiplier = 2047,
+       .max_divider    = 128,
        .min_divider    = 1,
 };
 
@@ -740,8 +740,8 @@ static struct dpll_data dpll_mpu_dd = {
        .enable_mask    = OMAP4430_DPLL_EN_MASK,
        .autoidle_mask  = OMAP4430_AUTO_DPLL_MODE_MASK,
        .idlest_mask    = OMAP4430_ST_DPLL_CLK_MASK,
-       .max_multiplier = OMAP4430_MAX_DPLL_MULT,
-       .max_divider    = OMAP4430_MAX_DPLL_DIV,
+       .max_multiplier = 2047,
+       .max_divider    = 128,
        .min_divider    = 1,
 };
 
@@ -813,8 +813,8 @@ static struct dpll_data dpll_per_dd = {
        .enable_mask    = OMAP4430_DPLL_EN_MASK,
        .autoidle_mask  = OMAP4430_AUTO_DPLL_MODE_MASK,
        .idlest_mask    = OMAP4430_ST_DPLL_CLK_MASK,
-       .max_multiplier = OMAP4430_MAX_DPLL_MULT,
-       .max_divider    = OMAP4430_MAX_DPLL_DIV,
+       .max_multiplier = 2047,
+       .max_divider    = 128,
        .min_divider    = 1,
 };
 
@@ -850,10 +850,10 @@ static struct clk dpll_per_m2_ck = {
 static struct clk dpll_per_x2_ck = {
        .name           = "dpll_per_x2_ck",
        .parent         = &dpll_per_ck,
+       .clksel_reg     = OMAP4430_CM_DIV_M2_DPLL_PER,
        .flags          = CLOCK_CLKOUTX2,
        .ops            = &clkops_omap4_dpllmx_ops,
        .recalc         = &omap3_clkoutx2_recalc,
-       .clksel_reg     = OMAP4430_CM_DIV_M2_DPLL_PER,
 };
 
 static const struct clksel dpll_per_m2x2_div[] = {
@@ -880,11 +880,11 @@ static struct clk dpll_per_m3x2_ck = {
        .clksel_reg     = OMAP4430_CM_DIV_M3_DPLL_PER,
        .clksel_mask    = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK,
        .ops            = &clkops_omap2_dflt,
-       .enable_reg     = OMAP4430_CM_DIV_M3_DPLL_PER,
-       .enable_bit     = OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT,
        .recalc         = &omap2_clksel_recalc,
        .round_rate     = &omap2_clksel_round_rate,
        .set_rate       = &omap2_clksel_set_rate,
+       .enable_reg     = OMAP4430_CM_DIV_M3_DPLL_PER,
+       .enable_bit     = OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT,
 };
 
 static struct clk dpll_per_m4x2_ck = {
@@ -935,63 +935,6 @@ static struct clk dpll_per_m7x2_ck = {
        .set_rate       = &omap2_clksel_set_rate,
 };
 
-/* DPLL_UNIPRO */
-static struct dpll_data dpll_unipro_dd = {
-       .mult_div1_reg  = OMAP4430_CM_CLKSEL_DPLL_UNIPRO,
-       .clk_bypass     = &sys_clkin_ck,
-       .clk_ref        = &sys_clkin_ck,
-       .control_reg    = OMAP4430_CM_CLKMODE_DPLL_UNIPRO,
-       .modes          = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
-       .autoidle_reg   = OMAP4430_CM_AUTOIDLE_DPLL_UNIPRO,
-       .idlest_reg     = OMAP4430_CM_IDLEST_DPLL_UNIPRO,
-       .mult_mask      = OMAP4430_DPLL_MULT_MASK,
-       .div1_mask      = OMAP4430_DPLL_DIV_MASK,
-       .enable_mask    = OMAP4430_DPLL_EN_MASK,
-       .autoidle_mask  = OMAP4430_AUTO_DPLL_MODE_MASK,
-       .idlest_mask    = OMAP4430_ST_DPLL_CLK_MASK,
-       .sddiv_mask     = OMAP4430_DPLL_SD_DIV_MASK,
-       .max_multiplier = OMAP4430_MAX_DPLL_MULT,
-       .max_divider    = OMAP4430_MAX_DPLL_DIV,
-       .min_divider    = 1,
-};
-
-
-static struct clk dpll_unipro_ck = {
-       .name           = "dpll_unipro_ck",
-       .parent         = &sys_clkin_ck,
-       .dpll_data      = &dpll_unipro_dd,
-       .init           = &omap2_init_dpll_parent,
-       .ops            = &clkops_omap3_noncore_dpll_ops,
-       .recalc         = &omap3_dpll_recalc,
-       .round_rate     = &omap2_dpll_round_rate,
-       .set_rate       = &omap3_noncore_dpll_set_rate,
-};
-
-static struct clk dpll_unipro_x2_ck = {
-       .name           = "dpll_unipro_x2_ck",
-       .parent         = &dpll_unipro_ck,
-       .flags          = CLOCK_CLKOUTX2,
-       .ops            = &clkops_null,
-       .recalc         = &omap3_clkoutx2_recalc,
-};
-
-static const struct clksel dpll_unipro_m2x2_div[] = {
-       { .parent = &dpll_unipro_x2_ck, .rates = div31_1to31_rates },
-       { .parent = NULL },
-};
-
-static struct clk dpll_unipro_m2x2_ck = {
-       .name           = "dpll_unipro_m2x2_ck",
-       .parent         = &dpll_unipro_x2_ck,
-       .clksel         = dpll_unipro_m2x2_div,
-       .clksel_reg     = OMAP4430_CM_DIV_M2_DPLL_UNIPRO,
-       .clksel_mask    = OMAP4430_DPLL_CLKOUT_DIV_MASK,
-       .ops            = &clkops_omap4_dpllmx_ops,
-       .recalc         = &omap2_clksel_recalc,
-       .round_rate     = &omap2_clksel_round_rate,
-       .set_rate       = &omap2_clksel_set_rate,
-};
-
 static struct clk usb_hs_clk_div_ck = {
        .name           = "usb_hs_clk_div_ck",
        .parent         = &dpll_abe_m3x2_ck,
@@ -1015,8 +958,9 @@ static struct dpll_data dpll_usb_dd = {
        .enable_mask    = OMAP4430_DPLL_EN_MASK,
        .autoidle_mask  = OMAP4430_AUTO_DPLL_MODE_MASK,
        .idlest_mask    = OMAP4430_ST_DPLL_CLK_MASK,
-       .max_multiplier = OMAP4430_MAX_DPLL_MULT,
-       .max_divider    = OMAP4430_MAX_DPLL_DIV,
+       .sddiv_mask     = OMAP4430_DPLL_SD_DIV_MASK,
+       .max_multiplier = 4095,
+       .max_divider    = 256,
        .min_divider    = 1,
 };
 
@@ -1035,8 +979,8 @@ static struct clk dpll_usb_ck = {
 static struct clk dpll_usb_clkdcoldo_ck = {
        .name           = "dpll_usb_clkdcoldo_ck",
        .parent         = &dpll_usb_ck,
-       .ops            = &clkops_omap4_dpllmx_ops,
        .clksel_reg     = OMAP4430_CM_CLKDCOLDO_DPLL_USB,
+       .ops            = &clkops_omap4_dpllmx_ops,
        .recalc         = &followparent_recalc,
 };
 
@@ -1169,19 +1113,6 @@ static struct clk func_96m_fclk = {
        .set_rate       = &omap2_clksel_set_rate,
 };
 
-static const struct clksel hsmmc6_fclk_sel[] = {
-       { .parent = &func_64m_fclk, .rates = div_1_0_rates },
-       { .parent = &func_96m_fclk, .rates = div_1_1_rates },
-       { .parent = NULL },
-};
-
-static struct clk hsmmc6_fclk = {
-       .name           = "hsmmc6_fclk",
-       .parent         = &func_64m_fclk,
-       .ops            = &clkops_null,
-       .recalc         = &followparent_recalc,
-};
-
 static const struct clksel_rate div2_1to8_rates[] = {
        { .div = 1, .val = 0, .flags = RATE_IN_4430 },
        { .div = 8, .val = 1, .flags = RATE_IN_4430 },
@@ -1264,6 +1195,21 @@ static struct clk l4_wkup_clk_mux_ck = {
        .recalc         = &omap2_clksel_recalc,
 };
 
+static struct clk ocp_abe_iclk = {
+       .name           = "ocp_abe_iclk",
+       .parent         = &aess_fclk,
+       .ops            = &clkops_null,
+       .recalc         = &followparent_recalc,
+};
+
+static struct clk per_abe_24m_fclk = {
+       .name           = "per_abe_24m_fclk",
+       .parent         = &dpll_abe_m2_ck,
+       .ops            = &clkops_null,
+       .fixed_div      = 4,
+       .recalc         = &omap_fixed_divisor_recalc,
+};
+
 static const struct clksel per_abe_nc_fclk_div[] = {
        { .parent = &dpll_abe_m2_ck, .rates = div2_1to2_rates },
        { .parent = NULL },
@@ -1281,41 +1227,6 @@ static struct clk per_abe_nc_fclk = {
        .set_rate       = &omap2_clksel_set_rate,
 };
 
-static const struct clksel mcasp2_fclk_sel[] = {
-       { .parent = &func_96m_fclk, .rates = div_1_0_rates },
-       { .parent = &per_abe_nc_fclk, .rates = div_1_1_rates },
-       { .parent = NULL },
-};
-
-static struct clk mcasp2_fclk = {
-       .name           = "mcasp2_fclk",
-       .parent         = &func_96m_fclk,
-       .ops            = &clkops_null,
-       .recalc         = &followparent_recalc,
-};
-
-static struct clk mcasp3_fclk = {
-       .name           = "mcasp3_fclk",
-       .parent         = &func_96m_fclk,
-       .ops            = &clkops_null,
-       .recalc         = &followparent_recalc,
-};
-
-static struct clk ocp_abe_iclk = {
-       .name           = "ocp_abe_iclk",
-       .parent         = &aess_fclk,
-       .ops            = &clkops_null,
-       .recalc         = &followparent_recalc,
-};
-
-static struct clk per_abe_24m_fclk = {
-       .name           = "per_abe_24m_fclk",
-       .parent         = &dpll_abe_m2_ck,
-       .ops            = &clkops_null,
-       .fixed_div      = 4,
-       .recalc         = &omap_fixed_divisor_recalc,
-};
-
 static const struct clksel pmd_stm_clock_mux_sel[] = {
        { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
        { .parent = &dpll_core_m6x2_ck, .rates = div_1_1_rates },
@@ -1846,8 +1757,8 @@ static struct clk l3_instr_ick = {
        .ops            = &clkops_omap2_dflt,
        .enable_reg     = OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL,
        .enable_bit     = OMAP4430_MODULEMODE_HWCTRL,
-       .clkdm_name     = "l3_instr_clkdm",
        .flags          = ENABLE_ON_INIT,
+       .clkdm_name     = "l3_instr_clkdm",
        .parent         = &l3_div_ck,
        .recalc         = &followparent_recalc,
 };
@@ -1857,8 +1768,8 @@ static struct clk l3_main_3_ick = {
        .ops            = &clkops_omap2_dflt,
        .enable_reg     = OMAP4430_CM_L3INSTR_L3_3_CLKCTRL,
        .enable_bit     = OMAP4430_MODULEMODE_HWCTRL,
-       .clkdm_name     = "l3_instr_clkdm",
        .flags          = ENABLE_ON_INIT,
+       .clkdm_name     = "l3_instr_clkdm",
        .parent         = &l3_div_ck,
        .recalc         = &followparent_recalc,
 };
@@ -1995,10 +1906,16 @@ static struct clk mcbsp3_fck = {
        .clkdm_name     = "abe_clkdm",
 };
 
+static const struct clksel mcbsp4_sync_mux_sel[] = {
+       { .parent = &func_96m_fclk, .rates = div_1_0_rates },
+       { .parent = &per_abe_nc_fclk, .rates = div_1_1_rates },
+       { .parent = NULL },
+};
+
 static struct clk mcbsp4_sync_mux_ck = {
        .name           = "mcbsp4_sync_mux_ck",
        .parent         = &func_96m_fclk,
-       .clksel         = mcasp2_fclk_sel,
+       .clksel         = mcbsp4_sync_mux_sel,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL,
        .clksel_mask    = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
@@ -2077,11 +1994,17 @@ static struct clk mcspi4_fck = {
        .recalc         = &followparent_recalc,
 };
 
+static const struct clksel hsmmc1_fclk_sel[] = {
+       { .parent = &func_64m_fclk, .rates = div_1_0_rates },
+       { .parent = &func_96m_fclk, .rates = div_1_1_rates },
+       { .parent = NULL },
+};
+
 /* Merged hsmmc1_fclk into mmc1 */
 static struct clk mmc1_fck = {
        .name           = "mmc1_fck",
        .parent         = &func_64m_fclk,
-       .clksel         = hsmmc6_fclk_sel,
+       .clksel         = hsmmc1_fclk_sel,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP4430_CM_L3INIT_MMC1_CLKCTRL,
        .clksel_mask    = OMAP4430_CLKSEL_MASK,
@@ -2096,7 +2019,7 @@ static struct clk mmc1_fck = {
 static struct clk mmc2_fck = {
        .name           = "mmc2_fck",
        .parent         = &func_64m_fclk,
-       .clksel         = hsmmc6_fclk_sel,
+       .clksel         = hsmmc1_fclk_sel,
        .init           = &omap2_init_clksel_parent,
        .clksel_reg     = OMAP4430_CM_L3INIT_MMC2_CLKCTRL,
        .clksel_mask    = OMAP4430_CLKSEL_MASK,
@@ -2162,8 +2085,8 @@ static struct clk ocp_wp_noc_ick = {
        .ops            = &clkops_omap2_dflt,
        .enable_reg     = OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL,
        .enable_bit     = OMAP4430_MODULEMODE_HWCTRL,
-       .clkdm_name     = "l3_instr_clkdm",
        .flags          = ENABLE_ON_INIT,
+       .clkdm_name     = "l3_instr_clkdm",
        .parent         = &l3_div_ck,
        .recalc         = &followparent_recalc,
 };
@@ -2895,6 +2818,7 @@ static struct clk auxclk2_ck = {
        .enable_reg     = OMAP4_SCRM_AUXCLK2,
        .enable_bit     = OMAP4_ENABLE_SHIFT,
 };
+
 static struct clk auxclk3_ck = {
        .name           = "auxclk3_ck",
        .parent         = &sys_clkin_ck,
@@ -3077,9 +3001,6 @@ static struct omap_clk omap44xx_clks[] = {
        CLK(NULL,       "dpll_per_m5x2_ck",             &dpll_per_m5x2_ck,      CK_443X),
        CLK(NULL,       "dpll_per_m6x2_ck",             &dpll_per_m6x2_ck,      CK_443X),
        CLK(NULL,       "dpll_per_m7x2_ck",             &dpll_per_m7x2_ck,      CK_443X),
-       CLK(NULL,       "dpll_unipro_ck",               &dpll_unipro_ck,        CK_443X),
-       CLK(NULL,       "dpll_unipro_x2_ck",            &dpll_unipro_x2_ck,     CK_443X),
-       CLK(NULL,       "dpll_unipro_m2x2_ck",          &dpll_unipro_m2x2_ck,   CK_443X),
        CLK(NULL,       "usb_hs_clk_div_ck",            &usb_hs_clk_div_ck,     CK_443X),
        CLK(NULL,       "dpll_usb_ck",                  &dpll_usb_ck,   CK_443X),
        CLK(NULL,       "dpll_usb_clkdcoldo_ck",        &dpll_usb_clkdcoldo_ck, CK_443X),
@@ -3092,17 +3013,14 @@ static struct omap_clk omap44xx_clks[] = {
        CLK(NULL,       "func_48mc_fclk",               &func_48mc_fclk,        CK_443X),
        CLK(NULL,       "func_64m_fclk",                &func_64m_fclk, CK_443X),
        CLK(NULL,       "func_96m_fclk",                &func_96m_fclk, CK_443X),
-       CLK(NULL,       "hsmmc6_fclk",                  &hsmmc6_fclk,   CK_443X),
        CLK(NULL,       "init_60m_fclk",                &init_60m_fclk, CK_443X),
        CLK(NULL,       "l3_div_ck",                    &l3_div_ck,     CK_443X),
        CLK(NULL,       "l4_div_ck",                    &l4_div_ck,     CK_443X),
        CLK(NULL,       "lp_clk_div_ck",                &lp_clk_div_ck, CK_443X),
        CLK(NULL,       "l4_wkup_clk_mux_ck",           &l4_wkup_clk_mux_ck,    CK_443X),
-       CLK(NULL,       "per_abe_nc_fclk",              &per_abe_nc_fclk,       CK_443X),
-       CLK(NULL,       "mcasp2_fclk",                  &mcasp2_fclk,   CK_443X),
-       CLK(NULL,       "mcasp3_fclk",                  &mcasp3_fclk,   CK_443X),
        CLK(NULL,       "ocp_abe_iclk",                 &ocp_abe_iclk,  CK_443X),
        CLK(NULL,       "per_abe_24m_fclk",             &per_abe_24m_fclk,      CK_443X),
+       CLK(NULL,       "per_abe_nc_fclk",              &per_abe_nc_fclk,       CK_443X),
        CLK(NULL,       "pmd_stm_clock_mux_ck",         &pmd_stm_clock_mux_ck,  CK_443X),
        CLK(NULL,       "pmd_trace_clk_mux_ck",         &pmd_trace_clk_mux_ck,  CK_443X),
        CLK(NULL,       "syc_clk_div_ck",               &syc_clk_div_ck,        CK_443X),
@@ -3204,7 +3122,6 @@ static struct omap_clk omap44xx_clks[] = {
        CLK(NULL,       "uart2_fck",                    &uart2_fck,     CK_443X),
        CLK(NULL,       "uart3_fck",                    &uart3_fck,     CK_443X),
        CLK(NULL,       "uart4_fck",                    &uart4_fck,     CK_443X),
-       CLK(NULL,       "usb_host_fs_fck",              &usb_host_fs_fck,       CK_443X),
        CLK("usbhs-omap.0",     "fs_fck",               &usb_host_fs_fck,       CK_443X),
        CLK(NULL,       "utmi_p1_gfclk",                &utmi_p1_gfclk, CK_443X),
        CLK(NULL,       "usb_host_hs_utmi_p1_clk",      &usb_host_hs_utmi_p1_clk,       CK_443X),
@@ -3216,9 +3133,7 @@ static struct omap_clk omap44xx_clks[] = {
        CLK(NULL,       "usb_host_hs_hsic60m_p2_clk",   &usb_host_hs_hsic60m_p2_clk,    CK_443X),
        CLK(NULL,       "usb_host_hs_hsic480m_p2_clk",  &usb_host_hs_hsic480m_p2_clk,   CK_443X),
        CLK(NULL,       "usb_host_hs_func48mclk",       &usb_host_hs_func48mclk,        CK_443X),
-       CLK(NULL,       "usb_host_hs_fck",              &usb_host_hs_fck,       CK_443X),
        CLK("usbhs-omap.0",     "hs_fck",               &usb_host_hs_fck,       CK_443X),
-       CLK("usbhs-omap.0",     "usbhost_ick",          &dummy_ck,              CK_443X),
        CLK(NULL,       "otg_60m_gfclk",                &otg_60m_gfclk, CK_443X),
        CLK(NULL,       "usb_otg_hs_xclk",              &usb_otg_hs_xclk,       CK_443X),
        CLK("musb-omap2430",    "ick",                          &usb_otg_hs_ick,        CK_443X),
@@ -3226,17 +3141,26 @@ static struct omap_clk omap44xx_clks[] = {
        CLK(NULL,       "usb_tll_hs_usb_ch2_clk",       &usb_tll_hs_usb_ch2_clk,        CK_443X),
        CLK(NULL,       "usb_tll_hs_usb_ch0_clk",       &usb_tll_hs_usb_ch0_clk,        CK_443X),
        CLK(NULL,       "usb_tll_hs_usb_ch1_clk",       &usb_tll_hs_usb_ch1_clk,        CK_443X),
-       CLK(NULL,       "usb_tll_hs_ick",               &usb_tll_hs_ick,        CK_443X),
        CLK("usbhs-omap.0",     "usbtll_ick",           &usb_tll_hs_ick,        CK_443X),
-       CLK("usbhs-omap.0",     "usbtll_fck",           &dummy_ck,      CK_443X),
        CLK(NULL,       "usim_ck",                      &usim_ck,       CK_443X),
        CLK(NULL,       "usim_fclk",                    &usim_fclk,     CK_443X),
        CLK(NULL,       "usim_fck",                     &usim_fck,      CK_443X),
        CLK("omap_wdt", "fck",                          &wd_timer2_fck, CK_443X),
-       CLK(NULL,       "mailboxes_ick",                &dummy_ck,      CK_443X),
        CLK(NULL,       "wd_timer3_fck",                &wd_timer3_fck, CK_443X),
        CLK(NULL,       "stm_clk_div_ck",               &stm_clk_div_ck,        CK_443X),
        CLK(NULL,       "trace_clk_div_ck",             &trace_clk_div_ck,      CK_443X),
+       CLK(NULL,       "auxclk0_ck",                   &auxclk0_ck,    CK_443X),
+       CLK(NULL,       "auxclk1_ck",                   &auxclk1_ck,    CK_443X),
+       CLK(NULL,       "auxclk2_ck",                   &auxclk2_ck,    CK_443X),
+       CLK(NULL,       "auxclk3_ck",                   &auxclk3_ck,    CK_443X),
+       CLK(NULL,       "auxclk4_ck",                   &auxclk4_ck,    CK_443X),
+       CLK(NULL,       "auxclk5_ck",                   &auxclk5_ck,    CK_443X),
+       CLK(NULL,       "auxclkreq0_ck",                &auxclkreq0_ck, CK_443X),
+       CLK(NULL,       "auxclkreq1_ck",                &auxclkreq1_ck, CK_443X),
+       CLK(NULL,       "auxclkreq2_ck",                &auxclkreq2_ck, CK_443X),
+       CLK(NULL,       "auxclkreq3_ck",                &auxclkreq3_ck, CK_443X),
+       CLK(NULL,       "auxclkreq4_ck",                &auxclkreq4_ck, CK_443X),
+       CLK(NULL,       "auxclkreq5_ck",                &auxclkreq5_ck, CK_443X),
        CLK(NULL,       "gpmc_ck",                      &dummy_ck,      CK_443X),
        CLK(NULL,       "gpt1_ick",                     &dummy_ck,      CK_443X),
        CLK(NULL,       "gpt2_ick",                     &dummy_ck,      CK_443X),
@@ -3253,6 +3177,7 @@ static struct omap_clk omap44xx_clks[] = {
        CLK("omap_i2c.2",       "ick",                          &dummy_ck,      CK_443X),
        CLK("omap_i2c.3",       "ick",                          &dummy_ck,      CK_443X),
        CLK("omap_i2c.4",       "ick",                          &dummy_ck,      CK_443X),
+       CLK(NULL,       "mailboxes_ick",                &dummy_ck,      CK_443X),
        CLK("omap_hsmmc.0",     "ick",                          &dummy_ck,      CK_443X),
        CLK("omap_hsmmc.1",     "ick",                          &dummy_ck,      CK_443X),
        CLK("omap_hsmmc.2",     "ick",                          &dummy_ck,      CK_443X),
@@ -3270,19 +3195,9 @@ static struct omap_clk omap44xx_clks[] = {
        CLK(NULL,       "uart2_ick",                    &dummy_ck,      CK_443X),
        CLK(NULL,       "uart3_ick",                    &dummy_ck,      CK_443X),
        CLK(NULL,       "uart4_ick",                    &dummy_ck,      CK_443X),
+       CLK("usbhs-omap.0",     "usbhost_ick",          &dummy_ck,              CK_443X),
+       CLK("usbhs-omap.0",     "usbtll_fck",           &dummy_ck,      CK_443X),
        CLK("omap_wdt", "ick",                          &dummy_ck,      CK_443X),
-       CLK(NULL,       "auxclk0_ck",                   &auxclk0_ck,    CK_443X),
-       CLK(NULL,       "auxclk1_ck",                   &auxclk1_ck,    CK_443X),
-       CLK(NULL,       "auxclk2_ck",                   &auxclk2_ck,    CK_443X),
-       CLK(NULL,       "auxclk3_ck",                   &auxclk3_ck,    CK_443X),
-       CLK(NULL,       "auxclk4_ck",                   &auxclk4_ck,    CK_443X),
-       CLK(NULL,       "auxclk5_ck",                   &auxclk5_ck,    CK_443X),
-       CLK(NULL,       "auxclkreq0_ck",                &auxclkreq0_ck, CK_443X),
-       CLK(NULL,       "auxclkreq1_ck",                &auxclkreq1_ck, CK_443X),
-       CLK(NULL,       "auxclkreq2_ck",                &auxclkreq2_ck, CK_443X),
-       CLK(NULL,       "auxclkreq3_ck",                &auxclkreq3_ck, CK_443X),
-       CLK(NULL,       "auxclkreq4_ck",                &auxclkreq4_ck, CK_443X),
-       CLK(NULL,       "auxclkreq5_ck",                &auxclkreq5_ck, CK_443X),
 };
 
 int __init omap4xxx_clk_init(void)
index a607ec196e8b4913cf15ac54db558ea7986df51b..66090f2676ceb85894bb9c6f071d4a116769819a 100644 (file)
@@ -1,11 +1,12 @@
 /*
  * OMAP4 Clock domains framework
  *
- * Copyright (C) 2009 Texas Instruments, Inc.
- * Copyright (C) 2009 Nokia Corporation
+ * Copyright (C) 2009-2011 Texas Instruments, Inc.
+ * Copyright (C) 2009-2011 Nokia Corporation
  *
  * Abhijit Pagare (abhijitpagare@ti.com)
  * Benoit Cousson (b-cousson@ti.com)
+ * Paul Walmsley (paul@pwsan.com)
  *
  * This file is automatically generated from the OMAP hardware databases.
  * We respectfully ask that any modifications to this file be coordinated
@@ -32,7 +33,7 @@
 
 /* Static Dependencies for OMAP4 Clock Domains */
 
-static struct clkdm_dep ducati_wkup_sleep_deps[] = {
+static struct clkdm_dep d2d_wkup_sleep_deps[] = {
        {
                .clkdm_name      = "abe_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
@@ -50,103 +51,103 @@ static struct clkdm_dep ducati_wkup_sleep_deps[] = {
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        {
-               .clkdm_name      = "l3_dss_clkdm",
+               .clkdm_name      = "l3_emif_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        {
-               .clkdm_name      = "l3_emif_clkdm",
+               .clkdm_name      = "l3_init_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        {
-               .clkdm_name      = "l3_gfx_clkdm",
+               .clkdm_name      = "l4_cfg_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        {
-               .clkdm_name      = "l3_init_clkdm",
+               .clkdm_name      = "l4_per_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
+       { NULL },
+};
+
+static struct clkdm_dep ducati_wkup_sleep_deps[] = {
        {
-               .clkdm_name      = "l4_cfg_clkdm",
+               .clkdm_name      = "abe_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        {
-               .clkdm_name      = "l4_per_clkdm",
+               .clkdm_name      = "ivahd_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        {
-               .clkdm_name      = "l4_secure_clkdm",
+               .clkdm_name      = "l3_1_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        {
-               .clkdm_name      = "l4_wkup_clkdm",
+               .clkdm_name      = "l3_2_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        {
-               .clkdm_name      = "tesla_clkdm",
+               .clkdm_name      = "l3_dss_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
-       { NULL },
-};
-
-static struct clkdm_dep iss_wkup_sleep_deps[] = {
        {
-               .clkdm_name      = "ivahd_clkdm",
+               .clkdm_name      = "l3_emif_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        {
-               .clkdm_name      = "l3_1_clkdm",
+               .clkdm_name      = "l3_gfx_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        {
-               .clkdm_name      = "l3_emif_clkdm",
+               .clkdm_name      = "l3_init_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
-       { NULL },
-};
-
-static struct clkdm_dep ivahd_wkup_sleep_deps[] = {
        {
-               .clkdm_name      = "l3_1_clkdm",
+               .clkdm_name      = "l4_cfg_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        {
-               .clkdm_name      = "l3_emif_clkdm",
+               .clkdm_name      = "l4_per_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
-       { NULL },
-};
-
-static struct clkdm_dep l3_d2d_wkup_sleep_deps[] = {
        {
-               .clkdm_name      = "abe_clkdm",
+               .clkdm_name      = "l4_secure_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        {
-               .clkdm_name      = "ivahd_clkdm",
+               .clkdm_name      = "l4_wkup_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        {
-               .clkdm_name      = "l3_1_clkdm",
+               .clkdm_name      = "tesla_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
+       { NULL },
+};
+
+static struct clkdm_dep iss_wkup_sleep_deps[] = {
        {
-               .clkdm_name      = "l3_2_clkdm",
+               .clkdm_name      = "ivahd_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        {
-               .clkdm_name      = "l3_emif_clkdm",
+               .clkdm_name      = "l3_1_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        {
-               .clkdm_name      = "l3_init_clkdm",
+               .clkdm_name      = "l3_emif_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
+       { NULL },
+};
+
+static struct clkdm_dep ivahd_wkup_sleep_deps[] = {
        {
-               .clkdm_name      = "l4_cfg_clkdm",
+               .clkdm_name      = "l3_1_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        {
-               .clkdm_name      = "l4_per_clkdm",
+               .clkdm_name      = "l3_emif_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
        },
        { NULL },
@@ -280,7 +281,7 @@ static struct clkdm_dep l4_secure_wkup_sleep_deps[] = {
        { NULL },
 };
 
-static struct clkdm_dep mpuss_wkup_sleep_deps[] = {
+static struct clkdm_dep mpu_wkup_sleep_deps[] = {
        {
                .clkdm_name      = "abe_clkdm",
                .omap_chip       = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
@@ -497,14 +498,14 @@ static struct clockdomain l3_init_44xx_clkdm = {
        .omap_chip        = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
 };
 
-static struct clockdomain mpuss_44xx_clkdm = {
-       .name             = "mpuss_clkdm",
-       .pwrdm            = { .name = "mpu_pwrdm" },
-       .prcm_partition   = OMAP4430_CM1_PARTITION,
-       .cm_inst          = OMAP4430_CM1_MPU_INST,
-       .clkdm_offs       = OMAP4430_CM1_MPU_MPU_CDOFFS,
-       .wkdep_srcs       = mpuss_wkup_sleep_deps,
-       .sleepdep_srcs    = mpuss_wkup_sleep_deps,
+static struct clockdomain d2d_44xx_clkdm = {
+       .name             = "d2d_clkdm",
+       .pwrdm            = { .name = "core_pwrdm" },
+       .prcm_partition   = OMAP4430_CM2_PARTITION,
+       .cm_inst          = OMAP4430_CM2_CORE_INST,
+       .clkdm_offs       = OMAP4430_CM2_CORE_D2D_CDOFFS,
+       .wkdep_srcs       = d2d_wkup_sleep_deps,
+       .sleepdep_srcs    = d2d_wkup_sleep_deps,
        .flags            = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
        .omap_chip        = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
 };
@@ -563,6 +564,18 @@ static struct clockdomain ducati_44xx_clkdm = {
        .omap_chip        = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
 };
 
+static struct clockdomain mpu_44xx_clkdm = {
+       .name             = "mpu_clkdm",
+       .pwrdm            = { .name = "mpu_pwrdm" },
+       .prcm_partition   = OMAP4430_CM1_PARTITION,
+       .cm_inst          = OMAP4430_CM1_MPU_INST,
+       .clkdm_offs       = OMAP4430_CM1_MPU_MPU_CDOFFS,
+       .wkdep_srcs       = mpu_wkup_sleep_deps,
+       .sleepdep_srcs    = mpu_wkup_sleep_deps,
+       .flags            = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
+       .omap_chip        = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
+};
+
 static struct clockdomain l3_2_44xx_clkdm = {
        .name             = "l3_2_clkdm",
        .pwrdm            = { .name = "core_pwrdm" },
@@ -585,18 +598,6 @@ static struct clockdomain l3_1_44xx_clkdm = {
        .omap_chip        = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
 };
 
-static struct clockdomain l3_d2d_44xx_clkdm = {
-       .name             = "l3_d2d_clkdm",
-       .pwrdm            = { .name = "core_pwrdm" },
-       .prcm_partition   = OMAP4430_CM2_PARTITION,
-       .cm_inst          = OMAP4430_CM2_CORE_INST,
-       .clkdm_offs       = OMAP4430_CM2_CORE_D2D_CDOFFS,
-       .wkdep_srcs       = l3_d2d_wkup_sleep_deps,
-       .sleepdep_srcs    = l3_d2d_wkup_sleep_deps,
-       .flags            = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
-       .omap_chip        = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
-};
-
 static struct clockdomain iss_44xx_clkdm = {
        .name             = "iss_clkdm",
        .pwrdm            = { .name = "cam_pwrdm" },
@@ -655,6 +656,7 @@ static struct clockdomain l3_dma_44xx_clkdm = {
        .omap_chip        = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
 };
 
+/* As clockdomains are added or removed above, this list must also be changed */
 static struct clockdomain *clockdomains_omap44xx[] __initdata = {
        &l4_cefuse_44xx_clkdm,
        &l4_cfg_44xx_clkdm,
@@ -666,21 +668,21 @@ static struct clockdomain *clockdomains_omap44xx[] __initdata = {
        &abe_44xx_clkdm,
        &l3_instr_44xx_clkdm,
        &l3_init_44xx_clkdm,
-       &mpuss_44xx_clkdm,
+       &d2d_44xx_clkdm,
        &mpu0_44xx_clkdm,
        &mpu1_44xx_clkdm,
        &l3_emif_44xx_clkdm,
        &l4_ao_44xx_clkdm,
        &ducati_44xx_clkdm,
+       &mpu_44xx_clkdm,
        &l3_2_44xx_clkdm,
        &l3_1_44xx_clkdm,
-       &l3_d2d_44xx_clkdm,
        &iss_44xx_clkdm,
        &l3_dss_44xx_clkdm,
        &l4_wkup_44xx_clkdm,
        &emu_sys_44xx_clkdm,
        &l3_dma_44xx_clkdm,
-       NULL,
+       NULL
 };
 
 void __init omap44xx_clockdomains_init(void)
index 9d47a05b17b45b3496941af9c366324ef2af5dbe..0e77945d26ec8c7a84fffc28869dee87f8797b8f 100644 (file)
 #ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_44XX_H
 #define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_44XX_H
 
-/*
- * Used by CM_L3_1_DYNAMICDEP, CM_L3_1_DYNAMICDEP_RESTORE, CM_MPU_DYNAMICDEP,
- * CM_TESLA_DYNAMICDEP
- */
+/* Used by CM_L3_1_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP */
 #define OMAP4430_ABE_DYNDEP_SHIFT                              3
 #define OMAP4430_ABE_DYNDEP_MASK                               (1 << 3)
 
 /*
- * Used by CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, CM_DUCATI_STATICDEP,
- * CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP,
- * CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP
+ * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP,
+ * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
  */
 #define OMAP4430_ABE_STATDEP_SHIFT                             3
 #define OMAP4430_ABE_STATDEP_MASK                              (1 << 3)
 
-/* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */
+/* Used by CM_L4CFG_DYNAMICDEP */
 #define OMAP4430_ALWONCORE_DYNDEP_SHIFT                                16
 #define OMAP4430_ALWONCORE_DYNDEP_MASK                         (1 << 16)
 
 
 /*
  * Used by CM_AUTOIDLE_DPLL_ABE, CM_AUTOIDLE_DPLL_CORE,
- * CM_AUTOIDLE_DPLL_CORE_RESTORE, CM_AUTOIDLE_DPLL_DDRPHY,
- * CM_AUTOIDLE_DPLL_IVA, CM_AUTOIDLE_DPLL_MPU, CM_AUTOIDLE_DPLL_PER,
- * CM_AUTOIDLE_DPLL_UNIPRO, CM_AUTOIDLE_DPLL_USB
+ * CM_AUTOIDLE_DPLL_DDRPHY, CM_AUTOIDLE_DPLL_IVA, CM_AUTOIDLE_DPLL_MPU,
+ * CM_AUTOIDLE_DPLL_PER, CM_AUTOIDLE_DPLL_UNIPRO, CM_AUTOIDLE_DPLL_USB
  */
 #define OMAP4430_AUTO_DPLL_MODE_SHIFT                          0
 #define OMAP4430_AUTO_DPLL_MODE_MASK                           (0x7 << 0)
 
-/* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */
+/* Used by CM_L4CFG_DYNAMICDEP */
 #define OMAP4430_CEFUSE_DYNDEP_SHIFT                           17
 #define OMAP4430_CEFUSE_DYNDEP_MASK                            (1 << 17)
 
 #define OMAP4430_CLKACTIVITY_ABE_X2_CLK_SHIFT                  8
 #define OMAP4430_CLKACTIVITY_ABE_X2_CLK_MASK                   (1 << 8)
 
-/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */
+/* Used by CM_MEMIF_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_SHIFT               11
 #define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_MASK                        (1 << 11)
 
-/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */
+/* Used by CM_MEMIF_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_SHIFT              12
 #define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_MASK               (1 << 12)
 
-/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */
+/* Used by CM_MEMIF_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_SHIFT              13
 #define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_MASK               (1 << 13)
 
 #define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT          9
 #define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK           (1 << 9)
 
-/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */
+/* Used by CM_MEMIF_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_DLL_CLK_SHIFT                     9
 #define OMAP4430_CLKACTIVITY_DLL_CLK_MASK                      (1 << 9)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_DMT10_GFCLK_SHIFT                 9
 #define OMAP4430_CLKACTIVITY_DMT10_GFCLK_MASK                  (1 << 9)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_DMT11_GFCLK_SHIFT                 10
 #define OMAP4430_CLKACTIVITY_DMT11_GFCLK_MASK                  (1 << 10)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_DMT2_GFCLK_SHIFT                  11
 #define OMAP4430_CLKACTIVITY_DMT2_GFCLK_MASK                   (1 << 11)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_DMT3_GFCLK_SHIFT                  12
 #define OMAP4430_CLKACTIVITY_DMT3_GFCLK_MASK                   (1 << 12)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_DMT4_GFCLK_SHIFT                  13
 #define OMAP4430_CLKACTIVITY_DMT4_GFCLK_MASK                   (1 << 13)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_DMT9_GFCLK_SHIFT                  14
 #define OMAP4430_CLKACTIVITY_DMT9_GFCLK_MASK                   (1 << 14)
 
 #define OMAP4430_CLKACTIVITY_FDIF_GFCLK_SHIFT                  10
 #define OMAP4430_CLKACTIVITY_FDIF_GFCLK_MASK                   (1 << 10)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_SHIFT              15
 #define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_MASK               (1 << 15)
 
 #define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_SHIFT                11
 #define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_MASK         (1 << 11)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_SHIFT          20
 #define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_MASK           (1 << 20)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_SHIFT               26
 #define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_MASK                        (1 << 26)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_SHIFT          21
 #define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_MASK           (1 << 21)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_SHIFT               27
 #define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_MASK                        (1 << 27)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_SHIFT             13
 #define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_MASK              (1 << 13)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_SHIFT              12
 #define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_MASK               (1 << 12)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_SHIFT           28
 #define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_MASK            (1 << 28)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_SHIFT           29
 #define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_MASK            (1 << 29)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_SHIFT              11
 #define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_MASK               (1 << 11)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_SHIFT              16
 #define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_MASK               (1 << 16)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_SHIFT           17
 #define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_MASK            (1 << 17)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_SHIFT           18
 #define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_MASK            (1 << 18)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_SHIFT           19
 #define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_MASK            (1 << 19)
 
 #define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_SHIFT              10
 #define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_MASK               (1 << 10)
 
-/* Used by CM_L3_1_CLKSTCTRL, CM_L3_1_CLKSTCTRL_RESTORE */
+/* Used by CM_L3_1_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_L3_1_GICLK_SHIFT                  8
 #define OMAP4430_CLKACTIVITY_L3_1_GICLK_MASK                   (1 << 8)
 
-/* Used by CM_L3_2_CLKSTCTRL, CM_L3_2_CLKSTCTRL_RESTORE */
+/* Used by CM_L3_2_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_L3_2_GICLK_SHIFT                  8
 #define OMAP4430_CLKACTIVITY_L3_2_GICLK_MASK                   (1 << 8)
 
 #define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_SHIFT                        8
 #define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_MASK                 (1 << 8)
 
-/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */
+/* Used by CM_MEMIF_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_SHIFT               8
 #define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_MASK                        (1 << 8)
 
 #define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_SHIFT                        8
 #define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_MASK                 (1 << 8)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_SHIFT               8
 #define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_MASK                        (1 << 8)
 
 #define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT             8
 #define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_MASK              (1 << 8)
 
-/* Used by CM_L4CFG_CLKSTCTRL, CM_L4CFG_CLKSTCTRL_RESTORE */
+/* Used by CM_L4CFG_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_SHIFT                        8
 #define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_MASK                 (1 << 8)
 
 #define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_SHIFT                        9
 #define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_MASK                 (1 << 9)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_SHIFT               9
 #define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_MASK                        (1 << 9)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_L4_PER_GICLK_SHIFT                        8
 #define OMAP4430_CLKACTIVITY_L4_PER_GICLK_MASK                 (1 << 8)
 
 #define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_SHIFT               12
 #define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_MASK                        (1 << 12)
 
-/* Used by CM_MPU_CLKSTCTRL, CM_MPU_CLKSTCTRL_RESTORE */
+/* Used by CM_MPU_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_SHIFT                        8
 #define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_MASK                 (1 << 8)
 
 #define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_SHIFT               9
 #define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_MASK                        (1 << 9)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_SHIFT              16
 #define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_MASK               (1 << 16)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_SHIFT               17
 #define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_MASK                        (1 << 17)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_SHIFT               18
 #define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_MASK                        (1 << 18)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_SHIFT               19
 #define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_MASK                        (1 << 19)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_SHIFT           25
 #define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_MASK            (1 << 25)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_SHIFT            20
 #define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_MASK             (1 << 20)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_SHIFT            21
 #define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_MASK             (1 << 21)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_SHIFT            22
 #define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_MASK             (1 << 22)
 
-/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
+/* Used by CM_L4PER_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_SHIFT               24
 #define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_MASK                        (1 << 24)
 
-/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */
+/* Used by CM_MEMIF_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_SHIFT                        10
 #define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_MASK                 (1 << 10)
 
 #define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_SHIFT              8
 #define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_MASK               (1 << 8)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_SHIFT               22
 #define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_MASK                        (1 << 22)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_SHIFT               23
 #define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_MASK                        (1 << 23)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_SHIFT               24
 #define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_MASK                        (1 << 24)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_SHIFT             10
 #define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_MASK              (1 << 10)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_SHIFT                        14
 #define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_MASK                 (1 << 14)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_SHIFT             15
 #define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_MASK              (1 << 15)
 
 #define OMAP4430_CLKACTIVITY_USIM_GFCLK_SHIFT                  10
 #define OMAP4430_CLKACTIVITY_USIM_GFCLK_MASK                   (1 << 10)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_SHIFT               30
 #define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_MASK                        (1 << 30)
 
-/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
+/* Used by CM_L3INIT_CLKSTCTRL */
 #define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_SHIFT             25
 #define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_MASK              (1 << 25)
 
 
 /*
  * Renamed from CLKSEL Used by CM_ABE_DSS_SYS_CLKSEL, CM_ABE_PLL_REF_CLKSEL,
- * CM_L4_WKUP_CLKSEL, CM_CLKSEL_DUCATI_ISS_ROOT, CM_CLKSEL_USB_60MHZ
+ * CM_CLKSEL_DUCATI_ISS_ROOT, CM_CLKSEL_USB_60MHZ, CM_L4_WKUP_CLKSEL
  */
 #define OMAP4430_CLKSEL_0_0_SHIFT                              0
 #define OMAP4430_CLKSEL_0_0_MASK                               (1 << 0)
 #define OMAP4430_CLKSEL_AESS_FCLK_SHIFT                                24
 #define OMAP4430_CLKSEL_AESS_FCLK_MASK                         (1 << 24)
 
-/* Used by CM_CLKSEL_CORE, CM_CLKSEL_CORE_RESTORE */
+/* Used by CM_CLKSEL_CORE */
 #define OMAP4430_CLKSEL_CORE_SHIFT                             0
 #define OMAP4430_CLKSEL_CORE_MASK                              (1 << 0)
 
-/*
- * Renamed from CLKSEL_CORE Used by CM_SHADOW_FREQ_CONFIG2_RESTORE,
- * CM_SHADOW_FREQ_CONFIG2
- */
+/* Renamed from CLKSEL_CORE Used by CM_SHADOW_FREQ_CONFIG2 */
 #define OMAP4430_CLKSEL_CORE_1_1_SHIFT                         1
 #define OMAP4430_CLKSEL_CORE_1_1_MASK                          (1 << 1)
 
 #define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_SHIFT     26
 #define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_MASK      (0x3 << 26)
 
-/* Used by CM_CLKSEL_CORE, CM_CLKSEL_CORE_RESTORE */
+/* Used by CM_CLKSEL_CORE */
 #define OMAP4430_CLKSEL_L3_SHIFT                               4
 #define OMAP4430_CLKSEL_L3_MASK                                        (1 << 4)
 
-/*
- * Renamed from CLKSEL_L3 Used by CM_SHADOW_FREQ_CONFIG2_RESTORE,
- * CM_SHADOW_FREQ_CONFIG2
- */
+/* Renamed from CLKSEL_L3 Used by CM_SHADOW_FREQ_CONFIG2 */
 #define OMAP4430_CLKSEL_L3_SHADOW_SHIFT                                2
 #define OMAP4430_CLKSEL_L3_SHADOW_MASK                         (1 << 2)
 
-/* Used by CM_CLKSEL_CORE, CM_CLKSEL_CORE_RESTORE */
+/* Used by CM_CLKSEL_CORE */
 #define OMAP4430_CLKSEL_L4_SHIFT                               8
 #define OMAP4430_CLKSEL_L4_MASK                                        (1 << 8)
 
 #define OMAP4430_CLKSEL_SOURCE_24_24_SHIFT                     24
 #define OMAP4430_CLKSEL_SOURCE_24_24_MASK                      (1 << 24)
 
-/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
+/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
 #define OMAP4430_CLKSEL_UTMI_P1_SHIFT                          24
 #define OMAP4430_CLKSEL_UTMI_P1_MASK                           (1 << 24)
 
-/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
+/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
 #define OMAP4430_CLKSEL_UTMI_P2_SHIFT                          25
 #define OMAP4430_CLKSEL_UTMI_P2_MASK                           (1 << 25)
 
  * Used by CM1_ABE_CLKSTCTRL, CM_ALWON_CLKSTCTRL, CM_CAM_CLKSTCTRL,
  * CM_CEFUSE_CLKSTCTRL, CM_D2D_CLKSTCTRL, CM_DSS_CLKSTCTRL,
  * CM_DUCATI_CLKSTCTRL, CM_EMU_CLKSTCTRL, CM_GFX_CLKSTCTRL, CM_IVAHD_CLKSTCTRL,
- * CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE, CM_L3INSTR_CLKSTCTRL,
- * CM_L3_1_CLKSTCTRL, CM_L3_1_CLKSTCTRL_RESTORE, CM_L3_2_CLKSTCTRL,
- * CM_L3_2_CLKSTCTRL_RESTORE, CM_L4CFG_CLKSTCTRL, CM_L4CFG_CLKSTCTRL_RESTORE,
- * CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE, CM_L4SEC_CLKSTCTRL,
- * CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE, CM_MPU_CLKSTCTRL,
- * CM_MPU_CLKSTCTRL_RESTORE, CM_SDMA_CLKSTCTRL, CM_TESLA_CLKSTCTRL,
- * CM_WKUP_CLKSTCTRL
+ * CM_L3INIT_CLKSTCTRL, CM_L3INSTR_CLKSTCTRL, CM_L3_1_CLKSTCTRL,
+ * CM_L3_2_CLKSTCTRL, CM_L4CFG_CLKSTCTRL, CM_L4PER_CLKSTCTRL,
+ * CM_L4SEC_CLKSTCTRL, CM_MEMIF_CLKSTCTRL, CM_MPU_CLKSTCTRL, CM_SDMA_CLKSTCTRL,
+ * CM_TESLA_CLKSTCTRL, CM_WKUP_CLKSTCTRL
  */
 #define OMAP4430_CLKTRCTRL_SHIFT                               0
 #define OMAP4430_CLKTRCTRL_MASK                                        (0x3 << 0)
 #define OMAP4430_CUSTOM_SHIFT                                  6
 #define OMAP4430_CUSTOM_MASK                                   (0x3 << 6)
 
-/*
- * Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP,
- * CM_L4CFG_DYNAMICDEP_RESTORE
- */
+/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */
 #define OMAP4430_D2D_DYNDEP_SHIFT                              18
 #define OMAP4430_D2D_DYNDEP_MASK                               (1 << 18)
 
 
 /*
  * Used by CM_SSC_DELTAMSTEP_DPLL_ABE, CM_SSC_DELTAMSTEP_DPLL_CORE,
- * CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE, CM_SSC_DELTAMSTEP_DPLL_DDRPHY,
- * CM_SSC_DELTAMSTEP_DPLL_IVA, CM_SSC_DELTAMSTEP_DPLL_MPU,
- * CM_SSC_DELTAMSTEP_DPLL_PER, CM_SSC_DELTAMSTEP_DPLL_UNIPRO,
- * CM_SSC_DELTAMSTEP_DPLL_USB
+ * CM_SSC_DELTAMSTEP_DPLL_DDRPHY, CM_SSC_DELTAMSTEP_DPLL_IVA,
+ * CM_SSC_DELTAMSTEP_DPLL_MPU, CM_SSC_DELTAMSTEP_DPLL_PER,
+ * CM_SSC_DELTAMSTEP_DPLL_UNIPRO, CM_SSC_DELTAMSTEP_DPLL_USB
  */
 #define OMAP4430_DELTAMSTEP_SHIFT                              0
 #define OMAP4430_DELTAMSTEP_MASK                               (0xfffff << 0)
 
-/* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */
-#define OMAP4430_DLL_OVERRIDE_SHIFT                            2
-#define OMAP4430_DLL_OVERRIDE_MASK                             (1 << 2)
+/* Used by CM_DLL_CTRL */
+#define OMAP4430_DLL_OVERRIDE_SHIFT                            0
+#define OMAP4430_DLL_OVERRIDE_MASK                             (1 << 0)
 
-/* Renamed from DLL_OVERRIDE Used by CM_DLL_CTRL */
-#define OMAP4430_DLL_OVERRIDE_0_0_SHIFT                                0
-#define OMAP4430_DLL_OVERRIDE_0_0_MASK                         (1 << 0)
+/* Renamed from DLL_OVERRIDE Used by CM_SHADOW_FREQ_CONFIG1 */
+#define OMAP4430_DLL_OVERRIDE_2_2_SHIFT                                2
+#define OMAP4430_DLL_OVERRIDE_2_2_MASK                         (1 << 2)
 
-/* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */
+/* Used by CM_SHADOW_FREQ_CONFIG1 */
 #define OMAP4430_DLL_RESET_SHIFT                               3
 #define OMAP4430_DLL_RESET_MASK                                        (1 << 3)
 
 /*
- * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE,
- * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA,
- * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO,
- * CM_CLKSEL_DPLL_USB
+ * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_DDRPHY,
+ * CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER,
+ * CM_CLKSEL_DPLL_UNIPRO, CM_CLKSEL_DPLL_USB
  */
 #define OMAP4430_DPLL_BYP_CLKSEL_SHIFT                         23
 #define OMAP4430_DPLL_BYP_CLKSEL_MASK                          (1 << 23)
 #define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT                        8
 #define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_MASK                 (1 << 8)
 
-/* Used by CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_CORE_RESTORE */
+/* Used by CM_CLKSEL_DPLL_CORE */
 #define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_SHIFT                   20
 #define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_MASK                    (1 << 20)
 
-/*
- * Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE,
- * CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_PER
- */
+/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */
 #define OMAP4430_DPLL_CLKOUTHIF_DIV_SHIFT                      0
 #define OMAP4430_DPLL_CLKOUTHIF_DIV_MASK                       (0x1f << 0)
 
-/*
- * Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE,
- * CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_PER
- */
+/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */
 #define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_SHIFT                 5
 #define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_MASK                  (1 << 5)
 
-/*
- * Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE,
- * CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_PER
- */
+/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */
 #define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT                        8
 #define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_MASK                 (1 << 8)
 
 #define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK                  (1 << 10)
 
 /*
- * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE,
- * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU,
- * CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO
+ * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY,
+ * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO
  */
 #define OMAP4430_DPLL_CLKOUT_DIV_SHIFT                         0
 #define OMAP4430_DPLL_CLKOUT_DIV_MASK                          (0x1f << 0)
 #define OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK                      (0x7f << 0)
 
 /*
- * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE,
- * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU,
- * CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO
+ * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY,
+ * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO
  */
 #define OMAP4430_DPLL_CLKOUT_DIVCHACK_SHIFT                    5
 #define OMAP4430_DPLL_CLKOUT_DIVCHACK_MASK                     (1 << 5)
 #define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_MASK              (1 << 7)
 
 /*
- * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE,
- * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU,
- * CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB
+ * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY,
+ * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB
  */
 #define OMAP4430_DPLL_CLKOUT_GATE_CTRL_SHIFT                   8
 #define OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK                    (1 << 8)
 
-/* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */
+/* Used by CM_SHADOW_FREQ_CONFIG1 */
 #define OMAP4430_DPLL_CORE_DPLL_EN_SHIFT                       8
 #define OMAP4430_DPLL_CORE_DPLL_EN_MASK                                (0x7 << 8)
 
-/* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */
+/* Used by CM_SHADOW_FREQ_CONFIG1 */
 #define OMAP4430_DPLL_CORE_M2_DIV_SHIFT                                11
 #define OMAP4430_DPLL_CORE_M2_DIV_MASK                         (0x1f << 11)
 
-/* Used by CM_SHADOW_FREQ_CONFIG2, CM_SHADOW_FREQ_CONFIG2_RESTORE */
+/* Used by CM_SHADOW_FREQ_CONFIG2 */
 #define OMAP4430_DPLL_CORE_M5_DIV_SHIFT                                3
 #define OMAP4430_DPLL_CORE_M5_DIV_MASK                         (0x1f << 3)
 
 /*
- * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE,
- * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA,
- * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO
+ * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_DDRPHY,
+ * CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER,
+ * CM_CLKSEL_DPLL_UNIPRO
  */
 #define OMAP4430_DPLL_DIV_SHIFT                                        0
 #define OMAP4430_DPLL_DIV_MASK                                 (0x7f << 0)
 #define OMAP4430_DPLL_DIV_0_7_MASK                             (0xff << 0)
 
 /*
- * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE,
- * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA,
- * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
+ * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
+ * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
  */
 #define OMAP4430_DPLL_DRIFTGUARD_EN_SHIFT                      8
 #define OMAP4430_DPLL_DRIFTGUARD_EN_MASK                       (1 << 8)
 #define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_MASK                   (1 << 3)
 
 /*
- * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE,
- * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA,
- * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO,
- * CM_CLKMODE_DPLL_USB
+ * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
+ * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
+ * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB
  */
 #define OMAP4430_DPLL_EN_SHIFT                                 0
 #define OMAP4430_DPLL_EN_MASK                                  (0x7 << 0)
 
 /*
- * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE,
- * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA,
- * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO
+ * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
+ * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
+ * CM_CLKMODE_DPLL_UNIPRO
  */
 #define OMAP4430_DPLL_LPMODE_EN_SHIFT                          10
 #define OMAP4430_DPLL_LPMODE_EN_MASK                           (1 << 10)
 
 /*
- * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE,
- * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA,
- * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO
+ * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_DDRPHY,
+ * CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER,
+ * CM_CLKSEL_DPLL_UNIPRO
  */
 #define OMAP4430_DPLL_MULT_SHIFT                               8
 #define OMAP4430_DPLL_MULT_MASK                                        (0x7ff << 8)
 #define OMAP4430_DPLL_MULT_USB_MASK                            (0xfff << 8)
 
 /*
- * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE,
- * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA,
- * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO
+ * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
+ * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
+ * CM_CLKMODE_DPLL_UNIPRO
  */
 #define OMAP4430_DPLL_REGM4XEN_SHIFT                           11
 #define OMAP4430_DPLL_REGM4XEN_MASK                            (1 << 11)
 #define OMAP4430_DPLL_SD_DIV_MASK                              (0xff << 24)
 
 /*
- * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE,
- * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA,
- * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO,
- * CM_CLKMODE_DPLL_USB
+ * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
+ * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
+ * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB
  */
 #define OMAP4430_DPLL_SSC_ACK_SHIFT                            13
 #define OMAP4430_DPLL_SSC_ACK_MASK                             (1 << 13)
 
 /*
- * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE,
- * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA,
- * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO,
- * CM_CLKMODE_DPLL_USB
+ * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
+ * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
+ * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB
  */
 #define OMAP4430_DPLL_SSC_DOWNSPREAD_SHIFT                     14
 #define OMAP4430_DPLL_SSC_DOWNSPREAD_MASK                      (1 << 14)
 
 /*
- * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE,
- * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA,
- * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO,
- * CM_CLKMODE_DPLL_USB
+ * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
+ * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
+ * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB
  */
 #define OMAP4430_DPLL_SSC_EN_SHIFT                             12
 #define OMAP4430_DPLL_SSC_EN_MASK                              (1 << 12)
 
-/*
- * Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP,
- * CM_L4CFG_DYNAMICDEP_RESTORE, CM_L4PER_DYNAMICDEP, CM_L4PER_DYNAMICDEP_RESTORE
- */
+/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
 #define OMAP4430_DSS_DYNDEP_SHIFT                              8
 #define OMAP4430_DSS_DYNDEP_MASK                               (1 << 8)
 
-/*
- * Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP,
- * CM_SDMA_STATICDEP_RESTORE
- */
+/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP */
 #define OMAP4430_DSS_STATDEP_SHIFT                             8
 #define OMAP4430_DSS_STATDEP_MASK                              (1 << 8)
 
-/* Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE */
+/* Used by CM_L3_2_DYNAMICDEP */
 #define OMAP4430_DUCATI_DYNDEP_SHIFT                           0
 #define OMAP4430_DUCATI_DYNDEP_MASK                            (1 << 0)
 
-/* Used by CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE */
+/* Used by CM_MPU_STATICDEP, CM_SDMA_STATICDEP */
 #define OMAP4430_DUCATI_STATDEP_SHIFT                          0
 #define OMAP4430_DUCATI_STATDEP_MASK                           (1 << 0)
 
-/* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */
+/* Used by CM_SHADOW_FREQ_CONFIG1 */
 #define OMAP4430_FREQ_UPDATE_SHIFT                             0
 #define OMAP4430_FREQ_UPDATE_MASK                              (1 << 0)
 
 #define OMAP4430_FUNC_SHIFT                                    16
 #define OMAP4430_FUNC_MASK                                     (0xfff << 16)
 
-/* Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE */
+/* Used by CM_L3_2_DYNAMICDEP */
 #define OMAP4430_GFX_DYNDEP_SHIFT                              10
 #define OMAP4430_GFX_DYNDEP_MASK                               (1 << 10)
 
 #define OMAP4430_GFX_STATDEP_SHIFT                             10
 #define OMAP4430_GFX_STATDEP_MASK                              (1 << 10)
 
-/* Used by CM_SHADOW_FREQ_CONFIG2, CM_SHADOW_FREQ_CONFIG2_RESTORE */
+/* Used by CM_SHADOW_FREQ_CONFIG2 */
 #define OMAP4430_GPMC_FREQ_UPDATE_SHIFT                                0
 #define OMAP4430_GPMC_FREQ_UPDATE_MASK                         (1 << 0)
 
 /*
- * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE,
- * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER
+ * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA,
+ * CM_DIV_M4_DPLL_PER
  */
 #define OMAP4430_HSDIVIDER_CLKOUT1_DIV_SHIFT                   0
 #define OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK                    (0x1f << 0)
 
 /*
- * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE,
- * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER
+ * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA,
+ * CM_DIV_M4_DPLL_PER
  */
 #define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT              5
 #define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_MASK               (1 << 5)
 
 /*
- * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE,
- * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER
+ * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA,
+ * CM_DIV_M4_DPLL_PER
  */
 #define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT             8
 #define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK              (1 << 8)
 
 /*
- * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE,
- * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER
+ * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA,
+ * CM_DIV_M4_DPLL_PER
  */
 #define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_SHIFT                  12
 #define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_MASK                   (1 << 12)
 
 /*
- * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE,
- * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER
+ * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA,
+ * CM_DIV_M5_DPLL_PER
  */
 #define OMAP4430_HSDIVIDER_CLKOUT2_DIV_SHIFT                   0
 #define OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK                    (0x1f << 0)
 
 /*
- * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE,
- * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER
+ * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA,
+ * CM_DIV_M5_DPLL_PER
  */
 #define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT              5
 #define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_MASK               (1 << 5)
 
 /*
- * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE,
- * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER
+ * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA,
+ * CM_DIV_M5_DPLL_PER
  */
 #define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT             8
 #define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK              (1 << 8)
 
 /*
- * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE,
- * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER
+ * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA,
+ * CM_DIV_M5_DPLL_PER
  */
 #define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_SHIFT                  12
 #define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_MASK                   (1 << 12)
 
-/*
- * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE,
- * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER
- */
+/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
 #define OMAP4430_HSDIVIDER_CLKOUT3_DIV_SHIFT                   0
 #define OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK                    (0x1f << 0)
 
-/*
- * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE,
- * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER
- */
+/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
 #define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT              5
 #define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_MASK               (1 << 5)
 
-/*
- * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE,
- * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER
- */
+/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
 #define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT             8
 #define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK              (1 << 8)
 
-/*
- * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE,
- * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER
- */
+/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
 #define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_SHIFT                  12
 #define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_MASK                   (1 << 12)
 
-/*
- * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE,
- * CM_DIV_M7_DPLL_PER
- */
+/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
 #define OMAP4430_HSDIVIDER_CLKOUT4_DIV_SHIFT                   0
 #define OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK                    (0x1f << 0)
 
-/*
- * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE,
- * CM_DIV_M7_DPLL_PER
- */
+/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
 #define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_SHIFT              5
 #define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_MASK               (1 << 5)
 
-/*
- * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE,
- * CM_DIV_M7_DPLL_PER
- */
+/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
 #define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_SHIFT             8
 #define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_MASK              (1 << 8)
 
-/*
- * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE,
- * CM_DIV_M7_DPLL_PER
- */
+/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
 #define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_SHIFT                  12
 #define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_MASK                   (1 << 12)
 
  * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_MDMINTC_CLKCTRL,
  * CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL,
  * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL,
- * CM_CM1_PROFILING_CLKCTRL, CM_CM1_PROFILING_CLKCTRL_RESTORE,
- * CM_CM2_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL_RESTORE,
+ * CM_CM1_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL,
  * CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL,
  * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL,
  * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL,
  * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL,
  * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL,
  * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL,
- * CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, CM_L3INIT_USB_HOST_FS_CLKCTRL,
- * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL,
- * CM_L3INIT_USB_TLL_CLKCTRL_RESTORE, CM_L3INIT_XHPI_CLKCTRL,
- * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL_RESTORE,
- * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE,
- * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE,
+ * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL,
+ * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL,
+ * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL,
  * CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, CM_L3_2_L3_2_CLKCTRL,
  * CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, CM_L4CFG_L4_CFG_CLKCTRL,
  * CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, CM_L4PER_ADC_CLKCTRL,
  * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL,
  * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL,
  * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL,
- * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL_RESTORE,
- * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL_RESTORE,
- * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL_RESTORE,
- * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL_RESTORE,
- * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL_RESTORE,
- * CM_L4PER_HDQ1W_CLKCTRL, CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL,
- * CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL,
- * CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL,
- * CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL,
- * CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL,
- * CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL,
- * CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL,
+ * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL,
+ * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL,
+ * CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL, CM_L4PER_I2C1_CLKCTRL,
+ * CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL,
+ * CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL,
+ * CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL,
+ * CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL,
+ * CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL, CM_L4PER_MMCSD4_CLKCTRL,
+ * CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL,
  * CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL,
  * CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL,
  * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL,
 #define OMAP4430_IDLEST_SHIFT                                  16
 #define OMAP4430_IDLEST_MASK                                   (0x3 << 16)
 
-/*
- * Used by CM_DUCATI_DYNAMICDEP, CM_L3_2_DYNAMICDEP,
- * CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE
- */
+/* Used by CM_DUCATI_DYNAMICDEP, CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */
 #define OMAP4430_ISS_DYNDEP_SHIFT                              9
 #define OMAP4430_ISS_DYNDEP_MASK                               (1 << 9)
 
 /*
  * Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP,
- * CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP
+ * CM_TESLA_STATICDEP
  */
 #define OMAP4430_ISS_STATDEP_SHIFT                             9
 #define OMAP4430_ISS_STATDEP_MASK                              (1 << 9)
 
-/* Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_TESLA_DYNAMICDEP */
+/* Used by CM_L3_2_DYNAMICDEP, CM_TESLA_DYNAMICDEP */
 #define OMAP4430_IVAHD_DYNDEP_SHIFT                            2
 #define OMAP4430_IVAHD_DYNDEP_MASK                             (1 << 2)
 
 /*
- * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE,
- * CM_DSS_STATICDEP, CM_DUCATI_STATICDEP, CM_GFX_STATICDEP,
- * CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP,
- * CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP
+ * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_DSS_STATICDEP,
+ * CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_L3INIT_STATICDEP,
+ * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
  */
 #define OMAP4430_IVAHD_STATDEP_SHIFT                           2
 #define OMAP4430_IVAHD_STATDEP_MASK                            (1 << 2)
 
-/*
- * Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP,
- * CM_L4CFG_DYNAMICDEP_RESTORE, CM_L4PER_DYNAMICDEP, CM_L4PER_DYNAMICDEP_RESTORE
- */
+/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
 #define OMAP4430_L3INIT_DYNDEP_SHIFT                           7
 #define OMAP4430_L3INIT_DYNDEP_MASK                            (1 << 7)
 
 /*
- * Used by CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, CM_DUCATI_STATICDEP,
- * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE,
- * CM_TESLA_STATICDEP
+ * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_MPU_STATICDEP,
+ * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
  */
 #define OMAP4430_L3INIT_STATDEP_SHIFT                          7
 #define OMAP4430_L3INIT_STATDEP_MASK                           (1 << 7)
 
 /*
  * Used by CM_DSS_DYNAMICDEP, CM_L3INIT_DYNAMICDEP, CM_L3_2_DYNAMICDEP,
- * CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP,
- * CM_L4CFG_DYNAMICDEP_RESTORE, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP
+ * CM_L4CFG_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP
  */
 #define OMAP4430_L3_1_DYNDEP_SHIFT                             5
 #define OMAP4430_L3_1_DYNDEP_MASK                              (1 << 5)
 
 /*
- * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE,
- * CM_DSS_STATICDEP, CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP,
+ * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_DSS_STATICDEP,
+ * CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP,
  * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP,
- * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP
+ * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
  */
 #define OMAP4430_L3_1_STATDEP_SHIFT                            5
 #define OMAP4430_L3_1_STATDEP_MASK                             (1 << 5)
 
 /*
- * Used by CM_CAM_DYNAMICDEP, CM_D2D_DYNAMICDEP, CM_D2D_DYNAMICDEP_RESTORE,
- * CM_DUCATI_DYNAMICDEP, CM_EMU_DYNAMICDEP, CM_GFX_DYNAMICDEP,
- * CM_IVAHD_DYNAMICDEP, CM_L3INIT_DYNAMICDEP, CM_L3_1_DYNAMICDEP,
- * CM_L3_1_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP,
- * CM_L4CFG_DYNAMICDEP_RESTORE, CM_L4SEC_DYNAMICDEP, CM_SDMA_DYNAMICDEP
+ * Used by CM_CAM_DYNAMICDEP, CM_D2D_DYNAMICDEP, CM_DUCATI_DYNAMICDEP,
+ * CM_EMU_DYNAMICDEP, CM_GFX_DYNAMICDEP, CM_IVAHD_DYNAMICDEP,
+ * CM_L3INIT_DYNAMICDEP, CM_L3_1_DYNAMICDEP, CM_L4CFG_DYNAMICDEP,
+ * CM_L4SEC_DYNAMICDEP, CM_SDMA_DYNAMICDEP
  */
 #define OMAP4430_L3_2_DYNDEP_SHIFT                             6
 #define OMAP4430_L3_2_DYNDEP_MASK                              (1 << 6)
 
 /*
- * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE,
- * CM_DSS_STATICDEP, CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP,
+ * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_DSS_STATICDEP,
+ * CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP,
  * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP,
- * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP
+ * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
  */
 #define OMAP4430_L3_2_STATDEP_SHIFT                            6
 #define OMAP4430_L3_2_STATDEP_MASK                             (1 << 6)
 
-/* Used by CM_L3_1_DYNAMICDEP, CM_L3_1_DYNAMICDEP_RESTORE */
+/* Used by CM_L3_1_DYNAMICDEP */
 #define OMAP4430_L4CFG_DYNDEP_SHIFT                            12
 #define OMAP4430_L4CFG_DYNDEP_MASK                             (1 << 12)
 
 /*
- * Used by CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, CM_DUCATI_STATICDEP,
- * CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP,
- * CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP
+ * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP,
+ * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
  */
 #define OMAP4430_L4CFG_STATDEP_SHIFT                           12
 #define OMAP4430_L4CFG_STATDEP_MASK                            (1 << 12)
 
-/* Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE */
+/* Used by CM_L3_2_DYNAMICDEP */
 #define OMAP4430_L4PER_DYNDEP_SHIFT                            13
 #define OMAP4430_L4PER_DYNDEP_MASK                             (1 << 13)
 
 /*
- * Used by CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, CM_DUCATI_STATICDEP,
- * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP,
- * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP
+ * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP,
+ * CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
  */
 #define OMAP4430_L4PER_STATDEP_SHIFT                           13
 #define OMAP4430_L4PER_STATDEP_MASK                            (1 << 13)
 
-/*
- * Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4PER_DYNAMICDEP,
- * CM_L4PER_DYNAMICDEP_RESTORE
- */
+/* Used by CM_L3_2_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
 #define OMAP4430_L4SEC_DYNDEP_SHIFT                            14
 #define OMAP4430_L4SEC_DYNDEP_MASK                             (1 << 14)
 
 /*
  * Used by CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, CM_MPU_STATICDEP,
- * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE
+ * CM_SDMA_STATICDEP
  */
 #define OMAP4430_L4SEC_STATDEP_SHIFT                           14
 #define OMAP4430_L4SEC_STATDEP_MASK                            (1 << 14)
 
-/* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */
+/* Used by CM_L4CFG_DYNAMICDEP */
 #define OMAP4430_L4WKUP_DYNDEP_SHIFT                           15
 #define OMAP4430_L4WKUP_DYNDEP_MASK                            (1 << 15)
 
 /*
  * Used by CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, CM_MPU_STATICDEP,
- * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP
+ * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
  */
 #define OMAP4430_L4WKUP_STATDEP_SHIFT                          15
 #define OMAP4430_L4WKUP_STATDEP_MASK                           (1 << 15)
 
 /*
- * Used by CM_D2D_DYNAMICDEP, CM_D2D_DYNAMICDEP_RESTORE, CM_L3_1_DYNAMICDEP,
- * CM_L3_1_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP,
- * CM_L4CFG_DYNAMICDEP_RESTORE, CM_MPU_DYNAMICDEP
+ * Used by CM_D2D_DYNAMICDEP, CM_L3_1_DYNAMICDEP, CM_L4CFG_DYNAMICDEP,
+ * CM_MPU_DYNAMICDEP
  */
 #define OMAP4430_MEMIF_DYNDEP_SHIFT                            4
 #define OMAP4430_MEMIF_DYNDEP_MASK                             (1 << 4)
 
 /*
- * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE,
- * CM_DSS_STATICDEP, CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP,
+ * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_DSS_STATICDEP,
+ * CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP,
  * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP,
- * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP
+ * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
  */
 #define OMAP4430_MEMIF_STATDEP_SHIFT                           4
 #define OMAP4430_MEMIF_STATDEP_MASK                            (1 << 4)
 
 /*
  * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE,
- * CM_SSC_MODFREQDIV_DPLL_CORE_RESTORE, CM_SSC_MODFREQDIV_DPLL_DDRPHY,
- * CM_SSC_MODFREQDIV_DPLL_IVA, CM_SSC_MODFREQDIV_DPLL_MPU,
- * CM_SSC_MODFREQDIV_DPLL_PER, CM_SSC_MODFREQDIV_DPLL_UNIPRO,
- * CM_SSC_MODFREQDIV_DPLL_USB
+ * CM_SSC_MODFREQDIV_DPLL_DDRPHY, CM_SSC_MODFREQDIV_DPLL_IVA,
+ * CM_SSC_MODFREQDIV_DPLL_MPU, CM_SSC_MODFREQDIV_DPLL_PER,
+ * CM_SSC_MODFREQDIV_DPLL_UNIPRO, CM_SSC_MODFREQDIV_DPLL_USB
  */
 #define OMAP4430_MODFREQDIV_EXPONENT_SHIFT                     8
 #define OMAP4430_MODFREQDIV_EXPONENT_MASK                      (0x7 << 8)
 
 /*
  * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE,
- * CM_SSC_MODFREQDIV_DPLL_CORE_RESTORE, CM_SSC_MODFREQDIV_DPLL_DDRPHY,
- * CM_SSC_MODFREQDIV_DPLL_IVA, CM_SSC_MODFREQDIV_DPLL_MPU,
- * CM_SSC_MODFREQDIV_DPLL_PER, CM_SSC_MODFREQDIV_DPLL_UNIPRO,
- * CM_SSC_MODFREQDIV_DPLL_USB
+ * CM_SSC_MODFREQDIV_DPLL_DDRPHY, CM_SSC_MODFREQDIV_DPLL_IVA,
+ * CM_SSC_MODFREQDIV_DPLL_MPU, CM_SSC_MODFREQDIV_DPLL_PER,
+ * CM_SSC_MODFREQDIV_DPLL_UNIPRO, CM_SSC_MODFREQDIV_DPLL_USB
  */
 #define OMAP4430_MODFREQDIV_MANTISSA_SHIFT                     0
 #define OMAP4430_MODFREQDIV_MANTISSA_MASK                      (0x7f << 0)
  * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_MDMINTC_CLKCTRL,
  * CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL,
  * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL,
- * CM_CM1_PROFILING_CLKCTRL, CM_CM1_PROFILING_CLKCTRL_RESTORE,
- * CM_CM2_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL_RESTORE,
+ * CM_CM1_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL,
  * CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL,
  * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL,
  * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL,
  * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL,
  * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL,
  * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL,
- * CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, CM_L3INIT_USB_HOST_FS_CLKCTRL,
- * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL,
- * CM_L3INIT_USB_TLL_CLKCTRL_RESTORE, CM_L3INIT_XHPI_CLKCTRL,
- * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL_RESTORE,
- * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE,
- * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE,
+ * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL,
+ * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL,
+ * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL,
  * CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, CM_L3_2_L3_2_CLKCTRL,
  * CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, CM_L4CFG_L4_CFG_CLKCTRL,
  * CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, CM_L4PER_ADC_CLKCTRL,
  * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL,
  * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL,
  * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL,
- * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL_RESTORE,
- * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL_RESTORE,
- * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL_RESTORE,
- * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL_RESTORE,
- * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL_RESTORE,
- * CM_L4PER_HDQ1W_CLKCTRL, CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL,
- * CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL,
- * CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL,
- * CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL,
- * CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL,
- * CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL,
- * CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL,
+ * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL,
+ * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL,
+ * CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL, CM_L4PER_I2C1_CLKCTRL,
+ * CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL,
+ * CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL,
+ * CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL,
+ * CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL,
+ * CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL, CM_L4PER_MMCSD4_CLKCTRL,
+ * CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL,
  * CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL,
  * CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL,
  * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL,
 #define OMAP4430_OPTFCLKEN_CTRLCLK_MASK                                (1 << 8)
 
 /*
- * Used by CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL_RESTORE,
- * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL_RESTORE,
- * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL_RESTORE,
- * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL_RESTORE,
- * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL_RESTORE, CM_WKUP_GPIO1_CLKCTRL
+ * Used by CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL,
+ * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL,
+ * CM_WKUP_GPIO1_CLKCTRL
  */
 #define OMAP4430_OPTFCLKEN_DBCLK_SHIFT                         8
 #define OMAP4430_OPTFCLKEN_DBCLK_MASK                          (1 << 8)
 #define OMAP4430_OPTFCLKEN_FCLK2_SHIFT                         10
 #define OMAP4430_OPTFCLKEN_FCLK2_MASK                          (1 << 10)
 
-/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
+/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
 #define OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT                    15
 #define OMAP4430_OPTFCLKEN_FUNC48MCLK_MASK                     (1 << 15)
 
-/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
+/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
 #define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT               13
 #define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_MASK                        (1 << 13)
 
-/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
+/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
 #define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT               14
 #define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_MASK                        (1 << 14)
 
-/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
+/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
 #define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT                        11
 #define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_MASK                 (1 << 11)
 
-/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
+/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
 #define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT                        12
 #define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_MASK                 (1 << 12)
 
 #define OMAP4430_OPTFCLKEN_TXPHYCLK_SHIFT                      8
 #define OMAP4430_OPTFCLKEN_TXPHYCLK_MASK                       (1 << 8)
 
-/* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */
+/* Used by CM_L3INIT_USB_TLL_CLKCTRL */
 #define OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT                   8
 #define OMAP4430_OPTFCLKEN_USB_CH0_CLK_MASK                    (1 << 8)
 
-/* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */
+/* Used by CM_L3INIT_USB_TLL_CLKCTRL */
 #define OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT                   9
 #define OMAP4430_OPTFCLKEN_USB_CH1_CLK_MASK                    (1 << 9)
 
-/* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */
+/* Used by CM_L3INIT_USB_TLL_CLKCTRL */
 #define OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT                   10
 #define OMAP4430_OPTFCLKEN_USB_CH2_CLK_MASK                    (1 << 10)
 
-/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
+/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
 #define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT                   8
 #define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_MASK                    (1 << 8)
 
-/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
+/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
 #define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT                   9
 #define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_MASK                    (1 << 9)
 
-/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
+/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
 #define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT                   10
 #define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_MASK                    (1 << 10)
 
 #define OMAP4430_PMD_TRACE_MUX_CTRL_SHIFT                      22
 #define OMAP4430_PMD_TRACE_MUX_CTRL_MASK                       (0x3 << 22)
 
-/* Used by CM_DYN_DEP_PRESCAL, CM_DYN_DEP_PRESCAL_RESTORE */
+/* Used by CM_DYN_DEP_PRESCAL */
 #define OMAP4430_PRESCAL_SHIFT                                 0
 #define OMAP4430_PRESCAL_MASK                                  (0x3f << 0)
 
 #define OMAP4430_R_RTL_SHIFT                                   11
 #define OMAP4430_R_RTL_MASK                                    (0x1f << 11)
 
-/*
- * Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE,
- * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE
- */
+/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL */
 #define OMAP4430_SAR_MODE_SHIFT                                        4
 #define OMAP4430_SAR_MODE_MASK                                 (1 << 4)
 
 #define OMAP4430_SCHEME_SHIFT                                  30
 #define OMAP4430_SCHEME_MASK                                   (0x3 << 30)
 
-/* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */
+/* Used by CM_L4CFG_DYNAMICDEP */
 #define OMAP4430_SDMA_DYNDEP_SHIFT                             11
 #define OMAP4430_SDMA_DYNDEP_MASK                              (1 << 11)
 
  * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL,
  * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL,
  * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL,
- * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE,
- * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL,
- * CM_L3INIT_XHPI_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_MPU_MPU_CLKCTRL,
- * CM_SDMA_SDMA_CLKCTRL, CM_TESLA_TESLA_CLKCTRL
+ * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_FS_CLKCTRL,
+ * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL,
+ * CM_L4SEC_CRYPTODMA_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL,
+ * CM_TESLA_TESLA_CLKCTRL
  */
 #define OMAP4430_STBYST_SHIFT                                  18
 #define OMAP4430_STBYST_MASK                                   (1 << 18)
 #define OMAP4430_ST_DPLL_CLKDCOLDO_MASK                                (1 << 9)
 
 /*
- * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE,
- * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU,
- * CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB
+ * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY,
+ * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB
  */
 #define OMAP4430_ST_DPLL_CLKOUT_SHIFT                          9
 #define OMAP4430_ST_DPLL_CLKOUT_MASK                           (1 << 9)
 
-/*
- * Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE,
- * CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_PER
- */
+/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */
 #define OMAP4430_ST_DPLL_CLKOUTHIF_SHIFT                       9
 #define OMAP4430_ST_DPLL_CLKOUTHIF_MASK                                (1 << 9)
 
 #define OMAP4430_ST_DPLL_CLKOUTX2_MASK                         (1 << 11)
 
 /*
- * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE,
- * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER
+ * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA,
+ * CM_DIV_M4_DPLL_PER
  */
 #define OMAP4430_ST_HSDIVIDER_CLKOUT1_SHIFT                    9
 #define OMAP4430_ST_HSDIVIDER_CLKOUT1_MASK                     (1 << 9)
 
 /*
- * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE,
- * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER
+ * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA,
+ * CM_DIV_M5_DPLL_PER
  */
 #define OMAP4430_ST_HSDIVIDER_CLKOUT2_SHIFT                    9
 #define OMAP4430_ST_HSDIVIDER_CLKOUT2_MASK                     (1 << 9)
 
-/*
- * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE,
- * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER
- */
+/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
 #define OMAP4430_ST_HSDIVIDER_CLKOUT3_SHIFT                    9
 #define OMAP4430_ST_HSDIVIDER_CLKOUT3_MASK                     (1 << 9)
 
-/*
- * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE,
- * CM_DIV_M7_DPLL_PER
- */
+/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
 #define OMAP4430_ST_HSDIVIDER_CLKOUT4_SHIFT                    9
 #define OMAP4430_ST_HSDIVIDER_CLKOUT4_MASK                     (1 << 9)
 
 #define OMAP4430_SYS_CLKSEL_SHIFT                              0
 #define OMAP4430_SYS_CLKSEL_MASK                               (0x7 << 0)
 
-/* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */
+/* Used by CM_L4CFG_DYNAMICDEP */
 #define OMAP4430_TESLA_DYNDEP_SHIFT                            1
 #define OMAP4430_TESLA_DYNDEP_MASK                             (1 << 1)
 
 #define OMAP4430_TESLA_STATDEP_MASK                            (1 << 1)
 
 /*
- * Used by CM_D2D_DYNAMICDEP, CM_D2D_DYNAMICDEP_RESTORE, CM_DUCATI_DYNAMICDEP,
- * CM_EMU_DYNAMICDEP, CM_L3_1_DYNAMICDEP, CM_L3_1_DYNAMICDEP_RESTORE,
- * CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP,
- * CM_L4CFG_DYNAMICDEP_RESTORE, CM_L4PER_DYNAMICDEP,
- * CM_L4PER_DYNAMICDEP_RESTORE, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP
+ * Used by CM_D2D_DYNAMICDEP, CM_DUCATI_DYNAMICDEP, CM_EMU_DYNAMICDEP,
+ * CM_L3_1_DYNAMICDEP, CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP,
+ * CM_L4PER_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP
  */
 #define OMAP4430_WINDOWSIZE_SHIFT                              24
 #define OMAP4430_WINDOWSIZE_MASK                               (0xf << 24)
index e2d7a56b2ad67e06058b86431fece09350d73ecc..1bc00dc4876c0678e1bbd78e43f0806d822ddeeb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * OMAP44xx CM1 instance offset macros
  *
- * Copyright (C) 2009-2010 Texas Instruments, Inc.
+ * Copyright (C) 2009-2011 Texas Instruments, Inc.
  * Copyright (C) 2009-2010 Nokia Corporation
  *
  * Paul Walmsley (paul@pwsan.com)
@@ -41,9 +41,9 @@
 #define OMAP4430_CM1_INSTR_INST                0x0f00
 
 /* CM1 clockdomain register offsets (from instance start) */
-#define OMAP4430_CM1_ABE_ABE_CDOFFS            0x0000
-#define OMAP4430_CM1_MPU_MPU_CDOFFS            0x0000
-#define OMAP4430_CM1_TESLA_TESLA_CDOFFS                0x0000
+#define OMAP4430_CM1_MPU_MPU_CDOFFS    0x0000
+#define OMAP4430_CM1_TESLA_TESLA_CDOFFS        0x0000
+#define OMAP4430_CM1_ABE_ABE_CDOFFS    0x0000
 
 /* CM1 */
 
@@ -82,8 +82,8 @@
 #define OMAP4430_CM_DIV_M7_DPLL_CORE                   OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0044)
 #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_CORE_OFFSET       0x0048
 #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_CORE           OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0048)
-#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_CORE_OFFSET      0x004c
-#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_CORE          OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x004c)
+#define OMAP4_CM_SSC_MODFREQDIV_DPLL_CORE_OFFSET       0x004c
+#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_CORE           OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x004c)
 #define OMAP4_CM_EMU_OVERRIDE_DPLL_CORE_OFFSET         0x0050
 #define OMAP4430_CM_EMU_OVERRIDE_DPLL_CORE             OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0050)
 #define OMAP4_CM_CLKMODE_DPLL_MPU_OFFSET               0x0060
@@ -98,8 +98,8 @@
 #define OMAP4430_CM_DIV_M2_DPLL_MPU                    OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0070)
 #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_MPU_OFFSET                0x0088
 #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_MPU            OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0088)
-#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_MPU_OFFSET               0x008c
-#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_MPU           OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x008c)
+#define OMAP4_CM_SSC_MODFREQDIV_DPLL_MPU_OFFSET                0x008c
+#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_MPU            OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x008c)
 #define OMAP4_CM_BYPCLK_DPLL_MPU_OFFSET                        0x009c
 #define OMAP4430_CM_BYPCLK_DPLL_MPU                    OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x009c)
 #define OMAP4_CM_CLKMODE_DPLL_IVA_OFFSET               0x00a0
 #define OMAP4430_CM_DIV_M5_DPLL_IVA                    OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00bc)
 #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_IVA_OFFSET                0x00c8
 #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_IVA            OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00c8)
-#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_IVA_OFFSET               0x00cc
-#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_IVA           OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00cc)
+#define OMAP4_CM_SSC_MODFREQDIV_DPLL_IVA_OFFSET                0x00cc
+#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_IVA            OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00cc)
 #define OMAP4_CM_BYPCLK_DPLL_IVA_OFFSET                        0x00dc
 #define OMAP4430_CM_BYPCLK_DPLL_IVA                    OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00dc)
 #define OMAP4_CM_CLKMODE_DPLL_ABE_OFFSET               0x00e0
 #define OMAP4430_CM_DIV_M3_DPLL_ABE                    OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00f4)
 #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_ABE_OFFSET                0x0108
 #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_ABE            OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0108)
-#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_ABE_OFFSET               0x010c
-#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_ABE           OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x010c)
+#define OMAP4_CM_SSC_MODFREQDIV_DPLL_ABE_OFFSET                0x010c
+#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_ABE            OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x010c)
 #define OMAP4_CM_CLKMODE_DPLL_DDRPHY_OFFSET            0x0120
 #define OMAP4430_CM_CLKMODE_DPLL_DDRPHY                        OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0120)
 #define OMAP4_CM_IDLEST_DPLL_DDRPHY_OFFSET             0x0124
 #define OMAP4430_CM_DIV_M6_DPLL_DDRPHY                 OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0140)
 #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_DDRPHY_OFFSET     0x0148
 #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_DDRPHY         OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0148)
-#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_DDRPHY_OFFSET    0x014c
-#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_DDRPHY                OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x014c)
+#define OMAP4_CM_SSC_MODFREQDIV_DPLL_DDRPHY_OFFSET     0x014c
+#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_DDRPHY         OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x014c)
 #define OMAP4_CM_SHADOW_FREQ_CONFIG1_OFFSET            0x0160
 #define OMAP4430_CM_SHADOW_FREQ_CONFIG1                        OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0160)
 #define OMAP4_CM_SHADOW_FREQ_CONFIG2_OFFSET            0x0164
 #define OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET              0x0088
 #define OMAP4430_CM1_ABE_WDT3_CLKCTRL                  OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_INST, 0x0088)
 
-/* CM1.RESTORE_CM1 register offsets */
-#define OMAP4_CM_CLKSEL_CORE_RESTORE_OFFSET            0x0000
-#define OMAP4430_CM_CLKSEL_CORE_RESTORE                        OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0000)
-#define OMAP4_CM_DIV_M2_DPLL_CORE_RESTORE_OFFSET       0x0004
-#define OMAP4430_CM_DIV_M2_DPLL_CORE_RESTORE           OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0004)
-#define OMAP4_CM_DIV_M3_DPLL_CORE_RESTORE_OFFSET       0x0008
-#define OMAP4430_CM_DIV_M3_DPLL_CORE_RESTORE           OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0008)
-#define OMAP4_CM_DIV_M4_DPLL_CORE_RESTORE_OFFSET       0x000c
-#define OMAP4430_CM_DIV_M4_DPLL_CORE_RESTORE           OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x000c)
-#define OMAP4_CM_DIV_M5_DPLL_CORE_RESTORE_OFFSET       0x0010
-#define OMAP4430_CM_DIV_M5_DPLL_CORE_RESTORE           OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0010)
-#define OMAP4_CM_DIV_M6_DPLL_CORE_RESTORE_OFFSET       0x0014
-#define OMAP4430_CM_DIV_M6_DPLL_CORE_RESTORE           OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0014)
-#define OMAP4_CM_DIV_M7_DPLL_CORE_RESTORE_OFFSET       0x0018
-#define OMAP4430_CM_DIV_M7_DPLL_CORE_RESTORE           OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0018)
-#define OMAP4_CM_CLKSEL_DPLL_CORE_RESTORE_OFFSET       0x001c
-#define OMAP4430_CM_CLKSEL_DPLL_CORE_RESTORE           OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x001c)
-#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE_OFFSET       0x0020
-#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE   OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0020)
-#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_CORE_RESTORE_OFFSET      0x0024
-#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_CORE_RESTORE  OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0024)
-#define OMAP4_CM_CLKMODE_DPLL_CORE_RESTORE_OFFSET      0x0028
-#define OMAP4430_CM_CLKMODE_DPLL_CORE_RESTORE          OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0028)
-#define OMAP4_CM_SHADOW_FREQ_CONFIG2_RESTORE_OFFSET    0x002c
-#define OMAP4430_CM_SHADOW_FREQ_CONFIG2_RESTORE                OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x002c)
-#define OMAP4_CM_SHADOW_FREQ_CONFIG1_RESTORE_OFFSET    0x0030
-#define OMAP4430_CM_SHADOW_FREQ_CONFIG1_RESTORE                OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0030)
-#define OMAP4_CM_AUTOIDLE_DPLL_CORE_RESTORE_OFFSET     0x0034
-#define OMAP4430_CM_AUTOIDLE_DPLL_CORE_RESTORE         OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0034)
-#define OMAP4_CM_MPU_CLKSTCTRL_RESTORE_OFFSET          0x0038
-#define OMAP4430_CM_MPU_CLKSTCTRL_RESTORE              OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0038)
-#define OMAP4_CM_CM1_PROFILING_CLKCTRL_RESTORE_OFFSET  0x003c
-#define OMAP4430_CM_CM1_PROFILING_CLKCTRL_RESTORE      OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x003c)
-#define OMAP4_CM_DYN_DEP_PRESCAL_RESTORE_OFFSET                0x0040
-#define OMAP4430_CM_DYN_DEP_PRESCAL_RESTORE            OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0040)
-
 /* Function prototypes */
 extern u32 omap4_cm1_read_inst_reg(s16 inst, u16 idx);
 extern void omap4_cm1_write_inst_reg(u32 val, s16 inst, u16 idx);
index aa4745044065e1cf269c6f2ad6ed559b14fe9cef..b9de72da1a8e26d751ce9555998e6c956efc0723 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * OMAP44xx CM2 instance offset macros
  *
- * Copyright (C) 2009-2010 Texas Instruments, Inc.
+ * Copyright (C) 2009-2011 Texas Instruments, Inc.
  * Copyright (C) 2009-2010 Nokia Corporation
  *
  * Paul Walmsley (paul@pwsan.com)
@@ -40,9 +40,9 @@
 #define OMAP4430_CM2_CAM_INST          0x1000
 #define OMAP4430_CM2_DSS_INST          0x1100
 #define OMAP4430_CM2_GFX_INST          0x1200
-#define OMAP4430_CM2_L3INIT_INST               0x1300
+#define OMAP4430_CM2_L3INIT_INST       0x1300
 #define OMAP4430_CM2_L4PER_INST                0x1400
-#define OMAP4430_CM2_CEFUSE_INST               0x1600
+#define OMAP4430_CM2_CEFUSE_INST       0x1600
 #define OMAP4430_CM2_RESTORE_INST      0x1e00
 #define OMAP4430_CM2_INSTR_INST                0x1f00
 
@@ -65,7 +65,6 @@
 #define OMAP4430_CM2_L4PER_L4SEC_CDOFFS                0x0180
 #define OMAP4430_CM2_CEFUSE_CEFUSE_CDOFFS      0x0000
 
-
 /* CM2 */
 
 /* CM2.OCP_SOCKET_CM2 register offsets */
 #define OMAP4430_CM_DIV_M7_DPLL_PER                    OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0064)
 #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_PER_OFFSET                0x0068
 #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_PER            OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0068)
-#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_PER_OFFSET               0x006c
-#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_PER           OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x006c)
+#define OMAP4_CM_SSC_MODFREQDIV_DPLL_PER_OFFSET                0x006c
+#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_PER            OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x006c)
 #define OMAP4_CM_CLKMODE_DPLL_USB_OFFSET               0x0080
 #define OMAP4430_CM_CLKMODE_DPLL_USB                   OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0080)
 #define OMAP4_CM_IDLEST_DPLL_USB_OFFSET                        0x0084
 #define OMAP4430_CM_DIV_M2_DPLL_USB                    OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0090)
 #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_USB_OFFSET                0x00a8
 #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_USB            OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00a8)
-#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_USB_OFFSET               0x00ac
-#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_USB           OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00ac)
+#define OMAP4_CM_SSC_MODFREQDIV_DPLL_USB_OFFSET                0x00ac
+#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_USB            OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00ac)
 #define OMAP4_CM_CLKDCOLDO_DPLL_USB_OFFSET             0x00b4
 #define OMAP4430_CM_CLKDCOLDO_DPLL_USB                 OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00b4)
 #define OMAP4_CM_CLKMODE_DPLL_UNIPRO_OFFSET            0x00c0
 #define OMAP4430_CM_DIV_M2_DPLL_UNIPRO                 OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00d0)
 #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_UNIPRO_OFFSET     0x00e8
 #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_UNIPRO         OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00e8)
-#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_UNIPRO_OFFSET    0x00ec
-#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_UNIPRO                OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00ec)
+#define OMAP4_CM_SSC_MODFREQDIV_DPLL_UNIPRO_OFFSET     0x00ec
+#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_UNIPRO         OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00ec)
 
 /* CM2.ALWAYS_ON_CM2 register offsets */
 #define OMAP4_CM_ALWON_CLKSTCTRL_OFFSET                        0x0000
 #define OMAP4430_CM_D2D_DYNAMICDEP                     OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0508)
 #define OMAP4_CM_D2D_SAD2D_CLKCTRL_OFFSET              0x0520
 #define OMAP4430_CM_D2D_SAD2D_CLKCTRL                  OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0520)
-#define OMAP4_CM_D2D_INSTEM_ICR_CLKCTRL_OFFSET         0x0528
-#define OMAP4430_CM_D2D_INSTEM_ICR_CLKCTRL             OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0528)
+#define OMAP4_CM_D2D_MODEM_ICR_CLKCTRL_OFFSET          0x0528
+#define OMAP4430_CM_D2D_MODEM_ICR_CLKCTRL              OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0528)
 #define OMAP4_CM_D2D_SAD2D_FW_CLKCTRL_OFFSET           0x0530
 #define OMAP4430_CM_D2D_SAD2D_FW_CLKCTRL               OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0530)
 #define OMAP4_CM_L4CFG_CLKSTCTRL_OFFSET                        0x0600
 #define OMAP4_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET          0x0020
 #define OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL              OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CEFUSE_INST, 0x0020)
 
-/* CM2.RESTORE_CM2 register offsets */
-#define OMAP4_CM_L3_1_CLKSTCTRL_RESTORE_OFFSET         0x0000
-#define OMAP4430_CM_L3_1_CLKSTCTRL_RESTORE             OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0000)
-#define OMAP4_CM_L3_2_CLKSTCTRL_RESTORE_OFFSET         0x0004
-#define OMAP4430_CM_L3_2_CLKSTCTRL_RESTORE             OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0004)
-#define OMAP4_CM_L4CFG_CLKSTCTRL_RESTORE_OFFSET                0x0008
-#define OMAP4430_CM_L4CFG_CLKSTCTRL_RESTORE            OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0008)
-#define OMAP4_CM_MEMIF_CLKSTCTRL_RESTORE_OFFSET                0x000c
-#define OMAP4430_CM_MEMIF_CLKSTCTRL_RESTORE            OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x000c)
-#define OMAP4_CM_L4PER_CLKSTCTRL_RESTORE_OFFSET                0x0010
-#define OMAP4430_CM_L4PER_CLKSTCTRL_RESTORE            OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0010)
-#define OMAP4_CM_L3INIT_CLKSTCTRL_RESTORE_OFFSET       0x0014
-#define OMAP4430_CM_L3INIT_CLKSTCTRL_RESTORE           OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0014)
-#define OMAP4_CM_L3INSTR_L3_3_CLKCTRL_RESTORE_OFFSET   0x0018
-#define OMAP4430_CM_L3INSTR_L3_3_CLKCTRL_RESTORE       OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0018)
-#define OMAP4_CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE_OFFSET       0x001c
-#define OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE   OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x001c)
-#define OMAP4_CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE_OFFSET        0x0020
-#define OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE    OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0020)
-#define OMAP4_CM_CM2_PROFILING_CLKCTRL_RESTORE_OFFSET  0x0024
-#define OMAP4430_CM_CM2_PROFILING_CLKCTRL_RESTORE      OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0024)
-#define OMAP4_CM_D2D_STATICDEP_RESTORE_OFFSET          0x0028
-#define OMAP4430_CM_D2D_STATICDEP_RESTORE              OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0028)
-#define OMAP4_CM_L3_1_DYNAMICDEP_RESTORE_OFFSET                0x002c
-#define OMAP4430_CM_L3_1_DYNAMICDEP_RESTORE            OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x002c)
-#define OMAP4_CM_L3_2_DYNAMICDEP_RESTORE_OFFSET                0x0030
-#define OMAP4430_CM_L3_2_DYNAMICDEP_RESTORE            OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0030)
-#define OMAP4_CM_D2D_DYNAMICDEP_RESTORE_OFFSET         0x0034
-#define OMAP4430_CM_D2D_DYNAMICDEP_RESTORE             OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0034)
-#define OMAP4_CM_L4CFG_DYNAMICDEP_RESTORE_OFFSET       0x0038
-#define OMAP4430_CM_L4CFG_DYNAMICDEP_RESTORE           OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0038)
-#define OMAP4_CM_L4PER_DYNAMICDEP_RESTORE_OFFSET       0x003c
-#define OMAP4430_CM_L4PER_DYNAMICDEP_RESTORE           OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x003c)
-#define OMAP4_CM_L4PER_GPIO2_CLKCTRL_RESTORE_OFFSET    0x0040
-#define OMAP4430_CM_L4PER_GPIO2_CLKCTRL_RESTORE                OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0040)
-#define OMAP4_CM_L4PER_GPIO3_CLKCTRL_RESTORE_OFFSET    0x0044
-#define OMAP4430_CM_L4PER_GPIO3_CLKCTRL_RESTORE                OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0044)
-#define OMAP4_CM_L4PER_GPIO4_CLKCTRL_RESTORE_OFFSET    0x0048
-#define OMAP4430_CM_L4PER_GPIO4_CLKCTRL_RESTORE                OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0048)
-#define OMAP4_CM_L4PER_GPIO5_CLKCTRL_RESTORE_OFFSET    0x004c
-#define OMAP4430_CM_L4PER_GPIO5_CLKCTRL_RESTORE                OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x004c)
-#define OMAP4_CM_L4PER_GPIO6_CLKCTRL_RESTORE_OFFSET    0x0050
-#define OMAP4430_CM_L4PER_GPIO6_CLKCTRL_RESTORE                OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0050)
-#define OMAP4_CM_L3INIT_USB_HOST_CLKCTRL_RESTORE_OFFSET        0x0054
-#define OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL_RESTORE    OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0054)
-#define OMAP4_CM_L3INIT_USB_TLL_CLKCTRL_RESTORE_OFFSET 0x0058
-#define OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL_RESTORE     OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0058)
-#define OMAP4_CM_SDMA_STATICDEP_RESTORE_OFFSET         0x005c
-#define OMAP4430_CM_SDMA_STATICDEP_RESTORE             OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x005c)
-
 /* Function prototypes */
 extern u32 omap4_cm2_read_inst_reg(s16 inst, u16 idx);
 extern void omap4_cm2_write_inst_reg(u32 val, s16 inst, u16 idx);
index 94ccf464677b78eeb831671f54f862325881a0ac..bcb0c5817167095b7d2b0edc536ab663a9463bd3 100644 (file)
  *
  */
 
-#include <linux/i2c.h>
-#include <linux/i2c/twl.h>
-
 #include <linux/gpio.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
 
-#include <plat/i2c.h>
 #include <plat/mcspi.h>
 #include <plat/nand.h>
 
 #include "common-board-devices.h"
 
-static struct i2c_board_info __initdata pmic_i2c_board_info = {
-       .addr           = 0x48,
-       .flags          = I2C_CLIENT_WAKE,
-};
-
-void __init omap_pmic_init(int bus, u32 clkrate,
-                          const char *pmic_type, int pmic_irq,
-                          struct twl4030_platform_data *pmic_data)
-{
-       strncpy(pmic_i2c_board_info.type, pmic_type,
-               sizeof(pmic_i2c_board_info.type));
-       pmic_i2c_board_info.irq = pmic_irq;
-       pmic_i2c_board_info.platform_data = pmic_data;
-
-       omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
-}
-
 #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
        defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
 static struct omap2_mcspi_device_config ads7846_mcspi_config = {
@@ -115,9 +94,7 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
 #endif
 
 #if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
-static struct omap_nand_platform_data nand_data = {
-       .dma_channel    = -1,           /* disable DMA in OMAP NAND driver */
-};
+static struct omap_nand_platform_data nand_data;
 
 void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
                                 int nr_parts)
@@ -148,7 +125,7 @@ void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
                nand_data.cs = nandcs;
                nand_data.parts = parts;
                nand_data.nr_parts = nr_parts;
-               nand_data.options = options;
+               nand_data.devsize = options;
 
                printk(KERN_INFO "Registering NAND on CS%d\n", nandcs);
                if (gpmc_nand_init(&nand_data) < 0)
index 679719051df5bdfa70569ead1291e9206604ce6a..a0b4a42836ab9f7a29f1757ee410e37a237af00c 100644 (file)
@@ -1,33 +1,11 @@
 #ifndef __OMAP_COMMON_BOARD_DEVICES__
 #define __OMAP_COMMON_BOARD_DEVICES__
 
+#include "twl-common.h"
+
 #define NAND_BLOCK_SIZE        SZ_128K
 
-struct twl4030_platform_data;
 struct mtd_partition;
-
-void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq,
-                   struct twl4030_platform_data *pmic_data);
-
-static inline void omap2_pmic_init(const char *pmic_type,
-                                  struct twl4030_platform_data *pmic_data)
-{
-       omap_pmic_init(2, 2600, pmic_type, INT_24XX_SYS_NIRQ, pmic_data);
-}
-
-static inline void omap3_pmic_init(const char *pmic_type,
-                                  struct twl4030_platform_data *pmic_data)
-{
-       omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data);
-}
-
-static inline void omap4_pmic_init(const char *pmic_type,
-                                  struct twl4030_platform_data *pmic_data)
-{
-       /* Phoenix Audio IC needs I2C1 to start with 400 KHz or less */
-       omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data);
-}
-
 struct ads7846_platform_data;
 
 void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
index c1791d08ae56a5a45847bfd8064213cfe36a6345..8ad210bda9a996072df12625382875fee0b75c26 100644 (file)
@@ -20,8 +20,6 @@
 #include <plat/board.h>
 #include <plat/gpmc.h>
 
-static struct omap_nand_platform_data *gpmc_nand_data;
-
 static struct resource gpmc_nand_resource = {
        .flags          = IORESOURCE_MEM,
 };
@@ -33,7 +31,7 @@ static struct platform_device gpmc_nand_device = {
        .resource       = &gpmc_nand_resource,
 };
 
-static int omap2_nand_gpmc_retime(void)
+static int omap2_nand_gpmc_retime(struct omap_nand_platform_data *gpmc_nand_data)
 {
        struct gpmc_timings t;
        int err;
@@ -83,13 +81,11 @@ static int omap2_nand_gpmc_retime(void)
        return 0;
 }
 
-int __init gpmc_nand_init(struct omap_nand_platform_data *_nand_data)
+int __init gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data)
 {
        int err = 0;
        struct device *dev = &gpmc_nand_device.dev;
 
-       gpmc_nand_data = _nand_data;
-       gpmc_nand_data->nand_setup = omap2_nand_gpmc_retime;
        gpmc_nand_device.dev.platform_data = gpmc_nand_data;
 
        err = gpmc_cs_request(gpmc_nand_data->cs, NAND_IO_SIZE,
@@ -100,7 +96,7 @@ int __init gpmc_nand_init(struct omap_nand_platform_data *_nand_data)
        }
 
         /* Set timings in GPMC */
-       err = omap2_nand_gpmc_retime();
+       err = omap2_nand_gpmc_retime(gpmc_nand_data);
        if (err < 0) {
                dev_err(dev, "Unable to set gpmc timings: %d\n", err);
                return err;
index 441e79d043a71245bde9b5e4256a88a8eabb2367..2ce1ce6fb4dbd7e1db81a48ad47f3c709e233c87 100644 (file)
@@ -333,23 +333,9 @@ static int _set_hwmod_postsetup_state(struct omap_hwmod *oh, void *data)
        return omap_hwmod_set_postsetup_state(oh, *(u8 *)data);
 }
 
+/* See irq.c, omap4-common.c and entry-macro.S */
 void __iomem *omap_irq_base;
 
-/*
- * Initialize asm_irq_base for entry-macro.S
- */
-static inline void omap_irq_base_init(void)
-{
-       if (cpu_is_omap24xx())
-               omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE);
-       else if (cpu_is_omap34xx())
-               omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE);
-       else if (cpu_is_omap44xx())
-               omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE);
-       else
-               pr_err("Could not initialize omap_irq_base\n");
-}
-
 void __init omap2_init_common_infrastructure(void)
 {
        u8 postsetup_state;
@@ -422,7 +408,6 @@ void __init omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0,
                _omap2_init_reprogram_sdrc();
        }
 
-       omap_irq_base_init();
 }
 
 /*
index 3af2b7a1045e38d957e40a1f125acb19bc57ba41..3a12f7586a4cfc1e258aee208390065b79b6051b 100644 (file)
@@ -141,25 +141,20 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
                                IRQ_NOREQUEST | IRQ_NOPROBE, 0);
 }
 
-void __init omap_init_irq(void)
+static void __init omap_init_irq(u32 base, int nr_irqs)
 {
        unsigned long nr_of_irqs = 0;
        unsigned int nr_banks = 0;
        int i, j;
 
+       omap_irq_base = ioremap(base, SZ_4K);
+       if (WARN_ON(!omap_irq_base))
+               return;
+
        for (i = 0; i < ARRAY_SIZE(irq_banks); i++) {
-               unsigned long base = 0;
                struct omap_irq_bank *bank = irq_banks + i;
 
-               if (cpu_is_omap24xx())
-                       base = OMAP24XX_IC_BASE;
-               else if (cpu_is_omap34xx())
-                       base = OMAP34XX_IC_BASE;
-
-               BUG_ON(!base);
-
-               if (cpu_is_ti816x())
-                       bank->nr_irqs = 128;
+               bank->nr_irqs = nr_irqs;
 
                /* Static mapping, never released */
                bank->base_reg = ioremap(base, SZ_4K);
@@ -181,6 +176,21 @@ void __init omap_init_irq(void)
               nr_of_irqs, nr_banks, nr_banks > 1 ? "s" : "");
 }
 
+void __init omap2_init_irq(void)
+{
+       omap_init_irq(OMAP24XX_IC_BASE, 96);
+}
+
+void __init omap3_init_irq(void)
+{
+       omap_init_irq(OMAP34XX_IC_BASE, 96);
+}
+
+void __init ti816x_init_irq(void)
+{
+       omap_init_irq(OMAP34XX_IC_BASE, 128);
+}
+
 #ifdef CONFIG_ARCH_OMAP3
 static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)];
 
index 9ef8c29dd817091bb2b8c49ed2332ba2023dff6c..35ac3e5f6e94c4077e712cd8ae4333771eef3526 100644 (file)
@@ -19,6 +19,8 @@
 #include <asm/hardware/gic.h>
 #include <asm/hardware/cache-l2x0.h>
 
+#include <plat/irqs.h>
+
 #include <mach/hardware.h>
 #include <mach/omap4-common.h>
 
@@ -31,17 +33,15 @@ void __iomem *gic_dist_base_addr;
 
 void __init gic_init_irq(void)
 {
-       void __iomem *gic_cpu_base;
-
        /* Static mapping, never released */
        gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K);
        BUG_ON(!gic_dist_base_addr);
 
        /* Static mapping, never released */
-       gic_cpu_base = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512);
-       BUG_ON(!gic_cpu_base);
+       omap_irq_base = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512);
+       BUG_ON(!omap_irq_base);
 
-       gic_init(0, 29, gic_dist_base_addr, gic_cpu_base);
+       gic_init(0, 29, gic_dist_base_addr, omap_irq_base);
 }
 
 #ifdef CONFIG_CACHE_L2X0
index 293fa6cd50e14192cf075e1b9f9937c307b7c2e4..7d242c9e2a2c7b5db7a2de4c5aedee3169fbb5e6 100644 (file)
@@ -2,6 +2,7 @@
  * omap_hwmod implementation for OMAP2/3/4
  *
  * Copyright (C) 2009-2011 Nokia Corporation
+ * Copyright (C) 2011 Texas Instruments, Inc.
  *
  * Paul Walmsley, Benoît Cousson, Kevin Hilman
  *
@@ -387,11 +388,10 @@ static int _set_module_autoidle(struct omap_hwmod *oh, u8 autoidle,
  */
 static int _enable_wakeup(struct omap_hwmod *oh, u32 *v)
 {
-       u32 wakeup_mask;
-
        if (!oh->class->sysc ||
            !((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) ||
-             (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP)))
+             (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) ||
+             (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)))
                return -EINVAL;
 
        if (!oh->class->sysc->sysc_fields) {
@@ -399,12 +399,13 @@ static int _enable_wakeup(struct omap_hwmod *oh, u32 *v)
                return -EINVAL;
        }
 
-       wakeup_mask = (0x1 << oh->class->sysc->sysc_fields->enwkup_shift);
-
-       *v |= wakeup_mask;
+       if (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)
+               *v |= 0x1 << oh->class->sysc->sysc_fields->enwkup_shift;
 
        if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP)
                _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART_WKUP, v);
+       if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)
+               _set_master_standbymode(oh, HWMOD_IDLEMODE_SMART_WKUP, v);
 
        /* XXX test pwrdm_get_wken for this hwmod's subsystem */
 
@@ -422,11 +423,10 @@ static int _enable_wakeup(struct omap_hwmod *oh, u32 *v)
  */
 static int _disable_wakeup(struct omap_hwmod *oh, u32 *v)
 {
-       u32 wakeup_mask;
-
        if (!oh->class->sysc ||
            !((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) ||
-             (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP)))
+             (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) ||
+             (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)))
                return -EINVAL;
 
        if (!oh->class->sysc->sysc_fields) {
@@ -434,12 +434,13 @@ static int _disable_wakeup(struct omap_hwmod *oh, u32 *v)
                return -EINVAL;
        }
 
-       wakeup_mask = (0x1 << oh->class->sysc->sysc_fields->enwkup_shift);
-
-       *v &= ~wakeup_mask;
+       if (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)
+               *v &= ~(0x1 << oh->class->sysc->sysc_fields->enwkup_shift);
 
        if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP)
                _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART, v);
+       if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)
+               _set_master_standbymode(oh, HWMOD_IDLEMODE_SMART_WKUP, v);
 
        /* XXX test pwrdm_get_wken for this hwmod's subsystem */
 
@@ -677,6 +678,75 @@ static void _disable_optional_clocks(struct omap_hwmod *oh)
                }
 }
 
+/**
+ * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh
+ * @oh: struct omap_hwmod *oh
+ *
+ * Count and return the number of MPU IRQs associated with the hwmod
+ * @oh.  Used to allocate struct resource data.  Returns 0 if @oh is
+ * NULL.
+ */
+static int _count_mpu_irqs(struct omap_hwmod *oh)
+{
+       struct omap_hwmod_irq_info *ohii;
+       int i = 0;
+
+       if (!oh || !oh->mpu_irqs)
+               return 0;
+
+       do {
+               ohii = &oh->mpu_irqs[i++];
+       } while (ohii->irq != -1);
+
+       return i;
+}
+
+/**
+ * _count_sdma_reqs - count the number of SDMA request lines associated with @oh
+ * @oh: struct omap_hwmod *oh
+ *
+ * Count and return the number of SDMA request lines associated with
+ * the hwmod @oh.  Used to allocate struct resource data.  Returns 0
+ * if @oh is NULL.
+ */
+static int _count_sdma_reqs(struct omap_hwmod *oh)
+{
+       struct omap_hwmod_dma_info *ohdi;
+       int i = 0;
+
+       if (!oh || !oh->sdma_reqs)
+               return 0;
+
+       do {
+               ohdi = &oh->sdma_reqs[i++];
+       } while (ohdi->dma_req != -1);
+
+       return i;
+}
+
+/**
+ * _count_ocp_if_addr_spaces - count the number of address space entries for @oh
+ * @oh: struct omap_hwmod *oh
+ *
+ * Count and return the number of address space ranges associated with
+ * the hwmod @oh.  Used to allocate struct resource data.  Returns 0
+ * if @oh is NULL.
+ */
+static int _count_ocp_if_addr_spaces(struct omap_hwmod_ocp_if *os)
+{
+       struct omap_hwmod_addr_space *mem;
+       int i = 0;
+
+       if (!os || !os->addr)
+               return 0;
+
+       do {
+               mem = &os->addr[i++];
+       } while (mem->pa_start != mem->pa_end);
+
+       return i;
+}
+
 /**
  * _find_mpu_port_index - find hwmod OCP slave port ID intended for MPU use
  * @oh: struct omap_hwmod *
@@ -722,8 +792,7 @@ static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index)
 {
        struct omap_hwmod_ocp_if *os;
        struct omap_hwmod_addr_space *mem;
-       int i;
-       int found = 0;
+       int i = 0, found = 0;
        void __iomem *va_start;
 
        if (!oh || oh->slaves_cnt == 0)
@@ -731,12 +800,14 @@ static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index)
 
        os = oh->slaves[index];
 
-       for (i = 0, mem = os->addr; i < os->addr_cnt; i++, mem++) {
-               if (mem->flags & ADDR_TYPE_RT) {
+       if (!os->addr)
+               return NULL;
+
+       do {
+               mem = &os->addr[i++];
+               if (mem->flags & ADDR_TYPE_RT)
                        found = 1;
-                       break;
-               }
-       }
+       } while (!found && mem->pa_start != mem->pa_end);
 
        if (found) {
                va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start);
@@ -781,8 +852,16 @@ static void _enable_sysc(struct omap_hwmod *oh)
        }
 
        if (sf & SYSC_HAS_MIDLEMODE) {
-               idlemode = (oh->flags & HWMOD_SWSUP_MSTANDBY) ?
-                       HWMOD_IDLEMODE_NO : HWMOD_IDLEMODE_SMART;
+               if (oh->flags & HWMOD_SWSUP_MSTANDBY) {
+                       idlemode = HWMOD_IDLEMODE_NO;
+               } else {
+                       if (sf & SYSC_HAS_ENAWAKEUP)
+                               _enable_wakeup(oh, &v);
+                       if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)
+                               idlemode = HWMOD_IDLEMODE_SMART_WKUP;
+                       else
+                               idlemode = HWMOD_IDLEMODE_SMART;
+               }
                _set_master_standbymode(oh, idlemode, &v);
        }
 
@@ -840,8 +919,16 @@ static void _idle_sysc(struct omap_hwmod *oh)
        }
 
        if (sf & SYSC_HAS_MIDLEMODE) {
-               idlemode = (oh->flags & HWMOD_SWSUP_MSTANDBY) ?
-                       HWMOD_IDLEMODE_FORCE : HWMOD_IDLEMODE_SMART;
+               if (oh->flags & HWMOD_SWSUP_MSTANDBY) {
+                       idlemode = HWMOD_IDLEMODE_FORCE;
+               } else {
+                       if (sf & SYSC_HAS_ENAWAKEUP)
+                               _enable_wakeup(oh, &v);
+                       if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)
+                               idlemode = HWMOD_IDLEMODE_SMART_WKUP;
+                       else
+                               idlemode = HWMOD_IDLEMODE_SMART;
+               }
                _set_master_standbymode(oh, idlemode, &v);
        }
 
@@ -928,6 +1015,8 @@ static int _init_clocks(struct omap_hwmod *oh, void *data)
 
        if (!ret)
                oh->_state = _HWMOD_STATE_CLKS_INITED;
+       else
+               pr_warning("omap_hwmod: %s: cannot _init_clocks\n", oh->name);
 
        return ret;
 }
@@ -1224,6 +1313,8 @@ static int _enable(struct omap_hwmod *oh)
 {
        int r;
 
+       pr_debug("omap_hwmod: %s: enabling\n", oh->name);
+
        if (oh->_state != _HWMOD_STATE_INITIALIZED &&
            oh->_state != _HWMOD_STATE_IDLE &&
            oh->_state != _HWMOD_STATE_DISABLED) {
@@ -1232,17 +1323,6 @@ static int _enable(struct omap_hwmod *oh)
                return -EINVAL;
        }
 
-       pr_debug("omap_hwmod: %s: enabling\n", oh->name);
-
-       /*
-        * If an IP contains only one HW reset line, then de-assert it in order
-        * to allow to enable the clocks. Otherwise the PRCM will return
-        * Intransition status, and the init will failed.
-        */
-       if ((oh->_state == _HWMOD_STATE_INITIALIZED ||
-            oh->_state == _HWMOD_STATE_DISABLED) && oh->rst_lines_cnt == 1)
-               _deassert_hardreset(oh, oh->rst_lines[0].name);
-
        /* Mux pins for device runtime if populated */
        if (oh->mux && (!oh->mux->enabled ||
                        ((oh->_state == _HWMOD_STATE_IDLE) &&
@@ -1252,20 +1332,31 @@ static int _enable(struct omap_hwmod *oh)
        _add_initiator_dep(oh, mpu_oh);
        _enable_clocks(oh);
 
-       r = _wait_target_ready(oh);
-       if (!r) {
-               oh->_state = _HWMOD_STATE_ENABLED;
+       /*
+        * If an IP contains only one HW reset line, then de-assert it in order
+        * to allow the module state transition. Otherwise the PRCM will return
+        * Intransition status, and the init will failed.
+        */
+       if ((oh->_state == _HWMOD_STATE_INITIALIZED ||
+            oh->_state == _HWMOD_STATE_DISABLED) && oh->rst_lines_cnt == 1)
+               _deassert_hardreset(oh, oh->rst_lines[0].name);
 
-               /* Access the sysconfig only if the target is ready */
-               if (oh->class->sysc) {
-                       if (!(oh->_int_flags & _HWMOD_SYSCONFIG_LOADED))
-                               _update_sysc_cache(oh);
-                       _enable_sysc(oh);
-               }
-       } else {
-               _disable_clocks(oh);
+       r = _wait_target_ready(oh);
+       if (r) {
                pr_debug("omap_hwmod: %s: _wait_target_ready: %d\n",
                         oh->name, r);
+               _disable_clocks(oh);
+
+               return r;
+       }
+
+       oh->_state = _HWMOD_STATE_ENABLED;
+
+       /* Access the sysconfig only if the target is ready */
+       if (oh->class->sysc) {
+               if (!(oh->_int_flags & _HWMOD_SYSCONFIG_LOADED))
+                       _update_sysc_cache(oh);
+               _enable_sysc(oh);
        }
 
        return r;
@@ -1281,14 +1372,14 @@ static int _enable(struct omap_hwmod *oh)
  */
 static int _idle(struct omap_hwmod *oh)
 {
+       pr_debug("omap_hwmod: %s: idling\n", oh->name);
+
        if (oh->_state != _HWMOD_STATE_ENABLED) {
                WARN(1, "omap_hwmod: %s: idle state can only be entered from "
                     "enabled state\n", oh->name);
                return -EINVAL;
        }
 
-       pr_debug("omap_hwmod: %s: idling\n", oh->name);
-
        if (oh->class->sysc)
                _idle_sysc(oh);
        _del_initiator_dep(oh, mpu_oh);
@@ -1374,15 +1465,11 @@ static int _shutdown(struct omap_hwmod *oh)
                }
        }
 
-       if (oh->class->sysc)
+       if (oh->class->sysc) {
+               if (oh->_state == _HWMOD_STATE_IDLE)
+                       _enable(oh);
                _shutdown_sysc(oh);
-
-       /*
-        * If an IP contains only one HW reset line, then assert it
-        * before disabling the clocks and shutting down the IP.
-        */
-       if (oh->rst_lines_cnt == 1)
-               _assert_hardreset(oh, oh->rst_lines[0].name);
+       }
 
        /* clocks and deps are already disabled in idle */
        if (oh->_state == _HWMOD_STATE_ENABLED) {
@@ -1392,6 +1479,13 @@ static int _shutdown(struct omap_hwmod *oh)
        }
        /* XXX Should this code also force-disable the optional clocks? */
 
+       /*
+        * If an IP contains only one HW reset line, then assert it
+        * after disabling the clocks and before shutting down the IP.
+        */
+       if (oh->rst_lines_cnt == 1)
+               _assert_hardreset(oh, oh->rst_lines[0].name);
+
        /* Mux pins to safe mode or use populated off mode values */
        if (oh->mux)
                omap_hwmod_mux(oh->mux, _HWMOD_STATE_DISABLED);
@@ -1685,9 +1779,6 @@ static int __init _populate_mpu_rt_base(struct omap_hwmod *oh, void *data)
                return 0;
 
        oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index);
-       if (!oh->_mpu_rt_va)
-               pr_warning("omap_hwmod: %s found no _mpu_rt_va for %s\n",
-                               __func__, oh->name);
 
        return 0;
 }
@@ -1939,10 +2030,10 @@ int omap_hwmod_count_resources(struct omap_hwmod *oh)
 {
        int ret, i;
 
-       ret = oh->mpu_irqs_cnt + oh->sdma_reqs_cnt;
+       ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh);
 
        for (i = 0; i < oh->slaves_cnt; i++)
-               ret += oh->slaves[i]->addr_cnt;
+               ret += _count_ocp_if_addr_spaces(oh->slaves[i]);
 
        return ret;
 }
@@ -1959,12 +2050,13 @@ int omap_hwmod_count_resources(struct omap_hwmod *oh)
  */
 int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
 {
-       int i, j;
+       int i, j, mpu_irqs_cnt, sdma_reqs_cnt;
        int r = 0;
 
        /* For each IRQ, DMA, memory area, fill in array.*/
 
-       for (i = 0; i < oh->mpu_irqs_cnt; i++) {
+       mpu_irqs_cnt = _count_mpu_irqs(oh);
+       for (i = 0; i < mpu_irqs_cnt; i++) {
                (res + r)->name = (oh->mpu_irqs + i)->name;
                (res + r)->start = (oh->mpu_irqs + i)->irq;
                (res + r)->end = (oh->mpu_irqs + i)->irq;
@@ -1972,7 +2064,8 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
                r++;
        }
 
-       for (i = 0; i < oh->sdma_reqs_cnt; i++) {
+       sdma_reqs_cnt = _count_sdma_reqs(oh);
+       for (i = 0; i < sdma_reqs_cnt; i++) {
                (res + r)->name = (oh->sdma_reqs + i)->name;
                (res + r)->start = (oh->sdma_reqs + i)->dma_req;
                (res + r)->end = (oh->sdma_reqs + i)->dma_req;
@@ -1982,10 +2075,12 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
 
        for (i = 0; i < oh->slaves_cnt; i++) {
                struct omap_hwmod_ocp_if *os;
+               int addr_cnt;
 
                os = oh->slaves[i];
+               addr_cnt = _count_ocp_if_addr_spaces(os);
 
-               for (j = 0; j < os->addr_cnt; j++) {
+               for (j = 0; j < addr_cnt; j++) {
                        (res + r)->name = (os->addr + j)->name;
                        (res + r)->start = (os->addr + j)->pa_start;
                        (res + r)->end = (os->addr + j)->pa_end;
index c4d0ae87d62a98596475c74853a6ed0503d6df7f..f3901abf2c286911b27ea587f00769d7c3fd3525 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips
  *
- * Copyright (C) 2009-2010 Nokia Corporation
+ * Copyright (C) 2009-2011 Nokia Corporation
  * Paul Walmsley
  *
  * This program is free software; you can redistribute it and/or modify
@@ -114,38 +114,20 @@ static struct omap_hwmod omap2420_mcbsp1_hwmod;
 static struct omap_hwmod omap2420_mcbsp2_hwmod;
 
 /* l4 core -> mcspi1 interface */
-static struct omap_hwmod_addr_space omap2420_mcspi1_addr_space[] = {
-       {
-               .pa_start       = 0x48098000,
-               .pa_end         = 0x480980ff,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_mcspi1_hwmod,
        .clk            = "mcspi1_ick",
-       .addr           = omap2420_mcspi1_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2420_mcspi1_addr_space),
+       .addr           = omap2_mcspi1_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
 /* l4 core -> mcspi2 interface */
-static struct omap_hwmod_addr_space omap2420_mcspi2_addr_space[] = {
-       {
-               .pa_start       = 0x4809a000,
-               .pa_end         = 0x4809a0ff,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_mcspi2_hwmod,
        .clk            = "mcspi2_ick",
-       .addr           = omap2420_mcspi2_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2420_mcspi2_addr_space),
+       .addr           = omap2_mcspi2_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -157,95 +139,47 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
 };
 
 /* L4 CORE -> UART1 interface */
-static struct omap_hwmod_addr_space omap2420_uart1_addr_space[] = {
-       {
-               .pa_start       = OMAP2_UART1_BASE,
-               .pa_end         = OMAP2_UART1_BASE + SZ_8K - 1,
-               .flags          = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_uart1_hwmod,
        .clk            = "uart1_ick",
-       .addr           = omap2420_uart1_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2420_uart1_addr_space),
+       .addr           = omap2xxx_uart1_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
 /* L4 CORE -> UART2 interface */
-static struct omap_hwmod_addr_space omap2420_uart2_addr_space[] = {
-       {
-               .pa_start       = OMAP2_UART2_BASE,
-               .pa_end         = OMAP2_UART2_BASE + SZ_1K - 1,
-               .flags          = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_uart2_hwmod,
        .clk            = "uart2_ick",
-       .addr           = omap2420_uart2_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2420_uart2_addr_space),
+       .addr           = omap2xxx_uart2_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
 /* L4 PER -> UART3 interface */
-static struct omap_hwmod_addr_space omap2420_uart3_addr_space[] = {
-       {
-               .pa_start       = OMAP2_UART3_BASE,
-               .pa_end         = OMAP2_UART3_BASE + SZ_1K - 1,
-               .flags          = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_uart3_hwmod,
        .clk            = "uart3_ick",
-       .addr           = omap2420_uart3_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2420_uart3_addr_space),
+       .addr           = omap2xxx_uart3_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* I2C IP block address space length (in bytes) */
-#define OMAP2_I2C_AS_LEN               128
-
 /* L4 CORE -> I2C1 interface */
-static struct omap_hwmod_addr_space omap2420_i2c1_addr_space[] = {
-       {
-               .pa_start       = 0x48070000,
-               .pa_end         = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_i2c1_hwmod,
        .clk            = "i2c1_ick",
-       .addr           = omap2420_i2c1_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2420_i2c1_addr_space),
+       .addr           = omap2_i2c1_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
 /* L4 CORE -> I2C2 interface */
-static struct omap_hwmod_addr_space omap2420_i2c2_addr_space[] = {
-       {
-               .pa_start       = 0x48072000,
-               .pa_end         = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_i2c2_hwmod,
        .clk            = "i2c2_ick",
-       .addr           = omap2420_i2c2_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2420_i2c2_addr_space),
+       .addr           = omap2_i2c2_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -340,29 +274,8 @@ static struct omap_hwmod omap2420_iva_hwmod = {
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
 };
 
-/* Timer Common */
-static struct omap_hwmod_class_sysconfig omap2420_timer_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
-                          SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
-                          SYSC_HAS_AUTOIDLE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap2420_timer_hwmod_class = {
-       .name = "timer",
-       .sysc = &omap2420_timer_sysc,
-       .rev = OMAP_TIMER_IP_VERSION_1,
-};
-
 /* timer1 */
 static struct omap_hwmod omap2420_timer1_hwmod;
-static struct omap_hwmod_irq_info omap2420_timer1_mpu_irqs[] = {
-       { .irq = 37, },
-};
 
 static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
        {
@@ -370,6 +283,7 @@ static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
                .pa_end         = 0x48028000 + SZ_1K - 1,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_wkup -> timer1 */
@@ -378,7 +292,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {
        .slave          = &omap2420_timer1_hwmod,
        .clk            = "gpt1_ick",
        .addr           = omap2420_timer1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_timer1_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -390,8 +303,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = {
 /* timer1 hwmod */
 static struct omap_hwmod omap2420_timer1_hwmod = {
        .name           = "timer1",
-       .mpu_irqs       = omap2420_timer1_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_timer1_mpu_irqs),
+       .mpu_irqs       = omap2_timer1_mpu_irqs,
        .main_clk       = "gpt1_fck",
        .prcm           = {
                .omap2 = {
@@ -404,31 +316,19 @@ static struct omap_hwmod omap2420_timer1_hwmod = {
        },
        .slaves         = omap2420_timer1_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_timer1_slaves),
-       .class          = &omap2420_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
 };
 
 /* timer2 */
 static struct omap_hwmod omap2420_timer2_hwmod;
-static struct omap_hwmod_irq_info omap2420_timer2_mpu_irqs[] = {
-       { .irq = 38, },
-};
-
-static struct omap_hwmod_addr_space omap2420_timer2_addrs[] = {
-       {
-               .pa_start       = 0x4802a000,
-               .pa_end         = 0x4802a000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer2 */
 static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_timer2_hwmod,
        .clk            = "gpt2_ick",
-       .addr           = omap2420_timer2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_timer2_addrs),
+       .addr           = omap2xxx_timer2_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -440,8 +340,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = {
 /* timer2 hwmod */
 static struct omap_hwmod omap2420_timer2_hwmod = {
        .name           = "timer2",
-       .mpu_irqs       = omap2420_timer2_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_timer2_mpu_irqs),
+       .mpu_irqs       = omap2_timer2_mpu_irqs,
        .main_clk       = "gpt2_fck",
        .prcm           = {
                .omap2 = {
@@ -454,31 +353,19 @@ static struct omap_hwmod omap2420_timer2_hwmod = {
        },
        .slaves         = omap2420_timer2_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_timer2_slaves),
-       .class          = &omap2420_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
 };
 
 /* timer3 */
 static struct omap_hwmod omap2420_timer3_hwmod;
-static struct omap_hwmod_irq_info omap2420_timer3_mpu_irqs[] = {
-       { .irq = 39, },
-};
-
-static struct omap_hwmod_addr_space omap2420_timer3_addrs[] = {
-       {
-               .pa_start       = 0x48078000,
-               .pa_end         = 0x48078000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer3 */
 static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_timer3_hwmod,
        .clk            = "gpt3_ick",
-       .addr           = omap2420_timer3_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_timer3_addrs),
+       .addr           = omap2xxx_timer3_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -490,8 +377,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = {
 /* timer3 hwmod */
 static struct omap_hwmod omap2420_timer3_hwmod = {
        .name           = "timer3",
-       .mpu_irqs       = omap2420_timer3_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_timer3_mpu_irqs),
+       .mpu_irqs       = omap2_timer3_mpu_irqs,
        .main_clk       = "gpt3_fck",
        .prcm           = {
                .omap2 = {
@@ -504,31 +390,19 @@ static struct omap_hwmod omap2420_timer3_hwmod = {
        },
        .slaves         = omap2420_timer3_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_timer3_slaves),
-       .class          = &omap2420_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
 };
 
 /* timer4 */
 static struct omap_hwmod omap2420_timer4_hwmod;
-static struct omap_hwmod_irq_info omap2420_timer4_mpu_irqs[] = {
-       { .irq = 40, },
-};
-
-static struct omap_hwmod_addr_space omap2420_timer4_addrs[] = {
-       {
-               .pa_start       = 0x4807a000,
-               .pa_end         = 0x4807a000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer4 */
 static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_timer4_hwmod,
        .clk            = "gpt4_ick",
-       .addr           = omap2420_timer4_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_timer4_addrs),
+       .addr           = omap2xxx_timer4_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -540,8 +414,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = {
 /* timer4 hwmod */
 static struct omap_hwmod omap2420_timer4_hwmod = {
        .name           = "timer4",
-       .mpu_irqs       = omap2420_timer4_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_timer4_mpu_irqs),
+       .mpu_irqs       = omap2_timer4_mpu_irqs,
        .main_clk       = "gpt4_fck",
        .prcm           = {
                .omap2 = {
@@ -554,31 +427,19 @@ static struct omap_hwmod omap2420_timer4_hwmod = {
        },
        .slaves         = omap2420_timer4_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_timer4_slaves),
-       .class          = &omap2420_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
 };
 
 /* timer5 */
 static struct omap_hwmod omap2420_timer5_hwmod;
-static struct omap_hwmod_irq_info omap2420_timer5_mpu_irqs[] = {
-       { .irq = 41, },
-};
-
-static struct omap_hwmod_addr_space omap2420_timer5_addrs[] = {
-       {
-               .pa_start       = 0x4807c000,
-               .pa_end         = 0x4807c000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer5 */
 static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_timer5_hwmod,
        .clk            = "gpt5_ick",
-       .addr           = omap2420_timer5_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_timer5_addrs),
+       .addr           = omap2xxx_timer5_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -590,8 +451,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = {
 /* timer5 hwmod */
 static struct omap_hwmod omap2420_timer5_hwmod = {
        .name           = "timer5",
-       .mpu_irqs       = omap2420_timer5_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_timer5_mpu_irqs),
+       .mpu_irqs       = omap2_timer5_mpu_irqs,
        .main_clk       = "gpt5_fck",
        .prcm           = {
                .omap2 = {
@@ -604,32 +464,20 @@ static struct omap_hwmod omap2420_timer5_hwmod = {
        },
        .slaves         = omap2420_timer5_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_timer5_slaves),
-       .class          = &omap2420_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
 };
 
 
 /* timer6 */
 static struct omap_hwmod omap2420_timer6_hwmod;
-static struct omap_hwmod_irq_info omap2420_timer6_mpu_irqs[] = {
-       { .irq = 42, },
-};
-
-static struct omap_hwmod_addr_space omap2420_timer6_addrs[] = {
-       {
-               .pa_start       = 0x4807e000,
-               .pa_end         = 0x4807e000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer6 */
 static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_timer6_hwmod,
        .clk            = "gpt6_ick",
-       .addr           = omap2420_timer6_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_timer6_addrs),
+       .addr           = omap2xxx_timer6_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -641,8 +489,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer6_slaves[] = {
 /* timer6 hwmod */
 static struct omap_hwmod omap2420_timer6_hwmod = {
        .name           = "timer6",
-       .mpu_irqs       = omap2420_timer6_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_timer6_mpu_irqs),
+       .mpu_irqs       = omap2_timer6_mpu_irqs,
        .main_clk       = "gpt6_fck",
        .prcm           = {
                .omap2 = {
@@ -655,31 +502,19 @@ static struct omap_hwmod omap2420_timer6_hwmod = {
        },
        .slaves         = omap2420_timer6_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_timer6_slaves),
-       .class          = &omap2420_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
 };
 
 /* timer7 */
 static struct omap_hwmod omap2420_timer7_hwmod;
-static struct omap_hwmod_irq_info omap2420_timer7_mpu_irqs[] = {
-       { .irq = 43, },
-};
-
-static struct omap_hwmod_addr_space omap2420_timer7_addrs[] = {
-       {
-               .pa_start       = 0x48080000,
-               .pa_end         = 0x48080000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer7 */
 static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_timer7_hwmod,
        .clk            = "gpt7_ick",
-       .addr           = omap2420_timer7_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_timer7_addrs),
+       .addr           = omap2xxx_timer7_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -691,8 +526,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer7_slaves[] = {
 /* timer7 hwmod */
 static struct omap_hwmod omap2420_timer7_hwmod = {
        .name           = "timer7",
-       .mpu_irqs       = omap2420_timer7_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_timer7_mpu_irqs),
+       .mpu_irqs       = omap2_timer7_mpu_irqs,
        .main_clk       = "gpt7_fck",
        .prcm           = {
                .omap2 = {
@@ -705,31 +539,19 @@ static struct omap_hwmod omap2420_timer7_hwmod = {
        },
        .slaves         = omap2420_timer7_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_timer7_slaves),
-       .class          = &omap2420_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
 };
 
 /* timer8 */
 static struct omap_hwmod omap2420_timer8_hwmod;
-static struct omap_hwmod_irq_info omap2420_timer8_mpu_irqs[] = {
-       { .irq = 44, },
-};
-
-static struct omap_hwmod_addr_space omap2420_timer8_addrs[] = {
-       {
-               .pa_start       = 0x48082000,
-               .pa_end         = 0x48082000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer8 */
 static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_timer8_hwmod,
        .clk            = "gpt8_ick",
-       .addr           = omap2420_timer8_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_timer8_addrs),
+       .addr           = omap2xxx_timer8_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -741,8 +563,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer8_slaves[] = {
 /* timer8 hwmod */
 static struct omap_hwmod omap2420_timer8_hwmod = {
        .name           = "timer8",
-       .mpu_irqs       = omap2420_timer8_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_timer8_mpu_irqs),
+       .mpu_irqs       = omap2_timer8_mpu_irqs,
        .main_clk       = "gpt8_fck",
        .prcm           = {
                .omap2 = {
@@ -755,31 +576,19 @@ static struct omap_hwmod omap2420_timer8_hwmod = {
        },
        .slaves         = omap2420_timer8_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_timer8_slaves),
-       .class          = &omap2420_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
 };
 
 /* timer9 */
 static struct omap_hwmod omap2420_timer9_hwmod;
-static struct omap_hwmod_irq_info omap2420_timer9_mpu_irqs[] = {
-       { .irq = 45, },
-};
-
-static struct omap_hwmod_addr_space omap2420_timer9_addrs[] = {
-       {
-               .pa_start       = 0x48084000,
-               .pa_end         = 0x48084000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer9 */
 static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_timer9_hwmod,
        .clk            = "gpt9_ick",
-       .addr           = omap2420_timer9_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_timer9_addrs),
+       .addr           = omap2xxx_timer9_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -791,8 +600,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer9_slaves[] = {
 /* timer9 hwmod */
 static struct omap_hwmod omap2420_timer9_hwmod = {
        .name           = "timer9",
-       .mpu_irqs       = omap2420_timer9_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_timer9_mpu_irqs),
+       .mpu_irqs       = omap2_timer9_mpu_irqs,
        .main_clk       = "gpt9_fck",
        .prcm           = {
                .omap2 = {
@@ -805,31 +613,19 @@ static struct omap_hwmod omap2420_timer9_hwmod = {
        },
        .slaves         = omap2420_timer9_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_timer9_slaves),
-       .class          = &omap2420_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
 };
 
 /* timer10 */
 static struct omap_hwmod omap2420_timer10_hwmod;
-static struct omap_hwmod_irq_info omap2420_timer10_mpu_irqs[] = {
-       { .irq = 46, },
-};
-
-static struct omap_hwmod_addr_space omap2420_timer10_addrs[] = {
-       {
-               .pa_start       = 0x48086000,
-               .pa_end         = 0x48086000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer10 */
 static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_timer10_hwmod,
        .clk            = "gpt10_ick",
-       .addr           = omap2420_timer10_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_timer10_addrs),
+       .addr           = omap2_timer10_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -841,8 +637,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer10_slaves[] = {
 /* timer10 hwmod */
 static struct omap_hwmod omap2420_timer10_hwmod = {
        .name           = "timer10",
-       .mpu_irqs       = omap2420_timer10_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_timer10_mpu_irqs),
+       .mpu_irqs       = omap2_timer10_mpu_irqs,
        .main_clk       = "gpt10_fck",
        .prcm           = {
                .omap2 = {
@@ -855,31 +650,19 @@ static struct omap_hwmod omap2420_timer10_hwmod = {
        },
        .slaves         = omap2420_timer10_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_timer10_slaves),
-       .class          = &omap2420_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
 };
 
 /* timer11 */
 static struct omap_hwmod omap2420_timer11_hwmod;
-static struct omap_hwmod_irq_info omap2420_timer11_mpu_irqs[] = {
-       { .irq = 47, },
-};
-
-static struct omap_hwmod_addr_space omap2420_timer11_addrs[] = {
-       {
-               .pa_start       = 0x48088000,
-               .pa_end         = 0x48088000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer11 */
 static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_timer11_hwmod,
        .clk            = "gpt11_ick",
-       .addr           = omap2420_timer11_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_timer11_addrs),
+       .addr           = omap2_timer11_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -891,8 +674,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer11_slaves[] = {
 /* timer11 hwmod */
 static struct omap_hwmod omap2420_timer11_hwmod = {
        .name           = "timer11",
-       .mpu_irqs       = omap2420_timer11_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_timer11_mpu_irqs),
+       .mpu_irqs       = omap2_timer11_mpu_irqs,
        .main_clk       = "gpt11_fck",
        .prcm           = {
                .omap2 = {
@@ -905,31 +687,19 @@ static struct omap_hwmod omap2420_timer11_hwmod = {
        },
        .slaves         = omap2420_timer11_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_timer11_slaves),
-       .class          = &omap2420_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
 };
 
 /* timer12 */
 static struct omap_hwmod omap2420_timer12_hwmod;
-static struct omap_hwmod_irq_info omap2420_timer12_mpu_irqs[] = {
-       { .irq = 48, },
-};
-
-static struct omap_hwmod_addr_space omap2420_timer12_addrs[] = {
-       {
-               .pa_start       = 0x4808a000,
-               .pa_end         = 0x4808a000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer12 */
 static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_timer12_hwmod,
        .clk            = "gpt12_ick",
-       .addr           = omap2420_timer12_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_timer12_addrs),
+       .addr           = omap2xxx_timer12_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -941,8 +711,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer12_slaves[] = {
 /* timer12 hwmod */
 static struct omap_hwmod omap2420_timer12_hwmod = {
        .name           = "timer12",
-       .mpu_irqs       = omap2420_timer12_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_timer12_mpu_irqs),
+       .mpu_irqs       = omap2xxx_timer12_mpu_irqs,
        .main_clk       = "gpt12_fck",
        .prcm           = {
                .omap2 = {
@@ -955,7 +724,7 @@ static struct omap_hwmod omap2420_timer12_hwmod = {
        },
        .slaves         = omap2420_timer12_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_timer12_slaves),
-       .class          = &omap2420_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
 };
 
@@ -966,6 +735,7 @@ static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
                .pa_end         = 0x4802207f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
@@ -973,31 +743,9 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
        .slave          = &omap2420_wd_timer2_hwmod,
        .clk            = "mpu_wdt_ick",
        .addr           = omap2420_wd_timer2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_wd_timer2_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/*
- * 'wd_timer' class
- * 32-bit watchdog upward counter that generates a pulse on the reset pin on
- * overflow condition
- */
-
-static struct omap_hwmod_class_sysconfig omap2420_wd_timer_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
-                          SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap2420_wd_timer_hwmod_class = {
-       .name           = "wd_timer",
-       .sysc           = &omap2420_wd_timer_sysc,
-       .pre_shutdown   = &omap2_wd_timer_disable
-};
-
 /* wd_timer2 */
 static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
        &omap2420_l4_wkup__wd_timer2,
@@ -1005,7 +753,7 @@ static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
 
 static struct omap_hwmod omap2420_wd_timer2_hwmod = {
        .name           = "wd_timer2",
-       .class          = &omap2420_wd_timer_hwmod_class,
+       .class          = &omap2xxx_wd_timer_hwmod_class,
        .main_clk       = "mpu_wdt_fck",
        .prcm           = {
                .omap2 = {
@@ -1021,45 +769,16 @@ static struct omap_hwmod omap2420_wd_timer2_hwmod = {
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
 };
 
-/* UART */
-
-static struct omap_hwmod_class_sysconfig uart_sysc = {
-       .rev_offs       = 0x50,
-       .sysc_offs      = 0x54,
-       .syss_offs      = 0x58,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE |
-                          SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
-                          SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class uart_class = {
-       .name = "uart",
-       .sysc = &uart_sysc,
-};
-
 /* UART1 */
 
-static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
-       { .irq = INT_24XX_UART1_IRQ, },
-};
-
-static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
-       { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
-       { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
-};
-
 static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = {
        &omap2_l4_core__uart1,
 };
 
 static struct omap_hwmod omap2420_uart1_hwmod = {
        .name           = "uart1",
-       .mpu_irqs       = uart1_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(uart1_mpu_irqs),
-       .sdma_reqs      = uart1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(uart1_sdma_reqs),
+       .mpu_irqs       = omap2_uart1_mpu_irqs,
+       .sdma_reqs      = omap2_uart1_sdma_reqs,
        .main_clk       = "uart1_fck",
        .prcm           = {
                .omap2 = {
@@ -1072,31 +791,20 @@ static struct omap_hwmod omap2420_uart1_hwmod = {
        },
        .slaves         = omap2420_uart1_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_uart1_slaves),
-       .class          = &uart_class,
+       .class          = &omap2_uart_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
 };
 
 /* UART2 */
 
-static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
-       { .irq = INT_24XX_UART2_IRQ, },
-};
-
-static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
-       { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
-       { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
-};
-
 static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = {
        &omap2_l4_core__uart2,
 };
 
 static struct omap_hwmod omap2420_uart2_hwmod = {
        .name           = "uart2",
-       .mpu_irqs       = uart2_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(uart2_mpu_irqs),
-       .sdma_reqs      = uart2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(uart2_sdma_reqs),
+       .mpu_irqs       = omap2_uart2_mpu_irqs,
+       .sdma_reqs      = omap2_uart2_sdma_reqs,
        .main_clk       = "uart2_fck",
        .prcm           = {
                .omap2 = {
@@ -1109,31 +817,20 @@ static struct omap_hwmod omap2420_uart2_hwmod = {
        },
        .slaves         = omap2420_uart2_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_uart2_slaves),
-       .class          = &uart_class,
+       .class          = &omap2_uart_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
 };
 
 /* UART3 */
 
-static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
-       { .irq = INT_24XX_UART3_IRQ, },
-};
-
-static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
-       { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
-       { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
-};
-
 static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = {
        &omap2_l4_core__uart3,
 };
 
 static struct omap_hwmod omap2420_uart3_hwmod = {
        .name           = "uart3",
-       .mpu_irqs       = uart3_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(uart3_mpu_irqs),
-       .sdma_reqs      = uart3_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(uart3_sdma_reqs),
+       .mpu_irqs       = omap2_uart3_mpu_irqs,
+       .sdma_reqs      = omap2_uart3_sdma_reqs,
        .main_clk       = "uart3_fck",
        .prcm           = {
                .omap2 = {
@@ -1146,53 +843,22 @@ static struct omap_hwmod omap2420_uart3_hwmod = {
        },
        .slaves         = omap2420_uart3_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_uart3_slaves),
-       .class          = &uart_class,
+       .class          = &omap2_uart_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
 };
 
-/*
- * 'dss' class
- * display sub-system
- */
-
-static struct omap_hwmod_class_sysconfig omap2420_dss_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap2420_dss_hwmod_class = {
-       .name = "dss",
-       .sysc = &omap2420_dss_sysc,
-};
-
-static struct omap_hwmod_dma_info omap2420_dss_sdma_chs[] = {
-       { .name = "dispc", .dma_req = 5 },
-};
-
 /* dss */
 /* dss master ports */
 static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = {
        &omap2420_dss__l3,
 };
 
-static struct omap_hwmod_addr_space omap2420_dss_addrs[] = {
-       {
-               .pa_start       = 0x48050000,
-               .pa_end         = 0x480503FF,
-               .flags          = ADDR_TYPE_RT
-       },
-};
-
 /* l4_core -> dss */
 static struct omap_hwmod_ocp_if omap2420_l4_core__dss = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_dss_core_hwmod,
        .clk            = "dss_ick",
-       .addr           = omap2420_dss_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_dss_addrs),
+       .addr           = omap2_dss_addrs,
        .fw = {
                .omap2 = {
                        .l4_fw_region  = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
@@ -1214,10 +880,9 @@ static struct omap_hwmod_opt_clk dss_opt_clks[] = {
 
 static struct omap_hwmod omap2420_dss_core_hwmod = {
        .name           = "dss_core",
-       .class          = &omap2420_dss_hwmod_class,
+       .class          = &omap2_dss_hwmod_class,
        .main_clk       = "dss1_fck", /* instead of dss_fck */
-       .sdma_reqs      = omap2420_dss_sdma_chs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap2420_dss_sdma_chs),
+       .sdma_reqs      = omap2xxx_dss_sdma_chs,
        .prcm           = {
                .omap2 = {
                        .prcm_reg_id = 1,
@@ -1237,46 +902,12 @@ static struct omap_hwmod omap2420_dss_core_hwmod = {
        .flags          = HWMOD_NO_IDLEST,
 };
 
-/*
- * 'dispc' class
- * display controller
- */
-
-static struct omap_hwmod_class_sysconfig omap2420_dispc_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
-                          SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap2420_dispc_hwmod_class = {
-       .name = "dispc",
-       .sysc = &omap2420_dispc_sysc,
-};
-
-static struct omap_hwmod_irq_info omap2420_dispc_irqs[] = {
-       { .irq = 25 },
-};
-
-static struct omap_hwmod_addr_space omap2420_dss_dispc_addrs[] = {
-       {
-               .pa_start       = 0x48050400,
-               .pa_end         = 0x480507FF,
-               .flags          = ADDR_TYPE_RT
-       },
-};
-
 /* l4_core -> dss_dispc */
 static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_dss_dispc_hwmod,
        .clk            = "dss_ick",
-       .addr           = omap2420_dss_dispc_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_dss_dispc_addrs),
+       .addr           = omap2_dss_dispc_addrs,
        .fw = {
                .omap2 = {
                        .l4_fw_region  = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION,
@@ -1293,9 +924,8 @@ static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = {
 
 static struct omap_hwmod omap2420_dss_dispc_hwmod = {
        .name           = "dss_dispc",
-       .class          = &omap2420_dispc_hwmod_class,
-       .mpu_irqs       = omap2420_dispc_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_dispc_irqs),
+       .class          = &omap2_dispc_hwmod_class,
+       .mpu_irqs       = omap2_dispc_irqs,
        .main_clk       = "dss1_fck",
        .prcm           = {
                .omap2 = {
@@ -1312,41 +942,12 @@ static struct omap_hwmod omap2420_dss_dispc_hwmod = {
        .flags          = HWMOD_NO_IDLEST,
 };
 
-/*
- * 'rfbi' class
- * remote frame buffer interface
- */
-
-static struct omap_hwmod_class_sysconfig omap2420_rfbi_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-                          SYSC_HAS_AUTOIDLE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap2420_rfbi_hwmod_class = {
-       .name = "rfbi",
-       .sysc = &omap2420_rfbi_sysc,
-};
-
-static struct omap_hwmod_addr_space omap2420_dss_rfbi_addrs[] = {
-       {
-               .pa_start       = 0x48050800,
-               .pa_end         = 0x48050BFF,
-               .flags          = ADDR_TYPE_RT
-       },
-};
-
 /* l4_core -> dss_rfbi */
 static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_dss_rfbi_hwmod,
        .clk            = "dss_ick",
-       .addr           = omap2420_dss_rfbi_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_dss_rfbi_addrs),
+       .addr           = omap2_dss_rfbi_addrs,
        .fw = {
                .omap2 = {
                        .l4_fw_region  = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
@@ -1363,7 +964,7 @@ static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = {
 
 static struct omap_hwmod omap2420_dss_rfbi_hwmod = {
        .name           = "dss_rfbi",
-       .class          = &omap2420_rfbi_hwmod_class,
+       .class          = &omap2_rfbi_hwmod_class,
        .main_clk       = "dss1_fck",
        .prcm           = {
                .omap2 = {
@@ -1378,31 +979,12 @@ static struct omap_hwmod omap2420_dss_rfbi_hwmod = {
        .flags          = HWMOD_NO_IDLEST,
 };
 
-/*
- * 'venc' class
- * video encoder
- */
-
-static struct omap_hwmod_class omap2420_venc_hwmod_class = {
-       .name = "venc",
-};
-
-/* dss_venc */
-static struct omap_hwmod_addr_space omap2420_dss_venc_addrs[] = {
-       {
-               .pa_start       = 0x48050C00,
-               .pa_end         = 0x48050FFF,
-               .flags          = ADDR_TYPE_RT
-       },
-};
-
 /* l4_core -> dss_venc */
 static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_dss_venc_hwmod,
        .clk            = "dss_54m_fck",
-       .addr           = omap2420_dss_venc_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_dss_venc_addrs),
+       .addr           = omap2_dss_venc_addrs,
        .fw = {
                .omap2 = {
                        .l4_fw_region  = OMAP2420_L4_CORE_FW_DSS_VENC_REGION,
@@ -1420,7 +1002,7 @@ static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = {
 
 static struct omap_hwmod omap2420_dss_venc_hwmod = {
        .name           = "dss_venc",
-       .class          = &omap2420_venc_hwmod_class,
+       .class          = &omap2_venc_hwmod_class,
        .main_clk       = "dss1_fck",
        .prcm           = {
                .omap2 = {
@@ -1453,25 +1035,14 @@ static struct omap_i2c_dev_attr i2c_dev_attr;
 
 /* I2C1 */
 
-static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
-       { .irq = INT_24XX_I2C1_IRQ, },
-};
-
-static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
-       { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
-       { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
-};
-
 static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = {
        &omap2420_l4_core__i2c1,
 };
 
 static struct omap_hwmod omap2420_i2c1_hwmod = {
        .name           = "i2c1",
-       .mpu_irqs       = i2c1_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(i2c1_mpu_irqs),
-       .sdma_reqs      = i2c1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(i2c1_sdma_reqs),
+       .mpu_irqs       = omap2_i2c1_mpu_irqs,
+       .sdma_reqs      = omap2_i2c1_sdma_reqs,
        .main_clk       = "i2c1_fck",
        .prcm           = {
                .omap2 = {
@@ -1492,25 +1063,14 @@ static struct omap_hwmod omap2420_i2c1_hwmod = {
 
 /* I2C2 */
 
-static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
-       { .irq = INT_24XX_I2C2_IRQ, },
-};
-
-static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
-       { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
-       { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
-};
-
 static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = {
        &omap2420_l4_core__i2c2,
 };
 
 static struct omap_hwmod omap2420_i2c2_hwmod = {
        .name           = "i2c2",
-       .mpu_irqs       = i2c2_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(i2c2_mpu_irqs),
-       .sdma_reqs      = i2c2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(i2c2_sdma_reqs),
+       .mpu_irqs       = omap2_i2c2_mpu_irqs,
+       .sdma_reqs      = omap2_i2c2_sdma_reqs,
        .main_clk       = "i2c2_fck",
        .prcm           = {
                .omap2 = {
@@ -1536,6 +1096,7 @@ static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = {
                .pa_end         = 0x480181ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
@@ -1543,7 +1104,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
        .slave          = &omap2420_gpio1_hwmod,
        .clk            = "gpios_ick",
        .addr           = omap2420_gpio1_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2420_gpio1_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1554,6 +1114,7 @@ static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = {
                .pa_end         = 0x4801a1ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
@@ -1561,7 +1122,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
        .slave          = &omap2420_gpio2_hwmod,
        .clk            = "gpios_ick",
        .addr           = omap2420_gpio2_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2420_gpio2_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1572,6 +1132,7 @@ static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = {
                .pa_end         = 0x4801c1ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
@@ -1579,7 +1140,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
        .slave          = &omap2420_gpio3_hwmod,
        .clk            = "gpios_ick",
        .addr           = omap2420_gpio3_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2420_gpio3_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1590,6 +1150,7 @@ static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = {
                .pa_end         = 0x4801e1ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
@@ -1597,7 +1158,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
        .slave          = &omap2420_gpio4_hwmod,
        .clk            = "gpios_ick",
        .addr           = omap2420_gpio4_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2420_gpio4_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1607,32 +1167,7 @@ static struct omap_gpio_dev_attr gpio_dev_attr = {
        .dbck_flag = false,
 };
 
-static struct omap_hwmod_class_sysconfig omap242x_gpio_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
-                          SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
-                          SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-/*
- * 'gpio' class
- * general purpose io module
- */
-static struct omap_hwmod_class omap242x_gpio_hwmod_class = {
-       .name = "gpio",
-       .sysc = &omap242x_gpio_sysc,
-       .rev = 0,
-};
-
 /* gpio1 */
-static struct omap_hwmod_irq_info omap242x_gpio1_irqs[] = {
-       { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
-};
-
 static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = {
        &omap2420_l4_wkup__gpio1,
 };
@@ -1640,8 +1175,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = {
 static struct omap_hwmod omap2420_gpio1_hwmod = {
        .name           = "gpio1",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
-       .mpu_irqs       = omap242x_gpio1_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap242x_gpio1_irqs),
+       .mpu_irqs       = omap2_gpio1_irqs,
        .main_clk       = "gpios_fck",
        .prcm           = {
                .omap2 = {
@@ -1654,16 +1188,12 @@ static struct omap_hwmod omap2420_gpio1_hwmod = {
        },
        .slaves         = omap2420_gpio1_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_gpio1_slaves),
-       .class          = &omap242x_gpio_hwmod_class,
+       .class          = &omap2xxx_gpio_hwmod_class,
        .dev_attr       = &gpio_dev_attr,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
 };
 
 /* gpio2 */
-static struct omap_hwmod_irq_info omap242x_gpio2_irqs[] = {
-       { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
-};
-
 static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = {
        &omap2420_l4_wkup__gpio2,
 };
@@ -1671,8 +1201,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = {
 static struct omap_hwmod omap2420_gpio2_hwmod = {
        .name           = "gpio2",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
-       .mpu_irqs       = omap242x_gpio2_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap242x_gpio2_irqs),
+       .mpu_irqs       = omap2_gpio2_irqs,
        .main_clk       = "gpios_fck",
        .prcm           = {
                .omap2 = {
@@ -1685,16 +1214,12 @@ static struct omap_hwmod omap2420_gpio2_hwmod = {
        },
        .slaves         = omap2420_gpio2_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_gpio2_slaves),
-       .class          = &omap242x_gpio_hwmod_class,
+       .class          = &omap2xxx_gpio_hwmod_class,
        .dev_attr       = &gpio_dev_attr,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
 };
 
 /* gpio3 */
-static struct omap_hwmod_irq_info omap242x_gpio3_irqs[] = {
-       { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
-};
-
 static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = {
        &omap2420_l4_wkup__gpio3,
 };
@@ -1702,8 +1227,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = {
 static struct omap_hwmod omap2420_gpio3_hwmod = {
        .name           = "gpio3",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
-       .mpu_irqs       = omap242x_gpio3_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap242x_gpio3_irqs),
+       .mpu_irqs       = omap2_gpio3_irqs,
        .main_clk       = "gpios_fck",
        .prcm           = {
                .omap2 = {
@@ -1716,16 +1240,12 @@ static struct omap_hwmod omap2420_gpio3_hwmod = {
        },
        .slaves         = omap2420_gpio3_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_gpio3_slaves),
-       .class          = &omap242x_gpio_hwmod_class,
+       .class          = &omap2xxx_gpio_hwmod_class,
        .dev_attr       = &gpio_dev_attr,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
 };
 
 /* gpio4 */
-static struct omap_hwmod_irq_info omap242x_gpio4_irqs[] = {
-       { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
-};
-
 static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = {
        &omap2420_l4_wkup__gpio4,
 };
@@ -1733,8 +1253,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = {
 static struct omap_hwmod omap2420_gpio4_hwmod = {
        .name           = "gpio4",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
-       .mpu_irqs       = omap242x_gpio4_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap242x_gpio4_irqs),
+       .mpu_irqs       = omap2_gpio4_irqs,
        .main_clk       = "gpios_fck",
        .prcm           = {
                .omap2 = {
@@ -1747,28 +1266,11 @@ static struct omap_hwmod omap2420_gpio4_hwmod = {
        },
        .slaves         = omap2420_gpio4_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_gpio4_slaves),
-       .class          = &omap242x_gpio_hwmod_class,
+       .class          = &omap2xxx_gpio_hwmod_class,
        .dev_attr       = &gpio_dev_attr,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
 };
 
-/* system dma */
-static struct omap_hwmod_class_sysconfig omap2420_dma_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x002c,
-       .syss_offs      = 0x0028,
-       .sysc_flags     = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
-                          SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
-                          SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap2420_dma_hwmod_class = {
-       .name = "dma",
-       .sysc = &omap2420_dma_sysc,
-};
-
 /* dma attributes */
 static struct omap_dma_dev_attr dma_dev_attr = {
        .dev_caps  = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
@@ -1776,21 +1278,6 @@ static struct omap_dma_dev_attr dma_dev_attr = {
        .lch_count = 32,
 };
 
-static struct omap_hwmod_irq_info omap2420_dma_system_irqs[] = {
-       { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
-       { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
-       { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
-       { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
-};
-
-static struct omap_hwmod_addr_space omap2420_dma_system_addrs[] = {
-       {
-               .pa_start       = 0x48056000,
-               .pa_end         = 0x48056fff,
-               .flags          = ADDR_TYPE_RT
-       },
-};
-
 /* dma_system -> L3 */
 static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {
        .master         = &omap2420_dma_system_hwmod,
@@ -1809,8 +1296,7 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_dma_system_hwmod,
        .clk            = "sdma_ick",
-       .addr           = omap2420_dma_system_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_dma_system_addrs),
+       .addr           = omap2_dma_system_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1821,9 +1307,8 @@ static struct omap_hwmod_ocp_if *omap2420_dma_system_slaves[] = {
 
 static struct omap_hwmod omap2420_dma_system_hwmod = {
        .name           = "dma",
-       .class          = &omap2420_dma_hwmod_class,
-       .mpu_irqs       = omap2420_dma_system_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_dma_system_irqs),
+       .class          = &omap2xxx_dma_hwmod_class,
+       .mpu_irqs       = omap2_dma_system_irqs,
        .main_clk       = "core_l3_ck",
        .slaves         = omap2420_dma_system_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_dma_system_slaves),
@@ -1834,48 +1319,19 @@ static struct omap_hwmod omap2420_dma_system_hwmod = {
        .flags          = HWMOD_NO_IDLEST,
 };
 
-/*
- * 'mailbox' class
- * mailbox module allowing communication between the on-chip processors
- * using a queued mailbox-interrupt mechanism.
- */
-
-static struct omap_hwmod_class_sysconfig omap2420_mailbox_sysc = {
-       .rev_offs       = 0x000,
-       .sysc_offs      = 0x010,
-       .syss_offs      = 0x014,
-       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
-                          SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap2420_mailbox_hwmod_class = {
-       .name = "mailbox",
-       .sysc = &omap2420_mailbox_sysc,
-};
-
 /* mailbox */
 static struct omap_hwmod omap2420_mailbox_hwmod;
 static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
        { .name = "dsp", .irq = 26 },
        { .name = "iva", .irq = 34 },
-};
-
-static struct omap_hwmod_addr_space omap2420_mailbox_addrs[] = {
-       {
-               .pa_start       = 0x48094000,
-               .pa_end         = 0x480941ff,
-               .flags          = ADDR_TYPE_RT,
-       },
+       { .irq = -1 }
 };
 
 /* l4_core -> mailbox */
 static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_mailbox_hwmod,
-       .addr           = omap2420_mailbox_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_mailbox_addrs),
+       .addr           = omap2_mailbox_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1886,9 +1342,8 @@ static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = {
 
 static struct omap_hwmod omap2420_mailbox_hwmod = {
        .name           = "mailbox",
-       .class          = &omap2420_mailbox_hwmod_class,
+       .class          = &omap2xxx_mailbox_hwmod_class,
        .mpu_irqs       = omap2420_mailbox_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_mailbox_irqs),
        .main_clk       = "mailboxes_ick",
        .prcm           = {
                .omap2 = {
@@ -1904,45 +1359,7 @@ static struct omap_hwmod omap2420_mailbox_hwmod = {
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
 };
 
-/*
- * 'mcspi' class
- * multichannel serial port interface (mcspi) / master/slave synchronous serial
- * bus
- */
-
-static struct omap_hwmod_class_sysconfig omap2420_mcspi_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
-                               SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
-                               SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap2420_mcspi_class = {
-       .name = "mcspi",
-       .sysc = &omap2420_mcspi_sysc,
-       .rev = OMAP2_MCSPI_REV,
-};
-
 /* mcspi1 */
-static struct omap_hwmod_irq_info omap2420_mcspi1_mpu_irqs[] = {
-       { .irq = 65 },
-};
-
-static struct omap_hwmod_dma_info omap2420_mcspi1_sdma_reqs[] = {
-       { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
-       { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
-       { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
-       { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
-       { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
-       { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
-       { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
-       { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
-};
-
 static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = {
        &omap2420_l4_core__mcspi1,
 };
@@ -1953,10 +1370,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
 
 static struct omap_hwmod omap2420_mcspi1_hwmod = {
        .name           = "mcspi1_hwmod",
-       .mpu_irqs       = omap2420_mcspi1_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_mcspi1_mpu_irqs),
-       .sdma_reqs      = omap2420_mcspi1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap2420_mcspi1_sdma_reqs),
+       .mpu_irqs       = omap2_mcspi1_mpu_irqs,
+       .sdma_reqs      = omap2_mcspi1_sdma_reqs,
        .main_clk       = "mcspi1_fck",
        .prcm           = {
                .omap2 = {
@@ -1969,23 +1384,12 @@ static struct omap_hwmod omap2420_mcspi1_hwmod = {
        },
        .slaves         = omap2420_mcspi1_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_mcspi1_slaves),
-       .class          = &omap2420_mcspi_class,
-       .dev_attr       = &omap_mcspi1_dev_attr,
+       .class          = &omap2xxx_mcspi_class,
+       .dev_attr       = &omap_mcspi1_dev_attr,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
 };
 
 /* mcspi2 */
-static struct omap_hwmod_irq_info omap2420_mcspi2_mpu_irqs[] = {
-       { .irq = 66 },
-};
-
-static struct omap_hwmod_dma_info omap2420_mcspi2_sdma_reqs[] = {
-       { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
-       { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
-       { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
-       { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
-};
-
 static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = {
        &omap2420_l4_core__mcspi2,
 };
@@ -1996,10 +1400,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
 
 static struct omap_hwmod omap2420_mcspi2_hwmod = {
        .name           = "mcspi2_hwmod",
-       .mpu_irqs       = omap2420_mcspi2_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_mcspi2_mpu_irqs),
-       .sdma_reqs      = omap2420_mcspi2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap2420_mcspi2_sdma_reqs),
+       .mpu_irqs       = omap2_mcspi2_mpu_irqs,
+       .sdma_reqs      = omap2_mcspi2_sdma_reqs,
        .main_clk       = "mcspi2_fck",
        .prcm           = {
                .omap2 = {
@@ -2012,8 +1414,8 @@ static struct omap_hwmod omap2420_mcspi2_hwmod = {
        },
        .slaves         = omap2420_mcspi2_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2420_mcspi2_slaves),
-       .class          = &omap2420_mcspi_class,
-       .dev_attr       = &omap_mcspi2_dev_attr,
+       .class          = &omap2xxx_mcspi_class,
+       .dev_attr       = &omap_mcspi2_dev_attr,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
 };
 
@@ -2030,20 +1432,7 @@ static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
 static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
        { .name = "tx", .irq = 59 },
        { .name = "rx", .irq = 60 },
-};
-
-static struct omap_hwmod_dma_info omap2420_mcbsp1_sdma_chs[] = {
-       { .name = "rx", .dma_req = 32 },
-       { .name = "tx", .dma_req = 31 },
-};
-
-static struct omap_hwmod_addr_space omap2420_mcbsp1_addrs[] = {
-       {
-               .name           = "mpu",
-               .pa_start       = 0x48074000,
-               .pa_end         = 0x480740ff,
-               .flags          = ADDR_TYPE_RT
-       },
+       { .irq = -1 }
 };
 
 /* l4_core -> mcbsp1 */
@@ -2051,8 +1440,7 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_mcbsp1_hwmod,
        .clk            = "mcbsp1_ick",
-       .addr           = omap2420_mcbsp1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_mcbsp1_addrs),
+       .addr           = omap2_mcbsp1_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2065,9 +1453,7 @@ static struct omap_hwmod omap2420_mcbsp1_hwmod = {
        .name           = "mcbsp1",
        .class          = &omap2420_mcbsp_hwmod_class,
        .mpu_irqs       = omap2420_mcbsp1_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_mcbsp1_irqs),
-       .sdma_reqs      = omap2420_mcbsp1_sdma_chs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap2420_mcbsp1_sdma_chs),
+       .sdma_reqs      = omap2_mcbsp1_sdma_reqs,
        .main_clk       = "mcbsp1_fck",
        .prcm           = {
                .omap2 = {
@@ -2087,20 +1473,7 @@ static struct omap_hwmod omap2420_mcbsp1_hwmod = {
 static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
        { .name = "tx", .irq = 62 },
        { .name = "rx", .irq = 63 },
-};
-
-static struct omap_hwmod_dma_info omap2420_mcbsp2_sdma_chs[] = {
-       { .name = "rx", .dma_req = 34 },
-       { .name = "tx", .dma_req = 33 },
-};
-
-static struct omap_hwmod_addr_space omap2420_mcbsp2_addrs[] = {
-       {
-               .name           = "mpu",
-               .pa_start       = 0x48076000,
-               .pa_end         = 0x480760ff,
-               .flags          = ADDR_TYPE_RT
-       },
+       { .irq = -1 }
 };
 
 /* l4_core -> mcbsp2 */
@@ -2108,8 +1481,7 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
        .master         = &omap2420_l4_core_hwmod,
        .slave          = &omap2420_mcbsp2_hwmod,
        .clk            = "mcbsp2_ick",
-       .addr           = omap2420_mcbsp2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2420_mcbsp2_addrs),
+       .addr           = omap2xxx_mcbsp2_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2122,9 +1494,7 @@ static struct omap_hwmod omap2420_mcbsp2_hwmod = {
        .name           = "mcbsp2",
        .class          = &omap2420_mcbsp_hwmod_class,
        .mpu_irqs       = omap2420_mcbsp2_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2420_mcbsp2_irqs),
-       .sdma_reqs      = omap2420_mcbsp2_sdma_chs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap2420_mcbsp2_sdma_chs),
+       .sdma_reqs      = omap2_mcbsp2_sdma_reqs,
        .main_clk       = "mcbsp2_fck",
        .prcm           = {
                .omap2 = {
index 9682dd519f8dd9d1dd0e84a788212c778672cf30..2a52f025bd069f37b07127e28d5a8c5ff011fd2e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
  *
- * Copyright (C) 2009-2010 Nokia Corporation
+ * Copyright (C) 2009-2011 Nokia Corporation
  * Paul Walmsley
  *
  * This program is free software; you can redistribute it and/or modify
@@ -131,42 +131,21 @@ static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
        .user           = OCP_USER_MPU,
 };
 
-/* I2C IP block address space length (in bytes) */
-#define OMAP2_I2C_AS_LEN               128
-
 /* L4 CORE -> I2C1 interface */
-static struct omap_hwmod_addr_space omap2430_i2c1_addr_space[] = {
-       {
-               .pa_start       = 0x48070000,
-               .pa_end         = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_i2c1_hwmod,
        .clk            = "i2c1_ick",
-       .addr           = omap2430_i2c1_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2430_i2c1_addr_space),
+       .addr           = omap2_i2c1_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
 /* L4 CORE -> I2C2 interface */
-static struct omap_hwmod_addr_space omap2430_i2c2_addr_space[] = {
-       {
-               .pa_start       = 0x48072000,
-               .pa_end         = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_i2c2_hwmod,
        .clk            = "i2c2_ick",
-       .addr           = omap2430_i2c2_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2430_i2c2_addr_space),
+       .addr           = omap2_i2c2_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -178,56 +157,29 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
 };
 
 /* L4 CORE -> UART1 interface */
-static struct omap_hwmod_addr_space omap2430_uart1_addr_space[] = {
-       {
-               .pa_start       = OMAP2_UART1_BASE,
-               .pa_end         = OMAP2_UART1_BASE + SZ_8K - 1,
-               .flags          = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_uart1_hwmod,
        .clk            = "uart1_ick",
-       .addr           = omap2430_uart1_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2430_uart1_addr_space),
+       .addr           = omap2xxx_uart1_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
 /* L4 CORE -> UART2 interface */
-static struct omap_hwmod_addr_space omap2430_uart2_addr_space[] = {
-       {
-               .pa_start       = OMAP2_UART2_BASE,
-               .pa_end         = OMAP2_UART2_BASE + SZ_1K - 1,
-               .flags          = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_uart2_hwmod,
        .clk            = "uart2_ick",
-       .addr           = omap2430_uart2_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2430_uart2_addr_space),
+       .addr           = omap2xxx_uart2_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
 /* L4 PER -> UART3 interface */
-static struct omap_hwmod_addr_space omap2430_uart3_addr_space[] = {
-       {
-               .pa_start       = OMAP2_UART3_BASE,
-               .pa_end         = OMAP2_UART3_BASE + SZ_1K - 1,
-               .flags          = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_uart3_hwmod,
        .clk            = "uart3_ick",
-       .addr           = omap2430_uart3_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2430_uart3_addr_space),
+       .addr           = omap2xxx_uart3_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -248,7 +200,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
        .slave          = &omap2430_usbhsotg_hwmod,
        .clk            = "usb_l4_ick",
        .addr           = omap2430_usbhsotg_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_usbhsotg_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -261,38 +212,20 @@ static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
 };
 
 /* L4 CORE -> MMC1 interface */
-static struct omap_hwmod_addr_space omap2430_mmc1_addr_space[] = {
-       {
-               .pa_start       = 0x4809c000,
-               .pa_end         = 0x4809c1ff,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_mmc1_hwmod,
        .clk            = "mmchs1_ick",
        .addr           = omap2430_mmc1_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2430_mmc1_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
 /* L4 CORE -> MMC2 interface */
-static struct omap_hwmod_addr_space omap2430_mmc2_addr_space[] = {
-       {
-               .pa_start       = 0x480b4000,
-               .pa_end         = 0x480b41ff,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_mmc2_hwmod,
-       .addr           = omap2430_mmc2_addr_space,
        .clk            = "mmchs2_ick",
-       .addr_cnt       = ARRAY_SIZE(omap2430_mmc2_addr_space),
+       .addr           = omap2430_mmc2_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -333,56 +266,29 @@ static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
 };
 
 /* l4 core -> mcspi1 interface */
-static struct omap_hwmod_addr_space omap2430_mcspi1_addr_space[] = {
-       {
-               .pa_start       = 0x48098000,
-               .pa_end         = 0x480980ff,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_mcspi1_hwmod,
        .clk            = "mcspi1_ick",
-       .addr           = omap2430_mcspi1_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2430_mcspi1_addr_space),
+       .addr           = omap2_mcspi1_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
 /* l4 core -> mcspi2 interface */
-static struct omap_hwmod_addr_space omap2430_mcspi2_addr_space[] = {
-       {
-               .pa_start       = 0x4809a000,
-               .pa_end         = 0x4809a0ff,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_mcspi2_hwmod,
        .clk            = "mcspi2_ick",
-       .addr           = omap2430_mcspi2_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2430_mcspi2_addr_space),
+       .addr           = omap2_mcspi2_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
 /* l4 core -> mcspi3 interface */
-static struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[] = {
-       {
-               .pa_start       = 0x480b8000,
-               .pa_end         = 0x480b80ff,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_mcspi3_hwmod,
        .clk            = "mcspi3_ick",
        .addr           = omap2430_mcspi3_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2430_mcspi3_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -441,29 +347,8 @@ static struct omap_hwmod omap2430_iva_hwmod = {
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
-/* Timer Common */
-static struct omap_hwmod_class_sysconfig omap2430_timer_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
-                          SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
-                          SYSC_HAS_AUTOIDLE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap2430_timer_hwmod_class = {
-       .name = "timer",
-       .sysc = &omap2430_timer_sysc,
-       .rev = OMAP_TIMER_IP_VERSION_1,
-};
-
 /* timer1 */
 static struct omap_hwmod omap2430_timer1_hwmod;
-static struct omap_hwmod_irq_info omap2430_timer1_mpu_irqs[] = {
-       { .irq = 37, },
-};
 
 static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
        {
@@ -471,6 +356,7 @@ static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
                .pa_end         = 0x49018000 + SZ_1K - 1,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_wkup -> timer1 */
@@ -479,7 +365,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
        .slave          = &omap2430_timer1_hwmod,
        .clk            = "gpt1_ick",
        .addr           = omap2430_timer1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_timer1_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -491,8 +376,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = {
 /* timer1 hwmod */
 static struct omap_hwmod omap2430_timer1_hwmod = {
        .name           = "timer1",
-       .mpu_irqs       = omap2430_timer1_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_timer1_mpu_irqs),
+       .mpu_irqs       = omap2_timer1_mpu_irqs,
        .main_clk       = "gpt1_fck",
        .prcm           = {
                .omap2 = {
@@ -505,31 +389,19 @@ static struct omap_hwmod omap2430_timer1_hwmod = {
        },
        .slaves         = omap2430_timer1_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer1_slaves),
-       .class          = &omap2430_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer2 */
 static struct omap_hwmod omap2430_timer2_hwmod;
-static struct omap_hwmod_irq_info omap2430_timer2_mpu_irqs[] = {
-       { .irq = 38, },
-};
-
-static struct omap_hwmod_addr_space omap2430_timer2_addrs[] = {
-       {
-               .pa_start       = 0x4802a000,
-               .pa_end         = 0x4802a000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer2 */
 static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_timer2_hwmod,
        .clk            = "gpt2_ick",
-       .addr           = omap2430_timer2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_timer2_addrs),
+       .addr           = omap2xxx_timer2_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -541,8 +413,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = {
 /* timer2 hwmod */
 static struct omap_hwmod omap2430_timer2_hwmod = {
        .name           = "timer2",
-       .mpu_irqs       = omap2430_timer2_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_timer2_mpu_irqs),
+       .mpu_irqs       = omap2_timer2_mpu_irqs,
        .main_clk       = "gpt2_fck",
        .prcm           = {
                .omap2 = {
@@ -555,31 +426,19 @@ static struct omap_hwmod omap2430_timer2_hwmod = {
        },
        .slaves         = omap2430_timer2_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer2_slaves),
-       .class          = &omap2430_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer3 */
 static struct omap_hwmod omap2430_timer3_hwmod;
-static struct omap_hwmod_irq_info omap2430_timer3_mpu_irqs[] = {
-       { .irq = 39, },
-};
-
-static struct omap_hwmod_addr_space omap2430_timer3_addrs[] = {
-       {
-               .pa_start       = 0x48078000,
-               .pa_end         = 0x48078000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer3 */
 static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_timer3_hwmod,
        .clk            = "gpt3_ick",
-       .addr           = omap2430_timer3_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_timer3_addrs),
+       .addr           = omap2xxx_timer3_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -591,8 +450,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = {
 /* timer3 hwmod */
 static struct omap_hwmod omap2430_timer3_hwmod = {
        .name           = "timer3",
-       .mpu_irqs       = omap2430_timer3_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_timer3_mpu_irqs),
+       .mpu_irqs       = omap2_timer3_mpu_irqs,
        .main_clk       = "gpt3_fck",
        .prcm           = {
                .omap2 = {
@@ -605,31 +463,19 @@ static struct omap_hwmod omap2430_timer3_hwmod = {
        },
        .slaves         = omap2430_timer3_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer3_slaves),
-       .class          = &omap2430_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer4 */
 static struct omap_hwmod omap2430_timer4_hwmod;
-static struct omap_hwmod_irq_info omap2430_timer4_mpu_irqs[] = {
-       { .irq = 40, },
-};
-
-static struct omap_hwmod_addr_space omap2430_timer4_addrs[] = {
-       {
-               .pa_start       = 0x4807a000,
-               .pa_end         = 0x4807a000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer4 */
 static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_timer4_hwmod,
        .clk            = "gpt4_ick",
-       .addr           = omap2430_timer4_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_timer4_addrs),
+       .addr           = omap2xxx_timer4_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -641,8 +487,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = {
 /* timer4 hwmod */
 static struct omap_hwmod omap2430_timer4_hwmod = {
        .name           = "timer4",
-       .mpu_irqs       = omap2430_timer4_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_timer4_mpu_irqs),
+       .mpu_irqs       = omap2_timer4_mpu_irqs,
        .main_clk       = "gpt4_fck",
        .prcm           = {
                .omap2 = {
@@ -655,31 +500,19 @@ static struct omap_hwmod omap2430_timer4_hwmod = {
        },
        .slaves         = omap2430_timer4_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer4_slaves),
-       .class          = &omap2430_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer5 */
 static struct omap_hwmod omap2430_timer5_hwmod;
-static struct omap_hwmod_irq_info omap2430_timer5_mpu_irqs[] = {
-       { .irq = 41, },
-};
-
-static struct omap_hwmod_addr_space omap2430_timer5_addrs[] = {
-       {
-               .pa_start       = 0x4807c000,
-               .pa_end         = 0x4807c000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer5 */
 static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_timer5_hwmod,
        .clk            = "gpt5_ick",
-       .addr           = omap2430_timer5_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_timer5_addrs),
+       .addr           = omap2xxx_timer5_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -691,8 +524,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = {
 /* timer5 hwmod */
 static struct omap_hwmod omap2430_timer5_hwmod = {
        .name           = "timer5",
-       .mpu_irqs       = omap2430_timer5_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_timer5_mpu_irqs),
+       .mpu_irqs       = omap2_timer5_mpu_irqs,
        .main_clk       = "gpt5_fck",
        .prcm           = {
                .omap2 = {
@@ -705,31 +537,19 @@ static struct omap_hwmod omap2430_timer5_hwmod = {
        },
        .slaves         = omap2430_timer5_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer5_slaves),
-       .class          = &omap2430_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer6 */
 static struct omap_hwmod omap2430_timer6_hwmod;
-static struct omap_hwmod_irq_info omap2430_timer6_mpu_irqs[] = {
-       { .irq = 42, },
-};
-
-static struct omap_hwmod_addr_space omap2430_timer6_addrs[] = {
-       {
-               .pa_start       = 0x4807e000,
-               .pa_end         = 0x4807e000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer6 */
 static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_timer6_hwmod,
        .clk            = "gpt6_ick",
-       .addr           = omap2430_timer6_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_timer6_addrs),
+       .addr           = omap2xxx_timer6_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -741,8 +561,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = {
 /* timer6 hwmod */
 static struct omap_hwmod omap2430_timer6_hwmod = {
        .name           = "timer6",
-       .mpu_irqs       = omap2430_timer6_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_timer6_mpu_irqs),
+       .mpu_irqs       = omap2_timer6_mpu_irqs,
        .main_clk       = "gpt6_fck",
        .prcm           = {
                .omap2 = {
@@ -755,31 +574,19 @@ static struct omap_hwmod omap2430_timer6_hwmod = {
        },
        .slaves         = omap2430_timer6_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer6_slaves),
-       .class          = &omap2430_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer7 */
 static struct omap_hwmod omap2430_timer7_hwmod;
-static struct omap_hwmod_irq_info omap2430_timer7_mpu_irqs[] = {
-       { .irq = 43, },
-};
-
-static struct omap_hwmod_addr_space omap2430_timer7_addrs[] = {
-       {
-               .pa_start       = 0x48080000,
-               .pa_end         = 0x48080000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer7 */
 static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_timer7_hwmod,
        .clk            = "gpt7_ick",
-       .addr           = omap2430_timer7_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_timer7_addrs),
+       .addr           = omap2xxx_timer7_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -791,8 +598,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = {
 /* timer7 hwmod */
 static struct omap_hwmod omap2430_timer7_hwmod = {
        .name           = "timer7",
-       .mpu_irqs       = omap2430_timer7_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_timer7_mpu_irqs),
+       .mpu_irqs       = omap2_timer7_mpu_irqs,
        .main_clk       = "gpt7_fck",
        .prcm           = {
                .omap2 = {
@@ -805,31 +611,19 @@ static struct omap_hwmod omap2430_timer7_hwmod = {
        },
        .slaves         = omap2430_timer7_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer7_slaves),
-       .class          = &omap2430_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer8 */
 static struct omap_hwmod omap2430_timer8_hwmod;
-static struct omap_hwmod_irq_info omap2430_timer8_mpu_irqs[] = {
-       { .irq = 44, },
-};
-
-static struct omap_hwmod_addr_space omap2430_timer8_addrs[] = {
-       {
-               .pa_start       = 0x48082000,
-               .pa_end         = 0x48082000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer8 */
 static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_timer8_hwmod,
        .clk            = "gpt8_ick",
-       .addr           = omap2430_timer8_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_timer8_addrs),
+       .addr           = omap2xxx_timer8_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -841,8 +635,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = {
 /* timer8 hwmod */
 static struct omap_hwmod omap2430_timer8_hwmod = {
        .name           = "timer8",
-       .mpu_irqs       = omap2430_timer8_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_timer8_mpu_irqs),
+       .mpu_irqs       = omap2_timer8_mpu_irqs,
        .main_clk       = "gpt8_fck",
        .prcm           = {
                .omap2 = {
@@ -855,31 +648,19 @@ static struct omap_hwmod omap2430_timer8_hwmod = {
        },
        .slaves         = omap2430_timer8_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer8_slaves),
-       .class          = &omap2430_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer9 */
 static struct omap_hwmod omap2430_timer9_hwmod;
-static struct omap_hwmod_irq_info omap2430_timer9_mpu_irqs[] = {
-       { .irq = 45, },
-};
-
-static struct omap_hwmod_addr_space omap2430_timer9_addrs[] = {
-       {
-               .pa_start       = 0x48084000,
-               .pa_end         = 0x48084000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer9 */
 static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_timer9_hwmod,
        .clk            = "gpt9_ick",
-       .addr           = omap2430_timer9_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_timer9_addrs),
+       .addr           = omap2xxx_timer9_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -891,8 +672,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = {
 /* timer9 hwmod */
 static struct omap_hwmod omap2430_timer9_hwmod = {
        .name           = "timer9",
-       .mpu_irqs       = omap2430_timer9_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_timer9_mpu_irqs),
+       .mpu_irqs       = omap2_timer9_mpu_irqs,
        .main_clk       = "gpt9_fck",
        .prcm           = {
                .omap2 = {
@@ -905,31 +685,19 @@ static struct omap_hwmod omap2430_timer9_hwmod = {
        },
        .slaves         = omap2430_timer9_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer9_slaves),
-       .class          = &omap2430_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer10 */
 static struct omap_hwmod omap2430_timer10_hwmod;
-static struct omap_hwmod_irq_info omap2430_timer10_mpu_irqs[] = {
-       { .irq = 46, },
-};
-
-static struct omap_hwmod_addr_space omap2430_timer10_addrs[] = {
-       {
-               .pa_start       = 0x48086000,
-               .pa_end         = 0x48086000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer10 */
 static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_timer10_hwmod,
        .clk            = "gpt10_ick",
-       .addr           = omap2430_timer10_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_timer10_addrs),
+       .addr           = omap2_timer10_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -941,8 +709,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = {
 /* timer10 hwmod */
 static struct omap_hwmod omap2430_timer10_hwmod = {
        .name           = "timer10",
-       .mpu_irqs       = omap2430_timer10_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_timer10_mpu_irqs),
+       .mpu_irqs       = omap2_timer10_mpu_irqs,
        .main_clk       = "gpt10_fck",
        .prcm           = {
                .omap2 = {
@@ -955,31 +722,19 @@ static struct omap_hwmod omap2430_timer10_hwmod = {
        },
        .slaves         = omap2430_timer10_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer10_slaves),
-       .class          = &omap2430_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer11 */
 static struct omap_hwmod omap2430_timer11_hwmod;
-static struct omap_hwmod_irq_info omap2430_timer11_mpu_irqs[] = {
-       { .irq = 47, },
-};
-
-static struct omap_hwmod_addr_space omap2430_timer11_addrs[] = {
-       {
-               .pa_start       = 0x48088000,
-               .pa_end         = 0x48088000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer11 */
 static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_timer11_hwmod,
        .clk            = "gpt11_ick",
-       .addr           = omap2430_timer11_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_timer11_addrs),
+       .addr           = omap2_timer11_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -991,8 +746,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = {
 /* timer11 hwmod */
 static struct omap_hwmod omap2430_timer11_hwmod = {
        .name           = "timer11",
-       .mpu_irqs       = omap2430_timer11_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_timer11_mpu_irqs),
+       .mpu_irqs       = omap2_timer11_mpu_irqs,
        .main_clk       = "gpt11_fck",
        .prcm           = {
                .omap2 = {
@@ -1005,31 +759,19 @@ static struct omap_hwmod omap2430_timer11_hwmod = {
        },
        .slaves         = omap2430_timer11_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer11_slaves),
-       .class          = &omap2430_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer12 */
 static struct omap_hwmod omap2430_timer12_hwmod;
-static struct omap_hwmod_irq_info omap2430_timer12_mpu_irqs[] = {
-       { .irq = 48, },
-};
-
-static struct omap_hwmod_addr_space omap2430_timer12_addrs[] = {
-       {
-               .pa_start       = 0x4808a000,
-               .pa_end         = 0x4808a000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer12 */
 static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_timer12_hwmod,
        .clk            = "gpt12_ick",
-       .addr           = omap2430_timer12_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_timer12_addrs),
+       .addr           = omap2xxx_timer12_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1041,8 +783,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = {
 /* timer12 hwmod */
 static struct omap_hwmod omap2430_timer12_hwmod = {
        .name           = "timer12",
-       .mpu_irqs       = omap2430_timer12_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_timer12_mpu_irqs),
+       .mpu_irqs       = omap2xxx_timer12_mpu_irqs,
        .main_clk       = "gpt12_fck",
        .prcm           = {
                .omap2 = {
@@ -1055,7 +796,7 @@ static struct omap_hwmod omap2430_timer12_hwmod = {
        },
        .slaves         = omap2430_timer12_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer12_slaves),
-       .class          = &omap2430_timer_hwmod_class,
+       .class          = &omap2xxx_timer_hwmod_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
@@ -1066,6 +807,7 @@ static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
                .pa_end         = 0x4901607f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
@@ -1073,31 +815,9 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
        .slave          = &omap2430_wd_timer2_hwmod,
        .clk            = "mpu_wdt_ick",
        .addr           = omap2430_wd_timer2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_wd_timer2_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/*
- * 'wd_timer' class
- * 32-bit watchdog upward counter that generates a pulse on the reset pin on
- * overflow condition
- */
-
-static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = {
-       .rev_offs       = 0x0,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
-                          SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap2430_wd_timer_hwmod_class = {
-       .name           = "wd_timer",
-       .sysc           = &omap2430_wd_timer_sysc,
-       .pre_shutdown   = &omap2_wd_timer_disable
-};
-
 /* wd_timer2 */
 static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
        &omap2430_l4_wkup__wd_timer2,
@@ -1105,7 +825,7 @@ static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
 
 static struct omap_hwmod omap2430_wd_timer2_hwmod = {
        .name           = "wd_timer2",
-       .class          = &omap2430_wd_timer_hwmod_class,
+       .class          = &omap2xxx_wd_timer_hwmod_class,
        .main_clk       = "mpu_wdt_fck",
        .prcm           = {
                .omap2 = {
@@ -1121,45 +841,16 @@ static struct omap_hwmod omap2430_wd_timer2_hwmod = {
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
-/* UART */
-
-static struct omap_hwmod_class_sysconfig uart_sysc = {
-       .rev_offs       = 0x50,
-       .sysc_offs      = 0x54,
-       .syss_offs      = 0x58,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE |
-                          SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
-                          SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class uart_class = {
-       .name = "uart",
-       .sysc = &uart_sysc,
-};
-
 /* UART1 */
 
-static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
-       { .irq = INT_24XX_UART1_IRQ, },
-};
-
-static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
-       { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
-       { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
-};
-
 static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
        &omap2_l4_core__uart1,
 };
 
 static struct omap_hwmod omap2430_uart1_hwmod = {
        .name           = "uart1",
-       .mpu_irqs       = uart1_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(uart1_mpu_irqs),
-       .sdma_reqs      = uart1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(uart1_sdma_reqs),
+       .mpu_irqs       = omap2_uart1_mpu_irqs,
+       .sdma_reqs      = omap2_uart1_sdma_reqs,
        .main_clk       = "uart1_fck",
        .prcm           = {
                .omap2 = {
@@ -1172,31 +863,20 @@ static struct omap_hwmod omap2430_uart1_hwmod = {
        },
        .slaves         = omap2430_uart1_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_uart1_slaves),
-       .class          = &uart_class,
+       .class          = &omap2_uart_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* UART2 */
 
-static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
-       { .irq = INT_24XX_UART2_IRQ, },
-};
-
-static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
-       { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
-       { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
-};
-
 static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
        &omap2_l4_core__uart2,
 };
 
 static struct omap_hwmod omap2430_uart2_hwmod = {
        .name           = "uart2",
-       .mpu_irqs       = uart2_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(uart2_mpu_irqs),
-       .sdma_reqs      = uart2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(uart2_sdma_reqs),
+       .mpu_irqs       = omap2_uart2_mpu_irqs,
+       .sdma_reqs      = omap2_uart2_sdma_reqs,
        .main_clk       = "uart2_fck",
        .prcm           = {
                .omap2 = {
@@ -1209,31 +889,20 @@ static struct omap_hwmod omap2430_uart2_hwmod = {
        },
        .slaves         = omap2430_uart2_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_uart2_slaves),
-       .class          = &uart_class,
+       .class          = &omap2_uart_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* UART3 */
 
-static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
-       { .irq = INT_24XX_UART3_IRQ, },
-};
-
-static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
-       { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
-       { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
-};
-
 static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
        &omap2_l4_core__uart3,
 };
 
 static struct omap_hwmod omap2430_uart3_hwmod = {
        .name           = "uart3",
-       .mpu_irqs       = uart3_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(uart3_mpu_irqs),
-       .sdma_reqs      = uart3_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(uart3_sdma_reqs),
+       .mpu_irqs       = omap2_uart3_mpu_irqs,
+       .sdma_reqs      = omap2_uart3_sdma_reqs,
        .main_clk       = "uart3_fck",
        .prcm           = {
                .omap2 = {
@@ -1246,53 +915,22 @@ static struct omap_hwmod omap2430_uart3_hwmod = {
        },
        .slaves         = omap2430_uart3_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_uart3_slaves),
-       .class          = &uart_class,
+       .class          = &omap2_uart_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
-/*
- * 'dss' class
- * display sub-system
- */
-
-static struct omap_hwmod_class_sysconfig omap2430_dss_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap2430_dss_hwmod_class = {
-       .name = "dss",
-       .sysc = &omap2430_dss_sysc,
-};
-
-static struct omap_hwmod_dma_info omap2430_dss_sdma_chs[] = {
-       { .name = "dispc", .dma_req = 5 },
-};
-
 /* dss */
 /* dss master ports */
 static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
        &omap2430_dss__l3,
 };
 
-static struct omap_hwmod_addr_space omap2430_dss_addrs[] = {
-       {
-               .pa_start       = 0x48050000,
-               .pa_end         = 0x480503FF,
-               .flags          = ADDR_TYPE_RT
-       },
-};
-
 /* l4_core -> dss */
 static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_dss_core_hwmod,
        .clk            = "dss_ick",
-       .addr           = omap2430_dss_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_dss_addrs),
+       .addr           = omap2_dss_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1308,10 +946,9 @@ static struct omap_hwmod_opt_clk dss_opt_clks[] = {
 
 static struct omap_hwmod omap2430_dss_core_hwmod = {
        .name           = "dss_core",
-       .class          = &omap2430_dss_hwmod_class,
+       .class          = &omap2_dss_hwmod_class,
        .main_clk       = "dss1_fck", /* instead of dss_fck */
-       .sdma_reqs      = omap2430_dss_sdma_chs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap2430_dss_sdma_chs),
+       .sdma_reqs      = omap2xxx_dss_sdma_chs,
        .prcm           = {
                .omap2 = {
                        .prcm_reg_id = 1,
@@ -1331,46 +968,12 @@ static struct omap_hwmod omap2430_dss_core_hwmod = {
        .flags          = HWMOD_NO_IDLEST,
 };
 
-/*
- * 'dispc' class
- * display controller
- */
-
-static struct omap_hwmod_class_sysconfig omap2430_dispc_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
-                          SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap2430_dispc_hwmod_class = {
-       .name = "dispc",
-       .sysc = &omap2430_dispc_sysc,
-};
-
-static struct omap_hwmod_irq_info omap2430_dispc_irqs[] = {
-       { .irq = 25 },
-};
-
-static struct omap_hwmod_addr_space omap2430_dss_dispc_addrs[] = {
-       {
-               .pa_start       = 0x48050400,
-               .pa_end         = 0x480507FF,
-               .flags          = ADDR_TYPE_RT
-       },
-};
-
 /* l4_core -> dss_dispc */
 static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_dss_dispc_hwmod,
        .clk            = "dss_ick",
-       .addr           = omap2430_dss_dispc_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_dss_dispc_addrs),
+       .addr           = omap2_dss_dispc_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1381,9 +984,8 @@ static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {
 
 static struct omap_hwmod omap2430_dss_dispc_hwmod = {
        .name           = "dss_dispc",
-       .class          = &omap2430_dispc_hwmod_class,
-       .mpu_irqs       = omap2430_dispc_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_dispc_irqs),
+       .class          = &omap2_dispc_hwmod_class,
+       .mpu_irqs       = omap2_dispc_irqs,
        .main_clk       = "dss1_fck",
        .prcm           = {
                .omap2 = {
@@ -1400,41 +1002,12 @@ static struct omap_hwmod omap2430_dss_dispc_hwmod = {
        .flags          = HWMOD_NO_IDLEST,
 };
 
-/*
- * 'rfbi' class
- * remote frame buffer interface
- */
-
-static struct omap_hwmod_class_sysconfig omap2430_rfbi_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-                          SYSC_HAS_AUTOIDLE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap2430_rfbi_hwmod_class = {
-       .name = "rfbi",
-       .sysc = &omap2430_rfbi_sysc,
-};
-
-static struct omap_hwmod_addr_space omap2430_dss_rfbi_addrs[] = {
-       {
-               .pa_start       = 0x48050800,
-               .pa_end         = 0x48050BFF,
-               .flags          = ADDR_TYPE_RT
-       },
-};
-
 /* l4_core -> dss_rfbi */
 static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_dss_rfbi_hwmod,
        .clk            = "dss_ick",
-       .addr           = omap2430_dss_rfbi_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_dss_rfbi_addrs),
+       .addr           = omap2_dss_rfbi_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1445,7 +1018,7 @@ static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
 
 static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
        .name           = "dss_rfbi",
-       .class          = &omap2430_rfbi_hwmod_class,
+       .class          = &omap2_rfbi_hwmod_class,
        .main_clk       = "dss1_fck",
        .prcm           = {
                .omap2 = {
@@ -1460,31 +1033,12 @@ static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
        .flags          = HWMOD_NO_IDLEST,
 };
 
-/*
- * 'venc' class
- * video encoder
- */
-
-static struct omap_hwmod_class omap2430_venc_hwmod_class = {
-       .name = "venc",
-};
-
-/* dss_venc */
-static struct omap_hwmod_addr_space omap2430_dss_venc_addrs[] = {
-       {
-               .pa_start       = 0x48050C00,
-               .pa_end         = 0x48050FFF,
-               .flags          = ADDR_TYPE_RT
-       },
-};
-
 /* l4_core -> dss_venc */
 static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_dss_venc_hwmod,
        .clk            = "dss_54m_fck",
-       .addr           = omap2430_dss_venc_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_dss_venc_addrs),
+       .addr           = omap2_dss_venc_addrs,
        .flags          = OCPIF_SWSUP_IDLE,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
@@ -1496,7 +1050,7 @@ static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
 
 static struct omap_hwmod omap2430_dss_venc_hwmod = {
        .name           = "dss_venc",
-       .class          = &omap2430_venc_hwmod_class,
+       .class          = &omap2_venc_hwmod_class,
        .main_clk       = "dss1_fck",
        .prcm           = {
                .omap2 = {
@@ -1532,25 +1086,14 @@ static struct omap_i2c_dev_attr i2c_dev_attr = {
 
 /* I2C1 */
 
-static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
-       { .irq = INT_24XX_I2C1_IRQ, },
-};
-
-static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
-       { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
-       { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
-};
-
 static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
        &omap2430_l4_core__i2c1,
 };
 
 static struct omap_hwmod omap2430_i2c1_hwmod = {
        .name           = "i2c1",
-       .mpu_irqs       = i2c1_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(i2c1_mpu_irqs),
-       .sdma_reqs      = i2c1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(i2c1_sdma_reqs),
+       .mpu_irqs       = omap2_i2c1_mpu_irqs,
+       .sdma_reqs      = omap2_i2c1_sdma_reqs,
        .main_clk       = "i2chs1_fck",
        .prcm           = {
                .omap2 = {
@@ -1578,25 +1121,14 @@ static struct omap_hwmod omap2430_i2c1_hwmod = {
 
 /* I2C2 */
 
-static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
-       { .irq = INT_24XX_I2C2_IRQ, },
-};
-
-static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
-       { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
-       { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
-};
-
 static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
        &omap2430_l4_core__i2c2,
 };
 
 static struct omap_hwmod omap2430_i2c2_hwmod = {
        .name           = "i2c2",
-       .mpu_irqs       = i2c2_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(i2c2_mpu_irqs),
-       .sdma_reqs      = i2c2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(i2c2_sdma_reqs),
+       .mpu_irqs       = omap2_i2c2_mpu_irqs,
+       .sdma_reqs      = omap2_i2c2_sdma_reqs,
        .main_clk       = "i2chs2_fck",
        .prcm           = {
                .omap2 = {
@@ -1621,6 +1153,7 @@ static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
                .pa_end         = 0x4900C1ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
@@ -1628,7 +1161,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
        .slave          = &omap2430_gpio1_hwmod,
        .clk            = "gpios_ick",
        .addr           = omap2430_gpio1_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2430_gpio1_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1639,6 +1171,7 @@ static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
                .pa_end         = 0x4900E1ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
@@ -1646,7 +1179,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
        .slave          = &omap2430_gpio2_hwmod,
        .clk            = "gpios_ick",
        .addr           = omap2430_gpio2_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2430_gpio2_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1657,6 +1189,7 @@ static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
                .pa_end         = 0x490101ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
@@ -1664,7 +1197,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
        .slave          = &omap2430_gpio3_hwmod,
        .clk            = "gpios_ick",
        .addr           = omap2430_gpio3_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2430_gpio3_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1675,6 +1207,7 @@ static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
                .pa_end         = 0x490121ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
@@ -1682,7 +1215,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
        .slave          = &omap2430_gpio4_hwmod,
        .clk            = "gpios_ick",
        .addr           = omap2430_gpio4_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2430_gpio4_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1693,6 +1225,7 @@ static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
                .pa_end         = 0x480B61ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
@@ -1700,7 +1233,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
        .slave          = &omap2430_gpio5_hwmod,
        .clk            = "gpio5_ick",
        .addr           = omap2430_gpio5_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap2430_gpio5_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1710,32 +1242,7 @@ static struct omap_gpio_dev_attr gpio_dev_attr = {
        .dbck_flag = false,
 };
 
-static struct omap_hwmod_class_sysconfig omap243x_gpio_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
-                          SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
-                          SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-/*
- * 'gpio' class
- * general purpose io module
- */
-static struct omap_hwmod_class omap243x_gpio_hwmod_class = {
-       .name = "gpio",
-       .sysc = &omap243x_gpio_sysc,
-       .rev = 0,
-};
-
 /* gpio1 */
-static struct omap_hwmod_irq_info omap243x_gpio1_irqs[] = {
-       { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
-};
-
 static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
        &omap2430_l4_wkup__gpio1,
 };
@@ -1743,8 +1250,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
 static struct omap_hwmod omap2430_gpio1_hwmod = {
        .name           = "gpio1",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
-       .mpu_irqs       = omap243x_gpio1_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap243x_gpio1_irqs),
+       .mpu_irqs       = omap2_gpio1_irqs,
        .main_clk       = "gpios_fck",
        .prcm           = {
                .omap2 = {
@@ -1757,16 +1263,12 @@ static struct omap_hwmod omap2430_gpio1_hwmod = {
        },
        .slaves         = omap2430_gpio1_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_gpio1_slaves),
-       .class          = &omap243x_gpio_hwmod_class,
+       .class          = &omap2xxx_gpio_hwmod_class,
        .dev_attr       = &gpio_dev_attr,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* gpio2 */
-static struct omap_hwmod_irq_info omap243x_gpio2_irqs[] = {
-       { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
-};
-
 static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
        &omap2430_l4_wkup__gpio2,
 };
@@ -1774,8 +1276,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
 static struct omap_hwmod omap2430_gpio2_hwmod = {
        .name           = "gpio2",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
-       .mpu_irqs       = omap243x_gpio2_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap243x_gpio2_irqs),
+       .mpu_irqs       = omap2_gpio2_irqs,
        .main_clk       = "gpios_fck",
        .prcm           = {
                .omap2 = {
@@ -1788,16 +1289,12 @@ static struct omap_hwmod omap2430_gpio2_hwmod = {
        },
        .slaves         = omap2430_gpio2_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_gpio2_slaves),
-       .class          = &omap243x_gpio_hwmod_class,
+       .class          = &omap2xxx_gpio_hwmod_class,
        .dev_attr       = &gpio_dev_attr,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* gpio3 */
-static struct omap_hwmod_irq_info omap243x_gpio3_irqs[] = {
-       { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
-};
-
 static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
        &omap2430_l4_wkup__gpio3,
 };
@@ -1805,8 +1302,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
 static struct omap_hwmod omap2430_gpio3_hwmod = {
        .name           = "gpio3",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
-       .mpu_irqs       = omap243x_gpio3_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap243x_gpio3_irqs),
+       .mpu_irqs       = omap2_gpio3_irqs,
        .main_clk       = "gpios_fck",
        .prcm           = {
                .omap2 = {
@@ -1819,16 +1315,12 @@ static struct omap_hwmod omap2430_gpio3_hwmod = {
        },
        .slaves         = omap2430_gpio3_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_gpio3_slaves),
-       .class          = &omap243x_gpio_hwmod_class,
+       .class          = &omap2xxx_gpio_hwmod_class,
        .dev_attr       = &gpio_dev_attr,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* gpio4 */
-static struct omap_hwmod_irq_info omap243x_gpio4_irqs[] = {
-       { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
-};
-
 static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
        &omap2430_l4_wkup__gpio4,
 };
@@ -1836,8 +1328,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
 static struct omap_hwmod omap2430_gpio4_hwmod = {
        .name           = "gpio4",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
-       .mpu_irqs       = omap243x_gpio4_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap243x_gpio4_irqs),
+       .mpu_irqs       = omap2_gpio4_irqs,
        .main_clk       = "gpios_fck",
        .prcm           = {
                .omap2 = {
@@ -1850,7 +1341,7 @@ static struct omap_hwmod omap2430_gpio4_hwmod = {
        },
        .slaves         = omap2430_gpio4_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_gpio4_slaves),
-       .class          = &omap243x_gpio_hwmod_class,
+       .class          = &omap2xxx_gpio_hwmod_class,
        .dev_attr       = &gpio_dev_attr,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
@@ -1858,6 +1349,7 @@ static struct omap_hwmod omap2430_gpio4_hwmod = {
 /* gpio5 */
 static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
        { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
@@ -1868,7 +1360,6 @@ static struct omap_hwmod omap2430_gpio5_hwmod = {
        .name           = "gpio5",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap243x_gpio5_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap243x_gpio5_irqs),
        .main_clk       = "gpio5_fck",
        .prcm           = {
                .omap2 = {
@@ -1881,28 +1372,11 @@ static struct omap_hwmod omap2430_gpio5_hwmod = {
        },
        .slaves         = omap2430_gpio5_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_gpio5_slaves),
-       .class          = &omap243x_gpio_hwmod_class,
+       .class          = &omap2xxx_gpio_hwmod_class,
        .dev_attr       = &gpio_dev_attr,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
-/* dma_system */
-static struct omap_hwmod_class_sysconfig omap2430_dma_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x002c,
-       .syss_offs      = 0x0028,
-       .sysc_flags     = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
-                          SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
-                          SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap2430_dma_hwmod_class = {
-       .name = "dma",
-       .sysc = &omap2430_dma_sysc,
-};
-
 /* dma attributes */
 static struct omap_dma_dev_attr dma_dev_attr = {
        .dev_caps  = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
@@ -1910,21 +1384,6 @@ static struct omap_dma_dev_attr dma_dev_attr = {
        .lch_count = 32,
 };
 
-static struct omap_hwmod_irq_info omap2430_dma_system_irqs[] = {
-       { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
-       { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
-       { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
-       { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
-};
-
-static struct omap_hwmod_addr_space omap2430_dma_system_addrs[] = {
-       {
-               .pa_start       = 0x48056000,
-               .pa_end         = 0x48056fff,
-               .flags          = ADDR_TYPE_RT
-       },
-};
-
 /* dma_system -> L3 */
 static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
        .master         = &omap2430_dma_system_hwmod,
@@ -1943,8 +1402,7 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_dma_system_hwmod,
        .clk            = "sdma_ick",
-       .addr           = omap2430_dma_system_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_dma_system_addrs),
+       .addr           = omap2_dma_system_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1955,9 +1413,8 @@ static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
 
 static struct omap_hwmod omap2430_dma_system_hwmod = {
        .name           = "dma",
-       .class          = &omap2430_dma_hwmod_class,
-       .mpu_irqs       = omap2430_dma_system_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_dma_system_irqs),
+       .class          = &omap2xxx_dma_hwmod_class,
+       .mpu_irqs       = omap2_dma_system_irqs,
        .main_clk       = "core_l3_ck",
        .slaves         = omap2430_dma_system_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_dma_system_slaves),
@@ -1968,47 +1425,18 @@ static struct omap_hwmod omap2430_dma_system_hwmod = {
        .flags          = HWMOD_NO_IDLEST,
 };
 
-/*
- * 'mailbox' class
- * mailbox module allowing communication between the on-chip processors
- * using a queued mailbox-interrupt mechanism.
- */
-
-static struct omap_hwmod_class_sysconfig omap2430_mailbox_sysc = {
-       .rev_offs       = 0x000,
-       .sysc_offs      = 0x010,
-       .syss_offs      = 0x014,
-       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
-                               SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap2430_mailbox_hwmod_class = {
-       .name = "mailbox",
-       .sysc = &omap2430_mailbox_sysc,
-};
-
 /* mailbox */
 static struct omap_hwmod omap2430_mailbox_hwmod;
 static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
        { .irq = 26 },
-};
-
-static struct omap_hwmod_addr_space omap2430_mailbox_addrs[] = {
-       {
-               .pa_start       = 0x48094000,
-               .pa_end         = 0x480941ff,
-               .flags          = ADDR_TYPE_RT,
-       },
+       { .irq = -1 }
 };
 
 /* l4_core -> mailbox */
 static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_mailbox_hwmod,
-       .addr           = omap2430_mailbox_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_mailbox_addrs),
+       .addr           = omap2_mailbox_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2019,9 +1447,8 @@ static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
 
 static struct omap_hwmod omap2430_mailbox_hwmod = {
        .name           = "mailbox",
-       .class          = &omap2430_mailbox_hwmod_class,
+       .class          = &omap2xxx_mailbox_hwmod_class,
        .mpu_irqs       = omap2430_mailbox_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_mailbox_irqs),
        .main_clk       = "mailboxes_ick",
        .prcm           = {
                .omap2 = {
@@ -2037,45 +1464,7 @@ static struct omap_hwmod omap2430_mailbox_hwmod = {
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
-/*
- * 'mcspi' class
- * multichannel serial port interface (mcspi) / master/slave synchronous serial
- * bus
- */
-
-static struct omap_hwmod_class_sysconfig omap2430_mcspi_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
-                               SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
-                               SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap2430_mcspi_class = {
-       .name = "mcspi",
-       .sysc = &omap2430_mcspi_sysc,
-       .rev = OMAP2_MCSPI_REV,
-};
-
 /* mcspi1 */
-static struct omap_hwmod_irq_info omap2430_mcspi1_mpu_irqs[] = {
-       { .irq = 65 },
-};
-
-static struct omap_hwmod_dma_info omap2430_mcspi1_sdma_reqs[] = {
-       { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
-       { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
-       { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
-       { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
-       { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
-       { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
-       { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
-       { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
-};
-
 static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
        &omap2430_l4_core__mcspi1,
 };
@@ -2086,10 +1475,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
 
 static struct omap_hwmod omap2430_mcspi1_hwmod = {
        .name           = "mcspi1_hwmod",
-       .mpu_irqs       = omap2430_mcspi1_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_mcspi1_mpu_irqs),
-       .sdma_reqs      = omap2430_mcspi1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap2430_mcspi1_sdma_reqs),
+       .mpu_irqs       = omap2_mcspi1_mpu_irqs,
+       .sdma_reqs      = omap2_mcspi1_sdma_reqs,
        .main_clk       = "mcspi1_fck",
        .prcm           = {
                .omap2 = {
@@ -2102,23 +1489,12 @@ static struct omap_hwmod omap2430_mcspi1_hwmod = {
        },
        .slaves         = omap2430_mcspi1_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_mcspi1_slaves),
-       .class          = &omap2430_mcspi_class,
-       .dev_attr       = &omap_mcspi1_dev_attr,
+       .class          = &omap2xxx_mcspi_class,
+       .dev_attr       = &omap_mcspi1_dev_attr,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* mcspi2 */
-static struct omap_hwmod_irq_info omap2430_mcspi2_mpu_irqs[] = {
-       { .irq = 66 },
-};
-
-static struct omap_hwmod_dma_info omap2430_mcspi2_sdma_reqs[] = {
-       { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
-       { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
-       { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
-       { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
-};
-
 static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
        &omap2430_l4_core__mcspi2,
 };
@@ -2129,10 +1505,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
 
 static struct omap_hwmod omap2430_mcspi2_hwmod = {
        .name           = "mcspi2_hwmod",
-       .mpu_irqs       = omap2430_mcspi2_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_mcspi2_mpu_irqs),
-       .sdma_reqs      = omap2430_mcspi2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap2430_mcspi2_sdma_reqs),
+       .mpu_irqs       = omap2_mcspi2_mpu_irqs,
+       .sdma_reqs      = omap2_mcspi2_sdma_reqs,
        .main_clk       = "mcspi2_fck",
        .prcm           = {
                .omap2 = {
@@ -2145,14 +1519,15 @@ static struct omap_hwmod omap2430_mcspi2_hwmod = {
        },
        .slaves         = omap2430_mcspi2_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_mcspi2_slaves),
-       .class          = &omap2430_mcspi_class,
-       .dev_attr       = &omap_mcspi2_dev_attr,
+       .class          = &omap2xxx_mcspi_class,
+       .dev_attr       = &omap_mcspi2_dev_attr,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* mcspi3 */
 static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
        { .irq = 91 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
@@ -2160,6 +1535,7 @@ static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
        { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
        { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
        { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
@@ -2173,9 +1549,7 @@ static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
 static struct omap_hwmod omap2430_mcspi3_hwmod = {
        .name           = "mcspi3_hwmod",
        .mpu_irqs       = omap2430_mcspi3_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_mcspi3_mpu_irqs),
        .sdma_reqs      = omap2430_mcspi3_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap2430_mcspi3_sdma_reqs),
        .main_clk       = "mcspi3_fck",
        .prcm           = {
                .omap2 = {
@@ -2188,8 +1562,8 @@ static struct omap_hwmod omap2430_mcspi3_hwmod = {
        },
        .slaves         = omap2430_mcspi3_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_mcspi3_slaves),
-       .class          = &omap2430_mcspi_class,
-       .dev_attr       = &omap_mcspi3_dev_attr,
+       .class          = &omap2xxx_mcspi_class,
+       .dev_attr       = &omap_mcspi3_dev_attr,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
@@ -2218,12 +1592,12 @@ static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
 
        { .name = "mc", .irq = 92 },
        { .name = "dma", .irq = 93 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod omap2430_usbhsotg_hwmod = {
        .name           = "usb_otg_hs",
        .mpu_irqs       = omap2430_usbhsotg_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_usbhsotg_mpu_irqs),
        .main_clk       = "usbhs_ick",
        .prcm           = {
                .omap2 = {
@@ -2273,20 +1647,7 @@ static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
        { .name = "rx",         .irq = 60 },
        { .name = "ovr",        .irq = 61 },
        { .name = "common",     .irq = 64 },
-};
-
-static struct omap_hwmod_dma_info omap2430_mcbsp1_sdma_chs[] = {
-       { .name = "rx", .dma_req = 32 },
-       { .name = "tx", .dma_req = 31 },
-};
-
-static struct omap_hwmod_addr_space omap2430_mcbsp1_addrs[] = {
-       {
-               .name           = "mpu",
-               .pa_start       = 0x48074000,
-               .pa_end         = 0x480740ff,
-               .flags          = ADDR_TYPE_RT
-       },
+       { .irq = -1 }
 };
 
 /* l4_core -> mcbsp1 */
@@ -2294,8 +1655,7 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_mcbsp1_hwmod,
        .clk            = "mcbsp1_ick",
-       .addr           = omap2430_mcbsp1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_mcbsp1_addrs),
+       .addr           = omap2_mcbsp1_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2308,9 +1668,7 @@ static struct omap_hwmod omap2430_mcbsp1_hwmod = {
        .name           = "mcbsp1",
        .class          = &omap2430_mcbsp_hwmod_class,
        .mpu_irqs       = omap2430_mcbsp1_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_mcbsp1_irqs),
-       .sdma_reqs      = omap2430_mcbsp1_sdma_chs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap2430_mcbsp1_sdma_chs),
+       .sdma_reqs      = omap2_mcbsp1_sdma_reqs,
        .main_clk       = "mcbsp1_fck",
        .prcm           = {
                .omap2 = {
@@ -2331,20 +1689,7 @@ static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
        { .name = "tx",         .irq = 62 },
        { .name = "rx",         .irq = 63 },
        { .name = "common",     .irq = 16 },
-};
-
-static struct omap_hwmod_dma_info omap2430_mcbsp2_sdma_chs[] = {
-       { .name = "rx", .dma_req = 34 },
-       { .name = "tx", .dma_req = 33 },
-};
-
-static struct omap_hwmod_addr_space omap2430_mcbsp2_addrs[] = {
-       {
-               .name           = "mpu",
-               .pa_start       = 0x48076000,
-               .pa_end         = 0x480760ff,
-               .flags          = ADDR_TYPE_RT
-       },
+       { .irq = -1 }
 };
 
 /* l4_core -> mcbsp2 */
@@ -2352,8 +1697,7 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_mcbsp2_hwmod,
        .clk            = "mcbsp2_ick",
-       .addr           = omap2430_mcbsp2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_mcbsp2_addrs),
+       .addr           = omap2xxx_mcbsp2_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2366,9 +1710,7 @@ static struct omap_hwmod omap2430_mcbsp2_hwmod = {
        .name           = "mcbsp2",
        .class          = &omap2430_mcbsp_hwmod_class,
        .mpu_irqs       = omap2430_mcbsp2_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_mcbsp2_irqs),
-       .sdma_reqs      = omap2430_mcbsp2_sdma_chs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap2430_mcbsp2_sdma_chs),
+       .sdma_reqs      = omap2_mcbsp2_sdma_reqs,
        .main_clk       = "mcbsp2_fck",
        .prcm           = {
                .omap2 = {
@@ -2389,11 +1731,7 @@ static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
        { .name = "tx",         .irq = 89 },
        { .name = "rx",         .irq = 90 },
        { .name = "common",     .irq = 17 },
-};
-
-static struct omap_hwmod_dma_info omap2430_mcbsp3_sdma_chs[] = {
-       { .name = "rx", .dma_req = 18 },
-       { .name = "tx", .dma_req = 17 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
@@ -2403,6 +1741,7 @@ static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
                .pa_end         = 0x4808C0ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_core -> mcbsp3 */
@@ -2411,7 +1750,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
        .slave          = &omap2430_mcbsp3_hwmod,
        .clk            = "mcbsp3_ick",
        .addr           = omap2430_mcbsp3_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_mcbsp3_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2424,9 +1762,7 @@ static struct omap_hwmod omap2430_mcbsp3_hwmod = {
        .name           = "mcbsp3",
        .class          = &omap2430_mcbsp_hwmod_class,
        .mpu_irqs       = omap2430_mcbsp3_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_mcbsp3_irqs),
-       .sdma_reqs      = omap2430_mcbsp3_sdma_chs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap2430_mcbsp3_sdma_chs),
+       .sdma_reqs      = omap2_mcbsp3_sdma_reqs,
        .main_clk       = "mcbsp3_fck",
        .prcm           = {
                .omap2 = {
@@ -2447,11 +1783,13 @@ static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
        { .name = "tx",         .irq = 54 },
        { .name = "rx",         .irq = 55 },
        { .name = "common",     .irq = 18 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
        { .name = "rx", .dma_req = 20 },
        { .name = "tx", .dma_req = 19 },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
@@ -2461,6 +1799,7 @@ static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
                .pa_end         = 0x4808E0ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_core -> mcbsp4 */
@@ -2469,7 +1808,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
        .slave          = &omap2430_mcbsp4_hwmod,
        .clk            = "mcbsp4_ick",
        .addr           = omap2430_mcbsp4_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_mcbsp4_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2482,9 +1820,7 @@ static struct omap_hwmod omap2430_mcbsp4_hwmod = {
        .name           = "mcbsp4",
        .class          = &omap2430_mcbsp_hwmod_class,
        .mpu_irqs       = omap2430_mcbsp4_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_mcbsp4_irqs),
        .sdma_reqs      = omap2430_mcbsp4_sdma_chs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap2430_mcbsp4_sdma_chs),
        .main_clk       = "mcbsp4_fck",
        .prcm           = {
                .omap2 = {
@@ -2505,11 +1841,13 @@ static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
        { .name = "tx",         .irq = 81 },
        { .name = "rx",         .irq = 82 },
        { .name = "common",     .irq = 19 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
        { .name = "rx", .dma_req = 22 },
        { .name = "tx", .dma_req = 21 },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
@@ -2519,6 +1857,7 @@ static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
                .pa_end         = 0x480960ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_core -> mcbsp5 */
@@ -2527,7 +1866,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
        .slave          = &omap2430_mcbsp5_hwmod,
        .clk            = "mcbsp5_ick",
        .addr           = omap2430_mcbsp5_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap2430_mcbsp5_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2540,9 +1878,7 @@ static struct omap_hwmod omap2430_mcbsp5_hwmod = {
        .name           = "mcbsp5",
        .class          = &omap2430_mcbsp_hwmod_class,
        .mpu_irqs       = omap2430_mcbsp5_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_mcbsp5_irqs),
        .sdma_reqs      = omap2430_mcbsp5_sdma_chs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap2430_mcbsp5_sdma_chs),
        .main_clk       = "mcbsp5_fck",
        .prcm           = {
                .omap2 = {
@@ -2580,11 +1916,13 @@ static struct omap_hwmod_class omap2430_mmc_class = {
 
 static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
        { .irq = 83 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
        { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
        { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
@@ -2603,9 +1941,7 @@ static struct omap_hwmod omap2430_mmc1_hwmod = {
        .name           = "mmc1",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap2430_mmc1_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_mmc1_mpu_irqs),
        .sdma_reqs      = omap2430_mmc1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap2430_mmc1_sdma_reqs),
        .opt_clks       = omap2430_mmc1_opt_clks,
        .opt_clks_cnt   = ARRAY_SIZE(omap2430_mmc1_opt_clks),
        .main_clk       = "mmchs1_fck",
@@ -2629,11 +1965,13 @@ static struct omap_hwmod omap2430_mmc1_hwmod = {
 
 static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
        { .irq = 86 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
        { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
        { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
@@ -2648,9 +1986,7 @@ static struct omap_hwmod omap2430_mmc2_hwmod = {
        .name           = "mmc2",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap2430_mmc2_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap2430_mmc2_mpu_irqs),
        .sdma_reqs      = omap2430_mmc2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap2430_mmc2_sdma_reqs),
        .opt_clks       = omap2430_mmc2_opt_clks,
        .opt_clks_cnt   = ARRAY_SIZE(omap2430_mmc2_opt_clks),
        .main_clk       = "mmchs2_fck",
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c
new file mode 100644 (file)
index 0000000..04637fa
--- /dev/null
@@ -0,0 +1,173 @@
+/*
+ * omap_hwmod_2xxx_3xxx_interconnect_data.c - common interconnect data, OMAP2/3
+ *
+ * Copyright (C) 2009-2011 Nokia Corporation
+ * Paul Walmsley
+ *
+ * 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.
+ *
+ * XXX handle crossbar/shared link difference for L3?
+ * XXX these should be marked initdata for multi-OMAP kernels
+ */
+#include <asm/sizes.h>
+
+#include <plat/omap_hwmod.h>
+#include <plat/serial.h>
+
+#include "omap_hwmod_common_data.h"
+
+struct omap_hwmod_addr_space omap2430_mmc1_addr_space[] = {
+       {
+               .pa_start       = 0x4809c000,
+               .pa_end         = 0x4809c1ff,
+               .flags          = ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2430_mmc2_addr_space[] = {
+       {
+               .pa_start       = 0x480b4000,
+               .pa_end         = 0x480b41ff,
+               .flags          = ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2_i2c1_addr_space[] = {
+       {
+               .pa_start       = 0x48070000,
+               .pa_end         = 0x48070000 + SZ_128 - 1,
+               .flags          = ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2_i2c2_addr_space[] = {
+       {
+               .pa_start       = 0x48072000,
+               .pa_end         = 0x48072000 + SZ_128 - 1,
+               .flags          = ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2_dss_addrs[] = {
+       {
+               .pa_start       = 0x48050000,
+               .pa_end         = 0x48050000 + SZ_1K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2_dss_dispc_addrs[] = {
+       {
+               .pa_start       = 0x48050400,
+               .pa_end         = 0x48050400 + SZ_1K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2_dss_rfbi_addrs[] = {
+       {
+               .pa_start       = 0x48050800,
+               .pa_end         = 0x48050800 + SZ_1K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2_dss_venc_addrs[] = {
+       {
+               .pa_start       = 0x48050C00,
+               .pa_end         = 0x48050C00 + SZ_1K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2_timer10_addrs[] = {
+       {
+               .pa_start       = 0x48086000,
+               .pa_end         = 0x48086000 + SZ_1K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2_timer11_addrs[] = {
+       {
+               .pa_start       = 0x48088000,
+               .pa_end         = 0x48088000 + SZ_1K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2xxx_timer12_addrs[] = {
+       {
+               .pa_start       = 0x4808a000,
+               .pa_end         = 0x4808a000 + SZ_1K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2_mcspi1_addr_space[] = {
+       {
+               .pa_start       = 0x48098000,
+               .pa_end         = 0x48098000 + SZ_256 - 1,
+               .flags          = ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2_mcspi2_addr_space[] = {
+       {
+               .pa_start       = 0x4809a000,
+               .pa_end         = 0x4809a000 + SZ_256 - 1,
+               .flags          = ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[] = {
+       {
+               .pa_start       = 0x480b8000,
+               .pa_end         = 0x480b8000 + SZ_256 - 1,
+               .flags          = ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2_dma_system_addrs[] = {
+       {
+               .pa_start       = 0x48056000,
+               .pa_end         = 0x48056000 + SZ_4K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2_mailbox_addrs[] = {
+       {
+               .pa_start       = 0x48094000,
+               .pa_end         = 0x48094000 + SZ_512 - 1,
+               .flags          = ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2_mcbsp1_addrs[] = {
+       {
+               .name           = "mpu",
+               .pa_start       = 0x48074000,
+               .pa_end         = 0x480740ff,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
new file mode 100644 (file)
index 0000000..c451729
--- /dev/null
@@ -0,0 +1,322 @@
+/*
+ * omap_hwmod_2xxx_3xxx_ipblock_data.c - common IP block data for OMAP2/3
+ *
+ * Copyright (C) 2011 Nokia Corporation
+ * Paul Walmsley
+ *
+ * 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 <plat/omap_hwmod.h>
+#include <plat/serial.h>
+#include <plat/dma.h>
+
+#include <mach/irqs.h>
+
+#include "omap_hwmod_common_data.h"
+
+/* UART */
+
+static struct omap_hwmod_class_sysconfig omap2_uart_sysc = {
+       .rev_offs       = 0x50,
+       .sysc_offs      = 0x54,
+       .syss_offs      = 0x58,
+       .sysc_flags     = (SYSC_HAS_SIDLEMODE |
+                          SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
+                          SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+struct omap_hwmod_class omap2_uart_class = {
+       .name   = "uart",
+       .sysc   = &omap2_uart_sysc,
+};
+
+/*
+ * 'dss' class
+ * display sub-system
+ */
+
+static struct omap_hwmod_class_sysconfig omap2_dss_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+struct omap_hwmod_class omap2_dss_hwmod_class = {
+       .name   = "dss",
+       .sysc   = &omap2_dss_sysc,
+};
+
+/*
+ * 'dispc' class
+ * display controller
+ */
+
+static struct omap_hwmod_class_sysconfig omap2_dispc_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
+                          SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+                          MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+struct omap_hwmod_class omap2_dispc_hwmod_class = {
+       .name   = "dispc",
+       .sysc   = &omap2_dispc_sysc,
+};
+
+/*
+ * 'rfbi' class
+ * remote frame buffer interface
+ */
+
+static struct omap_hwmod_class_sysconfig omap2_rfbi_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
+                          SYSC_HAS_AUTOIDLE),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+struct omap_hwmod_class omap2_rfbi_hwmod_class = {
+       .name   = "rfbi",
+       .sysc   = &omap2_rfbi_sysc,
+};
+
+/*
+ * 'venc' class
+ * video encoder
+ */
+
+struct omap_hwmod_class omap2_venc_hwmod_class = {
+       .name = "venc",
+};
+
+
+/* Common DMA request line data */
+struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[] = {
+       { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
+       { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
+       { .dma_req = -1 }
+};
+
+struct omap_hwmod_dma_info omap2_uart2_sdma_reqs[] = {
+       { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
+       { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
+       { .dma_req = -1 }
+};
+
+struct omap_hwmod_dma_info omap2_uart3_sdma_reqs[] = {
+       { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
+       { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
+       { .dma_req = -1 }
+};
+
+struct omap_hwmod_dma_info omap2_i2c1_sdma_reqs[] = {
+       { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
+       { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
+       { .dma_req = -1 }
+};
+
+struct omap_hwmod_dma_info omap2_i2c2_sdma_reqs[] = {
+       { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
+       { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
+       { .dma_req = -1 }
+};
+
+struct omap_hwmod_dma_info omap2_mcspi1_sdma_reqs[] = {
+       { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
+       { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
+       { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
+       { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
+       { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
+       { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
+       { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
+       { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
+       { .dma_req = -1 }
+};
+
+struct omap_hwmod_dma_info omap2_mcspi2_sdma_reqs[] = {
+       { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
+       { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
+       { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
+       { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
+       { .dma_req = -1 }
+};
+
+struct omap_hwmod_dma_info omap2_mcbsp1_sdma_reqs[] = {
+       { .name = "rx", .dma_req = 32 },
+       { .name = "tx", .dma_req = 31 },
+       { .dma_req = -1 }
+};
+
+struct omap_hwmod_dma_info omap2_mcbsp2_sdma_reqs[] = {
+       { .name = "rx", .dma_req = 34 },
+       { .name = "tx", .dma_req = 33 },
+       { .dma_req = -1 }
+};
+
+struct omap_hwmod_dma_info omap2_mcbsp3_sdma_reqs[] = {
+       { .name = "rx", .dma_req = 18 },
+       { .name = "tx", .dma_req = 17 },
+       { .dma_req = -1 }
+};
+
+/* Other IP block data */
+
+
+/*
+ * omap_hwmod class data
+ */
+
+struct omap_hwmod_class l3_hwmod_class = {
+       .name = "l3"
+};
+
+struct omap_hwmod_class l4_hwmod_class = {
+       .name = "l4"
+};
+
+struct omap_hwmod_class mpu_hwmod_class = {
+       .name = "mpu"
+};
+
+struct omap_hwmod_class iva_hwmod_class = {
+       .name = "iva"
+};
+
+/* Common MPU IRQ line data */
+
+struct omap_hwmod_irq_info omap2_timer1_mpu_irqs[] = {
+       { .irq = 37, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_timer2_mpu_irqs[] = {
+       { .irq = 38, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_timer3_mpu_irqs[] = {
+       { .irq = 39, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_timer4_mpu_irqs[] = {
+       { .irq = 40, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_timer5_mpu_irqs[] = {
+       { .irq = 41, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_timer6_mpu_irqs[] = {
+       { .irq = 42, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_timer7_mpu_irqs[] = {
+       { .irq = 43, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_timer8_mpu_irqs[] = {
+       { .irq = 44, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_timer9_mpu_irqs[] = {
+       { .irq = 45, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_timer10_mpu_irqs[] = {
+       { .irq = 46, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_timer11_mpu_irqs[] = {
+       { .irq = 47, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_uart1_mpu_irqs[] = {
+       { .irq = INT_24XX_UART1_IRQ, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_uart2_mpu_irqs[] = {
+       { .irq = INT_24XX_UART2_IRQ, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_uart3_mpu_irqs[] = {
+       { .irq = INT_24XX_UART3_IRQ, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_dispc_irqs[] = {
+       { .irq = 25 },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_i2c1_mpu_irqs[] = {
+       { .irq = INT_24XX_I2C1_IRQ, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_i2c2_mpu_irqs[] = {
+       { .irq = INT_24XX_I2C2_IRQ, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_gpio1_irqs[] = {
+       { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_gpio2_irqs[] = {
+       { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_gpio3_irqs[] = {
+       { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_gpio4_irqs[] = {
+       { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_dma_system_irqs[] = {
+       { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
+       { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
+       { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
+       { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[] = {
+       { .irq = 65 },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[] = {
+       { .irq = 66 },
+       { .irq = -1 }
+};
+
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
new file mode 100644 (file)
index 0000000..4f3547c
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * omap_hwmod_2xxx_interconnect_data.c - common interconnect data for OMAP2xxx
+ *
+ * Copyright (C) 2009-2011 Nokia Corporation
+ * Paul Walmsley
+ *
+ * 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.
+ *
+ * XXX handle crossbar/shared link difference for L3?
+ * XXX these should be marked initdata for multi-OMAP kernels
+ */
+#include <asm/sizes.h>
+
+#include <plat/omap_hwmod.h>
+#include <plat/serial.h>
+
+#include "omap_hwmod_common_data.h"
+
+struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = {
+       {
+               .pa_start       = OMAP2_UART1_BASE,
+               .pa_end         = OMAP2_UART1_BASE + SZ_8K - 1,
+               .flags          = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = {
+       {
+               .pa_start       = OMAP2_UART2_BASE,
+               .pa_end         = OMAP2_UART2_BASE + SZ_1K - 1,
+               .flags          = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = {
+       {
+               .pa_start       = OMAP2_UART3_BASE,
+               .pa_end         = OMAP2_UART3_BASE + SZ_1K - 1,
+               .flags          = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = {
+       {
+               .pa_start       = 0x4802a000,
+               .pa_end         = 0x4802a000 + SZ_1K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = {
+       {
+               .pa_start       = 0x48078000,
+               .pa_end         = 0x48078000 + SZ_1K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = {
+       {
+               .pa_start       = 0x4807a000,
+               .pa_end         = 0x4807a000 + SZ_1K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = {
+       {
+               .pa_start       = 0x4807c000,
+               .pa_end         = 0x4807c000 + SZ_1K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = {
+       {
+               .pa_start       = 0x4807e000,
+               .pa_end         = 0x4807e000 + SZ_1K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = {
+       {
+               .pa_start       = 0x48080000,
+               .pa_end         = 0x48080000 + SZ_1K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = {
+       {
+               .pa_start       = 0x48082000,
+               .pa_end         = 0x48082000 + SZ_1K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2xxx_timer9_addrs[] = {
+       {
+               .pa_start       = 0x48084000,
+               .pa_end         = 0x48084000 + SZ_1K - 1,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[] = {
+       {
+               .name           = "mpu",
+               .pa_start       = 0x48076000,
+               .pa_end         = 0x480760ff,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
new file mode 100644 (file)
index 0000000..177dee2
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+ * omap_hwmod_2xxx_ipblock_data.c - common IP block data for OMAP2xxx
+ *
+ * Copyright (C) 2011 Nokia Corporation
+ * Paul Walmsley
+ *
+ * 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 <plat/omap_hwmod.h>
+#include <plat/serial.h>
+#include <plat/dma.h>
+#include <plat/dmtimer.h>
+#include <plat/mcspi.h>
+
+#include <mach/irqs.h>
+
+#include "omap_hwmod_common_data.h"
+#include "wd_timer.h"
+
+struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = {
+       { .irq = 48, },
+       { .irq = -1 }
+};
+
+struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = {
+       { .name = "dispc", .dma_req = 5 },
+       { .dma_req = -1 }
+};
+/* OMAP2xxx Timer Common */
+static struct omap_hwmod_class_sysconfig omap2xxx_timer_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
+                          SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
+                          SYSC_HAS_AUTOIDLE),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+struct omap_hwmod_class omap2xxx_timer_hwmod_class = {
+       .name   = "timer",
+       .sysc   = &omap2xxx_timer_sysc,
+       .rev    = OMAP_TIMER_IP_VERSION_1,
+};
+
+/*
+ * 'wd_timer' class
+ * 32-bit watchdog upward counter that generates a pulse on the reset pin on
+ * overflow condition
+ */
+
+static struct omap_hwmod_class_sysconfig omap2xxx_wd_timer_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
+                          SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class = {
+       .name           = "wd_timer",
+       .sysc           = &omap2xxx_wd_timer_sysc,
+       .pre_shutdown   = &omap2_wd_timer_disable
+};
+
+/*
+ * 'gpio' class
+ * general purpose io module
+ */
+static struct omap_hwmod_class_sysconfig omap2xxx_gpio_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
+                          SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
+                          SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+struct omap_hwmod_class omap2xxx_gpio_hwmod_class = {
+       .name = "gpio",
+       .sysc = &omap2xxx_gpio_sysc,
+       .rev = 0,
+};
+
+/* system dma */
+static struct omap_hwmod_class_sysconfig omap2xxx_dma_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x002c,
+       .syss_offs      = 0x0028,
+       .sysc_flags     = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
+                          SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
+                          SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+struct omap_hwmod_class omap2xxx_dma_hwmod_class = {
+       .name   = "dma",
+       .sysc   = &omap2xxx_dma_sysc,
+};
+
+/*
+ * 'mailbox' class
+ * mailbox module allowing communication between the on-chip processors
+ * using a queued mailbox-interrupt mechanism.
+ */
+
+static struct omap_hwmod_class_sysconfig omap2xxx_mailbox_sysc = {
+       .rev_offs       = 0x000,
+       .sysc_offs      = 0x010,
+       .syss_offs      = 0x014,
+       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
+                          SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+struct omap_hwmod_class omap2xxx_mailbox_hwmod_class = {
+       .name   = "mailbox",
+       .sysc   = &omap2xxx_mailbox_sysc,
+};
+
+/*
+ * 'mcspi' class
+ * multichannel serial port interface (mcspi) / master/slave synchronous serial
+ * bus
+ */
+
+static struct omap_hwmod_class_sysconfig omap2xxx_mcspi_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
+                               SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
+                               SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+struct omap_hwmod_class omap2xxx_mcspi_class = {
+       .name   = "mcspi",
+       .sysc   = &omap2xxx_mcspi_sysc,
+       .rev    = OMAP2_MCSPI_REV,
+};
index 909a84de6682d8673d7f04d1fbe47bc745a77b14..1a52716e48bfe048e804b233746b02c4d0519dde 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
  *
- * Copyright (C) 2009-2010 Nokia Corporation
+ * Copyright (C) 2009-2011 Nokia Corporation
  * Paul Walmsley
  *
  * This program is free software; you can redistribute it and/or modify
@@ -103,6 +103,7 @@ static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
 static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
        { .irq = INT_34XX_L3_DBG_IRQ },
        { .irq = INT_34XX_L3_APP_IRQ },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
@@ -111,6 +112,7 @@ static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
                .pa_end         = 0x6800ffff,
                .flags          = ADDR_TYPE_RT,
        },
+       { }
 };
 
 /* MPU -> L3 interface */
@@ -118,7 +120,6 @@ static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
        .master   = &omap3xxx_mpu_hwmod,
        .slave    = &omap3xxx_l3_main_hwmod,
        .addr     = omap3xxx_l3_main_addrs,
-       .addr_cnt = ARRAY_SIZE(omap3xxx_l3_main_addrs),
        .user   = OCP_USER_MPU,
 };
 
@@ -150,8 +151,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
 static struct omap_hwmod omap3xxx_l3_main_hwmod = {
        .name           = "l3_main",
        .class          = &l3_hwmod_class,
-       .mpu_irqs       = omap3xxx_l3_main_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_l3_main_irqs),
+       .mpu_irqs       = omap3xxx_l3_main_irqs,
        .masters        = omap3xxx_l3_main_masters,
        .masters_cnt    = ARRAY_SIZE(omap3xxx_l3_main_masters),
        .slaves         = omap3xxx_l3_main_slaves,
@@ -190,39 +190,21 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
 };
 
 /* L4 CORE -> MMC1 interface */
-static struct omap_hwmod_addr_space omap3xxx_mmc1_addr_space[] = {
-       {
-               .pa_start       = 0x4809c000,
-               .pa_end         = 0x4809c1ff,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap3xxx_mmc1_hwmod,
        .clk            = "mmchs1_ick",
-       .addr           = omap3xxx_mmc1_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_mmc1_addr_space),
+       .addr           = omap2430_mmc1_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
        .flags          = OMAP_FIREWALL_L4
 };
 
 /* L4 CORE -> MMC2 interface */
-static struct omap_hwmod_addr_space omap3xxx_mmc2_addr_space[] = {
-       {
-               .pa_start       = 0x480b4000,
-               .pa_end         = 0x480b41ff,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap3xxx_mmc2_hwmod,
        .clk            = "mmchs2_ick",
-       .addr           = omap3xxx_mmc2_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_mmc2_addr_space),
+       .addr           = omap2430_mmc2_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
        .flags          = OMAP_FIREWALL_L4
 };
@@ -234,6 +216,7 @@ static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
                .pa_end         = 0x480ad1ff,
                .flags          = ADDR_TYPE_RT,
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
@@ -241,7 +224,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
        .slave          = &omap3xxx_mmc3_hwmod,
        .clk            = "mmchs3_ick",
        .addr           = omap3xxx_mmc3_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_mmc3_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
        .flags          = OMAP_FIREWALL_L4
 };
@@ -253,6 +235,7 @@ static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
                .pa_end         = OMAP3_UART1_BASE + SZ_8K - 1,
                .flags          = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
@@ -260,7 +243,6 @@ static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
        .slave          = &omap3xxx_uart1_hwmod,
        .clk            = "uart1_ick",
        .addr           = omap3xxx_uart1_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_uart1_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -271,6 +253,7 @@ static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
                .pa_end         = OMAP3_UART2_BASE + SZ_1K - 1,
                .flags          = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
@@ -278,7 +261,6 @@ static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
        .slave          = &omap3xxx_uart2_hwmod,
        .clk            = "uart2_ick",
        .addr           = omap3xxx_uart2_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_uart2_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -289,6 +271,7 @@ static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
                .pa_end         = OMAP3_UART3_BASE + SZ_1K - 1,
                .flags          = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
@@ -296,7 +279,6 @@ static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
        .slave          = &omap3xxx_uart3_hwmod,
        .clk            = "uart3_ick",
        .addr           = omap3xxx_uart3_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_uart3_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -307,6 +289,7 @@ static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
                .pa_end         = OMAP3_UART4_BASE + SZ_1K - 1,
                .flags          = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
@@ -314,28 +297,15 @@ static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
        .slave          = &omap3xxx_uart4_hwmod,
        .clk            = "uart4_ick",
        .addr           = omap3xxx_uart4_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_uart4_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* I2C IP block address space length (in bytes) */
-#define OMAP2_I2C_AS_LEN               128
-
 /* L4 CORE -> I2C1 interface */
-static struct omap_hwmod_addr_space omap3xxx_i2c1_addr_space[] = {
-       {
-               .pa_start       = 0x48070000,
-               .pa_end         = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap3xxx_i2c1_hwmod,
        .clk            = "i2c1_ick",
-       .addr           = omap3xxx_i2c1_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_i2c1_addr_space),
+       .addr           = omap2_i2c1_addr_space,
        .fw = {
                .omap2 = {
                        .l4_fw_region  = OMAP3_L4_CORE_FW_I2C1_REGION,
@@ -347,20 +317,11 @@ static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
 };
 
 /* L4 CORE -> I2C2 interface */
-static struct omap_hwmod_addr_space omap3xxx_i2c2_addr_space[] = {
-       {
-               .pa_start       = 0x48072000,
-               .pa_end         = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap3xxx_i2c2_hwmod,
        .clk            = "i2c2_ick",
-       .addr           = omap3xxx_i2c2_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_i2c2_addr_space),
+       .addr           = omap2_i2c2_addr_space,
        .fw = {
                .omap2 = {
                        .l4_fw_region  = OMAP3_L4_CORE_FW_I2C2_REGION,
@@ -375,9 +336,10 @@ static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
 static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
        {
                .pa_start       = 0x48060000,
-               .pa_end         = 0x48060000 + OMAP2_I2C_AS_LEN - 1,
+               .pa_end         = 0x48060000 + SZ_128 - 1,
                .flags          = ADDR_TYPE_RT,
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
@@ -385,7 +347,6 @@ static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
        .slave          = &omap3xxx_i2c3_hwmod,
        .clk            = "i2c3_ick",
        .addr           = omap3xxx_i2c3_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_i2c3_addr_space),
        .fw = {
                .omap2 = {
                        .l4_fw_region  = OMAP3_L4_CORE_FW_I2C3_REGION,
@@ -403,6 +364,7 @@ static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
                .pa_end         = OMAP34XX_SR1_BASE + SZ_1K - 1,
                .flags          = ADDR_TYPE_RT,
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
@@ -410,7 +372,6 @@ static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
        .slave          = &omap34xx_sr1_hwmod,
        .clk            = "sr_l4_ick",
        .addr           = omap3_sr1_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap3_sr1_addr_space),
        .user           = OCP_USER_MPU,
 };
 
@@ -421,6 +382,7 @@ static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
                .pa_end         = OMAP34XX_SR2_BASE + SZ_1K - 1,
                .flags          = ADDR_TYPE_RT,
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
@@ -428,7 +390,6 @@ static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
        .slave          = &omap34xx_sr2_hwmod,
        .clk            = "sr_l4_ick",
        .addr           = omap3_sr2_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap3_sr2_addr_space),
        .user           = OCP_USER_MPU,
 };
 
@@ -442,6 +403,7 @@ static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
                .pa_end         = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_core -> usbhsotg  */
@@ -450,7 +412,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
        .slave          = &omap3xxx_usbhsotg_hwmod,
        .clk            = "l4_ick",
        .addr           = omap3xxx_usbhsotg_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_usbhsotg_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -468,6 +429,7 @@ static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
                .pa_end         = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_core -> usbhsotg  */
@@ -476,7 +438,6 @@ static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
        .slave          = &am35xx_usbhsotg_hwmod,
        .clk            = "l4_ick",
        .addr           = am35xx_usbhsotg_addrs,
-       .addr_cnt       = ARRAY_SIZE(am35xx_usbhsotg_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -611,9 +572,6 @@ static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
 
 /* timer1 */
 static struct omap_hwmod omap3xxx_timer1_hwmod;
-static struct omap_hwmod_irq_info omap3xxx_timer1_mpu_irqs[] = {
-       { .irq = 37, },
-};
 
 static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
        {
@@ -621,6 +579,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
                .pa_end         = 0x48318000 + SZ_1K - 1,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_wkup -> timer1 */
@@ -629,7 +588,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
        .slave          = &omap3xxx_timer1_hwmod,
        .clk            = "gpt1_ick",
        .addr           = omap3xxx_timer1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_timer1_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -641,8 +599,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer1_slaves[] = {
 /* timer1 hwmod */
 static struct omap_hwmod omap3xxx_timer1_hwmod = {
        .name           = "timer1",
-       .mpu_irqs       = omap3xxx_timer1_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_timer1_mpu_irqs),
+       .mpu_irqs       = omap2_timer1_mpu_irqs,
        .main_clk       = "gpt1_fck",
        .prcm           = {
                .omap2 = {
@@ -661,9 +618,6 @@ static struct omap_hwmod omap3xxx_timer1_hwmod = {
 
 /* timer2 */
 static struct omap_hwmod omap3xxx_timer2_hwmod;
-static struct omap_hwmod_irq_info omap3xxx_timer2_mpu_irqs[] = {
-       { .irq = 38, },
-};
 
 static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
        {
@@ -671,6 +625,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
                .pa_end         = 0x49032000 + SZ_1K - 1,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> timer2 */
@@ -679,7 +634,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
        .slave          = &omap3xxx_timer2_hwmod,
        .clk            = "gpt2_ick",
        .addr           = omap3xxx_timer2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_timer2_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -691,8 +645,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer2_slaves[] = {
 /* timer2 hwmod */
 static struct omap_hwmod omap3xxx_timer2_hwmod = {
        .name           = "timer2",
-       .mpu_irqs       = omap3xxx_timer2_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_timer2_mpu_irqs),
+       .mpu_irqs       = omap2_timer2_mpu_irqs,
        .main_clk       = "gpt2_fck",
        .prcm           = {
                .omap2 = {
@@ -711,9 +664,6 @@ static struct omap_hwmod omap3xxx_timer2_hwmod = {
 
 /* timer3 */
 static struct omap_hwmod omap3xxx_timer3_hwmod;
-static struct omap_hwmod_irq_info omap3xxx_timer3_mpu_irqs[] = {
-       { .irq = 39, },
-};
 
 static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
        {
@@ -721,6 +671,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
                .pa_end         = 0x49034000 + SZ_1K - 1,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> timer3 */
@@ -729,7 +680,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
        .slave          = &omap3xxx_timer3_hwmod,
        .clk            = "gpt3_ick",
        .addr           = omap3xxx_timer3_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_timer3_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -741,8 +691,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer3_slaves[] = {
 /* timer3 hwmod */
 static struct omap_hwmod omap3xxx_timer3_hwmod = {
        .name           = "timer3",
-       .mpu_irqs       = omap3xxx_timer3_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_timer3_mpu_irqs),
+       .mpu_irqs       = omap2_timer3_mpu_irqs,
        .main_clk       = "gpt3_fck",
        .prcm           = {
                .omap2 = {
@@ -761,9 +710,6 @@ static struct omap_hwmod omap3xxx_timer3_hwmod = {
 
 /* timer4 */
 static struct omap_hwmod omap3xxx_timer4_hwmod;
-static struct omap_hwmod_irq_info omap3xxx_timer4_mpu_irqs[] = {
-       { .irq = 40, },
-};
 
 static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
        {
@@ -771,6 +717,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
                .pa_end         = 0x49036000 + SZ_1K - 1,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> timer4 */
@@ -779,7 +726,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
        .slave          = &omap3xxx_timer4_hwmod,
        .clk            = "gpt4_ick",
        .addr           = omap3xxx_timer4_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_timer4_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -791,8 +737,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer4_slaves[] = {
 /* timer4 hwmod */
 static struct omap_hwmod omap3xxx_timer4_hwmod = {
        .name           = "timer4",
-       .mpu_irqs       = omap3xxx_timer4_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_timer4_mpu_irqs),
+       .mpu_irqs       = omap2_timer4_mpu_irqs,
        .main_clk       = "gpt4_fck",
        .prcm           = {
                .omap2 = {
@@ -811,9 +756,6 @@ static struct omap_hwmod omap3xxx_timer4_hwmod = {
 
 /* timer5 */
 static struct omap_hwmod omap3xxx_timer5_hwmod;
-static struct omap_hwmod_irq_info omap3xxx_timer5_mpu_irqs[] = {
-       { .irq = 41, },
-};
 
 static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
        {
@@ -821,6 +763,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
                .pa_end         = 0x49038000 + SZ_1K - 1,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> timer5 */
@@ -829,7 +772,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
        .slave          = &omap3xxx_timer5_hwmod,
        .clk            = "gpt5_ick",
        .addr           = omap3xxx_timer5_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_timer5_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -841,8 +783,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer5_slaves[] = {
 /* timer5 hwmod */
 static struct omap_hwmod omap3xxx_timer5_hwmod = {
        .name           = "timer5",
-       .mpu_irqs       = omap3xxx_timer5_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_timer5_mpu_irqs),
+       .mpu_irqs       = omap2_timer5_mpu_irqs,
        .main_clk       = "gpt5_fck",
        .prcm           = {
                .omap2 = {
@@ -861,9 +802,6 @@ static struct omap_hwmod omap3xxx_timer5_hwmod = {
 
 /* timer6 */
 static struct omap_hwmod omap3xxx_timer6_hwmod;
-static struct omap_hwmod_irq_info omap3xxx_timer6_mpu_irqs[] = {
-       { .irq = 42, },
-};
 
 static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
        {
@@ -871,6 +809,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
                .pa_end         = 0x4903A000 + SZ_1K - 1,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> timer6 */
@@ -879,7 +818,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
        .slave          = &omap3xxx_timer6_hwmod,
        .clk            = "gpt6_ick",
        .addr           = omap3xxx_timer6_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_timer6_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -891,8 +829,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer6_slaves[] = {
 /* timer6 hwmod */
 static struct omap_hwmod omap3xxx_timer6_hwmod = {
        .name           = "timer6",
-       .mpu_irqs       = omap3xxx_timer6_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_timer6_mpu_irqs),
+       .mpu_irqs       = omap2_timer6_mpu_irqs,
        .main_clk       = "gpt6_fck",
        .prcm           = {
                .omap2 = {
@@ -911,9 +848,6 @@ static struct omap_hwmod omap3xxx_timer6_hwmod = {
 
 /* timer7 */
 static struct omap_hwmod omap3xxx_timer7_hwmod;
-static struct omap_hwmod_irq_info omap3xxx_timer7_mpu_irqs[] = {
-       { .irq = 43, },
-};
 
 static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
        {
@@ -921,6 +855,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
                .pa_end         = 0x4903C000 + SZ_1K - 1,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> timer7 */
@@ -929,7 +864,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
        .slave          = &omap3xxx_timer7_hwmod,
        .clk            = "gpt7_ick",
        .addr           = omap3xxx_timer7_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_timer7_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -941,8 +875,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer7_slaves[] = {
 /* timer7 hwmod */
 static struct omap_hwmod omap3xxx_timer7_hwmod = {
        .name           = "timer7",
-       .mpu_irqs       = omap3xxx_timer7_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_timer7_mpu_irqs),
+       .mpu_irqs       = omap2_timer7_mpu_irqs,
        .main_clk       = "gpt7_fck",
        .prcm           = {
                .omap2 = {
@@ -961,9 +894,6 @@ static struct omap_hwmod omap3xxx_timer7_hwmod = {
 
 /* timer8 */
 static struct omap_hwmod omap3xxx_timer8_hwmod;
-static struct omap_hwmod_irq_info omap3xxx_timer8_mpu_irqs[] = {
-       { .irq = 44, },
-};
 
 static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
        {
@@ -971,6 +901,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
                .pa_end         = 0x4903E000 + SZ_1K - 1,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> timer8 */
@@ -979,7 +910,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
        .slave          = &omap3xxx_timer8_hwmod,
        .clk            = "gpt8_ick",
        .addr           = omap3xxx_timer8_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_timer8_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -991,8 +921,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer8_slaves[] = {
 /* timer8 hwmod */
 static struct omap_hwmod omap3xxx_timer8_hwmod = {
        .name           = "timer8",
-       .mpu_irqs       = omap3xxx_timer8_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_timer8_mpu_irqs),
+       .mpu_irqs       = omap2_timer8_mpu_irqs,
        .main_clk       = "gpt8_fck",
        .prcm           = {
                .omap2 = {
@@ -1011,9 +940,6 @@ static struct omap_hwmod omap3xxx_timer8_hwmod = {
 
 /* timer9 */
 static struct omap_hwmod omap3xxx_timer9_hwmod;
-static struct omap_hwmod_irq_info omap3xxx_timer9_mpu_irqs[] = {
-       { .irq = 45, },
-};
 
 static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
        {
@@ -1021,6 +947,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
                .pa_end         = 0x49040000 + SZ_1K - 1,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> timer9 */
@@ -1029,7 +956,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
        .slave          = &omap3xxx_timer9_hwmod,
        .clk            = "gpt9_ick",
        .addr           = omap3xxx_timer9_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_timer9_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1041,8 +967,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer9_slaves[] = {
 /* timer9 hwmod */
 static struct omap_hwmod omap3xxx_timer9_hwmod = {
        .name           = "timer9",
-       .mpu_irqs       = omap3xxx_timer9_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_timer9_mpu_irqs),
+       .mpu_irqs       = omap2_timer9_mpu_irqs,
        .main_clk       = "gpt9_fck",
        .prcm           = {
                .omap2 = {
@@ -1061,25 +986,13 @@ static struct omap_hwmod omap3xxx_timer9_hwmod = {
 
 /* timer10 */
 static struct omap_hwmod omap3xxx_timer10_hwmod;
-static struct omap_hwmod_irq_info omap3xxx_timer10_mpu_irqs[] = {
-       { .irq = 46, },
-};
-
-static struct omap_hwmod_addr_space omap3xxx_timer10_addrs[] = {
-       {
-               .pa_start       = 0x48086000,
-               .pa_end         = 0x48086000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer10 */
 static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap3xxx_timer10_hwmod,
        .clk            = "gpt10_ick",
-       .addr           = omap3xxx_timer10_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_timer10_addrs),
+       .addr           = omap2_timer10_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1091,8 +1004,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer10_slaves[] = {
 /* timer10 hwmod */
 static struct omap_hwmod omap3xxx_timer10_hwmod = {
        .name           = "timer10",
-       .mpu_irqs       = omap3xxx_timer10_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_timer10_mpu_irqs),
+       .mpu_irqs       = omap2_timer10_mpu_irqs,
        .main_clk       = "gpt10_fck",
        .prcm           = {
                .omap2 = {
@@ -1111,25 +1023,13 @@ static struct omap_hwmod omap3xxx_timer10_hwmod = {
 
 /* timer11 */
 static struct omap_hwmod omap3xxx_timer11_hwmod;
-static struct omap_hwmod_irq_info omap3xxx_timer11_mpu_irqs[] = {
-       { .irq = 47, },
-};
-
-static struct omap_hwmod_addr_space omap3xxx_timer11_addrs[] = {
-       {
-               .pa_start       = 0x48088000,
-               .pa_end         = 0x48088000 + SZ_1K - 1,
-               .flags          = ADDR_TYPE_RT
-       },
-};
 
 /* l4_core -> timer11 */
 static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap3xxx_timer11_hwmod,
        .clk            = "gpt11_ick",
-       .addr           = omap3xxx_timer11_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_timer11_addrs),
+       .addr           = omap2_timer11_addrs,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1141,8 +1041,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer11_slaves[] = {
 /* timer11 hwmod */
 static struct omap_hwmod omap3xxx_timer11_hwmod = {
        .name           = "timer11",
-       .mpu_irqs       = omap3xxx_timer11_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_timer11_mpu_irqs),
+       .mpu_irqs       = omap2_timer11_mpu_irqs,
        .main_clk       = "gpt11_fck",
        .prcm           = {
                .omap2 = {
@@ -1163,6 +1062,7 @@ static struct omap_hwmod omap3xxx_timer11_hwmod = {
 static struct omap_hwmod omap3xxx_timer12_hwmod;
 static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
        { .irq = 95, },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
@@ -1171,6 +1071,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
                .pa_end         = 0x48304000 + SZ_1K - 1,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_core -> timer12 */
@@ -1179,7 +1080,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer12 = {
        .slave          = &omap3xxx_timer12_hwmod,
        .clk            = "gpt12_ick",
        .addr           = omap3xxx_timer12_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_timer12_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1192,7 +1092,6 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer12_slaves[] = {
 static struct omap_hwmod omap3xxx_timer12_hwmod = {
        .name           = "timer12",
        .mpu_irqs       = omap3xxx_timer12_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_timer12_mpu_irqs),
        .main_clk       = "gpt12_fck",
        .prcm           = {
                .omap2 = {
@@ -1216,6 +1115,7 @@ static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
                .pa_end         = 0x4831407f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
@@ -1223,7 +1123,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
        .slave          = &omap3xxx_wd_timer2_hwmod,
        .clk            = "wdt2_ick",
        .addr           = omap3xxx_wd_timer2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_wd_timer2_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1291,45 +1190,16 @@ static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
        .flags          = HWMOD_SWSUP_SIDLE,
 };
 
-/* UART common */
-
-static struct omap_hwmod_class_sysconfig uart_sysc = {
-       .rev_offs       = 0x50,
-       .sysc_offs      = 0x54,
-       .syss_offs      = 0x58,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE |
-                          SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
-                          SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class uart_class = {
-       .name = "uart",
-       .sysc = &uart_sysc,
-};
-
 /* UART1 */
 
-static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
-       { .irq = INT_24XX_UART1_IRQ, },
-};
-
-static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
-       { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
-       { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
-};
-
 static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
        &omap3_l4_core__uart1,
 };
 
 static struct omap_hwmod omap3xxx_uart1_hwmod = {
        .name           = "uart1",
-       .mpu_irqs       = uart1_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(uart1_mpu_irqs),
-       .sdma_reqs      = uart1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(uart1_sdma_reqs),
+       .mpu_irqs       = omap2_uart1_mpu_irqs,
+       .sdma_reqs      = omap2_uart1_sdma_reqs,
        .main_clk       = "uart1_fck",
        .prcm           = {
                .omap2 = {
@@ -1342,31 +1212,20 @@ static struct omap_hwmod omap3xxx_uart1_hwmod = {
        },
        .slaves         = omap3xxx_uart1_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap3xxx_uart1_slaves),
-       .class          = &uart_class,
+       .class          = &omap2_uart_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
 };
 
 /* UART2 */
 
-static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
-       { .irq = INT_24XX_UART2_IRQ, },
-};
-
-static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
-       { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
-       { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
-};
-
 static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
        &omap3_l4_core__uart2,
 };
 
 static struct omap_hwmod omap3xxx_uart2_hwmod = {
        .name           = "uart2",
-       .mpu_irqs       = uart2_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(uart2_mpu_irqs),
-       .sdma_reqs      = uart2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(uart2_sdma_reqs),
+       .mpu_irqs       = omap2_uart2_mpu_irqs,
+       .sdma_reqs      = omap2_uart2_sdma_reqs,
        .main_clk       = "uart2_fck",
        .prcm           = {
                .omap2 = {
@@ -1379,31 +1238,20 @@ static struct omap_hwmod omap3xxx_uart2_hwmod = {
        },
        .slaves         = omap3xxx_uart2_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap3xxx_uart2_slaves),
-       .class          = &uart_class,
+       .class          = &omap2_uart_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
 };
 
 /* UART3 */
 
-static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
-       { .irq = INT_24XX_UART3_IRQ, },
-};
-
-static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
-       { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
-       { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
-};
-
 static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
        &omap3_l4_per__uart3,
 };
 
 static struct omap_hwmod omap3xxx_uart3_hwmod = {
        .name           = "uart3",
-       .mpu_irqs       = uart3_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(uart3_mpu_irqs),
-       .sdma_reqs      = uart3_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(uart3_sdma_reqs),
+       .mpu_irqs       = omap2_uart3_mpu_irqs,
+       .sdma_reqs      = omap2_uart3_sdma_reqs,
        .main_clk       = "uart3_fck",
        .prcm           = {
                .omap2 = {
@@ -1416,7 +1264,7 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = {
        },
        .slaves         = omap3xxx_uart3_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap3xxx_uart3_slaves),
-       .class          = &uart_class,
+       .class          = &omap2_uart_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
 };
 
@@ -1424,11 +1272,13 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = {
 
 static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
        { .irq = INT_36XX_UART4_IRQ, },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
        { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
        { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
@@ -1438,9 +1288,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
 static struct omap_hwmod omap3xxx_uart4_hwmod = {
        .name           = "uart4",
        .mpu_irqs       = uart4_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(uart4_mpu_irqs),
        .sdma_reqs      = uart4_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(uart4_sdma_reqs),
        .main_clk       = "uart4_fck",
        .prcm           = {
                .omap2 = {
@@ -1453,7 +1301,7 @@ static struct omap_hwmod omap3xxx_uart4_hwmod = {
        },
        .slaves         = omap3xxx_uart4_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap3xxx_uart4_slaves),
-       .class          = &uart_class,
+       .class          = &omap2_uart_class,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
 };
 
@@ -1462,27 +1310,10 @@ static struct omap_hwmod_class i2c_class = {
        .sysc = &i2c_sysc,
 };
 
-/*
- * 'dss' class
- * display sub-system
- */
-
-static struct omap_hwmod_class_sysconfig omap3xxx_dss_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap3xxx_dss_hwmod_class = {
-       .name = "dss",
-       .sysc = &omap3xxx_dss_sysc,
-};
-
 static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
        { .name = "dispc", .dma_req = 5 },
        { .name = "dsi1", .dma_req = 74 },
+       { .dma_req = -1 }
 };
 
 /* dss */
@@ -1491,21 +1322,12 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = {
        &omap3xxx_dss__l3,
 };
 
-static struct omap_hwmod_addr_space omap3xxx_dss_addrs[] = {
-       {
-               .pa_start       = 0x48050000,
-               .pa_end         = 0x480503FF,
-               .flags          = ADDR_TYPE_RT
-       },
-};
-
 /* l4_core -> dss */
 static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap3430es1_dss_core_hwmod,
        .clk            = "dss_ick",
-       .addr           = omap3xxx_dss_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_dss_addrs),
+       .addr           = omap2_dss_addrs,
        .fw = {
                .omap2 = {
                        .l4_fw_region  = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
@@ -1520,8 +1342,7 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap3xxx_dss_core_hwmod,
        .clk            = "dss_ick",
-       .addr           = omap3xxx_dss_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_dss_addrs),
+       .addr           = omap2_dss_addrs,
        .fw = {
                .omap2 = {
                        .l4_fw_region  = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
@@ -1549,11 +1370,9 @@ static struct omap_hwmod_opt_clk dss_opt_clks[] = {
 
 static struct omap_hwmod omap3430es1_dss_core_hwmod = {
        .name           = "dss_core",
-       .class          = &omap3xxx_dss_hwmod_class,
+       .class          = &omap2_dss_hwmod_class,
        .main_clk       = "dss1_alwon_fck", /* instead of dss_fck */
        .sdma_reqs      = omap3xxx_dss_sdma_chs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap3xxx_dss_sdma_chs),
-
        .prcm           = {
                .omap2 = {
                        .prcm_reg_id = 1,
@@ -1575,11 +1394,9 @@ static struct omap_hwmod omap3430es1_dss_core_hwmod = {
 
 static struct omap_hwmod omap3xxx_dss_core_hwmod = {
        .name           = "dss_core",
-       .class          = &omap3xxx_dss_hwmod_class,
+       .class          = &omap2_dss_hwmod_class,
        .main_clk       = "dss1_alwon_fck", /* instead of dss_fck */
        .sdma_reqs      = omap3xxx_dss_sdma_chs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap3xxx_dss_sdma_chs),
-
        .prcm           = {
                .omap2 = {
                        .prcm_reg_id = 1,
@@ -1600,47 +1417,12 @@ static struct omap_hwmod omap3xxx_dss_core_hwmod = {
                                CHIP_IS_OMAP3630ES1 | CHIP_GE_OMAP3630ES1_1),
 };
 
-/*
- * 'dispc' class
- * display controller
- */
-
-static struct omap_hwmod_class_sysconfig omap3xxx_dispc_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
-                          SYSC_HAS_MIDLEMODE | SYSC_HAS_ENAWAKEUP |
-                          SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap3xxx_dispc_hwmod_class = {
-       .name = "dispc",
-       .sysc = &omap3xxx_dispc_sysc,
-};
-
-static struct omap_hwmod_irq_info omap3xxx_dispc_irqs[] = {
-       { .irq = 25 },
-};
-
-static struct omap_hwmod_addr_space omap3xxx_dss_dispc_addrs[] = {
-       {
-               .pa_start       = 0x48050400,
-               .pa_end         = 0x480507FF,
-               .flags          = ADDR_TYPE_RT
-       },
-};
-
 /* l4_core -> dss_dispc */
 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap3xxx_dss_dispc_hwmod,
        .clk            = "dss_ick",
-       .addr           = omap3xxx_dss_dispc_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_dss_dispc_addrs),
+       .addr           = omap2_dss_dispc_addrs,
        .fw = {
                .omap2 = {
                        .l4_fw_region  = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
@@ -1658,9 +1440,8 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = {
 
 static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
        .name           = "dss_dispc",
-       .class          = &omap3xxx_dispc_hwmod_class,
-       .mpu_irqs       = omap3xxx_dispc_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_dispc_irqs),
+       .class          = &omap2_dispc_hwmod_class,
+       .mpu_irqs       = omap2_dispc_irqs,
        .main_clk       = "dss1_alwon_fck",
        .prcm           = {
                .omap2 = {
@@ -1688,6 +1469,7 @@ static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
 
 static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
        { .irq = 25 },
+       { .irq = -1 }
 };
 
 /* dss_dsi1 */
@@ -1697,6 +1479,7 @@ static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
                .pa_end         = 0x4804FFFF,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_core -> dss_dsi1 */
@@ -1704,7 +1487,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap3xxx_dss_dsi1_hwmod,
        .addr           = omap3xxx_dss_dsi1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_dss_dsi1_addrs),
        .fw = {
                .omap2 = {
                        .l4_fw_region  = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
@@ -1724,7 +1506,6 @@ static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
        .name           = "dss_dsi1",
        .class          = &omap3xxx_dsi_hwmod_class,
        .mpu_irqs       = omap3xxx_dsi1_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_dsi1_irqs),
        .main_clk       = "dss1_alwon_fck",
        .prcm           = {
                .omap2 = {
@@ -1741,41 +1522,12 @@ static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
        .flags          = HWMOD_NO_IDLEST,
 };
 
-/*
- * 'rfbi' class
- * remote frame buffer interface
- */
-
-static struct omap_hwmod_class_sysconfig omap3xxx_rfbi_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-                          SYSC_HAS_AUTOIDLE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-static struct omap_hwmod_class omap3xxx_rfbi_hwmod_class = {
-       .name = "rfbi",
-       .sysc = &omap3xxx_rfbi_sysc,
-};
-
-static struct omap_hwmod_addr_space omap3xxx_dss_rfbi_addrs[] = {
-       {
-               .pa_start       = 0x48050800,
-               .pa_end         = 0x48050BFF,
-               .flags          = ADDR_TYPE_RT
-       },
-};
-
 /* l4_core -> dss_rfbi */
 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap3xxx_dss_rfbi_hwmod,
        .clk            = "dss_ick",
-       .addr           = omap3xxx_dss_rfbi_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_dss_rfbi_addrs),
+       .addr           = omap2_dss_rfbi_addrs,
        .fw = {
                .omap2 = {
                        .l4_fw_region  = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
@@ -1793,7 +1545,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = {
 
 static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
        .name           = "dss_rfbi",
-       .class          = &omap3xxx_rfbi_hwmod_class,
+       .class          = &omap2_rfbi_hwmod_class,
        .main_clk       = "dss1_alwon_fck",
        .prcm           = {
                .omap2 = {
@@ -1810,31 +1562,12 @@ static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
        .flags          = HWMOD_NO_IDLEST,
 };
 
-/*
- * 'venc' class
- * video encoder
- */
-
-static struct omap_hwmod_class omap3xxx_venc_hwmod_class = {
-       .name = "venc",
-};
-
-/* dss_venc */
-static struct omap_hwmod_addr_space omap3xxx_dss_venc_addrs[] = {
-       {
-               .pa_start       = 0x48050C00,
-               .pa_end         = 0x48050FFF,
-               .flags          = ADDR_TYPE_RT
-       },
-};
-
 /* l4_core -> dss_venc */
 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap3xxx_dss_venc_hwmod,
        .clk            = "dss_tv_fck",
-       .addr           = omap3xxx_dss_venc_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_dss_venc_addrs),
+       .addr           = omap2_dss_venc_addrs,
        .fw = {
                .omap2 = {
                        .l4_fw_region  = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
@@ -1853,7 +1586,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = {
 
 static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
        .name           = "dss_venc",
-       .class          = &omap3xxx_venc_hwmod_class,
+       .class          = &omap2_venc_hwmod_class,
        .main_clk       = "dss1_alwon_fck",
        .prcm           = {
                .omap2 = {
@@ -1876,25 +1609,14 @@ static struct omap_i2c_dev_attr i2c1_dev_attr = {
        .fifo_depth     = 8, /* bytes */
 };
 
-static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
-       { .irq = INT_24XX_I2C1_IRQ, },
-};
-
-static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
-       { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
-       { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
-};
-
 static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
        &omap3_l4_core__i2c1,
 };
 
 static struct omap_hwmod omap3xxx_i2c1_hwmod = {
        .name           = "i2c1",
-       .mpu_irqs       = i2c1_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(i2c1_mpu_irqs),
-       .sdma_reqs      = i2c1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(i2c1_sdma_reqs),
+       .mpu_irqs       = omap2_i2c1_mpu_irqs,
+       .sdma_reqs      = omap2_i2c1_sdma_reqs,
        .main_clk       = "i2c1_fck",
        .prcm           = {
                .omap2 = {
@@ -1918,25 +1640,14 @@ static struct omap_i2c_dev_attr i2c2_dev_attr = {
        .fifo_depth     = 8, /* bytes */
 };
 
-static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
-       { .irq = INT_24XX_I2C2_IRQ, },
-};
-
-static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
-       { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
-       { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
-};
-
 static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
        &omap3_l4_core__i2c2,
 };
 
 static struct omap_hwmod omap3xxx_i2c2_hwmod = {
        .name           = "i2c2",
-       .mpu_irqs       = i2c2_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(i2c2_mpu_irqs),
-       .sdma_reqs      = i2c2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(i2c2_sdma_reqs),
+       .mpu_irqs       = omap2_i2c2_mpu_irqs,
+       .sdma_reqs      = omap2_i2c2_sdma_reqs,
        .main_clk       = "i2c2_fck",
        .prcm           = {
                .omap2 = {
@@ -1962,11 +1673,13 @@ static struct omap_i2c_dev_attr i2c3_dev_attr = {
 
 static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
        { .irq = INT_34XX_I2C3_IRQ, },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
        { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
        { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
@@ -1976,9 +1689,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
 static struct omap_hwmod omap3xxx_i2c3_hwmod = {
        .name           = "i2c3",
        .mpu_irqs       = i2c3_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(i2c3_mpu_irqs),
        .sdma_reqs      = i2c3_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(i2c3_sdma_reqs),
        .main_clk       = "i2c3_fck",
        .prcm           = {
                .omap2 = {
@@ -2003,13 +1714,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
                .pa_end         = 0x483101ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
        .master         = &omap3xxx_l4_wkup_hwmod,
        .slave          = &omap3xxx_gpio1_hwmod,
        .addr           = omap3xxx_gpio1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_gpio1_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2020,13 +1731,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
                .pa_end         = 0x490501ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
        .master         = &omap3xxx_l4_per_hwmod,
        .slave          = &omap3xxx_gpio2_hwmod,
        .addr           = omap3xxx_gpio2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_gpio2_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2037,13 +1748,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
                .pa_end         = 0x490521ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
        .master         = &omap3xxx_l4_per_hwmod,
        .slave          = &omap3xxx_gpio3_hwmod,
        .addr           = omap3xxx_gpio3_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_gpio3_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2054,13 +1765,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
                .pa_end         = 0x490541ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
        .master         = &omap3xxx_l4_per_hwmod,
        .slave          = &omap3xxx_gpio4_hwmod,
        .addr           = omap3xxx_gpio4_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_gpio4_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2071,13 +1782,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
                .pa_end         = 0x490561ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
        .master         = &omap3xxx_l4_per_hwmod,
        .slave          = &omap3xxx_gpio5_hwmod,
        .addr           = omap3xxx_gpio5_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_gpio5_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2088,13 +1799,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
                .pa_end         = 0x490581ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
        .master         = &omap3xxx_l4_per_hwmod,
        .slave          = &omap3xxx_gpio6_hwmod,
        .addr           = omap3xxx_gpio6_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_gpio6_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2127,10 +1838,6 @@ static struct omap_gpio_dev_attr gpio_dev_attr = {
 };
 
 /* gpio1 */
-static struct omap_hwmod_irq_info omap3xxx_gpio1_irqs[] = {
-       { .irq = 29 }, /* INT_34XX_GPIO_BANK1 */
-};
-
 static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
        { .role = "dbclk", .clk = "gpio1_dbck", },
 };
@@ -2142,8 +1849,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
 static struct omap_hwmod omap3xxx_gpio1_hwmod = {
        .name           = "gpio1",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
-       .mpu_irqs       = omap3xxx_gpio1_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_gpio1_irqs),
+       .mpu_irqs       = omap2_gpio1_irqs,
        .main_clk       = "gpio1_ick",
        .opt_clks       = gpio1_opt_clks,
        .opt_clks_cnt   = ARRAY_SIZE(gpio1_opt_clks),
@@ -2164,10 +1870,6 @@ static struct omap_hwmod omap3xxx_gpio1_hwmod = {
 };
 
 /* gpio2 */
-static struct omap_hwmod_irq_info omap3xxx_gpio2_irqs[] = {
-       { .irq = 30 }, /* INT_34XX_GPIO_BANK2 */
-};
-
 static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
        { .role = "dbclk", .clk = "gpio2_dbck", },
 };
@@ -2179,8 +1881,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
 static struct omap_hwmod omap3xxx_gpio2_hwmod = {
        .name           = "gpio2",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
-       .mpu_irqs       = omap3xxx_gpio2_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_gpio2_irqs),
+       .mpu_irqs       = omap2_gpio2_irqs,
        .main_clk       = "gpio2_ick",
        .opt_clks       = gpio2_opt_clks,
        .opt_clks_cnt   = ARRAY_SIZE(gpio2_opt_clks),
@@ -2201,10 +1902,6 @@ static struct omap_hwmod omap3xxx_gpio2_hwmod = {
 };
 
 /* gpio3 */
-static struct omap_hwmod_irq_info omap3xxx_gpio3_irqs[] = {
-       { .irq = 31 }, /* INT_34XX_GPIO_BANK3 */
-};
-
 static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
        { .role = "dbclk", .clk = "gpio3_dbck", },
 };
@@ -2216,8 +1913,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
 static struct omap_hwmod omap3xxx_gpio3_hwmod = {
        .name           = "gpio3",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
-       .mpu_irqs       = omap3xxx_gpio3_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_gpio3_irqs),
+       .mpu_irqs       = omap2_gpio3_irqs,
        .main_clk       = "gpio3_ick",
        .opt_clks       = gpio3_opt_clks,
        .opt_clks_cnt   = ARRAY_SIZE(gpio3_opt_clks),
@@ -2238,10 +1934,6 @@ static struct omap_hwmod omap3xxx_gpio3_hwmod = {
 };
 
 /* gpio4 */
-static struct omap_hwmod_irq_info omap3xxx_gpio4_irqs[] = {
-       { .irq = 32 }, /* INT_34XX_GPIO_BANK4 */
-};
-
 static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
        { .role = "dbclk", .clk = "gpio4_dbck", },
 };
@@ -2253,8 +1945,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
 static struct omap_hwmod omap3xxx_gpio4_hwmod = {
        .name           = "gpio4",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
-       .mpu_irqs       = omap3xxx_gpio4_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_gpio4_irqs),
+       .mpu_irqs       = omap2_gpio4_irqs,
        .main_clk       = "gpio4_ick",
        .opt_clks       = gpio4_opt_clks,
        .opt_clks_cnt   = ARRAY_SIZE(gpio4_opt_clks),
@@ -2277,6 +1968,7 @@ static struct omap_hwmod omap3xxx_gpio4_hwmod = {
 /* gpio5 */
 static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
        { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
@@ -2291,7 +1983,6 @@ static struct omap_hwmod omap3xxx_gpio5_hwmod = {
        .name           = "gpio5",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap3xxx_gpio5_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_gpio5_irqs),
        .main_clk       = "gpio5_ick",
        .opt_clks       = gpio5_opt_clks,
        .opt_clks_cnt   = ARRAY_SIZE(gpio5_opt_clks),
@@ -2314,6 +2005,7 @@ static struct omap_hwmod omap3xxx_gpio5_hwmod = {
 /* gpio6 */
 static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
        { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
@@ -2328,7 +2020,6 @@ static struct omap_hwmod omap3xxx_gpio6_hwmod = {
        .name           = "gpio6",
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap3xxx_gpio6_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_gpio6_irqs),
        .main_clk       = "gpio6_ick",
        .opt_clks       = gpio6_opt_clks,
        .opt_clks_cnt   = ARRAY_SIZE(gpio6_opt_clks),
@@ -2382,19 +2073,13 @@ static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
 };
 
 /* dma_system */
-static struct omap_hwmod_irq_info omap3xxx_dma_system_irqs[] = {
-       { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
-       { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
-       { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
-       { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
-};
-
 static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
        {
                .pa_start       = 0x48056000,
                .pa_end         = 0x48056fff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* dma_system master ports */
@@ -2408,7 +2093,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
        .slave          = &omap3xxx_dma_system_hwmod,
        .clk            = "core_l4_ick",
        .addr           = omap3xxx_dma_system_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_dma_system_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2420,8 +2104,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
 static struct omap_hwmod omap3xxx_dma_system_hwmod = {
        .name           = "dma",
        .class          = &omap3xxx_dma_hwmod_class,
-       .mpu_irqs       = omap3xxx_dma_system_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_dma_system_irqs),
+       .mpu_irqs       = omap2_dma_system_irqs,
        .main_clk       = "core_l3_ick",
        .prcm = {
                .omap2 = {
@@ -2466,11 +2149,7 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
        { .name = "irq", .irq = 16 },
        { .name = "tx", .irq = 59 },
        { .name = "rx", .irq = 60 },
-};
-
-static struct omap_hwmod_dma_info omap3xxx_mcbsp1_sdma_chs[] = {
-       { .name = "rx", .dma_req = 32 },
-       { .name = "tx", .dma_req = 31 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
@@ -2480,6 +2159,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
                .pa_end         = 0x480740ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_core -> mcbsp1 */
@@ -2488,7 +2168,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
        .slave          = &omap3xxx_mcbsp1_hwmod,
        .clk            = "mcbsp1_ick",
        .addr           = omap3xxx_mcbsp1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_mcbsp1_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2501,9 +2180,7 @@ static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
        .name           = "mcbsp1",
        .class          = &omap3xxx_mcbsp_hwmod_class,
        .mpu_irqs       = omap3xxx_mcbsp1_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_mcbsp1_irqs),
-       .sdma_reqs      = omap3xxx_mcbsp1_sdma_chs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap3xxx_mcbsp1_sdma_chs),
+       .sdma_reqs      = omap2_mcbsp1_sdma_reqs,
        .main_clk       = "mcbsp1_fck",
        .prcm           = {
                .omap2 = {
@@ -2524,11 +2201,7 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
        { .name = "irq", .irq = 17 },
        { .name = "tx", .irq = 62 },
        { .name = "rx", .irq = 63 },
-};
-
-static struct omap_hwmod_dma_info omap3xxx_mcbsp2_sdma_chs[] = {
-       { .name = "rx", .dma_req = 34 },
-       { .name = "tx", .dma_req = 33 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
@@ -2538,6 +2211,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
                .pa_end         = 0x490220ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> mcbsp2 */
@@ -2546,7 +2220,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
        .slave          = &omap3xxx_mcbsp2_hwmod,
        .clk            = "mcbsp2_ick",
        .addr           = omap3xxx_mcbsp2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_mcbsp2_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2563,9 +2236,7 @@ static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
        .name           = "mcbsp2",
        .class          = &omap3xxx_mcbsp_hwmod_class,
        .mpu_irqs       = omap3xxx_mcbsp2_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_mcbsp2_irqs),
-       .sdma_reqs      = omap3xxx_mcbsp2_sdma_chs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap3xxx_mcbsp2_sdma_chs),
+       .sdma_reqs      = omap2_mcbsp2_sdma_reqs,
        .main_clk       = "mcbsp2_fck",
        .prcm           = {
                .omap2 = {
@@ -2587,11 +2258,7 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
        { .name = "irq", .irq = 22 },
        { .name = "tx", .irq = 89 },
        { .name = "rx", .irq = 90 },
-};
-
-static struct omap_hwmod_dma_info omap3xxx_mcbsp3_sdma_chs[] = {
-       { .name = "rx", .dma_req = 18 },
-       { .name = "tx", .dma_req = 17 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
@@ -2601,6 +2268,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
                .pa_end         = 0x490240ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> mcbsp3 */
@@ -2609,7 +2277,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
        .slave          = &omap3xxx_mcbsp3_hwmod,
        .clk            = "mcbsp3_ick",
        .addr           = omap3xxx_mcbsp3_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_mcbsp3_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2626,9 +2293,7 @@ static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
        .name           = "mcbsp3",
        .class          = &omap3xxx_mcbsp_hwmod_class,
        .mpu_irqs       = omap3xxx_mcbsp3_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_mcbsp3_irqs),
-       .sdma_reqs      = omap3xxx_mcbsp3_sdma_chs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap3xxx_mcbsp3_sdma_chs),
+       .sdma_reqs      = omap2_mcbsp3_sdma_reqs,
        .main_clk       = "mcbsp3_fck",
        .prcm           = {
                .omap2 = {
@@ -2650,11 +2315,13 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
        { .name = "irq", .irq = 23 },
        { .name = "tx", .irq = 54 },
        { .name = "rx", .irq = 55 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
        { .name = "rx", .dma_req = 20 },
        { .name = "tx", .dma_req = 19 },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
@@ -2664,6 +2331,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
                .pa_end         = 0x490260ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> mcbsp4 */
@@ -2672,7 +2340,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
        .slave          = &omap3xxx_mcbsp4_hwmod,
        .clk            = "mcbsp4_ick",
        .addr           = omap3xxx_mcbsp4_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_mcbsp4_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2685,9 +2352,7 @@ static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
        .name           = "mcbsp4",
        .class          = &omap3xxx_mcbsp_hwmod_class,
        .mpu_irqs       = omap3xxx_mcbsp4_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_mcbsp4_irqs),
        .sdma_reqs      = omap3xxx_mcbsp4_sdma_chs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap3xxx_mcbsp4_sdma_chs),
        .main_clk       = "mcbsp4_fck",
        .prcm           = {
                .omap2 = {
@@ -2708,11 +2373,13 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
        { .name = "irq", .irq = 27 },
        { .name = "tx", .irq = 81 },
        { .name = "rx", .irq = 82 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
        { .name = "rx", .dma_req = 22 },
        { .name = "tx", .dma_req = 21 },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
@@ -2722,6 +2389,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
                .pa_end         = 0x480960ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_core -> mcbsp5 */
@@ -2730,7 +2398,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
        .slave          = &omap3xxx_mcbsp5_hwmod,
        .clk            = "mcbsp5_ick",
        .addr           = omap3xxx_mcbsp5_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_mcbsp5_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2743,9 +2410,7 @@ static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
        .name           = "mcbsp5",
        .class          = &omap3xxx_mcbsp_hwmod_class,
        .mpu_irqs       = omap3xxx_mcbsp5_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_mcbsp5_irqs),
        .sdma_reqs      = omap3xxx_mcbsp5_sdma_chs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap3xxx_mcbsp5_sdma_chs),
        .main_clk       = "mcbsp5_fck",
        .prcm           = {
                .omap2 = {
@@ -2776,6 +2441,7 @@ static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
 /* mcbsp2_sidetone */
 static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
        { .name = "irq", .irq = 4 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
@@ -2785,6 +2451,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
                .pa_end         = 0x490280ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> mcbsp2_sidetone */
@@ -2793,7 +2460,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
        .slave          = &omap3xxx_mcbsp2_sidetone_hwmod,
        .clk            = "mcbsp2_ick",
        .addr           = omap3xxx_mcbsp2_sidetone_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -2806,7 +2472,6 @@ static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
        .name           = "mcbsp2_sidetone",
        .class          = &omap3xxx_mcbsp_sidetone_hwmod_class,
        .mpu_irqs       = omap3xxx_mcbsp2_sidetone_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_irqs),
        .main_clk       = "mcbsp2_fck",
        .prcm           = {
                .omap2 = {
@@ -2825,6 +2490,7 @@ static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
 /* mcbsp3_sidetone */
 static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
        { .name = "irq", .irq = 5 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
@@ -2834,6 +2500,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
                .pa_end         = 0x4902A0ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> mcbsp3_sidetone */
@@ -2842,7 +2509,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
        .slave          = &omap3xxx_mcbsp3_sidetone_hwmod,
        .clk            = "mcbsp3_ick",
        .addr           = omap3xxx_mcbsp3_sidetone_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -2855,7 +2521,6 @@ static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
        .name           = "mcbsp3_sidetone",
        .class          = &omap3xxx_mcbsp_sidetone_hwmod_class,
        .mpu_irqs       = omap3xxx_mcbsp3_sidetone_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_irqs),
        .main_clk       = "mcbsp3_fck",
        .prcm           = {
                .omap2 = {
@@ -3025,6 +2690,7 @@ static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
 static struct omap_hwmod omap3xxx_mailbox_hwmod;
 static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
        { .irq = 26 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
@@ -3033,6 +2699,7 @@ static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
                .pa_end         = 0x480941ff,
                .flags          = ADDR_TYPE_RT,
        },
+       { }
 };
 
 /* l4_core -> mailbox */
@@ -3040,7 +2707,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap3xxx_mailbox_hwmod,
        .addr           = omap3xxx_mailbox_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap3xxx_mailbox_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -3053,7 +2719,6 @@ static struct omap_hwmod omap3xxx_mailbox_hwmod = {
        .name           = "mailbox",
        .class          = &omap3xxx_mailbox_hwmod_class,
        .mpu_irqs       = omap3xxx_mailbox_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_mailbox_irqs),
        .main_clk       = "mailboxes_ick",
        .prcm           = {
                .omap2 = {
@@ -3070,56 +2735,29 @@ static struct omap_hwmod omap3xxx_mailbox_hwmod = {
 };
 
 /* l4 core -> mcspi1 interface */
-static struct omap_hwmod_addr_space omap34xx_mcspi1_addr_space[] = {
-       {
-               .pa_start       = 0x48098000,
-               .pa_end         = 0x480980ff,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap34xx_mcspi1,
        .clk            = "mcspi1_ick",
-       .addr           = omap34xx_mcspi1_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap34xx_mcspi1_addr_space),
+       .addr           = omap2_mcspi1_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
 /* l4 core -> mcspi2 interface */
-static struct omap_hwmod_addr_space omap34xx_mcspi2_addr_space[] = {
-       {
-               .pa_start       = 0x4809a000,
-               .pa_end         = 0x4809a0ff,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap34xx_mcspi2,
        .clk            = "mcspi2_ick",
-       .addr           = omap34xx_mcspi2_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap34xx_mcspi2_addr_space),
+       .addr           = omap2_mcspi2_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
 /* l4 core -> mcspi3 interface */
-static struct omap_hwmod_addr_space omap34xx_mcspi3_addr_space[] = {
-       {
-               .pa_start       = 0x480b8000,
-               .pa_end         = 0x480b80ff,
-               .flags          = ADDR_TYPE_RT,
-       },
-};
-
 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap34xx_mcspi3,
        .clk            = "mcspi3_ick",
-       .addr           = omap34xx_mcspi3_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap34xx_mcspi3_addr_space),
+       .addr           = omap2430_mcspi3_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -3130,6 +2768,7 @@ static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
                .pa_end         = 0x480ba0ff,
                .flags          = ADDR_TYPE_RT,
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
@@ -3137,7 +2776,6 @@ static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
        .slave          = &omap34xx_mcspi4,
        .clk            = "mcspi4_ick",
        .addr           = omap34xx_mcspi4_addr_space,
-       .addr_cnt       = ARRAY_SIZE(omap34xx_mcspi4_addr_space),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -3165,21 +2803,6 @@ static struct omap_hwmod_class omap34xx_mcspi_class = {
 };
 
 /* mcspi1 */
-static struct omap_hwmod_irq_info omap34xx_mcspi1_mpu_irqs[] = {
-       { .name = "irq", .irq = 65 },
-};
-
-static struct omap_hwmod_dma_info omap34xx_mcspi1_sdma_reqs[] = {
-       { .name = "tx0", .dma_req = 35 },
-       { .name = "rx0", .dma_req = 36 },
-       { .name = "tx1", .dma_req = 37 },
-       { .name = "rx1", .dma_req = 38 },
-       { .name = "tx2", .dma_req = 39 },
-       { .name = "rx2", .dma_req = 40 },
-       { .name = "tx3", .dma_req = 41 },
-       { .name = "rx3", .dma_req = 42 },
-};
-
 static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
        &omap34xx_l4_core__mcspi1,
 };
@@ -3190,10 +2813,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
 
 static struct omap_hwmod omap34xx_mcspi1 = {
        .name           = "mcspi1",
-       .mpu_irqs       = omap34xx_mcspi1_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap34xx_mcspi1_mpu_irqs),
-       .sdma_reqs      = omap34xx_mcspi1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap34xx_mcspi1_sdma_reqs),
+       .mpu_irqs       = omap2_mcspi1_mpu_irqs,
+       .sdma_reqs      = omap2_mcspi1_sdma_reqs,
        .main_clk       = "mcspi1_fck",
        .prcm           = {
                .omap2 = {
@@ -3212,17 +2833,6 @@ static struct omap_hwmod omap34xx_mcspi1 = {
 };
 
 /* mcspi2 */
-static struct omap_hwmod_irq_info omap34xx_mcspi2_mpu_irqs[] = {
-       { .name = "irq", .irq = 66 },
-};
-
-static struct omap_hwmod_dma_info omap34xx_mcspi2_sdma_reqs[] = {
-       { .name = "tx0", .dma_req = 43 },
-       { .name = "rx0", .dma_req = 44 },
-       { .name = "tx1", .dma_req = 45 },
-       { .name = "rx1", .dma_req = 46 },
-};
-
 static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
        &omap34xx_l4_core__mcspi2,
 };
@@ -3233,10 +2843,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
 
 static struct omap_hwmod omap34xx_mcspi2 = {
        .name           = "mcspi2",
-       .mpu_irqs       = omap34xx_mcspi2_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap34xx_mcspi2_mpu_irqs),
-       .sdma_reqs      = omap34xx_mcspi2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap34xx_mcspi2_sdma_reqs),
+       .mpu_irqs       = omap2_mcspi2_mpu_irqs,
+       .sdma_reqs      = omap2_mcspi2_sdma_reqs,
        .main_clk       = "mcspi2_fck",
        .prcm           = {
                .omap2 = {
@@ -3257,6 +2865,7 @@ static struct omap_hwmod omap34xx_mcspi2 = {
 /* mcspi3 */
 static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
        { .name = "irq", .irq = 91 }, /* 91 */
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
@@ -3264,6 +2873,7 @@ static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
        { .name = "rx0", .dma_req = 16 },
        { .name = "tx1", .dma_req = 23 },
        { .name = "rx1", .dma_req = 24 },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = {
@@ -3277,9 +2887,7 @@ static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
 static struct omap_hwmod omap34xx_mcspi3 = {
        .name           = "mcspi3",
        .mpu_irqs       = omap34xx_mcspi3_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap34xx_mcspi3_mpu_irqs),
        .sdma_reqs      = omap34xx_mcspi3_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap34xx_mcspi3_sdma_reqs),
        .main_clk       = "mcspi3_fck",
        .prcm           = {
                .omap2 = {
@@ -3300,11 +2908,13 @@ static struct omap_hwmod omap34xx_mcspi3 = {
 /* SPI4 */
 static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
        { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
        { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
        { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = {
@@ -3318,9 +2928,7 @@ static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
 static struct omap_hwmod omap34xx_mcspi4 = {
        .name           = "mcspi4",
        .mpu_irqs       = omap34xx_mcspi4_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap34xx_mcspi4_mpu_irqs),
        .sdma_reqs      = omap34xx_mcspi4_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap34xx_mcspi4_sdma_reqs),
        .main_clk       = "mcspi4_fck",
        .prcm           = {
                .omap2 = {
@@ -3362,12 +2970,12 @@ static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
 
        { .name = "mc", .irq = 92 },
        { .name = "dma", .irq = 93 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
        .name           = "usb_otg_hs",
        .mpu_irqs       = omap3xxx_usbhsotg_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap3xxx_usbhsotg_mpu_irqs),
        .main_clk       = "hsotgusb_ick",
        .prcm           = {
                .omap2 = {
@@ -3399,6 +3007,7 @@ static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
 static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
 
        { .name = "mc", .irq = 71 },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_class am35xx_usbotg_class = {
@@ -3409,7 +3018,6 @@ static struct omap_hwmod_class am35xx_usbotg_class = {
 static struct omap_hwmod am35xx_usbhsotg_hwmod = {
        .name           = "am35x_otg_hs",
        .mpu_irqs       = am35xx_usbhsotg_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(am35xx_usbhsotg_mpu_irqs),
        .main_clk       = NULL,
        .prcm = {
                .omap2 = {
@@ -3445,11 +3053,13 @@ static struct omap_hwmod_class omap34xx_mmc_class = {
 
 static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
        { .irq = 83, },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
        { .name = "tx", .dma_req = 61, },
        { .name = "rx", .dma_req = 62, },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
@@ -3467,9 +3077,7 @@ static struct omap_mmc_dev_attr mmc1_dev_attr = {
 static struct omap_hwmod omap3xxx_mmc1_hwmod = {
        .name           = "mmc1",
        .mpu_irqs       = omap34xx_mmc1_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap34xx_mmc1_mpu_irqs),
        .sdma_reqs      = omap34xx_mmc1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap34xx_mmc1_sdma_reqs),
        .opt_clks       = omap34xx_mmc1_opt_clks,
        .opt_clks_cnt   = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
        .main_clk       = "mmchs1_fck",
@@ -3493,11 +3101,13 @@ static struct omap_hwmod omap3xxx_mmc1_hwmod = {
 
 static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
        { .irq = INT_24XX_MMC2_IRQ, },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
        { .name = "tx", .dma_req = 47, },
        { .name = "rx", .dma_req = 48, },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
@@ -3511,9 +3121,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = {
 static struct omap_hwmod omap3xxx_mmc2_hwmod = {
        .name           = "mmc2",
        .mpu_irqs       = omap34xx_mmc2_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap34xx_mmc2_mpu_irqs),
        .sdma_reqs      = omap34xx_mmc2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap34xx_mmc2_sdma_reqs),
        .opt_clks       = omap34xx_mmc2_opt_clks,
        .opt_clks_cnt   = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
        .main_clk       = "mmchs2_fck",
@@ -3536,11 +3144,13 @@ static struct omap_hwmod omap3xxx_mmc2_hwmod = {
 
 static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
        { .irq = 94, },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
        { .name = "tx", .dma_req = 77, },
        { .name = "rx", .dma_req = 78, },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
@@ -3554,9 +3164,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = {
 static struct omap_hwmod omap3xxx_mmc3_hwmod = {
        .name           = "mmc3",
        .mpu_irqs       = omap34xx_mmc3_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap34xx_mmc3_mpu_irqs),
        .sdma_reqs      = omap34xx_mmc3_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap34xx_mmc3_sdma_reqs),
        .opt_clks       = omap34xx_mmc3_opt_clks,
        .opt_clks_cnt   = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
        .main_clk       = "mmchs3_fck",
index e1c69ffe0f69db181b9dd6245be9e72ffbaf63f0..e01143725b089aa113a65f0470cbe986d3fa7bad 100644 (file)
@@ -80,7 +80,12 @@ static struct omap_hwmod_class omap44xx_dmm_hwmod_class = {
        .name   = "dmm",
 };
 
-/* dmm interface data */
+/* dmm */
+static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
+       { .irq = 113 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
+};
+
 /* l3_main_1 -> dmm */
 static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
        .master         = &omap44xx_l3_main_1_hwmod,
@@ -95,6 +100,7 @@ static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = {
                .pa_end         = 0x4e0007ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* mpu -> dmm */
@@ -103,7 +109,6 @@ static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
        .slave          = &omap44xx_dmm_hwmod,
        .clk            = "l3_div_ck",
        .addr           = omap44xx_dmm_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dmm_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -113,17 +118,12 @@ static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = {
        &omap44xx_mpu__dmm,
 };
 
-static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
-       { .irq = 113 + OMAP44XX_IRQ_GIC_START },
-};
-
 static struct omap_hwmod omap44xx_dmm_hwmod = {
        .name           = "dmm",
        .class          = &omap44xx_dmm_hwmod_class,
+       .mpu_irqs       = omap44xx_dmm_irqs,
        .slaves         = omap44xx_dmm_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap44xx_dmm_slaves),
-       .mpu_irqs       = omap44xx_dmm_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_dmm_irqs),
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
 };
 
@@ -135,7 +135,7 @@ static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = {
        .name   = "emif_fw",
 };
 
-/* emif_fw interface data */
+/* emif_fw */
 /* dmm -> emif_fw */
 static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
        .master         = &omap44xx_dmm_hwmod,
@@ -150,6 +150,7 @@ static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = {
                .pa_end         = 0x4a20c0ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_cfg -> emif_fw */
@@ -158,7 +159,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = {
        .slave          = &omap44xx_emif_fw_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_emif_fw_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_emif_fw_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -184,7 +184,7 @@ static struct omap_hwmod_class omap44xx_l3_hwmod_class = {
        .name   = "l3",
 };
 
-/* l3_instr interface data */
+/* l3_instr */
 /* iva -> l3_instr */
 static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = {
        .master         = &omap44xx_iva_hwmod,
@@ -215,7 +215,13 @@ static struct omap_hwmod omap44xx_l3_instr_hwmod = {
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
 };
 
-/* l3_main_1 interface data */
+/* l3_main_1 */
+static struct omap_hwmod_irq_info omap44xx_l3_main_1_irqs[] = {
+       { .name = "dbg_err", .irq = 9 + OMAP44XX_IRQ_GIC_START },
+       { .name = "app_err", .irq = 10 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
+};
+
 /* dsp -> l3_main_1 */
 static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = {
        .master         = &omap44xx_dsp_hwmod,
@@ -264,18 +270,13 @@ static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* L3 target configuration and error log registers */
-static struct omap_hwmod_irq_info omap44xx_l3_targ_irqs[] = {
-       { .irq = 9  + OMAP44XX_IRQ_GIC_START },
-       { .irq = 10 + OMAP44XX_IRQ_GIC_START },
-};
-
 static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = {
        {
                .pa_start       = 0x44000000,
                .pa_end         = 0x44000fff,
-               .flags          = ADDR_TYPE_RT,
+               .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* mpu -> l3_main_1 */
@@ -284,8 +285,7 @@ static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
        .slave          = &omap44xx_l3_main_1_hwmod,
        .clk            = "l3_div_ck",
        .addr           = omap44xx_l3_main_1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_l3_main_1_addrs),
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+       .user           = OCP_USER_MPU,
 };
 
 /* l3_main_1 slave ports */
@@ -302,14 +302,13 @@ static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = {
 static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
        .name           = "l3_main_1",
        .class          = &omap44xx_l3_hwmod_class,
-       .mpu_irqs       = omap44xx_l3_targ_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_l3_targ_irqs),
+       .mpu_irqs       = omap44xx_l3_main_1_irqs,
        .slaves         = omap44xx_l3_main_1_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap44xx_l3_main_1_slaves),
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
 };
 
-/* l3_main_2 interface data */
+/* l3_main_2 */
 /* dma_system -> l3_main_2 */
 static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
        .master         = &omap44xx_dma_system_hwmod,
@@ -354,8 +353,9 @@ static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = {
        {
                .pa_start       = 0x44800000,
                .pa_end         = 0x44801fff,
-               .flags          = ADDR_TYPE_RT,
+               .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l3_main_1 -> l3_main_2 */
@@ -364,8 +364,7 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
        .slave          = &omap44xx_l3_main_2_hwmod,
        .clk            = "l3_div_ck",
        .addr           = omap44xx_l3_main_2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_l3_main_2_addrs),
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+       .user           = OCP_USER_MPU,
 };
 
 /* l4_cfg -> l3_main_2 */
@@ -404,13 +403,14 @@ static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
 };
 
-/* l3_main_3 interface data */
+/* l3_main_3 */
 static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = {
        {
                .pa_start       = 0x45000000,
                .pa_end         = 0x45000fff,
-               .flags          = ADDR_TYPE_RT,
+               .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l3_main_1 -> l3_main_3 */
@@ -419,8 +419,7 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
        .slave          = &omap44xx_l3_main_3_hwmod,
        .clk            = "l3_div_ck",
        .addr           = omap44xx_l3_main_3_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_l3_main_3_addrs),
-       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+       .user           = OCP_USER_MPU,
 };
 
 /* l3_main_2 -> l3_main_3 */
@@ -462,7 +461,7 @@ static struct omap_hwmod_class omap44xx_l4_hwmod_class = {
        .name   = "l4",
 };
 
-/* l4_abe interface data */
+/* l4_abe */
 /* aess -> l4_abe */
 static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = {
        .master         = &omap44xx_aess_hwmod,
@@ -511,7 +510,7 @@ static struct omap_hwmod omap44xx_l4_abe_hwmod = {
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
 };
 
-/* l4_cfg interface data */
+/* l4_cfg */
 /* l3_main_1 -> l4_cfg */
 static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
        .master         = &omap44xx_l3_main_1_hwmod,
@@ -533,7 +532,7 @@ static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
 };
 
-/* l4_per interface data */
+/* l4_per */
 /* l3_main_2 -> l4_per */
 static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = {
        .master         = &omap44xx_l3_main_2_hwmod,
@@ -555,7 +554,7 @@ static struct omap_hwmod omap44xx_l4_per_hwmod = {
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
 };
 
-/* l4_wkup interface data */
+/* l4_wkup */
 /* l4_cfg -> l4_wkup */
 static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = {
        .master         = &omap44xx_l4_cfg_hwmod,
@@ -585,7 +584,7 @@ static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = {
        .name   = "mpu_bus",
 };
 
-/* mpu_private interface data */
+/* mpu_private */
 /* mpu -> mpu_private */
 static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
        .master         = &omap44xx_mpu_hwmod,
@@ -633,7 +632,9 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = {
  *  gpmc
  *  gpu
  *  hdq1w
- *  hsi
+ *  mcasp
+ *  mpu_c0
+ *  mpu_c1
  *  ocmc_ram
  *  ocp2scp_usb_phy
  *  ocp_wp_noc
@@ -660,7 +661,8 @@ static struct omap_hwmod_class_sysconfig omap44xx_aess_sysc = {
        .sysc_offs      = 0x0010,
        .sysc_flags     = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
        .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-                          MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
+                          MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART |
+                          MSTANDBY_SMART_WKUP),
        .sysc_fields    = &omap_hwmod_sysc_type2,
 };
 
@@ -672,6 +674,7 @@ static struct omap_hwmod_class omap44xx_aess_hwmod_class = {
 /* aess */
 static struct omap_hwmod_irq_info omap44xx_aess_irqs[] = {
        { .irq = 99 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = {
@@ -683,6 +686,7 @@ static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = {
        { .name = "fifo5", .dma_req = 105 + OMAP44XX_DMA_REQ_START },
        { .name = "fifo6", .dma_req = 106 + OMAP44XX_DMA_REQ_START },
        { .name = "fifo7", .dma_req = 107 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 /* aess master ports */
@@ -696,6 +700,7 @@ static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = {
                .pa_end         = 0x401f13ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> aess */
@@ -704,7 +709,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = {
        .slave          = &omap44xx_aess_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_aess_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_aess_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -714,6 +718,7 @@ static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = {
                .pa_end         = 0x490f13ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> aess (dma) */
@@ -722,7 +727,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = {
        .slave          = &omap44xx_aess_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_aess_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_aess_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -736,11 +740,9 @@ static struct omap_hwmod omap44xx_aess_hwmod = {
        .name           = "aess",
        .class          = &omap44xx_aess_hwmod_class,
        .mpu_irqs       = omap44xx_aess_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_aess_irqs),
        .sdma_reqs      = omap44xx_aess_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_aess_sdma_reqs),
        .main_clk       = "aess_fck",
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .clkctrl_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL,
                },
@@ -769,7 +771,7 @@ static struct omap_hwmod_opt_clk bandgap_opt_clks[] = {
 static struct omap_hwmod omap44xx_bandgap_hwmod = {
        .name           = "bandgap",
        .class          = &omap44xx_bandgap_hwmod_class,
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .clkctrl_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL,
                },
@@ -806,6 +808,7 @@ static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = {
                .pa_end         = 0x4a30401f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_wkup -> counter_32k */
@@ -814,7 +817,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = {
        .slave          = &omap44xx_counter_32k_hwmod,
        .clk            = "l4_wkup_clk_mux_ck",
        .addr           = omap44xx_counter_32k_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_counter_32k_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -828,7 +830,7 @@ static struct omap_hwmod omap44xx_counter_32k_hwmod = {
        .class          = &omap44xx_counter_hwmod_class,
        .flags          = HWMOD_SWSUP_SIDLE,
        .main_clk       = "sys_32k_ck",
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .clkctrl_reg = OMAP4430_CM_WKUP_SYNCTIMER_CLKCTRL,
                },
@@ -875,6 +877,7 @@ static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = {
        { .name = "1", .irq = 13 + OMAP44XX_IRQ_GIC_START },
        { .name = "2", .irq = 14 + OMAP44XX_IRQ_GIC_START },
        { .name = "3", .irq = 15 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 /* dma_system master ports */
@@ -888,6 +891,7 @@ static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
                .pa_end         = 0x4a056fff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_cfg -> dma_system */
@@ -896,7 +900,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
        .slave          = &omap44xx_dma_system_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_dma_system_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dma_system_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -909,7 +912,6 @@ static struct omap_hwmod omap44xx_dma_system_hwmod = {
        .name           = "dma_system",
        .class          = &omap44xx_dma_hwmod_class,
        .mpu_irqs       = omap44xx_dma_system_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_dma_system_irqs),
        .main_clk       = "l3_div_ck",
        .prcm = {
                .omap4 = {
@@ -948,10 +950,12 @@ static struct omap_hwmod_class omap44xx_dmic_hwmod_class = {
 static struct omap_hwmod omap44xx_dmic_hwmod;
 static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = {
        { .irq = 114 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = {
        { .dma_req = 66 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = {
@@ -960,6 +964,7 @@ static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = {
                .pa_end         = 0x4012e07f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> dmic */
@@ -968,7 +973,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = {
        .slave          = &omap44xx_dmic_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_dmic_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dmic_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -978,6 +982,7 @@ static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = {
                .pa_end         = 0x4902e07f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> dmic (dma) */
@@ -986,7 +991,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = {
        .slave          = &omap44xx_dmic_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_dmic_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dmic_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -1000,11 +1004,9 @@ static struct omap_hwmod omap44xx_dmic_hwmod = {
        .name           = "dmic",
        .class          = &omap44xx_dmic_hwmod_class,
        .mpu_irqs       = omap44xx_dmic_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_dmic_irqs),
        .sdma_reqs      = omap44xx_dmic_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_dmic_sdma_reqs),
        .main_clk       = "dmic_fck",
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .clkctrl_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL,
                },
@@ -1026,6 +1028,7 @@ static struct omap_hwmod_class omap44xx_dsp_hwmod_class = {
 /* dsp */
 static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = {
        { .irq = 28 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = {
@@ -1082,7 +1085,6 @@ static struct omap_hwmod omap44xx_dsp_hwmod = {
        .name           = "dsp",
        .class          = &omap44xx_dsp_hwmod_class,
        .mpu_irqs       = omap44xx_dsp_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_dsp_irqs),
        .rst_lines      = omap44xx_dsp_resets,
        .rst_lines_cnt  = ARRAY_SIZE(omap44xx_dsp_resets),
        .main_clk       = "dsp_fck",
@@ -1127,6 +1129,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = {
                .pa_end         = 0x5800007f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l3_main_2 -> dss */
@@ -1135,7 +1138,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = {
        .slave          = &omap44xx_dss_hwmod,
        .clk            = "l3_div_ck",
        .addr           = omap44xx_dss_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dss_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -1145,6 +1147,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = {
                .pa_end         = 0x4804007f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> dss */
@@ -1153,7 +1156,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = {
        .slave          = &omap44xx_dss_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_dss_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dss_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -1215,10 +1217,12 @@ static struct omap_hwmod_class omap44xx_dispc_hwmod_class = {
 static struct omap_hwmod omap44xx_dss_dispc_hwmod;
 static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = {
        { .irq = 25 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = {
        { .dma_req = 5 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = {
@@ -1227,6 +1231,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = {
                .pa_end         = 0x58001fff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l3_main_2 -> dss_dispc */
@@ -1235,7 +1240,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = {
        .slave          = &omap44xx_dss_dispc_hwmod,
        .clk            = "l3_div_ck",
        .addr           = omap44xx_dss_dispc_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dss_dispc_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -1245,6 +1249,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = {
                .pa_end         = 0x48041fff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> dss_dispc */
@@ -1253,7 +1258,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = {
        .slave          = &omap44xx_dss_dispc_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_dss_dispc_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dss_dispc_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -1267,9 +1271,7 @@ static struct omap_hwmod omap44xx_dss_dispc_hwmod = {
        .name           = "dss_dispc",
        .class          = &omap44xx_dispc_hwmod_class,
        .mpu_irqs       = omap44xx_dss_dispc_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_dss_dispc_irqs),
        .sdma_reqs      = omap44xx_dss_dispc_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_dss_dispc_sdma_reqs),
        .main_clk       = "dss_fck",
        .prcm = {
                .omap4 = {
@@ -1306,10 +1308,12 @@ static struct omap_hwmod_class omap44xx_dsi_hwmod_class = {
 static struct omap_hwmod omap44xx_dss_dsi1_hwmod;
 static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = {
        { .irq = 53 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = {
        { .dma_req = 74 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = {
@@ -1318,6 +1322,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = {
                .pa_end         = 0x580041ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l3_main_2 -> dss_dsi1 */
@@ -1326,7 +1331,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = {
        .slave          = &omap44xx_dss_dsi1_hwmod,
        .clk            = "l3_div_ck",
        .addr           = omap44xx_dss_dsi1_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dss_dsi1_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -1336,6 +1340,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = {
                .pa_end         = 0x480441ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> dss_dsi1 */
@@ -1344,7 +1349,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = {
        .slave          = &omap44xx_dss_dsi1_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_dss_dsi1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dss_dsi1_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -1358,9 +1362,7 @@ static struct omap_hwmod omap44xx_dss_dsi1_hwmod = {
        .name           = "dss_dsi1",
        .class          = &omap44xx_dsi_hwmod_class,
        .mpu_irqs       = omap44xx_dss_dsi1_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_dss_dsi1_irqs),
        .sdma_reqs      = omap44xx_dss_dsi1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_dss_dsi1_sdma_reqs),
        .main_clk       = "dss_fck",
        .prcm = {
                .omap4 = {
@@ -1376,10 +1378,12 @@ static struct omap_hwmod omap44xx_dss_dsi1_hwmod = {
 static struct omap_hwmod omap44xx_dss_dsi2_hwmod;
 static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = {
        { .irq = 84 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = {
        { .dma_req = 83 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = {
@@ -1388,6 +1392,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = {
                .pa_end         = 0x580051ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l3_main_2 -> dss_dsi2 */
@@ -1396,7 +1401,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = {
        .slave          = &omap44xx_dss_dsi2_hwmod,
        .clk            = "l3_div_ck",
        .addr           = omap44xx_dss_dsi2_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dss_dsi2_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -1406,6 +1410,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = {
                .pa_end         = 0x480451ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> dss_dsi2 */
@@ -1414,7 +1419,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = {
        .slave          = &omap44xx_dss_dsi2_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_dss_dsi2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dss_dsi2_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -1428,9 +1432,7 @@ static struct omap_hwmod omap44xx_dss_dsi2_hwmod = {
        .name           = "dss_dsi2",
        .class          = &omap44xx_dsi_hwmod_class,
        .mpu_irqs       = omap44xx_dss_dsi2_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_dss_dsi2_irqs),
        .sdma_reqs      = omap44xx_dss_dsi2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_dss_dsi2_sdma_reqs),
        .main_clk       = "dss_fck",
        .prcm = {
                .omap4 = {
@@ -1466,10 +1468,12 @@ static struct omap_hwmod_class omap44xx_hdmi_hwmod_class = {
 static struct omap_hwmod omap44xx_dss_hdmi_hwmod;
 static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = {
        { .irq = 101 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = {
        { .dma_req = 75 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = {
@@ -1478,6 +1482,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = {
                .pa_end         = 0x58006fff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l3_main_2 -> dss_hdmi */
@@ -1486,7 +1491,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = {
        .slave          = &omap44xx_dss_hdmi_hwmod,
        .clk            = "l3_div_ck",
        .addr           = omap44xx_dss_hdmi_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dss_hdmi_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -1496,6 +1500,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = {
                .pa_end         = 0x48046fff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> dss_hdmi */
@@ -1504,7 +1509,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = {
        .slave          = &omap44xx_dss_hdmi_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_dss_hdmi_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dss_hdmi_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -1518,9 +1522,7 @@ static struct omap_hwmod omap44xx_dss_hdmi_hwmod = {
        .name           = "dss_hdmi",
        .class          = &omap44xx_hdmi_hwmod_class,
        .mpu_irqs       = omap44xx_dss_hdmi_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_dss_hdmi_irqs),
        .sdma_reqs      = omap44xx_dss_hdmi_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_dss_hdmi_sdma_reqs),
        .main_clk       = "dss_fck",
        .prcm = {
                .omap4 = {
@@ -1556,6 +1558,7 @@ static struct omap_hwmod_class omap44xx_rfbi_hwmod_class = {
 static struct omap_hwmod omap44xx_dss_rfbi_hwmod;
 static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = {
        { .dma_req = 13 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = {
@@ -1564,6 +1567,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = {
                .pa_end         = 0x580020ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l3_main_2 -> dss_rfbi */
@@ -1572,7 +1576,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = {
        .slave          = &omap44xx_dss_rfbi_hwmod,
        .clk            = "l3_div_ck",
        .addr           = omap44xx_dss_rfbi_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dss_rfbi_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -1582,6 +1585,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = {
                .pa_end         = 0x480420ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> dss_rfbi */
@@ -1590,7 +1594,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = {
        .slave          = &omap44xx_dss_rfbi_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_dss_rfbi_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dss_rfbi_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -1604,7 +1607,6 @@ static struct omap_hwmod omap44xx_dss_rfbi_hwmod = {
        .name           = "dss_rfbi",
        .class          = &omap44xx_rfbi_hwmod_class,
        .sdma_reqs      = omap44xx_dss_rfbi_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_dss_rfbi_sdma_reqs),
        .main_clk       = "dss_fck",
        .prcm = {
                .omap4 = {
@@ -1633,6 +1635,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = {
                .pa_end         = 0x580030ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l3_main_2 -> dss_venc */
@@ -1641,7 +1644,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = {
        .slave          = &omap44xx_dss_venc_hwmod,
        .clk            = "l3_div_ck",
        .addr           = omap44xx_dss_venc_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dss_venc_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -1651,6 +1653,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = {
                .pa_end         = 0x480430ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> dss_venc */
@@ -1659,7 +1662,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = {
        .slave          = &omap44xx_dss_venc_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_dss_venc_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_dss_venc_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -1716,6 +1718,7 @@ static struct omap_gpio_dev_attr gpio_dev_attr = {
 static struct omap_hwmod omap44xx_gpio1_hwmod;
 static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = {
        { .irq = 29 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
@@ -1724,6 +1727,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
                .pa_end         = 0x4a3101ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_wkup -> gpio1 */
@@ -1732,7 +1736,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = {
        .slave          = &omap44xx_gpio1_hwmod,
        .clk            = "l4_wkup_clk_mux_ck",
        .addr           = omap44xx_gpio1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_gpio1_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1749,7 +1752,6 @@ static struct omap_hwmod omap44xx_gpio1_hwmod = {
        .name           = "gpio1",
        .class          = &omap44xx_gpio_hwmod_class,
        .mpu_irqs       = omap44xx_gpio1_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_gpio1_irqs),
        .main_clk       = "gpio1_ick",
        .prcm = {
                .omap4 = {
@@ -1768,6 +1770,7 @@ static struct omap_hwmod omap44xx_gpio1_hwmod = {
 static struct omap_hwmod omap44xx_gpio2_hwmod;
 static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = {
        { .irq = 30 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
@@ -1776,6 +1779,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
                .pa_end         = 0x480551ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> gpio2 */
@@ -1784,7 +1788,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = {
        .slave          = &omap44xx_gpio2_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_gpio2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_gpio2_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1802,7 +1805,6 @@ static struct omap_hwmod omap44xx_gpio2_hwmod = {
        .class          = &omap44xx_gpio_hwmod_class,
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap44xx_gpio2_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_gpio2_irqs),
        .main_clk       = "gpio2_ick",
        .prcm = {
                .omap4 = {
@@ -1821,6 +1823,7 @@ static struct omap_hwmod omap44xx_gpio2_hwmod = {
 static struct omap_hwmod omap44xx_gpio3_hwmod;
 static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = {
        { .irq = 31 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
@@ -1829,6 +1832,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
                .pa_end         = 0x480571ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> gpio3 */
@@ -1837,7 +1841,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = {
        .slave          = &omap44xx_gpio3_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_gpio3_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_gpio3_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1855,7 +1858,6 @@ static struct omap_hwmod omap44xx_gpio3_hwmod = {
        .class          = &omap44xx_gpio_hwmod_class,
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap44xx_gpio3_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_gpio3_irqs),
        .main_clk       = "gpio3_ick",
        .prcm = {
                .omap4 = {
@@ -1874,6 +1876,7 @@ static struct omap_hwmod omap44xx_gpio3_hwmod = {
 static struct omap_hwmod omap44xx_gpio4_hwmod;
 static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = {
        { .irq = 32 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
@@ -1882,6 +1885,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
                .pa_end         = 0x480591ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> gpio4 */
@@ -1890,7 +1894,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = {
        .slave          = &omap44xx_gpio4_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_gpio4_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_gpio4_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1908,7 +1911,6 @@ static struct omap_hwmod omap44xx_gpio4_hwmod = {
        .class          = &omap44xx_gpio_hwmod_class,
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap44xx_gpio4_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_gpio4_irqs),
        .main_clk       = "gpio4_ick",
        .prcm = {
                .omap4 = {
@@ -1927,6 +1929,7 @@ static struct omap_hwmod omap44xx_gpio4_hwmod = {
 static struct omap_hwmod omap44xx_gpio5_hwmod;
 static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = {
        { .irq = 33 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
@@ -1935,6 +1938,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
                .pa_end         = 0x4805b1ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> gpio5 */
@@ -1943,7 +1947,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = {
        .slave          = &omap44xx_gpio5_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_gpio5_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_gpio5_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1961,7 +1964,6 @@ static struct omap_hwmod omap44xx_gpio5_hwmod = {
        .class          = &omap44xx_gpio_hwmod_class,
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap44xx_gpio5_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_gpio5_irqs),
        .main_clk       = "gpio5_ick",
        .prcm = {
                .omap4 = {
@@ -1980,6 +1982,7 @@ static struct omap_hwmod omap44xx_gpio5_hwmod = {
 static struct omap_hwmod omap44xx_gpio6_hwmod;
 static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = {
        { .irq = 34 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
@@ -1988,6 +1991,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
                .pa_end         = 0x4805d1ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> gpio6 */
@@ -1996,7 +2000,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
        .slave          = &omap44xx_gpio6_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_gpio6_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_gpio6_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2014,7 +2017,6 @@ static struct omap_hwmod omap44xx_gpio6_hwmod = {
        .class          = &omap44xx_gpio_hwmod_class,
        .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .mpu_irqs       = omap44xx_gpio6_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_gpio6_irqs),
        .main_clk       = "gpio6_ick",
        .prcm = {
                .omap4 = {
@@ -2044,7 +2046,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_hsi_sysc = {
                           SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
        .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
                           SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
-                          MSTANDBY_SMART),
+                          MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
        .sysc_fields    = &omap_hwmod_sysc_type1,
 };
 
@@ -2058,6 +2060,7 @@ static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = {
        { .name = "mpu_p1", .irq = 67 + OMAP44XX_IRQ_GIC_START },
        { .name = "mpu_p2", .irq = 68 + OMAP44XX_IRQ_GIC_START },
        { .name = "mpu_dma", .irq = 71 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 /* hsi master ports */
@@ -2071,6 +2074,7 @@ static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = {
                .pa_end         = 0x4a05bfff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_cfg -> hsi */
@@ -2079,7 +2083,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = {
        .slave          = &omap44xx_hsi_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_hsi_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_hsi_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2092,9 +2095,8 @@ static struct omap_hwmod omap44xx_hsi_hwmod = {
        .name           = "hsi",
        .class          = &omap44xx_hsi_hwmod_class,
        .mpu_irqs       = omap44xx_hsi_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_hsi_irqs),
        .main_clk       = "hsi_fck",
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .clkctrl_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL,
                },
@@ -2131,11 +2133,13 @@ static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
 static struct omap_hwmod omap44xx_i2c1_hwmod;
 static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = {
        { .irq = 56 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = {
        { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
@@ -2144,6 +2148,7 @@ static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
                .pa_end         = 0x480700ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> i2c1 */
@@ -2152,7 +2157,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = {
        .slave          = &omap44xx_i2c1_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_i2c1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_i2c1_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2166,9 +2170,7 @@ static struct omap_hwmod omap44xx_i2c1_hwmod = {
        .class          = &omap44xx_i2c_hwmod_class,
        .flags          = HWMOD_INIT_NO_RESET,
        .mpu_irqs       = omap44xx_i2c1_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_i2c1_irqs),
        .sdma_reqs      = omap44xx_i2c1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_i2c1_sdma_reqs),
        .main_clk       = "i2c1_fck",
        .prcm = {
                .omap4 = {
@@ -2184,11 +2186,13 @@ static struct omap_hwmod omap44xx_i2c1_hwmod = {
 static struct omap_hwmod omap44xx_i2c2_hwmod;
 static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = {
        { .irq = 57 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = {
        { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
@@ -2197,6 +2201,7 @@ static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
                .pa_end         = 0x480720ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> i2c2 */
@@ -2205,7 +2210,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = {
        .slave          = &omap44xx_i2c2_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_i2c2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_i2c2_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2219,9 +2223,7 @@ static struct omap_hwmod omap44xx_i2c2_hwmod = {
        .class          = &omap44xx_i2c_hwmod_class,
        .flags          = HWMOD_INIT_NO_RESET,
        .mpu_irqs       = omap44xx_i2c2_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_i2c2_irqs),
        .sdma_reqs      = omap44xx_i2c2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_i2c2_sdma_reqs),
        .main_clk       = "i2c2_fck",
        .prcm = {
                .omap4 = {
@@ -2237,11 +2239,13 @@ static struct omap_hwmod omap44xx_i2c2_hwmod = {
 static struct omap_hwmod omap44xx_i2c3_hwmod;
 static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = {
        { .irq = 61 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = {
        { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
@@ -2250,6 +2254,7 @@ static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
                .pa_end         = 0x480600ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> i2c3 */
@@ -2258,7 +2263,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = {
        .slave          = &omap44xx_i2c3_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_i2c3_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_i2c3_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2272,9 +2276,7 @@ static struct omap_hwmod omap44xx_i2c3_hwmod = {
        .class          = &omap44xx_i2c_hwmod_class,
        .flags          = HWMOD_INIT_NO_RESET,
        .mpu_irqs       = omap44xx_i2c3_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_i2c3_irqs),
        .sdma_reqs      = omap44xx_i2c3_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_i2c3_sdma_reqs),
        .main_clk       = "i2c3_fck",
        .prcm = {
                .omap4 = {
@@ -2290,11 +2292,13 @@ static struct omap_hwmod omap44xx_i2c3_hwmod = {
 static struct omap_hwmod omap44xx_i2c4_hwmod;
 static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = {
        { .irq = 62 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = {
        { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
@@ -2303,6 +2307,7 @@ static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
                .pa_end         = 0x483500ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> i2c4 */
@@ -2311,7 +2316,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = {
        .slave          = &omap44xx_i2c4_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_i2c4_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_i2c4_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2325,9 +2329,7 @@ static struct omap_hwmod omap44xx_i2c4_hwmod = {
        .class          = &omap44xx_i2c_hwmod_class,
        .flags          = HWMOD_INIT_NO_RESET,
        .mpu_irqs       = omap44xx_i2c4_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_i2c4_irqs),
        .sdma_reqs      = omap44xx_i2c4_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_i2c4_sdma_reqs),
        .main_clk       = "i2c4_fck",
        .prcm = {
                .omap4 = {
@@ -2351,6 +2353,7 @@ static struct omap_hwmod_class omap44xx_ipu_hwmod_class = {
 /* ipu */
 static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = {
        { .irq = 100 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = {
@@ -2390,7 +2393,7 @@ static struct omap_hwmod omap44xx_ipu_c0_hwmod = {
        .flags          = HWMOD_INIT_NO_RESET,
        .rst_lines      = omap44xx_ipu_c0_resets,
        .rst_lines_cnt  = ARRAY_SIZE(omap44xx_ipu_c0_resets),
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL,
                },
@@ -2405,7 +2408,7 @@ static struct omap_hwmod omap44xx_ipu_c1_hwmod = {
        .flags          = HWMOD_INIT_NO_RESET,
        .rst_lines      = omap44xx_ipu_c1_resets,
        .rst_lines_cnt  = ARRAY_SIZE(omap44xx_ipu_c1_resets),
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL,
                },
@@ -2417,11 +2420,10 @@ static struct omap_hwmod omap44xx_ipu_hwmod = {
        .name           = "ipu",
        .class          = &omap44xx_ipu_hwmod_class,
        .mpu_irqs       = omap44xx_ipu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_ipu_irqs),
        .rst_lines      = omap44xx_ipu_resets,
        .rst_lines_cnt  = ARRAY_SIZE(omap44xx_ipu_resets),
        .main_clk       = "ipu_fck",
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .clkctrl_reg = OMAP4430_CM_DUCATI_DUCATI_CLKCTRL,
                        .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL,
@@ -2446,7 +2448,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = {
                           SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
        .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
                           SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
-                          MSTANDBY_SMART),
+                          MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
        .sysc_fields    = &omap_hwmod_sysc_type2,
 };
 
@@ -2458,6 +2460,7 @@ static struct omap_hwmod_class omap44xx_iss_hwmod_class = {
 /* iss */
 static struct omap_hwmod_irq_info omap44xx_iss_irqs[] = {
        { .irq = 24 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = {
@@ -2465,6 +2468,7 @@ static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = {
        { .name = "2", .dma_req = 9 + OMAP44XX_DMA_REQ_START },
        { .name = "3", .dma_req = 11 + OMAP44XX_DMA_REQ_START },
        { .name = "4", .dma_req = 12 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 /* iss master ports */
@@ -2478,6 +2482,7 @@ static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = {
                .pa_end         = 0x520000ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l3_main_2 -> iss */
@@ -2486,7 +2491,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = {
        .slave          = &omap44xx_iss_hwmod,
        .clk            = "l3_div_ck",
        .addr           = omap44xx_iss_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_iss_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2503,11 +2507,9 @@ static struct omap_hwmod omap44xx_iss_hwmod = {
        .name           = "iss",
        .class          = &omap44xx_iss_hwmod_class,
        .mpu_irqs       = omap44xx_iss_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_iss_irqs),
        .sdma_reqs      = omap44xx_iss_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_iss_sdma_reqs),
        .main_clk       = "iss_fck",
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .clkctrl_reg = OMAP4430_CM_CAM_ISS_CLKCTRL,
                },
@@ -2535,6 +2537,7 @@ static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = {
        { .name = "sync_1", .irq = 103 + OMAP44XX_IRQ_GIC_START },
        { .name = "sync_0", .irq = 104 + OMAP44XX_IRQ_GIC_START },
        { .name = "mailbox_0", .irq = 107 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_rst_info omap44xx_iva_resets[] = {
@@ -2561,6 +2564,7 @@ static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
                .pa_end         = 0x5a07ffff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l3_main_2 -> iva */
@@ -2569,7 +2573,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
        .slave          = &omap44xx_iva_hwmod,
        .clk            = "l3_div_ck",
        .addr           = omap44xx_iva_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_iva_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -2613,7 +2616,6 @@ static struct omap_hwmod omap44xx_iva_hwmod = {
        .name           = "iva",
        .class          = &omap44xx_iva_hwmod_class,
        .mpu_irqs       = omap44xx_iva_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_iva_irqs),
        .rst_lines      = omap44xx_iva_resets,
        .rst_lines_cnt  = ARRAY_SIZE(omap44xx_iva_resets),
        .main_clk       = "iva_fck",
@@ -2656,6 +2658,7 @@ static struct omap_hwmod_class omap44xx_kbd_hwmod_class = {
 static struct omap_hwmod omap44xx_kbd_hwmod;
 static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = {
        { .irq = 120 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = {
@@ -2664,6 +2667,7 @@ static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = {
                .pa_end         = 0x4a31c07f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_wkup -> kbd */
@@ -2672,7 +2676,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = {
        .slave          = &omap44xx_kbd_hwmod,
        .clk            = "l4_wkup_clk_mux_ck",
        .addr           = omap44xx_kbd_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_kbd_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2685,9 +2688,8 @@ static struct omap_hwmod omap44xx_kbd_hwmod = {
        .name           = "kbd",
        .class          = &omap44xx_kbd_hwmod_class,
        .mpu_irqs       = omap44xx_kbd_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_kbd_irqs),
        .main_clk       = "kbd_fck",
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .clkctrl_reg = OMAP4430_CM_WKUP_KEYBOARD_CLKCTRL,
                },
@@ -2721,6 +2723,7 @@ static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = {
 static struct omap_hwmod omap44xx_mailbox_hwmod;
 static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
        { .irq = 26 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
@@ -2729,6 +2732,7 @@ static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
                .pa_end         = 0x4a0f41ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_cfg -> mailbox */
@@ -2737,7 +2741,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = {
        .slave          = &omap44xx_mailbox_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_mailbox_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mailbox_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2750,8 +2753,7 @@ static struct omap_hwmod omap44xx_mailbox_hwmod = {
        .name           = "mailbox",
        .class          = &omap44xx_mailbox_hwmod_class,
        .mpu_irqs       = omap44xx_mailbox_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mailbox_irqs),
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .clkctrl_reg = OMAP4430_CM_L4CFG_MAILBOX_CLKCTRL,
                },
@@ -2784,11 +2786,13 @@ static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = {
 static struct omap_hwmod omap44xx_mcbsp1_hwmod;
 static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = {
        { .irq = 17 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = {
        { .name = "tx", .dma_req = 32 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 33 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
@@ -2798,6 +2802,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
                .pa_end         = 0x401220ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> mcbsp1 */
@@ -2806,7 +2811,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
        .slave          = &omap44xx_mcbsp1_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_mcbsp1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mcbsp1_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -2817,6 +2821,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
                .pa_end         = 0x490220ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> mcbsp1 (dma) */
@@ -2825,7 +2830,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = {
        .slave          = &omap44xx_mcbsp1_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_mcbsp1_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mcbsp1_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -2839,9 +2843,7 @@ static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
        .name           = "mcbsp1",
        .class          = &omap44xx_mcbsp_hwmod_class,
        .mpu_irqs       = omap44xx_mcbsp1_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mcbsp1_irqs),
        .sdma_reqs      = omap44xx_mcbsp1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_mcbsp1_sdma_reqs),
        .main_clk       = "mcbsp1_fck",
        .prcm = {
                .omap4 = {
@@ -2857,11 +2859,13 @@ static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
 static struct omap_hwmod omap44xx_mcbsp2_hwmod;
 static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = {
        { .irq = 22 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = {
        { .name = "tx", .dma_req = 16 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 17 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
@@ -2871,6 +2875,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
                .pa_end         = 0x401240ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> mcbsp2 */
@@ -2879,7 +2884,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
        .slave          = &omap44xx_mcbsp2_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_mcbsp2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mcbsp2_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -2890,6 +2894,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
                .pa_end         = 0x490240ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> mcbsp2 (dma) */
@@ -2898,7 +2903,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = {
        .slave          = &omap44xx_mcbsp2_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_mcbsp2_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mcbsp2_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -2912,9 +2916,7 @@ static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
        .name           = "mcbsp2",
        .class          = &omap44xx_mcbsp_hwmod_class,
        .mpu_irqs       = omap44xx_mcbsp2_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mcbsp2_irqs),
        .sdma_reqs      = omap44xx_mcbsp2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_mcbsp2_sdma_reqs),
        .main_clk       = "mcbsp2_fck",
        .prcm = {
                .omap4 = {
@@ -2930,11 +2932,13 @@ static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
 static struct omap_hwmod omap44xx_mcbsp3_hwmod;
 static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = {
        { .irq = 23 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = {
        { .name = "tx", .dma_req = 18 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 19 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
@@ -2944,6 +2948,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
                .pa_end         = 0x401260ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> mcbsp3 */
@@ -2952,7 +2957,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
        .slave          = &omap44xx_mcbsp3_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_mcbsp3_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mcbsp3_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -2963,6 +2967,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
                .pa_end         = 0x490260ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> mcbsp3 (dma) */
@@ -2971,7 +2976,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = {
        .slave          = &omap44xx_mcbsp3_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_mcbsp3_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mcbsp3_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -2985,9 +2989,7 @@ static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
        .name           = "mcbsp3",
        .class          = &omap44xx_mcbsp_hwmod_class,
        .mpu_irqs       = omap44xx_mcbsp3_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mcbsp3_irqs),
        .sdma_reqs      = omap44xx_mcbsp3_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_mcbsp3_sdma_reqs),
        .main_clk       = "mcbsp3_fck",
        .prcm = {
                .omap4 = {
@@ -3003,11 +3005,13 @@ static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
 static struct omap_hwmod omap44xx_mcbsp4_hwmod;
 static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = {
        { .irq = 16 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = {
        { .name = "tx", .dma_req = 30 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 31 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
@@ -3016,6 +3020,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
                .pa_end         = 0x480960ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> mcbsp4 */
@@ -3024,7 +3029,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = {
        .slave          = &omap44xx_mcbsp4_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_mcbsp4_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mcbsp4_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -3037,9 +3041,7 @@ static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
        .name           = "mcbsp4",
        .class          = &omap44xx_mcbsp_hwmod_class,
        .mpu_irqs       = omap44xx_mcbsp4_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mcbsp4_irqs),
        .sdma_reqs      = omap44xx_mcbsp4_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_mcbsp4_sdma_reqs),
        .main_clk       = "mcbsp4_fck",
        .prcm = {
                .omap4 = {
@@ -3076,11 +3078,13 @@ static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = {
 static struct omap_hwmod omap44xx_mcpdm_hwmod;
 static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = {
        { .irq = 112 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = {
        { .name = "up_link", .dma_req = 64 + OMAP44XX_DMA_REQ_START },
        { .name = "dn_link", .dma_req = 65 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
@@ -3089,6 +3093,7 @@ static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
                .pa_end         = 0x4013207f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> mcpdm */
@@ -3097,7 +3102,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
        .slave          = &omap44xx_mcpdm_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_mcpdm_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mcpdm_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -3107,6 +3111,7 @@ static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = {
                .pa_end         = 0x4903207f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> mcpdm (dma) */
@@ -3115,7 +3120,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = {
        .slave          = &omap44xx_mcpdm_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_mcpdm_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mcpdm_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -3129,11 +3133,9 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = {
        .name           = "mcpdm",
        .class          = &omap44xx_mcpdm_hwmod_class,
        .mpu_irqs       = omap44xx_mcpdm_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mcpdm_irqs),
        .sdma_reqs      = omap44xx_mcpdm_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_mcpdm_sdma_reqs),
        .main_clk       = "mcpdm_fck",
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .clkctrl_reg = OMAP4430_CM1_ABE_PDM_CLKCTRL,
                },
@@ -3169,6 +3171,7 @@ static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = {
 static struct omap_hwmod omap44xx_mcspi1_hwmod;
 static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = {
        { .irq = 65 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = {
@@ -3180,6 +3183,7 @@ static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = {
        { .name = "rx2", .dma_req = 39 + OMAP44XX_DMA_REQ_START },
        { .name = "tx3", .dma_req = 40 + OMAP44XX_DMA_REQ_START },
        { .name = "rx3", .dma_req = 41 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = {
@@ -3188,6 +3192,7 @@ static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = {
                .pa_end         = 0x480981ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> mcspi1 */
@@ -3196,7 +3201,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = {
        .slave          = &omap44xx_mcspi1_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_mcspi1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mcspi1_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -3214,9 +3218,7 @@ static struct omap_hwmod omap44xx_mcspi1_hwmod = {
        .name           = "mcspi1",
        .class          = &omap44xx_mcspi_hwmod_class,
        .mpu_irqs       = omap44xx_mcspi1_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mcspi1_irqs),
        .sdma_reqs      = omap44xx_mcspi1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_mcspi1_sdma_reqs),
        .main_clk       = "mcspi1_fck",
        .prcm = {
                .omap4 = {
@@ -3233,6 +3235,7 @@ static struct omap_hwmod omap44xx_mcspi1_hwmod = {
 static struct omap_hwmod omap44xx_mcspi2_hwmod;
 static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = {
        { .irq = 66 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = {
@@ -3240,6 +3243,7 @@ static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = {
        { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START },
        { .name = "tx1", .dma_req = 44 + OMAP44XX_DMA_REQ_START },
        { .name = "rx1", .dma_req = 45 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = {
@@ -3248,6 +3252,7 @@ static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = {
                .pa_end         = 0x4809a1ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> mcspi2 */
@@ -3256,7 +3261,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = {
        .slave          = &omap44xx_mcspi2_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_mcspi2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mcspi2_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -3274,9 +3278,7 @@ static struct omap_hwmod omap44xx_mcspi2_hwmod = {
        .name           = "mcspi2",
        .class          = &omap44xx_mcspi_hwmod_class,
        .mpu_irqs       = omap44xx_mcspi2_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mcspi2_irqs),
        .sdma_reqs      = omap44xx_mcspi2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_mcspi2_sdma_reqs),
        .main_clk       = "mcspi2_fck",
        .prcm = {
                .omap4 = {
@@ -3293,6 +3295,7 @@ static struct omap_hwmod omap44xx_mcspi2_hwmod = {
 static struct omap_hwmod omap44xx_mcspi3_hwmod;
 static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = {
        { .irq = 91 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = {
@@ -3300,6 +3303,7 @@ static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = {
        { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START },
        { .name = "tx1", .dma_req = 22 + OMAP44XX_DMA_REQ_START },
        { .name = "rx1", .dma_req = 23 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = {
@@ -3308,6 +3312,7 @@ static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = {
                .pa_end         = 0x480b81ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> mcspi3 */
@@ -3316,7 +3321,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = {
        .slave          = &omap44xx_mcspi3_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_mcspi3_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mcspi3_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -3334,9 +3338,7 @@ static struct omap_hwmod omap44xx_mcspi3_hwmod = {
        .name           = "mcspi3",
        .class          = &omap44xx_mcspi_hwmod_class,
        .mpu_irqs       = omap44xx_mcspi3_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mcspi3_irqs),
        .sdma_reqs      = omap44xx_mcspi3_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_mcspi3_sdma_reqs),
        .main_clk       = "mcspi3_fck",
        .prcm = {
                .omap4 = {
@@ -3353,11 +3355,13 @@ static struct omap_hwmod omap44xx_mcspi3_hwmod = {
 static struct omap_hwmod omap44xx_mcspi4_hwmod;
 static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = {
        { .irq = 48 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = {
        { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START },
        { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = {
@@ -3366,6 +3370,7 @@ static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = {
                .pa_end         = 0x480ba1ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> mcspi4 */
@@ -3374,7 +3379,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = {
        .slave          = &omap44xx_mcspi4_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_mcspi4_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mcspi4_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -3392,9 +3396,7 @@ static struct omap_hwmod omap44xx_mcspi4_hwmod = {
        .name           = "mcspi4",
        .class          = &omap44xx_mcspi_hwmod_class,
        .mpu_irqs       = omap44xx_mcspi4_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mcspi4_irqs),
        .sdma_reqs      = omap44xx_mcspi4_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_mcspi4_sdma_reqs),
        .main_clk       = "mcspi4_fck",
        .prcm = {
                .omap4 = {
@@ -3420,7 +3422,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_mmc_sysc = {
                           SYSC_HAS_SOFTRESET),
        .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
                           SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
-                          MSTANDBY_SMART),
+                          MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
        .sysc_fields    = &omap_hwmod_sysc_type2,
 };
 
@@ -3430,14 +3432,15 @@ static struct omap_hwmod_class omap44xx_mmc_hwmod_class = {
 };
 
 /* mmc1 */
-
 static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = {
        { .irq = 83 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = {
        { .name = "tx", .dma_req = 60 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 61 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 /* mmc1 master ports */
@@ -3451,6 +3454,7 @@ static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = {
                .pa_end         = 0x4809c3ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> mmc1 */
@@ -3459,7 +3463,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = {
        .slave          = &omap44xx_mmc1_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_mmc1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mmc1_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -3477,11 +3480,9 @@ static struct omap_hwmod omap44xx_mmc1_hwmod = {
        .name           = "mmc1",
        .class          = &omap44xx_mmc_hwmod_class,
        .mpu_irqs       = omap44xx_mmc1_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mmc1_irqs),
        .sdma_reqs      = omap44xx_mmc1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_mmc1_sdma_reqs),
        .main_clk       = "mmc1_fck",
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .clkctrl_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL,
                },
@@ -3497,11 +3498,13 @@ static struct omap_hwmod omap44xx_mmc1_hwmod = {
 /* mmc2 */
 static struct omap_hwmod_irq_info omap44xx_mmc2_irqs[] = {
        { .irq = 86 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = {
        { .name = "tx", .dma_req = 46 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 47 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 /* mmc2 master ports */
@@ -3515,6 +3518,7 @@ static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = {
                .pa_end         = 0x480b43ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> mmc2 */
@@ -3523,7 +3527,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = {
        .slave          = &omap44xx_mmc2_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_mmc2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mmc2_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -3536,11 +3539,9 @@ static struct omap_hwmod omap44xx_mmc2_hwmod = {
        .name           = "mmc2",
        .class          = &omap44xx_mmc_hwmod_class,
        .mpu_irqs       = omap44xx_mmc2_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mmc2_irqs),
        .sdma_reqs      = omap44xx_mmc2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_mmc2_sdma_reqs),
        .main_clk       = "mmc2_fck",
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .clkctrl_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL,
                },
@@ -3556,11 +3557,13 @@ static struct omap_hwmod omap44xx_mmc2_hwmod = {
 static struct omap_hwmod omap44xx_mmc3_hwmod;
 static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = {
        { .irq = 94 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = {
        { .name = "tx", .dma_req = 76 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 77 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = {
@@ -3569,6 +3572,7 @@ static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = {
                .pa_end         = 0x480ad3ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> mmc3 */
@@ -3577,7 +3581,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = {
        .slave          = &omap44xx_mmc3_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_mmc3_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mmc3_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -3590,11 +3593,9 @@ static struct omap_hwmod omap44xx_mmc3_hwmod = {
        .name           = "mmc3",
        .class          = &omap44xx_mmc_hwmod_class,
        .mpu_irqs       = omap44xx_mmc3_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mmc3_irqs),
        .sdma_reqs      = omap44xx_mmc3_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_mmc3_sdma_reqs),
        .main_clk       = "mmc3_fck",
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD3_CLKCTRL,
                },
@@ -3608,11 +3609,13 @@ static struct omap_hwmod omap44xx_mmc3_hwmod = {
 static struct omap_hwmod omap44xx_mmc4_hwmod;
 static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = {
        { .irq = 96 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = {
        { .name = "tx", .dma_req = 56 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 57 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = {
@@ -3621,6 +3624,7 @@ static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = {
                .pa_end         = 0x480d13ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> mmc4 */
@@ -3629,7 +3633,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = {
        .slave          = &omap44xx_mmc4_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_mmc4_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mmc4_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -3642,11 +3645,10 @@ static struct omap_hwmod omap44xx_mmc4_hwmod = {
        .name           = "mmc4",
        .class          = &omap44xx_mmc_hwmod_class,
        .mpu_irqs       = omap44xx_mmc4_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mmc4_irqs),
+
        .sdma_reqs      = omap44xx_mmc4_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_mmc4_sdma_reqs),
        .main_clk       = "mmc4_fck",
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD4_CLKCTRL,
                },
@@ -3660,11 +3662,13 @@ static struct omap_hwmod omap44xx_mmc4_hwmod = {
 static struct omap_hwmod omap44xx_mmc5_hwmod;
 static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = {
        { .irq = 59 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = {
        { .name = "tx", .dma_req = 58 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 59 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = {
@@ -3673,6 +3677,7 @@ static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = {
                .pa_end         = 0x480d53ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> mmc5 */
@@ -3681,7 +3686,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = {
        .slave          = &omap44xx_mmc5_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_mmc5_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_mmc5_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -3694,11 +3698,9 @@ static struct omap_hwmod omap44xx_mmc5_hwmod = {
        .name           = "mmc5",
        .class          = &omap44xx_mmc_hwmod_class,
        .mpu_irqs       = omap44xx_mmc5_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mmc5_irqs),
        .sdma_reqs      = omap44xx_mmc5_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_mmc5_sdma_reqs),
        .main_clk       = "mmc5_fck",
-       .prcm           = {
+       .prcm = {
                .omap4 = {
                        .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD5_CLKCTRL,
                },
@@ -3722,6 +3724,7 @@ static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
        { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START },
        { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START },
        { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 /* mpu master ports */
@@ -3734,9 +3737,8 @@ static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = {
 static struct omap_hwmod omap44xx_mpu_hwmod = {
        .name           = "mpu",
        .class          = &omap44xx_mpu_hwmod_class,
-       .flags          = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
+       .flags          = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
        .mpu_irqs       = omap44xx_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mpu_irqs),
        .main_clk       = "dpll_mpu_m2_ck",
        .prcm = {
                .omap4 = {
@@ -3778,6 +3780,7 @@ static struct omap_hwmod_class omap44xx_smartreflex_hwmod_class = {
 static struct omap_hwmod omap44xx_smartreflex_core_hwmod;
 static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = {
        { .irq = 19 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
@@ -3786,6 +3789,7 @@ static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
                .pa_end         = 0x4a0dd03f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_cfg -> smartreflex_core */
@@ -3794,7 +3798,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = {
        .slave          = &omap44xx_smartreflex_core_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_smartreflex_core_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_smartreflex_core_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -3807,7 +3810,7 @@ static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
        .name           = "smartreflex_core",
        .class          = &omap44xx_smartreflex_hwmod_class,
        .mpu_irqs       = omap44xx_smartreflex_core_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_smartreflex_core_irqs),
+
        .main_clk       = "smartreflex_core_fck",
        .vdd_name       = "core",
        .prcm = {
@@ -3824,6 +3827,7 @@ static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
 static struct omap_hwmod omap44xx_smartreflex_iva_hwmod;
 static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = {
        { .irq = 102 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = {
@@ -3832,6 +3836,7 @@ static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = {
                .pa_end         = 0x4a0db03f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_cfg -> smartreflex_iva */
@@ -3840,7 +3845,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = {
        .slave          = &omap44xx_smartreflex_iva_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_smartreflex_iva_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_smartreflex_iva_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -3853,7 +3857,6 @@ static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
        .name           = "smartreflex_iva",
        .class          = &omap44xx_smartreflex_hwmod_class,
        .mpu_irqs       = omap44xx_smartreflex_iva_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_smartreflex_iva_irqs),
        .main_clk       = "smartreflex_iva_fck",
        .vdd_name       = "iva",
        .prcm = {
@@ -3870,6 +3873,7 @@ static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
 static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod;
 static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = {
        { .irq = 18 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = {
@@ -3878,6 +3882,7 @@ static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = {
                .pa_end         = 0x4a0d903f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_cfg -> smartreflex_mpu */
@@ -3886,7 +3891,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = {
        .slave          = &omap44xx_smartreflex_mpu_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_smartreflex_mpu_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_smartreflex_mpu_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -3899,7 +3903,6 @@ static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = {
        .name           = "smartreflex_mpu",
        .class          = &omap44xx_smartreflex_hwmod_class,
        .mpu_irqs       = omap44xx_smartreflex_mpu_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_smartreflex_mpu_irqs),
        .main_clk       = "smartreflex_mpu_fck",
        .vdd_name       = "mpu",
        .prcm = {
@@ -3943,6 +3946,7 @@ static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = {
                .pa_end         = 0x4a0f6fff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_cfg -> spinlock */
@@ -3951,7 +3955,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = {
        .slave          = &omap44xx_spinlock_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_spinlock_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_spinlock_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -4015,6 +4018,7 @@ static struct omap_hwmod_class omap44xx_timer_hwmod_class = {
 static struct omap_hwmod omap44xx_timer1_hwmod;
 static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = {
        { .irq = 37 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = {
@@ -4023,6 +4027,7 @@ static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = {
                .pa_end         = 0x4a31807f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_wkup -> timer1 */
@@ -4031,7 +4036,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = {
        .slave          = &omap44xx_timer1_hwmod,
        .clk            = "l4_wkup_clk_mux_ck",
        .addr           = omap44xx_timer1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_timer1_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -4044,7 +4048,6 @@ static struct omap_hwmod omap44xx_timer1_hwmod = {
        .name           = "timer1",
        .class          = &omap44xx_timer_1ms_hwmod_class,
        .mpu_irqs       = omap44xx_timer1_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_timer1_irqs),
        .main_clk       = "timer1_fck",
        .prcm = {
                .omap4 = {
@@ -4060,6 +4063,7 @@ static struct omap_hwmod omap44xx_timer1_hwmod = {
 static struct omap_hwmod omap44xx_timer2_hwmod;
 static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = {
        { .irq = 38 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = {
@@ -4068,6 +4072,7 @@ static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = {
                .pa_end         = 0x4803207f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> timer2 */
@@ -4076,7 +4081,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = {
        .slave          = &omap44xx_timer2_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_timer2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_timer2_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -4089,7 +4093,6 @@ static struct omap_hwmod omap44xx_timer2_hwmod = {
        .name           = "timer2",
        .class          = &omap44xx_timer_1ms_hwmod_class,
        .mpu_irqs       = omap44xx_timer2_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_timer2_irqs),
        .main_clk       = "timer2_fck",
        .prcm = {
                .omap4 = {
@@ -4105,6 +4108,7 @@ static struct omap_hwmod omap44xx_timer2_hwmod = {
 static struct omap_hwmod omap44xx_timer3_hwmod;
 static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = {
        { .irq = 39 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = {
@@ -4113,6 +4117,7 @@ static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = {
                .pa_end         = 0x4803407f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> timer3 */
@@ -4121,7 +4126,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = {
        .slave          = &omap44xx_timer3_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_timer3_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_timer3_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -4134,7 +4138,6 @@ static struct omap_hwmod omap44xx_timer3_hwmod = {
        .name           = "timer3",
        .class          = &omap44xx_timer_hwmod_class,
        .mpu_irqs       = omap44xx_timer3_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_timer3_irqs),
        .main_clk       = "timer3_fck",
        .prcm = {
                .omap4 = {
@@ -4150,6 +4153,7 @@ static struct omap_hwmod omap44xx_timer3_hwmod = {
 static struct omap_hwmod omap44xx_timer4_hwmod;
 static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = {
        { .irq = 40 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = {
@@ -4158,6 +4162,7 @@ static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = {
                .pa_end         = 0x4803607f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> timer4 */
@@ -4166,7 +4171,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = {
        .slave          = &omap44xx_timer4_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_timer4_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_timer4_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -4179,7 +4183,6 @@ static struct omap_hwmod omap44xx_timer4_hwmod = {
        .name           = "timer4",
        .class          = &omap44xx_timer_hwmod_class,
        .mpu_irqs       = omap44xx_timer4_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_timer4_irqs),
        .main_clk       = "timer4_fck",
        .prcm = {
                .omap4 = {
@@ -4195,6 +4198,7 @@ static struct omap_hwmod omap44xx_timer4_hwmod = {
 static struct omap_hwmod omap44xx_timer5_hwmod;
 static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = {
        { .irq = 41 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = {
@@ -4203,6 +4207,7 @@ static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = {
                .pa_end         = 0x4013807f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> timer5 */
@@ -4211,7 +4216,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = {
        .slave          = &omap44xx_timer5_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_timer5_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_timer5_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -4221,6 +4225,7 @@ static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = {
                .pa_end         = 0x4903807f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> timer5 (dma) */
@@ -4229,7 +4234,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = {
        .slave          = &omap44xx_timer5_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_timer5_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_timer5_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -4243,7 +4247,6 @@ static struct omap_hwmod omap44xx_timer5_hwmod = {
        .name           = "timer5",
        .class          = &omap44xx_timer_hwmod_class,
        .mpu_irqs       = omap44xx_timer5_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_timer5_irqs),
        .main_clk       = "timer5_fck",
        .prcm = {
                .omap4 = {
@@ -4259,6 +4262,7 @@ static struct omap_hwmod omap44xx_timer5_hwmod = {
 static struct omap_hwmod omap44xx_timer6_hwmod;
 static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = {
        { .irq = 42 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = {
@@ -4267,6 +4271,7 @@ static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = {
                .pa_end         = 0x4013a07f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> timer6 */
@@ -4275,7 +4280,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = {
        .slave          = &omap44xx_timer6_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_timer6_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_timer6_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -4285,6 +4289,7 @@ static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = {
                .pa_end         = 0x4903a07f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> timer6 (dma) */
@@ -4293,7 +4298,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = {
        .slave          = &omap44xx_timer6_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_timer6_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_timer6_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -4307,7 +4311,7 @@ static struct omap_hwmod omap44xx_timer6_hwmod = {
        .name           = "timer6",
        .class          = &omap44xx_timer_hwmod_class,
        .mpu_irqs       = omap44xx_timer6_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_timer6_irqs),
+
        .main_clk       = "timer6_fck",
        .prcm = {
                .omap4 = {
@@ -4323,6 +4327,7 @@ static struct omap_hwmod omap44xx_timer6_hwmod = {
 static struct omap_hwmod omap44xx_timer7_hwmod;
 static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = {
        { .irq = 43 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = {
@@ -4331,6 +4336,7 @@ static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = {
                .pa_end         = 0x4013c07f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> timer7 */
@@ -4339,7 +4345,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = {
        .slave          = &omap44xx_timer7_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_timer7_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_timer7_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -4349,6 +4354,7 @@ static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = {
                .pa_end         = 0x4903c07f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> timer7 (dma) */
@@ -4357,7 +4363,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = {
        .slave          = &omap44xx_timer7_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_timer7_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_timer7_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -4371,7 +4376,6 @@ static struct omap_hwmod omap44xx_timer7_hwmod = {
        .name           = "timer7",
        .class          = &omap44xx_timer_hwmod_class,
        .mpu_irqs       = omap44xx_timer7_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_timer7_irqs),
        .main_clk       = "timer7_fck",
        .prcm = {
                .omap4 = {
@@ -4387,6 +4391,7 @@ static struct omap_hwmod omap44xx_timer7_hwmod = {
 static struct omap_hwmod omap44xx_timer8_hwmod;
 static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = {
        { .irq = 44 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = {
@@ -4395,6 +4400,7 @@ static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = {
                .pa_end         = 0x4013e07f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> timer8 */
@@ -4403,7 +4409,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = {
        .slave          = &omap44xx_timer8_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_timer8_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_timer8_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -4413,6 +4418,7 @@ static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = {
                .pa_end         = 0x4903e07f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> timer8 (dma) */
@@ -4421,7 +4427,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = {
        .slave          = &omap44xx_timer8_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_timer8_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_timer8_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -4435,7 +4440,6 @@ static struct omap_hwmod omap44xx_timer8_hwmod = {
        .name           = "timer8",
        .class          = &omap44xx_timer_hwmod_class,
        .mpu_irqs       = omap44xx_timer8_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_timer8_irqs),
        .main_clk       = "timer8_fck",
        .prcm = {
                .omap4 = {
@@ -4451,6 +4455,7 @@ static struct omap_hwmod omap44xx_timer8_hwmod = {
 static struct omap_hwmod omap44xx_timer9_hwmod;
 static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = {
        { .irq = 45 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = {
@@ -4459,6 +4464,7 @@ static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = {
                .pa_end         = 0x4803e07f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> timer9 */
@@ -4467,7 +4473,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = {
        .slave          = &omap44xx_timer9_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_timer9_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_timer9_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -4480,7 +4485,6 @@ static struct omap_hwmod omap44xx_timer9_hwmod = {
        .name           = "timer9",
        .class          = &omap44xx_timer_hwmod_class,
        .mpu_irqs       = omap44xx_timer9_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_timer9_irqs),
        .main_clk       = "timer9_fck",
        .prcm = {
                .omap4 = {
@@ -4496,6 +4500,7 @@ static struct omap_hwmod omap44xx_timer9_hwmod = {
 static struct omap_hwmod omap44xx_timer10_hwmod;
 static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = {
        { .irq = 46 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = {
@@ -4504,6 +4509,7 @@ static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = {
                .pa_end         = 0x4808607f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> timer10 */
@@ -4512,7 +4518,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = {
        .slave          = &omap44xx_timer10_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_timer10_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_timer10_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -4525,7 +4530,6 @@ static struct omap_hwmod omap44xx_timer10_hwmod = {
        .name           = "timer10",
        .class          = &omap44xx_timer_1ms_hwmod_class,
        .mpu_irqs       = omap44xx_timer10_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_timer10_irqs),
        .main_clk       = "timer10_fck",
        .prcm = {
                .omap4 = {
@@ -4541,6 +4545,7 @@ static struct omap_hwmod omap44xx_timer10_hwmod = {
 static struct omap_hwmod omap44xx_timer11_hwmod;
 static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = {
        { .irq = 47 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = {
@@ -4549,6 +4554,7 @@ static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = {
                .pa_end         = 0x4808807f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> timer11 */
@@ -4557,7 +4563,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = {
        .slave          = &omap44xx_timer11_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_timer11_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_timer11_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -4570,7 +4575,6 @@ static struct omap_hwmod omap44xx_timer11_hwmod = {
        .name           = "timer11",
        .class          = &omap44xx_timer_hwmod_class,
        .mpu_irqs       = omap44xx_timer11_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_timer11_irqs),
        .main_clk       = "timer11_fck",
        .prcm = {
                .omap4 = {
@@ -4608,11 +4612,13 @@ static struct omap_hwmod_class omap44xx_uart_hwmod_class = {
 static struct omap_hwmod omap44xx_uart1_hwmod;
 static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = {
        { .irq = 72 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = {
        { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
@@ -4621,6 +4627,7 @@ static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
                .pa_end         = 0x4806a0ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> uart1 */
@@ -4629,7 +4636,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
        .slave          = &omap44xx_uart1_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_uart1_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_uart1_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -4642,9 +4648,7 @@ static struct omap_hwmod omap44xx_uart1_hwmod = {
        .name           = "uart1",
        .class          = &omap44xx_uart_hwmod_class,
        .mpu_irqs       = omap44xx_uart1_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_uart1_irqs),
        .sdma_reqs      = omap44xx_uart1_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_uart1_sdma_reqs),
        .main_clk       = "uart1_fck",
        .prcm = {
                .omap4 = {
@@ -4660,11 +4664,13 @@ static struct omap_hwmod omap44xx_uart1_hwmod = {
 static struct omap_hwmod omap44xx_uart2_hwmod;
 static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = {
        { .irq = 73 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = {
        { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
@@ -4673,6 +4679,7 @@ static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
                .pa_end         = 0x4806c0ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> uart2 */
@@ -4681,7 +4688,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
        .slave          = &omap44xx_uart2_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_uart2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_uart2_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -4694,9 +4700,7 @@ static struct omap_hwmod omap44xx_uart2_hwmod = {
        .name           = "uart2",
        .class          = &omap44xx_uart_hwmod_class,
        .mpu_irqs       = omap44xx_uart2_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_uart2_irqs),
        .sdma_reqs      = omap44xx_uart2_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_uart2_sdma_reqs),
        .main_clk       = "uart2_fck",
        .prcm = {
                .omap4 = {
@@ -4712,11 +4716,13 @@ static struct omap_hwmod omap44xx_uart2_hwmod = {
 static struct omap_hwmod omap44xx_uart3_hwmod;
 static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = {
        { .irq = 74 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = {
        { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
@@ -4725,6 +4731,7 @@ static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
                .pa_end         = 0x480200ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> uart3 */
@@ -4733,7 +4740,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
        .slave          = &omap44xx_uart3_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_uart3_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_uart3_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -4745,11 +4751,9 @@ static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = {
 static struct omap_hwmod omap44xx_uart3_hwmod = {
        .name           = "uart3",
        .class          = &omap44xx_uart_hwmod_class,
-       .flags          = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
+       .flags          = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
        .mpu_irqs       = omap44xx_uart3_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_uart3_irqs),
        .sdma_reqs      = omap44xx_uart3_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_uart3_sdma_reqs),
        .main_clk       = "uart3_fck",
        .prcm = {
                .omap4 = {
@@ -4765,11 +4769,13 @@ static struct omap_hwmod omap44xx_uart3_hwmod = {
 static struct omap_hwmod omap44xx_uart4_hwmod;
 static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = {
        { .irq = 70 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = {
        { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START },
        { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
@@ -4778,6 +4784,7 @@ static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
                .pa_end         = 0x4806e0ff,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_per -> uart4 */
@@ -4786,7 +4793,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
        .slave          = &omap44xx_uart4_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_uart4_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_uart4_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -4799,9 +4805,7 @@ static struct omap_hwmod omap44xx_uart4_hwmod = {
        .name           = "uart4",
        .class          = &omap44xx_uart_hwmod_class,
        .mpu_irqs       = omap44xx_uart4_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_uart4_irqs),
        .sdma_reqs      = omap44xx_uart4_sdma_reqs,
-       .sdma_reqs_cnt  = ARRAY_SIZE(omap44xx_uart4_sdma_reqs),
        .main_clk       = "uart4_fck",
        .prcm = {
                .omap4 = {
@@ -4832,14 +4836,15 @@ static struct omap_hwmod_class_sysconfig omap44xx_usb_otg_hs_sysc = {
 };
 
 static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = {
-       .name = "usb_otg_hs",
-       .sysc = &omap44xx_usb_otg_hs_sysc,
+       .name   = "usb_otg_hs",
+       .sysc   = &omap44xx_usb_otg_hs_sysc,
 };
 
 /* usb_otg_hs */
 static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = {
        { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START },
        { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 /* usb_otg_hs master ports */
@@ -4853,6 +4858,7 @@ static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
                .pa_end         = 0x4a0ab003,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_cfg -> usb_otg_hs */
@@ -4861,7 +4867,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = {
        .slave          = &omap44xx_usb_otg_hs_hwmod,
        .clk            = "l4_div_ck",
        .addr           = omap44xx_usb_otg_hs_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_usb_otg_hs_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -4879,7 +4884,6 @@ static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = {
        .class          = &omap44xx_usb_otg_hs_hwmod_class,
        .flags          = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
        .mpu_irqs       = omap44xx_usb_otg_hs_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_usb_otg_hs_irqs),
        .main_clk       = "usb_otg_hs_ick",
        .prcm = {
                .omap4 = {
@@ -4887,7 +4891,7 @@ static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = {
                },
        },
        .opt_clks       = usb_otg_hs_opt_clks,
-       .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks),
+       .opt_clks_cnt   = ARRAY_SIZE(usb_otg_hs_opt_clks),
        .slaves         = omap44xx_usb_otg_hs_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves),
        .masters        = omap44xx_usb_otg_hs_masters,
@@ -4922,6 +4926,7 @@ static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
 static struct omap_hwmod omap44xx_wd_timer2_hwmod;
 static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = {
        { .irq = 80 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
@@ -4930,6 +4935,7 @@ static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
                .pa_end         = 0x4a31407f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_wkup -> wd_timer2 */
@@ -4938,7 +4944,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
        .slave          = &omap44xx_wd_timer2_hwmod,
        .clk            = "l4_wkup_clk_mux_ck",
        .addr           = omap44xx_wd_timer2_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_wd_timer2_addrs),
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -4951,7 +4956,6 @@ static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
        .name           = "wd_timer2",
        .class          = &omap44xx_wd_timer_hwmod_class,
        .mpu_irqs       = omap44xx_wd_timer2_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_wd_timer2_irqs),
        .main_clk       = "wd_timer2_fck",
        .prcm = {
                .omap4 = {
@@ -4967,6 +4971,7 @@ static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
 static struct omap_hwmod omap44xx_wd_timer3_hwmod;
 static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = {
        { .irq = 36 + OMAP44XX_IRQ_GIC_START },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = {
@@ -4975,6 +4980,7 @@ static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = {
                .pa_end         = 0x4013007f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> wd_timer3 */
@@ -4983,7 +4989,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = {
        .slave          = &omap44xx_wd_timer3_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_wd_timer3_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_wd_timer3_addrs),
        .user           = OCP_USER_MPU,
 };
 
@@ -4993,6 +4998,7 @@ static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = {
                .pa_end         = 0x4903007f,
                .flags          = ADDR_TYPE_RT
        },
+       { }
 };
 
 /* l4_abe -> wd_timer3 (dma) */
@@ -5001,7 +5007,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = {
        .slave          = &omap44xx_wd_timer3_hwmod,
        .clk            = "ocp_abe_iclk",
        .addr           = omap44xx_wd_timer3_dma_addrs,
-       .addr_cnt       = ARRAY_SIZE(omap44xx_wd_timer3_dma_addrs),
        .user           = OCP_USER_SDMA,
 };
 
@@ -5015,7 +5020,6 @@ static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
        .name           = "wd_timer3",
        .class          = &omap44xx_wd_timer_hwmod_class,
        .mpu_irqs       = omap44xx_wd_timer3_irqs,
-       .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_wd_timer3_irqs),
        .main_clk       = "wd_timer3_fck",
        .prcm = {
                .omap4 = {
index 08a134243ecba3febb134effb19dda5cda8dbd25..de832ebc93a98c8d2556675de6ae3bfd7a5b2342 100644 (file)
@@ -49,23 +49,3 @@ struct omap_hwmod_sysc_fields omap_hwmod_sysc_type2 = {
        .srst_shift     = SYSC_TYPE2_SOFTRESET_SHIFT,
 };
 
-
-/*
- * omap_hwmod class data
- */
-
-struct omap_hwmod_class l3_hwmod_class = {
-       .name = "l3"
-};
-
-struct omap_hwmod_class l4_hwmod_class = {
-       .name = "l4"
-};
-
-struct omap_hwmod_class mpu_hwmod_class = {
-       .name = "mpu"
-};
-
-struct omap_hwmod_class iva_hwmod_class = {
-       .name = "iva"
-};
index c34e98bf124295906fc578873d21a1c84bad7bb3..39a7c37f45870446a9f61d682eb5cc333cbac94c 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * omap_hwmod_common_data.h - OMAP hwmod common macros and declarations
  *
- * Copyright (C) 2010 Nokia Corporation
+ * Copyright (C) 2010-2011 Nokia Corporation
  * Paul Walmsley
  *
- * Copyright (C) 2010 Texas Instruments, Inc.
+ * Copyright (C) 2010-2011 Texas Instruments, Inc.
  * Benoît Cousson
  *
  * This program is free software; you can redistribute it and/or modify
 
 #include <plat/omap_hwmod.h>
 
+/* Common address space across OMAP2xxx */
+extern struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[];
+extern struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[];
+extern struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[];
+extern struct omap_hwmod_addr_space omap2xxx_timer2_addrs[];
+extern struct omap_hwmod_addr_space omap2xxx_timer3_addrs[];
+extern struct omap_hwmod_addr_space omap2xxx_timer4_addrs[];
+extern struct omap_hwmod_addr_space omap2xxx_timer5_addrs[];
+extern struct omap_hwmod_addr_space omap2xxx_timer6_addrs[];
+extern struct omap_hwmod_addr_space omap2xxx_timer7_addrs[];
+extern struct omap_hwmod_addr_space omap2xxx_timer8_addrs[];
+extern struct omap_hwmod_addr_space omap2xxx_timer9_addrs[];
+extern struct omap_hwmod_addr_space omap2xxx_timer12_addrs[];
+extern struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[];
+
+/* Common address space across OMAP2xxx/3xxx */
+extern struct omap_hwmod_addr_space omap2_i2c1_addr_space[];
+extern struct omap_hwmod_addr_space omap2_i2c2_addr_space[];
+extern struct omap_hwmod_addr_space omap2_dss_addrs[];
+extern struct omap_hwmod_addr_space omap2_dss_dispc_addrs[];
+extern struct omap_hwmod_addr_space omap2_dss_rfbi_addrs[];
+extern struct omap_hwmod_addr_space omap2_dss_venc_addrs[];
+extern struct omap_hwmod_addr_space omap2_timer10_addrs[];
+extern struct omap_hwmod_addr_space omap2_timer11_addrs[];
+extern struct omap_hwmod_addr_space omap2430_mmc1_addr_space[];
+extern struct omap_hwmod_addr_space omap2430_mmc2_addr_space[];
+extern struct omap_hwmod_addr_space omap2_mcspi1_addr_space[];
+extern struct omap_hwmod_addr_space omap2_mcspi2_addr_space[];
+extern struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[];
+extern struct omap_hwmod_addr_space omap2_dma_system_addrs[];
+extern struct omap_hwmod_addr_space omap2_mailbox_addrs[];
+extern struct omap_hwmod_addr_space omap2_mcbsp1_addrs[];
+
+/* Common IP block data across OMAP2xxx */
+extern struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[];
+extern struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[];
+
+/* Common IP block data */
+extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[];
+extern struct omap_hwmod_dma_info omap2_uart2_sdma_reqs[];
+extern struct omap_hwmod_dma_info omap2_uart3_sdma_reqs[];
+extern struct omap_hwmod_dma_info omap2_i2c1_sdma_reqs[];
+extern struct omap_hwmod_dma_info omap2_i2c2_sdma_reqs[];
+extern struct omap_hwmod_dma_info omap2_mcspi1_sdma_reqs[];
+extern struct omap_hwmod_dma_info omap2_mcspi2_sdma_reqs[];
+extern struct omap_hwmod_dma_info omap2_mcbsp1_sdma_reqs[];
+extern struct omap_hwmod_dma_info omap2_mcbsp2_sdma_reqs[];
+
+/* Common IP block data on OMAP2430/OMAP3 */
+extern struct omap_hwmod_dma_info omap2_mcbsp3_sdma_reqs[];
+
+/* Common IP block data across OMAP2/3 */
+extern struct omap_hwmod_irq_info omap2_timer1_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_timer2_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_timer3_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_timer4_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_timer5_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_timer6_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_timer7_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_timer8_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_timer9_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_timer10_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_timer11_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_uart1_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_uart2_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_uart3_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_dispc_irqs[];
+extern struct omap_hwmod_irq_info omap2_i2c1_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_i2c2_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_gpio1_irqs[];
+extern struct omap_hwmod_irq_info omap2_gpio2_irqs[];
+extern struct omap_hwmod_irq_info omap2_gpio3_irqs[];
+extern struct omap_hwmod_irq_info omap2_gpio4_irqs[];
+extern struct omap_hwmod_irq_info omap2_dma_system_irqs[];
+extern struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[];
+extern struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[];
+
 /* OMAP hwmod classes - forward declarations */
 extern struct omap_hwmod_class l3_hwmod_class;
 extern struct omap_hwmod_class l4_hwmod_class;
 extern struct omap_hwmod_class mpu_hwmod_class;
 extern struct omap_hwmod_class iva_hwmod_class;
+extern struct omap_hwmod_class omap2_uart_class;
+extern struct omap_hwmod_class omap2_dss_hwmod_class;
+extern struct omap_hwmod_class omap2_dispc_hwmod_class;
+extern struct omap_hwmod_class omap2_rfbi_hwmod_class;
+extern struct omap_hwmod_class omap2_venc_hwmod_class;
+
+extern struct omap_hwmod_class omap2xxx_timer_hwmod_class;
+extern struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class;
+extern struct omap_hwmod_class omap2xxx_gpio_hwmod_class;
+extern struct omap_hwmod_class omap2xxx_dma_hwmod_class;
+extern struct omap_hwmod_class omap2xxx_mailbox_hwmod_class;
+extern struct omap_hwmod_class omap2xxx_mcspi_class;
 
 #endif
index e01da45c053756f62ac08956620dc16dd09d3407..4411163e012dd362298981182bde2a9d8d8b08ea 100644 (file)
 #include "prm2xxx_3xxx.h"
 #include "pm.h"
 
-int omap2_pm_debug;
 u32 enable_off_mode;
-u32 sleep_while_idle;
-u32 wakeup_timer_seconds;
-u32 wakeup_timer_milliseconds;
-
-#define DUMP_PRM_MOD_REG(mod, reg)    \
-       regs[reg_count].name = #mod "." #reg; \
-       regs[reg_count++].val = omap2_prm_read_mod_reg(mod, reg)
-#define DUMP_CM_MOD_REG(mod, reg)     \
-       regs[reg_count].name = #mod "." #reg; \
-       regs[reg_count++].val = omap2_cm_read_mod_reg(mod, reg)
-#define DUMP_PRM_REG(reg) \
-       regs[reg_count].name = #reg; \
-       regs[reg_count++].val = __raw_readl(reg)
-#define DUMP_CM_REG(reg) \
-       regs[reg_count].name = #reg; \
-       regs[reg_count++].val = __raw_readl(reg)
-#define DUMP_INTC_REG(reg, off) \
-       regs[reg_count].name = #reg; \
-       regs[reg_count++].val = \
-                        __raw_readl(OMAP2_L4_IO_ADDRESS(0x480fe000 + (off)))
-
-void omap2_pm_dump(int mode, int resume, unsigned int us)
-{
-       struct reg {
-               const char *name;
-               u32 val;
-       } regs[32];
-       int reg_count = 0, i;
-       const char *s1 = NULL, *s2 = NULL;
-
-       if (!resume) {
-#if 0
-               /* MPU */
-               DUMP_PRM_MOD_REG(OCP_MOD, OMAP2_PRM_IRQENABLE_MPU_OFFSET);
-               DUMP_CM_MOD_REG(MPU_MOD, OMAP2_CM_CLKSTCTRL);
-               DUMP_PRM_MOD_REG(MPU_MOD, OMAP2_PM_PWSTCTRL);
-               DUMP_PRM_MOD_REG(MPU_MOD, OMAP2_PM_PWSTST);
-               DUMP_PRM_MOD_REG(MPU_MOD, PM_WKDEP);
-#endif
-#if 0
-               /* INTC */
-               DUMP_INTC_REG(INTC_MIR0, 0x0084);
-               DUMP_INTC_REG(INTC_MIR1, 0x00a4);
-               DUMP_INTC_REG(INTC_MIR2, 0x00c4);
-#endif
-#if 0
-               DUMP_CM_MOD_REG(CORE_MOD, CM_FCLKEN1);
-               if (cpu_is_omap24xx()) {
-                       DUMP_CM_MOD_REG(CORE_MOD, OMAP24XX_CM_FCLKEN2);
-                       DUMP_PRM_MOD_REG(OMAP24XX_GR_MOD,
-                                       OMAP2_PRCM_CLKEMUL_CTRL_OFFSET);
-                       DUMP_PRM_MOD_REG(OMAP24XX_GR_MOD,
-                                       OMAP2_PRCM_CLKSRC_CTRL_OFFSET);
-               }
-               DUMP_CM_MOD_REG(WKUP_MOD, CM_FCLKEN);
-               DUMP_CM_MOD_REG(CORE_MOD, CM_ICLKEN1);
-               DUMP_CM_MOD_REG(CORE_MOD, CM_ICLKEN2);
-               DUMP_CM_MOD_REG(WKUP_MOD, CM_ICLKEN);
-               DUMP_CM_MOD_REG(PLL_MOD, CM_CLKEN);
-               DUMP_CM_MOD_REG(PLL_MOD, CM_AUTOIDLE);
-               DUMP_PRM_MOD_REG(CORE_MOD, OMAP2_PM_PWSTST);
-#endif
-#if 0
-               /* DSP */
-               if (cpu_is_omap24xx()) {
-                       DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, CM_FCLKEN);
-                       DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, CM_ICLKEN);
-                       DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, CM_IDLEST);
-                       DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, CM_AUTOIDLE);
-                       DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, CM_CLKSEL);
-                       DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, OMAP2_CM_CLKSTCTRL);
-                       DUMP_PRM_MOD_REG(OMAP24XX_DSP_MOD, OMAP2_RM_RSTCTRL);
-                       DUMP_PRM_MOD_REG(OMAP24XX_DSP_MOD, OMAP2_RM_RSTST);
-                       DUMP_PRM_MOD_REG(OMAP24XX_DSP_MOD, OMAP2_PM_PWSTCTRL);
-                       DUMP_PRM_MOD_REG(OMAP24XX_DSP_MOD, OMAP2_PM_PWSTST);
-               }
-#endif
-       } else {
-               DUMP_PRM_MOD_REG(CORE_MOD, PM_WKST1);
-               if (cpu_is_omap24xx())
-                       DUMP_PRM_MOD_REG(CORE_MOD, OMAP24XX_PM_WKST2);
-               DUMP_PRM_MOD_REG(WKUP_MOD, PM_WKST);
-               DUMP_PRM_MOD_REG(OCP_MOD, OMAP2_PRCM_IRQSTATUS_MPU_OFFSET);
-#if 1
-               DUMP_INTC_REG(INTC_PENDING_IRQ0, 0x0098);
-               DUMP_INTC_REG(INTC_PENDING_IRQ1, 0x00b8);
-               DUMP_INTC_REG(INTC_PENDING_IRQ2, 0x00d8);
-#endif
-       }
-
-       switch (mode) {
-       case 0:
-               s1 = "full";
-               s2 = "retention";
-               break;
-       case 1:
-               s1 = "MPU";
-               s2 = "retention";
-               break;
-       case 2:
-               s1 = "MPU";
-               s2 = "idle";
-               break;
-       }
-
-       if (!resume)
-#ifdef CONFIG_NO_HZ
-               printk(KERN_INFO
-                      "--- Going to %s %s (next timer after %u ms)\n", s1, s2,
-                      jiffies_to_msecs(get_next_timer_interrupt(jiffies) -
-                                       jiffies));
-#else
-               printk(KERN_INFO "--- Going to %s %s\n", s1, s2);
-#endif
-       else
-               printk(KERN_INFO "--- Woke up (slept for %u.%03u ms)\n",
-                       us / 1000, us % 1000);
-
-       for (i = 0; i < reg_count; i++)
-               printk(KERN_INFO "%-20s: 0x%08x\n", regs[i].name, regs[i].val);
-}
-
-void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds)
-{
-       u32 tick_rate, cycles;
-
-       if (!seconds && !milliseconds)
-               return;
-
-       tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gptimer_wakeup));
-       cycles = tick_rate * seconds + tick_rate * milliseconds / 1000;
-       omap_dm_timer_stop(gptimer_wakeup);
-       omap_dm_timer_set_load_start(gptimer_wakeup, 0, 0xffffffff - cycles);
-
-       pr_info("PM: Resume timer in %u.%03u secs"
-               " (%d ticks at %d ticks/sec.)\n",
-               seconds, milliseconds, cycles, tick_rate);
-}
 
 #ifdef CONFIG_DEBUG_FS
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
 
-static void pm_dbg_regset_store(u32 *ptr);
-
-static struct dentry *pm_dbg_dir;
-
 static int pm_dbg_init_done;
 
 static int pm_dbg_init(void);
@@ -196,160 +53,6 @@ enum {
        DEBUG_FILE_TIMERS,
 };
 
-struct pm_module_def {
-       char name[8]; /* Name of the module */
-       short type; /* CM or PRM */
-       unsigned short offset;
-       int low; /* First register address on this module */
-       int high; /* Last register address on this module */
-};
-
-#define MOD_CM 0
-#define MOD_PRM 1
-
-static const struct pm_module_def *pm_dbg_reg_modules;
-static const struct pm_module_def omap3_pm_reg_modules[] = {
-       { "IVA2", MOD_CM, OMAP3430_IVA2_MOD, 0, 0x4c },
-       { "OCP", MOD_CM, OCP_MOD, 0, 0x10 },
-       { "MPU", MOD_CM, MPU_MOD, 4, 0x4c },
-       { "CORE", MOD_CM, CORE_MOD, 0, 0x4c },
-       { "SGX", MOD_CM, OMAP3430ES2_SGX_MOD, 0, 0x4c },
-       { "WKUP", MOD_CM, WKUP_MOD, 0, 0x40 },
-       { "CCR", MOD_CM, PLL_MOD, 0, 0x70 },
-       { "DSS", MOD_CM, OMAP3430_DSS_MOD, 0, 0x4c },
-       { "CAM", MOD_CM, OMAP3430_CAM_MOD, 0, 0x4c },
-       { "PER", MOD_CM, OMAP3430_PER_MOD, 0, 0x4c },
-       { "EMU", MOD_CM, OMAP3430_EMU_MOD, 0x40, 0x54 },
-       { "NEON", MOD_CM, OMAP3430_NEON_MOD, 0x20, 0x48 },
-       { "USB", MOD_CM, OMAP3430ES2_USBHOST_MOD, 0, 0x4c },
-
-       { "IVA2", MOD_PRM, OMAP3430_IVA2_MOD, 0x50, 0xfc },
-       { "OCP", MOD_PRM, OCP_MOD, 4, 0x1c },
-       { "MPU", MOD_PRM, MPU_MOD, 0x58, 0xe8 },
-       { "CORE", MOD_PRM, CORE_MOD, 0x58, 0xf8 },
-       { "SGX", MOD_PRM, OMAP3430ES2_SGX_MOD, 0x58, 0xe8 },
-       { "WKUP", MOD_PRM, WKUP_MOD, 0xa0, 0xb0 },
-       { "CCR", MOD_PRM, PLL_MOD, 0x40, 0x70 },
-       { "DSS", MOD_PRM, OMAP3430_DSS_MOD, 0x58, 0xe8 },
-       { "CAM", MOD_PRM, OMAP3430_CAM_MOD, 0x58, 0xe8 },
-       { "PER", MOD_PRM, OMAP3430_PER_MOD, 0x58, 0xe8 },
-       { "EMU", MOD_PRM, OMAP3430_EMU_MOD, 0x58, 0xe4 },
-       { "GLBL", MOD_PRM, OMAP3430_GR_MOD, 0x20, 0xe4 },
-       { "NEON", MOD_PRM, OMAP3430_NEON_MOD, 0x58, 0xe8 },
-       { "USB", MOD_PRM, OMAP3430ES2_USBHOST_MOD, 0x58, 0xe8 },
-       { "", 0, 0, 0, 0 },
-};
-
-#define PM_DBG_MAX_REG_SETS 4
-
-static void *pm_dbg_reg_set[PM_DBG_MAX_REG_SETS];
-
-static int pm_dbg_get_regset_size(void)
-{
-       static int regset_size;
-
-       if (regset_size == 0) {
-               int i = 0;
-
-               while (pm_dbg_reg_modules[i].name[0] != 0) {
-                       regset_size += pm_dbg_reg_modules[i].high +
-                               4 - pm_dbg_reg_modules[i].low;
-                       i++;
-               }
-       }
-       return regset_size;
-}
-
-static int pm_dbg_show_regs(struct seq_file *s, void *unused)
-{
-       int i, j;
-       unsigned long val;
-       int reg_set = (int)s->private;
-       u32 *ptr;
-       void *store = NULL;
-       int regs;
-       int linefeed;
-
-       if (reg_set == 0) {
-               store = kmalloc(pm_dbg_get_regset_size(), GFP_KERNEL);
-               ptr = store;
-               pm_dbg_regset_store(ptr);
-       } else {
-               ptr = pm_dbg_reg_set[reg_set - 1];
-       }
-
-       i = 0;
-
-       while (pm_dbg_reg_modules[i].name[0] != 0) {
-               regs = 0;
-               linefeed = 0;
-               if (pm_dbg_reg_modules[i].type == MOD_CM)
-                       seq_printf(s, "MOD: CM_%s (%08x)\n",
-                               pm_dbg_reg_modules[i].name,
-                               (u32)(OMAP3430_CM_BASE +
-                               pm_dbg_reg_modules[i].offset));
-               else
-                       seq_printf(s, "MOD: PRM_%s (%08x)\n",
-                               pm_dbg_reg_modules[i].name,
-                               (u32)(OMAP3430_PRM_BASE +
-                               pm_dbg_reg_modules[i].offset));
-
-               for (j = pm_dbg_reg_modules[i].low;
-                       j <= pm_dbg_reg_modules[i].high; j += 4) {
-                       val = *(ptr++);
-                       if (val != 0) {
-                               regs++;
-                               if (linefeed) {
-                                       seq_printf(s, "\n");
-                                       linefeed = 0;
-                               }
-                               seq_printf(s, "  %02x => %08lx", j, val);
-                               if (regs % 4 == 0)
-                                       linefeed = 1;
-                       }
-               }
-               seq_printf(s, "\n");
-               i++;
-       }
-
-       if (store != NULL)
-               kfree(store);
-
-       return 0;
-}
-
-static void pm_dbg_regset_store(u32 *ptr)
-{
-       int i, j;
-       u32 val;
-
-       i = 0;
-
-       while (pm_dbg_reg_modules[i].name[0] != 0) {
-               for (j = pm_dbg_reg_modules[i].low;
-                       j <= pm_dbg_reg_modules[i].high; j += 4) {
-                       if (pm_dbg_reg_modules[i].type == MOD_CM)
-                               val = omap2_cm_read_mod_reg(
-                                       pm_dbg_reg_modules[i].offset, j);
-                       else
-                               val = omap2_prm_read_mod_reg(
-                                       pm_dbg_reg_modules[i].offset, j);
-                       *(ptr++) = val;
-               }
-               i++;
-       }
-}
-
-int pm_dbg_regset_save(int reg_set)
-{
-       if (pm_dbg_reg_set[reg_set-1] == NULL)
-               return -EINVAL;
-
-       pm_dbg_regset_store(pm_dbg_reg_set[reg_set-1]);
-
-       return 0;
-}
-
 static const char pwrdm_state_names[][PWRDM_MAX_PWRSTS] = {
        "OFF",
        "RET",
@@ -469,11 +172,6 @@ static int pm_dbg_open(struct inode *inode, struct file *file)
        };
 }
 
-static int pm_dbg_reg_open(struct inode *inode, struct file *file)
-{
-       return single_open(file, pm_dbg_show_regs, inode->i_private);
-}
-
 static const struct file_operations debug_fops = {
        .open           = pm_dbg_open,
        .read           = seq_read,
@@ -481,40 +179,6 @@ static const struct file_operations debug_fops = {
        .release        = single_release,
 };
 
-static const struct file_operations debug_reg_fops = {
-       .open           = pm_dbg_reg_open,
-       .read           = seq_read,
-       .llseek         = seq_lseek,
-       .release        = single_release,
-};
-
-int pm_dbg_regset_init(int reg_set)
-{
-       char name[2];
-
-       if (!pm_dbg_init_done)
-               pm_dbg_init();
-
-       if (reg_set < 1 || reg_set > PM_DBG_MAX_REG_SETS ||
-               pm_dbg_reg_set[reg_set-1] != NULL)
-               return -EINVAL;
-
-       pm_dbg_reg_set[reg_set-1] =
-               kmalloc(pm_dbg_get_regset_size(), GFP_KERNEL);
-
-       if (pm_dbg_reg_set[reg_set-1] == NULL)
-               return -ENOMEM;
-
-       if (pm_dbg_dir != NULL) {
-               sprintf(name, "%d", reg_set);
-
-               (void) debugfs_create_file(name, S_IRUGO,
-                       pm_dbg_dir, (void *)reg_set, &debug_reg_fops);
-       }
-
-       return 0;
-}
-
 static int pwrdm_suspend_get(void *data, u64 *val)
 {
        int ret = -EINVAL;
@@ -576,9 +240,6 @@ static int option_set(void *data, u64 val)
 {
        u32 *option = data;
 
-       if (option == &wakeup_timer_milliseconds && val >= 1000)
-               return -EINVAL;
-
        *option = val;
 
        if (option == &enable_off_mode) {
@@ -595,22 +256,13 @@ static int option_set(void *data, u64 val)
 
 DEFINE_SIMPLE_ATTRIBUTE(pm_dbg_option_fops, option_get, option_set, "%llu\n");
 
-static int pm_dbg_init(void)
+static int __init pm_dbg_init(void)
 {
-       int i;
        struct dentry *d;
-       char name[2];
 
        if (pm_dbg_init_done)
                return 0;
 
-       if (cpu_is_omap34xx())
-               pm_dbg_reg_modules = omap3_pm_reg_modules;
-       else {
-               printk(KERN_ERR "%s: only OMAP3 supported\n", __func__);
-               return -ENODEV;
-       }
-
        d = debugfs_create_dir("pm_debug", NULL);
        if (IS_ERR(d))
                return PTR_ERR(d);
@@ -622,30 +274,8 @@ static int pm_dbg_init(void)
 
        pwrdm_for_each(pwrdms_setup, (void *)d);
 
-       pm_dbg_dir = debugfs_create_dir("registers", d);
-       if (IS_ERR(pm_dbg_dir))
-               return PTR_ERR(pm_dbg_dir);
-
-       (void) debugfs_create_file("current", S_IRUGO,
-               pm_dbg_dir, (void *)0, &debug_reg_fops);
-
-       for (i = 0; i < PM_DBG_MAX_REG_SETS; i++)
-               if (pm_dbg_reg_set[i] != NULL) {
-                       sprintf(name, "%d", i+1);
-                       (void) debugfs_create_file(name, S_IRUGO,
-                               pm_dbg_dir, (void *)(i+1), &debug_reg_fops);
-
-               }
-
        (void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d,
                                   &enable_off_mode, &pm_dbg_option_fops);
-       (void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUSR, d,
-                                  &sleep_while_idle, &pm_dbg_option_fops);
-       (void) debugfs_create_file("wakeup_timer_seconds", S_IRUGO | S_IWUSR, d,
-                                  &wakeup_timer_seconds, &pm_dbg_option_fops);
-       (void) debugfs_create_file("wakeup_timer_milliseconds",
-                       S_IRUGO | S_IWUSR, d, &wakeup_timer_milliseconds,
-                       &pm_dbg_option_fops);
        pm_dbg_init_done = 1;
 
        return 0;
index 04ee5664612613a0c833131d589dd0910fc20dcc..4e166add2f351db8b423adfbbd262ccb8a3ff0e4 100644 (file)
@@ -60,32 +60,16 @@ inline void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params)
 extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm);
 extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state);
 
-extern u32 wakeup_timer_seconds;
-extern u32 wakeup_timer_milliseconds;
-extern struct omap_dm_timer *gptimer_wakeup;
-
 #ifdef CONFIG_PM_DEBUG
-extern void omap2_pm_dump(int mode, int resume, unsigned int us);
-extern void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds);
-extern int omap2_pm_debug;
 extern u32 enable_off_mode;
-extern u32 sleep_while_idle;
 #else
-#define omap2_pm_dump(mode, resume, us)                do {} while (0);
-#define omap2_pm_wakeup_on_timer(seconds, milliseconds)        do {} while (0);
-#define omap2_pm_debug                         0
 #define enable_off_mode 0
-#define sleep_while_idle 0
 #endif
 
 #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS)
 extern void pm_dbg_update_time(struct powerdomain *pwrdm, int prev);
-extern int pm_dbg_regset_save(int reg_set);
-extern int pm_dbg_regset_init(int reg_set);
 #else
 #define pm_dbg_update_time(pwrdm, prev) do {} while (0);
-#define pm_dbg_regset_save(reg_set) do {} while (0);
-#define pm_dbg_regset_init(reg_set) do {} while (0);
 #endif /* CONFIG_PM_DEBUG */
 
 /* 24xx */
index df3ded6fe194cf4afee80382064e62a04a01dd38..bf089e743ed98ecd6dc8536e57c5a39791eb9813 100644 (file)
@@ -53,6 +53,8 @@
 #include "powerdomain.h"
 #include "clockdomain.h"
 
+static int omap2_pm_debug;
+
 #ifdef CONFIG_SUSPEND
 static suspend_state_t suspend_state = PM_SUSPEND_ON;
 static inline bool is_suspending(void)
@@ -123,7 +125,6 @@ static void omap2_enter_full_retention(void)
        omap2_gpio_prepare_for_idle(0);
 
        if (omap2_pm_debug) {
-               omap2_pm_dump(0, 0, 0);
                getnstimeofday(&ts_preidle);
        }
 
@@ -160,7 +161,6 @@ no_sleep:
                getnstimeofday(&ts_postidle);
                ts_idle = timespec_sub(ts_postidle, ts_preidle);
                tmp = timespec_to_ns(&ts_idle) * NSEC_PER_USEC;
-               omap2_pm_dump(0, 1, tmp);
        }
        omap2_gpio_resume_after_idle();
 
@@ -247,7 +247,6 @@ static void omap2_enter_mpu_retention(void)
        }
 
        if (omap2_pm_debug) {
-               omap2_pm_dump(only_idle ? 2 : 1, 0, 0);
                getnstimeofday(&ts_preidle);
        }
 
@@ -259,7 +258,6 @@ static void omap2_enter_mpu_retention(void)
                getnstimeofday(&ts_postidle);
                ts_idle = timespec_sub(ts_postidle, ts_preidle);
                tmp = timespec_to_ns(&ts_idle) * NSEC_PER_USEC;
-               omap2_pm_dump(only_idle ? 2 : 1, 1, tmp);
        }
 }
 
index b77d82665abb51a18b0dd663d51f731f81fd2354..7255d9bce8689baff0f4db0519ad590120a68874 100644 (file)
@@ -485,8 +485,6 @@ console_still_active:
 
 int omap3_can_sleep(void)
 {
-       if (!sleep_while_idle)
-               return 0;
        if (!omap_uart_can_sleep())
                return 0;
        return 1;
@@ -522,10 +520,6 @@ static int omap3_pm_suspend(void)
        struct power_state *pwrst;
        int state, ret = 0;
 
-       if (wakeup_timer_seconds || wakeup_timer_milliseconds)
-               omap2_pm_wakeup_on_timer(wakeup_timer_seconds,
-                                        wakeup_timer_milliseconds);
-
        /* Read current next_pwrsts */
        list_for_each_entry(pwrst, &pwrst_list, node)
                pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm);
index c4222c7036a52d06666a12a65578bff7d58d9b47..3a7e678fd5f1c36dc80171683a6cbf509e6467e9 100644 (file)
@@ -53,7 +53,7 @@ static struct powerdomain core_44xx_pwrdm = {
                [3] = PWRSTS_ON,        /* ducati_l2ram */
                [4] = PWRSTS_ON,        /* ducati_unicache */
        },
-       .flags          = PWRDM_HAS_LOWPOWERSTATECHANGE,
+       .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
 };
 
 /* gfx_44xx_pwrdm: 3D accelerator power domain */
@@ -70,7 +70,7 @@ static struct powerdomain gfx_44xx_pwrdm = {
        .pwrsts_mem_on  = {
                [0] = PWRSTS_ON,        /* gfx_mem */
        },
-       .flags          = PWRDM_HAS_LOWPOWERSTATECHANGE,
+       .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
 };
 
 /* abe_44xx_pwrdm: Audio back end power domain */
@@ -90,7 +90,7 @@ static struct powerdomain abe_44xx_pwrdm = {
                [0] = PWRSTS_ON,        /* aessmem */
                [1] = PWRSTS_ON,        /* periphmem */
        },
-       .flags          = PWRDM_HAS_LOWPOWERSTATECHANGE,
+       .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
 };
 
 /* dss_44xx_pwrdm: Display subsystem power domain */
@@ -108,7 +108,7 @@ static struct powerdomain dss_44xx_pwrdm = {
        .pwrsts_mem_on  = {
                [0] = PWRSTS_ON,        /* dss_mem */
        },
-       .flags          = PWRDM_HAS_LOWPOWERSTATECHANGE,
+       .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
 };
 
 /* tesla_44xx_pwrdm: Tesla processor power domain */
@@ -130,7 +130,7 @@ static struct powerdomain tesla_44xx_pwrdm = {
                [1] = PWRSTS_ON,        /* tesla_l1 */
                [2] = PWRSTS_ON,        /* tesla_l2 */
        },
-       .flags          = PWRDM_HAS_LOWPOWERSTATECHANGE,
+       .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
 };
 
 /* wkup_44xx_pwrdm: Wake-up power domain */
@@ -241,7 +241,7 @@ static struct powerdomain ivahd_44xx_pwrdm = {
                [2] = PWRSTS_ON,        /* tcm1_mem */
                [3] = PWRSTS_ON,        /* tcm2_mem */
        },
-       .flags          = PWRDM_HAS_LOWPOWERSTATECHANGE,
+       .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
 };
 
 /* cam_44xx_pwrdm: Camera subsystem power domain */
@@ -258,7 +258,7 @@ static struct powerdomain cam_44xx_pwrdm = {
        .pwrsts_mem_on  = {
                [0] = PWRSTS_ON,        /* cam_mem */
        },
-       .flags          = PWRDM_HAS_LOWPOWERSTATECHANGE,
+       .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
 };
 
 /* l3init_44xx_pwrdm: L3 initators pheripherals power domain  */
@@ -276,7 +276,7 @@ static struct powerdomain l3init_44xx_pwrdm = {
        .pwrsts_mem_on  = {
                [0] = PWRSTS_ON,        /* l3init_bank1 */
        },
-       .flags          = PWRDM_HAS_LOWPOWERSTATECHANGE,
+       .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
 };
 
 /* l4per_44xx_pwrdm: Target peripherals power domain */
@@ -296,7 +296,7 @@ static struct powerdomain l4per_44xx_pwrdm = {
                [0] = PWRSTS_ON,        /* nonretained_bank */
                [1] = PWRSTS_ON,        /* retained_bank */
        },
-       .flags          = PWRDM_HAS_LOWPOWERSTATECHANGE,
+       .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
 };
 
 /*
index d22d1b43bccdff772d750e02450046c472a2a154..8a6e250f04b50a023e485df50fe2c1f21a1dc55f 100644 (file)
@@ -31,7 +31,6 @@
        OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE + (inst) + (reg))
 
 /* PRCM_MPU instances */
-
 #define OMAP4430_PRCM_MPU_OCP_SOCKET_PRCM_INST 0x0000
 #define OMAP4430_PRCM_MPU_DEVICE_PRM_INST      0x0200
 #define OMAP4430_PRCM_MPU_CPU0_INST            0x0400
  */
 
 /* PRCM_MPU.OCP_SOCKET_PRCM register offsets */
-#define OMAP4_REVISION_PRCM_OFFSET                     0x0000
-#define OMAP4430_REVISION_PRCM                         OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_OCP_SOCKET_PRCM_INST, 0x0000)
+#define OMAP4_REVISION_PRCM_OFFSET             0x0000
+#define OMAP4430_REVISION_PRCM                 OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_OCP_SOCKET_PRCM_INST, 0x0000)
 
 /* PRCM_MPU.DEVICE_PRM register offsets */
-#define OMAP4_PRCM_MPU_PRM_RSTST_OFFSET                        0x0000
-#define OMAP4430_PRCM_MPU_PRM_RSTST                    OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_INST, 0x0000)
-#define OMAP4_PRCM_MPU_PRM_PSCON_COUNT_OFFSET          0x0004
-#define OMAP4430_PRCM_MPU_PRM_PSCON_COUNT              OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_INST, 0x0004)
+#define OMAP4_PRCM_MPU_PRM_RSTST_OFFSET                0x0000
+#define OMAP4430_PRCM_MPU_PRM_RSTST            OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_INST, 0x0000)
+#define OMAP4_PRCM_MPU_PRM_PSCON_COUNT_OFFSET  0x0004
+#define OMAP4430_PRCM_MPU_PRM_PSCON_COUNT      OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_INST, 0x0004)
 
 /* PRCM_MPU.CPU0 register offsets */
-#define OMAP4_PM_CPU0_PWRSTCTRL_OFFSET                 0x0000
-#define OMAP4430_PM_CPU0_PWRSTCTRL                     OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0000)
-#define OMAP4_PM_CPU0_PWRSTST_OFFSET                   0x0004
-#define OMAP4430_PM_CPU0_PWRSTST                       OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0004)
-#define OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET              0x0008
-#define OMAP4430_RM_CPU0_CPU0_CONTEXT                  OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0008)
-#define OMAP4_RM_CPU0_CPU0_RSTCTRL_OFFSET              0x000c
-#define OMAP4430_RM_CPU0_CPU0_RSTCTRL                  OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x000c)
-#define OMAP4_RM_CPU0_CPU0_RSTST_OFFSET                        0x0010
-#define OMAP4430_RM_CPU0_CPU0_RSTST                    OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0010)
-#define OMAP4_CM_CPU0_CPU0_CLKCTRL_OFFSET              0x0014
-#define OMAP4430_CM_CPU0_CPU0_CLKCTRL                  OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0014)
-#define OMAP4_CM_CPU0_CLKSTCTRL_OFFSET                 0x0018
-#define OMAP4430_CM_CPU0_CLKSTCTRL                     OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0018)
+#define OMAP4_PM_CPU0_PWRSTCTRL_OFFSET         0x0000
+#define OMAP4430_PM_CPU0_PWRSTCTRL             OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0000)
+#define OMAP4_PM_CPU0_PWRSTST_OFFSET           0x0004
+#define OMAP4430_PM_CPU0_PWRSTST               OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0004)
+#define OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET      0x0008
+#define OMAP4430_RM_CPU0_CPU0_CONTEXT          OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0008)
+#define OMAP4_RM_CPU0_CPU0_RSTCTRL_OFFSET      0x000c
+#define OMAP4430_RM_CPU0_CPU0_RSTCTRL          OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x000c)
+#define OMAP4_RM_CPU0_CPU0_RSTST_OFFSET                0x0010
+#define OMAP4430_RM_CPU0_CPU0_RSTST            OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0010)
+#define OMAP4_CM_CPU0_CPU0_CLKCTRL_OFFSET      0x0014
+#define OMAP4430_CM_CPU0_CPU0_CLKCTRL          OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0014)
+#define OMAP4_CM_CPU0_CLKSTCTRL_OFFSET         0x0018
+#define OMAP4430_CM_CPU0_CLKSTCTRL             OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0018)
 
 /* PRCM_MPU.CPU1 register offsets */
-#define OMAP4_PM_CPU1_PWRSTCTRL_OFFSET                 0x0000
-#define OMAP4430_PM_CPU1_PWRSTCTRL                     OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0000)
-#define OMAP4_PM_CPU1_PWRSTST_OFFSET                   0x0004
-#define OMAP4430_PM_CPU1_PWRSTST                       OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0004)
-#define OMAP4_RM_CPU1_CPU1_CONTEXT_OFFSET              0x0008
-#define OMAP4430_RM_CPU1_CPU1_CONTEXT                  OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0008)
-#define OMAP4_RM_CPU1_CPU1_RSTCTRL_OFFSET              0x000c
-#define OMAP4430_RM_CPU1_CPU1_RSTCTRL                  OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x000c)
-#define OMAP4_RM_CPU1_CPU1_RSTST_OFFSET                        0x0010
-#define OMAP4430_RM_CPU1_CPU1_RSTST                    OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0010)
-#define OMAP4_CM_CPU1_CPU1_CLKCTRL_OFFSET              0x0014
-#define OMAP4430_CM_CPU1_CPU1_CLKCTRL                  OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0014)
-#define OMAP4_CM_CPU1_CLKSTCTRL_OFFSET                 0x0018
-#define OMAP4430_CM_CPU1_CLKSTCTRL                     OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0018)
+#define OMAP4_PM_CPU1_PWRSTCTRL_OFFSET         0x0000
+#define OMAP4430_PM_CPU1_PWRSTCTRL             OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0000)
+#define OMAP4_PM_CPU1_PWRSTST_OFFSET           0x0004
+#define OMAP4430_PM_CPU1_PWRSTST               OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0004)
+#define OMAP4_RM_CPU1_CPU1_CONTEXT_OFFSET      0x0008
+#define OMAP4430_RM_CPU1_CPU1_CONTEXT          OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0008)
+#define OMAP4_RM_CPU1_CPU1_RSTCTRL_OFFSET      0x000c
+#define OMAP4430_RM_CPU1_CPU1_RSTCTRL          OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x000c)
+#define OMAP4_RM_CPU1_CPU1_RSTST_OFFSET                0x0010
+#define OMAP4430_RM_CPU1_CPU1_RSTST            OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0010)
+#define OMAP4_CM_CPU1_CPU1_CLKCTRL_OFFSET      0x0014
+#define OMAP4430_CM_CPU1_CPU1_CLKCTRL          OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0014)
+#define OMAP4_CM_CPU1_CLKSTCTRL_OFFSET         0x0018
+#define OMAP4430_CM_CPU1_CLKSTCTRL             OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0018)
 
 /* Function prototypes */
 # ifndef __ASSEMBLER__
index 67a0d3feb3f60aa360c1d30e7d05a806945006a7..6e53120fd6cb5e4ae395bb38b9a5134f93330545 100644 (file)
@@ -31,7 +31,7 @@
 #define OMAP4430_PRM_BASE              0x4a306000
 
 #define OMAP44XX_PRM_REGADDR(inst, reg)                                \
-       OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE + (inst) + (reg))
+       OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE + (inst) + (reg))
 
 
 /* PRM instances */
 #define OMAP4430_PRM_CAM_INST          0x1000
 #define OMAP4430_PRM_DSS_INST          0x1100
 #define OMAP4430_PRM_GFX_INST          0x1200
-#define OMAP4430_PRM_L3INIT_INST               0x1300
+#define OMAP4430_PRM_L3INIT_INST       0x1300
 #define OMAP4430_PRM_L4PER_INST                0x1400
-#define OMAP4430_PRM_CEFUSE_INST               0x1600
+#define OMAP4430_PRM_CEFUSE_INST       0x1600
 #define OMAP4430_PRM_WKUP_INST         0x1700
 #define OMAP4430_PRM_WKUP_CM_INST      0x1800
 #define OMAP4430_PRM_EMU_INST          0x1900
-#define OMAP4430_PRM_EMU_CM_INST               0x1a00
-#define OMAP4430_PRM_DEVICE_INST               0x1b00
+#define OMAP4430_PRM_EMU_CM_INST       0x1a00
+#define OMAP4430_PRM_DEVICE_INST       0x1b00
 #define OMAP4430_PRM_INSTR_INST                0x1f00
 
 /* PRM clockdomain register offsets (from instance start) */
-#define OMAP4430_PRM_MPU_MPU_CDOFFS            0x0000
-#define OMAP4430_PRM_TESLA_TESLA_CDOFFS                0x0000
-#define OMAP4430_PRM_ABE_ABE_CDOFFS            0x0000
-#define OMAP4430_PRM_CORE_CORE_CDOFFS          0x0000
-#define OMAP4430_PRM_IVAHD_IVAHD_CDOFFS                0x0000
-#define OMAP4430_PRM_CAM_CAM_CDOFFS            0x0000
-#define OMAP4430_PRM_DSS_DSS_CDOFFS            0x0000
-#define OMAP4430_PRM_GFX_GFX_CDOFFS            0x0000
-#define OMAP4430_PRM_L3INIT_L3INIT_CDOFFS      0x0000
-#define OMAP4430_PRM_L4PER_L4PER_CDOFFS                0x0000
-#define OMAP4430_PRM_CEFUSE_CEFUSE_CDOFFS      0x0000
 #define OMAP4430_PRM_WKUP_CM_WKUP_CDOFFS       0x0000
-#define OMAP4430_PRM_EMU_EMU_CDOFFS            0x0000
 #define OMAP4430_PRM_EMU_CM_EMU_CDOFFS         0x0000
 
 /* OMAP4 specific register offsets */
 #define OMAP4430_RM_MEMIF_DLL_H_CONTEXT                        OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x0464)
 #define OMAP4_RM_D2D_SAD2D_CONTEXT_OFFSET              0x0524
 #define OMAP4430_RM_D2D_SAD2D_CONTEXT                  OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x0524)
-#define OMAP4_RM_D2D_INSTEM_ICR_CONTEXT_OFFSET         0x052c
-#define OMAP4430_RM_D2D_INSTEM_ICR_CONTEXT             OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x052c)
+#define OMAP4_RM_D2D_MODEM_ICR_CONTEXT_OFFSET          0x052c
+#define OMAP4430_RM_D2D_MODEM_ICR_CONTEXT              OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x052c)
 #define OMAP4_RM_D2D_SAD2D_FW_CONTEXT_OFFSET           0x0534
 #define OMAP4430_RM_D2D_SAD2D_FW_CONTEXT               OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x0534)
 #define OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET           0x0624
 #define OMAP4430_PRM_VC_VAL_BYPASS                     OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00a0)
 #define OMAP4_PRM_VC_CFG_CHANNEL_OFFSET                        0x00a4
 #define OMAP4430_PRM_VC_CFG_CHANNEL                    OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00a4)
-#define OMAP4_PRM_VC_CFG_I2C_INSTE_OFFSET              0x00a8
-#define OMAP4430_PRM_VC_CFG_I2C_INSTE                  OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00a8)
+#define OMAP4_PRM_VC_CFG_I2C_MODE_OFFSET               0x00a8
+#define OMAP4430_PRM_VC_CFG_I2C_MODE                   OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00a8)
 #define OMAP4_PRM_VC_CFG_I2C_CLK_OFFSET                        0x00ac
 #define OMAP4430_PRM_VC_CFG_I2C_CLK                    OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00ac)
 #define OMAP4_PRM_SRAM_COUNT_OFFSET                    0x00b0
 #define OMAP4430_PRM_PHASE2A_CNDP                      OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00ec)
 #define OMAP4_PRM_PHASE2B_CNDP_OFFSET                  0x00f0
 #define OMAP4430_PRM_PHASE2B_CNDP                      OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f0)
-#define OMAP4_PRM_INSTEM_IF_CTRL_OFFSET                        0x00f4
-#define OMAP4430_PRM_INSTEM_IF_CTRL                    OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f4)
+#define OMAP4_PRM_MODEM_IF_CTRL_OFFSET                 0x00f4
+#define OMAP4430_PRM_MODEM_IF_CTRL                     OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f4)
 #define OMAP4_PRM_VC_ERRST_OFFSET                      0x00f8
 #define OMAP4430_PRM_VC_ERRST                          OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f8)
 
index fb7dc52394a8fd8a872fb0e1f22d0cc867a3df9b..2ce2fb7664bc60992f7f5eebbbed3fc57345ac9e 100644 (file)
@@ -143,7 +143,7 @@ static irqreturn_t sr_interrupt(int irq, void *data)
                sr_write_reg(sr_info, IRQSTATUS, status);
        }
 
-       if (sr_class->class_type == SR_CLASS2 && sr_class->notify)
+       if (sr_class->notify)
                sr_class->notify(sr_info->voltdm, status);
 
        return IRQ_HANDLED;
@@ -258,9 +258,7 @@ static int sr_late_init(struct omap_sr *sr_info)
        struct resource *mem;
        int ret = 0;
 
-       if (sr_class->class_type == SR_CLASS2 &&
-               sr_class->notify_flags && sr_info->irq) {
-
+       if (sr_class->notify && sr_class->notify_flags && sr_info->irq) {
                name = kasprintf(GFP_KERNEL, "sr_%s", sr_info->voltdm->name);
                if (name == NULL) {
                        ret = -ENOMEM;
@@ -270,6 +268,7 @@ static int sr_late_init(struct omap_sr *sr_info)
                                0, name, (void *)sr_info);
                if (ret)
                        goto error;
+               disable_irq(sr_info->irq);
        }
 
        if (pdata && pdata->enable_on_init)
@@ -278,16 +277,16 @@ static int sr_late_init(struct omap_sr *sr_info)
        return ret;
 
 error:
-               iounmap(sr_info->base);
-               mem = platform_get_resource(sr_info->pdev, IORESOURCE_MEM, 0);
-               release_mem_region(mem->start, resource_size(mem));
-               list_del(&sr_info->node);
-               dev_err(&sr_info->pdev->dev, "%s: ERROR in registering"
-                       "interrupt handler. Smartreflex will"
-                       "not function as desired\n", __func__);
-               kfree(name);
-               kfree(sr_info);
-               return ret;
+       iounmap(sr_info->base);
+       mem = platform_get_resource(sr_info->pdev, IORESOURCE_MEM, 0);
+       release_mem_region(mem->start, resource_size(mem));
+       list_del(&sr_info->node);
+       dev_err(&sr_info->pdev->dev, "%s: ERROR in registering"
+               "interrupt handler. Smartreflex will"
+               "not function as desired\n", __func__);
+       kfree(name);
+       kfree(sr_info);
+       return ret;
 }
 
 static void sr_v1_disable(struct omap_sr *sr)
@@ -808,10 +807,13 @@ static int omap_sr_autocomp_store(void *data, u64 val)
                return -EINVAL;
        }
 
-       if (!val)
-               sr_stop_vddautocomp(sr_info);
-       else
-               sr_start_vddautocomp(sr_info);
+       /* control enable/disable only if there is a delta in value */
+       if (sr_info->autocomp_active != val) {
+               if (!val)
+                       sr_stop_vddautocomp(sr_info);
+               else
+                       sr_start_vddautocomp(sr_info);
+       }
 
        return 0;
 }
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
deleted file mode 100644 (file)
index 3b9cf85..0000000
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * linux/arch/arm/mach-omap2/timer-gp.c
- *
- * OMAP2 GP timer support.
- *
- * Copyright (C) 2009 Nokia Corporation
- *
- * Update to use new clocksource/clockevent layers
- * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
- * Copyright (C) 2007 MontaVista Software, Inc.
- *
- * Original driver:
- * Copyright (C) 2005 Nokia Corporation
- * Author: Paul Mundt <paul.mundt@nokia.com>
- *         Juha Yrjölä <juha.yrjola@nokia.com>
- * OMAP Dual-mode timer framework support by Timo Teras
- *
- * Some parts based off of TI's 24xx code:
- *
- * Copyright (C) 2004-2009 Texas Instruments, Inc.
- *
- * Roughly modelled after the OMAP1 MPU timer code.
- * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
- *
- * 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.
- */
-#include <linux/init.h>
-#include <linux/time.h>
-#include <linux/interrupt.h>
-#include <linux/err.h>
-#include <linux/clk.h>
-#include <linux/delay.h>
-#include <linux/irq.h>
-#include <linux/clocksource.h>
-#include <linux/clockchips.h>
-
-#include <asm/mach/time.h>
-#include <plat/dmtimer.h>
-#include <asm/localtimer.h>
-#include <asm/sched_clock.h>
-#include <plat/common.h>
-#include <plat/omap_hwmod.h>
-
-#include "timer-gp.h"
-
-
-/* MAX_GPTIMER_ID: number of GPTIMERs on the chip */
-#define MAX_GPTIMER_ID         12
-
-static struct omap_dm_timer *gptimer;
-static struct clock_event_device clockevent_gpt;
-static u8 __initdata gptimer_id = 1;
-static u8 __initdata inited;
-struct omap_dm_timer *gptimer_wakeup;
-
-static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
-{
-       struct omap_dm_timer *gpt = (struct omap_dm_timer *)dev_id;
-       struct clock_event_device *evt = &clockevent_gpt;
-
-       omap_dm_timer_write_status(gpt, OMAP_TIMER_INT_OVERFLOW);
-
-       evt->event_handler(evt);
-       return IRQ_HANDLED;
-}
-
-static struct irqaction omap2_gp_timer_irq = {
-       .name           = "gp timer",
-       .flags          = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
-       .handler        = omap2_gp_timer_interrupt,
-};
-
-static int omap2_gp_timer_set_next_event(unsigned long cycles,
-                                        struct clock_event_device *evt)
-{
-       omap_dm_timer_set_load_start(gptimer, 0, 0xffffffff - cycles);
-
-       return 0;
-}
-
-static void omap2_gp_timer_set_mode(enum clock_event_mode mode,
-                                   struct clock_event_device *evt)
-{
-       u32 period;
-
-       omap_dm_timer_stop(gptimer);
-
-       switch (mode) {
-       case CLOCK_EVT_MODE_PERIODIC:
-               period = clk_get_rate(omap_dm_timer_get_fclk(gptimer)) / HZ;
-               period -= 1;
-               omap_dm_timer_set_load_start(gptimer, 1, 0xffffffff - period);
-               break;
-       case CLOCK_EVT_MODE_ONESHOT:
-               break;
-       case CLOCK_EVT_MODE_UNUSED:
-       case CLOCK_EVT_MODE_SHUTDOWN:
-       case CLOCK_EVT_MODE_RESUME:
-               break;
-       }
-}
-
-static struct clock_event_device clockevent_gpt = {
-       .name           = "gp timer",
-       .features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
-       .shift          = 32,
-       .set_next_event = omap2_gp_timer_set_next_event,
-       .set_mode       = omap2_gp_timer_set_mode,
-};
-
-/**
- * omap2_gp_clockevent_set_gptimer - set which GPTIMER is used for clockevents
- * @id: GPTIMER to use (1..MAX_GPTIMER_ID)
- *
- * Define the GPTIMER that the system should use for the tick timer.
- * Meant to be called from board-*.c files in the event that GPTIMER1, the
- * default, is unsuitable.  Returns -EINVAL on error or 0 on success.
- */
-int __init omap2_gp_clockevent_set_gptimer(u8 id)
-{
-       if (id < 1 || id > MAX_GPTIMER_ID)
-               return -EINVAL;
-
-       BUG_ON(inited);
-
-       gptimer_id = id;
-
-       return 0;
-}
-
-static void __init omap2_gp_clockevent_init(void)
-{
-       u32 tick_rate;
-       int src;
-       char clockevent_hwmod_name[8]; /* 8 = sizeof("timerXX0") */
-
-       inited = 1;
-
-       sprintf(clockevent_hwmod_name, "timer%d", gptimer_id);
-       omap_hwmod_setup_one(clockevent_hwmod_name);
-
-       gptimer = omap_dm_timer_request_specific(gptimer_id);
-       BUG_ON(gptimer == NULL);
-       gptimer_wakeup = gptimer;
-
-#if defined(CONFIG_OMAP_32K_TIMER)
-       src = OMAP_TIMER_SRC_32_KHZ;
-#else
-       src = OMAP_TIMER_SRC_SYS_CLK;
-       WARN(gptimer_id == 12, "WARNING: GPTIMER12 can only use the "
-            "secure 32KiHz clock source\n");
-#endif
-
-       if (gptimer_id != 12)
-               WARN(IS_ERR_VALUE(omap_dm_timer_set_source(gptimer, src)),
-                    "timer-gp: omap_dm_timer_set_source() failed\n");
-
-       tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gptimer));
-
-       pr_info("OMAP clockevent source: GPTIMER%d at %u Hz\n",
-               gptimer_id, tick_rate);
-
-       omap2_gp_timer_irq.dev_id = (void *)gptimer;
-       setup_irq(omap_dm_timer_get_irq(gptimer), &omap2_gp_timer_irq);
-       omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW);
-
-       clockevent_gpt.mult = div_sc(tick_rate, NSEC_PER_SEC,
-                                    clockevent_gpt.shift);
-       clockevent_gpt.max_delta_ns =
-               clockevent_delta2ns(0xffffffff, &clockevent_gpt);
-       clockevent_gpt.min_delta_ns =
-               clockevent_delta2ns(3, &clockevent_gpt);
-               /* Timer internal resynch latency. */
-
-       clockevent_gpt.cpumask = cpumask_of(0);
-       clockevents_register_device(&clockevent_gpt);
-}
-
-/* Clocksource code */
-
-#ifdef CONFIG_OMAP_32K_TIMER
-/* 
- * When 32k-timer is enabled, don't use GPTimer for clocksource
- * instead, just leave default clocksource which uses the 32k
- * sync counter.  See clocksource setup in plat-omap/counter_32k.c
- */
-
-static void __init omap2_gp_clocksource_init(void)
-{
-       omap_init_clocksource_32k();
-}
-
-#else
-/*
- * clocksource
- */
-static DEFINE_CLOCK_DATA(cd);
-static struct omap_dm_timer *gpt_clocksource;
-static cycle_t clocksource_read_cycles(struct clocksource *cs)
-{
-       return (cycle_t)omap_dm_timer_read_counter(gpt_clocksource);
-}
-
-static struct clocksource clocksource_gpt = {
-       .name           = "gp timer",
-       .rating         = 300,
-       .read           = clocksource_read_cycles,
-       .mask           = CLOCKSOURCE_MASK(32),
-       .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
-};
-
-static void notrace dmtimer_update_sched_clock(void)
-{
-       u32 cyc;
-
-       cyc = omap_dm_timer_read_counter(gpt_clocksource);
-
-       update_sched_clock(&cd, cyc, (u32)~0);
-}
-
-/* Setup free-running counter for clocksource */
-static void __init omap2_gp_clocksource_init(void)
-{
-       static struct omap_dm_timer *gpt;
-       u32 tick_rate;
-       static char err1[] __initdata = KERN_ERR
-               "%s: failed to request dm-timer\n";
-       static char err2[] __initdata = KERN_ERR
-               "%s: can't register clocksource!\n";
-
-       gpt = omap_dm_timer_request();
-       if (!gpt)
-               printk(err1, clocksource_gpt.name);
-       gpt_clocksource = gpt;
-
-       omap_dm_timer_set_source(gpt, OMAP_TIMER_SRC_SYS_CLK);
-       tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gpt));
-
-       omap_dm_timer_set_load_start(gpt, 1, 0);
-
-       init_sched_clock(&cd, dmtimer_update_sched_clock, 32, tick_rate);
-
-       if (clocksource_register_hz(&clocksource_gpt, tick_rate))
-               printk(err2, clocksource_gpt.name);
-}
-#endif
-
-static void __init omap2_gp_timer_init(void)
-{
-#ifdef CONFIG_LOCAL_TIMERS
-       if (cpu_is_omap44xx()) {
-               twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
-               BUG_ON(!twd_base);
-       }
-#endif
-       omap_dm_timer_init();
-
-       omap2_gp_clockevent_init();
-       omap2_gp_clocksource_init();
-}
-
-struct sys_timer omap_timer = {
-       .init   = omap2_gp_timer_init,
-};
diff --git a/arch/arm/mach-omap2/timer-gp.h b/arch/arm/mach-omap2/timer-gp.h
deleted file mode 100644 (file)
index 5c1072c..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * OMAP2/3 GPTIMER support.headers
- *
- * Copyright (C) 2009 Nokia Corporation
- *
- * 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 __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_TIMER_GP_H
-#define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_TIMER_GP_H
-
-extern int __init omap2_gp_clockevent_set_gptimer(u8 id);
-
-#endif
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
new file mode 100644 (file)
index 0000000..e964072
--- /dev/null
@@ -0,0 +1,342 @@
+/*
+ * linux/arch/arm/mach-omap2/timer.c
+ *
+ * OMAP2 GP timer support.
+ *
+ * Copyright (C) 2009 Nokia Corporation
+ *
+ * Update to use new clocksource/clockevent layers
+ * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
+ * Copyright (C) 2007 MontaVista Software, Inc.
+ *
+ * Original driver:
+ * Copyright (C) 2005 Nokia Corporation
+ * Author: Paul Mundt <paul.mundt@nokia.com>
+ *         Juha Yrjölä <juha.yrjola@nokia.com>
+ * OMAP Dual-mode timer framework support by Timo Teras
+ *
+ * Some parts based off of TI's 24xx code:
+ *
+ * Copyright (C) 2004-2009 Texas Instruments, Inc.
+ *
+ * Roughly modelled after the OMAP1 MPU timer code.
+ * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
+ *
+ * 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.
+ */
+#include <linux/init.h>
+#include <linux/time.h>
+#include <linux/interrupt.h>
+#include <linux/err.h>
+#include <linux/clk.h>
+#include <linux/delay.h>
+#include <linux/irq.h>
+#include <linux/clocksource.h>
+#include <linux/clockchips.h>
+
+#include <asm/mach/time.h>
+#include <plat/dmtimer.h>
+#include <asm/localtimer.h>
+#include <asm/sched_clock.h>
+#include <plat/common.h>
+#include <plat/omap_hwmod.h>
+
+/* Parent clocks, eventually these will come from the clock framework */
+
+#define OMAP2_MPU_SOURCE       "sys_ck"
+#define OMAP3_MPU_SOURCE       OMAP2_MPU_SOURCE
+#define OMAP4_MPU_SOURCE       "sys_clkin_ck"
+#define OMAP2_32K_SOURCE       "func_32k_ck"
+#define OMAP3_32K_SOURCE       "omap_32k_fck"
+#define OMAP4_32K_SOURCE       "sys_32k_ck"
+
+#ifdef CONFIG_OMAP_32K_TIMER
+#define OMAP2_CLKEV_SOURCE     OMAP2_32K_SOURCE
+#define OMAP3_CLKEV_SOURCE     OMAP3_32K_SOURCE
+#define OMAP4_CLKEV_SOURCE     OMAP4_32K_SOURCE
+#define OMAP3_SECURE_TIMER     12
+#else
+#define OMAP2_CLKEV_SOURCE     OMAP2_MPU_SOURCE
+#define OMAP3_CLKEV_SOURCE     OMAP3_MPU_SOURCE
+#define OMAP4_CLKEV_SOURCE     OMAP4_MPU_SOURCE
+#define OMAP3_SECURE_TIMER     1
+#endif
+
+/* MAX_GPTIMER_ID: number of GPTIMERs on the chip */
+#define MAX_GPTIMER_ID         12
+
+u32 sys_timer_reserved;
+
+/* Clockevent code */
+
+static struct omap_dm_timer clkev;
+static struct clock_event_device clockevent_gpt;
+
+static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
+{
+       struct clock_event_device *evt = &clockevent_gpt;
+
+       __omap_dm_timer_write_status(clkev.io_base, OMAP_TIMER_INT_OVERFLOW);
+
+       evt->event_handler(evt);
+       return IRQ_HANDLED;
+}
+
+static struct irqaction omap2_gp_timer_irq = {
+       .name           = "gp timer",
+       .flags          = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
+       .handler        = omap2_gp_timer_interrupt,
+};
+
+static int omap2_gp_timer_set_next_event(unsigned long cycles,
+                                        struct clock_event_device *evt)
+{
+       __omap_dm_timer_load_start(clkev.io_base, OMAP_TIMER_CTRL_ST,
+                                               0xffffffff - cycles, 1);
+
+       return 0;
+}
+
+static void omap2_gp_timer_set_mode(enum clock_event_mode mode,
+                                   struct clock_event_device *evt)
+{
+       u32 period;
+
+       __omap_dm_timer_stop(clkev.io_base, 1, clkev.rate);
+
+       switch (mode) {
+       case CLOCK_EVT_MODE_PERIODIC:
+               period = clkev.rate / HZ;
+               period -= 1;
+               /* Looks like we need to first set the load value separately */
+               __omap_dm_timer_write(clkev.io_base, OMAP_TIMER_LOAD_REG,
+                                       0xffffffff - period, 1);
+               __omap_dm_timer_load_start(clkev.io_base,
+                                       OMAP_TIMER_CTRL_AR | OMAP_TIMER_CTRL_ST,
+                                               0xffffffff - period, 1);
+               break;
+       case CLOCK_EVT_MODE_ONESHOT:
+               break;
+       case CLOCK_EVT_MODE_UNUSED:
+       case CLOCK_EVT_MODE_SHUTDOWN:
+       case CLOCK_EVT_MODE_RESUME:
+               break;
+       }
+}
+
+static struct clock_event_device clockevent_gpt = {
+       .name           = "gp timer",
+       .features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
+       .shift          = 32,
+       .set_next_event = omap2_gp_timer_set_next_event,
+       .set_mode       = omap2_gp_timer_set_mode,
+};
+
+static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
+                                               int gptimer_id,
+                                               const char *fck_source)
+{
+       char name[10]; /* 10 = sizeof("gptXX_Xck0") */
+       struct omap_hwmod *oh;
+       size_t size;
+       int res = 0;
+
+       sprintf(name, "timer%d", gptimer_id);
+       omap_hwmod_setup_one(name);
+       oh = omap_hwmod_lookup(name);
+       if (!oh)
+               return -ENODEV;
+
+       timer->irq = oh->mpu_irqs[0].irq;
+       timer->phys_base = oh->slaves[0]->addr->pa_start;
+       size = oh->slaves[0]->addr->pa_end - timer->phys_base;
+
+       /* Static mapping, never released */
+       timer->io_base = ioremap(timer->phys_base, size);
+       if (!timer->io_base)
+               return -ENXIO;
+
+       /* After the dmtimer is using hwmod these clocks won't be needed */
+       sprintf(name, "gpt%d_fck", gptimer_id);
+       timer->fclk = clk_get(NULL, name);
+       if (IS_ERR(timer->fclk))
+               return -ENODEV;
+
+       sprintf(name, "gpt%d_ick", gptimer_id);
+       timer->iclk = clk_get(NULL, name);
+       if (IS_ERR(timer->iclk)) {
+               clk_put(timer->fclk);
+               return -ENODEV;
+       }
+
+       omap_hwmod_enable(oh);
+
+       sys_timer_reserved |= (1 << (gptimer_id - 1));
+
+       if (gptimer_id != 12) {
+               struct clk *src;
+
+               src = clk_get(NULL, fck_source);
+               if (IS_ERR(src)) {
+                       res = -EINVAL;
+               } else {
+                       res = __omap_dm_timer_set_source(timer->fclk, src);
+                       if (IS_ERR_VALUE(res))
+                               pr_warning("%s: timer%i cannot set source\n",
+                                               __func__, gptimer_id);
+                       clk_put(src);
+               }
+       }
+       __omap_dm_timer_reset(timer->io_base, 1, 1);
+       timer->posted = 1;
+
+       timer->rate = clk_get_rate(timer->fclk);
+
+       timer->reserved = 1;
+
+       return res;
+}
+
+static void __init omap2_gp_clockevent_init(int gptimer_id,
+                                               const char *fck_source)
+{
+       int res;
+
+       res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source);
+       BUG_ON(res);
+
+       omap2_gp_timer_irq.dev_id = (void *)&clkev;
+       setup_irq(clkev.irq, &omap2_gp_timer_irq);
+
+       __omap_dm_timer_int_enable(clkev.io_base, OMAP_TIMER_INT_OVERFLOW);
+
+       clockevent_gpt.mult = div_sc(clkev.rate, NSEC_PER_SEC,
+                                    clockevent_gpt.shift);
+       clockevent_gpt.max_delta_ns =
+               clockevent_delta2ns(0xffffffff, &clockevent_gpt);
+       clockevent_gpt.min_delta_ns =
+               clockevent_delta2ns(3, &clockevent_gpt);
+               /* Timer internal resynch latency. */
+
+       clockevent_gpt.cpumask = cpumask_of(0);
+       clockevents_register_device(&clockevent_gpt);
+
+       pr_info("OMAP clockevent source: GPTIMER%d at %lu Hz\n",
+               gptimer_id, clkev.rate);
+}
+
+/* Clocksource code */
+
+#ifdef CONFIG_OMAP_32K_TIMER
+/*
+ * When 32k-timer is enabled, don't use GPTimer for clocksource
+ * instead, just leave default clocksource which uses the 32k
+ * sync counter.  See clocksource setup in plat-omap/counter_32k.c
+ */
+
+static void __init omap2_gp_clocksource_init(int unused, const char *dummy)
+{
+       omap_init_clocksource_32k();
+}
+
+#else
+
+static struct omap_dm_timer clksrc;
+
+/*
+ * clocksource
+ */
+static DEFINE_CLOCK_DATA(cd);
+static cycle_t clocksource_read_cycles(struct clocksource *cs)
+{
+       return (cycle_t)__omap_dm_timer_read_counter(clksrc.io_base, 1);
+}
+
+static struct clocksource clocksource_gpt = {
+       .name           = "gp timer",
+       .rating         = 300,
+       .read           = clocksource_read_cycles,
+       .mask           = CLOCKSOURCE_MASK(32),
+       .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
+};
+
+static void notrace dmtimer_update_sched_clock(void)
+{
+       u32 cyc;
+
+       cyc = __omap_dm_timer_read_counter(clksrc.io_base, 1);
+
+       update_sched_clock(&cd, cyc, (u32)~0);
+}
+
+unsigned long long notrace sched_clock(void)
+{
+       u32 cyc = 0;
+
+       if (clksrc.reserved)
+               cyc = __omap_dm_timer_read_counter(clksrc.io_base, 1);
+
+       return cyc_to_sched_clock(&cd, cyc, (u32)~0);
+}
+
+/* Setup free-running counter for clocksource */
+static void __init omap2_gp_clocksource_init(int gptimer_id,
+                                               const char *fck_source)
+{
+       int res;
+
+       res = omap_dm_timer_init_one(&clksrc, gptimer_id, fck_source);
+       BUG_ON(res);
+
+       pr_info("OMAP clocksource: GPTIMER%d at %lu Hz\n",
+               gptimer_id, clksrc.rate);
+
+       __omap_dm_timer_load_start(clksrc.io_base, OMAP_TIMER_CTRL_ST, 0, 1);
+       init_sched_clock(&cd, dmtimer_update_sched_clock, 32, clksrc.rate);
+
+       if (clocksource_register_hz(&clocksource_gpt, clksrc.rate))
+               pr_err("Could not register clocksource %s\n",
+                       clocksource_gpt.name);
+}
+#endif
+
+#define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src,                 \
+                               clksrc_nr, clksrc_src)                  \
+static void __init omap##name##_timer_init(void)                       \
+{                                                                      \
+       omap2_gp_clockevent_init((clkev_nr), clkev_src);                \
+       omap2_gp_clocksource_init((clksrc_nr), clksrc_src);             \
+}
+
+#define OMAP_SYS_TIMER(name)                                           \
+struct sys_timer omap##name##_timer = {                                        \
+       .init   = omap##name##_timer_init,                              \
+};
+
+#ifdef CONFIG_ARCH_OMAP2
+OMAP_SYS_TIMER_INIT(2, 1, OMAP2_CLKEV_SOURCE, 2, OMAP2_MPU_SOURCE)
+OMAP_SYS_TIMER(2)
+#endif
+
+#ifdef CONFIG_ARCH_OMAP3
+OMAP_SYS_TIMER_INIT(3, 1, OMAP3_CLKEV_SOURCE, 2, OMAP3_MPU_SOURCE)
+OMAP_SYS_TIMER(3)
+OMAP_SYS_TIMER_INIT(3_secure, OMAP3_SECURE_TIMER, OMAP3_CLKEV_SOURCE,
+                       2, OMAP3_MPU_SOURCE)
+OMAP_SYS_TIMER(3_secure)
+#endif
+
+#ifdef CONFIG_ARCH_OMAP4
+static void __init omap4_timer_init(void)
+{
+#ifdef CONFIG_LOCAL_TIMERS
+       twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
+       BUG_ON(!twd_base);
+#endif
+       omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE);
+       omap2_gp_clocksource_init(2, OMAP4_MPU_SOURCE);
+}
+OMAP_SYS_TIMER(4)
+#endif
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
new file mode 100644 (file)
index 0000000..3aaa46f
--- /dev/null
@@ -0,0 +1,304 @@
+/*
+ * twl-common.c
+ *
+ * Copyright (C) 2011 Texas Instruments, Inc..
+ * Author: Peter Ujfalusi <peter.ujfalusi@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.
+ *
+ * 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 St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <linux/i2c.h>
+#include <linux/i2c/twl.h>
+#include <linux/gpio.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
+
+#include <plat/i2c.h>
+#include <plat/usb.h>
+
+#include "twl-common.h"
+
+static struct i2c_board_info __initdata pmic_i2c_board_info = {
+       .addr           = 0x48,
+       .flags          = I2C_CLIENT_WAKE,
+};
+
+void __init omap_pmic_init(int bus, u32 clkrate,
+                          const char *pmic_type, int pmic_irq,
+                          struct twl4030_platform_data *pmic_data)
+{
+       strncpy(pmic_i2c_board_info.type, pmic_type,
+               sizeof(pmic_i2c_board_info.type));
+       pmic_i2c_board_info.irq = pmic_irq;
+       pmic_i2c_board_info.platform_data = pmic_data;
+
+       omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
+}
+
+static struct twl4030_usb_data omap4_usb_pdata = {
+       .phy_init       = omap4430_phy_init,
+       .phy_exit       = omap4430_phy_exit,
+       .phy_power      = omap4430_phy_power,
+       .phy_set_clock  = omap4430_phy_set_clk,
+       .phy_suspend    = omap4430_phy_suspend,
+};
+
+static struct twl4030_usb_data omap3_usb_pdata = {
+       .usb_mode       = T2_USB_MODE_ULPI,
+};
+
+static int omap3_batt_table[] = {
+/* 0 C */
+30800, 29500, 28300, 27100,
+26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
+17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
+11600, 11200, 10800, 10400, 10000, 9630,  9280,  8950,  8620,  8310,
+8020,  7730,  7460,  7200,  6950,  6710,  6470,  6250,  6040,  5830,
+5640,  5450,  5260,  5090,  4920,  4760,  4600,  4450,  4310,  4170,
+4040,  3910,  3790,  3670,  3550
+};
+
+static struct twl4030_bci_platform_data omap3_bci_pdata = {
+       .battery_tmp_tbl        = omap3_batt_table,
+       .tblsize                = ARRAY_SIZE(omap3_batt_table),
+};
+
+static struct twl4030_madc_platform_data omap3_madc_pdata = {
+       .irq_line       = 1,
+};
+
+static struct twl4030_codec_audio_data omap3_audio;
+
+static struct twl4030_codec_data omap3_codec_pdata = {
+       .audio_mclk = 26000000,
+       .audio = &omap3_audio,
+};
+
+static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
+       REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
+};
+
+static struct regulator_init_data omap3_vdac_idata = {
+       .constraints = {
+               .min_uV                 = 1800000,
+               .max_uV                 = 1800000,
+               .valid_modes_mask       = REGULATOR_MODE_NORMAL
+                                       | REGULATOR_MODE_STANDBY,
+               .valid_ops_mask         = REGULATOR_CHANGE_MODE
+                                       | REGULATOR_CHANGE_STATUS,
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(omap3_vdda_dac_supplies),
+       .consumer_supplies      = omap3_vdda_dac_supplies,
+};
+
+static struct regulator_consumer_supply omap3_vpll2_supplies[] = {
+       REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
+       REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
+};
+
+static struct regulator_init_data omap3_vpll2_idata = {
+       .constraints = {
+               .min_uV                 = 1800000,
+               .max_uV                 = 1800000,
+               .valid_modes_mask       = REGULATOR_MODE_NORMAL
+                                       | REGULATOR_MODE_STANDBY,
+               .valid_ops_mask         = REGULATOR_CHANGE_MODE
+                                       | REGULATOR_CHANGE_STATUS,
+       },
+       .num_consumer_supplies          = ARRAY_SIZE(omap3_vpll2_supplies),
+       .consumer_supplies              = omap3_vpll2_supplies,
+};
+
+static struct regulator_init_data omap4_vdac_idata = {
+       .constraints = {
+               .min_uV                 = 1800000,
+               .max_uV                 = 1800000,
+               .valid_modes_mask       = REGULATOR_MODE_NORMAL
+                                       | REGULATOR_MODE_STANDBY,
+               .valid_ops_mask         = REGULATOR_CHANGE_MODE
+                                       | REGULATOR_CHANGE_STATUS,
+       },
+};
+
+static struct regulator_init_data omap4_vaux2_idata = {
+       .constraints = {
+               .min_uV                 = 1200000,
+               .max_uV                 = 2800000,
+               .apply_uV               = true,
+               .valid_modes_mask       = REGULATOR_MODE_NORMAL
+                                       | REGULATOR_MODE_STANDBY,
+               .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
+                                       | REGULATOR_CHANGE_MODE
+                                       | REGULATOR_CHANGE_STATUS,
+       },
+};
+
+static struct regulator_init_data omap4_vaux3_idata = {
+       .constraints = {
+               .min_uV                 = 1000000,
+               .max_uV                 = 3000000,
+               .apply_uV               = true,
+               .valid_modes_mask       = REGULATOR_MODE_NORMAL
+                                       | REGULATOR_MODE_STANDBY,
+               .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
+                                       | REGULATOR_CHANGE_MODE
+                                       | REGULATOR_CHANGE_STATUS,
+       },
+};
+
+static struct regulator_consumer_supply omap4_vmmc_supply[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
+};
+
+/* VMMC1 for MMC1 card */
+static struct regulator_init_data omap4_vmmc_idata = {
+       .constraints = {
+               .min_uV                 = 1200000,
+               .max_uV                 = 3000000,
+               .apply_uV               = true,
+               .valid_modes_mask       = REGULATOR_MODE_NORMAL
+                                       | REGULATOR_MODE_STANDBY,
+               .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
+                                       | REGULATOR_CHANGE_MODE
+                                       | REGULATOR_CHANGE_STATUS,
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(omap4_vmmc_supply),
+       .consumer_supplies      = omap4_vmmc_supply,
+};
+
+static struct regulator_init_data omap4_vpp_idata = {
+       .constraints = {
+               .min_uV                 = 1800000,
+               .max_uV                 = 2500000,
+               .apply_uV               = true,
+               .valid_modes_mask       = REGULATOR_MODE_NORMAL
+                                       | REGULATOR_MODE_STANDBY,
+               .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
+                                       | REGULATOR_CHANGE_MODE
+                                       | REGULATOR_CHANGE_STATUS,
+       },
+};
+
+static struct regulator_init_data omap4_vana_idata = {
+       .constraints = {
+               .min_uV                 = 2100000,
+               .max_uV                 = 2100000,
+               .valid_modes_mask       = REGULATOR_MODE_NORMAL
+                                       | REGULATOR_MODE_STANDBY,
+               .valid_ops_mask         = REGULATOR_CHANGE_MODE
+                                       | REGULATOR_CHANGE_STATUS,
+       },
+};
+
+static struct regulator_init_data omap4_vcxio_idata = {
+       .constraints = {
+               .min_uV                 = 1800000,
+               .max_uV                 = 1800000,
+               .valid_modes_mask       = REGULATOR_MODE_NORMAL
+                                       | REGULATOR_MODE_STANDBY,
+               .valid_ops_mask         = REGULATOR_CHANGE_MODE
+                                       | REGULATOR_CHANGE_STATUS,
+       },
+};
+
+static struct regulator_init_data omap4_vusb_idata = {
+       .constraints = {
+               .min_uV                 = 3300000,
+               .max_uV                 = 3300000,
+               .apply_uV               = true,
+               .valid_modes_mask       = REGULATOR_MODE_NORMAL
+                                       | REGULATOR_MODE_STANDBY,
+               .valid_ops_mask         = REGULATOR_CHANGE_MODE
+                                       | REGULATOR_CHANGE_STATUS,
+       },
+};
+
+static struct regulator_init_data omap4_clk32kg_idata = {
+       .constraints = {
+               .valid_ops_mask         = REGULATOR_CHANGE_STATUS,
+       },
+};
+
+void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
+                                 u32 pdata_flags, u32 regulators_flags)
+{
+       if (!pmic_data->irq_base)
+               pmic_data->irq_base = TWL6030_IRQ_BASE;
+       if (!pmic_data->irq_end)
+               pmic_data->irq_end = TWL6030_IRQ_END;
+
+       /* Common platform data configurations */
+       if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb)
+               pmic_data->usb = &omap4_usb_pdata;
+
+       /* Common regulator configurations */
+       if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
+               pmic_data->vdac = &omap4_vdac_idata;
+
+       if (regulators_flags & TWL_COMMON_REGULATOR_VAUX2 && !pmic_data->vaux2)
+               pmic_data->vaux2 = &omap4_vaux2_idata;
+
+       if (regulators_flags & TWL_COMMON_REGULATOR_VAUX3 && !pmic_data->vaux3)
+               pmic_data->vaux3 = &omap4_vaux3_idata;
+
+       if (regulators_flags & TWL_COMMON_REGULATOR_VMMC && !pmic_data->vmmc)
+               pmic_data->vmmc = &omap4_vmmc_idata;
+
+       if (regulators_flags & TWL_COMMON_REGULATOR_VPP && !pmic_data->vpp)
+               pmic_data->vpp = &omap4_vpp_idata;
+
+       if (regulators_flags & TWL_COMMON_REGULATOR_VANA && !pmic_data->vana)
+               pmic_data->vana = &omap4_vana_idata;
+
+       if (regulators_flags & TWL_COMMON_REGULATOR_VCXIO && !pmic_data->vcxio)
+               pmic_data->vcxio = &omap4_vcxio_idata;
+
+       if (regulators_flags & TWL_COMMON_REGULATOR_VUSB && !pmic_data->vusb)
+               pmic_data->vusb = &omap4_vusb_idata;
+
+       if (regulators_flags & TWL_COMMON_REGULATOR_CLK32KG &&
+           !pmic_data->clk32kg)
+               pmic_data->clk32kg = &omap4_clk32kg_idata;
+}
+
+void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
+                                 u32 pdata_flags, u32 regulators_flags)
+{
+       if (!pmic_data->irq_base)
+               pmic_data->irq_base = TWL4030_IRQ_BASE;
+       if (!pmic_data->irq_end)
+               pmic_data->irq_end = TWL4030_IRQ_END;
+
+       /* Common platform data configurations */
+       if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb)
+               pmic_data->usb = &omap3_usb_pdata;
+
+       if (pdata_flags & TWL_COMMON_PDATA_BCI && !pmic_data->bci)
+               pmic_data->bci = &omap3_bci_pdata;
+
+       if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc)
+               pmic_data->madc = &omap3_madc_pdata;
+
+       if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->codec)
+               pmic_data->codec = &omap3_codec_pdata;
+
+       /* Common regulator configurations */
+       if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
+               pmic_data->vdac = &omap3_vdac_idata;
+
+       if (regulators_flags & TWL_COMMON_REGULATOR_VPLL2 && !pmic_data->vpll2)
+               pmic_data->vpll2 = &omap3_vpll2_idata;
+}
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
new file mode 100644 (file)
index 0000000..5e83a5b
--- /dev/null
@@ -0,0 +1,59 @@
+#ifndef __OMAP_PMIC_COMMON__
+#define __OMAP_PMIC_COMMON__
+
+#define TWL_COMMON_PDATA_USB           (1 << 0)
+#define TWL_COMMON_PDATA_BCI           (1 << 1)
+#define TWL_COMMON_PDATA_MADC          (1 << 2)
+#define TWL_COMMON_PDATA_AUDIO         (1 << 3)
+
+/* Common LDO regulators for TWL4030/TWL6030 */
+#define TWL_COMMON_REGULATOR_VDAC      (1 << 0)
+#define TWL_COMMON_REGULATOR_VAUX1     (1 << 1)
+#define TWL_COMMON_REGULATOR_VAUX2     (1 << 2)
+#define TWL_COMMON_REGULATOR_VAUX3     (1 << 3)
+
+/* TWL6030 LDO regulators */
+#define TWL_COMMON_REGULATOR_VMMC      (1 << 4)
+#define TWL_COMMON_REGULATOR_VPP       (1 << 5)
+#define TWL_COMMON_REGULATOR_VUSIM     (1 << 6)
+#define TWL_COMMON_REGULATOR_VANA      (1 << 7)
+#define TWL_COMMON_REGULATOR_VCXIO     (1 << 8)
+#define TWL_COMMON_REGULATOR_VUSB      (1 << 9)
+#define TWL_COMMON_REGULATOR_CLK32KG   (1 << 10)
+
+/* TWL4030 LDO regulators */
+#define TWL_COMMON_REGULATOR_VPLL1     (1 << 4)
+#define TWL_COMMON_REGULATOR_VPLL2     (1 << 5)
+
+
+struct twl4030_platform_data;
+
+void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq,
+                   struct twl4030_platform_data *pmic_data);
+
+static inline void omap2_pmic_init(const char *pmic_type,
+                                  struct twl4030_platform_data *pmic_data)
+{
+       omap_pmic_init(2, 2600, pmic_type, INT_24XX_SYS_NIRQ, pmic_data);
+}
+
+static inline void omap3_pmic_init(const char *pmic_type,
+                                  struct twl4030_platform_data *pmic_data)
+{
+       omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data);
+}
+
+static inline void omap4_pmic_init(const char *pmic_type,
+                                  struct twl4030_platform_data *pmic_data)
+{
+       /* Phoenix Audio IC needs I2C1 to start with 400 KHz or less */
+       omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data);
+}
+
+void omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
+                          u32 pdata_flags, u32 regulators_flags);
+
+void omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
+                          u32 pdata_flags, u32 regulators_flags);
+
+#endif /* __OMAP_PMIC_COMMON__ */
index f12c41b98d46805a05a98ccfb2878b8bdcb10a2c..b6ddd7a5db6ac77eb63de44f4cfd6d9f2b6c8937 100644 (file)
@@ -24,7 +24,7 @@ static unsigned int __init orion5x_variant(void)
 
        orion5x_pcie_id(&dev, &rev);
 
-       if (dev == MV88F5181_DEV_ID && rev >= MV88F5181L_REV_A0)
+       if (dev == MV88F5181_DEV_ID)
                return MPP_F5181_MASK;
 
        if (dev == MV88F5182_DEV_ID)
index b2248e76ec8b713b9bf1f8a01ca84aca2e845d9c..b199596f9c3daeda69dea75dbf5d16bddf6216ab 100644 (file)
@@ -12,6 +12,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#define pr_fmt(fmt) "%s: " fmt, __func__
 
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -161,10 +162,10 @@ static mfp_cfg_t cm_x3xx_mfp_cfg[] __initdata = {
        GPIO99_GPIO,                    /* Ethernet IRQ */
 
        /* RTC GPIOs */
-       GPIO95_GPIO,                    /* RTC CS */
-       GPIO96_GPIO,                    /* RTC WR */
-       GPIO97_GPIO,                    /* RTC RD */
-       GPIO98_GPIO,                    /* RTC IO */
+       GPIO95_GPIO | MFP_LPM_DRIVE_HIGH,       /* RTC CS */
+       GPIO96_GPIO | MFP_LPM_DRIVE_HIGH,       /* RTC WR */
+       GPIO97_GPIO | MFP_LPM_DRIVE_HIGH,       /* RTC RD */
+       GPIO98_GPIO,                            /* RTC IO */
 
        /* Standard I2C */
        GPIO21_I2C_SCL,
@@ -484,14 +485,13 @@ static int cm_x300_ulpi_phy_reset(void)
        int err;
 
        /* reset the PHY */
-       err = gpio_request(GPIO_ULPI_PHY_RST, "ulpi reset");
+       err = gpio_request_one(GPIO_ULPI_PHY_RST, GPIOF_OUT_INIT_LOW,
+                              "ulpi reset");
        if (err) {
-               pr_err("%s: failed to request ULPI reset GPIO: %d\n",
-                      __func__, err);
+               pr_err("failed to request ULPI reset GPIO: %d\n", err);
                return err;
        }
 
-       gpio_direction_output(GPIO_ULPI_PHY_RST, 0);
        msleep(10);
        gpio_set_value(GPIO_ULPI_PHY_RST, 1);
        msleep(10);
@@ -510,8 +510,7 @@ static inline int cm_x300_u2d_init(struct device *dev)
                pout_clk = clk_get(NULL, "CLK_POUT");
                if (IS_ERR(pout_clk)) {
                        err = PTR_ERR(pout_clk);
-                       pr_err("%s: failed to get CLK_POUT: %d\n",
-                              __func__, err);
+                       pr_err("failed to get CLK_POUT: %d\n", err);
                        return err;
                }
                clk_enable(pout_clk);
@@ -768,39 +767,36 @@ static void __init cm_x300_init_da9030(void)
        irq_set_irq_wake(IRQ_WAKEUP0, 1);
 }
 
+/* wi2wi gpio setting for system_rev >= 130 */
+static struct gpio cm_x300_wi2wi_gpios[] __initdata = {
+       { 71, GPIOF_OUT_INIT_HIGH, "wlan en" },
+       { 70, GPIOF_OUT_INIT_HIGH, "bt reset" },
+};
+
 static void __init cm_x300_init_wi2wi(void)
 {
        int bt_reset, wlan_en;
        int err;
 
        if (system_rev < 130) {
-               wlan_en = 77;
-               bt_reset = 78;
-       } else {
-               wlan_en = 71;
-               bt_reset = 70;
+               cm_x300_wi2wi_gpios[0].gpio = 77;       /* wlan en */
+               cm_x300_wi2wi_gpios[1].gpio = 78;       /* bt reset */
        }
 
        /* Libertas and CSR reset */
-       err = gpio_request(wlan_en, "wlan en");
+       err = gpio_request_array(ARRAY_AND_SIZE(cm_x300_wi2wi_gpios));
        if (err) {
-               pr_err("CM-X300: failed to request wlan en gpio: %d\n", err);
-       } else {
-               gpio_direction_output(wlan_en, 1);
-               gpio_free(wlan_en);
+               pr_err("failed to request wifi/bt gpios: %d\n", err);
+               return;
        }
 
-       err = gpio_request(bt_reset, "bt reset");
-       if (err) {
-               pr_err("CM-X300: failed to request bt reset gpio: %d\n", err);
-       } else {
-               gpio_direction_output(bt_reset, 1);
-               udelay(10);
-               gpio_set_value(bt_reset, 0);
-               udelay(10);
-               gpio_set_value(bt_reset, 1);
-               gpio_free(bt_reset);
-       }
+       udelay(10);
+       gpio_set_value(bt_reset, 0);
+       udelay(10);
+       gpio_set_value(bt_reset, 1);
+
+       gpio_free(wlan_en);
+       gpio_free(bt_reset);
 }
 
 /* MFP */
index f941a495a4a8ed1806a38233ac4236899fee4f34..99960a1814e0c32313c6f8d073094fbdf5958b00 100644 (file)
@@ -135,42 +135,6 @@ static unsigned long hx4700_pin_config[] __initdata = {
        GPIO66_GPIO,    /* nSDIO_IRQ */
 };
 
-#define HX4700_GPIO_IN(num, _desc) \
-       { .gpio = (num), .dir = 0, .desc = (_desc) }
-#define HX4700_GPIO_OUT(num, _init, _desc) \
-       { .gpio = (num), .dir = 1, .init = (_init), .desc = (_desc) }
-struct gpio_ress {
-       unsigned gpio : 8;
-       unsigned dir : 1;
-       unsigned init : 1;
-       char *desc;
-};
-
-static int hx4700_gpio_request(struct gpio_ress *gpios, int size)
-{
-       int i, rc = 0;
-       int gpio;
-       int dir;
-
-       for (i = 0; (!rc) && (i < size); i++) {
-               gpio = gpios[i].gpio;
-               dir = gpios[i].dir;
-               rc = gpio_request(gpio, gpios[i].desc);
-               if (rc) {
-                       pr_err("Error requesting GPIO %d(%s) : %d\n",
-                              gpio, gpios[i].desc, rc);
-                       continue;
-               }
-               if (dir)
-                       gpio_direction_output(gpio, gpios[i].init);
-               else
-                       gpio_direction_input(gpio);
-       }
-       while ((rc) && (--i >= 0))
-               gpio_free(gpios[i].gpio);
-       return rc;
-}
-
 /*
  * IRDA
  */
@@ -829,26 +793,30 @@ static struct platform_device *devices[] __initdata = {
        &pcmcia,
 };
 
-static struct gpio_ress global_gpios[] = {
-       HX4700_GPIO_IN(GPIO12_HX4700_ASIC3_IRQ, "ASIC3_IRQ"),
-       HX4700_GPIO_IN(GPIO13_HX4700_W3220_IRQ, "W3220_IRQ"),
-       HX4700_GPIO_IN(GPIO14_HX4700_nWLAN_IRQ, "WLAN_IRQ"),
-       HX4700_GPIO_OUT(GPIO59_HX4700_LCD_PC1,          1, "LCD_PC1"),
-       HX4700_GPIO_OUT(GPIO62_HX4700_LCD_nRESET,       1, "LCD_RESET"),
-       HX4700_GPIO_OUT(GPIO70_HX4700_LCD_SLIN1,        1, "LCD_SLIN1"),
-       HX4700_GPIO_OUT(GPIO84_HX4700_LCD_SQN,          1, "LCD_SQN"),
-       HX4700_GPIO_OUT(GPIO110_HX4700_LCD_LVDD_3V3_ON, 1, "LCD_LVDD"),
-       HX4700_GPIO_OUT(GPIO111_HX4700_LCD_AVDD_3V3_ON, 1, "LCD_AVDD"),
-       HX4700_GPIO_OUT(GPIO32_HX4700_RS232_ON,         1, "RS232_ON"),
-       HX4700_GPIO_OUT(GPIO71_HX4700_ASIC3_nRESET,     1, "ASIC3_nRESET"),
-       HX4700_GPIO_OUT(GPIO82_HX4700_EUART_RESET,      1, "EUART_RESET"),
-       HX4700_GPIO_OUT(GPIO105_HX4700_nIR_ON,          1, "nIR_EN"),
+static struct gpio global_gpios[] = {
+       { GPIO12_HX4700_ASIC3_IRQ, GPIOF_IN, "ASIC3_IRQ" },
+       { GPIO13_HX4700_W3220_IRQ, GPIOF_IN, "W3220_IRQ" },
+       { GPIO14_HX4700_nWLAN_IRQ, GPIOF_IN, "WLAN_IRQ" },
+       { GPIO59_HX4700_LCD_PC1,          GPIOF_OUT_INIT_HIGH, "LCD_PC1" },
+       { GPIO62_HX4700_LCD_nRESET,       GPIOF_OUT_INIT_HIGH, "LCD_RESET" },
+       { GPIO70_HX4700_LCD_SLIN1,        GPIOF_OUT_INIT_HIGH, "LCD_SLIN1" },
+       { GPIO84_HX4700_LCD_SQN,          GPIOF_OUT_INIT_HIGH, "LCD_SQN" },
+       { GPIO110_HX4700_LCD_LVDD_3V3_ON, GPIOF_OUT_INIT_HIGH, "LCD_LVDD" },
+       { GPIO111_HX4700_LCD_AVDD_3V3_ON, GPIOF_OUT_INIT_HIGH, "LCD_AVDD" },
+       { GPIO32_HX4700_RS232_ON,         GPIOF_OUT_INIT_HIGH, "RS232_ON" },
+       { GPIO71_HX4700_ASIC3_nRESET,     GPIOF_OUT_INIT_HIGH, "ASIC3_nRESET" },
+       { GPIO82_HX4700_EUART_RESET,      GPIOF_OUT_INIT_HIGH, "EUART_RESET" },
+       { GPIO105_HX4700_nIR_ON,          GPIOF_OUT_INIT_HIGH, "nIR_EN" },
 };
 
 static void __init hx4700_init(void)
 {
+       int ret;
+
        pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config));
-       hx4700_gpio_request(ARRAY_AND_SIZE(global_gpios));
+       ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios));
+       if (ret)
+               pr_err ("hx4700: Failed to request GPIOs.\n");
 
        pxa_set_ffuart_info(NULL);
        pxa_set_btuart_info(NULL);
index 0011055bc3f9bb7cd387b06eb16fd399eabee59e..5dfd1195a5a795be2947907dda3a24afeee108b2 100644 (file)
@@ -34,7 +34,7 @@
 #define CORGI_GPIO_LCDCON_CS           (19) /* LCD Control Chip Select */
 #define CORGI_GPIO_MAX1111_CS          (20) /* MAX1111 Chip Select */
 #define CORGI_GPIO_ADC_TEMP_ON         (21) /* Select battery voltage or temperature */
-#define CORGI_GPIO_IR_ON                       (22) /* Enable IR Transciever */
+#define CORGI_GPIO_IR_ON                       (22) /* Enable IR Transceiver */
 #define CORGI_GPIO_ADS7846_CS          (24) /* ADS7846 Chip Select */
 #define CORGI_GPIO_SD_PWR                      (33) /* MMC/SD Power */
 #define CORGI_GPIO_CHRG_ON                     (38) /* Enable battery Charging */
index 0a2efcf7947c5c4da26e7140f4256387f3387769..7cbfc5d3f9dfb9a6e9483922a237c83457759d31 100644 (file)
@@ -12,6 +12,7 @@
 #ifndef _MAGICIAN_H_
 #define _MAGICIAN_H_
 
+#include <linux/gpio.h>
 #include <mach/irqs.h>
 
 /*
@@ -77,7 +78,7 @@
  * CPLD EGPIOs
  */
 
-#define MAGICIAN_EGPIO_BASE                    0x80 /* GPIO_BOARD_START */
+#define MAGICIAN_EGPIO_BASE                    NR_BUILTIN_GPIO
 #define MAGICIAN_EGPIO(reg,bit) \
        (MAGICIAN_EGPIO_BASE + 8*reg + bit)
 
index ab1443f8bd89a3ebad4b57cbfe4315bda6a02210..4cf28f6707063190cfb7dc3d06f3e5d21c2aa06e 100644 (file)
@@ -56,9 +56,9 @@
 #define UDCFNR          __REG(0x40600014) /* UDC Frame Number Register */
 #define UDCOTGICR      __REG(0x40600018) /* UDC On-The-Go interrupt control */
 #define UDCOTGICR_IESF (1 << 24)       /* OTG SET_FEATURE command recvd */
-#define UDCOTGICR_IEXR (1 << 17)       /* Extra Transciever Interrupt
+#define UDCOTGICR_IEXR (1 << 17)       /* Extra Transceiver Interrupt
                                           Rising Edge Interrupt Enable */
-#define UDCOTGICR_IEXF (1 << 16)       /* Extra Transciever Interrupt
+#define UDCOTGICR_IEXF (1 << 16)       /* Extra Transceiver Interrupt
                                           Falling Edge Interrupt Enable */
 #define UDCOTGICR_IEVV40R (1 << 9)     /* OTG Vbus Valid 4.0V Rising Edge
                                           Interrupt Enable */
index e1920572948a9b1dcdc0d96a5be03a763f6f2e43..0e42798942f79f01ac160831f422d399cc633f34 100644 (file)
@@ -344,22 +344,14 @@ static struct pxafb_mach_info samsung_info = {
  * Backlight
  */
 
+static struct gpio magician_bl_gpios[] = {
+       { EGPIO_MAGICIAN_BL_POWER,  GPIOF_DIR_OUT, "Backlight power" },
+       { EGPIO_MAGICIAN_BL_POWER2, GPIOF_DIR_OUT, "Backlight power 2" },
+};
+
 static int magician_backlight_init(struct device *dev)
 {
-       int ret;
-
-       ret = gpio_request(EGPIO_MAGICIAN_BL_POWER, "BL_POWER");
-       if (ret)
-               goto err;
-       ret = gpio_request(EGPIO_MAGICIAN_BL_POWER2, "BL_POWER2");
-       if (ret)
-               goto err2;
-       return 0;
-
-err2:
-       gpio_free(EGPIO_MAGICIAN_BL_POWER);
-err:
-       return ret;
+       return gpio_request_array(ARRAY_AND_SIZE(magician_bl_gpios));
 }
 
 static int magician_backlight_notify(struct device *dev, int brightness)
@@ -376,8 +368,7 @@ static int magician_backlight_notify(struct device *dev, int brightness)
 
 static void magician_backlight_exit(struct device *dev)
 {
-       gpio_free(EGPIO_MAGICIAN_BL_POWER);
-       gpio_free(EGPIO_MAGICIAN_BL_POWER2);
+       gpio_free_array(ARRAY_AND_SIZE(magician_bl_gpios));
 }
 
 static struct platform_pwm_backlight_data backlight_data = {
@@ -712,16 +703,25 @@ static struct platform_device *devices[] __initdata = {
        &leds_gpio,
 };
 
+static struct gpio magician_global_gpios[] = {
+       { GPIO13_MAGICIAN_CPLD_IRQ,   GPIOF_IN, "CPLD_IRQ" },
+       { GPIO107_MAGICIAN_DS1WM_IRQ, GPIOF_IN, "DS1WM_IRQ" },
+       { GPIO104_MAGICIAN_LCD_POWER_1, GPIOF_OUT_INIT_LOW, "LCD power 1" },
+       { GPIO105_MAGICIAN_LCD_POWER_2, GPIOF_OUT_INIT_LOW, "LCD power 2" },
+       { GPIO106_MAGICIAN_LCD_POWER_3, GPIOF_OUT_INIT_LOW, "LCD power 3" },
+       { GPIO83_MAGICIAN_nIR_EN, GPIOF_OUT_INIT_HIGH, "nIR_EN" },
+};
+
 static void __init magician_init(void)
 {
        void __iomem *cpld;
        int lcd_select;
        int err;
 
-       gpio_request(GPIO13_MAGICIAN_CPLD_IRQ, "CPLD_IRQ");
-       gpio_request(GPIO107_MAGICIAN_DS1WM_IRQ, "DS1WM_IRQ");
-
        pxa2xx_mfp_config(ARRAY_AND_SIZE(magician_pin_config));
+       err = gpio_request_array(ARRAY_AND_SIZE(magician_global_gpios));
+       if (err)
+               pr_err("magician: Failed to request GPIOs: %d\n", err);
 
        pxa_set_ffuart_info(NULL);
        pxa_set_btuart_info(NULL);
@@ -729,11 +729,7 @@ static void __init magician_init(void)
 
        platform_add_devices(ARRAY_AND_SIZE(devices));
 
-       err = gpio_request(GPIO83_MAGICIAN_nIR_EN, "nIR_EN");
-       if (!err) {
-               gpio_direction_output(GPIO83_MAGICIAN_nIR_EN, 1);
-               pxa_set_ficp_info(&magician_ficp_info);
-       }
+       pxa_set_ficp_info(&magician_ficp_info);
        pxa27x_set_i2c_power_info(NULL);
        pxa_set_i2c_info(&i2c_info);
        pxa_set_mci_info(&magician_mci_info);
@@ -747,16 +743,9 @@ static void __init magician_init(void)
                system_rev = board_id & 0x7;
                lcd_select = board_id & 0x8;
                pr_info("LCD type: %s\n", lcd_select ? "Samsung" : "Toppoly");
-               if (lcd_select && (system_rev < 3)) {
-                       gpio_request(GPIO75_MAGICIAN_SAMSUNG_POWER, "SAMSUNG_POWER");
-                       gpio_direction_output(GPIO75_MAGICIAN_SAMSUNG_POWER, 0);
-               }
-               gpio_request(GPIO104_MAGICIAN_LCD_POWER_1, "LCD_POWER_1");
-               gpio_request(GPIO105_MAGICIAN_LCD_POWER_2, "LCD_POWER_2");
-               gpio_request(GPIO106_MAGICIAN_LCD_POWER_3, "LCD_POWER_3");
-               gpio_direction_output(GPIO104_MAGICIAN_LCD_POWER_1, 0);
-               gpio_direction_output(GPIO105_MAGICIAN_LCD_POWER_2, 0);
-               gpio_direction_output(GPIO106_MAGICIAN_LCD_POWER_3, 0);
+               if (lcd_select && (system_rev < 3))
+                       gpio_request_one(GPIO75_MAGICIAN_SAMSUNG_POWER,
+                                        GPIOF_OUT_INIT_LOW, "SAMSUNG_POWER");
                pxa_set_fb_info(NULL, lcd_select ? &samsung_info : &toppoly_info);
        } else
                pr_err("LCD detection: CPLD mapping failed\n");
index e3470137c93473a3929d5fb53a7eebb0932b1090..aa67637ae41dfa859bb5f2567bf282e1d671f8f1 100644 (file)
@@ -177,50 +177,6 @@ static unsigned long mioa701_pin_config[] = {
        MFP_CFG_OUT(GPIO116, AF0, DRIVE_HIGH),
 };
 
-#define MIO_GPIO_IN(num, _desc) \
-       { .gpio = (num), .dir = 0, .desc = (_desc) }
-#define MIO_GPIO_OUT(num, _init, _desc) \
-       { .gpio = (num), .dir = 1, .init = (_init), .desc = (_desc) }
-struct gpio_ress {
-       unsigned gpio : 8;
-       unsigned dir : 1;
-       unsigned init : 1;
-       char *desc;
-};
-
-static int mio_gpio_request(struct gpio_ress *gpios, int size)
-{
-       int i, rc = 0;
-       int gpio;
-       int dir;
-
-       for (i = 0; (!rc) && (i < size); i++) {
-               gpio = gpios[i].gpio;
-               dir = gpios[i].dir;
-               rc = gpio_request(gpio, gpios[i].desc);
-               if (rc) {
-                       printk(KERN_ERR "Error requesting GPIO %d(%s) : %d\n",
-                              gpio, gpios[i].desc, rc);
-                       continue;
-               }
-               if (dir)
-                       gpio_direction_output(gpio, gpios[i].init);
-               else
-                       gpio_direction_input(gpio);
-       }
-       while ((rc) && (--i >= 0))
-               gpio_free(gpios[i].gpio);
-       return rc;
-}
-
-static void mio_gpio_free(struct gpio_ress *gpios, int size)
-{
-       int i;
-
-       for (i = 0; i < size; i++)
-               gpio_free(gpios[i].gpio);
-}
-
 /* LCD Screen and Backlight */
 static struct platform_pwm_backlight_data mioa701_backlight_data = {
        .pwm_id         = 0,
@@ -346,16 +302,16 @@ irqreturn_t gsm_on_irq(int irq, void *p)
        return IRQ_HANDLED;
 }
 
-struct gpio_ress gsm_gpios[] = {
-       MIO_GPIO_IN(GPIO25_GSM_MOD_ON_STATE, "GSM state"),
-       MIO_GPIO_IN(GPIO113_GSM_EVENT, "GSM event"),
+static struct gpio gsm_gpios[] = {
+       { GPIO25_GSM_MOD_ON_STATE, GPIOF_IN, "GSM state" },
+       { GPIO113_GSM_EVENT, GPIOF_IN, "GSM event" },
 };
 
 static int __init gsm_init(void)
 {
        int rc;
 
-       rc = mio_gpio_request(ARRAY_AND_SIZE(gsm_gpios));
+       rc = gpio_request_array(ARRAY_AND_SIZE(gsm_gpios));
        if (rc)
                goto err_gpio;
        rc = request_irq(gpio_to_irq(GPIO25_GSM_MOD_ON_STATE), gsm_on_irq,
@@ -369,7 +325,7 @@ static int __init gsm_init(void)
 
 err_irq:
        printk(KERN_ERR "Mioa701: Can't request GSM_ON irq\n");
-       mio_gpio_free(ARRAY_AND_SIZE(gsm_gpios));
+       gpio_free_array(ARRAY_AND_SIZE(gsm_gpios));
 err_gpio:
        printk(KERN_ERR "Mioa701: gsm not available\n");
        return rc;
@@ -378,7 +334,7 @@ err_gpio:
 static void gsm_exit(void)
 {
        free_irq(gpio_to_irq(GPIO25_GSM_MOD_ON_STATE), NULL);
-       mio_gpio_free(ARRAY_AND_SIZE(gsm_gpios));
+       gpio_free_array(ARRAY_AND_SIZE(gsm_gpios));
 }
 
 /*
@@ -749,14 +705,16 @@ static void mioa701_restart(char c, const char *cmd)
        arm_machine_restart('s', cmd);
 }
 
-static struct gpio_ress global_gpios[] = {
-       MIO_GPIO_OUT(GPIO9_CHARGE_EN, 1, "Charger enable"),
-       MIO_GPIO_OUT(GPIO18_POWEROFF, 0, "Power Off"),
-       MIO_GPIO_OUT(GPIO87_LCD_POWER, 0, "LCD Power"),
+static struct gpio global_gpios[] = {
+       { GPIO9_CHARGE_EN, GPIOF_OUT_INIT_HIGH, "Charger enable" },
+       { GPIO18_POWEROFF, GPIOF_OUT_INIT_LOW, "Power Off" },
+       { GPIO87_LCD_POWER, GPIOF_OUT_INIT_LOW, "LCD Power" },
 };
 
 static void __init mioa701_machine_init(void)
 {
+       int rc;
+
        PSLR  = 0xff100000; /* SYSDEL=125ms, PWRDEL=125ms, PSLR_SL_ROD=1 */
        PCFR = PCFR_DC_EN | PCFR_GPR_EN | PCFR_OPDE;
        RTTR = 32768 - 1; /* Reset crazy WinCE value */
@@ -766,7 +724,9 @@ static void __init mioa701_machine_init(void)
        pxa_set_ffuart_info(NULL);
        pxa_set_btuart_info(NULL);
        pxa_set_stuart_info(NULL);
-       mio_gpio_request(ARRAY_AND_SIZE(global_gpios));
+       rc = gpio_request_array(ARRAY_AND_SIZE(global_gpios));
+       if (rc)
+               pr_err("MioA701: Failed to request GPIOs: %d", rc);
        bootstrap_init();
        pxa_set_fb_info(NULL, &mioa701_pxafb_info);
        pxa_set_mci_info(&mioa701_mci_info);
index 9322fe527c7f9cb017eb537ee0db9957c06bce9e..e53a3334c944027629423c5ce8526ffaae7302a2 100644 (file)
@@ -104,7 +104,7 @@ static void __init saarb_init(void)
 
 MACHINE_START(SAARB, "PXA955 Handheld Platform (aka SAARB)")
        .boot_params    = 0xa0000100,
-       .map_io         = pxa_map_io,
+       .map_io         = pxa3xx_map_io,
        .nr_irqs        = SAARB_NR_IRQS,
        .init_irq       = pxa95x_init_irq,
        .timer          = &pxa_timer,
diff --git a/arch/arm/mach-s3c2400/Kconfig b/arch/arm/mach-s3c2400/Kconfig
deleted file mode 100644 (file)
index fdd8f5e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright 2007 Simtec Electronics
-#
-# Licensed under GPLv2
-
-menu "S3C2400 Machines"
-
-endmenu
diff --git a/arch/arm/mach-s3c2400/Makefile b/arch/arm/mach-s3c2400/Makefile
deleted file mode 100644 (file)
index 7e23f4e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-# arch/arm/mach-s3c2400/Makefile
-#
-# Copyright 2007 Simtec Electronics
-#
-# Licensed under GPLv2
-
-obj-y                          :=
-obj-m                          :=
-obj-n                          :=
-obj-                           :=
-
-obj-$(CONFIG_CPU_S3C2400)      += gpio.o
-
-# Machine support
-
diff --git a/arch/arm/mach-s3c2400/gpio.c b/arch/arm/mach-s3c2400/gpio.c
deleted file mode 100644 (file)
index 6c68e78..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/* linux/arch/arm/mach-s3c2400/gpio.c
- *
- * Copyright (c) 2006 Lucas Correia Villa Real <lucasvr@gobolinux.org>
- *
- * S3C2400 GPIO support
- *
- * 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/kernel.h>
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/interrupt.h>
-#include <linux/ioport.h>
-#include <linux/io.h>
-
-#include <mach/hardware.h>
-#include <asm/irq.h>
-
-#include <mach/regs-gpio.h>
-
-int s3c2400_gpio_getirq(unsigned int pin)
-{
-       if (pin < S3C2410_GPE(0) || pin > S3C2400_GPE(7))
-               return -EINVAL;  /* not valid interrupts */
-
-       return (pin - S3C2410_GPE(0)) + IRQ_EINT0;
-}
-
-EXPORT_SYMBOL(s3c2400_gpio_getirq);
diff --git a/arch/arm/mach-s3c2400/include/mach/map.h b/arch/arm/mach-s3c2400/include/mach/map.h
deleted file mode 100644 (file)
index 3fd8892..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/* arch/arm/mach-s3c2400/include/mach/map.h
- *
- * Copyright 2003-2007 Simtec Electronics
- *     http://armlinux.simtec.co.uk/
- *     Ben Dooks <ben@simtec.co.uk>
- *
- * Copyright 2003, Lucas Correia Villa Real
- *
- * S3C2400 - Memory 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.
-*/
-
-#define S3C2400_PA_MEMCTRL     (0x14000000)
-#define S3C2400_PA_USBHOST     (0x14200000)
-#define S3C2400_PA_IRQ         (0x14400000)
-#define S3C2400_PA_DMA         (0x14600000)
-#define S3C2400_PA_CLKPWR      (0x14800000)
-#define S3C2400_PA_LCD         (0x14A00000)
-#define S3C2400_PA_UART                (0x15000000)
-#define S3C2400_PA_TIMER       (0x15100000)
-#define S3C2400_PA_USBDEV      (0x15200140)
-#define S3C2400_PA_WATCHDOG    (0x15300000)
-#define S3C2400_PA_IIC         (0x15400000)
-#define S3C2400_PA_IIS         (0x15508000)
-#define S3C2400_PA_GPIO                (0x15600000)
-#define S3C2400_PA_RTC         (0x15700040)
-#define S3C2400_PA_ADC         (0x15800000)
-#define S3C2400_PA_SPI         (0x15900000)
-
-#define S3C2400_PA_MMC         (0x15A00000)
-#define S3C2400_SZ_MMC         SZ_1M
-
-/* physical addresses of all the chip-select areas */
-
-#define S3C2400_CS0    (0x00000000)
-#define S3C2400_CS1    (0x02000000)
-#define S3C2400_CS2    (0x04000000)
-#define S3C2400_CS3    (0x06000000)
-#define S3C2400_CS4    (0x08000000)
-#define S3C2400_CS5    (0x0A000000)
-#define S3C2400_CS6    (0x0C000000)
-#define S3C2400_CS7    (0x0E000000)
-
-#define S3C2400_SDRAM_PA    (S3C2400_CS6)
-
-/* Use a single interface for common resources between S3C24XX cpus */
-
-#define S3C24XX_PA_IRQ         S3C2400_PA_IRQ
-#define S3C24XX_PA_MEMCTRL     S3C2400_PA_MEMCTRL
-#define S3C24XX_PA_USBHOST     S3C2400_PA_USBHOST
-#define S3C24XX_PA_DMA         S3C2400_PA_DMA
-#define S3C24XX_PA_CLKPWR      S3C2400_PA_CLKPWR
-#define S3C24XX_PA_LCD         S3C2400_PA_LCD
-#define S3C24XX_PA_UART                S3C2400_PA_UART
-#define S3C24XX_PA_TIMER       S3C2400_PA_TIMER
-#define S3C24XX_PA_USBDEV      S3C2400_PA_USBDEV
-#define S3C24XX_PA_WATCHDOG    S3C2400_PA_WATCHDOG
-#define S3C24XX_PA_IIC         S3C2400_PA_IIC
-#define S3C24XX_PA_IIS         S3C2400_PA_IIS
-#define S3C24XX_PA_GPIO                S3C2400_PA_GPIO
-#define S3C24XX_PA_RTC         S3C2400_PA_RTC
-#define S3C24XX_PA_ADC         S3C2400_PA_ADC
-#define S3C24XX_PA_SPI         S3C2400_PA_SPI
index 2c126bbca08da168f8c7d4fc76285dd141a27ba3..a5eeb62ce1c29088b88db01bcbbb1a92e22faed5 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/leds.h>
 #include <linux/gpio.h>
 #include <linux/rfkill.h>
-#include <linux/leds.h>
 
 #include <mach/regs-gpio.h>
 #include <mach/hardware.h>
index f453c4f2cb8e61bc296c5d8fb49298626f5adb04..bab1392017614bc964a6586f92af65287b7b8e7a 100644 (file)
@@ -52,12 +52,6 @@ extern unsigned int s3c2410_gpio_getcfg(unsigned int pin);
 
 extern int s3c2410_gpio_getirq(unsigned int pin);
 
-#ifdef CONFIG_CPU_S3C2400
-
-extern int s3c2400_gpio_getirq(unsigned int pin);
-
-#endif /* CONFIG_CPU_S3C2400 */
-
 /* s3c2410_gpio_irqfilter
  *
  * set the irq filtering on the given pin
index a0a89d4292961a1da85f3885e58e7e20abd706a3..cac1ad6b582cc42aaede66ff65ca9931e4e58724 100644 (file)
 
 #include <mach/gpio-nrs.h>
 
-#ifdef CONFIG_CPU_S3C2400
-#define S3C24XX_MISCCR         S3C2400_MISCCR
-#else
 #define S3C24XX_MISCCR         S3C24XX_GPIOREG2(0x80)
-#endif /* CONFIG_CPU_S3C2400 */
 
 /* general configuration options */
 
 /* configure GPIO ports A..G */
 
 /* port A - S3C2410: 22bits, zero in bit X makes pin X output
- *          S3C2400: 18bits, zero in bit X makes pin X output
  * 1 makes port special function, this is default
 */
 #define S3C2410_GPACON    S3C2410_GPIOREG(0x00)
 #define S3C2410_GPADAT    S3C2410_GPIOREG(0x04)
 
-#define S3C2400_GPACON    S3C2410_GPIOREG(0x00)
-#define S3C2400_GPADAT    S3C2410_GPIOREG(0x04)
-
 #define S3C2410_GPA0_ADDR0   (1<<0)
-
 #define S3C2410_GPA1_ADDR16  (1<<1)
-
 #define S3C2410_GPA2_ADDR17  (1<<2)
-
 #define S3C2410_GPA3_ADDR18  (1<<3)
-
 #define S3C2410_GPA4_ADDR19  (1<<4)
-
 #define S3C2410_GPA5_ADDR20  (1<<5)
-
 #define S3C2410_GPA6_ADDR21  (1<<6)
-
 #define S3C2410_GPA7_ADDR22  (1<<7)
-
 #define S3C2410_GPA8_ADDR23  (1<<8)
-
 #define S3C2410_GPA9_ADDR24  (1<<9)
-
 #define S3C2410_GPA10_ADDR25 (1<<10)
-#define S3C2400_GPA10_SCKE   (1<<10)
-
 #define S3C2410_GPA11_ADDR26 (1<<11)
-#define S3C2400_GPA11_nCAS0  (1<<11)
-
 #define S3C2410_GPA12_nGCS1  (1<<12)
-#define S3C2400_GPA12_nCAS1  (1<<12)
-
 #define S3C2410_GPA13_nGCS2  (1<<13)
-#define S3C2400_GPA13_nGCS1  (1<<13)
-
 #define S3C2410_GPA14_nGCS3  (1<<14)
-#define S3C2400_GPA14_nGCS2  (1<<14)
-
 #define S3C2410_GPA15_nGCS4  (1<<15)
-#define S3C2400_GPA15_nGCS3  (1<<15)
-
 #define S3C2410_GPA16_nGCS5  (1<<16)
-#define S3C2400_GPA16_nGCS4  (1<<16)
-
 #define S3C2410_GPA17_CLE    (1<<17)
-#define S3C2400_GPA17_nGCS5  (1<<17)
-
 #define S3C2410_GPA18_ALE    (1<<18)
-
 #define S3C2410_GPA19_nFWE   (1<<19)
-
 #define S3C2410_GPA20_nFRE   (1<<20)
-
 #define S3C2410_GPA21_nRSTOUT (1<<21)
-
 #define S3C2410_GPA22_nFCE   (1<<22)
 
 /* 0x08 and 0x0c are reserved on S3C2410 */
  * GPB is 10 IO pins, each configured by 2 bits each in GPBCON.
  *   00 = input, 01 = output, 10=special function, 11=reserved
 
- * S3C2400:
- * GPB is 16 IO pins, each configured by 2 bits each in GPBCON.
- *   00 = input, 01 = output, 10=data, 11=special function
-
  * bit 0,1 = pin 0, 2,3= pin 1...
  *
  * CPBUP = pull up resistor control, 1=disabled, 0=enabled
 #define S3C2410_GPBDAT    S3C2410_GPIOREG(0x14)
 #define S3C2410_GPBUP     S3C2410_GPIOREG(0x18)
 
-#define S3C2400_GPBCON    S3C2410_GPIOREG(0x08)
-#define S3C2400_GPBDAT    S3C2410_GPIOREG(0x0C)
-#define S3C2400_GPBUP     S3C2410_GPIOREG(0x10)
-
 /* no i/o pin in port b can have value 3 (unless it is a s3c2443) ! */
 
 #define S3C2410_GPB0_TOUT0   (0x02 << 0)
-#define S3C2400_GPB0_DATA16  (0x02 << 0)
 
 #define S3C2410_GPB1_TOUT1   (0x02 << 2)
-#define S3C2400_GPB1_DATA17  (0x02 << 2)
 
 #define S3C2410_GPB2_TOUT2   (0x02 << 4)
-#define S3C2400_GPB2_DATA18  (0x02 << 4)
-#define S3C2400_GPB2_TCLK1   (0x03 << 4)
 
 #define S3C2410_GPB3_TOUT3   (0x02 << 6)
-#define S3C2400_GPB3_DATA19  (0x02 << 6)
-#define S3C2400_GPB3_TXD1    (0x03 << 6)
 
 #define S3C2410_GPB4_TCLK0   (0x02 << 8)
-#define S3C2400_GPB4_DATA20  (0x02 << 8)
 #define S3C2410_GPB4_MASK    (0x03 << 8)
-#define S3C2400_GPB4_RXD1    (0x03 << 8)
-#define S3C2400_GPB4_MASK    (0x03 << 8)
 
 #define S3C2410_GPB5_nXBACK  (0x02 << 10)
 #define S3C2443_GPB5_XBACK   (0x03 << 10)
-#define S3C2400_GPB5_DATA21  (0x02 << 10)
-#define S3C2400_GPB5_nCTS1   (0x03 << 10)
 
 #define S3C2410_GPB6_nXBREQ  (0x02 << 12)
 #define S3C2443_GPB6_XBREQ   (0x03 << 12)
-#define S3C2400_GPB6_DATA22  (0x02 << 12)
-#define S3C2400_GPB6_nRTS1   (0x03 << 12)
 
 #define S3C2410_GPB7_nXDACK1 (0x02 << 14)
 #define S3C2443_GPB7_XDACK1  (0x03 << 14)
-#define S3C2400_GPB7_DATA23  (0x02 << 14)
 
 #define S3C2410_GPB8_nXDREQ1 (0x02 << 16)
-#define S3C2400_GPB8_DATA24  (0x02 << 16)
 
 #define S3C2410_GPB9_nXDACK0 (0x02 << 18)
 #define S3C2443_GPB9_XDACK0  (0x03 << 18)
-#define S3C2400_GPB9_DATA25  (0x02 << 18)
-#define S3C2400_GPB9_I2SSDI  (0x03 << 18)
 
 #define S3C2410_GPB10_nXDRE0 (0x02 << 20)
 #define S3C2443_GPB10_XDREQ0 (0x03 << 20)
-#define S3C2400_GPB10_DATA26 (0x02 << 20)
-#define S3C2400_GPB10_nSS    (0x03 << 20)
-
-#define S3C2400_GPB11_INP    (0x00 << 22)
-#define S3C2400_GPB11_OUTP   (0x01 << 22)
-#define S3C2400_GPB11_DATA27 (0x02 << 22)
-
-#define S3C2400_GPB12_INP    (0x00 << 24)
-#define S3C2400_GPB12_OUTP   (0x01 << 24)
-#define S3C2400_GPB12_DATA28 (0x02 << 24)
-
-#define S3C2400_GPB13_INP    (0x00 << 26)
-#define S3C2400_GPB13_OUTP   (0x01 << 26)
-#define S3C2400_GPB13_DATA29 (0x02 << 26)
-
-#define S3C2400_GPB14_INP    (0x00 << 28)
-#define S3C2400_GPB14_OUTP   (0x01 << 28)
-#define S3C2400_GPB14_DATA30 (0x02 << 28)
-
-#define S3C2400_GPB15_INP    (0x00 << 30)
-#define S3C2400_GPB15_OUTP   (0x01 << 30)
-#define S3C2400_GPB15_DATA31 (0x02 << 30)
 
 #define S3C2410_GPB_PUPDIS(x)  (1<<(x))
 
 #define S3C2410_GPCCON    S3C2410_GPIOREG(0x20)
 #define S3C2410_GPCDAT    S3C2410_GPIOREG(0x24)
 #define S3C2410_GPCUP     S3C2410_GPIOREG(0x28)
-
-#define S3C2400_GPCCON    S3C2410_GPIOREG(0x14)
-#define S3C2400_GPCDAT    S3C2410_GPIOREG(0x18)
-#define S3C2400_GPCUP     S3C2410_GPIOREG(0x1C)
-
 #define S3C2410_GPC0_LEND      (0x02 << 0)
-#define S3C2400_GPC0_VD0       (0x02 << 0)
-
 #define S3C2410_GPC1_VCLK      (0x02 << 2)
-#define S3C2400_GPC1_VD1       (0x02 << 2)
-
 #define S3C2410_GPC2_VLINE     (0x02 << 4)
-#define S3C2400_GPC2_VD2       (0x02 << 4)
-
 #define S3C2410_GPC3_VFRAME    (0x02 << 6)
-#define S3C2400_GPC3_VD3       (0x02 << 6)
-
 #define S3C2410_GPC4_VM                (0x02 << 8)
-#define S3C2400_GPC4_VD4       (0x02 << 8)
-
 #define S3C2410_GPC5_LCDVF0    (0x02 << 10)
-#define S3C2400_GPC5_VD5       (0x02 << 10)
-
 #define S3C2410_GPC6_LCDVF1    (0x02 << 12)
-#define S3C2400_GPC6_VD6       (0x02 << 12)
-
 #define S3C2410_GPC7_LCDVF2    (0x02 << 14)
-#define S3C2400_GPC7_VD7       (0x02 << 14)
-
 #define S3C2410_GPC8_VD0       (0x02 << 16)
-#define S3C2400_GPC8_VD8       (0x02 << 16)
-
 #define S3C2410_GPC9_VD1       (0x02 << 18)
-#define S3C2400_GPC9_VD9       (0x02 << 18)
-
 #define S3C2410_GPC10_VD2      (0x02 << 20)
-#define S3C2400_GPC10_VD10     (0x02 << 20)
-
 #define S3C2410_GPC11_VD3      (0x02 << 22)
-#define S3C2400_GPC11_VD11     (0x02 << 22)
-
 #define S3C2410_GPC12_VD4      (0x02 << 24)
-#define S3C2400_GPC12_VD12     (0x02 << 24)
-
 #define S3C2410_GPC13_VD5      (0x02 << 26)
-#define S3C2400_GPC13_VD13     (0x02 << 26)
-
 #define S3C2410_GPC14_VD6      (0x02 << 28)
-#define S3C2400_GPC14_VD14     (0x02 << 28)
-
 #define S3C2410_GPC15_VD7      (0x02 << 30)
-#define S3C2400_GPC15_VD15     (0x02 << 30)
-
 #define S3C2410_GPC_PUPDIS(x)  (1<<(x))
 
 /*
  * almost identical setup to port b, but the special functions are mostly
  * to do with the video system's data.
  *
- * S3C2400: Port D consists of 11 GPIO/Special function
- *
  * almost identical setup to port c
 */
 
 #define S3C2410_GPDDAT    S3C2410_GPIOREG(0x34)
 #define S3C2410_GPDUP     S3C2410_GPIOREG(0x38)
 
-#define S3C2400_GPDCON    S3C2410_GPIOREG(0x20)
-#define S3C2400_GPDDAT    S3C2410_GPIOREG(0x24)
-#define S3C2400_GPDUP     S3C2410_GPIOREG(0x28)
-
 #define S3C2410_GPD0_VD8       (0x02 << 0)
-#define S3C2400_GPD0_VFRAME    (0x02 << 0)
 #define S3C2442_GPD0_nSPICS1   (0x03 << 0)
 
 #define S3C2410_GPD1_VD9       (0x02 << 2)
-#define S3C2400_GPD1_VM                (0x02 << 2)
 #define S3C2442_GPD1_SPICLK1   (0x03 << 2)
 
 #define S3C2410_GPD2_VD10      (0x02 << 4)
-#define S3C2400_GPD2_VLINE     (0x02 << 4)
 
 #define S3C2410_GPD3_VD11      (0x02 << 6)
-#define S3C2400_GPD3_VCLK      (0x02 << 6)
 
 #define S3C2410_GPD4_VD12      (0x02 << 8)
-#define S3C2400_GPD4_LEND      (0x02 << 8)
 
 #define S3C2410_GPD5_VD13      (0x02 << 10)
-#define S3C2400_GPD5_TOUT0     (0x02 << 10)
 
 #define S3C2410_GPD6_VD14      (0x02 << 12)
-#define S3C2400_GPD6_TOUT1     (0x02 << 12)
 
 #define S3C2410_GPD7_VD15      (0x02 << 14)
-#define S3C2400_GPD7_TOUT2     (0x02 << 14)
 
 #define S3C2410_GPD8_VD16      (0x02 << 16)
-#define S3C2400_GPD8_TOUT3     (0x02 << 16)
 #define S3C2440_GPD8_SPIMISO1  (0x03 << 16)
 
 #define S3C2410_GPD9_VD17      (0x02 << 18)
-#define S3C2400_GPD9_TCLK0     (0x02 << 18)
 #define S3C2440_GPD9_SPIMOSI1  (0x03 << 18)
 
 #define S3C2410_GPD10_VD18     (0x02 << 20)
-#define S3C2400_GPD10_nWAIT    (0x02 << 20)
 #define S3C2440_GPD10_SPICLK1  (0x03 << 20)
 
 #define S3C2410_GPD11_VD19     (0x02 << 22)
  * again, the same as port B, but dealing with I2S, SDI, and
  * more miscellaneous functions
  *
- * S3C2400:
- * Port E consists of 12 GPIO/Special function
- *
  * GPIO / interrupt inputs
 */
 
 #define S3C2410_GPEDAT    S3C2410_GPIOREG(0x44)
 #define S3C2410_GPEUP     S3C2410_GPIOREG(0x48)
 
-#define S3C2400_GPECON    S3C2410_GPIOREG(0x2C)
-#define S3C2400_GPEDAT    S3C2410_GPIOREG(0x30)
-#define S3C2400_GPEUP     S3C2410_GPIOREG(0x34)
-
 #define S3C2410_GPE0_I2SLRCK   (0x02 << 0)
 #define S3C2443_GPE0_AC_nRESET (0x03 << 0)
-#define S3C2400_GPE0_EINT0     (0x02 << 0)
 #define S3C2410_GPE0_MASK      (0x03 << 0)
 
 #define S3C2410_GPE1_I2SSCLK   (0x02 << 2)
 #define S3C2443_GPE1_AC_SYNC   (0x03 << 2)
-#define S3C2400_GPE1_EINT1     (0x02 << 2)
-#define S3C2400_GPE1_nSS       (0x03 << 2)
 #define S3C2410_GPE1_MASK      (0x03 << 2)
 
 #define S3C2410_GPE2_CDCLK     (0x02 << 4)
 #define S3C2443_GPE2_AC_BITCLK (0x03 << 4)
-#define S3C2400_GPE2_EINT2     (0x02 << 4)
-#define S3C2400_GPE2_I2SSDI    (0x03 << 4)
 
 #define S3C2410_GPE3_I2SSDI    (0x02 << 6)
 #define S3C2443_GPE3_AC_SDI    (0x03 << 6)
-#define S3C2400_GPE3_EINT3     (0x02 << 6)
-#define S3C2400_GPE3_nCTS1     (0x03 << 6)
 #define S3C2410_GPE3_nSS0      (0x03 << 6)
 #define S3C2410_GPE3_MASK      (0x03 << 6)
 
 #define S3C2410_GPE4_I2SSDO    (0x02 << 8)
 #define S3C2443_GPE4_AC_SDO    (0x03 << 8)
-#define S3C2400_GPE4_EINT4     (0x02 << 8)
-#define S3C2400_GPE4_nRTS1     (0x03 << 8)
 #define S3C2410_GPE4_I2SSDI    (0x03 << 8)
 #define S3C2410_GPE4_MASK      (0x03 << 8)
 
 #define S3C2410_GPE5_SDCLK     (0x02 << 10)
 #define S3C2443_GPE5_SD1_CLK   (0x02 << 10)
-#define S3C2400_GPE5_EINT5     (0x02 << 10)
-#define S3C2400_GPE5_TCLK1     (0x03 << 10)
 #define S3C2443_GPE5_AC_BITCLK (0x03 << 10)
 
 #define S3C2410_GPE6_SDCMD     (0x02 << 12)
 #define S3C2443_GPE6_SD1_CMD   (0x02 << 12)
 #define S3C2443_GPE6_AC_SDI    (0x03 << 12)
-#define S3C2400_GPE6_EINT6     (0x02 << 12)
 
 #define S3C2410_GPE7_SDDAT0    (0x02 << 14)
 #define S3C2443_GPE5_SD1_DAT0  (0x02 << 14)
 #define S3C2443_GPE7_AC_SDO    (0x03 << 14)
-#define S3C2400_GPE7_EINT7     (0x02 << 14)
 
 #define S3C2410_GPE8_SDDAT1    (0x02 << 16)
 #define S3C2443_GPE8_SD1_DAT1  (0x02 << 16)
 #define S3C2443_GPE8_AC_SYNC   (0x03 << 16)
-#define S3C2400_GPE8_nXDACK0   (0x02 << 16)
 
 #define S3C2410_GPE9_SDDAT2    (0x02 << 18)
 #define S3C2443_GPE9_SD1_DAT2  (0x02 << 18)
 #define S3C2443_GPE9_AC_nRESET (0x03 << 18)
-#define S3C2400_GPE9_nXDACK1   (0x02 << 18)
-#define S3C2400_GPE9_nXBACK    (0x03 << 18)
 
 #define S3C2410_GPE10_SDDAT3   (0x02 << 20)
 #define S3C2443_GPE10_SD1_DAT3 (0x02 << 20)
-#define S3C2400_GPE10_nXDREQ0  (0x02 << 20)
 
 #define S3C2410_GPE11_SPIMISO0 (0x02 << 22)
-#define S3C2400_GPE11_nXDREQ1  (0x02 << 22)
-#define S3C2400_GPE11_nXBREQ   (0x03 << 22)
 
 #define S3C2410_GPE12_SPIMOSI0 (0x02 << 24)
 
  *
  * pull up works like all other ports.
  *
- * S3C2400:
- * Port F consists of 7 GPIO/Special function
- *
  * GPIO/serial/misc pins
 */
 
 #define S3C2410_GPFDAT    S3C2410_GPIOREG(0x54)
 #define S3C2410_GPFUP     S3C2410_GPIOREG(0x58)
 
-#define S3C2400_GPFCON    S3C2410_GPIOREG(0x38)
-#define S3C2400_GPFDAT    S3C2410_GPIOREG(0x3C)
-#define S3C2400_GPFUP     S3C2410_GPIOREG(0x40)
-
 #define S3C2410_GPF0_EINT0  (0x02 << 0)
-#define S3C2400_GPF0_RXD0   (0x02 << 0)
-
 #define S3C2410_GPF1_EINT1  (0x02 << 2)
-#define S3C2400_GPF1_RXD1   (0x02 << 2)
-#define S3C2400_GPF1_IICSDA (0x03 << 2)
-
 #define S3C2410_GPF2_EINT2  (0x02 << 4)
-#define S3C2400_GPF2_TXD0   (0x02 << 4)
-
 #define S3C2410_GPF3_EINT3  (0x02 << 6)
-#define S3C2400_GPF3_TXD1   (0x02 << 6)
-#define S3C2400_GPF3_IICSCL (0x03 << 6)
-
 #define S3C2410_GPF4_EINT4  (0x02 << 8)
-#define S3C2400_GPF4_nRTS0  (0x02 << 8)
-#define S3C2400_GPF4_nXBACK (0x03 << 8)
-
 #define S3C2410_GPF5_EINT5  (0x02 << 10)
-#define S3C2400_GPF5_nCTS0  (0x02 << 10)
-#define S3C2400_GPF5_nXBREQ (0x03 << 10)
-
 #define S3C2410_GPF6_EINT6  (0x02 << 12)
-#define S3C2400_GPF6_CLKOUT (0x02 << 12)
-
 #define S3C2410_GPF7_EINT7  (0x02 << 14)
-
 #define S3C2410_GPF_PUPDIS(x)  (1<<(x))
 
 /* S3C2410:
  *   00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 special func
  *
  * pull up works like all other ports.
- *
- * S3C2400:
- * Port G consists of 10 GPIO/Special function
 */
 
 #define S3C2410_GPGCON    S3C2410_GPIOREG(0x60)
 #define S3C2410_GPGDAT    S3C2410_GPIOREG(0x64)
 #define S3C2410_GPGUP     S3C2410_GPIOREG(0x68)
 
-#define S3C2400_GPGCON    S3C2410_GPIOREG(0x44)
-#define S3C2400_GPGDAT    S3C2410_GPIOREG(0x48)
-#define S3C2400_GPGUP     S3C2410_GPIOREG(0x4C)
-
 #define S3C2410_GPG0_EINT8    (0x02 << 0)
-#define S3C2400_GPG0_I2SLRCK  (0x02 << 0)
 
 #define S3C2410_GPG1_EINT9    (0x02 << 2)
-#define S3C2400_GPG1_I2SSCLK  (0x02 << 2)
 
 #define S3C2410_GPG2_EINT10   (0x02 << 4)
 #define S3C2410_GPG2_nSS0     (0x03 << 4)
-#define S3C2400_GPG2_CDCLK    (0x02 << 4)
 
 #define S3C2410_GPG3_EINT11   (0x02 << 6)
 #define S3C2410_GPG3_nSS1     (0x03 << 6)
-#define S3C2400_GPG3_I2SSDO   (0x02 << 6)
-#define S3C2400_GPG3_I2SSDI   (0x03 << 6)
 
 #define S3C2410_GPG4_EINT12   (0x02 << 8)
-#define S3C2400_GPG4_MMCCLK   (0x02 << 8)
-#define S3C2400_GPG4_I2SSDI   (0x03 << 8)
 #define S3C2410_GPG4_LCDPWREN (0x03 << 8)
 #define S3C2443_GPG4_LCDPWRDN (0x03 << 8)
 
 #define S3C2410_GPG5_EINT13   (0x02 << 10)
-#define S3C2400_GPG5_MMCCMD   (0x02 << 10)
-#define S3C2400_GPG5_IICSDA   (0x03 << 10)
 #define S3C2410_GPG5_SPIMISO1 (0x03 << 10)     /* not s3c2443 */
 
 #define S3C2410_GPG6_EINT14   (0x02 << 12)
-#define S3C2400_GPG6_MMCDAT   (0x02 << 12)
-#define S3C2400_GPG6_IICSCL   (0x03 << 12)
 #define S3C2410_GPG6_SPIMOSI1 (0x03 << 12)
 
 #define S3C2410_GPG7_EINT15   (0x02 << 14)
 #define S3C2410_GPG7_SPICLK1  (0x03 << 14)
-#define S3C2400_GPG7_SPIMISO  (0x02 << 14)
-#define S3C2400_GPG7_IICSDA   (0x03 << 14)
 
 #define S3C2410_GPG8_EINT16   (0x02 << 16)
-#define S3C2400_GPG8_SPIMOSI  (0x02 << 16)
-#define S3C2400_GPG8_IICSCL   (0x03 << 16)
 
 #define S3C2410_GPG9_EINT17   (0x02 << 18)
-#define S3C2400_GPG9_SPICLK   (0x02 << 18)
-#define S3C2400_GPG9_MMCCLK   (0x03 << 18)
 
 #define S3C2410_GPG10_EINT18  (0x02 << 20)
 
 #define S3C2443_GPMUP     S3C2410_GPIOREG(0x108)
 
 /* miscellaneous control */
-#define S3C2400_MISCCR    S3C2410_GPIOREG(0x54)
 #define S3C2410_MISCCR    S3C2410_GPIOREG(0x80)
 #define S3C2410_DCLKCON           S3C2410_GPIOREG(0x84)
 
 #define S3C2410_MISCCR_SPUCR_LEN    (0<<1)
 #define S3C2410_MISCCR_SPUCR_LDIS   (1<<1)
 
-#define S3C2400_MISCCR_SPUCR_LEN    (0<<0)
-#define S3C2400_MISCCR_SPUCR_LDIS   (1<<0)
-#define S3C2400_MISCCR_SPUCR_HEN    (0<<1)
-#define S3C2400_MISCCR_SPUCR_HDIS   (1<<1)
-
-#define S3C2400_MISCCR_HZ_STOPEN    (0<<2)
-#define S3C2400_MISCCR_HZ_STOPPREV  (1<<2)
-
 #define S3C2410_MISCCR_USBDEV      (0<<3)
 #define S3C2410_MISCCR_USBHOST     (1<<3)
 
  *
  * Samsung datasheet p9-25
 */
-#define S3C2400_EXTINT0    S3C2410_GPIOREG(0x58)
 #define S3C2410_EXTINT0           S3C2410_GPIOREG(0x88)
 #define S3C2410_EXTINT1           S3C2410_GPIOREG(0x8C)
 #define S3C2410_EXTINT2           S3C2410_GPIOREG(0x90)
 #define S3C2410_GSTATUS2_OFFRESET  (1<<1)
 #define S3C2410_GSTATUS2_PONRESET  (1<<0)
 
-/* open drain control register */
-#define S3C2400_OPENCR     S3C2410_GPIOREG(0x50)
-
-#define S3C2400_OPENCR_OPC_RXD1DIS  (0<<0)
-#define S3C2400_OPENCR_OPC_RXD1EN   (1<<0)
-#define S3C2400_OPENCR_OPC_TXD1DIS  (0<<1)
-#define S3C2400_OPENCR_OPC_TXD1EN   (1<<1)
-#define S3C2400_OPENCR_OPC_CMDDIS   (0<<2)
-#define S3C2400_OPENCR_OPC_CMDEN    (1<<2)
-#define S3C2400_OPENCR_OPC_DATDIS   (0<<3)
-#define S3C2400_OPENCR_OPC_DATEN    (1<<3)
-#define S3C2400_OPENCR_OPC_MISODIS  (0<<4)
-#define S3C2400_OPENCR_OPC_MISOEN   (1<<4)
-#define S3C2400_OPENCR_OPC_MOSIDIS  (0<<5)
-#define S3C2400_OPENCR_OPC_MOSIEN   (1<<5)
-
 /* 2412/2413 sleep configuration registers */
 
 #define S3C2412_GPBSLPCON      S3C2410_GPIOREG(0x1C)
index 988a6863e54b8d1c328b426cf5841c6f25f3c59d..e0c67b0163d8c9dc69fa2de3a63ca6264fa6c8e5 100644 (file)
 #define S3C2410_BANKCON_Tacs_SHIFT     (13)
 
 #define S3C2410_BANKCON_SRAM           (0x0 << 15)
-#define S3C2400_BANKCON_EDODRAM                (0x2 << 15)
 #define S3C2410_BANKCON_SDRAM          (0x3 << 15)
 
-/* next bits only for EDO DRAM in 6,7 */
-#define S3C2400_BANKCON_EDO_Trcd1      (0x00 << 4)
-#define S3C2400_BANKCON_EDO_Trcd2      (0x01 << 4)
-#define S3C2400_BANKCON_EDO_Trcd3      (0x02 << 4)
-#define S3C2400_BANKCON_EDO_Trcd4      (0x03 << 4)
-
-/* CAS pulse width */
-#define S3C2400_BANKCON_EDO_PULSE1     (0x00 << 3)
-#define S3C2400_BANKCON_EDO_PULSE2     (0x01 << 3)
-
-/* CAS pre-charge */
-#define S3C2400_BANKCON_EDO_TCP1       (0x00 << 2)
-#define S3C2400_BANKCON_EDO_TCP2       (0x01 << 2)
-
-/* control column address select */
-#define S3C2400_BANKCON_EDO_SCANb8     (0x00 << 0)
-#define S3C2400_BANKCON_EDO_SCANb9     (0x01 << 0)
-#define S3C2400_BANKCON_EDO_SCANb10    (0x02 << 0)
-#define S3C2400_BANKCON_EDO_SCANb11    (0x03 << 0)
-
 /* next bits only for SDRAM in 6,7 */
 #define S3C2410_BANKCON_Trcd2          (0x00 << 2)
 #define S3C2410_BANKCON_Trcd3          (0x01 << 2)
 #define S3C2410_REFRESH_TRP_3clk       (1<<20)
 #define S3C2410_REFRESH_TRP_4clk       (2<<20)
 
-#define S3C2400_REFRESH_DRAM_TRP_MASK   (3<<20)
-#define S3C2400_REFRESH_DRAM_TRP_1_5clk (0<<20)
-#define S3C2400_REFRESH_DRAM_TRP_2_5clk (1<<20)
-#define S3C2400_REFRESH_DRAM_TRP_3_5clk (2<<20)
-#define S3C2400_REFRESH_DRAM_TRP_4_5clk (3<<20)
-
 #define S3C2410_REFRESH_TSRC_MASK      (3<<18)
 #define S3C2410_REFRESH_TSRC_4clk      (0<<18)
 #define S3C2410_REFRESH_TSRC_5clk      (1<<18)
 #define S3C2410_BANKSIZE_4M            (0x5 << 0)
 #define S3C2410_BANKSIZE_2M            (0x4 << 0)
 #define S3C2410_BANKSIZE_MASK          (0x7 << 0)
-#define S3C2400_BANKSIZE_MASK           (0x4 << 0)
 #define S3C2410_BANKSIZE_SCLK_EN       (1<<4)
 #define S3C2410_BANKSIZE_SCKE_EN       (1<<5)
 #define S3C2410_BANKSIZE_BURST         (1<<7)
index e82ab4aa7ab942457a9fc5c0a70cfb862c503269..c2cf4e56998990cf0041535067d897589d344ac2 100644 (file)
@@ -15,7 +15,7 @@ config CPU_S3C2412
 
 config CPU_S3C2412_ONLY
        bool
-       depends on ARCH_S3C2410 && !CPU_S3C2400 && !CPU_S3C2410 && \
+       depends on ARCH_S3C2410 && !CPU_S3C2410 && \
                   !CPU_S3C2416 && !CPU_S3C2440 && !CPU_S3C2442 && \
                   !CPU_S3C2443 && CPU_S3C2412
        default y if CPU_S3C2412
index 0c0505b025cb685b91b5c3d1a3820ca7b1663514..140711db6c89b058a4b9c52cf3a1dc3943222bb2 100644 (file)
@@ -95,12 +95,10 @@ static int s3c2412_upll_enable(struct clk *clk, int enable)
 
 static struct clk clk_erefclk = {
        .name           = "erefclk",
-       .id             = -1,
 };
 
 static struct clk clk_urefclk = {
        .name           = "urefclk",
-       .id             = -1,
 };
 
 static int s3c2412_setparent_usysclk(struct clk *clk, struct clk *parent)
@@ -122,7 +120,6 @@ static int s3c2412_setparent_usysclk(struct clk *clk, struct clk *parent)
 
 static struct clk clk_usysclk = {
        .name           = "usysclk",
-       .id             = -1,
        .parent         = &clk_xtal,
        .ops            = &(struct clk_ops) {
                .set_parent     = s3c2412_setparent_usysclk,
@@ -132,13 +129,11 @@ static struct clk clk_usysclk = {
 static struct clk clk_mrefclk = {
        .name           = "mrefclk",
        .parent         = &clk_xtal,
-       .id             = -1,
 };
 
 static struct clk clk_mdivclk = {
        .name           = "mdivclk",
        .parent         = &clk_xtal,
-       .id             = -1,
 };
 
 static int s3c2412_setparent_usbsrc(struct clk *clk, struct clk *parent)
@@ -200,7 +195,6 @@ static int s3c2412_setrate_usbsrc(struct clk *clk, unsigned long rate)
 
 static struct clk clk_usbsrc = {
        .name           = "usbsrc",
-       .id             = -1,
        .ops            = &(struct clk_ops) {
                .get_rate       = s3c2412_getrate_usbsrc,
                .set_rate       = s3c2412_setrate_usbsrc,
@@ -228,7 +222,6 @@ static int s3c2412_setparent_msysclk(struct clk *clk, struct clk *parent)
 
 static struct clk clk_msysclk = {
        .name           = "msysclk",
-       .id             = -1,
        .ops            = &(struct clk_ops) {
                .set_parent     = s3c2412_setparent_msysclk,
        },
@@ -268,7 +261,6 @@ static int s3c2412_setparent_armclk(struct clk *clk, struct clk *parent)
 
 static struct clk clk_armclk = {
        .name           = "armclk",
-       .id             = -1,
        .parent         = &clk_msysclk,
        .ops            = &(struct clk_ops) {
                .set_parent     = s3c2412_setparent_armclk,
@@ -344,7 +336,6 @@ static int s3c2412_setrate_uart(struct clk *clk, unsigned long rate)
 
 static struct clk clk_uart = {
        .name           = "uartclk",
-       .id             = -1,
        .ops            = &(struct clk_ops) {
                .get_rate       = s3c2412_getrate_uart,
                .set_rate       = s3c2412_setrate_uart,
@@ -397,7 +388,6 @@ static int s3c2412_setrate_i2s(struct clk *clk, unsigned long rate)
 
 static struct clk clk_i2s = {
        .name           = "i2sclk",
-       .id             = -1,
        .ops            = &(struct clk_ops) {
                .get_rate       = s3c2412_getrate_i2s,
                .set_rate       = s3c2412_setrate_i2s,
@@ -449,7 +439,6 @@ static int s3c2412_setrate_cam(struct clk *clk, unsigned long rate)
 
 static struct clk clk_cam = {
        .name           = "camif-upll", /* same as 2440 name */
-       .id             = -1,
        .ops            = &(struct clk_ops) {
                .get_rate       = s3c2412_getrate_cam,
                .set_rate       = s3c2412_setrate_cam,
@@ -463,37 +452,31 @@ static struct clk clk_cam = {
 static struct clk init_clocks_disable[] = {
        {
                .name           = "nand",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_NAND,
        }, {
                .name           = "sdi",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_SDI,
        }, {
                .name           = "adc",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_ADC,
        }, {
                .name           = "i2c",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_IIC,
        }, {
                .name           = "iis",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_IIS,
        }, {
                .name           = "spi",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_SPI,
@@ -503,96 +486,83 @@ static struct clk init_clocks_disable[] = {
 static struct clk init_clocks[] = {
        {
                .name           = "dma",
-               .id             = 0,
                .parent         = &clk_h,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_DMA0,
        }, {
                .name           = "dma",
-               .id             = 1,
                .parent         = &clk_h,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_DMA1,
        }, {
                .name           = "dma",
-               .id             = 2,
                .parent         = &clk_h,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_DMA2,
        }, {
                .name           = "dma",
-               .id             = 3,
                .parent         = &clk_h,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_DMA3,
        }, {
                .name           = "lcd",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_LCDC,
        }, {
                .name           = "gpio",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_GPIO,
        }, {
                .name           = "usb-host",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_USBH,
        }, {
                .name           = "usb-device",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_USBD,
        }, {
                .name           = "timers",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_PWMT,
        }, {
                .name           = "uart",
-               .id             = 0,
+               .devname        = "s3c2412-uart.0",
                .parent         = &clk_p,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_UART0,
        }, {
                .name           = "uart",
-               .id             = 1,
+               .devname        = "s3c2412-uart.1",
                .parent         = &clk_p,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_UART1,
        }, {
                .name           = "uart",
-               .id             = 2,
+               .devname        = "s3c2412-uart.2",
                .parent         = &clk_p,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_UART2,
        }, {
                .name           = "rtc",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_RTC,
        }, {
                .name           = "watchdog",
-               .id             = -1,
                .parent         = &clk_p,
                .ctrlbit        = 0,
        }, {
                .name           = "usb-bus-gadget",
-               .id             = -1,
                .parent         = &clk_usb_bus,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_USB_DEV48,
        }, {
                .name           = "usb-bus-host",
-               .id             = -1,
                .parent         = &clk_usb_bus,
                .enable         = s3c2412_clkcon_enable,
                .ctrlbit        = S3C2412_CLKCON_USB_HOST48,
index 3b02d8506e25a37843cb4e11cbe3d76ae4467ee8..21a5e81f0ab570460ba67c99fd017c32df566838 100644 (file)
@@ -42,7 +42,7 @@ static struct clksrc_clk hsmmc_div[] = {
        [0] = {
                .clk = {
                        .name   = "hsmmc-div",
-                       .id     = 0,
+                       .devname        = "s3c-sdhci.0",
                        .parent = &clk_esysclk.clk,
                },
                .reg_div = { .reg = S3C2416_CLKDIV2, .size = 2, .shift = 6 },
@@ -50,7 +50,7 @@ static struct clksrc_clk hsmmc_div[] = {
        [1] = {
                .clk = {
                        .name   = "hsmmc-div",
-                       .id     = 1,
+                       .devname        = "s3c-sdhci.1",
                        .parent = &clk_esysclk.clk,
                },
                .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 },
@@ -60,8 +60,8 @@ static struct clksrc_clk hsmmc_div[] = {
 static struct clksrc_clk hsmmc_mux[] = {
        [0] = {
                .clk    = {
-                       .id     = 0,
                        .name   = "hsmmc-if",
+                       .devname        = "s3c-sdhci.0",
                        .ctrlbit = (1 << 6),
                        .enable = s3c2443_clkcon_enable_s,
                },
@@ -76,8 +76,8 @@ static struct clksrc_clk hsmmc_mux[] = {
        },
        [1] = {
                .clk    = {
-                       .id     = 1,
                        .name   = "hsmmc-if",
+                       .devname        = "s3c-sdhci.1",
                        .ctrlbit = (1 << 12),
                        .enable = s3c2443_clkcon_enable_s,
                },
@@ -94,7 +94,7 @@ static struct clksrc_clk hsmmc_mux[] = {
 
 static struct clk hsmmc0_clk = {
        .name           = "hsmmc",
-       .id             = 0,
+       .devname        = "s3c-sdhci.0",
        .parent         = &clk_h,
        .enable         = s3c2443_clkcon_enable_h,
        .ctrlbit        = S3C2416_HCLKCON_HSMMC0,
index 3dc2426e23457dbb4a04bb8a32349087c5be9b18..554e0d3ec70b0f8979c857636a402790c98c49c5 100644 (file)
@@ -90,14 +90,12 @@ static int s3c2440_camif_upll_setrate(struct clk *clk, unsigned long rate)
 
 static struct clk s3c2440_clk_cam = {
        .name           = "camif",
-       .id             = -1,
        .enable         = s3c2410_clkcon_enable,
        .ctrlbit        = S3C2440_CLKCON_CAMERA,
 };
 
 static struct clk s3c2440_clk_cam_upll = {
        .name           = "camif-upll",
-       .id             = -1,
        .ops            = &(struct clk_ops) {
                .set_rate       = s3c2440_camif_upll_setrate,
                .round_rate     = s3c2440_camif_upll_round,
@@ -106,7 +104,6 @@ static struct clk s3c2440_clk_cam_upll = {
 
 static struct clk s3c2440_clk_ac97 = {
        .name           = "ac97",
-       .id             = -1,
        .enable         = s3c2410_clkcon_enable,
        .ctrlbit        = S3C2440_CLKCON_CAMERA,
 };
index f4ec6d5715c8956805de27b9673409e80f2183fc..a1a7176675b9904210545133303542e25d4636b6 100644 (file)
@@ -59,7 +59,6 @@
 
 static struct clk clk_i2s_ext = {
        .name           = "i2s-ext",
-       .id             = -1,
 };
 
 /* armdiv
@@ -139,7 +138,6 @@ static int s3c2443_armclk_setrate(struct clk *clk, unsigned long rate)
 
 static struct clk clk_armdiv = {
        .name           = "armdiv",
-       .id             = -1,
        .parent         = &clk_msysclk.clk,
        .ops            = &(struct clk_ops) {
                .round_rate = s3c2443_armclk_roundrate,
@@ -160,7 +158,6 @@ static struct clk *clk_arm_sources[] = {
 static struct clksrc_clk clk_arm = {
        .clk    = {
                .name           = "armclk",
-               .id             = -1,
        },
        .sources = &(struct clksrc_sources) {
                .sources = clk_arm_sources,
@@ -177,7 +174,6 @@ static struct clksrc_clk clk_arm = {
 static struct clksrc_clk clk_hsspi = {
        .clk    = {
                .name           = "hsspi",
-               .id             = -1,
                .parent         = &clk_esysclk.clk,
                .ctrlbit        = S3C2443_SCLKCON_HSSPICLK,
                .enable         = s3c2443_clkcon_enable_s,
@@ -196,7 +192,7 @@ static struct clksrc_clk clk_hsspi = {
 static struct clksrc_clk clk_hsmmc_div = {
        .clk    = {
                .name           = "hsmmc-div",
-               .id             = 1,
+               .devname        = "s3c-sdhci.1",
                .parent         = &clk_esysclk.clk,
        },
        .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 },
@@ -231,7 +227,7 @@ static int s3c2443_enable_hsmmc(struct clk *clk, int enable)
 
 static struct clk clk_hsmmc = {
        .name           = "hsmmc-if",
-       .id             = 1,
+       .devname        = "s3c-sdhci.1",
        .parent         = &clk_hsmmc_div.clk,
        .enable         = s3c2443_enable_hsmmc,
        .ops            = &(struct clk_ops) {
@@ -248,7 +244,6 @@ static struct clk clk_hsmmc = {
 static struct clksrc_clk clk_i2s_eplldiv = {
        .clk    = {
                .name           = "i2s-eplldiv",
-               .id             = -1,
                .parent         = &clk_esysclk.clk,
        },
        .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 12, },
@@ -271,7 +266,6 @@ struct clk *clk_i2s_srclist[] = {
 static struct clksrc_clk clk_i2s = {
        .clk    = {
                .name           = "i2s-if",
-               .id             = -1,
                .ctrlbit        = S3C2443_SCLKCON_I2SCLK,
                .enable         = s3c2443_clkcon_enable_s,
 
@@ -288,25 +282,23 @@ static struct clksrc_clk clk_i2s = {
 static struct clk init_clocks_off[] = {
        {
                .name           = "sdi",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2443_clkcon_enable_p,
                .ctrlbit        = S3C2443_PCLKCON_SDI,
        }, {
                .name           = "iis",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2443_clkcon_enable_p,
                .ctrlbit        = S3C2443_PCLKCON_IIS,
        }, {
                .name           = "spi",
-               .id             = 0,
+               .devname        = "s3c2410-spi.0",
                .parent         = &clk_p,
                .enable         = s3c2443_clkcon_enable_p,
                .ctrlbit        = S3C2443_PCLKCON_SPI0,
        }, {
                .name           = "spi",
-               .id             = 1,
+               .devname        = "s3c2410-spi.1",
                .parent         = &clk_p,
                .enable         = s3c2443_clkcon_enable_p,
                .ctrlbit        = S3C2443_PCLKCON_SPI1,
diff --git a/arch/arm/mach-s3c24a0/include/mach/debug-macro.S b/arch/arm/mach-s3c24a0/include/mach/debug-macro.S
deleted file mode 100644 (file)
index 0c5a738..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* arch/arm/mach-s3c2410/include/mach/debug-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.
-*/
-
-/* pull in the relevant register and map files. */
-
-#include <mach/map.h>
-#include <plat/regs-serial.h>
-
-       .macro addruart, rp, rv
-               ldr     \rp, = S3C24XX_PA_UART
-               ldr     \rv, = S3C24XX_VA_UART
-#if CONFIG_DEBUG_S3C_UART != 0
-               add     \rp, \rp, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C_UART)
-               add     \rv, \rv, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C_UART)
-#endif
-       .endm
-
-/* include the reset of the code which will do the work, we're only
- * compiling for a single cpu processor type so the default of s3c2440
- * will be fine with us.
- */
-
-#include <plat/debug-macro.S>
diff --git a/arch/arm/mach-s3c24a0/include/mach/io.h b/arch/arm/mach-s3c24a0/include/mach/io.h
deleted file mode 100644 (file)
index 4326c30..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/* arch/arm/mach-s3c24a0/include/mach/io.h
- *
- * Copyright 2008 Simtec Electronics
- *     Ben Dooks <ben-linux@fluff.org>
- *
- * Default IO routines for S3C24A0
- */
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-/* No current ISA/PCI bus support. */
-#define __io(a)                __typesafe_io(a)
-#define __mem_pci(a)   (a)
-
-#define IO_SPACE_LIMIT (0xFFFFFFFF)
-
-#endif
diff --git a/arch/arm/mach-s3c24a0/include/mach/irqs.h b/arch/arm/mach-s3c24a0/include/mach/irqs.h
deleted file mode 100644 (file)
index 83ce2a7..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/* linux/arch/arm/mach-s3c24a0/include/mach/irqs.h
- *
- * Copyright (c) 2003-2005 Simtec Electronics
- *   Ben Dooks <ben@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.
-*/
-
-
-#ifndef __ASM_ARCH_24A0_IRQS_H
-#define __ASM_ARCH_24A0_IRQS_H __FILE__
-
-#define IRQ_EINT0t2    S3C2410_IRQ(0)  /* 16 */
-/* for generic entry-macro.S */
-#define IRQ_EINT0      IRQ_EINT0t2
-
-#define IRQ_EINT3t6    S3C2410_IRQ(1)
-#define IRQ_EINT7t10   S3C2410_IRQ(2)
-#define IRQ_EINT11t14  S3C2410_IRQ(3)
-#define IRQ_EINT15t18  S3C2410_IRQ(4)  /* 20 */
-#define IRQ_TICK       S3C2410_IRQ(5)
-#define IRQ_DCTQ       S3C2410_IRQ(6)
-#define IRQ_MC         S3C2410_IRQ(7)
-#define IRQ_ME         S3C2410_IRQ(8)  /* 24 */
-#define IRQ_KEYPAD     S3C2410_IRQ(9)
-#define IRQ_TIMER0     S3C2410_IRQ(10)
-#define IRQ_TIMER1     S3C2410_IRQ(11)
-#define IRQ_TIMER2     S3C2410_IRQ(12)
-#define IRQ_TIMER3_4   S3C2410_IRQ(13)
-#define IRQ_OS_TIMER   IRQ_TIMER3_4
-#define IRQ_LCD                S3C2410_IRQ(14)
-#define IRQ_CAM_C      S3C2410_IRQ(15)
-#define IRQ_WDT_BATFLT S3C2410_IRQ(16) /* 32 */
-#define IRQ_UART0      S3C2410_IRQ(17)
-#define IRQ_CAM_P      S3C2410_IRQ(18)
-#define IRQ_MODEM      S3C2410_IRQ(19)
-#define IRQ_DMA                S3C2410_IRQ(20)
-#define IRQ_SDI                S3C2410_IRQ(21)
-#define IRQ_SPI0       S3C2410_IRQ(22)
-#define IRQ_UART1      S3C2410_IRQ(23)
-#define IRQ_AC97_NFLASH        S3C2410_IRQ(24) /* 40 */
-#define IRQ_USBD       S3C2410_IRQ(25)
-#define IRQ_USBH       S3C2410_IRQ(26)
-#define IRQ_IIC                S3C2410_IRQ(27)
-#define IRQ_IRDA_MSTICK        S3C2410_IRQ(28) /* 44 */
-#define IRQ_VLX_SPI1   S3C2410_IRQ(29)
-#define IRQ_RTC                S3C2410_IRQ(30) /* 46 */
-#define IRQ_ADC_PEN     S3C2410_IRQ(31)
-
-/* interrupts generated from the external interrupts sources */
-#define IRQ_EINT00     S3C2410_IRQ(32) /* 48 */
-#define IRQ_EINT1      S3C2410_IRQ(33)
-#define IRQ_EINT2      S3C2410_IRQ(34)
-#define IRQ_EINT3      S3C2410_IRQ(35)
-#define IRQ_EINT4      S3C2410_IRQ(36)
-#define IRQ_EINT5      S3C2410_IRQ(37)
-#define IRQ_EINT6      S3C2410_IRQ(38)
-#define IRQ_EINT7      S3C2410_IRQ(39)
-#define IRQ_EINT8      S3C2410_IRQ(40)
-#define IRQ_EINT9      S3C2410_IRQ(41)
-#define IRQ_EINT10     S3C2410_IRQ(42)
-#define IRQ_EINT11     S3C2410_IRQ(43)
-#define IRQ_EINT12     S3C2410_IRQ(44)
-#define IRQ_EINT13     S3C2410_IRQ(45)
-#define IRQ_EINT14     S3C2410_IRQ(46)
-#define IRQ_EINT15     S3C2410_IRQ(47)
-#define IRQ_EINT16     S3C2410_IRQ(48)
-#define IRQ_EINT17     S3C2410_IRQ(49)
-#define IRQ_EINT18     S3C2410_IRQ(50)
-
-#define IRQ_EINT_BIT(x) ((x) - IRQ_EINT00)
-
-/* SUB IRQS */
-#define IRQ_S3CUART_RX0                S3C2410_IRQ(51) /* 67 */
-#define IRQ_S3CUART_TX0                S3C2410_IRQ(52)
-#define IRQ_S3CUART_ERR0       S3C2410_IRQ(53)
-
-#define IRQ_S3CUART_RX1                S3C2410_IRQ(54)
-#define IRQ_S3CUART_TX1                S3C2410_IRQ(55)
-#define IRQ_S3CUART_ERR1       S3C2410_IRQ(56)
-
-#define IRQ_S3CUART_RX2                (0x0)
-#define IRQ_S3CUART_TX2                (0x0)
-#define IRQ_S3CUART_ERR2       (0x0)
-
-
-#define IRQ_IRDA       S3C2410_IRQ(57)
-#define IRQ_MSTICK     S3C2410_IRQ(58)
-#define IRQ_RESERVED0  S3C2410_IRQ(59)
-#define IRQ_RESERVED1  S3C2410_IRQ(60)
-#define IRQ_RESERVED2  S3C2410_IRQ(61)
-#define IRQ_TIMER3     S3C2410_IRQ(62)
-#define IRQ_TIMER4     S3C2410_IRQ(63)
-#define IRQ_WDT                S3C2410_IRQ(64)
-#define IRQ_BATFLT     S3C2410_IRQ(65)
-#define IRQ_POST       S3C2410_IRQ(66)
-#define IRQ_DISP_FIFO  S3C2410_IRQ(67)
-#define IRQ_PENUP      S3C2410_IRQ(68)
-#define IRQ_PENDN      S3C2410_IRQ(69)
-#define IRQ_ADC                S3C2410_IRQ(70)
-#define IRQ_DISP_FRAME S3C2410_IRQ(71)
-#define IRQ_NFLASH     S3C2410_IRQ(72)
-#define IRQ_AC97       S3C2410_IRQ(73)
-#define IRQ_SPI1       S3C2410_IRQ(74)
-#define IRQ_VLX                S3C2410_IRQ(75)
-#define IRQ_DMA0       S3C2410_IRQ(76)
-#define IRQ_DMA1       S3C2410_IRQ(77)
-#define IRQ_DMA2       S3C2410_IRQ(78)
-#define IRQ_DMA3       S3C2410_IRQ(79)
-
-#define IRQ_TC         (0x0)
-
-#define NR_IRQS                (IRQ_DMA3+1)
-
-#endif /* __ASM_ARCH_24A0_IRQS_H */
diff --git a/arch/arm/mach-s3c24a0/include/mach/map.h b/arch/arm/mach-s3c24a0/include/mach/map.h
deleted file mode 100644 (file)
index d88c8b2..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/* linux/arch/arm/mach-s3c24a0/include/mach/map.h
- *
- * Copyright 2003-2007  Simtec Electronics
- *     http://armlinux.simtec.co.uk/
- *     Ben Dooks <ben@simtec.co.uk>
- *
- * S3C24A0 - Memory 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_ARCH_24A0_MAP_H
-#define __ASM_ARCH_24A0_MAP_H __FILE__
-
-#include <plat/map-base.h>
-#include <plat/map.h>
-
-#define S3C24A0_PA_IO_BASE     (0x40000000)
-#define S3C24A0_PA_CLKPWR      (0x40000000)
-#define S3C24A0_PA_IRQ         (0x40200000)
-#define S3C24A0_PA_DMA         (0x40400000)
-#define S3C24A0_PA_MEMCTRL     (0x40C00000)
-#define S3C24A0_PA_NAND                (0x40C00000)
-#define S3C24A0_PA_SROM                (0x40C20000)
-#define S3C24A0_PA_SDRAM       (0x40C40000)
-#define S3C24A0_PA_BUSM                (0x40CE0000)
-#define S3C24A0_PA_USBHOST     (0x41000000)
-#define S3C24A0_PA_MODEMIF     (0x41180000)
-#define S3C24A0_PA_IRDA                (0x41800000)
-#define S3C24A0_PA_TIMER       (0x44000000)
-#define S3C24A0_PA_WATCHDOG    (0x44100000)
-#define S3C24A0_PA_RTC         (0x44200000)
-#define S3C24A0_PA_UART                (0x44400000)
-#define S3C24A0_PA_UART0       (S3C24A0_PA_UART)
-#define S3C24A0_PA_UART1       (S3C24A0_PA_UART + 0x4000)
-#define S3C24A0_PA_SPI         (0x44500000)
-#define S3C24A0_PA_IIC         (0x44600000)
-#define S3C24A0_PA_IIS         (0x44700000)
-#define S3C24A0_PA_GPIO                (0x44800000)
-#define S3C24A0_PA_KEYIF       (0x44900000)
-#define S3C24A0_PA_USBDEV      (0x44A00000)
-#define S3C24A0_PA_AC97                (0x45000000)
-#define S3C24A0_PA_ADC         (0x45800000)
-#define S3C24A0_PA_SDI         (0x46000000)
-#define S3C24A0_PA_MS          (0x46100000)
-#define S3C24A0_PA_LCD         (0x4A000000)
-#define S3C24A0_PA_VPOST       (0x4A100000)
-
-/* physical addresses of all the chip-select areas */
-
-#define S3C24A0_CS0    (0x00000000)
-#define S3C24A0_CS1    (0x04000000)
-#define S3C24A0_CS2    (0x08000000)
-#define S3C24A0_CS3    (0x0C000000)
-#define S3C24A0_CS4    (0x10000000)
-#define S3C24A0_CS5    (0x40000000)
-
-#define S3C24A0_SDRAM_PA       (S3C24A0_CS4)
-
-/* Use a single interface for common resources between S3C24XX cpus */
-
-#define S3C24XX_PA_IRQ         S3C24A0_PA_IRQ
-#define S3C24XX_PA_MEMCTRL     S3C24A0_PA_MEMCTRL
-#define S3C24XX_PA_USBHOST     S3C24A0_PA_USBHOST
-#define S3C24XX_PA_DMA         S3C24A0_PA_DMA
-#define S3C24XX_PA_CLKPWR      S3C24A0_PA_CLKPWR
-#define S3C24XX_PA_LCD         S3C24A0_PA_LCD
-#define S3C24XX_PA_UART                S3C24A0_PA_UART
-#define S3C24XX_PA_TIMER       S3C24A0_PA_TIMER
-#define S3C24XX_PA_USBDEV      S3C24A0_PA_USBDEV
-#define S3C24XX_PA_WATCHDOG    S3C24A0_PA_WATCHDOG
-#define S3C24XX_PA_IIS         S3C24A0_PA_IIS
-#define S3C24XX_PA_GPIO                S3C24A0_PA_GPIO
-#define S3C24XX_PA_RTC         S3C24A0_PA_RTC
-#define S3C24XX_PA_ADC         S3C24A0_PA_ADC
-#define S3C24XX_PA_SPI         S3C24A0_PA_SPI
-#define S3C24XX_PA_SDI         S3C24A0_PA_SDI
-#define S3C24XX_PA_NAND                S3C24A0_PA_NAND
-
-#define S3C_PA_UART            S3C24A0_PA_UART
-#define S3C_PA_IIC             S3C24A0_PA_IIC
-#define S3C_PA_NAND            S3C24XX_PA_NAND
-
-#endif /* __ASM_ARCH_24A0_MAP_H */
diff --git a/arch/arm/mach-s3c24a0/include/mach/memory.h b/arch/arm/mach-s3c24a0/include/mach/memory.h
deleted file mode 100644 (file)
index 7d208a7..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/* linux/arch/arm/mach-s3c24a0/include/mach/memory.h
- *  from linux/include/asm-arm/arch-rpc/memory.h
- *
- *  Copyright (C) 1996,1997,1998 Russell King.
- *
- * 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_24A0_MEMORY_H
-#define __ASM_ARCH_24A0_MEMORY_H __FILE__
-
-#define PLAT_PHYS_OFFSET UL(0x10000000)
-
-#define __virt_to_bus(x) __virt_to_phys(x)
-#define __bus_to_virt(x) __phys_to_virt(x)
-#define __pfn_to_bus(x) __pfn_to_phys(x)
-#define __bus_to_pfn(x)        __phys_to_pfn(x)
-
-#endif
diff --git a/arch/arm/mach-s3c24a0/include/mach/regs-clock.h b/arch/arm/mach-s3c24a0/include/mach/regs-clock.h
deleted file mode 100644 (file)
index be0af51..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/* linux/arch/arm/mach-s3c24a0/include/mach/regs-clock.h
- *
- * Copyright (c) 2003-2006 Simtec Electronics <linux@simtec.co.uk>
- *     http://armlinux.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.
- *
- * S3C24A0 clock register definitions
-*/
-
-#ifndef __ASM_ARCH_24A0_REGS_CLOCK_H
-#define __ASM_ARCH_24A0_REGS_CLOCK_H __FILE__
-
-#define S3C24A0_MPLLCON                S3C2410_CLKREG(0x10)
-#define S3C24A0_UPLLCON                S3C2410_CLKREG(0x14)
-#define S3C24A0_CLKCON         S3C2410_CLKREG(0x20)
-#define S3C24A0_CLKSRC         S3C2410_CLKREG(0x24)
-#define S3C24A0_CLKDIVN                S3C2410_CLKREG(0x28)
-
-/* CLKCON register bits */
-
-#define S3C24A0_CLKCON_VLX     (1<<29)
-#define S3C24A0_CLKCON_VPOST   (1<<28)
-#define S3C24A0_CLKCON_WDT     (1<<27) /* reserved */
-#define S3C24A0_CLKCON_MPEGDCTQ        (1<<26)
-#define S3C24A0_CLKCON_VPOSTIF (1<<25)
-#define S3C24A0_CLKCON_MPEG4IF (1<<24)
-#define S3C24A0_CLKCON_CAM_UPLL        (1<<23)
-#define S3C24A0_CLKCON_LCDC    (1<<22)
-#define S3C24A0_CLKCON_CAM_HCLK        (1<<21)
-#define S3C24A0_CLKCON_MPEG4   (1<<20)
-#define S3C24A0_CLKCON_KEYPAD  (1<<19)
-#define S3C24A0_CLKCON_ADC     (1<<18)
-#define S3C24A0_CLKCON_SDI     (1<<17)
-#define S3C24A0_CLKCON_MS      (1<<16) /* memory stick */
-#define S3C24A0_CLKCON_USBD    (1<<15)
-#define S3C24A0_CLKCON_GPIO    (1<<14)
-#define S3C24A0_CLKCON_IIS     (1<<13)
-#define S3C24A0_CLKCON_IIC     (1<<12)
-#define S3C24A0_CLKCON_SPI     (1<<11)
-#define S3C24A0_CLKCON_UART1   (1<<10)
-#define S3C24A0_CLKCON_UART0   (1<<9)
-#define S3C24A0_CLKCON_PWMT    (1<<8)
-#define S3C24A0_CLKCON_USBH    (1<<7)
-#define S3C24A0_CLKCON_AC97    (1<<6)
-#define S3C24A0_CLKCON_IrDA    (1<<4)
-#define S3C24A0_CLKCON_IDLE    (1<<2)
-#define S3C24A0_CLKCON_MON     (1<<1)
-#define S3C24A0_CLKCON_STOP    (1<<0)
-
-/* CLKSRC register bits */
-
-#define S3C24A0_CLKSRC_OSC     (1<<8)  /* CLKSRC */
-#define S3C24A0_CLKSRC_UPLL    (1<<7)
-#define S3C24A0_CLKSRC_MPLL    (1<<5)
-#define S3C24A0_CLKSRC_EXT     (1<<4)
-
-/* Use a single interface with the common code, for s3c24xx */
-
-#define S3C2410_MPLLCON                S3C24A0_MPLLCON
-#define S3C2410_UPLLCON                S3C24A0_UPLLCON
-#define S3C2410_CLKCON         S3C24A0_CLKCON
-#define S3C2410_CLKSLOW                S3C24A0_CLKSRC
-#define S3C2410_CLKDIVN                S3C24A0_CLKDIVN
-
-#define S3C2410_CLKCON_IDLE    S3C24A0_CLKCON_IDLE
-#define S3C2410_CLKCON_POWER   S3C24A0_CLKCON_STOP
-#define S3C2410_CLKCON_LCDC    S3C24A0_CLKCON_LCDC
-#define S3C2410_CLKCON_USBH    S3C24A0_CLKCON_USBH
-#define S3C2410_CLKCON_USBD    S3C24A0_CLKCON_USBD
-#define S3C2410_CLKCON_PWMT    S3C24A0_CLKCON_PWMT
-#define S3C2410_CLKCON_SDI     S3C24A0_CLKCON_SDI
-#define S3C2410_CLKCON_UART0   S3C24A0_CLKCON_UART0
-#define S3C2410_CLKCON_UART1   S3C24A0_CLKCON_UART1
-#define S3C2410_CLKCON_GPIO    S3C24A0_CLKCON_GPIO
-#define S3C2410_CLKCON_ADC     S3C24A0_CLKCON_ADC
-#define S3C2410_CLKCON_IIC     S3C24A0_CLKCON_IIC
-#define S3C2410_CLKCON_IIS     S3C24A0_CLKCON_IIS
-#define S3C2410_CLKCON_SPI     S3C24A0_CLKCON_SPI
-
-#define S3C2410_CLKSLOW_UCLK_OFF       S3C24A0_CLKSRC_UPLL
-#define S3C2410_CLKSLOW_MPLL_OFF       S3C24A0_CLKSRC_MPLL
-#define S3C2410_CLKSLOW_SLOW           (0xFF)
-#define S3C2410_CLKSLOW_GET_SLOWVAL(x) (0x1)
-
-#endif /* __ASM_ARCH_24A0_REGS_CLOCK_H */
diff --git a/arch/arm/mach-s3c24a0/include/mach/regs-irq.h b/arch/arm/mach-s3c24a0/include/mach/regs-irq.h
deleted file mode 100644 (file)
index 6086f6f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* linux/arch/arm/mach-s3c24a0/include/mach/regs-irq.h
- *
- * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
- *                   http://www.simtec.co.uk/products/SWLINUX/
- *
- * 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_24A0_REGS_IRQ_H
-#define ___ASM_ARCH_24A0_REGS_IRQ_H __FILE__
-
-
-#define S3C2410_EINTMASK       S3C2410_EINTREG(0x034)
-#define S3C2410_EINTPEND       S3C2410_EINTREG(0X038)
-
-#define S3C24XX_EINTMASK       S3C24XX_EINTREG(0x034)
-#define S3C24XX_EINTPEND       S3C24XX_EINTREG(0X038)
-
-#endif /* __ASM_ARCH_24A0_REGS_IRQ_H */
-
-
-
diff --git a/arch/arm/mach-s3c24a0/include/mach/system.h b/arch/arm/mach-s3c24a0/include/mach/system.h
deleted file mode 100644 (file)
index bd1bd19..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* linux/arch/arm/mach-s3c24a0/include/mach/system.h
- *
- * Copyright 2008 Simtec Electronics
- *     Ben Dooks <ben@simtec.co.uk>
- *
- * S3C24A0 - System function defines and includes
- *
- * 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/hardware.h>
-#include <asm/io.h>
-
-#include <mach/map.h>
-
-static void arch_idle(void)
-{
-       /* currently no specific idle support. */
-}
-
-void (*s3c24xx_reset_hook)(void);
-
-#include <asm/plat-s3c24xx/system-reset.h>
diff --git a/arch/arm/mach-s3c24a0/include/mach/tick.h b/arch/arm/mach-s3c24a0/include/mach/tick.h
deleted file mode 100644 (file)
index 9dea8ba..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/* linux/arch/arm/mach-s3c24a0/include/mach/tick.h
- *
- * Copyright 2008 Simtec Electronics
- *      Ben Dooks <ben@simtec.co.uk>
- *      http://armlinux.simtec.co.uk/
- *
- * S3C24A0 - timer tick support
- */
-
-#define SUBSRC_TIMER4  (1 << (IRQ_TIMER4 - IRQ_S3CUART_RX0))
-
-static inline int s3c24xx_ostimer_pending(void)
-{
-       return __raw_readl(S3C2410_SUBSRCPND) & SUBSRC_TIMER4;
-}
diff --git a/arch/arm/mach-s3c24a0/include/mach/timex.h b/arch/arm/mach-s3c24a0/include/mach/timex.h
deleted file mode 100644 (file)
index 9857342..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/* linux/arch/arm/mach-s3c24a0/include/mach/timex.h
- *
- * Copyright (c) 2008 Simtec Electronics
- *     Ben Dooks <ben@simtec.co.uk>
- *
- * S3C2410 - time parameters
- *
- * 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_TIMEX_H
-#define __ASM_ARCH_TIMEX_H
-
-#define CLOCK_TICK_RATE 12000000
-
-#endif /* __ASM_ARCH_TIMEX_H */
diff --git a/arch/arm/mach-s3c24a0/include/mach/vmalloc.h b/arch/arm/mach-s3c24a0/include/mach/vmalloc.h
deleted file mode 100644 (file)
index 6480b15..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/* linux/include/asm-arm/arch-s3c24ao/vmalloc.h
- *
- * Copyright 2008 Simtec Electronics <linux@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.
- *
- * S3C24A0 vmalloc definition
-*/
-
-#ifndef __ASM_ARCH_VMALLOC_H
-#define __ASM_ARCH_VMALLOC_H
-
-#define VMALLOC_END    0xF6000000UL
-
-#endif /* __ASM_ARCH_VMALLOC_H */
index e4177e22557b5eac7e9638c0de3c93b2ae689f7e..fdc89fc3b46493ae502282454013d4c7b1e77814 100644 (file)
@@ -142,6 +142,7 @@ config MACH_SMDK6410
        select S3C_DEV_USB_HOST
        select S3C_DEV_USB_HSOTG
        select S3C_DEV_WDT
+       select SAMSUNG_DEV_BACKLIGHT
        select SAMSUNG_DEV_KEYPAD
        select SAMSUNG_DEV_PWM
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
index fdfc4d5e37a13ae98255593286f13979c91f52e5..8cf39e33579e3bb9c7d30eceb6afcaa5914e6d2c 100644 (file)
@@ -39,7 +39,6 @@
 
 static struct clk clk_ext_xtal_mux = {
        .name           = "ext_xtal",
-       .id             = -1,
 };
 
 #define clk_fin_apll clk_ext_xtal_mux
@@ -51,13 +50,11 @@ static struct clk clk_ext_xtal_mux = {
 
 struct clk clk_h2 = {
        .name           = "hclk2",
-       .id             = -1,
        .rate           = 0,
 };
 
 struct clk clk_27m = {
        .name           = "clk_27m",
-       .id             = -1,
        .rate           = 27000000,
 };
 
@@ -83,14 +80,12 @@ static int clk_48m_ctrl(struct clk *clk, int enable)
 
 struct clk clk_48m = {
        .name           = "clk_48m",
-       .id             = -1,
        .rate           = 48000000,
        .enable         = clk_48m_ctrl,
 };
 
 struct clk clk_xusbxti = {
        .name           = "xusbxti",
-       .id             = -1,
        .rate           = 48000000,
 };
 
@@ -130,109 +125,101 @@ int s3c64xx_sclk_ctrl(struct clk *clk, int enable)
 static struct clk init_clocks_off[] = {
        {
                .name           = "nand",
-               .id             = -1,
                .parent         = &clk_h,
        }, {
                .name           = "rtc",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c64xx_pclk_ctrl,
                .ctrlbit        = S3C_CLKCON_PCLK_RTC,
        }, {
                .name           = "adc",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c64xx_pclk_ctrl,
                .ctrlbit        = S3C_CLKCON_PCLK_TSADC,
        }, {
                .name           = "i2c",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c64xx_pclk_ctrl,
                .ctrlbit        = S3C_CLKCON_PCLK_IIC,
        }, {
                .name           = "i2c",
-               .id             = 1,
+               .devname        = "s3c2440-i2c.1",
                .parent         = &clk_p,
                .enable         = s3c64xx_pclk_ctrl,
                .ctrlbit        = S3C6410_CLKCON_PCLK_I2C1,
        }, {
                .name           = "iis",
-               .id             = 0,
+               .devname        = "samsung-i2s.0",
                .parent         = &clk_p,
                .enable         = s3c64xx_pclk_ctrl,
                .ctrlbit        = S3C_CLKCON_PCLK_IIS0,
        }, {
                .name           = "iis",
-               .id             = 1,
+               .devname        = "samsung-i2s.1",
                .parent         = &clk_p,
                .enable         = s3c64xx_pclk_ctrl,
                .ctrlbit        = S3C_CLKCON_PCLK_IIS1,
        }, {
 #ifdef CONFIG_CPU_S3C6410
                .name           = "iis",
-               .id             = -1,  /* There's only one IISv4 port */
                .parent         = &clk_p,
                .enable         = s3c64xx_pclk_ctrl,
                .ctrlbit        = S3C6410_CLKCON_PCLK_IIS2,
        }, {
 #endif
                .name           = "keypad",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c64xx_pclk_ctrl,
                .ctrlbit        = S3C_CLKCON_PCLK_KEYPAD,
        }, {
                .name           = "spi",
-               .id             = 0,
+               .devname        = "s3c64xx-spi.0",
                .parent         = &clk_p,
                .enable         = s3c64xx_pclk_ctrl,
                .ctrlbit        = S3C_CLKCON_PCLK_SPI0,
        }, {
                .name           = "spi",
-               .id             = 1,
+               .devname        = "s3c64xx-spi.1",
                .parent         = &clk_p,
                .enable         = s3c64xx_pclk_ctrl,
                .ctrlbit        = S3C_CLKCON_PCLK_SPI1,
        }, {
                .name           = "spi_48m",
-               .id             = 0,
+               .devname        = "s3c64xx-spi.0",
                .parent         = &clk_48m,
                .enable         = s3c64xx_sclk_ctrl,
                .ctrlbit        = S3C_CLKCON_SCLK_SPI0_48,
        }, {
                .name           = "spi_48m",
-               .id             = 1,
+               .devname        = "s3c64xx-spi.1",
                .parent         = &clk_48m,
                .enable         = s3c64xx_sclk_ctrl,
                .ctrlbit        = S3C_CLKCON_SCLK_SPI1_48,
        }, {
                .name           = "48m",
-               .id             = 0,
+               .devname        = "s3c-sdhci.0",
                .parent         = &clk_48m,
                .enable         = s3c64xx_sclk_ctrl,
                .ctrlbit        = S3C_CLKCON_SCLK_MMC0_48,
        }, {
                .name           = "48m",
-               .id             = 1,
+               .devname        = "s3c-sdhci.1",
                .parent         = &clk_48m,
                .enable         = s3c64xx_sclk_ctrl,
                .ctrlbit        = S3C_CLKCON_SCLK_MMC1_48,
        }, {
                .name           = "48m",
-               .id             = 2,
+               .devname        = "s3c-sdhci.2",
                .parent         = &clk_48m,
                .enable         = s3c64xx_sclk_ctrl,
                .ctrlbit        = S3C_CLKCON_SCLK_MMC2_48,
        }, {
                .name           = "dma0",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c64xx_hclk_ctrl,
                .ctrlbit        = S3C_CLKCON_HCLK_DMA0,
        }, {
                .name           = "dma1",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c64xx_hclk_ctrl,
                .ctrlbit        = S3C_CLKCON_HCLK_DMA1,
@@ -242,89 +229,81 @@ static struct clk init_clocks_off[] = {
 static struct clk init_clocks[] = {
        {
                .name           = "lcd",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c64xx_hclk_ctrl,
                .ctrlbit        = S3C_CLKCON_HCLK_LCD,
        }, {
                .name           = "gpio",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c64xx_pclk_ctrl,
                .ctrlbit        = S3C_CLKCON_PCLK_GPIO,
        }, {
                .name           = "usb-host",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c64xx_hclk_ctrl,
                .ctrlbit        = S3C_CLKCON_HCLK_UHOST,
        }, {
                .name           = "hsmmc",
-               .id             = 0,
+               .devname        = "s3c-sdhci.0",
                .parent         = &clk_h,
                .enable         = s3c64xx_hclk_ctrl,
                .ctrlbit        = S3C_CLKCON_HCLK_HSMMC0,
        }, {
                .name           = "hsmmc",
-               .id             = 1,
+               .devname        = "s3c-sdhci.1",
                .parent         = &clk_h,
                .enable         = s3c64xx_hclk_ctrl,
                .ctrlbit        = S3C_CLKCON_HCLK_HSMMC1,
        }, {
                .name           = "hsmmc",
-               .id             = 2,
+               .devname        = "s3c-sdhci.2",
                .parent         = &clk_h,
                .enable         = s3c64xx_hclk_ctrl,
                .ctrlbit        = S3C_CLKCON_HCLK_HSMMC2,
        }, {
                .name           = "otg",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c64xx_hclk_ctrl,
                .ctrlbit        = S3C_CLKCON_HCLK_USB,
        }, {
                .name           = "timers",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c64xx_pclk_ctrl,
                .ctrlbit        = S3C_CLKCON_PCLK_PWM,
        }, {
                .name           = "uart",
-               .id             = 0,
+               .devname        = "s3c6400-uart.0",
                .parent         = &clk_p,
                .enable         = s3c64xx_pclk_ctrl,
                .ctrlbit        = S3C_CLKCON_PCLK_UART0,
        }, {
                .name           = "uart",
-               .id             = 1,
+               .devname        = "s3c6400-uart.1",
                .parent         = &clk_p,
                .enable         = s3c64xx_pclk_ctrl,
                .ctrlbit        = S3C_CLKCON_PCLK_UART1,
        }, {
                .name           = "uart",
-               .id             = 2,
+               .devname        = "s3c6400-uart.2",
                .parent         = &clk_p,
                .enable         = s3c64xx_pclk_ctrl,
                .ctrlbit        = S3C_CLKCON_PCLK_UART2,
        }, {
                .name           = "uart",
-               .id             = 3,
+               .devname        = "s3c6400-uart.3",
                .parent         = &clk_p,
                .enable         = s3c64xx_pclk_ctrl,
                .ctrlbit        = S3C_CLKCON_PCLK_UART3,
        }, {
                .name           = "watchdog",
-               .id             = -1,
                .parent         = &clk_p,
                .ctrlbit        = S3C_CLKCON_PCLK_WDT,
        }, {
                .name           = "ac97",
-               .id             = -1,
                .parent         = &clk_p,
                .ctrlbit        = S3C_CLKCON_PCLK_AC97,
        }, {
                .name           = "cfcon",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c64xx_hclk_ctrl,
                .ctrlbit        = S3C_CLKCON_HCLK_IHOST,
@@ -334,7 +313,6 @@ static struct clk init_clocks[] = {
 
 static struct clk clk_fout_apll = {
        .name           = "fout_apll",
-       .id             = -1,
 };
 
 static struct clk *clk_src_apll_list[] = {
@@ -350,7 +328,6 @@ static struct clksrc_sources clk_src_apll = {
 static struct clksrc_clk clk_mout_apll = {
        .clk    = {
                .name           = "mout_apll",
-               .id             = -1,
        },
        .reg_src        = { .reg = S3C_CLK_SRC, .shift = 0, .size = 1  },
        .sources        = &clk_src_apll,
@@ -369,7 +346,6 @@ static struct clksrc_sources clk_src_epll = {
 static struct clksrc_clk clk_mout_epll = {
        .clk    = {
                .name           = "mout_epll",
-               .id             = -1,
        },
        .reg_src        = { .reg = S3C_CLK_SRC, .shift = 2, .size = 1  },
        .sources        = &clk_src_epll,
@@ -388,7 +364,6 @@ static struct clksrc_sources clk_src_mpll = {
 static struct clksrc_clk clk_mout_mpll = {
        .clk = {
                .name           = "mout_mpll",
-               .id             = -1,
        },
        .reg_src        = { .reg = S3C_CLK_SRC, .shift = 1, .size = 1  },
        .sources        = &clk_src_mpll,
@@ -446,7 +421,6 @@ static int s3c64xx_clk_arm_set_rate(struct clk *clk, unsigned long rate)
 
 static struct clk clk_arm = {
        .name           = "armclk",
-       .id             = -1,
        .parent         = &clk_mout_apll.clk,
        .ops            = &(struct clk_ops) {
                .get_rate       = s3c64xx_clk_arm_get_rate,
@@ -473,7 +447,6 @@ static struct clk_ops clk_dout_ops = {
 
 static struct clk clk_dout_mpll = {
        .name           = "dout_mpll",
-       .id             = -1,
        .parent         = &clk_mout_mpll.clk,
        .ops            = &clk_dout_ops,
 };
@@ -540,22 +513,18 @@ static struct clksrc_sources clkset_uhost = {
 
 static struct clk clk_iis_cd0 = {
        .name           = "iis_cdclk0",
-       .id             = -1,
 };
 
 static struct clk clk_iis_cd1 = {
        .name           = "iis_cdclk1",
-       .id             = -1,
 };
 
 static struct clk clk_iisv4_cd = {
        .name           = "iis_cdclk_v4",
-       .id             = -1,
 };
 
 static struct clk clk_pcm_cd = {
        .name           = "pcm_cdclk",
-       .id             = -1,
 };
 
 static struct clk *clkset_audio0_list[] = {
@@ -610,7 +579,7 @@ static struct clksrc_clk clksrcs[] = {
        {
                .clk    = {
                        .name           = "mmc_bus",
-                       .id             = 0,
+                       .devname        = "s3c-sdhci.0",
                        .ctrlbit        = S3C_CLKCON_SCLK_MMC0,
                        .enable         = s3c64xx_sclk_ctrl,
                },
@@ -620,7 +589,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "mmc_bus",
-                       .id             = 1,
+                       .devname        = "s3c-sdhci.1",
                        .ctrlbit        = S3C_CLKCON_SCLK_MMC1,
                        .enable         = s3c64xx_sclk_ctrl,
                },
@@ -630,7 +599,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "mmc_bus",
-                       .id             = 2,
+                       .devname        = "s3c-sdhci.2",
                        .ctrlbit        = S3C_CLKCON_SCLK_MMC2,
                        .enable         = s3c64xx_sclk_ctrl,
                },
@@ -640,7 +609,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "usb-bus-host",
-                       .id             = -1,
                        .ctrlbit        = S3C_CLKCON_SCLK_UHOST,
                        .enable         = s3c64xx_sclk_ctrl,
                },
@@ -650,7 +618,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "uclk1",
-                       .id             = -1,
                        .ctrlbit        = S3C_CLKCON_SCLK_UART,
                        .enable         = s3c64xx_sclk_ctrl,
                },
@@ -661,7 +628,7 @@ static struct clksrc_clk clksrcs[] = {
 /* Where does UCLK0 come from? */
                .clk    = {
                        .name           = "spi-bus",
-                       .id             = 0,
+                       .devname        = "s3c64xx-spi.0",
                        .ctrlbit        = S3C_CLKCON_SCLK_SPI0,
                        .enable         = s3c64xx_sclk_ctrl,
                },
@@ -671,8 +638,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "spi-bus",
-                       .id             = 1,
-                       .ctrlbit        = S3C_CLKCON_SCLK_SPI1,
+                       .devname        = "s3c64xx-spi.1",
                        .enable         = s3c64xx_sclk_ctrl,
                },
                .reg_src        = { .reg = S3C_CLK_SRC, .shift = 16, .size = 2  },
@@ -681,7 +647,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "audio-bus",
-                       .id             = 0,
+                       .devname        = "samsung-i2s.0",
                        .ctrlbit        = S3C_CLKCON_SCLK_AUDIO0,
                        .enable         = s3c64xx_sclk_ctrl,
                },
@@ -691,7 +657,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "audio-bus",
-                       .id             = 1,
+                       .devname        = "samsung-i2s.1",
                        .ctrlbit        = S3C_CLKCON_SCLK_AUDIO1,
                        .enable         = s3c64xx_sclk_ctrl,
                },
@@ -701,7 +667,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "audio-bus",
-                       .id             = 2,
+                       .devname        = "samsung-i2s.2",
                        .ctrlbit        = S3C6410_CLKCON_SCLK_AUDIO2,
                        .enable         = s3c64xx_sclk_ctrl,
                },
@@ -711,7 +677,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "irda-bus",
-                       .id             = 0,
                        .ctrlbit        = S3C_CLKCON_SCLK_IRDA,
                        .enable         = s3c64xx_sclk_ctrl,
                },
@@ -721,7 +686,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "camera",
-                       .id             = -1,
                        .ctrlbit        = S3C_CLKCON_SCLK_CAM,
                        .enable         = s3c64xx_sclk_ctrl,
                },
index 92ffd5bac104fbf90b1a741d89506da84acc8b60..999f9e17a1e4ff7223529680d1c71f4098af5666 100644 (file)
@@ -19,6 +19,8 @@
 #include <mach/irqs.h>
 #include <mach/map.h>
 
+#include <plat/devs.h>
+
 static struct resource s3c64xx_onenand1_resources[] = {
        [0] = {
                .start  = S3C64XX_PA_ONENAND1,
@@ -46,10 +48,6 @@ struct platform_device s3c64xx_device_onenand1 = {
 
 void s3c64xx_onenand1_set_platdata(struct onenand_platform_data *pdata)
 {
-       struct onenand_platform_data *pd;
-
-       pd = kmemdup(pdata, sizeof(struct onenand_platform_data), GFP_KERNEL);
-       if (!pd)
-               printk(KERN_ERR "%s: no memory for platform data\n", __func__);
-       s3c64xx_device_onenand1.dev.platform_data = pd;
+       s3c_set_platdata(pdata, sizeof(struct onenand_platform_data),
+                        &s3c64xx_device_onenand1);
 }
diff --git a/arch/arm/mach-s3c64xx/include/mach/clkdev.h b/arch/arm/mach-s3c64xx/include/mach/clkdev.h
new file mode 100644 (file)
index 0000000..7dffa83
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef __MACH_CLKDEV_H__
+#define __MACH_CLKDEV_H__
+
+#define __clk_get(clk) ({ 1; })
+#define __clk_put(clk) do {} while (0)
+
+#endif
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-fb.h b/arch/arm/mach-s3c64xx/include/mach/regs-fb.h
deleted file mode 100644 (file)
index a06ee0a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright 2008 Openmoko, Inc.
- * Copyright 2008 Simtec Electronics
- * Copyright 2009 Samsung Electronics Co.
- *
- * Pawel Osciak <p.osciak@samsung.com>
- * Based on plat-s3c/include/plat/regs-fb.h by Ben Dooks <ben@simtec.co.uk>
- *
- * Framebuffer register definitions for Samsung S3C64xx.
- *
- * 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_MACH_REGS_FB_H
-#define __ASM_ARCH_MACH_REGS_FB_H __FILE__
-
-#include <plat/regs-fb-v4.h>
-
-#endif /* __ASM_ARCH_MACH_REGS_FB_H */
index a53cf149476e882b7c96e5d776b39eb6486e9957..cb8864327ac4a3da52ac33d3203b39249ced6d86 100644 (file)
@@ -35,7 +35,6 @@
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <mach/regs-fb.h>
 #include <mach/map.h>
 
 #include <asm/irq.h>
@@ -44,6 +43,7 @@
 #include <plat/regs-serial.h>
 #include <plat/iic.h>
 #include <plat/fb.h>
+#include <plat/regs-fb-v4.h>
 
 #include <mach/s3c6410.h>
 #include <plat/clock.h>
index b2639582cacaa32013804a385e3a5b0079ae6108..b3d93cc8dde0ebd5d719dd3bb4656f5b43879fde 100644 (file)
@@ -27,7 +27,6 @@
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <mach/regs-fb.h>
 #include <mach/map.h>
 
 #include <asm/irq.h>
@@ -42,6 +41,7 @@
 #include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
+#include <plat/regs-fb-v4.h>
 
 #define UCON S3C2410_UCON_DEFAULT
 #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE)
index 89f35e02e88367aacfe5d2a60187859c1ecd3be1..527f49bd1b57aadab2fc54ce869b2a27aca45449 100644 (file)
@@ -29,7 +29,6 @@
 #include <asm/mach/map.h>
 
 #include <mach/map.h>
-#include <mach/regs-fb.h>
 #include <mach/regs-gpio.h>
 #include <mach/regs-modem.h>
 #include <mach/regs-srom.h>
@@ -42,6 +41,7 @@
 #include <plat/nand.h>
 #include <plat/regs-serial.h>
 #include <plat/ts.h>
+#include <plat/regs-fb-v4.h>
 
 #include <video/platform_lcd.h>
 
index c4986498cd1203f93bd15783d801216f3d2f8fc8..01c6857c5b6318855c6a141066ecf0094ac0dbb2 100644 (file)
@@ -30,7 +30,6 @@
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <mach/regs-fb.h>
 #include <mach/map.h>
 
 #include <asm/irq.h>
@@ -44,6 +43,7 @@
 #include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
+#include <plat/regs-fb-v4.h>
 
 #define UCON S3C2410_UCON_DEFAULT
 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE
index 4957ab0a0d4a371effa85505fcc40b5957294485..95b04b1729e3634ecf02c16ffa79240fe46e9ead 100644 (file)
@@ -30,7 +30,6 @@
 #include <asm/mach/map.h>
 
 #include <mach/map.h>
-#include <mach/regs-fb.h>
 #include <mach/regs-gpio.h>
 #include <mach/regs-modem.h>
 #include <mach/regs-srom.h>
@@ -43,6 +42,7 @@
 #include <plat/nand.h>
 #include <plat/regs-serial.h>
 #include <plat/ts.h>
+#include <plat/regs-fb-v4.h>
 
 #include <video/platform_lcd.h>
 
index 3a3e5acde523c8fde3a12d254d476a9ac9d03fd2..342e8dfddf8b55229bbc809fbe27499333e8eaff 100644 (file)
@@ -21,7 +21,6 @@
 #include <asm/mach/arch.h>
 
 #include <mach/map.h>
-#include <mach/regs-fb.h>
 #include <mach/regs-gpio.h>
 #include <mach/s3c6410.h>
 
@@ -29,6 +28,7 @@
 #include <plat/devs.h>
 #include <plat/fb.h>
 #include <plat/gpio-cfg.h>
+#include <plat/regs-fb-v4.h>
 
 #include "mach-smartq.h"
 
index e65375877d53437b7ee51a508025a4afc56d1414..57963977da8e4c1d95a608d9cad9d72b04d0b262 100644 (file)
@@ -21,7 +21,6 @@
 #include <asm/mach/arch.h>
 
 #include <mach/map.h>
-#include <mach/regs-fb.h>
 #include <mach/regs-gpio.h>
 #include <mach/s3c6410.h>
 
@@ -29,6 +28,7 @@
 #include <plat/devs.h>
 #include <plat/fb.h>
 #include <plat/gpio-cfg.h>
+#include <plat/regs-fb-v4.h>
 
 #include "mach-smartq.h"
 
index 2c0353a809061115b046244719d9aeb3f71e6e95..ecbea92bf83b60d76d313ed68bb49eca091e262e 100644 (file)
@@ -48,7 +48,6 @@
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <mach/regs-fb.h>
 #include <mach/map.h>
 
 #include <asm/irq.h>
@@ -71,6 +70,8 @@
 #include <plat/adc.h>
 #include <plat/ts.h>
 #include <plat/keypad.h>
+#include <plat/backlight.h>
+#include <plat/regs-fb-v4.h>
 
 #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
@@ -209,17 +210,9 @@ static struct platform_device smdk6410_smsc911x = {
 };
 
 #ifdef CONFIG_REGULATOR
-static struct regulator_consumer_supply smdk6410_b_pwr_5v_consumers[] = {
-       {
-               /* WM8580 */
-               .supply = "PVDD",
-               .dev_name = "0-001b",
-       },
-       {
-               /* WM8580 */
-               .supply = "AVDD",
-               .dev_name = "0-001b",
-       },
+static struct regulator_consumer_supply smdk6410_b_pwr_5v_consumers[] __initdata = {
+       REGULATOR_SUPPLY("PVDD", "0-001b"),
+       REGULATOR_SUPPLY("AVDD", "0-001b"),
 };
 
 static struct regulator_init_data smdk6410_b_pwr_5v_data = {
@@ -337,16 +330,12 @@ static struct platform_device *smdk6410_devices[] __initdata = {
        &s3c_device_rtc,
        &s3c_device_ts,
        &s3c_device_wdt,
-       &s3c_device_timer[1],
-       &smdk6410_backlight_device,
 };
 
 #ifdef CONFIG_REGULATOR
 /* ARM core */
 static struct regulator_consumer_supply smdk6410_vddarm_consumers[] = {
-       {
-               .supply = "vddarm",
-       }
+       REGULATOR_SUPPLY("vddarm", NULL),
 };
 
 /* VDDARM, BUCK1 on J5 */
@@ -484,11 +473,7 @@ static struct regulator_init_data wm8350_dcdc3_data = {
 
 /* USB, EXT, PCM, ADC/DAC, USB, MMC */
 static struct regulator_consumer_supply wm8350_dcdc4_consumers[] = {
-       {
-               /* WM8580 */
-               .supply = "DVDD",
-               .dev_name = "0-001b",
-       },
+       REGULATOR_SUPPLY("DVDD", "0-001b"),
 };
 
 static struct regulator_init_data wm8350_dcdc4_data = {
@@ -599,7 +584,7 @@ static struct regulator_init_data wm1192_dcdc3 = {
 };
 
 static struct regulator_consumer_supply wm1192_ldo1_consumers[] = {
-       { .supply = "DVDD", .dev_name = "0-001b", },   /* WM8580 */
+       REGULATOR_SUPPLY("DVDD", "0-001b"),   /* WM8580 */
 };
 
 static struct regulator_init_data wm1192_ldo1 = {
@@ -679,6 +664,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
        .oversampling_shift     = 2,
 };
 
+/* LCD Backlight data */
+static struct samsung_bl_gpio_info smdk6410_bl_gpio_info = {
+       .no = S3C64XX_GPF(15),
+       .func = S3C_GPIO_SFN(2),
+};
+
+static struct platform_pwm_backlight_data smdk6410_bl_data = {
+       .pwm_id = 1,
+};
+
 static void __init smdk6410_map_io(void)
 {
        u32 tmp;
@@ -740,6 +735,8 @@ static void __init smdk6410_machine_init(void)
 
        s3c_ide_set_platdata(&smdk6410_ide_pdata);
 
+       samsung_bl_set(&smdk6410_bl_gpio_info, &smdk6410_bl_data);
+
        platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices));
 }
 
index 8f3091182f9c51bf41fcbc65c29713bc85dfbc58..83d2afb79e9f88370fbced458f6ffbf9a5b1b1c8 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/fb.h>
 #include <linux/gpio.h>
 
-#include <mach/regs-fb.h>
 #include <plat/fb.h>
 #include <plat/gpio-cfg.h>
 
index 017af4c4293c763757cd780aa63758682e3e6c88..65c7518dad7fe3de3534543407972740baecb8e2 100644 (file)
@@ -36,6 +36,7 @@ config MACH_SMDK6440
        select S3C_DEV_WDT
        select S3C64XX_DEV_SPI
        select SAMSUNG_DEV_ADC
+       select SAMSUNG_DEV_BACKLIGHT
        select SAMSUNG_DEV_PWM
        select SAMSUNG_DEV_TS
        select S5P64X0_SETUP_I2C1
@@ -50,6 +51,7 @@ config MACH_SMDK6450
        select S3C_DEV_WDT
        select S3C64XX_DEV_SPI
        select SAMSUNG_DEV_ADC
+       select SAMSUNG_DEV_BACKLIGHT
        select SAMSUNG_DEV_PWM
        select SAMSUNG_DEV_TS
        select S5P64X0_SETUP_I2C1
index 9f12c2ebf416d59345776ffdf0807e416ebed3f2..0e9cd3092dd241b852c5dcfeb2b17411e33edb92 100644 (file)
@@ -95,7 +95,6 @@ static struct clk_ops s5p6440_epll_ops = {
 static struct clksrc_clk clk_hclk = {
        .clk    = {
                .name           = "clk_hclk",
-               .id             = -1,
                .parent         = &clk_armclk.clk,
        },
        .reg_div        = { .reg = S5P64X0_CLK_DIV0, .shift = 8, .size = 4 },
@@ -104,7 +103,6 @@ static struct clksrc_clk clk_hclk = {
 static struct clksrc_clk clk_pclk = {
        .clk    = {
                .name           = "clk_pclk",
-               .id             = -1,
                .parent         = &clk_hclk.clk,
        },
        .reg_div        = { .reg = S5P64X0_CLK_DIV0, .shift = 12, .size = 4 },
@@ -112,7 +110,6 @@ static struct clksrc_clk clk_pclk = {
 static struct clksrc_clk clk_hclk_low = {
        .clk    = {
                .name           = "clk_hclk_low",
-               .id             = -1,
        },
        .sources        = &clkset_hclk_low,
        .reg_src        = { .reg = S5P64X0_SYS_OTHERS, .shift = 6, .size = 1 },
@@ -122,7 +119,6 @@ static struct clksrc_clk clk_hclk_low = {
 static struct clksrc_clk clk_pclk_low = {
        .clk    = {
                .name           = "clk_pclk_low",
-               .id             = -1,
                .parent         = &clk_hclk_low.clk,
        },
        .reg_div        = { .reg = S5P64X0_CLK_DIV3, .shift = 12, .size = 4 },
@@ -136,187 +132,167 @@ static struct clksrc_clk clk_pclk_low = {
 static struct clk init_clocks_off[] = {
        {
                .name           = "nand",
-               .id             = -1,
                .parent         = &clk_hclk.clk,
                .enable         = s5p64x0_mem_ctrl,
                .ctrlbit        = (1 << 2),
        }, {
                .name           = "post",
-               .id             = -1,
                .parent         = &clk_hclk_low.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 5)
        }, {
                .name           = "2d",
-               .id             = -1,
                .parent         = &clk_hclk.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 8),
        }, {
                .name           = "pdma",
-               .id             = -1,
                .parent         = &clk_hclk_low.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 12),
        }, {
                .name           = "hsmmc",
-               .id             = 0,
+               .devname        = "s3c-sdhci.0",
                .parent         = &clk_hclk_low.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 17),
        }, {
                .name           = "hsmmc",
-               .id             = 1,
+               .devname        = "s3c-sdhci.1",
                .parent         = &clk_hclk_low.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 18),
        }, {
                .name           = "hsmmc",
-               .id             = 2,
+               .devname        = "s3c-sdhci.2",
                .parent         = &clk_hclk_low.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 19),
        }, {
                .name           = "otg",
-               .id             = -1,
                .parent         = &clk_hclk_low.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 20)
        }, {
                .name           = "irom",
-               .id             = -1,
                .parent         = &clk_hclk.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 25),
        }, {
                .name           = "lcd",
-               .id             = -1,
                .parent         = &clk_hclk_low.clk,
                .enable         = s5p64x0_hclk1_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "hclk_fimgvg",
-               .id             = -1,
                .parent         = &clk_hclk.clk,
                .enable         = s5p64x0_hclk1_ctrl,
                .ctrlbit        = (1 << 2),
        }, {
                .name           = "tsi",
-               .id             = -1,
                .parent         = &clk_hclk_low.clk,
                .enable         = s5p64x0_hclk1_ctrl,
                .ctrlbit        = (1 << 0),
        }, {
                .name           = "watchdog",
-               .id             = -1,
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 5),
        }, {
                .name           = "rtc",
-               .id             = -1,
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 6),
        }, {
                .name           = "timers",
-               .id             = -1,
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 7),
        }, {
                .name           = "pcm",
-               .id             = -1,
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 8),
        }, {
                .name           = "adc",
-               .id             = -1,
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 12),
        }, {
                .name           = "i2c",
-               .id             = -1,
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 17),
        }, {
                .name           = "spi",
-               .id             = 0,
+               .devname        = "s3c64xx-spi.0",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 21),
        }, {
                .name           = "spi",
-               .id             = 1,
+               .devname        = "s3c64xx-spi.1",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 22),
        }, {
                .name           = "gps",
-               .id             = -1,
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 25),
        }, {
                .name           = "iis",
-               .id             = 0,
+               .devname        = "samsung-i2s.0",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 26),
        }, {
                .name           = "dsim",
-               .id             = -1,
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 28),
        }, {
                .name           = "etm",
-               .id             = -1,
                .parent         = &clk_pclk.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 29),
        }, {
                .name           = "dmc0",
-               .id             = -1,
                .parent         = &clk_pclk.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 30),
        }, {
                .name           = "pclk_fimgvg",
-               .id             = -1,
                .parent         = &clk_pclk.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 31),
        }, {
                .name           = "sclk_spi_48",
-               .id             = 0,
+               .devname        = "s3c64xx-spi.0",
                .parent         = &clk_48m,
                .enable         = s5p64x0_sclk_ctrl,
                .ctrlbit        = (1 << 22),
        }, {
                .name           = "sclk_spi_48",
-               .id             = 1,
+               .devname        = "s3c64xx-spi.1",
                .parent         = &clk_48m,
                .enable         = s5p64x0_sclk_ctrl,
                .ctrlbit        = (1 << 23),
        }, {
                .name           = "mmc_48m",
-               .id             = 0,
+               .devname        = "s3c-sdhci.0",
                .parent         = &clk_48m,
                .enable         = s5p64x0_sclk_ctrl,
                .ctrlbit        = (1 << 27),
        }, {
                .name           = "mmc_48m",
-               .id             = 1,
+               .devname        = "s3c-sdhci.1",
                .parent         = &clk_48m,
                .enable         = s5p64x0_sclk_ctrl,
                .ctrlbit        = (1 << 28),
        }, {
                .name           = "mmc_48m",
-               .id             = 2,
+               .devname        = "s3c-sdhci.2",
                .parent         = &clk_48m,
                .enable         = s5p64x0_sclk_ctrl,
                .ctrlbit        = (1 << 29),
@@ -329,43 +305,40 @@ static struct clk init_clocks_off[] = {
 static struct clk init_clocks[] = {
        {
                .name           = "intc",
-               .id             = -1,
                .parent         = &clk_hclk.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "mem",
-               .id             = -1,
                .parent         = &clk_hclk.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 21),
        }, {
                .name           = "uart",
-               .id             = 0,
+               .devname        = "s3c6400-uart.0",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "uart",
-               .id             = 1,
+               .devname        = "s3c6400-uart.1",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 2),
        }, {
                .name           = "uart",
-               .id             = 2,
+               .devname        = "s3c6400-uart.2",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 3),
        }, {
                .name           = "uart",
-               .id             = 3,
+               .devname        = "s3c6400-uart.3",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 4),
        }, {
                .name           = "gpio",
-               .id             = -1,
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 18),
@@ -374,12 +347,10 @@ static struct clk init_clocks[] = {
 
 static struct clk clk_iis_cd_v40 = {
        .name           = "iis_cdclk_v40",
-       .id             = -1,
 };
 
 static struct clk clk_pcm_cd = {
        .name           = "pcm_cdclk",
-       .id             = -1,
 };
 
 static struct clk *clkset_group1_list[] = {
@@ -420,7 +391,7 @@ static struct clksrc_clk clksrcs[] = {
        {
                .clk    = {
                        .name           = "sclk_mmc",
-                       .id             = 0,
+                       .devname        = "s3c-sdhci.0",
                        .ctrlbit        = (1 << 24),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -430,7 +401,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_mmc",
-                       .id             = 1,
+                       .devname        = "s3c-sdhci.1",
                        .ctrlbit        = (1 << 25),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -440,7 +411,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_mmc",
-                       .id             = 2,
+                       .devname        = "s3c-sdhci.2",
                        .ctrlbit        = (1 << 26),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -450,7 +421,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "uclk1",
-                       .id             = -1,
                        .ctrlbit        = (1 << 5),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -460,7 +430,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_spi",
-                       .id             = 0,
+                       .devname        = "s3c64xx-spi.0",
                        .ctrlbit        = (1 << 20),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -470,7 +440,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_spi",
-                       .id             = 1,
+                       .devname        = "s3c64xx-spi.1",
                        .ctrlbit        = (1 << 21),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -480,7 +450,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_post",
-                       .id             = -1,
                        .ctrlbit        = (1 << 10),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -490,7 +459,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_dispcon",
-                       .id             = -1,
                        .ctrlbit        = (1 << 1),
                        .enable         = s5p64x0_sclk1_ctrl,
                },
@@ -500,7 +468,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_fimgvg",
-                       .id             = -1,
                        .ctrlbit        = (1 << 2),
                        .enable         = s5p64x0_sclk1_ctrl,
                },
@@ -510,7 +477,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_audio2",
-                       .id             = -1,
                        .ctrlbit        = (1 << 11),
                        .enable         = s5p64x0_sclk_ctrl,
                },
index 4eec457ddccc3733c5c3f81ba605cb32addf24de..d9dc16cde109c22de40bca3c417c528e40c4605e 100644 (file)
@@ -36,7 +36,6 @@
 static struct clksrc_clk clk_mout_dpll = {
        .clk    = {
                .name           = "mout_dpll",
-               .id             = -1,
        },
        .sources        = &clk_src_dpll,
        .reg_src        = { .reg = S5P64X0_CLK_SRC0, .shift = 5, .size = 1 },
@@ -96,7 +95,6 @@ static struct clk_ops s5p6450_epll_ops = {
 static struct clksrc_clk clk_dout_epll = {
        .clk    = {
                .name           = "dout_epll",
-               .id             = -1,
                .parent         = &clk_mout_epll.clk,
        },
        .reg_div        = { .reg = S5P64X0_CLK_DIV1, .shift = 24, .size = 4 },
@@ -105,7 +103,6 @@ static struct clksrc_clk clk_dout_epll = {
 static struct clksrc_clk clk_mout_hclk_sel = {
        .clk    = {
                .name           = "mout_hclk_sel",
-               .id             = -1,
        },
        .sources        = &clkset_hclk_low,
        .reg_src        = { .reg = S5P64X0_OTHERS, .shift = 15, .size = 1 },
@@ -124,7 +121,6 @@ static struct clksrc_sources clkset_hclk = {
 static struct clksrc_clk clk_hclk = {
        .clk    = {
                .name           = "clk_hclk",
-               .id             = -1,
        },
        .sources        = &clkset_hclk,
        .reg_src        = { .reg = S5P64X0_OTHERS, .shift = 14, .size = 1 },
@@ -134,7 +130,6 @@ static struct clksrc_clk clk_hclk = {
 static struct clksrc_clk clk_pclk = {
        .clk    = {
                .name           = "clk_pclk",
-               .id             = -1,
                .parent         = &clk_hclk.clk,
        },
        .reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 12, .size = 4 },
@@ -142,7 +137,6 @@ static struct clksrc_clk clk_pclk = {
 static struct clksrc_clk clk_dout_pwm_ratio0 = {
        .clk    = {
                .name           = "clk_dout_pwm_ratio0",
-               .id             = -1,
                .parent         = &clk_mout_hclk_sel.clk,
        },
        .reg_div        = { .reg = S5P64X0_CLK_DIV3, .shift = 16, .size = 4 },
@@ -151,7 +145,6 @@ static struct clksrc_clk clk_dout_pwm_ratio0 = {
 static struct clksrc_clk clk_pclk_to_wdt_pwm = {
        .clk    = {
                .name           = "clk_pclk_to_wdt_pwm",
-               .id             = -1,
                .parent         = &clk_dout_pwm_ratio0.clk,
        },
        .reg_div        = { .reg = S5P64X0_CLK_DIV3, .shift = 20, .size = 4 },
@@ -160,7 +153,6 @@ static struct clksrc_clk clk_pclk_to_wdt_pwm = {
 static struct clksrc_clk clk_hclk_low = {
        .clk    = {
                .name           = "clk_hclk_low",
-               .id             = -1,
        },
        .sources        = &clkset_hclk_low,
        .reg_src        = { .reg = S5P64X0_OTHERS, .shift = 6, .size = 1 },
@@ -170,7 +162,6 @@ static struct clksrc_clk clk_hclk_low = {
 static struct clksrc_clk clk_pclk_low = {
        .clk    = {
                .name           = "clk_pclk_low",
-               .id             = -1,
                .parent         = &clk_hclk_low.clk,
        },
        .reg_div        = { .reg = S5P64X0_CLK_DIV3, .shift = 12, .size = 4 },
@@ -184,109 +175,101 @@ static struct clksrc_clk clk_pclk_low = {
 static struct clk init_clocks_off[] = {
        {
                .name           = "usbhost",
-               .id             = -1,
                .parent         = &clk_hclk_low.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 3),
        }, {
                .name           = "pdma",
-               .id             = -1,
                .parent         = &clk_hclk_low.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 12),
        }, {
                .name           = "hsmmc",
-               .id             = 0,
+               .devname        = "s3c-sdhci.0",
                .parent         = &clk_hclk_low.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 17),
        }, {
                .name           = "hsmmc",
-               .id             = 1,
+               .devname        = "s3c-sdhci.1",
                .parent         = &clk_hclk_low.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 18),
        }, {
                .name           = "hsmmc",
-               .id             = 2,
+               .devname        = "s3c-sdhci.2",
                .parent         = &clk_hclk_low.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 19),
        }, {
                .name           = "usbotg",
-               .id             = -1,
                .parent         = &clk_hclk_low.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 20),
        }, {
                .name           = "lcd",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s5p64x0_hclk1_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "watchdog",
-               .id             = -1,
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 5),
        }, {
                .name           = "rtc",
-               .id             = -1,
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 6),
        }, {
                .name           = "adc",
-               .id             = -1,
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 12),
        }, {
                .name           = "i2c",
-               .id             = 0,
+               .devname        = "s3c2440-i2c.0",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 17),
        }, {
                .name           = "spi",
-               .id             = 0,
+               .devname        = "s3c64xx-spi.0",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 21),
        }, {
                .name           = "spi",
-               .id             = 1,
+               .devname        = "s3c64xx-spi.1",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 22),
        }, {
                .name           = "iis",
-               .id             = 0,
+               .devname        = "samsung-i2s.0",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 26),
        }, {
                .name           = "iis",
-               .id             = 1,
+               .devname        = "samsung-i2s.1",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 15),
        }, {
                .name           = "iis",
-               .id             = 2,
+               .devname        = "samsung-i2s.2",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 16),
        }, {
                .name           = "i2c",
-               .id             = 1,
+               .devname        = "s3c2440-i2c.1",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 27),
        }, {
                .name           = "dmc0",
-               .id             = -1,
                .parent         = &clk_pclk.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 30),
@@ -299,49 +282,45 @@ static struct clk init_clocks_off[] = {
 static struct clk init_clocks[] = {
        {
                .name           = "intc",
-               .id             = -1,
                .parent         = &clk_hclk.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "mem",
-               .id             = -1,
                .parent         = &clk_hclk.clk,
                .enable         = s5p64x0_hclk0_ctrl,
                .ctrlbit        = (1 << 21),
        }, {
                .name           = "uart",
-               .id             = 0,
+               .devname        = "s3c6400-uart.0",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "uart",
-               .id             = 1,
+               .devname        = "s3c6400-uart.1",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 2),
        }, {
                .name           = "uart",
-               .id             = 2,
+               .devname        = "s3c6400-uart.2",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 3),
        }, {
                .name           = "uart",
-               .id             = 3,
+               .devname        = "s3c6400-uart.3",
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 4),
        }, {
                .name           = "timers",
-               .id             = -1,
                .parent         = &clk_pclk_to_wdt_pwm.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 7),
        }, {
                .name           = "gpio",
-               .id             = -1,
                .parent         = &clk_pclk_low.clk,
                .enable         = s5p64x0_pclk_ctrl,
                .ctrlbit        = (1 << 18),
@@ -421,7 +400,6 @@ static struct clksrc_sources clkset_sclk_audio0 = {
 static struct clksrc_clk clk_sclk_audio0 = {
        .clk            = {
                .name           = "audio-bus",
-               .id             = -1,
                .enable         = s5p64x0_sclk_ctrl,
                .ctrlbit        = (1 << 8),
                .parent         = &clk_dout_epll.clk,
@@ -435,7 +413,7 @@ static struct clksrc_clk clksrcs[] = {
        {
                .clk    = {
                        .name           = "sclk_mmc",
-                       .id             = 0,
+                       .devname        = "s3c-sdhci.0",
                        .ctrlbit        = (1 << 24),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -445,7 +423,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_mmc",
-                       .id             = 1,
+                       .devname        = "s3c-sdhci.1",
                        .ctrlbit        = (1 << 25),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -455,7 +433,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_mmc",
-                       .id             = 2,
+                       .devname        = "s3c-sdhci.2",
                        .ctrlbit        = (1 << 26),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -465,7 +443,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "uclk1",
-                       .id             = -1,
                        .ctrlbit        = (1 << 5),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -475,7 +452,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_spi",
-                       .id             = 0,
+                       .devname        = "s3c64xx-spi.0",
                        .ctrlbit        = (1 << 20),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -485,7 +462,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_spi",
-                       .id             = 1,
+                       .devname        = "s3c64xx-spi.1",
                        .ctrlbit        = (1 << 21),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -495,7 +472,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_fimc",
-                       .id             = -1,
                        .ctrlbit        = (1 << 10),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -505,7 +481,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "aclk_mali",
-                       .id             = -1,
                        .ctrlbit        = (1 << 2),
                        .enable         = s5p64x0_sclk1_ctrl,
                },
@@ -515,7 +490,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_2d",
-                       .id             = -1,
                        .ctrlbit        = (1 << 12),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -525,7 +499,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_usi",
-                       .id             = -1,
                        .ctrlbit        = (1 << 7),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -535,7 +508,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_camif",
-                       .id             = -1,
                        .ctrlbit        = (1 << 6),
                        .enable         = s5p64x0_sclk_ctrl,
                },
@@ -545,7 +517,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_dispcon",
-                       .id             = -1,
                        .ctrlbit        = (1 << 1),
                        .enable         = s5p64x0_sclk1_ctrl,
                },
@@ -555,7 +526,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_hsmmc44",
-                       .id             = -1,
                        .ctrlbit        = (1 << 30),
                        .enable         = s5p64x0_sclk_ctrl,
                },
diff --git a/arch/arm/mach-s5p64x0/include/mach/clkdev.h b/arch/arm/mach-s5p64x0/include/mach/clkdev.h
new file mode 100644 (file)
index 0000000..7dffa83
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef __MACH_CLKDEV_H__
+#define __MACH_CLKDEV_H__
+
+#define __clk_get(clk) ({ 1; })
+#define __clk_put(clk) do {} while (0)
+
+#endif
index 2d559f10fd473c4fc976d9aac45fa29e2262af2e..346f8dfa6f3539d500fbcdbb88c70e4847d0c5e1 100644 (file)
@@ -46,6 +46,7 @@
 #include <plat/adc.h>
 #include <plat/ts.h>
 #include <plat/s5p-time.h>
+#include <plat/backlight.h>
 
 #define SMDK6440_UCON_DEFAULT  (S3C2410_UCON_TXILEVEL |        \
                                S3C2410_UCON_RXILEVEL |         \
@@ -91,45 +92,6 @@ static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = {
        },
 };
 
-static int smdk6440_backlight_init(struct device *dev)
-{
-       int ret;
-
-       ret = gpio_request(S5P6440_GPF(15), "Backlight");
-       if (ret) {
-               printk(KERN_ERR "failed to request GPF for PWM-OUT1\n");
-               return ret;
-       }
-
-       /* Configure GPIO pin with S5P6440_GPF15_PWM_TOUT1 */
-       s3c_gpio_cfgpin(S5P6440_GPF(15), S3C_GPIO_SFN(2));
-
-       return 0;
-}
-
-static void smdk6440_backlight_exit(struct device *dev)
-{
-       s3c_gpio_cfgpin(S5P6440_GPF(15), S3C_GPIO_OUTPUT);
-       gpio_free(S5P6440_GPF(15));
-}
-
-static struct platform_pwm_backlight_data smdk6440_backlight_data = {
-       .pwm_id         = 1,
-       .max_brightness = 255,
-       .dft_brightness = 255,
-       .pwm_period_ns  = 78770,
-       .init           = smdk6440_backlight_init,
-       .exit           = smdk6440_backlight_exit,
-};
-
-static struct platform_device smdk6440_backlight_device = {
-       .name           = "pwm-backlight",
-       .dev            = {
-               .parent         = &s3c_device_timer[1].dev,
-               .platform_data  = &smdk6440_backlight_data,
-       },
-};
-
 static struct platform_device *smdk6440_devices[] __initdata = {
        &s3c_device_adc,
        &s3c_device_rtc,
@@ -139,8 +101,6 @@ static struct platform_device *smdk6440_devices[] __initdata = {
        &s3c_device_wdt,
        &samsung_asoc_dma,
        &s5p6440_device_iis,
-       &s3c_device_timer[1],
-       &smdk6440_backlight_device,
 };
 
 static struct s3c2410_platform_i2c s5p6440_i2c0_data __initdata = {
@@ -175,6 +135,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
        .oversampling_shift     = 2,
 };
 
+/* LCD Backlight data */
+static struct samsung_bl_gpio_info smdk6440_bl_gpio_info = {
+       .no = S5P6440_GPF(15),
+       .func = S3C_GPIO_SFN(2),
+};
+
+static struct platform_pwm_backlight_data smdk6440_bl_data = {
+       .pwm_id = 1,
+};
+
 static void __init smdk6440_map_io(void)
 {
        s5p_init_io(NULL, 0, S5P64X0_SYS_ID);
@@ -194,6 +164,8 @@ static void __init smdk6440_machine_init(void)
        i2c_register_board_info(1, smdk6440_i2c_devs1,
                        ARRAY_SIZE(smdk6440_i2c_devs1));
 
+       samsung_bl_set(&smdk6440_bl_gpio_info, &smdk6440_bl_data);
+
        platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices));
 }
 
index d19c4690ee97cf2740c9a9aee8c4fd083868e25b..33f2adf8f3fe01f592fd4a9ccdeba0b1f31dbe4f 100644 (file)
@@ -46,6 +46,7 @@
 #include <plat/adc.h>
 #include <plat/ts.h>
 #include <plat/s5p-time.h>
+#include <plat/backlight.h>
 
 #define SMDK6450_UCON_DEFAULT  (S3C2410_UCON_TXILEVEL |        \
                                S3C2410_UCON_RXILEVEL |         \
@@ -109,45 +110,6 @@ static struct s3c2410_uartcfg smdk6450_uartcfgs[] __initdata = {
 #endif
 };
 
-static int smdk6450_backlight_init(struct device *dev)
-{
-       int ret;
-
-       ret = gpio_request(S5P6450_GPF(15), "Backlight");
-       if (ret) {
-               printk(KERN_ERR "failed to request GPF for PWM-OUT1\n");
-               return ret;
-       }
-
-       /* Configure GPIO pin with S5P6450_GPF15_PWM_TOUT1 */
-       s3c_gpio_cfgpin(S5P6450_GPF(15), S3C_GPIO_SFN(2));
-
-       return 0;
-}
-
-static void smdk6450_backlight_exit(struct device *dev)
-{
-       s3c_gpio_cfgpin(S5P6450_GPF(15), S3C_GPIO_OUTPUT);
-       gpio_free(S5P6450_GPF(15));
-}
-
-static struct platform_pwm_backlight_data smdk6450_backlight_data = {
-       .pwm_id         = 1,
-       .max_brightness = 255,
-       .dft_brightness = 255,
-       .pwm_period_ns  = 78770,
-       .init           = smdk6450_backlight_init,
-       .exit           = smdk6450_backlight_exit,
-};
-
-static struct platform_device smdk6450_backlight_device = {
-       .name           = "pwm-backlight",
-       .dev            = {
-               .parent         = &s3c_device_timer[1].dev,
-               .platform_data  = &smdk6450_backlight_data,
-       },
-};
-
 static struct platform_device *smdk6450_devices[] __initdata = {
        &s3c_device_adc,
        &s3c_device_rtc,
@@ -157,8 +119,6 @@ static struct platform_device *smdk6450_devices[] __initdata = {
        &s3c_device_wdt,
        &samsung_asoc_dma,
        &s5p6450_device_iis0,
-       &s3c_device_timer[1],
-       &smdk6450_backlight_device,
        /* s5p6450_device_spi0 will be added */
 };
 
@@ -194,6 +154,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
        .oversampling_shift     = 2,
 };
 
+/* LCD Backlight data */
+static struct samsung_bl_gpio_info smdk6450_bl_gpio_info = {
+       .no = S5P6450_GPF(15),
+       .func = S3C_GPIO_SFN(2),
+};
+
+static struct platform_pwm_backlight_data smdk6450_bl_data = {
+       .pwm_id = 1,
+};
+
 static void __init smdk6450_map_io(void)
 {
        s5p_init_io(NULL, 0, S5P64X0_SYS_ID);
@@ -213,6 +183,8 @@ static void __init smdk6450_machine_init(void)
        i2c_register_board_info(1, smdk6450_i2c_devs1,
                        ARRAY_SIZE(smdk6450_i2c_devs1));
 
+       samsung_bl_set(&smdk6450_bl_gpio_info, &smdk6450_bl_data);
+
        platform_add_devices(smdk6450_devices, ARRAY_SIZE(smdk6450_devices));
 }
 
index 608722ff4f2856d04d3bae15117b738350a9834f..e8a33c4b054cca68c90ce759bd2df5e9198bbf70 100644 (file)
@@ -56,6 +56,7 @@ config MACH_SMDKC100
        select S3C_DEV_RTC
        select S3C_DEV_WDT
        select SAMSUNG_DEV_ADC
+       select SAMSUNG_DEV_BACKLIGHT
        select SAMSUNG_DEV_IDE
        select SAMSUNG_DEV_KEYPAD
        select SAMSUNG_DEV_PWM
index 0305e9b8282d2c838c461d9dd7b1ffde2844f2ea..ff5cbb30de5bb5fc200928018fdfc3f9f7b0f58b 100644 (file)
@@ -31,7 +31,6 @@
 
 static struct clk s5p_clk_otgphy = {
        .name           = "otg_phy",
-       .id             = -1,
 };
 
 static struct clk *clk_src_mout_href_list[] = {
@@ -47,7 +46,6 @@ static struct clksrc_sources clk_src_mout_href = {
 static struct clksrc_clk clk_mout_href = {
        .clk = {
                .name           = "mout_href",
-               .id             = -1,
        },
        .sources        = &clk_src_mout_href,
        .reg_src        = { .reg = S5P_CLK_SRC0, .shift = 20, .size = 1 },
@@ -66,7 +64,6 @@ static struct clksrc_sources clk_src_mout_48m = {
 static struct clksrc_clk clk_mout_48m = {
        .clk = {
                .name           = "mout_48m",
-               .id             = -1,
        },
        .sources        = &clk_src_mout_48m,
        .reg_src        = { .reg = S5P_CLK_SRC1, .shift = 24, .size = 1 },
@@ -75,7 +72,6 @@ static struct clksrc_clk clk_mout_48m = {
 static struct clksrc_clk clk_mout_mpll = {
        .clk = {
                .name           = "mout_mpll",
-               .id             = -1,
        },
        .sources        = &clk_src_mpll,
        .reg_src        = { .reg = S5P_CLK_SRC0, .shift = 4, .size = 1 },
@@ -85,7 +81,6 @@ static struct clksrc_clk clk_mout_mpll = {
 static struct clksrc_clk clk_mout_apll = {
        .clk    = {
                .name           = "mout_apll",
-               .id             = -1,
        },
        .sources        = &clk_src_apll,
        .reg_src        = { .reg = S5P_CLK_SRC0, .shift = 0, .size = 1 },
@@ -94,7 +89,6 @@ static struct clksrc_clk clk_mout_apll = {
 static struct clksrc_clk clk_mout_epll = {
        .clk    = {
                .name           = "mout_epll",
-               .id             = -1,
        },
        .sources        = &clk_src_epll,
        .reg_src        = { .reg = S5P_CLK_SRC0, .shift = 8, .size = 1 },
@@ -112,7 +106,6 @@ static struct clksrc_sources clk_src_mout_hpll = {
 static struct clksrc_clk clk_mout_hpll = {
        .clk    = {
                .name           = "mout_hpll",
-               .id             = -1,
        },
        .sources        = &clk_src_mout_hpll,
        .reg_src        = { .reg = S5P_CLK_SRC0, .shift = 12, .size = 1 },
@@ -121,7 +114,6 @@ static struct clksrc_clk clk_mout_hpll = {
 static struct clksrc_clk clk_div_apll = {
        .clk    = {
                .name   = "div_apll",
-               .id     = -1,
                .parent = &clk_mout_apll.clk,
        },
        .reg_div = { .reg = S5P_CLK_DIV0, .shift = 0, .size = 1 },
@@ -130,7 +122,6 @@ static struct clksrc_clk clk_div_apll = {
 static struct clksrc_clk clk_div_arm = {
        .clk    = {
                .name   = "div_arm",
-               .id     = -1,
                .parent = &clk_div_apll.clk,
        },
        .reg_div = { .reg = S5P_CLK_DIV0, .shift = 4, .size = 3 },
@@ -139,7 +130,6 @@ static struct clksrc_clk clk_div_arm = {
 static struct clksrc_clk clk_div_d0_bus = {
        .clk    = {
                .name   = "div_d0_bus",
-               .id     = -1,
                .parent = &clk_div_arm.clk,
        },
        .reg_div = { .reg = S5P_CLK_DIV0, .shift = 8, .size = 3 },
@@ -148,7 +138,6 @@ static struct clksrc_clk clk_div_d0_bus = {
 static struct clksrc_clk clk_div_pclkd0 = {
        .clk    = {
                .name   = "div_pclkd0",
-               .id     = -1,
                .parent = &clk_div_d0_bus.clk,
        },
        .reg_div = { .reg = S5P_CLK_DIV0, .shift = 12, .size = 3 },
@@ -157,7 +146,6 @@ static struct clksrc_clk clk_div_pclkd0 = {
 static struct clksrc_clk clk_div_secss = {
        .clk    = {
                .name   = "div_secss",
-               .id     = -1,
                .parent = &clk_div_d0_bus.clk,
        },
        .reg_div = { .reg = S5P_CLK_DIV0, .shift = 16, .size = 3 },
@@ -166,7 +154,6 @@ static struct clksrc_clk clk_div_secss = {
 static struct clksrc_clk clk_div_apll2 = {
        .clk    = {
                .name   = "div_apll2",
-               .id     = -1,
                .parent = &clk_mout_apll.clk,
        },
        .reg_div = { .reg = S5P_CLK_DIV1, .shift = 0, .size = 3 },
@@ -185,7 +172,6 @@ struct clksrc_sources clk_src_mout_am = {
 static struct clksrc_clk clk_mout_am = {
        .clk    = {
                .name   = "mout_am",
-               .id     = -1,
        },
        .sources = &clk_src_mout_am,
        .reg_src = { .reg = S5P_CLK_SRC0, .shift = 16, .size = 1 },
@@ -194,7 +180,6 @@ static struct clksrc_clk clk_mout_am = {
 static struct clksrc_clk clk_div_d1_bus = {
        .clk    = {
                .name   = "div_d1_bus",
-               .id     = -1,
                .parent = &clk_mout_am.clk,
        },
        .reg_div = { .reg = S5P_CLK_DIV1, .shift = 12, .size = 3 },
@@ -203,7 +188,6 @@ static struct clksrc_clk clk_div_d1_bus = {
 static struct clksrc_clk clk_div_mpll2 = {
        .clk    = {
                .name   = "div_mpll2",
-               .id     = -1,
                .parent = &clk_mout_am.clk,
        },
        .reg_div = { .reg = S5P_CLK_DIV1, .shift = 8, .size = 1 },
@@ -212,7 +196,6 @@ static struct clksrc_clk clk_div_mpll2 = {
 static struct clksrc_clk clk_div_mpll = {
        .clk    = {
                .name   = "div_mpll",
-               .id     = -1,
                .parent = &clk_mout_am.clk,
        },
        .reg_div = { .reg = S5P_CLK_DIV1, .shift = 4, .size = 2 },
@@ -231,7 +214,6 @@ struct clksrc_sources clk_src_mout_onenand = {
 static struct clksrc_clk clk_mout_onenand = {
        .clk    = {
                .name   = "mout_onenand",
-               .id     = -1,
        },
        .sources = &clk_src_mout_onenand,
        .reg_src = { .reg = S5P_CLK_SRC0, .shift = 24, .size = 1 },
@@ -240,7 +222,6 @@ static struct clksrc_clk clk_mout_onenand = {
 static struct clksrc_clk clk_div_onenand = {
        .clk    = {
                .name   = "div_onenand",
-               .id     = -1,
                .parent = &clk_mout_onenand.clk,
        },
        .reg_div = { .reg = S5P_CLK_DIV1, .shift = 20, .size = 2 },
@@ -249,7 +230,6 @@ static struct clksrc_clk clk_div_onenand = {
 static struct clksrc_clk clk_div_pclkd1 = {
        .clk    = {
                .name   = "div_pclkd1",
-               .id     = -1,
                .parent = &clk_div_d1_bus.clk,
        },
        .reg_div = { .reg = S5P_CLK_DIV1, .shift = 16, .size = 3 },
@@ -258,7 +238,6 @@ static struct clksrc_clk clk_div_pclkd1 = {
 static struct clksrc_clk clk_div_cam = {
        .clk    = {
                .name   = "div_cam",
-               .id     = -1,
                .parent = &clk_div_mpll2.clk,
        },
        .reg_div = { .reg = S5P_CLK_DIV1, .shift = 24, .size = 5 },
@@ -267,7 +246,6 @@ static struct clksrc_clk clk_div_cam = {
 static struct clksrc_clk clk_div_hdmi = {
        .clk    = {
                .name   = "div_hdmi",
-               .id     = -1,
                .parent = &clk_mout_hpll.clk,
        },
        .reg_div = { .reg = S5P_CLK_DIV3, .shift = 28, .size = 4 },
@@ -399,367 +377,329 @@ static int s5pc100_sclk1_ctrl(struct clk *clk, int enable)
 static struct clk init_clocks_off[] = {
        {
                .name           = "cssys",
-               .id             = -1,
                .parent         = &clk_div_d0_bus.clk,
                .enable         = s5pc100_d0_0_ctrl,
                .ctrlbit        = (1 << 6),
        }, {
                .name           = "secss",
-               .id             = -1,
                .parent         = &clk_div_d0_bus.clk,
                .enable         = s5pc100_d0_0_ctrl,
                .ctrlbit        = (1 << 5),
        }, {
                .name           = "g2d",
-               .id             = -1,
                .parent         = &clk_div_d0_bus.clk,
                .enable         = s5pc100_d0_0_ctrl,
                .ctrlbit        = (1 << 4),
        }, {
                .name           = "mdma",
-               .id             = -1,
                .parent         = &clk_div_d0_bus.clk,
                .enable         = s5pc100_d0_0_ctrl,
                .ctrlbit        = (1 << 3),
        }, {
                .name           = "cfcon",
-               .id             = -1,
                .parent         = &clk_div_d0_bus.clk,
                .enable         = s5pc100_d0_0_ctrl,
                .ctrlbit        = (1 << 2),
        }, {
                .name           = "nfcon",
-               .id             = -1,
                .parent         = &clk_div_d0_bus.clk,
                .enable         = s5pc100_d0_1_ctrl,
                .ctrlbit        = (1 << 3),
        }, {
                .name           = "onenandc",
-               .id             = -1,
                .parent         = &clk_div_d0_bus.clk,
                .enable         = s5pc100_d0_1_ctrl,
                .ctrlbit        = (1 << 2),
        }, {
                .name           = "sdm",
-               .id             = -1,
                .parent         = &clk_div_d0_bus.clk,
                .enable         = s5pc100_d0_2_ctrl,
                .ctrlbit        = (1 << 2),
        }, {
                .name           = "seckey",
-               .id             = -1,
                .parent         = &clk_div_d0_bus.clk,
                .enable         = s5pc100_d0_2_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "hsmmc",
-               .id             = 2,
+               .devname        = "s3c-sdhci.2",
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_0_ctrl,
                .ctrlbit        = (1 << 7),
        }, {
                .name           = "hsmmc",
-               .id             = 1,
+               .devname        = "s3c-sdhci.1",
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_0_ctrl,
                .ctrlbit        = (1 << 6),
        }, {
                .name           = "hsmmc",
-               .id             = 0,
+               .devname        = "s3c-sdhci.0",
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_0_ctrl,
                .ctrlbit        = (1 << 5),
        }, {
                .name           = "modemif",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_0_ctrl,
                .ctrlbit        = (1 << 4),
        }, {
                .name           = "otg",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_0_ctrl,
                .ctrlbit        = (1 << 3),
        }, {
                .name           = "usbhost",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_0_ctrl,
                .ctrlbit        = (1 << 2),
        }, {
                .name           = "pdma",
-               .id             = 1,
+               .devname        = "s3c-pl330.1",
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_0_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "pdma",
-               .id             = 0,
+               .devname        = "s3c-pl330.0",
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_0_ctrl,
                .ctrlbit        = (1 << 0),
        }, {
                .name           = "lcd",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_1_ctrl,
                .ctrlbit        = (1 << 0),
        }, {
                .name           = "rotator",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_1_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "fimc",
-               .id             = 0,
+               .devname        = "s5p-fimc.0",
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_1_ctrl,
                .ctrlbit        = (1 << 2),
        }, {
                .name           = "fimc",
-               .id             = 1,
+               .devname        = "s5p-fimc.1",
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_1_ctrl,
                .ctrlbit        = (1 << 3),
        }, {
                .name           = "fimc",
-               .id             = 2,
-               .parent         = &clk_div_d1_bus.clk,
+               .devname        = "s5p-fimc.2",
                .enable         = s5pc100_d1_1_ctrl,
                .ctrlbit        = (1 << 4),
        }, {
                .name           = "jpeg",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_1_ctrl,
                .ctrlbit        = (1 << 5),
        }, {
                .name           = "mipi-dsim",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_1_ctrl,
                .ctrlbit        = (1 << 6),
        }, {
                .name           = "mipi-csis",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_1_ctrl,
                .ctrlbit        = (1 << 7),
        }, {
                .name           = "g3d",
-               .id             = 0,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_0_ctrl,
                .ctrlbit        = (1 << 8),
        }, {
                .name           = "tv",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_2_ctrl,
                .ctrlbit        = (1 << 0),
        }, {
                .name           = "vp",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_2_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "mixer",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_2_ctrl,
                .ctrlbit        = (1 << 2),
        }, {
                .name           = "hdmi",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_2_ctrl,
                .ctrlbit        = (1 << 3),
        }, {
                .name           = "mfc",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_2_ctrl,
                .ctrlbit        = (1 << 4),
        }, {
                .name           = "apc",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_3_ctrl,
                .ctrlbit        = (1 << 2),
        }, {
                .name           = "iec",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_3_ctrl,
                .ctrlbit        = (1 << 3),
        }, {
                .name           = "systimer",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_3_ctrl,
                .ctrlbit        = (1 << 7),
        }, {
                .name           = "watchdog",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_3_ctrl,
                .ctrlbit        = (1 << 8),
        }, {
                .name           = "rtc",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_3_ctrl,
                .ctrlbit        = (1 << 9),
        }, {
                .name           = "i2c",
-               .id             = 0,
+               .devname        = "s3c2440-i2c.0",
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_4_ctrl,
                .ctrlbit        = (1 << 4),
        }, {
                .name           = "i2c",
-               .id             = 1,
+               .devname        = "s3c2440-i2c.1",
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_4_ctrl,
                .ctrlbit        = (1 << 5),
        }, {
                .name           = "spi",
-               .id             = 0,
+               .devname        = "s3c64xx-spi.0",
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_4_ctrl,
                .ctrlbit        = (1 << 6),
        }, {
                .name           = "spi",
-               .id             = 1,
+               .devname        = "s3c64xx-spi.1",
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_4_ctrl,
                .ctrlbit        = (1 << 7),
        }, {
                .name           = "spi",
-               .id             = 2,
+               .devname        = "s3c64xx-spi.2",
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_4_ctrl,
                .ctrlbit        = (1 << 8),
        }, {
                .name           = "irda",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_4_ctrl,
                .ctrlbit        = (1 << 9),
        }, {
                .name           = "ccan",
-               .id             = 0,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_4_ctrl,
                .ctrlbit        = (1 << 10),
        }, {
                .name           = "ccan",
-               .id             = 1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_4_ctrl,
                .ctrlbit        = (1 << 11),
        }, {
                .name           = "hsitx",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_4_ctrl,
                .ctrlbit        = (1 << 12),
        }, {
                .name           = "hsirx",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_4_ctrl,
                .ctrlbit        = (1 << 13),
        }, {
                .name           = "iis",
-               .id             = 0,
+               .devname        = "samsung-i2s.0",
                .parent         = &clk_div_pclkd1.clk,
                .enable         = s5pc100_d1_5_ctrl,
                .ctrlbit        = (1 << 0),
        }, {
                .name           = "iis",
-               .id             = 1,
+               .devname        = "samsung-i2s.1",
                .parent         = &clk_div_pclkd1.clk,
                .enable         = s5pc100_d1_5_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "iis",
-               .id             = 2,
+               .devname        = "samsung-i2s.2",
                .parent         = &clk_div_pclkd1.clk,
                .enable         = s5pc100_d1_5_ctrl,
                .ctrlbit        = (1 << 2),
        }, {
                .name           = "ac97",
-               .id             = -1,
                .parent         = &clk_div_pclkd1.clk,
                .enable         = s5pc100_d1_5_ctrl,
                .ctrlbit        = (1 << 3),
        }, {
                .name           = "pcm",
-               .id             = 0,
+               .devname        = "samsung-pcm.0",
                .parent         = &clk_div_pclkd1.clk,
                .enable         = s5pc100_d1_5_ctrl,
                .ctrlbit        = (1 << 4),
        }, {
                .name           = "pcm",
-               .id             = 1,
+               .devname        = "samsung-pcm.1",
                .parent         = &clk_div_pclkd1.clk,
                .enable         = s5pc100_d1_5_ctrl,
                .ctrlbit        = (1 << 5),
        }, {
                .name           = "spdif",
-               .id             = -1,
                .parent         = &clk_div_pclkd1.clk,
                .enable         = s5pc100_d1_5_ctrl,
                .ctrlbit        = (1 << 6),
        }, {
                .name           = "adc",
-               .id             = -1,
                .parent         = &clk_div_pclkd1.clk,
                .enable         = s5pc100_d1_5_ctrl,
                .ctrlbit        = (1 << 7),
        }, {
                .name           = "keypad",
-               .id             = -1,
                .parent         = &clk_div_pclkd1.clk,
                .enable         = s5pc100_d1_5_ctrl,
                .ctrlbit        = (1 << 8),
        }, {
                .name           = "spi_48m",
-               .id             = 0,
+               .devname        = "s3c64xx-spi.0",
                .parent         = &clk_mout_48m.clk,
                .enable         = s5pc100_sclk0_ctrl,
                .ctrlbit        = (1 << 7),
        }, {
                .name           = "spi_48m",
-               .id             = 1,
+               .devname        = "s3c64xx-spi.1",
                .parent         = &clk_mout_48m.clk,
                .enable         = s5pc100_sclk0_ctrl,
                .ctrlbit        = (1 << 8),
        }, {
                .name           = "spi_48m",
-               .id             = 2,
+               .devname        = "s3c64xx-spi.2",
                .parent         = &clk_mout_48m.clk,
                .enable         = s5pc100_sclk0_ctrl,
                .ctrlbit        = (1 << 9),
        }, {
                .name           = "mmc_48m",
-               .id             = 0,
+               .devname        = "s3c-sdhci.0",
                .parent         = &clk_mout_48m.clk,
                .enable         = s5pc100_sclk0_ctrl,
                .ctrlbit        = (1 << 15),
        }, {
                .name           = "mmc_48m",
-               .id             = 1,
+               .devname        = "s3c-sdhci.1",
                .parent         = &clk_mout_48m.clk,
                .enable         = s5pc100_sclk0_ctrl,
                .ctrlbit        = (1 << 16),
        }, {
                .name           = "mmc_48m",
-               .id             = 2,
+               .devname        = "s3c-sdhci.2",
                .parent         = &clk_mout_48m.clk,
                .enable         = s5pc100_sclk0_ctrl,
                .ctrlbit        = (1 << 17),
@@ -768,33 +708,27 @@ static struct clk init_clocks_off[] = {
 
 static struct clk clk_vclk54m = {
        .name           = "vclk_54m",
-       .id             = -1,
        .rate           = 54000000,
 };
 
 static struct clk clk_i2scdclk0 = {
        .name           = "i2s_cdclk0",
-       .id             = -1,
 };
 
 static struct clk clk_i2scdclk1 = {
        .name           = "i2s_cdclk1",
-       .id             = -1,
 };
 
 static struct clk clk_i2scdclk2 = {
        .name           = "i2s_cdclk2",
-       .id             = -1,
 };
 
 static struct clk clk_pcmcdclk0 = {
        .name           = "pcm_cdclk0",
-       .id             = -1,
 };
 
 static struct clk clk_pcmcdclk1 = {
        .name           = "pcm_cdclk1",
-       .id             = -1,
 };
 
 static struct clk *clk_src_group1_list[] = {
@@ -836,7 +770,7 @@ struct clksrc_sources clk_src_group3 = {
 static struct clksrc_clk clk_sclk_audio0 = {
        .clk    = {
                .name           = "sclk_audio",
-               .id             = 0,
+               .devname        = "samsung-pcm.0",
                .ctrlbit        = (1 << 8),
                .enable         = s5pc100_sclk1_ctrl,
        },
@@ -862,7 +796,7 @@ struct clksrc_sources clk_src_group4 = {
 static struct clksrc_clk clk_sclk_audio1 = {
        .clk    = {
                .name           = "sclk_audio",
-               .id             = 1,
+               .devname        = "samsung-pcm.1",
                .ctrlbit        = (1 << 9),
                .enable         = s5pc100_sclk1_ctrl,
        },
@@ -887,7 +821,7 @@ struct clksrc_sources clk_src_group5 = {
 static struct clksrc_clk clk_sclk_audio2 = {
        .clk    = {
                .name           = "sclk_audio",
-               .id             = 2,
+               .devname        = "samsung-pcm.2",
                .ctrlbit        = (1 << 10),
                .enable         = s5pc100_sclk1_ctrl,
        },
@@ -976,48 +910,12 @@ struct clksrc_sources clk_src_sclk_spdif = {
        .nr_sources     = ARRAY_SIZE(clk_sclk_spdif_list),
 };
 
-static int s5pc100_spdif_set_rate(struct clk *clk, unsigned long rate)
-{
-       struct clk *pclk;
-       int ret;
-
-       pclk = clk_get_parent(clk);
-       if (IS_ERR(pclk))
-               return -EINVAL;
-
-       ret = pclk->ops->set_rate(pclk, rate);
-       clk_put(pclk);
-
-       return ret;
-}
-
-static unsigned long s5pc100_spdif_get_rate(struct clk *clk)
-{
-       struct clk *pclk;
-       int rate;
-
-       pclk = clk_get_parent(clk);
-       if (IS_ERR(pclk))
-               return -EINVAL;
-
-       rate = pclk->ops->get_rate(clk);
-       clk_put(pclk);
-
-       return rate;
-}
-
-static struct clk_ops s5pc100_sclk_spdif_ops = {
-       .set_rate       = s5pc100_spdif_set_rate,
-       .get_rate       = s5pc100_spdif_get_rate,
-};
-
 static struct clksrc_clk clk_sclk_spdif = {
        .clk    = {
                .name           = "sclk_spdif",
-               .id             = -1,
                .ctrlbit        = (1 << 11),
                .enable         = s5pc100_sclk1_ctrl,
-               .ops            = &s5pc100_sclk_spdif_ops,
+               .ops            = &s5p_sclk_spdif_ops,
        },
        .sources = &clk_src_sclk_spdif,
        .reg_src = { .reg = S5P_CLK_SRC3, .shift = 24, .size = 2 },
@@ -1027,7 +925,7 @@ static struct clksrc_clk clksrcs[] = {
        {
                .clk    = {
                        .name           = "sclk_spi",
-                       .id             = 0,
+                       .devname        = "s3c64xx-spi.0",
                        .ctrlbit        = (1 << 4),
                        .enable         = s5pc100_sclk0_ctrl,
 
@@ -1038,7 +936,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_spi",
-                       .id             = 1,
+                       .devname        = "s3c64xx-spi.1",
                        .ctrlbit        = (1 << 5),
                        .enable         = s5pc100_sclk0_ctrl,
 
@@ -1049,7 +947,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_spi",
-                       .id             = 2,
+                       .devname        = "s3c64xx-spi.2",
                        .ctrlbit        = (1 << 6),
                        .enable         = s5pc100_sclk0_ctrl,
 
@@ -1060,7 +958,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "uclk1",
-                       .id             = -1,
                        .ctrlbit        = (1 << 3),
                        .enable         = s5pc100_sclk0_ctrl,
 
@@ -1071,7 +968,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_mixer",
-                       .id             = -1,
                        .ctrlbit        = (1 << 6),
                        .enable         = s5pc100_sclk0_ctrl,
 
@@ -1081,7 +977,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_lcd",
-                       .id             = -1,
                        .ctrlbit        = (1 << 0),
                        .enable         = s5pc100_sclk1_ctrl,
 
@@ -1092,7 +987,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_fimc",
-                       .id             = 0,
+                       .devname        = "s5p-fimc.0",
                        .ctrlbit        = (1 << 1),
                        .enable         = s5pc100_sclk1_ctrl,
 
@@ -1103,7 +998,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_fimc",
-                       .id             = 1,
+                       .devname        = "s5p-fimc.1",
                        .ctrlbit        = (1 << 2),
                        .enable         = s5pc100_sclk1_ctrl,
 
@@ -1114,7 +1009,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_fimc",
-                       .id             = 2,
+                       .devname        = "s5p-fimc.2",
                        .ctrlbit        = (1 << 3),
                        .enable         = s5pc100_sclk1_ctrl,
 
@@ -1125,7 +1020,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_mmc",
-                       .id             = 0,
+                       .devname        = "s3c-sdhci.0",
                        .ctrlbit        = (1 << 12),
                        .enable         = s5pc100_sclk1_ctrl,
 
@@ -1136,7 +1031,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_mmc",
-                       .id             = 1,
+                       .devname        = "s3c-sdhci.1",
                        .ctrlbit        = (1 << 13),
                        .enable         = s5pc100_sclk1_ctrl,
 
@@ -1147,7 +1042,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_mmc",
-                       .id             = 2,
+                       .devname        = "s3c-sdhci.2",
                        .ctrlbit        = (1 << 14),
                        .enable         = s5pc100_sclk1_ctrl,
 
@@ -1158,7 +1053,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_irda",
-                       .id             = 2,
                        .ctrlbit        = (1 << 10),
                        .enable         = s5pc100_sclk0_ctrl,
 
@@ -1169,7 +1063,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_irda",
-                       .id             = -1,
                        .ctrlbit        = (1 << 10),
                        .enable         = s5pc100_sclk0_ctrl,
 
@@ -1180,7 +1073,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_pwi",
-                       .id             = -1,
                        .ctrlbit        = (1 << 1),
                        .enable         = s5pc100_sclk0_ctrl,
 
@@ -1191,7 +1083,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_uhost",
-                       .id             = -1,
                        .ctrlbit        = (1 << 11),
                        .enable         = s5pc100_sclk0_ctrl,
 
@@ -1291,79 +1182,70 @@ void __init_or_cpufreq s5pc100_setup_clocks(void)
 static struct clk init_clocks[] = {
        {
                .name           = "tzic",
-               .id             = -1,
                .parent         = &clk_div_d0_bus.clk,
                .enable         = s5pc100_d0_0_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "intc",
-               .id             = -1,
                .parent         = &clk_div_d0_bus.clk,
                .enable         = s5pc100_d0_0_ctrl,
                .ctrlbit        = (1 << 0),
        }, {
                .name           = "ebi",
-               .id             = -1,
                .parent         = &clk_div_d0_bus.clk,
                .enable         = s5pc100_d0_1_ctrl,
                .ctrlbit        = (1 << 5),
        }, {
                .name           = "intmem",
-               .id             = -1,
                .parent         = &clk_div_d0_bus.clk,
                .enable         = s5pc100_d0_1_ctrl,
                .ctrlbit        = (1 << 4),
        }, {
                .name           = "sromc",
-               .id             = -1,
                .parent         = &clk_div_d0_bus.clk,
                .enable         = s5pc100_d0_1_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "dmc",
-               .id             = -1,
                .parent         = &clk_div_d0_bus.clk,
                .enable         = s5pc100_d0_1_ctrl,
                .ctrlbit        = (1 << 0),
        }, {
                .name           = "chipid",
-               .id             = -1,
                .parent         = &clk_div_d0_bus.clk,
                .enable         = s5pc100_d0_1_ctrl,
                .ctrlbit        = (1 << 0),
        }, {
                .name           = "gpio",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_3_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "uart",
-               .id             = 0,
+               .devname        = "s3c6400-uart.0",
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_4_ctrl,
                .ctrlbit        = (1 << 0),
        }, {
                .name           = "uart",
-               .id             = 1,
+               .devname        = "s3c6400-uart.1",
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_4_ctrl,
                .ctrlbit        = (1 << 1),
        }, {
                .name           = "uart",
-               .id             = 2,
+               .devname        = "s3c6400-uart.2",
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_4_ctrl,
                .ctrlbit        = (1 << 2),
        }, {
                .name           = "uart",
-               .id             = 3,
+               .devname        = "s3c6400-uart.3",
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_4_ctrl,
                .ctrlbit        = (1 << 3),
        }, {
                .name           = "timers",
-               .id             = -1,
                .parent         = &clk_div_d1_bus.clk,
                .enable         = s5pc100_d1_3_ctrl,
                .ctrlbit        = (1 << 6),
diff --git a/arch/arm/mach-s5pc100/include/mach/clkdev.h b/arch/arm/mach-s5pc100/include/mach/clkdev.h
new file mode 100644 (file)
index 0000000..7dffa83
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef __MACH_CLKDEV_H__
+#define __MACH_CLKDEV_H__
+
+#define __clk_get(clk) ({ 1; })
+#define __clk_put(clk) do {} while (0)
+
+#endif
diff --git a/arch/arm/mach-s5pc100/include/mach/regs-fb.h b/arch/arm/mach-s5pc100/include/mach/regs-fb.h
deleted file mode 100644 (file)
index 07aa4d6..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/* arch/arm/mach-s5pc100/include/mach/regs-fb.h
- *
- * Copyright 2009 Samsung Electronics Co.
- *   Pawel Osciak <p.osciak@samsung.com>
- *
- * Framebuffer register definitions for Samsung S5PC100.
- *
- * 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_REGS_FB_H
-#define __ASM_ARCH_REGS_FB_H __FILE__
-
-#include <plat/regs-fb-v4.h>
-
-/* VP1 interface timing control */
-#define VP1CON0                                                (0x118)
-#define VP1_RATECON_EN                                 (1 << 31)
-#define VP1_CLKRATE_MASK                               (0xff)
-
-#define VP1CON1                                                (0x11c)
-#define VP1_VTREGCON_EN                                        (1 << 31)
-#define VP1_VBPD_MASK                                  (0xfff)
-#define VP1_VBPD_SHIFT                                 (16)
-
-
-#define WPALCON_H                                      (0x19c)
-#define WPALCON_L                                      (0x1a0)
-
-/* Palette control for WPAL0 and WPAL1 is the same as in S3C64xx, but
- * different for WPAL2-4
- */
-/* In WPALCON_L (aka WPALCON) */
-#define WPALCON_W1PAL_32BPP_A888                       (0x7 << 3)
-#define WPALCON_W0PAL_32BPP_A888                       (0x7 << 0)
-
-/* To set W2PAL-W4PAL consist of one bit from WPALCON_L and two from WPALCON_H,
- * e.g. W2PAL[2..0] is made of (WPALCON_H[10..9], WPALCON_L[6]).
- */
-#define WPALCON_L_WxPAL_L_MASK                         (0x1)
-#define WPALCON_L_W2PAL_L_SHIFT                                (6)
-#define WPALCON_L_W3PAL_L_SHIFT                                (7)
-#define WPALCON_L_W4PAL_L_SHIFT                                (8)
-
-#define WPALCON_L_WxPAL_H_MASK                         (0x3)
-#define WPALCON_H_W2PAL_H_SHIFT                                (9)
-#define WPALCON_H_W3PAL_H_SHIFT                                (13)
-#define WPALCON_H_W4PAL_H_SHIFT                                (17)
-
-/* Per-window alpha value registers */
-/* For window 0 8-bit alpha values are in VIDW0ALPHAx,
- * for windows 1-4 alpha values consist of two parts, the 4 low bits are
- * taken from VIDWxALPHAx and 4 high bits are from VIDOSDxC,
- * e.g. WIN1_ALPHA0_B[7..0] = (VIDOSD1C[3..0], VIDW1ALPHA0[3..0])
- */
-#define VIDWxALPHA0(_win)                              (0x200 + (_win * 8))
-#define VIDWxALPHA1(_win)                              (0x204 + (_win * 8))
-
-/* Only for window 0 in VIDW0ALPHAx. */
-#define VIDW0ALPHAx_R(_x)                              ((_x) << 16)
-#define VIDW0ALPHAx_R_MASK                             (0xff << 16)
-#define VIDW0ALPHAx_R_SHIFT                            (16)
-#define VIDW0ALPHAx_G(_x)                              ((_x) << 8)
-#define VIDW0ALPHAx_G_MASK                             (0xff << 8)
-#define VIDW0ALPHAx_G_SHIFT                            (8)
-#define VIDW0ALPHAx_B(_x)                              ((_x) << 0)
-#define VIDW0ALPHAx_B_MASK                             (0xff << 0)
-#define VIDW0ALPHAx_B_SHIFT                            (0)
-
-/* Low 4 bits of alpha0-1 for windows 1-4 */
-#define VIDW14ALPHAx_R_L(_x)                           ((_x) << 16)
-#define VIDW14ALPHAx_R_L_MASK                          (0xf << 16)
-#define VIDW14ALPHAx_R_L_SHIFT                         (16)
-#define VIDW14ALPHAx_G_L(_x)                           ((_x) << 8)
-#define VIDW14ALPHAx_G_L_MASK                          (0xf << 8)
-#define VIDW14ALPHAx_G_L_SHIFT                         (8)
-#define VIDW14ALPHAx_B_L(_x)                           ((_x) << 0)
-#define VIDW14ALPHAx_B_L_MASK                          (0xf << 0)
-#define VIDW14ALPHAx_B_L_SHIFT                         (0)
-
-
-/* Per-window blending equation control registers */
-#define BLENDEQx(_win)                                 (0x244 + ((_win) * 4))
-#define BLENDEQ1                                       (0x244)
-#define BLENDEQ2                                       (0x248)
-#define BLENDEQ3                                       (0x24c)
-#define BLENDEQ4                                       (0x250)
-
-#define BLENDEQx_Q_FUNC(_x)                            ((_x) << 18)
-#define BLENDEQx_Q_FUNC_MASK                           (0xf << 18)
-#define BLENDEQx_P_FUNC(_x)                            ((_x) << 12)
-#define BLENDEQx_P_FUNC_MASK                           (0xf << 12)
-#define BLENDEQx_B_FUNC(_x)                            ((_x) << 6)
-#define BLENDEQx_B_FUNC_MASK                           (0xf << 6)
-#define BLENDEQx_A_FUNC(_x)                            ((_x) << 0)
-#define BLENDEQx_A_FUNC_MASK                           (0xf << 0)
-
-#define BLENDCON                                       (0x260)
-#define BLENDCON_8BIT_ALPHA                            (1 << 0)
-
-
-#endif /* __ASM_ARCH_REGS_FB_H */
-
index 0525cb3ef406cfd40b104fe32a5be2bc54930df3..227d8908aab6368e344f5eb60cc6b513d4237d3c 100644 (file)
@@ -29,7 +29,6 @@
 #include <asm/mach/map.h>
 
 #include <mach/map.h>
-#include <mach/regs-fb.h>
 #include <mach/regs-gpio.h>
 
 #include <video/platform_lcd.h>
@@ -51,6 +50,8 @@
 #include <plat/keypad.h>
 #include <plat/ts.h>
 #include <plat/audio.h>
+#include <plat/backlight.h>
+#include <plat/regs-fb-v4.h>
 
 /* Following are default values for UCON, ULCON and UFCON UART registers */
 #define SMDKC100_UCON_DEFAULT  (S3C2410_UCON_TXILEVEL |        \
@@ -179,45 +180,6 @@ static struct samsung_keypad_platdata smdkc100_keypad_data __initdata = {
        .cols           = 8,
 };
 
-static int smdkc100_backlight_init(struct device *dev)
-{
-       int ret;
-
-       ret = gpio_request(S5PC100_GPD(0), "Backlight");
-       if (ret) {
-               printk(KERN_ERR "failed to request GPF for PWM-OUT0\n");
-               return ret;
-       }
-
-       /* Configure GPIO pin with S5PC100_GPD_TOUT_0 */
-       s3c_gpio_cfgpin(S5PC100_GPD(0), S3C_GPIO_SFN(2));
-
-       return 0;
-}
-
-static void smdkc100_backlight_exit(struct device *dev)
-{
-       s3c_gpio_cfgpin(S5PC100_GPD(0), S3C_GPIO_OUTPUT);
-       gpio_free(S5PC100_GPD(0));
-}
-
-static struct platform_pwm_backlight_data smdkc100_backlight_data = {
-       .pwm_id         = 0,
-       .max_brightness = 255,
-       .dft_brightness = 255,
-       .pwm_period_ns  = 78770,
-       .init           = smdkc100_backlight_init,
-       .exit           = smdkc100_backlight_exit,
-};
-
-static struct platform_device smdkc100_backlight_device = {
-       .name           = "pwm-backlight",
-       .dev            = {
-               .parent         = &s3c_device_timer[0].dev,
-               .platform_data  = &smdkc100_backlight_data,
-       },
-};
-
 static struct platform_device *smdkc100_devices[] __initdata = {
        &s3c_device_adc,
        &s3c_device_cfcon,
@@ -239,8 +201,6 @@ static struct platform_device *smdkc100_devices[] __initdata = {
        &s5p_device_fimc1,
        &s5p_device_fimc2,
        &s5pc100_device_spdif,
-       &s3c_device_timer[0],
-       &smdkc100_backlight_device,
 };
 
 static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
@@ -249,6 +209,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
        .oversampling_shift     = 2,
 };
 
+/* LCD Backlight data */
+static struct samsung_bl_gpio_info smdkc100_bl_gpio_info = {
+       .no = S5PC100_GPD(0),
+       .func = S3C_GPIO_SFN(2),
+};
+
+static struct platform_pwm_backlight_data smdkc100_bl_data = {
+       .pwm_id = 0,
+};
+
 static void __init smdkc100_map_io(void)
 {
        s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -276,6 +246,9 @@ static void __init smdkc100_machine_init(void)
        /* LCD init */
        gpio_request(S5PC100_GPH0(6), "GPH0");
        smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0);
+
+       samsung_bl_set(&smdkc100_bl_gpio_info, &smdkc100_bl_data);
+
        platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices));
 }
 
index d31c0f3fe22273d978ef6023eee725011f1986eb..8978e4cf9ed5d9b0a8c333b2f34143aa7dde16d7 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/fb.h>
 #include <linux/gpio.h>
 
-#include <mach/regs-fb.h>
 #include <mach/map.h>
 #include <plat/fb.h>
 #include <plat/gpio-cfg.h>
index 37b5a97594a50670ab7fda31f79a2c58d3887bfa..79bb3a0314efe1ba159b20bda4f93d0adaed1fe0 100644 (file)
@@ -134,6 +134,7 @@ config MACH_SMDKV210
        select S3C_DEV_RTC
        select S3C_DEV_WDT
        select SAMSUNG_DEV_ADC
+       select SAMSUNG_DEV_BACKLIGHT
        select SAMSUNG_DEV_IDE
        select SAMSUNG_DEV_KEYPAD
        select SAMSUNG_DEV_PWM
index 2d599499cefe7f59e15006dd96b71e944e11e742..ae72f87eab15795a7e95f17184c46f57d04f64a4 100644 (file)
@@ -36,7 +36,6 @@ static unsigned long xtal;
 static struct clksrc_clk clk_mout_apll = {
        .clk    = {
                .name           = "mout_apll",
-               .id             = -1,
        },
        .sources        = &clk_src_apll,
        .reg_src        = { .reg = S5P_CLK_SRC0, .shift = 0, .size = 1 },
@@ -45,7 +44,6 @@ static struct clksrc_clk clk_mout_apll = {
 static struct clksrc_clk clk_mout_epll = {
        .clk    = {
                .name           = "mout_epll",
-               .id             = -1,
        },
        .sources        = &clk_src_epll,
        .reg_src        = { .reg = S5P_CLK_SRC0, .shift = 8, .size = 1 },
@@ -54,7 +52,6 @@ static struct clksrc_clk clk_mout_epll = {
 static struct clksrc_clk clk_mout_mpll = {
        .clk = {
                .name           = "mout_mpll",
-               .id             = -1,
        },
        .sources        = &clk_src_mpll,
        .reg_src        = { .reg = S5P_CLK_SRC0, .shift = 4, .size = 1 },
@@ -73,7 +70,6 @@ static struct clksrc_sources clkset_armclk = {
 static struct clksrc_clk clk_armclk = {
        .clk    = {
                .name           = "armclk",
-               .id             = -1,
        },
        .sources        = &clkset_armclk,
        .reg_src        = { .reg = S5P_CLK_SRC0, .shift = 16, .size = 1 },
@@ -83,7 +79,6 @@ static struct clksrc_clk clk_armclk = {
 static struct clksrc_clk clk_hclk_msys = {
        .clk    = {
                .name           = "hclk_msys",
-               .id             = -1,
                .parent         = &clk_armclk.clk,
        },
        .reg_div        = { .reg = S5P_CLK_DIV0, .shift = 8, .size = 3 },
@@ -92,7 +87,6 @@ static struct clksrc_clk clk_hclk_msys = {
 static struct clksrc_clk clk_pclk_msys = {
        .clk    = {
                .name           = "pclk_msys",
-               .id             = -1,
                .parent         = &clk_hclk_msys.clk,
        },
        .reg_div        = { .reg = S5P_CLK_DIV0, .shift = 12, .size = 3 },
@@ -101,7 +95,6 @@ static struct clksrc_clk clk_pclk_msys = {
 static struct clksrc_clk clk_sclk_a2m = {
        .clk    = {
                .name           = "sclk_a2m",
-               .id             = -1,
                .parent         = &clk_mout_apll.clk,
        },
        .reg_div        = { .reg = S5P_CLK_DIV0, .shift = 4, .size = 3 },
@@ -120,7 +113,6 @@ static struct clksrc_sources clkset_hclk_sys = {
 static struct clksrc_clk clk_hclk_dsys = {
        .clk    = {
                .name   = "hclk_dsys",
-               .id     = -1,
        },
        .sources        = &clkset_hclk_sys,
        .reg_src        = { .reg = S5P_CLK_SRC0, .shift = 20, .size = 1 },
@@ -130,7 +122,6 @@ static struct clksrc_clk clk_hclk_dsys = {
 static struct clksrc_clk clk_pclk_dsys = {
        .clk    = {
                .name   = "pclk_dsys",
-               .id     = -1,
                .parent = &clk_hclk_dsys.clk,
        },
        .reg_div = { .reg = S5P_CLK_DIV0, .shift = 20, .size = 3 },
@@ -139,7 +130,6 @@ static struct clksrc_clk clk_pclk_dsys = {
 static struct clksrc_clk clk_hclk_psys = {
        .clk    = {
                .name   = "hclk_psys",
-               .id     = -1,
        },
        .sources        = &clkset_hclk_sys,
        .reg_src        = { .reg = S5P_CLK_SRC0, .shift = 24, .size = 1 },
@@ -149,7 +139,6 @@ static struct clksrc_clk clk_hclk_psys = {
 static struct clksrc_clk clk_pclk_psys = {
        .clk    = {
                .name   = "pclk_psys",
-               .id     = -1,
                .parent = &clk_hclk_psys.clk,
        },
        .reg_div        = { .reg = S5P_CLK_DIV0, .shift = 28, .size = 3 },
@@ -187,38 +176,31 @@ static int s5pv210_clk_mask1_ctrl(struct clk *clk, int enable)
 
 static struct clk clk_sclk_hdmi27m = {
        .name           = "sclk_hdmi27m",
-       .id             = -1,
        .rate           = 27000000,
 };
 
 static struct clk clk_sclk_hdmiphy = {
        .name           = "sclk_hdmiphy",
-       .id             = -1,
 };
 
 static struct clk clk_sclk_usbphy0 = {
        .name           = "sclk_usbphy0",
-       .id             = -1,
 };
 
 static struct clk clk_sclk_usbphy1 = {
        .name           = "sclk_usbphy1",
-       .id             = -1,
 };
 
 static struct clk clk_pcmcdclk0 = {
        .name           = "pcmcdclk",
-       .id             = -1,
 };
 
 static struct clk clk_pcmcdclk1 = {
        .name           = "pcmcdclk",
-       .id             = -1,
 };
 
 static struct clk clk_pcmcdclk2 = {
        .name           = "pcmcdclk",
-       .id             = -1,
 };
 
 static struct clk *clkset_vpllsrc_list[] = {
@@ -234,7 +216,6 @@ static struct clksrc_sources clkset_vpllsrc = {
 static struct clksrc_clk clk_vpllsrc = {
        .clk    = {
                .name           = "vpll_src",
-               .id             = -1,
                .enable         = s5pv210_clk_mask0_ctrl,
                .ctrlbit        = (1 << 7),
        },
@@ -255,7 +236,6 @@ static struct clksrc_sources clkset_sclk_vpll = {
 static struct clksrc_clk clk_sclk_vpll = {
        .clk    = {
                .name           = "sclk_vpll",
-               .id             = -1,
        },
        .sources        = &clkset_sclk_vpll,
        .reg_src        = { .reg = S5P_CLK_SRC0, .shift = 12, .size = 1 },
@@ -276,7 +256,6 @@ static struct clksrc_sources clkset_moutdmc0src = {
 static struct clksrc_clk clk_mout_dmc0 = {
        .clk    = {
                .name           = "mout_dmc0",
-               .id             = -1,
        },
        .sources        = &clkset_moutdmc0src,
        .reg_src        = { .reg = S5P_CLK_SRC6, .shift = 24, .size = 2 },
@@ -285,7 +264,6 @@ static struct clksrc_clk clk_mout_dmc0 = {
 static struct clksrc_clk clk_sclk_dmc0 = {
        .clk    = {
                .name           = "sclk_dmc0",
-               .id             = -1,
                .parent         = &clk_mout_dmc0.clk,
        },
        .reg_div        = { .reg = S5P_CLK_DIV6, .shift = 28, .size = 4 },
@@ -312,181 +290,169 @@ static struct clk_ops clk_fout_apll_ops = {
 static struct clk init_clocks_off[] = {
        {
                .name           = "pdma",
-               .id             = 0,
+               .devname        = "s3c-pl330.0",
                .parent         = &clk_hclk_psys.clk,
                .enable         = s5pv210_clk_ip0_ctrl,
                .ctrlbit        = (1 << 3),
        }, {
                .name           = "pdma",
-               .id             = 1,
+               .devname        = "s3c-pl330.1",
                .parent         = &clk_hclk_psys.clk,
                .enable         = s5pv210_clk_ip0_ctrl,
                .ctrlbit        = (1 << 4),
        }, {
                .name           = "rot",
-               .id             = -1,
                .parent         = &clk_hclk_dsys.clk,
                .enable         = s5pv210_clk_ip0_ctrl,
                .ctrlbit        = (1<<29),
        }, {
                .name           = "fimc",
-               .id             = 0,
+               .devname        = "s5pv210-fimc.0",
                .parent         = &clk_hclk_dsys.clk,
                .enable         = s5pv210_clk_ip0_ctrl,
                .ctrlbit        = (1 << 24),
        }, {
                .name           = "fimc",
-               .id             = 1,
+               .devname        = "s5pv210-fimc.1",
                .parent         = &clk_hclk_dsys.clk,
                .enable         = s5pv210_clk_ip0_ctrl,
                .ctrlbit        = (1 << 25),
        }, {
                .name           = "fimc",
-               .id             = 2,
+               .devname        = "s5pv210-fimc.2",
                .parent         = &clk_hclk_dsys.clk,
                .enable         = s5pv210_clk_ip0_ctrl,
                .ctrlbit        = (1 << 26),
        }, {
                .name           = "otg",
-               .id             = -1,
                .parent         = &clk_hclk_psys.clk,
                .enable         = s5pv210_clk_ip1_ctrl,
                .ctrlbit        = (1<<16),
        }, {
                .name           = "usb-host",
-               .id             = -1,
                .parent         = &clk_hclk_psys.clk,
                .enable         = s5pv210_clk_ip1_ctrl,
                .ctrlbit        = (1<<17),
        }, {
                .name           = "lcd",
-               .id             = -1,
                .parent         = &clk_hclk_dsys.clk,
                .enable         = s5pv210_clk_ip1_ctrl,
                .ctrlbit        = (1<<0),
        }, {
                .name           = "cfcon",
-               .id             = 0,
                .parent         = &clk_hclk_psys.clk,
                .enable         = s5pv210_clk_ip1_ctrl,
                .ctrlbit        = (1<<25),
        }, {
                .name           = "hsmmc",
-               .id             = 0,
+               .devname        = "s3c-sdhci.0",
                .parent         = &clk_hclk_psys.clk,
                .enable         = s5pv210_clk_ip2_ctrl,
                .ctrlbit        = (1<<16),
        }, {
                .name           = "hsmmc",
-               .id             = 1,
+               .devname        = "s3c-sdhci.1",
                .parent         = &clk_hclk_psys.clk,
                .enable         = s5pv210_clk_ip2_ctrl,
                .ctrlbit        = (1<<17),
        }, {
                .name           = "hsmmc",
-               .id             = 2,
+               .devname        = "s3c-sdhci.2",
                .parent         = &clk_hclk_psys.clk,
                .enable         = s5pv210_clk_ip2_ctrl,
                .ctrlbit        = (1<<18),
        }, {
                .name           = "hsmmc",
-               .id             = 3,
+               .devname        = "s3c-sdhci.3",
                .parent         = &clk_hclk_psys.clk,
                .enable         = s5pv210_clk_ip2_ctrl,
                .ctrlbit        = (1<<19),
        }, {
                .name           = "systimer",
-               .id             = -1,
                .parent         = &clk_pclk_psys.clk,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1<<16),
        }, {
                .name           = "watchdog",
-               .id             = -1,
                .parent         = &clk_pclk_psys.clk,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1<<22),
        }, {
                .name           = "rtc",
-               .id             = -1,
                .parent         = &clk_pclk_psys.clk,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1<<15),
        }, {
                .name           = "i2c",
-               .id             = 0,
+               .devname        = "s3c2440-i2c.0",
                .parent         = &clk_pclk_psys.clk,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1<<7),
        }, {
                .name           = "i2c",
-               .id             = 1,
+               .devname        = "s3c2440-i2c.1",
                .parent         = &clk_pclk_psys.clk,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1 << 10),
        }, {
                .name           = "i2c",
-               .id             = 2,
+               .devname        = "s3c2440-i2c.2",
                .parent         = &clk_pclk_psys.clk,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1<<9),
        }, {
                .name           = "spi",
-               .id             = 0,
+               .devname        = "s3c64xx-spi.0",
                .parent         = &clk_pclk_psys.clk,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1<<12),
        }, {
                .name           = "spi",
-               .id             = 1,
+               .devname        = "s3c64xx-spi.1",
                .parent         = &clk_pclk_psys.clk,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1<<13),
        }, {
                .name           = "spi",
-               .id             = 2,
+               .devname        = "s3c64xx-spi.2",
                .parent         = &clk_pclk_psys.clk,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1<<14),
        }, {
                .name           = "timers",
-               .id             = -1,
                .parent         = &clk_pclk_psys.clk,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1<<23),
        }, {
                .name           = "adc",
-               .id             = -1,
                .parent         = &clk_pclk_psys.clk,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1<<24),
        }, {
                .name           = "keypad",
-               .id             = -1,
                .parent         = &clk_pclk_psys.clk,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1<<21),
        }, {
                .name           = "iis",
-               .id             = 0,
+               .devname        = "samsung-i2s.0",
                .parent         = &clk_p,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1<<4),
        }, {
                .name           = "iis",
-               .id             = 1,
+               .devname        = "samsung-i2s.1",
                .parent         = &clk_p,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1 << 5),
        }, {
                .name           = "iis",
-               .id             = 2,
+               .devname        = "samsung-i2s.2",
                .parent         = &clk_p,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1 << 6),
        }, {
                .name           = "spdif",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1 << 0),
@@ -496,38 +462,36 @@ static struct clk init_clocks_off[] = {
 static struct clk init_clocks[] = {
        {
                .name           = "hclk_imem",
-               .id             = -1,
                .parent         = &clk_hclk_msys.clk,
                .ctrlbit        = (1 << 5),
                .enable         = s5pv210_clk_ip0_ctrl,
                .ops            = &clk_hclk_imem_ops,
        }, {
                .name           = "uart",
-               .id             = 0,
+               .devname        = "s5pv210-uart.0",
                .parent         = &clk_pclk_psys.clk,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1 << 17),
        }, {
                .name           = "uart",
-               .id             = 1,
+               .devname        = "s5pv210-uart.1",
                .parent         = &clk_pclk_psys.clk,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1 << 18),
        }, {
                .name           = "uart",
-               .id             = 2,
+               .devname        = "s5pv210-uart.2",
                .parent         = &clk_pclk_psys.clk,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1 << 19),
        }, {
                .name           = "uart",
-               .id             = 3,
+               .devname        = "s5pv210-uart.3",
                .parent         = &clk_pclk_psys.clk,
                .enable         = s5pv210_clk_ip3_ctrl,
                .ctrlbit        = (1 << 20),
        }, {
                .name           = "sromc",
-               .id             = -1,
                .parent         = &clk_hclk_psys.clk,
                .enable         = s5pv210_clk_ip1_ctrl,
                .ctrlbit        = (1 << 26),
@@ -579,7 +543,6 @@ static struct clksrc_sources clkset_sclk_dac = {
 static struct clksrc_clk clk_sclk_dac = {
        .clk            = {
                .name           = "sclk_dac",
-               .id             = -1,
                .enable         = s5pv210_clk_mask0_ctrl,
                .ctrlbit        = (1 << 2),
        },
@@ -590,7 +553,6 @@ static struct clksrc_clk clk_sclk_dac = {
 static struct clksrc_clk clk_sclk_pixel = {
        .clk            = {
                .name           = "sclk_pixel",
-               .id             = -1,
                .parent         = &clk_sclk_vpll.clk,
        },
        .reg_div        = { .reg = S5P_CLK_DIV1, .shift = 0, .size = 4},
@@ -609,7 +571,6 @@ static struct clksrc_sources clkset_sclk_hdmi = {
 static struct clksrc_clk clk_sclk_hdmi = {
        .clk            = {
                .name           = "sclk_hdmi",
-               .id             = -1,
                .enable         = s5pv210_clk_mask0_ctrl,
                .ctrlbit        = (1 << 0),
        },
@@ -647,7 +608,7 @@ static struct clksrc_sources clkset_sclk_audio0 = {
 static struct clksrc_clk clk_sclk_audio0 = {
        .clk            = {
                .name           = "sclk_audio",
-               .id             = 0,
+               .devname        = "soc-audio.0",
                .enable         = s5pv210_clk_mask0_ctrl,
                .ctrlbit        = (1 << 24),
        },
@@ -676,7 +637,7 @@ static struct clksrc_sources clkset_sclk_audio1 = {
 static struct clksrc_clk clk_sclk_audio1 = {
        .clk            = {
                .name           = "sclk_audio",
-               .id             = 1,
+               .devname        = "soc-audio.1",
                .enable         = s5pv210_clk_mask0_ctrl,
                .ctrlbit        = (1 << 25),
        },
@@ -705,7 +666,7 @@ static struct clksrc_sources clkset_sclk_audio2 = {
 static struct clksrc_clk clk_sclk_audio2 = {
        .clk            = {
                .name           = "sclk_audio",
-               .id             = 2,
+               .devname        = "soc-audio.2",
                .enable         = s5pv210_clk_mask0_ctrl,
                .ctrlbit        = (1 << 26),
        },
@@ -725,48 +686,12 @@ static struct clksrc_sources clkset_sclk_spdif = {
        .nr_sources     = ARRAY_SIZE(clkset_sclk_spdif_list),
 };
 
-static int s5pv210_spdif_set_rate(struct clk *clk, unsigned long rate)
-{
-       struct clk *pclk;
-       int ret;
-
-       pclk = clk_get_parent(clk);
-       if (IS_ERR(pclk))
-               return -EINVAL;
-
-       ret = pclk->ops->set_rate(pclk, rate);
-       clk_put(pclk);
-
-       return ret;
-}
-
-static unsigned long s5pv210_spdif_get_rate(struct clk *clk)
-{
-       struct clk *pclk;
-       int rate;
-
-       pclk = clk_get_parent(clk);
-       if (IS_ERR(pclk))
-               return -EINVAL;
-
-       rate = pclk->ops->get_rate(clk);
-       clk_put(pclk);
-
-       return rate;
-}
-
-static struct clk_ops s5pv210_sclk_spdif_ops = {
-       .set_rate       = s5pv210_spdif_set_rate,
-       .get_rate       = s5pv210_spdif_get_rate,
-};
-
 static struct clksrc_clk clk_sclk_spdif = {
        .clk            = {
                .name           = "sclk_spdif",
-               .id             = -1,
                .enable         = s5pv210_clk_mask0_ctrl,
                .ctrlbit        = (1 << 27),
-               .ops            = &s5pv210_sclk_spdif_ops,
+               .ops            = &s5p_sclk_spdif_ops,
        },
        .sources = &clkset_sclk_spdif,
        .reg_src = { .reg = S5P_CLK_SRC6, .shift = 12, .size = 2 },
@@ -793,7 +718,6 @@ static struct clksrc_clk clksrcs[] = {
        {
                .clk    = {
                        .name           = "sclk_dmc",
-                       .id             = -1,
                },
                .sources = &clkset_group1,
                .reg_src = { .reg = S5P_CLK_SRC6, .shift = 24, .size = 2 },
@@ -801,7 +725,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_onenand",
-                       .id             = -1,
                },
                .sources = &clkset_sclk_onenand,
                .reg_src = { .reg = S5P_CLK_SRC0, .shift = 28, .size = 1 },
@@ -809,7 +732,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "uclk1",
-                       .id             = 0,
+                       .devname        = "s5pv210-uart.0",
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 12),
                },
@@ -819,7 +742,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "uclk1",
-                       .id             = 1,
+                       .devname        = "s5pv210-uart.1",
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 13),
                },
@@ -829,7 +752,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "uclk1",
-                       .id             = 2,
+                       .devname        = "s5pv210-uart.2",
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 14),
                },
@@ -839,7 +762,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "uclk1",
-                       .id             = 3,
+                       .devname        = "s5pv210-uart.3",
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 15),
                },
@@ -849,7 +772,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_mixer",
-                       .id             = -1,
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 1),
                },
@@ -858,7 +780,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_fimc",
-                       .id             = 0,
+                       .devname        = "s5pv210-fimc.0",
                        .enable         = s5pv210_clk_mask1_ctrl,
                        .ctrlbit        = (1 << 2),
                },
@@ -868,7 +790,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_fimc",
-                       .id             = 1,
+                       .devname        = "s5pv210-fimc.1",
                        .enable         = s5pv210_clk_mask1_ctrl,
                        .ctrlbit        = (1 << 3),
                },
@@ -878,7 +800,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk    = {
                        .name           = "sclk_fimc",
-                       .id             = 2,
+                       .devname        = "s5pv210-fimc.2",
                        .enable         = s5pv210_clk_mask1_ctrl,
                        .ctrlbit        = (1 << 4),
                },
@@ -888,7 +810,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_cam",
-                       .id             = 0,
+                       .devname        = "s5pv210-fimc.0",
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 3),
                },
@@ -898,7 +820,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_cam",
-                       .id             = 1,
+                       .devname        = "s5pv210-fimc.1",
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 4),
                },
@@ -908,7 +830,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_fimd",
-                       .id             = -1,
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 5),
                },
@@ -918,7 +839,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_mmc",
-                       .id             = 0,
+                       .devname        = "s3c-sdhci.0",
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 8),
                },
@@ -928,7 +849,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_mmc",
-                       .id             = 1,
+                       .devname        = "s3c-sdhci.1",
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 9),
                },
@@ -938,7 +859,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_mmc",
-                       .id             = 2,
+                       .devname        = "s3c-sdhci.2",
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 10),
                },
@@ -948,7 +869,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_mmc",
-                       .id             = 3,
+                       .devname        = "s3c-sdhci.3",
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 11),
                },
@@ -958,7 +879,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_mfc",
-                       .id             = -1,
                        .enable         = s5pv210_clk_ip0_ctrl,
                        .ctrlbit        = (1 << 16),
                },
@@ -968,7 +888,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_g2d",
-                       .id             = -1,
                        .enable         = s5pv210_clk_ip0_ctrl,
                        .ctrlbit        = (1 << 12),
                },
@@ -978,7 +897,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_g3d",
-                       .id             = -1,
                        .enable         = s5pv210_clk_ip0_ctrl,
                        .ctrlbit        = (1 << 8),
                },
@@ -988,7 +906,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_csis",
-                       .id             = -1,
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 6),
                },
@@ -998,7 +915,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_spi",
-                       .id             = 0,
+                       .devname        = "s3c64xx-spi.0",
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 16),
                },
@@ -1008,7 +925,7 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_spi",
-                       .id             = 1,
+                       .devname        = "s3c64xx-spi.1",
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 17),
                },
@@ -1018,7 +935,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_pwi",
-                       .id             = -1,
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 29),
                },
@@ -1028,7 +944,6 @@ static struct clksrc_clk clksrcs[] = {
        }, {
                .clk            = {
                        .name           = "sclk_pwm",
-                       .id             = -1,
                        .enable         = s5pv210_clk_mask0_ctrl,
                        .ctrlbit        = (1 << 19),
                },
diff --git a/arch/arm/mach-s5pv210/include/mach/clkdev.h b/arch/arm/mach-s5pv210/include/mach/clkdev.h
new file mode 100644 (file)
index 0000000..7dffa83
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef __MACH_CLKDEV_H__
+#define __MACH_CLKDEV_H__
+
+#define __clk_get(clk) ({ 1; })
+#define __clk_put(clk) do {} while (0)
+
+#endif
diff --git a/arch/arm/mach-s5pv210/include/mach/regs-fb.h b/arch/arm/mach-s5pv210/include/mach/regs-fb.h
deleted file mode 100644 (file)
index 60d9929..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/* 
- * Copyright 2010 Ben Dooks <ben-linux@fluff.org>
- *
- * Dummy framebuffer to allow build for the moment.
- * 
- * 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_MACH_REGS_FB_H
-#define __ASM_ARCH_MACH_REGS_FB_H __FILE__
-
-#include <plat/regs-fb-v4.h>
-
-static inline unsigned int s3c_fb_pal_reg(unsigned int window, int reg)
-{
-       return 0x2400 + (window * 256 *4 ) + reg;
-}
-
-#endif /* __ASM_ARCH_MACH_REGS_FB_H */
index 4e1d8ff5ae59f8c5f294a5e965e3de29ae592250..509627f251118fcef7e3326729a538685858f190 100644 (file)
@@ -29,7 +29,6 @@
 
 #include <mach/map.h>
 #include <mach/regs-clock.h>
-#include <mach/regs-fb.h>
 
 #include <plat/gpio-cfg.h>
 #include <plat/regs-serial.h>
@@ -40,6 +39,7 @@
 #include <plat/fimc-core.h>
 #include <plat/sdhci.h>
 #include <plat/s5p-time.h>
+#include <plat/regs-fb-v4.h>
 
 /* Following are default values for UCON, ULCON and UFCON UART registers */
 #define AQUILA_UCON_DEFAULT    (S3C2410_UCON_TXILEVEL |        \
index 31d5aa76975310a529084e575e0116e08a7846df..e0c4d06b9db62d6f310f6f4055b4fe0edaad42d9 100644 (file)
@@ -34,7 +34,6 @@
 
 #include <mach/map.h>
 #include <mach/regs-clock.h>
-#include <mach/regs-fb.h>
 
 #include <plat/gpio-cfg.h>
 #include <plat/regs-serial.h>
@@ -47,6 +46,7 @@
 #include <plat/sdhci.h>
 #include <plat/clock.h>
 #include <plat/s5p-time.h>
+#include <plat/regs-fb-v4.h>
 
 /* Following are default values for UCON, ULCON and UFCON UART registers */
 #define GONI_UCON_DEFAULT      (S3C2410_UCON_TXILEVEL |        \
index c6a9e86c2d5ced263e25e5580a2fc53b7115a469..ef20f922249d109961461fd21a3b37475d5b1dbc 100644 (file)
@@ -29,7 +29,6 @@
 
 #include <mach/map.h>
 #include <mach/regs-clock.h>
-#include <mach/regs-fb.h>
 
 #include <plat/regs-serial.h>
 #include <plat/regs-srom.h>
@@ -45,6 +44,8 @@
 #include <plat/pm.h>
 #include <plat/fb.h>
 #include <plat/s5p-time.h>
+#include <plat/backlight.h>
+#include <plat/regs-fb-v4.h>
 
 /* Following are default values for UCON, ULCON and UFCON UART registers */
 #define SMDKV210_UCON_DEFAULT  (S3C2410_UCON_TXILEVEL |        \
@@ -210,45 +211,6 @@ static struct s3c_fb_platdata smdkv210_lcd0_pdata __initdata = {
        .setup_gpio     = s5pv210_fb_gpio_setup_24bpp,
 };
 
-static int smdkv210_backlight_init(struct device *dev)
-{
-       int ret;
-
-       ret = gpio_request(S5PV210_GPD0(3), "Backlight");
-       if (ret) {
-               printk(KERN_ERR "failed to request GPD for PWM-OUT 3\n");
-               return ret;
-       }
-
-       /* Configure GPIO pin with S5PV210_GPD_0_3_TOUT_3 */
-       s3c_gpio_cfgpin(S5PV210_GPD0(3), S3C_GPIO_SFN(2));
-
-       return 0;
-}
-
-static void smdkv210_backlight_exit(struct device *dev)
-{
-       s3c_gpio_cfgpin(S5PV210_GPD0(3), S3C_GPIO_OUTPUT);
-       gpio_free(S5PV210_GPD0(3));
-}
-
-static struct platform_pwm_backlight_data smdkv210_backlight_data = {
-       .pwm_id         = 3,
-       .max_brightness = 255,
-       .dft_brightness = 255,
-       .pwm_period_ns  = 78770,
-       .init           = smdkv210_backlight_init,
-       .exit           = smdkv210_backlight_exit,
-};
-
-static struct platform_device smdkv210_backlight_device = {
-       .name           = "pwm-backlight",
-       .dev            = {
-               .parent         = &s3c_device_timer[3].dev,
-               .platform_data  = &smdkv210_backlight_data,
-       },
-};
-
 static struct platform_device *smdkv210_devices[] __initdata = {
        &s3c_device_adc,
        &s3c_device_cfcon,
@@ -270,8 +232,6 @@ static struct platform_device *smdkv210_devices[] __initdata = {
        &samsung_device_keypad,
        &smdkv210_dm9000,
        &smdkv210_lcd_lte480wv,
-       &s3c_device_timer[3],
-       &smdkv210_backlight_device,
 };
 
 static void __init smdkv210_dm9000_init(void)
@@ -310,6 +270,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
        .oversampling_shift     = 2,
 };
 
+/* LCD Backlight data */
+static struct samsung_bl_gpio_info smdkv210_bl_gpio_info = {
+       .no = S5PV210_GPD0(3),
+       .func = S3C_GPIO_SFN(2),
+};
+
+static struct platform_pwm_backlight_data smdkv210_bl_data = {
+       .pwm_id = 3,
+};
+
 static void __init smdkv210_map_io(void)
 {
        s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -341,6 +311,8 @@ static void __init smdkv210_machine_init(void)
 
        s3c_fb_set_platdata(&smdkv210_lcd0_pdata);
 
+       samsung_bl_set(&smdkv210_bl_gpio_info, &smdkv210_bl_data);
+
        platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices));
 }
 
index e932ebfac56df3159608cf61cf32042be2ee58d9..55103c8220b37c7be8344926aefa8edaf3560694 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/fb.h>
 #include <linux/gpio.h>
 
-#include <mach/regs-fb.h>
 #include <mach/map.h>
 #include <plat/fb.h>
 #include <mach/regs-clock.h>
index b473b8efac68dce3a80d6613d55ad243215de691..837138e369bc162ca46e94327bfbe0e2fde84ea6 100644 (file)
@@ -443,7 +443,7 @@ static struct platform_device usb1_host_device = {
        .resource       = usb1_host_resources,
 };
 
-const static struct fb_videomode ap4evb_lcdc_modes[] = {
+static const struct fb_videomode ap4evb_lcdc_modes[] = {
        {
 #ifdef CONFIG_AP4EVB_QHD
                .name           = "R63302(QHD)",
index a8d7ace9f958ef2fd4c6db3e5802e2a8d8a861e5..10fbbdc8699a2c6a3442e03673de8d2ca7f086dd 100644 (file)
@@ -159,7 +159,7 @@ static void __init seaboard_i2c_init(void)
 
        i2c_register_board_info(0, &isl29018_device, 1);
 
-       i2c_register_board_info(4, &adt7461_device, 1);
+       i2c_register_board_info(3, &adt7461_device, 1);
 
        tegra_i2c_device1.dev.platform_data = &seaboard_i2c1_platform_data;
        tegra_i2c_device2.dev.platform_data = &seaboard_i2c2_platform_data;
index 13534fa08abfd4b2586b0e983d776d51bfe5289f..d9dc5d297edd4efa306f88555ac19f16a90c34b0 100644 (file)
@@ -35,7 +35,7 @@ static __initdata struct tegra_pingroup_config trimslice_pinmux[] = {
        {TEGRA_PINGROUP_CSUS,  TEGRA_MUX_VI_SENSOR_CLK, TEGRA_PUPD_PULL_DOWN,   TEGRA_TRI_TRISTATE},
        {TEGRA_PINGROUP_DAP1,  TEGRA_MUX_DAP1,          TEGRA_PUPD_NORMAL,      TEGRA_TRI_NORMAL},
        {TEGRA_PINGROUP_DAP2,  TEGRA_MUX_DAP2,          TEGRA_PUPD_NORMAL,      TEGRA_TRI_TRISTATE},
-       {TEGRA_PINGROUP_DAP3,  TEGRA_MUX_DAP3,          TEGRA_PUPD_NORMAL,      TEGRA_TRI_NORMAL},
+       {TEGRA_PINGROUP_DAP3,  TEGRA_MUX_DAP3,          TEGRA_PUPD_NORMAL,      TEGRA_TRI_TRISTATE},
        {TEGRA_PINGROUP_DAP4,  TEGRA_MUX_DAP4,          TEGRA_PUPD_NORMAL,      TEGRA_TRI_TRISTATE},
        {TEGRA_PINGROUP_DDC,   TEGRA_MUX_I2C2,          TEGRA_PUPD_PULL_UP,     TEGRA_TRI_NORMAL},
        {TEGRA_PINGROUP_DTA,   TEGRA_MUX_VI,            TEGRA_PUPD_NORMAL,      TEGRA_TRI_TRISTATE},
index 513d6abec1f511afe271d6c69abcfcd569403026..399c89f14dfb5b9d78835409611c748c7411a40b 100644 (file)
@@ -1791,7 +1791,7 @@ static void __init u300_assign_physmem(void)
                                     0 == res->start) {
                                res->start  = curr_start;
                                res->end   += curr_start;
-                               curr_start += (res->end - res->start + 1);
+                               curr_start += resource_size(res);
 
                                printk(KERN_INFO "core.c: Mapping RAM " \
                                       "%#x-%#x to device %s:%s\n",
index 9ed0f90cfe2368d33dc89f1b2a8679c69a8ddd8d..0f2e522f387dc92677e18d501ec97bdc01a1bdc6 100644 (file)
@@ -77,7 +77,7 @@ static struct regulator_consumer_supply ab8500_vtvout_consumers[] = {
 static struct regulator_consumer_supply ab8500_vintcore_consumers[] = {
        /* SoC core supply, no device */
        REGULATOR_SUPPLY("v-intcore", NULL),
-       /* USB Transciever */
+       /* USB Transceiver */
        REGULATOR_SUPPLY("vddulpivio18", "ab8500-usb.0"),
 };
 
index 09e2bd0fcdca742a41b004d3c846fa16b298a309..55d2534ec727e0d47a13235cb4eec9ab534e5657 100644 (file)
@@ -46,6 +46,8 @@
 #define AVIC_FIPNDH            0x60    /* fast int pending high */
 #define AVIC_FIPNDL            0x64    /* fast int pending low */
 
+#define AVIC_NUM_IRQS 64
+
 void __iomem *avic_base;
 
 #ifdef CONFIG_MXC_IRQ_PRIOR
@@ -54,7 +56,7 @@ static int avic_irq_set_priority(unsigned char irq, unsigned char prio)
        unsigned int temp;
        unsigned int mask = 0x0F << irq % 8 * 4;
 
-       if (irq >= MXC_INTERNAL_IRQS)
+       if (irq >= AVIC_NUM_IRQS)
                return -EINVAL;;
 
        temp = __raw_readl(avic_base + AVIC_NIPRIORITY(irq / 8));
@@ -72,14 +74,14 @@ static int avic_set_irq_fiq(unsigned int irq, unsigned int type)
 {
        unsigned int irqt;
 
-       if (irq >= MXC_INTERNAL_IRQS)
+       if (irq >= AVIC_NUM_IRQS)
                return -EINVAL;
 
-       if (irq < MXC_INTERNAL_IRQS / 2) {
+       if (irq < AVIC_NUM_IRQS / 2) {
                irqt = __raw_readl(avic_base + AVIC_INTTYPEL) & ~(1 << irq);
                __raw_writel(irqt | (!!type << irq), avic_base + AVIC_INTTYPEL);
        } else {
-               irq -= MXC_INTERNAL_IRQS / 2;
+               irq -= AVIC_NUM_IRQS / 2;
                irqt = __raw_readl(avic_base + AVIC_INTTYPEH) & ~(1 << irq);
                __raw_writel(irqt | (!!type << irq), avic_base + AVIC_INTTYPEH);
        }
@@ -138,7 +140,7 @@ void __init mxc_init_irq(void __iomem *irqbase)
        /* all IRQ no FIQ */
        __raw_writel(0, avic_base + AVIC_INTTYPEH);
        __raw_writel(0, avic_base + AVIC_INTTYPEL);
-       for (i = 0; i < MXC_INTERNAL_IRQS; i++) {
+       for (i = 0; i < AVIC_NUM_IRQS; i++) {
                irq_set_chip_and_handler(i, &mxc_avic_chip.base,
                                         handle_level_irq);
                set_irq_flags(i, IRQF_VALID);
index b130f60ca6b73e9b7b8435dcc52633bb1761078c..c64f015e031bb3c2b95eb8c8e386a7d23d163864 100644 (file)
@@ -33,22 +33,22 @@ struct imx_imx_sdma_data {
 
 #ifdef CONFIG_SOC_IMX25
 struct imx_imx_sdma_data imx25_imx_sdma_data __initconst =
-       imx_imx_sdma_data_entry_single(MX25, 1, "imx25", 0);
+       imx_imx_sdma_data_entry_single(MX25, 2, "imx25", 1);
 #endif /* ifdef CONFIG_SOC_IMX25 */
 
 #ifdef CONFIG_SOC_IMX31
 struct imx_imx_sdma_data imx31_imx_sdma_data __initdata =
-       imx_imx_sdma_data_entry_single(MX31, 1, "imx31", 0);
+       imx_imx_sdma_data_entry_single(MX31, 1, "imx31", 1);
 #endif /* ifdef CONFIG_SOC_IMX31 */
 
 #ifdef CONFIG_SOC_IMX35
 struct imx_imx_sdma_data imx35_imx_sdma_data __initdata =
-       imx_imx_sdma_data_entry_single(MX35, 2, "imx35", 0);
+       imx_imx_sdma_data_entry_single(MX35, 2, "imx35", 1);
 #endif /* ifdef CONFIG_SOC_IMX35 */
 
 #ifdef CONFIG_SOC_IMX51
 struct imx_imx_sdma_data imx51_imx_sdma_data __initconst =
-       imx_imx_sdma_data_entry_single(MX51, 2, "imx51", 0);
+       imx_imx_sdma_data_entry_single(MX51, 2, "imx51", 1);
 #endif /* ifdef CONFIG_SOC_IMX51 */
 
 static struct platform_device __init __maybe_unused *imx_add_imx_sdma(
@@ -57,7 +57,7 @@ static struct platform_device __init __maybe_unused *imx_add_imx_sdma(
        struct resource res[] = {
                {
                        .start = data->iobase,
-                       .end = data->iobase + SZ_4K - 1,
+                       .end = data->iobase + SZ_16K - 1,
                        .flags = IORESOURCE_MEM,
                }, {
                        .start = data->irq,
@@ -77,7 +77,7 @@ static struct platform_device __init __maybe_unused *imx_add_imx_dma(void)
 }
 
 #ifdef CONFIG_ARCH_MX25
-static struct sdma_script_start_addrs addr_imx25_to1 = {
+static struct sdma_script_start_addrs addr_imx25 = {
        .ap_2_ap_addr = 729,
        .uart_2_mcu_addr = 904,
        .per_2_app_addr = 1255,
@@ -165,7 +165,7 @@ static int __init imxXX_add_imx_dma(void)
 
 #if defined(CONFIG_SOC_IMX25)
        if (cpu_is_mx25()) {
-               imx25_imx_sdma_data.pdata.script_addrs = &addr_imx25_to1;
+               imx25_imx_sdma_data.pdata.script_addrs = &addr_imx25;
                ret = imx_add_imx_sdma(&imx25_imx_sdma_data);
        } else
 #endif
index 2569c8d8a2ef53e7ff4c1bd1894d8a11f15738c2..66b8593e9b692c27b7019fb26da79f344d9f049a 100644 (file)
@@ -69,7 +69,7 @@ const struct imx_imx_ssi_data imx35_imx_ssi_data[] __initconst = {
 #ifdef CONFIG_SOC_IMX51
 const struct imx_imx_ssi_data imx51_imx_ssi_data[] __initconst = {
 #define imx51_imx_ssi_data_entry(_id, _hwid)                           \
-       imx_imx_ssi_data_entry(MX51, _id, _hwid, SZ_4K)
+       imx_imx_ssi_data_entry(MX51, _id, _hwid, SZ_16K)
        imx51_imx_ssi_data_entry(0, 1),
        imx51_imx_ssi_data_entry(1, 2),
        imx51_imx_ssi_data_entry(2, 3),
index 8e8d175e5077d991dda9c46313ccc6c6a7eb5b53..91fc7cdb5dc97309b143aae6f70c72a106977208 100644 (file)
  */
 #include <mach/hardware.h>
 
-#ifdef CONFIG_ARCH_MX1
+#ifdef CONFIG_SOC_IMX1
 #define UART_PADDR     MX1_UART1_BASE_ADDR
 #endif
 
-#ifdef CONFIG_ARCH_MX25
+#ifdef CONFIG_SOC_IMX25
 #ifdef UART_PADDR
 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
 #endif
 #define UART_PADDR     MX25_UART1_BASE_ADDR
 #endif
 
-#ifdef CONFIG_ARCH_MX2
+#if defined(CONFIG_SOC_IMX21) || defined (CONFIG_SOC_IMX27)
 #ifdef UART_PADDR
 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
 #endif
 #define UART_PADDR     MX2x_UART1_BASE_ADDR
 #endif
 
-#ifdef CONFIG_ARCH_MX3
+#if defined(CONFIG_SOC_IMX31) || defined(CONFIG_SOC_IMX35)
 #ifdef UART_PADDR
 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
 #endif
 #define UART_PADDR     MX3x_UART1_BASE_ADDR
 #endif
 
-#ifdef CONFIG_ARCH_MX5
+#ifdef CONFIG_SOC_IMX51
 #ifdef UART_PADDR
 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
 #endif
index 67d3e2bed0656dfb6f94ac26e8c0cc998d5f2bdd..a8bfd565dcad2ba73f60695ac01bf97c9e90ba81 100644 (file)
 
 #include <mach/mxc.h>
 
-#ifdef CONFIG_ARCH_MX5
 #include <mach/mx50.h>
 #include <mach/mx51.h>
 #include <mach/mx53.h>
-#endif
-
-#ifdef CONFIG_ARCH_MX3
 #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
-#endif
-
-#ifdef CONFIG_ARCH_MX1
-# include <mach/mx1.h>
-#endif
-
-#ifdef CONFIG_ARCH_MX25
-# include <mach/mx25.h>
-#endif
+#include <mach/mx2x.h>
+#include <mach/mx21.h>
+#include <mach/mx27.h>
+#include <mach/mx1.h>
+#include <mach/mx25.h>
 
 #define imx_map_entry(soc, name, _type)        {                               \
        .virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR),      \
index 2e5244de7ff5a617778ebd563054a5ebd24f7469..bf64e1e594ed0ee1fa2405d84eb3b189b88e1ac6 100644 (file)
 #define MX25_PAD_GPIO_A__USBOTG_PWR    IOMUX_PAD(0x3f0, 0x1f4, 0x12, 0, 0, PAD_CTL_PKE)
 
 #define MX25_PAD_GPIO_B__GPIO_B                IOMUX_PAD(0x3f4, 0x1f8, 0x10, 0, 0, NO_PAD_CTRL)
-#define MX25_PAD_GPIO_B__CAN1_RX       IOMUX_PAD(0x3f4, 0x1f8, 0x16, 0x480, 1, PAD_CTL_PUS_22K)
+#define MX25_PAD_GPIO_B__CAN1_RX       IOMUX_PAD(0x3f4, 0x1f8, 0x16, 0x480, 1, PAD_CTL_PUS_22K_UP)
 #define MX25_PAD_GPIO_B__USBOTG_OC     IOMUX_PAD(0x3f4, 0x1f8, 0x12, 0x57c, 1, PAD_CTL_PUS_100K_UP)
 
 #define MX25_PAD_GPIO_C__GPIO_C                IOMUX_PAD(0x3f8, 0x1fc, 0x10, 0, 0, NO_PAD_CTRL)
index e95d9cb8aeb7fd02a210d96bd84dfef98540c87d..9440b9e00e89c1536ce3d2e8d7ecbb55a5bbfd99 100644 (file)
 #define _MX53_PAD_GPIO_19__ECSPI1_RDY  IOMUX_PAD(0x348, 0x20, 5, 0x0, 0, 0)
 #define _MX53_PAD_GPIO_19__FEC_TDATA_3 IOMUX_PAD(0x348, 0x20, 6, 0x0, 0, 0)
 #define _MX53_PAD_GPIO_19__SRC_INT_BOOT        IOMUX_PAD(0x348, 0x20,7, 0x0, 0, 0)
-#define _MX53_PAD_KEY_COL0__KPP_COL_0  IOMUX_PAD(0x34C, 0x24, o, 0x0, 0, 0)
+#define _MX53_PAD_KEY_COL0__KPP_COL_0  IOMUX_PAD(0x34C, 0x24, 0, 0x0, 0, 0)
 #define _MX53_PAD_KEY_COL0__GPIO4_6            IOMUX_PAD(0x34C, 0x24, 1, 0x0, 0, 0)
 #define _MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC    IOMUX_PAD(0x34C, 0x24, 2, 0x758, 0, 0)
-#define _MX53_PAD_KEY_COL0__UART4_TXD_MUX      IOMUX_PAD(0x34C, 0x24, 4, 0x890, 0, 0)
+#define _MX53_PAD_KEY_COL0__UART4_TXD_MUX      IOMUX_PAD(0x34C, 0x24, 4, 0x0, 0, 0)
 #define _MX53_PAD_KEY_COL0__ECSPI1_SCLK        IOMUX_PAD(0x34C, 0x24, 5, 0x79C, 0, 0)
 #define _MX53_PAD_KEY_COL0__FEC_RDATA_3        IOMUX_PAD(0x34C, 0x24, 6, 0x0, 0, 0)
 #define _MX53_PAD_KEY_COL0__SRC_ANY_PU_RST     IOMUX_PAD(0x34C, 0x24, 7, 0x0, 0, 0)
@@ -55,7 +55,7 @@
 #define _MX53_PAD_KEY_COL1__KPP_COL_1  IOMUX_PAD(0x354, 0x2C, 0, 0x0, 0, 0)
 #define _MX53_PAD_KEY_COL1__GPIO4_8            IOMUX_PAD(0x354, 0x2C, 1, 0x0, 0, 0)
 #define _MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS   IOMUX_PAD(0x354, 0x2C, 2, 0x75C, 0, 0)
-#define _MX53_PAD_KEY_COL1__UART5_TXD_MUX      IOMUX_PAD(0x354, 0x2C, 4, 0x898, 0, 0)
+#define _MX53_PAD_KEY_COL1__UART5_TXD_MUX      IOMUX_PAD(0x354, 0x2C, 4, 0x0, 0, 0)
 #define _MX53_PAD_KEY_COL1__ECSPI1_MISO        IOMUX_PAD(0x354, 0x2C, 5, 0x7A0, 0, 0)
 #define _MX53_PAD_KEY_COL1__FEC_RX_CLK IOMUX_PAD(0x354, 0x2C, 6, 0x808, 0, 0)
 #define _MX53_PAD_KEY_COL1__USBPHY1_TXREADY    IOMUX_PAD(0x354, 0x2C, 7, 0x0, 0, 0)
 #define _MX53_PAD_KEY_ROW4__GPIO4_15   IOMUX_PAD(0x370, 0x48, 1, 0x0, 0, 0)
 #define _MX53_PAD_KEY_ROW4__CAN2_RXCAN IOMUX_PAD(0x370, 0x48, 2, 0x764, 0, 0)
 #define _MX53_PAD_KEY_ROW4__IPU_SISG_5 IOMUX_PAD(0x370, 0x48, 3, 0x0, 0, 0)
-#define _MX53_PAD_KEY_ROW4__UART5_CTS  IOMUX_PAD(0x370, 0x48, 4, 0x894, 1, 0)
+#define _MX53_PAD_KEY_ROW4__UART5_CTS  IOMUX_PAD(0x370, 0x48, 4, 0x0, 0, 0)
 #define _MX53_PAD_KEY_ROW4__USBOH3_USBOTG_PWR  IOMUX_PAD(0x370, 0x48, 5, 0x0, 0, 0)
 #define _MX53_PAD_KEY_ROW4__USBPHY1_VBUSVALID  IOMUX_PAD(0x370, 0x48, 7, 0x0, 0, 0)
 #define _MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK       IOMUX_PAD(0x378, 0x4C, 0, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT9__TPIU_TRACE_6              IOMUX_PAD(0x410, 0xE4, 7, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT10__IPU_CSI0_D_10            IOMUX_PAD(0x414, 0xE8, 0, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT10__GPIO5_28         IOMUX_PAD(0x414, 0xE8, 1, 0x0, 0, 0)
-#define _MX53_PAD_CSI0_DAT10__UART1_TXD_MUX    IOMUX_PAD(0x414, 0xE8, 2, 0x878, 0, 0)
+#define _MX53_PAD_CSI0_DAT10__UART1_TXD_MUX    IOMUX_PAD(0x414, 0xE8, 2, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT10__ECSPI2_MISO              IOMUX_PAD(0x414, 0xE8, 3, 0x7BC, 1, 0)
 #define _MX53_PAD_CSI0_DAT10__AUDMUX_AUD3_RXC  IOMUX_PAD(0x414, 0xE8, 4, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT10__SDMA_DEBUG_PC_4  IOMUX_PAD(0x414, 0xE8, 5, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT11__TPIU_TRACE_8             IOMUX_PAD(0x418, 0xEC, 7, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT12__IPU_CSI0_D_12            IOMUX_PAD(0x41C, 0xF0, 0, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT12__GPIO5_30         IOMUX_PAD(0x41C, 0xF0, 1, 0x0, 0, 0)
-#define _MX53_PAD_CSI0_DAT12__UART4_TXD_MUX    IOMUX_PAD(0x41C, 0xF0, 2, 0x890, 2, 0)
+#define _MX53_PAD_CSI0_DAT12__UART4_TXD_MUX    IOMUX_PAD(0x41C, 0xF0, 2, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT12__USBOH3_USBH3_DATA_0      IOMUX_PAD(0x41C, 0xF0, 4, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT12__SDMA_DEBUG_PC_6  IOMUX_PAD(0x41C, 0xF0, 5, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT12__EMI_EMI_DEBUG_41 IOMUX_PAD(0x41C, 0xF0, 6, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT13__TPIU_TRACE_10            IOMUX_PAD(0x420, 0xF4, 7, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT14__IPU_CSI0_D_14            IOMUX_PAD(0x424, 0xF8, 0, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT14__GPIO6_0          IOMUX_PAD(0x424, 0xF8, 1, 0x0, 0, 0)
-#define _MX53_PAD_CSI0_DAT14__UART5_TXD_MUX    IOMUX_PAD(0x424, 0xF8, 2, 0x898, 2, 0)
+#define _MX53_PAD_CSI0_DAT14__UART5_TXD_MUX    IOMUX_PAD(0x424, 0xF8, 2, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT14__USBOH3_USBH3_DATA_2      IOMUX_PAD(0x424, 0xF8, 4, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT14__SDMA_DEBUG_PC_8  IOMUX_PAD(0x424, 0xF8, 5, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT14__EMI_EMI_DEBUG_43 IOMUX_PAD(0x424, 0xF8, 6, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT16__TPIU_TRACE_13            IOMUX_PAD(0x42C, 0x100, 7, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT17__IPU_CSI0_D_17            IOMUX_PAD(0x430, 0x104, 0, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT17__GPIO6_3          IOMUX_PAD(0x430, 0x104, 1, 0x0, 0, 0)
-#define _MX53_PAD_CSI0_DAT17__UART4_CTS                IOMUX_PAD(0x430, 0x104, 2, 0x88C, 1, 0)
+#define _MX53_PAD_CSI0_DAT17__UART4_CTS                IOMUX_PAD(0x430, 0x104, 2, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT17__USBOH3_USBH3_DATA_5      IOMUX_PAD(0x430, 0x104, 4, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT17__SDMA_DEBUG_PC_11 IOMUX_PAD(0x430, 0x104, 5, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT17__EMI_EMI_DEBUG_46 IOMUX_PAD(0x430, 0x104, 6, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT18__TPIU_TRACE_15            IOMUX_PAD(0x434, 0x108, 7, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT19__IPU_CSI0_D_19            IOMUX_PAD(0x438, 0x10C, 0, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT19__GPIO6_5          IOMUX_PAD(0x438, 0x10C, 1, 0x0, 0, 0)
-#define _MX53_PAD_CSI0_DAT19__UART5_CTS                IOMUX_PAD(0x438, 0x10C, 2, 0x894, 3, 0)
+#define _MX53_PAD_CSI0_DAT19__UART5_CTS                IOMUX_PAD(0x438, 0x10C, 2, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT19__USBOH3_USBH3_DATA_7      IOMUX_PAD(0x438, 0x10C, 4, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT19__SDMA_DEBUG_PC_13 IOMUX_PAD(0x438, 0x10C, 5, 0x0, 0, 0)
 #define _MX53_PAD_CSI0_DAT19__EMI_EMI_DEBUG_48 IOMUX_PAD(0x438, 0x10C, 6, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D16__IPU_DI0_PIN5                IOMUX_PAD(0x460, 0x118, 2, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D16__IPU_DISPB1_SER_CLK  IOMUX_PAD(0x460, 0x118, 3, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D16__ECSPI1_SCLK         IOMUX_PAD(0x460, 0x118, 4, 0x79C, 3, 0)
-#define _MX53_PAD_EIM_D16__I2C2_SDA                    IOMUX_PAD(0x460, 0x118, 5, 0x820, 1, 0)
+#define _MX53_PAD_EIM_D16__I2C2_SDA                    IOMUX_PAD(0x460, 0x118, 5 | IOMUX_CONFIG_SION, 0x820, 1, 0)
 #define _MX53_PAD_EIM_D17__EMI_WEIM_D_17               IOMUX_PAD(0x464, 0x11C, 0, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D17__GPIO3_17                    IOMUX_PAD(0x464, 0x11C, 1, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D17__IPU_DI0_PIN6                IOMUX_PAD(0x464, 0x11C, 2, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D17__IPU_DISPB1_SER_DIN  IOMUX_PAD(0x464, 0x11C, 3, 0x830, 0, 0)
 #define _MX53_PAD_EIM_D17__ECSPI1_MISO         IOMUX_PAD(0x464, 0x11C, 4, 0x7A0, 3, 0)
-#define _MX53_PAD_EIM_D17__I2C3_SCL                    IOMUX_PAD(0x464, 0x11C, 5, 0x824, 0, 0)
+#define _MX53_PAD_EIM_D17__I2C3_SCL                    IOMUX_PAD(0x464, 0x11C, 5 | IOMUX_CONFIG_SION, 0x824, 0, 0)
 #define _MX53_PAD_EIM_D18__EMI_WEIM_D_18               IOMUX_PAD(0x468, 0x120, 0, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D18__GPIO3_18                    IOMUX_PAD(0x468, 0x120, 1, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D18__IPU_DI0_PIN7                IOMUX_PAD(0x468, 0x120, 2, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D18__IPU_DISPB1_SER_DIO  IOMUX_PAD(0x468, 0x120, 3, 0x830, 1, 0)
 #define _MX53_PAD_EIM_D18__ECSPI1_MOSI         IOMUX_PAD(0x468, 0x120, 4, 0x7A4, 3, 0)
-#define _MX53_PAD_EIM_D18__I2C3_SDA                    IOMUX_PAD(0x468, 0x120, 5, 0x828, 0, 0)
+#define _MX53_PAD_EIM_D18__I2C3_SDA                    IOMUX_PAD(0x468, 0x120, 5 | IOMUX_CONFIG_SION, 0x828, 0, 0)
 #define _MX53_PAD_EIM_D18__IPU_DI1_D0_CS               IOMUX_PAD(0x468, 0x120, 6, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D19__EMI_WEIM_D_19               IOMUX_PAD(0x46C, 0x124, 0, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D19__GPIO3_19                    IOMUX_PAD(0x46C, 0x124, 1, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D19__IPU_DISPB1_SER_RS   IOMUX_PAD(0x46C, 0x124, 3, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D19__ECSPI1_SS1          IOMUX_PAD(0x46C, 0x124, 4, 0x7AC, 2, 0)
 #define _MX53_PAD_EIM_D19__EPIT1_EPITO         IOMUX_PAD(0x46C, 0x124, 5, 0x0, 0, 0)
-#define _MX53_PAD_EIM_D19__UART1_CTS                   IOMUX_PAD(0x46C, 0x124, 6, 0x874, 0, 0)
+#define _MX53_PAD_EIM_D19__UART1_CTS                   IOMUX_PAD(0x46C, 0x124, 6, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D19__USBOH3_USBH2_OC             IOMUX_PAD(0x46C, 0x124, 7, 0x8A4, 0, 0)
 #define _MX53_PAD_EIM_D20__EMI_WEIM_D_20               IOMUX_PAD(0x470, 0x128, 0, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D20__GPIO3_20                    IOMUX_PAD(0x470, 0x128, 1, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D21__IPU_DI0_PIN17               IOMUX_PAD(0x474, 0x12C, 2, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D21__IPU_DISPB0_SER_CLK  IOMUX_PAD(0x474, 0x12C, 3, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D21__CSPI_SCLK                   IOMUX_PAD(0x474, 0x12C, 4, 0x780, 1, 0)
-#define _MX53_PAD_EIM_D21__I2C1_SCL                    IOMUX_PAD(0x474, 0x12C, 5, 0x814, 1, 0)
+#define _MX53_PAD_EIM_D21__I2C1_SCL                    IOMUX_PAD(0x474, 0x12C, 5 | IOMUX_CONFIG_SION, 0x814, 1, 0)
 #define _MX53_PAD_EIM_D21__USBOH3_USBOTG_OC    IOMUX_PAD(0x474, 0x12C, 6, 0x89C, 1, 0)
 #define _MX53_PAD_EIM_D22__EMI_WEIM_D_22               IOMUX_PAD(0x478, 0x130, 0, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D22__GPIO3_22                    IOMUX_PAD(0x478, 0x130, 1, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D22__USBOH3_USBOTG_PWR   IOMUX_PAD(0x478, 0x130, 6, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D23__EMI_WEIM_D_23               IOMUX_PAD(0x47C, 0x134, 0, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D23__GPIO3_23                    IOMUX_PAD(0x47C, 0x134, 1, 0x0, 0, 0)
-#define _MX53_PAD_EIM_D23__UART3_CTS                   IOMUX_PAD(0x47C, 0x134, 2, 0x884, 0, 0)
+#define _MX53_PAD_EIM_D23__UART3_CTS                   IOMUX_PAD(0x47C, 0x134, 2, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D23__UART1_DCD           IOMUX_PAD(0x47C, 0x134, 3, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D23__IPU_DI0_D0_CS               IOMUX_PAD(0x47C, 0x134, 4, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D23__IPU_DI1_PIN2                IOMUX_PAD(0x47C, 0x134, 5, 0x0, 0, 0)
 #define _MX53_PAD_EIM_EB3__IPU_DI1_PIN16               IOMUX_PAD(0x480, 0x138, 7, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D24__EMI_WEIM_D_24               IOMUX_PAD(0x484, 0x13C, 0, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D24__GPIO3_24                    IOMUX_PAD(0x484, 0x13C, 1, 0x0, 0, 0)
-#define _MX53_PAD_EIM_D24__UART3_TXD_MUX               IOMUX_PAD(0x484, 0x13C, 2, 0x888, 0, 0)
+#define _MX53_PAD_EIM_D24__UART3_TXD_MUX               IOMUX_PAD(0x484, 0x13C, 2, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D24__ECSPI1_SS2          IOMUX_PAD(0x484, 0x13C, 3, 0x7B0, 1, 0)
 #define _MX53_PAD_EIM_D24__CSPI_SS2                    IOMUX_PAD(0x484, 0x13C, 4, 0x794, 1, 0)
 #define _MX53_PAD_EIM_D24__AUDMUX_AUD5_RXFS    IOMUX_PAD(0x484, 0x13C, 5, 0x754, 1, 0)
 #define _MX53_PAD_EIM_D25__UART1_DSR           IOMUX_PAD(0x488, 0x140, 7, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D26__EMI_WEIM_D_26               IOMUX_PAD(0x48C, 0x144, 0, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D26__GPIO3_26                    IOMUX_PAD(0x48C, 0x144, 1, 0x0, 0, 0)
-#define _MX53_PAD_EIM_D26__UART2_TXD_MUX               IOMUX_PAD(0x48C, 0x144, 2, 0x880, 0, 0)
+#define _MX53_PAD_EIM_D26__UART2_TXD_MUX               IOMUX_PAD(0x48C, 0x144, 2, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D26__FIRI_RXD                    IOMUX_PAD(0x48C, 0x144, 3, 0x80C, 0, 0)
 #define _MX53_PAD_EIM_D26__IPU_CSI0_D_1                IOMUX_PAD(0x48C, 0x144, 4, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D26__IPU_DI1_PIN11               IOMUX_PAD(0x48C, 0x144, 5, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D27__IPU_DISP1_DAT_23            IOMUX_PAD(0x490, 0x148, 7, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D28__EMI_WEIM_D_28               IOMUX_PAD(0x494, 0x14C, 0, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D28__GPIO3_28                    IOMUX_PAD(0x494, 0x14C, 1, 0x0, 0, 0)
-#define _MX53_PAD_EIM_D28__UART2_CTS                   IOMUX_PAD(0x494, 0x14C, 2, 0x87C, 0, 0)
+#define _MX53_PAD_EIM_D28__UART2_CTS                   IOMUX_PAD(0x494, 0x14C, 2, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D28__IPU_DISPB0_SER_DIO  IOMUX_PAD(0x494, 0x14C, 3, 0x82C, 1, 0)
 #define _MX53_PAD_EIM_D28__CSPI_MOSI                   IOMUX_PAD(0x494, 0x14C, 4, 0x788, 1, 0)
-#define _MX53_PAD_EIM_D28__I2C1_SDA                    IOMUX_PAD(0x494, 0x14C, 5, 0x818, 1, 0)
+#define _MX53_PAD_EIM_D28__I2C1_SDA                    IOMUX_PAD(0x494, 0x14C, 5 | IOMUX_CONFIG_SION, 0x818, 1, 0)
 #define _MX53_PAD_EIM_D28__IPU_EXT_TRIG                IOMUX_PAD(0x494, 0x14C, 6, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D28__IPU_DI0_PIN13               IOMUX_PAD(0x494, 0x14C, 7, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D29__EMI_WEIM_D_29               IOMUX_PAD(0x498, 0x150, 0, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D29__IPU_DI0_PIN14               IOMUX_PAD(0x498, 0x150, 7, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D30__EMI_WEIM_D_30               IOMUX_PAD(0x49C, 0x154, 0, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D30__GPIO3_30                    IOMUX_PAD(0x49C, 0x154, 1, 0x0, 0, 0)
-#define _MX53_PAD_EIM_D30__UART3_CTS                   IOMUX_PAD(0x49C, 0x154, 2, 0x884, 2, 0)
+#define _MX53_PAD_EIM_D30__UART3_CTS                   IOMUX_PAD(0x49C, 0x154, 2, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D30__IPU_CSI0_D_3                IOMUX_PAD(0x49C, 0x154, 3, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D30__IPU_DI0_PIN11               IOMUX_PAD(0x49C, 0x154, 4, 0x0, 0, 0)
 #define _MX53_PAD_EIM_D30__IPU_DISP1_DAT_21            IOMUX_PAD(0x49C, 0x154, 5, 0x0, 0, 0)
 #define _MX53_PAD_EIM_DA5__GPIO3_5                     IOMUX_PAD(0x500, 0x1B0, 1, 0x0, 0, 0)
 #define _MX53_PAD_EIM_DA5__IPU_DISP1_DAT_4             IOMUX_PAD(0x500, 0x1B0, 3, 0x0, 0, 0)
 #define _MX53_PAD_EIM_DA5__IPU_CSI1_D_4                IOMUX_PAD(0x500, 0x1B0, 4, 0x0, 0, 0)
-#define _MX53_PAD_EIM_DA5__SRC_BT_CFG3_6               IOMUX_PAD(0x500, 0x1B0, 17, 0x0, 0, 0)
+#define _MX53_PAD_EIM_DA5__SRC_BT_CFG3_6               IOMUX_PAD(0x500, 0x1B0, 7 | IOMUX_CONFIG_SION, 0x0, 0, 0)
 #define _MX53_PAD_EIM_DA6__EMI_NAND_WEIM_DA_6  IOMUX_PAD(0x504, 0x1B4, 0, 0x0, 0, 0)
 #define _MX53_PAD_EIM_DA6__GPIO3_6                     IOMUX_PAD(0x504, 0x1B4, 1, 0x0, 0, 0)
 #define _MX53_PAD_EIM_DA6__IPU_DISP1_DAT_3             IOMUX_PAD(0x504, 0x1B4, 3, 0x0, 0, 0)
 #define _MX53_PAD_FEC_MDC__USBPHY2_DATAOUT_1   IOMUX_PAD(0x5E8, 0x26C, 7, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DIOW__PATA_DIOW         IOMUX_PAD(0x5F0, 0x270, 0, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DIOW__GPIO6_17          IOMUX_PAD(0x5F0, 0x270, 1, 0x0, 0, 0)
-#define _MX53_PAD_PATA_DIOW__UART1_TXD_MUX     IOMUX_PAD(0x5F0, 0x270, 3, 0x878, 2, 0)
+#define _MX53_PAD_PATA_DIOW__UART1_TXD_MUX     IOMUX_PAD(0x5F0, 0x270, 3, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DIOW__USBPHY2_DATAOUT_2 IOMUX_PAD(0x5F0, 0x270, 7, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DMACK__PATA_DMACK               IOMUX_PAD(0x5F4, 0x274, 0, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DMACK__GPIO6_18         IOMUX_PAD(0x5F4, 0x274, 1, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DMACK__USBPHY2_DATAOUT_3        IOMUX_PAD(0x5F4, 0x274, 7, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DMARQ__PATA_DMARQ               IOMUX_PAD(0x5F8, 0x278, 0, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DMARQ__GPIO7_0          IOMUX_PAD(0x5F8, 0x278, 1, 0x0, 0, 0)
-#define _MX53_PAD_PATA_DMARQ__UART2_TXD_MUX    IOMUX_PAD(0x5F8, 0x278, 3, 0x880, 2, 0)
+#define _MX53_PAD_PATA_DMARQ__UART2_TXD_MUX    IOMUX_PAD(0x5F8, 0x278, 3, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DMARQ__CCM_CCM_OUT_0    IOMUX_PAD(0x5F8, 0x278, 5, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DMARQ__USBPHY2_DATAOUT_4        IOMUX_PAD(0x5F8, 0x278, 7, 0x0, 0, 0)
 #define _MX53_PAD_PATA_BUFFER_EN__PATA_BUFFER_EN       IOMUX_PAD(0x5FC, 0x27C, 0, 0x0, 0, 0)
 #define _MX53_PAD_PATA_BUFFER_EN__USBPHY2_DATAOUT_5    IOMUX_PAD(0x5FC, 0x27C, 7, 0x0, 0, 0)
 #define _MX53_PAD_PATA_INTRQ__PATA_INTRQ               IOMUX_PAD(0x600, 0x280, 0, 0x0, 0, 0)
 #define _MX53_PAD_PATA_INTRQ__GPIO7_2          IOMUX_PAD(0x600, 0x280, 1, 0x0, 0, 0)
-#define _MX53_PAD_PATA_INTRQ__UART2_CTS                IOMUX_PAD(0x600, 0x280, 3, 0x87C, 2, 0)
+#define _MX53_PAD_PATA_INTRQ__UART2_CTS                IOMUX_PAD(0x600, 0x280, 3, 0x0, 0, 0)
 #define _MX53_PAD_PATA_INTRQ__CAN1_TXCAN               IOMUX_PAD(0x600, 0x280, 4, 0x0, 0, 0)
 #define _MX53_PAD_PATA_INTRQ__CCM_CCM_OUT_2    IOMUX_PAD(0x600, 0x280, 5, 0x0, 0, 0)
 #define _MX53_PAD_PATA_INTRQ__USBPHY2_DATAOUT_6        IOMUX_PAD(0x600, 0x280, 7, 0x0, 0, 0)
 #define _MX53_PAD_PATA_RESET_B__PATA_PATA_RESET_B      IOMUX_PAD(0x608, 0x288, 0, 0x0, 0, 0)
 #define _MX53_PAD_PATA_RESET_B__GPIO7_4                IOMUX_PAD(0x608, 0x288, 1, 0x0, 0, 0)
 #define _MX53_PAD_PATA_RESET_B__ESDHC3_CMD             IOMUX_PAD(0x608, 0x288, 2, 0x0, 0, 0)
-#define _MX53_PAD_PATA_RESET_B__UART1_CTS              IOMUX_PAD(0x608, 0x288, 3, 0x874, 2, 0)
+#define _MX53_PAD_PATA_RESET_B__UART1_CTS              IOMUX_PAD(0x608, 0x288, 3, 0x0, 0, 0)
 #define _MX53_PAD_PATA_RESET_B__CAN2_TXCAN             IOMUX_PAD(0x608, 0x288, 4, 0x0, 0, 0)
 #define _MX53_PAD_PATA_RESET_B__USBPHY1_DATAOUT_0      IOMUX_PAD(0x608, 0x288, 7, 0x0, 0, 0)
 #define _MX53_PAD_PATA_IORDY__PATA_IORDY               IOMUX_PAD(0x60C, 0x28C, 0, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DA_1__PATA_DA_1         IOMUX_PAD(0x614, 0x294, 0, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DA_1__GPIO7_7           IOMUX_PAD(0x614, 0x294, 1, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DA_1__ESDHC4_CMD                IOMUX_PAD(0x614, 0x294, 2, 0x0, 0, 0)
-#define _MX53_PAD_PATA_DA_1__UART3_CTS         IOMUX_PAD(0x614, 0x294, 4, 0x884, 4, 0)
+#define _MX53_PAD_PATA_DA_1__UART3_CTS         IOMUX_PAD(0x614, 0x294, 4, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DA_1__USBPHY1_DATAOUT_3 IOMUX_PAD(0x614, 0x294, 7, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DA_2__PATA_DA_2         IOMUX_PAD(0x618, 0x298, 0, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DA_2__GPIO7_8           IOMUX_PAD(0x618, 0x298, 1, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DA_2__USBPHY1_DATAOUT_4 IOMUX_PAD(0x618, 0x298, 7, 0x0, 0, 0)
 #define _MX53_PAD_PATA_CS_0__PATA_CS_0         IOMUX_PAD(0x61C, 0x29C, 0, 0x0, 0, 0)
 #define _MX53_PAD_PATA_CS_0__GPIO7_9                   IOMUX_PAD(0x61C, 0x29C, 1, 0x0, 0, 0)
-#define _MX53_PAD_PATA_CS_0__UART3_TXD_MUX             IOMUX_PAD(0x61C, 0x29C, 4, 0x888, 2, 0)
+#define _MX53_PAD_PATA_CS_0__UART3_TXD_MUX             IOMUX_PAD(0x61C, 0x29C, 4, 0x0, 0, 0)
 #define _MX53_PAD_PATA_CS_0__USBPHY1_DATAOUT_5 IOMUX_PAD(0x61C, 0x29C, 7, 0x0, 0, 0)
 #define _MX53_PAD_PATA_CS_1__PATA_CS_1         IOMUX_PAD(0x620, 0x2A0, 0, 0x0, 0, 0)
 #define _MX53_PAD_PATA_CS_1__GPIO7_10          IOMUX_PAD(0x620, 0x2A0, 1, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DATA5__ESDHC4_DAT5              IOMUX_PAD(0x63C, 0x2B8, 4, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DATA5__GPU3d_GPU_DEBUG_OUT_5    IOMUX_PAD(0x63C, 0x2B8, 5, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DATA5__IPU_DIAG_BUS_5   IOMUX_PAD(0x63C, 0x2B8, 6, 0x0, 0, 0)
-#define _MX53_PAD_PATA_DATA6__PATA_DATA_6      IOMUX_PAD(0x640, 0x2BC, 1, 0x0, 0, 0)
+#define _MX53_PAD_PATA_DATA6__PATA_DATA_6      IOMUX_PAD(0x640, 0x2BC, 0, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DATA6__GPIO2_6          IOMUX_PAD(0x640, 0x2BC, 1, 0x0, 0, 0)
-#define _MX53_PAD_PATA_DATA6__EMI_NANDF_D_6    IOMUX_PAD(0x640, 0x2BC, 1, 0x0, 0, 0)
-#define _MX53_PAD_PATA_DATA6__ESDHC4_DAT6              IOMUX_PAD(0x640, 0x2BC, 1, 0x0, 0, 0)
-#define _MX53_PAD_PATA_DATA6__GPU3d_GPU_DEBUG_OUT_6    IOMUX_PAD(0x640, 0x2BC, 1, 0x0, 0, 0)
-#define _MX53_PAD_PATA_DATA6__IPU_DIAG_BUS_6   IOMUX_PAD(0x640, 0x2BC, 1, 0x0, 0, 0)
+#define _MX53_PAD_PATA_DATA6__EMI_NANDF_D_6    IOMUX_PAD(0x640, 0x2BC, 3, 0x0, 0, 0)
+#define _MX53_PAD_PATA_DATA6__ESDHC4_DAT6              IOMUX_PAD(0x640, 0x2BC, 4, 0x0, 0, 0)
+#define _MX53_PAD_PATA_DATA6__GPU3d_GPU_DEBUG_OUT_6    IOMUX_PAD(0x640, 0x2BC, 5, 0x0, 0, 0)
+#define _MX53_PAD_PATA_DATA6__IPU_DIAG_BUS_6   IOMUX_PAD(0x640, 0x2BC, 6, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DATA7__PATA_DATA_7              IOMUX_PAD(0x644, 0x2C0, 0, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DATA7__GPIO2_7          IOMUX_PAD(0x644, 0x2C0, 1, 0x0, 0, 0)
 #define _MX53_PAD_PATA_DATA7__EMI_NANDF_D_7    IOMUX_PAD(0x644, 0x2C0, 3, 0x0, 0, 0)
 #define _MX53_PAD_GPIO_5__CCM_CLKO             IOMUX_PAD(0x6C0, 0x330, 3, 0x0, 0, 0)
 #define _MX53_PAD_GPIO_5__CSU_CSU_ALARM_AUT_2  IOMUX_PAD(0x6C0, 0x330, 4, 0x0, 0, 0)
 #define _MX53_PAD_GPIO_5__OBSERVE_MUX_OBSRV_INT_OUT4   IOMUX_PAD(0x6C0, 0x330, 5, 0x0, 0, 0)
-#define _MX53_PAD_GPIO_5__I2C3_SCL             IOMUX_PAD(0x6C0, 0x330, 6, 0x824, 2, 0)
+#define _MX53_PAD_GPIO_5__I2C3_SCL             IOMUX_PAD(0x6C0, 0x330, 6 | IOMUX_CONFIG_SION, 0x824, 2, 0)
 #define _MX53_PAD_GPIO_5__CCM_PLL1_BYP IOMUX_PAD(0x6C0, 0x330, 7, 0x770, 1, 0)
 #define _MX53_PAD_GPIO_7__ESAI1_TX4_RX1        IOMUX_PAD(0x6C4, 0x334, 0, 0x7F4, 1, 0)
 #define _MX53_PAD_GPIO_7__GPIO1_7              IOMUX_PAD(0x6C4, 0x334, 1, 0x0, 0, 0)
 #define _MX53_PAD_GPIO_7__EPIT1_EPITO  IOMUX_PAD(0x6C4, 0x334, 2, 0x0, 0, 0)
 #define _MX53_PAD_GPIO_7__CAN1_TXCAN   IOMUX_PAD(0x6C4, 0x334, 3, 0x0, 0, 0)
-#define _MX53_PAD_GPIO_7__UART2_TXD_MUX        IOMUX_PAD(0x6C4, 0x334, 4, 0x880, 4, 0)
+#define _MX53_PAD_GPIO_7__UART2_TXD_MUX        IOMUX_PAD(0x6C4, 0x334, 4, 0x0, 0, 0)
 #define _MX53_PAD_GPIO_7__FIRI_RXD             IOMUX_PAD(0x6C4, 0x334, 5, 0x80C, 1, 0)
 #define _MX53_PAD_GPIO_7__SPDIF_PLOCK  IOMUX_PAD(0x6C4, 0x334, 6, 0x0, 0, 0)
 #define _MX53_PAD_GPIO_7__CCM_PLL2_BYP IOMUX_PAD(0x6C4, 0x334, 7, 0x774, 1, 0)
 #define MX53_PAD_KEY_COL0__KPP_COL_0           (_MX53_PAD_KEY_COL0__KPP_COL_0 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_COL0__GPIO4_6             (_MX53_PAD_KEY_COL0__GPIO4_6 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC             (_MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_KEY_COL0__UART4_TXD_MUX               (_MX53_PAD_KEY_COL0__UART4_TXD_MUX | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_KEY_COL0__UART4_TXD_MUX               (_MX53_PAD_KEY_COL0__UART4_TXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_KEY_COL0__ECSPI1_SCLK         (_MX53_PAD_KEY_COL0__ECSPI1_SCLK | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_COL0__FEC_RDATA_3         (_MX53_PAD_KEY_COL0__FEC_RDATA_3 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_COL0__SRC_ANY_PU_RST              (_MX53_PAD_KEY_COL0__SRC_ANY_PU_RST | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_ROW0__KPP_ROW_0           (_MX53_PAD_KEY_ROW0__KPP_ROW_0 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_ROW0__GPIO4_7             (_MX53_PAD_KEY_ROW0__GPIO4_7 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD             (_MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_KEY_ROW0__UART4_RXD_MUX               (_MX53_PAD_KEY_ROW0__UART4_RXD_MUX | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_KEY_ROW0__UART4_RXD_MUX               (_MX53_PAD_KEY_ROW0__UART4_RXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_KEY_ROW0__ECSPI1_MOSI         (_MX53_PAD_KEY_ROW0__ECSPI1_MOSI | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_ROW0__FEC_TX_ER           (_MX53_PAD_KEY_ROW0__FEC_TX_ER | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_COL1__KPP_COL_1           (_MX53_PAD_KEY_COL1__KPP_COL_1 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_COL1__GPIO4_8             (_MX53_PAD_KEY_COL1__GPIO4_8 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS            (_MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_KEY_COL1__UART5_TXD_MUX               (_MX53_PAD_KEY_COL1__UART5_TXD_MUX | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_KEY_COL1__UART5_TXD_MUX               (_MX53_PAD_KEY_COL1__UART5_TXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_KEY_COL1__ECSPI1_MISO         (_MX53_PAD_KEY_COL1__ECSPI1_MISO | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_COL1__FEC_RX_CLK          (_MX53_PAD_KEY_COL1__FEC_RX_CLK | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_COL1__USBPHY1_TXREADY             (_MX53_PAD_KEY_COL1__USBPHY1_TXREADY | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_ROW1__KPP_ROW_1           (_MX53_PAD_KEY_ROW1__KPP_ROW_1 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_ROW1__GPIO4_9             (_MX53_PAD_KEY_ROW1__GPIO4_9 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD             (_MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_KEY_ROW1__UART5_RXD_MUX               (_MX53_PAD_KEY_ROW1__UART5_RXD_MUX | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_KEY_ROW1__UART5_RXD_MUX               (_MX53_PAD_KEY_ROW1__UART5_RXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_KEY_ROW1__ECSPI1_SS0          (_MX53_PAD_KEY_ROW1__ECSPI1_SS0 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_ROW1__FEC_COL             (_MX53_PAD_KEY_ROW1__FEC_COL | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_ROW1__USBPHY1_RXVALID             (_MX53_PAD_KEY_ROW1__USBPHY1_RXVALID | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_COL4__GPIO4_14            (_MX53_PAD_KEY_COL4__GPIO4_14 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_COL4__CAN2_TXCAN          (_MX53_PAD_KEY_COL4__CAN2_TXCAN | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_COL4__IPU_SISG_4          (_MX53_PAD_KEY_COL4__IPU_SISG_4 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_KEY_COL4__UART5_RTS           (_MX53_PAD_KEY_COL4__UART5_RTS | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_KEY_COL4__UART5_RTS           (_MX53_PAD_KEY_COL4__UART5_RTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_KEY_COL4__USBOH3_USBOTG_OC            (_MX53_PAD_KEY_COL4__USBOH3_USBOTG_OC | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_COL4__USBPHY1_LINESTATE_1         (_MX53_PAD_KEY_COL4__USBPHY1_LINESTATE_1 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_ROW4__KPP_ROW_4           (_MX53_PAD_KEY_ROW4__KPP_ROW_4 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_ROW4__GPIO4_15            (_MX53_PAD_KEY_ROW4__GPIO4_15 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_ROW4__CAN2_RXCAN          (_MX53_PAD_KEY_ROW4__CAN2_RXCAN | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_ROW4__IPU_SISG_5          (_MX53_PAD_KEY_ROW4__IPU_SISG_5 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_KEY_ROW4__UART5_CTS           (_MX53_PAD_KEY_ROW4__UART5_CTS | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_KEY_ROW4__UART5_CTS           (_MX53_PAD_KEY_ROW4__UART5_CTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_KEY_ROW4__USBOH3_USBOTG_PWR           (_MX53_PAD_KEY_ROW4__USBOH3_USBOTG_PWR | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_KEY_ROW4__USBPHY1_VBUSVALID           (_MX53_PAD_KEY_ROW4__USBPHY1_VBUSVALID | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK                (_MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT11__TPIU_TRACE_8              (_MX53_PAD_CSI0_DAT11__TPIU_TRACE_8 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT12__IPU_CSI0_D_12             (_MX53_PAD_CSI0_DAT12__IPU_CSI0_D_12 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT12__GPIO5_30          (_MX53_PAD_CSI0_DAT12__GPIO5_30 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_CSI0_DAT12__UART4_TXD_MUX             (_MX53_PAD_CSI0_DAT12__UART4_TXD_MUX | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_CSI0_DAT12__UART4_TXD_MUX             (_MX53_PAD_CSI0_DAT12__UART4_TXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT12__USBOH3_USBH3_DATA_0               (_MX53_PAD_CSI0_DAT12__USBOH3_USBH3_DATA_0 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT12__SDMA_DEBUG_PC_6           (_MX53_PAD_CSI0_DAT12__SDMA_DEBUG_PC_6 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT12__EMI_EMI_DEBUG_41          (_MX53_PAD_CSI0_DAT12__EMI_EMI_DEBUG_41 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT12__TPIU_TRACE_9              (_MX53_PAD_CSI0_DAT12__TPIU_TRACE_9 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT13__IPU_CSI0_D_13             (_MX53_PAD_CSI0_DAT13__IPU_CSI0_D_13 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT13__GPIO5_31          (_MX53_PAD_CSI0_DAT13__GPIO5_31 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_CSI0_DAT13__UART4_RXD_MUX             (_MX53_PAD_CSI0_DAT13__UART4_RXD_MUX | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_CSI0_DAT13__UART4_RXD_MUX             (_MX53_PAD_CSI0_DAT13__UART4_RXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT13__USBOH3_USBH3_DATA_1               (_MX53_PAD_CSI0_DAT13__USBOH3_USBH3_DATA_1 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT13__SDMA_DEBUG_PC_7           (_MX53_PAD_CSI0_DAT13__SDMA_DEBUG_PC_7 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT13__EMI_EMI_DEBUG_42          (_MX53_PAD_CSI0_DAT13__EMI_EMI_DEBUG_42 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT13__TPIU_TRACE_10             (_MX53_PAD_CSI0_DAT13__TPIU_TRACE_10 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT14__IPU_CSI0_D_14             (_MX53_PAD_CSI0_DAT14__IPU_CSI0_D_14 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT14__GPIO6_0           (_MX53_PAD_CSI0_DAT14__GPIO6_0 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_CSI0_DAT14__UART5_TXD_MUX             (_MX53_PAD_CSI0_DAT14__UART5_TXD_MUX | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_CSI0_DAT14__UART5_TXD_MUX             (_MX53_PAD_CSI0_DAT14__UART5_TXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT14__USBOH3_USBH3_DATA_2               (_MX53_PAD_CSI0_DAT14__USBOH3_USBH3_DATA_2 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT14__SDMA_DEBUG_PC_8           (_MX53_PAD_CSI0_DAT14__SDMA_DEBUG_PC_8 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT14__EMI_EMI_DEBUG_43          (_MX53_PAD_CSI0_DAT14__EMI_EMI_DEBUG_43 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT14__TPIU_TRACE_11             (_MX53_PAD_CSI0_DAT14__TPIU_TRACE_11 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT15__IPU_CSI0_D_15             (_MX53_PAD_CSI0_DAT15__IPU_CSI0_D_15 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT15__GPIO6_1           (_MX53_PAD_CSI0_DAT15__GPIO6_1 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_CSI0_DAT15__UART5_RXD_MUX             (_MX53_PAD_CSI0_DAT15__UART5_RXD_MUX | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_CSI0_DAT15__UART5_RXD_MUX             (_MX53_PAD_CSI0_DAT15__UART5_RXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT15__USBOH3_USBH3_DATA_3               (_MX53_PAD_CSI0_DAT15__USBOH3_USBH3_DATA_3 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT15__SDMA_DEBUG_PC_9           (_MX53_PAD_CSI0_DAT15__SDMA_DEBUG_PC_9 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT15__EMI_EMI_DEBUG_44          (_MX53_PAD_CSI0_DAT15__EMI_EMI_DEBUG_44 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT15__TPIU_TRACE_12             (_MX53_PAD_CSI0_DAT15__TPIU_TRACE_12 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT16__IPU_CSI0_D_16             (_MX53_PAD_CSI0_DAT16__IPU_CSI0_D_16 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT16__GPIO6_2           (_MX53_PAD_CSI0_DAT16__GPIO6_2 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_CSI0_DAT16__UART4_RTS         (_MX53_PAD_CSI0_DAT16__UART4_RTS | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_CSI0_DAT16__UART4_RTS         (_MX53_PAD_CSI0_DAT16__UART4_RTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT16__USBOH3_USBH3_DATA_4               (_MX53_PAD_CSI0_DAT16__USBOH3_USBH3_DATA_4 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT16__SDMA_DEBUG_PC_10          (_MX53_PAD_CSI0_DAT16__SDMA_DEBUG_PC_10 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT16__EMI_EMI_DEBUG_45          (_MX53_PAD_CSI0_DAT16__EMI_EMI_DEBUG_45 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT16__TPIU_TRACE_13             (_MX53_PAD_CSI0_DAT16__TPIU_TRACE_13 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT17__IPU_CSI0_D_17             (_MX53_PAD_CSI0_DAT17__IPU_CSI0_D_17 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT17__GPIO6_3           (_MX53_PAD_CSI0_DAT17__GPIO6_3 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_CSI0_DAT17__UART4_CTS         (_MX53_PAD_CSI0_DAT17__UART4_CTS | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_CSI0_DAT17__UART4_CTS         (_MX53_PAD_CSI0_DAT17__UART4_CTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT17__USBOH3_USBH3_DATA_5               (_MX53_PAD_CSI0_DAT17__USBOH3_USBH3_DATA_5 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT17__SDMA_DEBUG_PC_11          (_MX53_PAD_CSI0_DAT17__SDMA_DEBUG_PC_11 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT17__EMI_EMI_DEBUG_46          (_MX53_PAD_CSI0_DAT17__EMI_EMI_DEBUG_46 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT17__TPIU_TRACE_14             (_MX53_PAD_CSI0_DAT17__TPIU_TRACE_14 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT18__IPU_CSI0_D_18             (_MX53_PAD_CSI0_DAT18__IPU_CSI0_D_18 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT18__GPIO6_4           (_MX53_PAD_CSI0_DAT18__GPIO6_4 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_CSI0_DAT18__UART5_RTS         (_MX53_PAD_CSI0_DAT18__UART5_RTS | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_CSI0_DAT18__UART5_RTS         (_MX53_PAD_CSI0_DAT18__UART5_RTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT18__USBOH3_USBH3_DATA_6               (_MX53_PAD_CSI0_DAT18__USBOH3_USBH3_DATA_6 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT18__SDMA_DEBUG_PC_12          (_MX53_PAD_CSI0_DAT18__SDMA_DEBUG_PC_12 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT18__EMI_EMI_DEBUG_47          (_MX53_PAD_CSI0_DAT18__EMI_EMI_DEBUG_47 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT18__TPIU_TRACE_15             (_MX53_PAD_CSI0_DAT18__TPIU_TRACE_15 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT19__IPU_CSI0_D_19             (_MX53_PAD_CSI0_DAT19__IPU_CSI0_D_19 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT19__GPIO6_5           (_MX53_PAD_CSI0_DAT19__GPIO6_5 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_CSI0_DAT19__UART5_CTS         (_MX53_PAD_CSI0_DAT19__UART5_CTS | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_CSI0_DAT19__UART5_CTS         (_MX53_PAD_CSI0_DAT19__UART5_CTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT19__USBOH3_USBH3_DATA_7               (_MX53_PAD_CSI0_DAT19__USBOH3_USBH3_DATA_7 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT19__SDMA_DEBUG_PC_13          (_MX53_PAD_CSI0_DAT19__SDMA_DEBUG_PC_13 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_CSI0_DAT19__EMI_EMI_DEBUG_48          (_MX53_PAD_CSI0_DAT19__EMI_EMI_DEBUG_48 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D19__IPU_DISPB1_SER_RS            (_MX53_PAD_EIM_D19__IPU_DISPB1_SER_RS | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D19__ECSPI1_SS1           (_MX53_PAD_EIM_D19__ECSPI1_SS1 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D19__EPIT1_EPITO          (_MX53_PAD_EIM_D19__EPIT1_EPITO | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_EIM_D19__UART1_CTS            (_MX53_PAD_EIM_D19__UART1_CTS | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_EIM_D19__UART1_CTS            (_MX53_PAD_EIM_D19__UART1_CTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_EIM_D19__USBOH3_USBH2_OC              (_MX53_PAD_EIM_D19__USBOH3_USBH2_OC | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D20__EMI_WEIM_D_20                (_MX53_PAD_EIM_D20__EMI_WEIM_D_20 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D20__GPIO3_20             (_MX53_PAD_EIM_D20__GPIO3_20 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D20__IPU_SER_DISP0_CS             (_MX53_PAD_EIM_D20__IPU_SER_DISP0_CS | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D20__CSPI_SS0             (_MX53_PAD_EIM_D20__CSPI_SS0 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D20__EPIT2_EPITO          (_MX53_PAD_EIM_D20__EPIT2_EPITO | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_EIM_D20__UART1_RTS            (_MX53_PAD_EIM_D20__UART1_RTS | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_EIM_D20__UART1_RTS            (_MX53_PAD_EIM_D20__UART1_RTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_EIM_D20__USBOH3_USBH2_PWR             (_MX53_PAD_EIM_D20__USBOH3_USBH2_PWR | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D21__EMI_WEIM_D_21                (_MX53_PAD_EIM_D21__EMI_WEIM_D_21 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D21__GPIO3_21             (_MX53_PAD_EIM_D21__GPIO3_21 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D22__USBOH3_USBOTG_PWR            (_MX53_PAD_EIM_D22__USBOH3_USBOTG_PWR | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D23__EMI_WEIM_D_23                (_MX53_PAD_EIM_D23__EMI_WEIM_D_23 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D23__GPIO3_23             (_MX53_PAD_EIM_D23__GPIO3_23 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_EIM_D23__UART3_CTS            (_MX53_PAD_EIM_D23__UART3_CTS | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_EIM_D23__UART3_CTS            (_MX53_PAD_EIM_D23__UART3_CTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_EIM_D23__UART1_DCD            (_MX53_PAD_EIM_D23__UART1_DCD | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D23__IPU_DI0_D0_CS                (_MX53_PAD_EIM_D23__IPU_DI0_D0_CS | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D23__IPU_DI1_PIN2         (_MX53_PAD_EIM_D23__IPU_DI1_PIN2 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D23__IPU_DI1_PIN14                (_MX53_PAD_EIM_D23__IPU_DI1_PIN14 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_EB3__EMI_WEIM_EB_3                (_MX53_PAD_EIM_EB3__EMI_WEIM_EB_3 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_EB3__GPIO2_31             (_MX53_PAD_EIM_EB3__GPIO2_31 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_EIM_EB3__UART3_RTS            (_MX53_PAD_EIM_EB3__UART3_RTS | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_EIM_EB3__UART3_RTS            (_MX53_PAD_EIM_EB3__UART3_RTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_EIM_EB3__UART1_RI             (_MX53_PAD_EIM_EB3__UART1_RI | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_EB3__IPU_DI1_PIN3         (_MX53_PAD_EIM_EB3__IPU_DI1_PIN3 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_EB3__IPU_CSI1_HSYNC               (_MX53_PAD_EIM_EB3__IPU_CSI1_HSYNC | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_EB3__IPU_DI1_PIN16                (_MX53_PAD_EIM_EB3__IPU_DI1_PIN16 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D24__EMI_WEIM_D_24                (_MX53_PAD_EIM_D24__EMI_WEIM_D_24 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D24__GPIO3_24             (_MX53_PAD_EIM_D24__GPIO3_24 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_EIM_D24__UART3_TXD_MUX                (_MX53_PAD_EIM_D24__UART3_TXD_MUX | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_EIM_D24__UART3_TXD_MUX                (_MX53_PAD_EIM_D24__UART3_TXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_EIM_D24__ECSPI1_SS2           (_MX53_PAD_EIM_D24__ECSPI1_SS2 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D24__CSPI_SS2             (_MX53_PAD_EIM_D24__CSPI_SS2 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D24__AUDMUX_AUD5_RXFS             (_MX53_PAD_EIM_D24__AUDMUX_AUD5_RXFS | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D24__UART1_DTR            (_MX53_PAD_EIM_D24__UART1_DTR | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D25__EMI_WEIM_D_25                (_MX53_PAD_EIM_D25__EMI_WEIM_D_25 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D25__GPIO3_25             (_MX53_PAD_EIM_D25__GPIO3_25 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_EIM_D25__UART3_RXD_MUX                (_MX53_PAD_EIM_D25__UART3_RXD_MUX | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_EIM_D25__UART3_RXD_MUX                (_MX53_PAD_EIM_D25__UART3_RXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_EIM_D25__ECSPI1_SS3           (_MX53_PAD_EIM_D25__ECSPI1_SS3 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D25__CSPI_SS3             (_MX53_PAD_EIM_D25__CSPI_SS3 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D25__AUDMUX_AUD5_RXC              (_MX53_PAD_EIM_D25__AUDMUX_AUD5_RXC | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D25__UART1_DSR            (_MX53_PAD_EIM_D25__UART1_DSR | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D26__EMI_WEIM_D_26                (_MX53_PAD_EIM_D26__EMI_WEIM_D_26 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D26__GPIO3_26             (_MX53_PAD_EIM_D26__GPIO3_26 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_EIM_D26__UART2_TXD_MUX                (_MX53_PAD_EIM_D26__UART2_TXD_MUX | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_EIM_D26__UART2_TXD_MUX                (_MX53_PAD_EIM_D26__UART2_TXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_EIM_D26__FIRI_RXD             (_MX53_PAD_EIM_D26__FIRI_RXD | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D26__IPU_CSI0_D_1         (_MX53_PAD_EIM_D26__IPU_CSI0_D_1 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D26__IPU_DI1_PIN11                (_MX53_PAD_EIM_D26__IPU_DI1_PIN11 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D26__IPU_DISP1_DAT_22             (_MX53_PAD_EIM_D26__IPU_DISP1_DAT_22 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D27__EMI_WEIM_D_27                (_MX53_PAD_EIM_D27__EMI_WEIM_D_27 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D27__GPIO3_27             (_MX53_PAD_EIM_D27__GPIO3_27 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_EIM_D27__UART2_RXD_MUX                (_MX53_PAD_EIM_D27__UART2_RXD_MUX | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_EIM_D27__UART2_RXD_MUX                (_MX53_PAD_EIM_D27__UART2_RXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_EIM_D27__FIRI_TXD             (_MX53_PAD_EIM_D27__FIRI_TXD | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D27__IPU_CSI0_D_0         (_MX53_PAD_EIM_D27__IPU_CSI0_D_0 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D27__IPU_DI1_PIN13                (_MX53_PAD_EIM_D27__IPU_DI1_PIN13 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D27__IPU_DISP1_DAT_23             (_MX53_PAD_EIM_D27__IPU_DISP1_DAT_23 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D28__EMI_WEIM_D_28                (_MX53_PAD_EIM_D28__EMI_WEIM_D_28 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D28__GPIO3_28             (_MX53_PAD_EIM_D28__GPIO3_28 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_EIM_D28__UART2_CTS            (_MX53_PAD_EIM_D28__UART2_CTS | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_EIM_D28__UART2_CTS            (_MX53_PAD_EIM_D28__UART2_CTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_EIM_D28__IPU_DISPB0_SER_DIO           (_MX53_PAD_EIM_D28__IPU_DISPB0_SER_DIO | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D28__CSPI_MOSI            (_MX53_PAD_EIM_D28__CSPI_MOSI | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D28__I2C1_SDA             (_MX53_PAD_EIM_D28__I2C1_SDA | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D28__IPU_DI0_PIN13                (_MX53_PAD_EIM_D28__IPU_DI0_PIN13 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D29__EMI_WEIM_D_29                (_MX53_PAD_EIM_D29__EMI_WEIM_D_29 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D29__GPIO3_29             (_MX53_PAD_EIM_D29__GPIO3_29 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_EIM_D29__UART2_RTS            (_MX53_PAD_EIM_D29__UART2_RTS | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_EIM_D29__UART2_RTS            (_MX53_PAD_EIM_D29__UART2_RTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_EIM_D29__IPU_DISPB0_SER_RS            (_MX53_PAD_EIM_D29__IPU_DISPB0_SER_RS | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D29__CSPI_SS0             (_MX53_PAD_EIM_D29__CSPI_SS0 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D29__IPU_DI1_PIN15                (_MX53_PAD_EIM_D29__IPU_DI1_PIN15 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D29__IPU_DI0_PIN14                (_MX53_PAD_EIM_D29__IPU_DI0_PIN14 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D30__EMI_WEIM_D_30                (_MX53_PAD_EIM_D30__EMI_WEIM_D_30 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D30__GPIO3_30             (_MX53_PAD_EIM_D30__GPIO3_30 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_EIM_D30__UART3_CTS            (_MX53_PAD_EIM_D30__UART3_CTS | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_EIM_D30__UART3_CTS            (_MX53_PAD_EIM_D30__UART3_CTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_EIM_D30__IPU_CSI0_D_3         (_MX53_PAD_EIM_D30__IPU_CSI0_D_3 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D30__IPU_DI0_PIN11                (_MX53_PAD_EIM_D30__IPU_DI0_PIN11 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D30__IPU_DISP1_DAT_21             (_MX53_PAD_EIM_D30__IPU_DISP1_DAT_21 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D30__USBOH3_USBH2_OC              (_MX53_PAD_EIM_D30__USBOH3_USBH2_OC | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D31__EMI_WEIM_D_31                (_MX53_PAD_EIM_D31__EMI_WEIM_D_31 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D31__GPIO3_31             (_MX53_PAD_EIM_D31__GPIO3_31 | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_EIM_D31__UART3_RTS            (_MX53_PAD_EIM_D31__UART3_RTS | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_EIM_D31__UART3_RTS            (_MX53_PAD_EIM_D31__UART3_RTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_EIM_D31__IPU_CSI0_D_2         (_MX53_PAD_EIM_D31__IPU_CSI0_D_2 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D31__IPU_DI0_PIN12                (_MX53_PAD_EIM_D31__IPU_DI0_PIN12 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_EIM_D31__IPU_DISP1_DAT_20             (_MX53_PAD_EIM_D31__IPU_DISP1_DAT_20 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_PATA_RESET_B__PATA_PATA_RESET_B               (_MX53_PAD_PATA_RESET_B__PATA_PATA_RESET_B | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_PATA_RESET_B__GPIO7_4         (_MX53_PAD_PATA_RESET_B__GPIO7_4 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_PATA_RESET_B__ESDHC3_CMD              (_MX53_PAD_PATA_RESET_B__ESDHC3_CMD | MUX_PAD_CTRL(MX53_SDHC_PAD_CTRL))
-#define MX53_PAD_PATA_RESET_B__UART1_CTS               (_MX53_PAD_PATA_RESET_B__UART1_CTS | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_PATA_RESET_B__UART1_CTS               (_MX53_PAD_PATA_RESET_B__UART1_CTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_PATA_RESET_B__CAN2_TXCAN              (_MX53_PAD_PATA_RESET_B__CAN2_TXCAN | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_PATA_RESET_B__USBPHY1_DATAOUT_0               (_MX53_PAD_PATA_RESET_B__USBPHY1_DATAOUT_0 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_PATA_IORDY__PATA_IORDY                (_MX53_PAD_PATA_IORDY__PATA_IORDY | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_PATA_IORDY__GPIO7_5           (_MX53_PAD_PATA_IORDY__GPIO7_5 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_PATA_IORDY__ESDHC3_CLK                (_MX53_PAD_PATA_IORDY__ESDHC3_CLK | MUX_PAD_CTRL(MX53_SDHC_PAD_CTRL))
-#define MX53_PAD_PATA_IORDY__UART1_RTS         (_MX53_PAD_PATA_IORDY__UART1_RTS | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_PATA_IORDY__UART1_RTS         (_MX53_PAD_PATA_IORDY__UART1_RTS | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_PATA_IORDY__CAN2_RXCAN                (_MX53_PAD_PATA_IORDY__CAN2_RXCAN | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_PATA_IORDY__USBPHY1_DATAOUT_1         (_MX53_PAD_PATA_IORDY__USBPHY1_DATAOUT_1 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_PATA_DA_0__PATA_DA_0          (_MX53_PAD_PATA_DA_0__PATA_DA_0 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_GPIO_7__GPIO1_7               (_MX53_PAD_GPIO_7__GPIO1_7 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_GPIO_7__EPIT1_EPITO           (_MX53_PAD_GPIO_7__EPIT1_EPITO | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_GPIO_7__CAN1_TXCAN            (_MX53_PAD_GPIO_7__CAN1_TXCAN | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_GPIO_7__UART2_TXD_MUX         (_MX53_PAD_GPIO_7__UART2_TXD_MUX | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_GPIO_7__UART2_TXD_MUX         (_MX53_PAD_GPIO_7__UART2_TXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_GPIO_7__FIRI_RXD              (_MX53_PAD_GPIO_7__FIRI_RXD | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_GPIO_7__SPDIF_PLOCK           (_MX53_PAD_GPIO_7__SPDIF_PLOCK | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_GPIO_7__CCM_PLL2_BYP          (_MX53_PAD_GPIO_7__CCM_PLL2_BYP | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_GPIO_8__GPIO1_8               (_MX53_PAD_GPIO_8__GPIO1_8 | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_GPIO_8__EPIT2_EPITO           (_MX53_PAD_GPIO_8__EPIT2_EPITO | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_GPIO_8__CAN1_RXCAN            (_MX53_PAD_GPIO_8__CAN1_RXCAN | MUX_PAD_CTRL(NO_PAD_CTRL))
-#define MX53_PAD_GPIO_8__UART2_RXD_MUX         (_MX53_PAD_GPIO_8__UART2_RXD_MUX | MUX_PAD_CTRL(NO_PAD_CTRL))
+#define MX53_PAD_GPIO_8__UART2_RXD_MUX         (_MX53_PAD_GPIO_8__UART2_RXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
 #define MX53_PAD_GPIO_8__FIRI_TXD              (_MX53_PAD_GPIO_8__FIRI_TXD | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_GPIO_8__SPDIF_SRCLK           (_MX53_PAD_GPIO_8__SPDIF_SRCLK | MUX_PAD_CTRL(NO_PAD_CTRL))
 #define MX53_PAD_GPIO_8__CCM_PLL3_BYP          (_MX53_PAD_GPIO_8__CCM_PLL3_BYP | MUX_PAD_CTRL(NO_PAD_CTRL))
index c07d30210c576c222c711d8d6c974f1c53c9f4fc..6fa8a707b9a0347778a0513f05c953f16defd70f 100644 (file)
@@ -85,9 +85,6 @@
 #define GPIO_BOUT_0    (2 << GPIO_BOUT_SHIFT)
 #define GPIO_BOUT_1    (3 << GPIO_BOUT_SHIFT)
 
-/* 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)
@@ -98,7 +95,6 @@
 extern int 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);
 
 extern int __init imx_iomuxv1_init(void __iomem *base, int numports);
 
index 82620af1922f981b749bfcd59b872638e3dd81e2..ebbce33097a76f81cae8696758ac713091279f88 100644 (file)
@@ -66,7 +66,6 @@ typedef u64 iomux_v3_cfg_t;
 #define MUX_MODE_MASK          ((iomux_v3_cfg_t)0x1f << MUX_MODE_SHIFT)
 #define MUX_PAD_CTRL_SHIFT     41
 #define MUX_PAD_CTRL_MASK      ((iomux_v3_cfg_t)0x1ffff << MUX_PAD_CTRL_SHIFT)
-#define NO_PAD_CTRL            ((iomux_v3_cfg_t)1 << (MUX_PAD_CTRL_SHIFT + 16))
 #define MUX_SEL_INPUT_SHIFT    58
 #define MUX_SEL_INPUT_MASK     ((iomux_v3_cfg_t)0xf << MUX_SEL_INPUT_SHIFT)
 
@@ -85,6 +84,7 @@ typedef u64 iomux_v3_cfg_t;
  * Use to set PAD control
  */
 
+#define NO_PAD_CTRL                    (1 << 16)
 #define PAD_CTL_DVS                    (1 << 13)
 #define PAD_CTL_HYS                    (1 << 8)
 
diff --git a/arch/arm/plat-mxc/include/mach/iomux.h b/arch/arm/plat-mxc/include/mach/iomux.h
deleted file mode 100644 (file)
index 3d226d7..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2010 Uwe Kleine-Koenig, Pengutronix
- *
- * 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 __MACH_IOMUX_H__
-#define __MACH_IOMUX_H__
-
-/* This file will go away, please include mach/iomux-mx... directly */
-
-#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
-
-#endif /* __MACH_IOMUX_H__ */
index 9d2a1ef84de2104c873120dff2bf15be2a200b29..74cd093203e057aebe870be8b78a26ec79040c2e 100644 (file)
 /*
  * Memory regions and CS
  */
-#define MX53_CSD0_BASE_ADDR            0x90000000
-#define MX53_CSD1_BASE_ADDR            0xA0000000
-#define MX53_CS0_BASE_ADDR             0xB0000000
-#define MX53_CS1_BASE_ADDR             0xB8000000
-#define MX53_CS2_BASE_ADDR             0xC0000000
-#define MX53_CS3_BASE_ADDR             0xC8000000
-#define MX53_CS4_BASE_ADDR             0xCC000000
-#define MX53_CS5_BASE_ADDR             0xCE000000
+#define MX53_CSD0_BASE_ADDR            0x70000000
+#define MX53_CSD1_BASE_ADDR            0xB0000000
+#define MX53_CS0_BASE_ADDR             0xF0000000
+#define MX53_CS1_32MB_BASE_ADDR        0xF2000000
+#define MX53_CS1_64MB_BASE_ADDR                0xF4000000
+#define MX53_CS2_64MB_BASE_ADDR                0xF4000000
+#define MX53_CS2_96MB_BASE_ADDR                0xF6000000
+#define MX53_CS3_BASE_ADDR             0xF6000000
 
 #define MX53_IO_P2V(x)                 IMX_IO_P2V(x)
 #define MX53_IO_ADDRESS(x)             IOMEM(MX53_IO_P2V(x))
 #define MX53_INT_ESDHC2        2
 #define MX53_INT_ESDHC3        3
 #define MX53_INT_ESDHC4        4
-#define MX53_INT_RESV5 5
+#define MX53_INT_DAP   5
 #define MX53_INT_SDMA  6
 #define MX53_INT_IOMUX 7
 #define MX53_INT_NFC   8
 #define MX53_INT_UART1 31
 #define MX53_INT_UART2 32
 #define MX53_INT_UART3 33
-#define MX53_INT_RESV34        34
-#define MX53_INT_RESV35        35
+#define MX53_INT_RTC   34
+#define MX53_INT_PTP   35
 #define MX53_INT_ECSPI1        36
 #define MX53_INT_ECSPI2        37
 #define MX53_INT_CSPI  38
 #define MX53_INT_I2C1  62
 #define MX53_INT_I2C2  63
 #define MX53_INT_I2C3  64
-#define MX53_INT_RESV65        65
-#define MX53_INT_RESV66        66
+#define MX53_INT_MLB   65
+#define MX53_INT_ASRC  66
 #define MX53_INT_SPDIF 67
 #define MX53_INT_SIM_DAT       68
 #define MX53_INT_IIM   69
index 4ac53ce97c24f3526abcdd21df11a5998289b528..09879235a9f57430a034da6d12e111501a7118ae 100644 (file)
@@ -68,7 +68,7 @@
 extern unsigned int __mxc_cpu_type;
 #endif
 
-#ifdef CONFIG_ARCH_MX1
+#ifdef CONFIG_SOC_IMX1
 # ifdef mxc_cpu_type
 #  undef mxc_cpu_type
 #  define mxc_cpu_type __mxc_cpu_type
@@ -80,7 +80,7 @@ extern unsigned int __mxc_cpu_type;
 # define cpu_is_mx1()          (0)
 #endif
 
-#ifdef CONFIG_MACH_MX21
+#ifdef CONFIG_SOC_IMX21
 # ifdef mxc_cpu_type
 #  undef mxc_cpu_type
 #  define mxc_cpu_type __mxc_cpu_type
@@ -92,7 +92,7 @@ extern unsigned int __mxc_cpu_type;
 # define cpu_is_mx21()         (0)
 #endif
 
-#ifdef CONFIG_ARCH_MX25
+#ifdef CONFIG_SOC_IMX25
 # ifdef mxc_cpu_type
 #  undef mxc_cpu_type
 #  define mxc_cpu_type __mxc_cpu_type
@@ -104,7 +104,7 @@ extern unsigned int __mxc_cpu_type;
 # define cpu_is_mx25()         (0)
 #endif
 
-#ifdef CONFIG_MACH_MX27
+#ifdef CONFIG_SOC_IMX27
 # ifdef mxc_cpu_type
 #  undef mxc_cpu_type
 #  define mxc_cpu_type __mxc_cpu_type
index d61d5c74817cb3cce231db111eee134682750d28..10343d1f87e144542b1414f0b23e28519c5a2617 100644 (file)
 #ifndef __ASM_ARCH_MXC_TIMEX_H__
 #define __ASM_ARCH_MXC_TIMEX_H__
 
-#if defined CONFIG_ARCH_MX1
-#define CLOCK_TICK_RATE                16000000
-#elif defined CONFIG_ARCH_MX2
-#define CLOCK_TICK_RATE                13300000
-#elif defined CONFIG_ARCH_MX3
-#define CLOCK_TICK_RATE                16625000
-#elif defined CONFIG_ARCH_MX25
-#define CLOCK_TICK_RATE                16000000
-#elif defined CONFIG_ARCH_MX5
-#define CLOCK_TICK_RATE                8000000
-#endif
+/* Bogus value */
+#define CLOCK_TICK_RATE        12345678
 
 #endif                         /* __ASM_ARCH_MXC_TIMEX_H__ */
index 3238c10d4e022073de8fd340336378bcfb9186fc..1f73963bc13e916e895433ffd5e5d7687e9e333d 100644 (file)
@@ -157,7 +157,7 @@ EXPORT_SYMBOL(mxc_gpio_mode);
 static int imx_iomuxv1_setup_multiple(const int *list, unsigned count)
 {
        size_t i;
-       int ret;
+       int ret = 0;
 
        for (i = 0; i < count; ++i) {
                ret = mxc_gpio_mode(list[i]);
@@ -172,45 +172,13 @@ static int imx_iomuxv1_setup_multiple(const int *list, unsigned count)
 int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count,
                const char *label)
 {
-       size_t i;
        int ret;
 
-       for (i = 0; i < count; ++i) {
-               unsigned gpio = pin_list[i] & (GPIO_PIN_MASK | GPIO_PORT_MASK);
-
-               ret = gpio_request(gpio, label);
-               if (ret)
-                       goto err_gpio_request;
-       }
-
        ret = imx_iomuxv1_setup_multiple(pin_list, count);
-       if (ret)
-               goto err_setup;
-
-       return 0;
-
-err_setup:
-       BUG_ON(i != count);
-
-err_gpio_request:
-       mxc_gpio_release_multiple_pins(pin_list, i);
-
        return ret;
 }
 EXPORT_SYMBOL(mxc_gpio_setup_multiple_pins);
 
-void mxc_gpio_release_multiple_pins(const int *pin_list, int count)
-{
-       size_t i;
-
-       for (i = 0; i < count; ++i) {
-               unsigned gpio = pin_list[i] & (GPIO_PIN_MASK | GPIO_PORT_MASK);
-
-               gpio_free(gpio);
-       }
-}
-EXPORT_SYMBOL(mxc_gpio_release_multiple_pins);
-
 int __init imx_iomuxv1_init(void __iomem *base, int numports)
 {
        imx_iomuxv1_baseaddr = base;
index 7a61ef8f471a49fd3ac0b67540f949cf13eaaa43..761c3c940a68cf84aa65e0bbaebd64e999b9ff9c 100644 (file)
@@ -214,14 +214,14 @@ static int __devinit mxc_pwm_probe(struct platform_device *pdev)
                goto err_free_clk;
        }
 
-       r = request_mem_region(r->start, r->end - r->start + 1, pdev->name);
+       r = request_mem_region(r->start, resource_size(r), 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);
+       pwm->mmio_base = ioremap(r->start, resource_size(r));
        if (pwm->mmio_base == NULL) {
                dev_err(&pdev->dev, "failed to ioremap() registers\n");
                ret = -ENODEV;
@@ -236,7 +236,7 @@ static int __devinit mxc_pwm_probe(struct platform_device *pdev)
        return 0;
 
 err_free_mem:
-       release_mem_region(r->start, r->end - r->start + 1);
+       release_mem_region(r->start, resource_size(r));
 err_free_clk:
        clk_put(pwm->clk);
 err_free:
@@ -260,7 +260,7 @@ static int __devexit mxc_pwm_remove(struct platform_device *pdev)
        iounmap(pwm->mmio_base);
 
        r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       release_mem_region(r->start, r->end - r->start + 1);
+       release_mem_region(r->start, resource_size(r));
 
        clk_put(pwm->clk);
 
index 57f9395f87ceaddb2cbd522e6b27a4555af6140d..710f2e7da4cea973c619f8e871e2466f85b02041 100644 (file)
@@ -49,6 +49,8 @@
 
 void __iomem *tzic_base; /* Used as irq controller base in entry-macro.S */
 
+#define TZIC_NUM_IRQS 128
+
 #ifdef CONFIG_FIQ
 static int tzic_set_irq_fiq(unsigned int irq, unsigned int type)
 {
@@ -166,7 +168,7 @@ void __init tzic_init_irq(void __iomem *irqbase)
 
        /* all IRQ no FIQ Warning :: No selection */
 
-       for (i = 0; i < MXC_INTERNAL_IRQS; i++) {
+       for (i = 0; i < TZIC_NUM_IRQS; i++) {
                irq_set_chip_and_handler(i, &mxc_tzic_chip.base,
                                         handle_level_irq);
                set_irq_flags(i, IRQF_VALID);
index 49a4c75243fc2d2e396ab247946692ab9258e94a..6e6735f04ee3f66e90fa25c81a77351b9cbe42bd 100644 (file)
@@ -211,9 +211,6 @@ choice
        depends on ARCH_OMAP
        default OMAP_PM_NOOP
 
-config OMAP_PM_NONE
-       bool "No PM layer"
-
 config OMAP_PM_NOOP
        bool "No-op/debug PM layer"
 
index f7fed60801901b6aef9e3623c93ebc7a4807ddfe..a6cbb712da516d9bc7b11224ec9e8bd6c5a938ad 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/sched.h>
+#include <linux/clocksource.h>
 
 #include <asm/sched_clock.h>
 
 
 #include <plat/clock.h>
 
-
 /*
  * 32KHz clocksource ... always available, on pretty most chips except
  * OMAP 730 and 1510.  Other timers could be used as clocksources, with
  * higher resolution in free-running counter modes (e.g. 12 MHz xtal),
  * but systems won't necessarily want to spend resources that way.
  */
+static void __iomem *timer_32k_base;
 
 #define OMAP16XX_TIMER_32K_SYNCHRONIZED                0xfffbc410
 
-#include <linux/clocksource.h>
-
-/*
- * offset_32k holds the init time counter value. It is then subtracted
- * from every counter read to achieve a counter that counts time from the
- * kernel boot (needed for sched_clock()).
- */
-static u32 offset_32k __read_mostly;
-
-#ifdef CONFIG_ARCH_OMAP16XX
-static cycle_t notrace omap16xx_32k_read(struct clocksource *cs)
-{
-       return omap_readl(OMAP16XX_TIMER_32K_SYNCHRONIZED) - offset_32k;
-}
-#else
-#define omap16xx_32k_read      NULL
-#endif
-
-#ifdef CONFIG_SOC_OMAP2420
-static cycle_t notrace omap2420_32k_read(struct clocksource *cs)
-{
-       return omap_readl(OMAP2420_32KSYNCT_BASE + 0x10) - offset_32k;
-}
-#else
-#define omap2420_32k_read      NULL
-#endif
-
-#ifdef CONFIG_SOC_OMAP2430
-static cycle_t notrace omap2430_32k_read(struct clocksource *cs)
-{
-       return omap_readl(OMAP2430_32KSYNCT_BASE + 0x10) - offset_32k;
-}
-#else
-#define omap2430_32k_read      NULL
-#endif
-
-#ifdef CONFIG_ARCH_OMAP3
-static cycle_t notrace omap34xx_32k_read(struct clocksource *cs)
-{
-       return omap_readl(OMAP3430_32KSYNCT_BASE + 0x10) - offset_32k;
-}
-#else
-#define omap34xx_32k_read      NULL
-#endif
-
-#ifdef CONFIG_ARCH_OMAP4
-static cycle_t notrace omap44xx_32k_read(struct clocksource *cs)
-{
-       return omap_readl(OMAP4430_32KSYNCT_BASE + 0x10) - offset_32k;
-}
-#else
-#define omap44xx_32k_read      NULL
-#endif
-
-/*
- * Kernel assumes that sched_clock can be called early but may not have
- * things ready yet.
- */
-static cycle_t notrace omap_32k_read_dummy(struct clocksource *cs)
-{
-       return 0;
-}
-
-static struct clocksource clocksource_32k = {
-       .name           = "32k_counter",
-       .rating         = 250,
-       .read           = omap_32k_read_dummy,
-       .mask           = CLOCKSOURCE_MASK(32),
-       .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
-};
-
 /*
  * Returns current time from boot in nsecs. It's OK for this to wrap
  * around for now, as it's just a relative time stamp.
@@ -122,11 +52,11 @@ static DEFINE_CLOCK_DATA(cd);
 
 static inline unsigned long long notrace _omap_32k_sched_clock(void)
 {
-       u32 cyc = clocksource_32k.read(&clocksource_32k);
+       u32 cyc = timer_32k_base ? __raw_readl(timer_32k_base) : 0;
        return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, SC_MULT, SC_SHIFT);
 }
 
-#ifndef CONFIG_OMAP_MPU_TIMER
+#if defined(CONFIG_OMAP_32K_TIMER) && !defined(CONFIG_OMAP_MPU_TIMER)
 unsigned long long notrace sched_clock(void)
 {
        return _omap_32k_sched_clock();
@@ -140,7 +70,7 @@ unsigned long long notrace omap_32k_sched_clock(void)
 
 static void notrace omap_update_sched_clock(void)
 {
-       u32 cyc = clocksource_32k.read(&clocksource_32k);
+       u32 cyc = timer_32k_base ? __raw_readl(timer_32k_base) : 0;
        update_sched_clock(&cd, cyc, (u32)~0);
 }
 
@@ -153,6 +83,7 @@ static void notrace omap_update_sched_clock(void)
  */
 static struct timespec persistent_ts;
 static cycles_t cycles, last_cycles;
+static unsigned int persistent_mult, persistent_shift;
 void read_persistent_clock(struct timespec *ts)
 {
        unsigned long long nsecs;
@@ -160,11 +91,10 @@ void read_persistent_clock(struct timespec *ts)
        struct timespec *tsp = &persistent_ts;
 
        last_cycles = cycles;
-       cycles = clocksource_32k.read(&clocksource_32k);
+       cycles = timer_32k_base ? __raw_readl(timer_32k_base) : 0;
        delta = cycles - last_cycles;
 
-       nsecs = clocksource_cyc2ns(delta,
-                                  clocksource_32k.mult, clocksource_32k.shift);
+       nsecs = clocksource_cyc2ns(delta, persistent_mult, persistent_shift);
 
        timespec_add_ns(tsp, nsecs);
        *ts = *tsp;
@@ -176,29 +106,46 @@ int __init omap_init_clocksource_32k(void)
                        "%s: can't register clocksource!\n";
 
        if (cpu_is_omap16xx() || cpu_class_is_omap2()) {
+               u32 pbase;
+               unsigned long size = SZ_4K;
+               void __iomem *base;
                struct clk *sync_32k_ick;
 
-               if (cpu_is_omap16xx())
-                       clocksource_32k.read = omap16xx_32k_read;
-               else if (cpu_is_omap2420())
-                       clocksource_32k.read = omap2420_32k_read;
+               if (cpu_is_omap16xx()) {
+                       pbase = OMAP16XX_TIMER_32K_SYNCHRONIZED;
+                       size = SZ_1K;
+               } else if (cpu_is_omap2420())
+                       pbase = OMAP2420_32KSYNCT_BASE + 0x10;
                else if (cpu_is_omap2430())
-                       clocksource_32k.read = omap2430_32k_read;
+                       pbase = OMAP2430_32KSYNCT_BASE + 0x10;
                else if (cpu_is_omap34xx())
-                       clocksource_32k.read = omap34xx_32k_read;
+                       pbase = OMAP3430_32KSYNCT_BASE + 0x10;
                else if (cpu_is_omap44xx())
-                       clocksource_32k.read = omap44xx_32k_read;
+                       pbase = OMAP4430_32KSYNCT_BASE + 0x10;
                else
                        return -ENODEV;
 
+               /* For this to work we must have a static mapping in io.c for this area */
+               base = ioremap(pbase, size);
+               if (!base)
+                       return -ENODEV;
+
                sync_32k_ick = clk_get(NULL, "omap_32ksync_ick");
                if (!IS_ERR(sync_32k_ick))
                        clk_enable(sync_32k_ick);
 
-               offset_32k = clocksource_32k.read(&clocksource_32k);
+               timer_32k_base = base;
+
+               /*
+                * 120000 rough estimate from the calculations in
+                * __clocksource_updatefreq_scale.
+                */
+               clocks_calc_mult_shift(&persistent_mult, &persistent_shift,
+                               32768, NSEC_PER_SEC, 120000);
 
-               if (clocksource_register_hz(&clocksource_32k, 32768))
-                       printk(err, clocksource_32k.name);
+               if (clocksource_mmio_init(base, "32k_counter", 32768, 250, 32,
+                                         clocksource_mmio_readl_up))
+                       printk(err, "32k_counter");
 
                init_fixed_sched_clock(&cd, omap_update_sched_clock, 32,
                                       32768, SC_MULT, SC_SHIFT);
index ee9f6ebba29b8a5479353e9c56bc9f839d8e0183..8dfb8186b2c21515245f8229a8886a3f04759158 100644 (file)
 #include <plat/dmtimer.h>
 #include <mach/irqs.h>
 
-/* register offsets */
-#define _OMAP_TIMER_ID_OFFSET          0x00
-#define _OMAP_TIMER_OCP_CFG_OFFSET     0x10
-#define _OMAP_TIMER_SYS_STAT_OFFSET    0x14
-#define _OMAP_TIMER_STAT_OFFSET                0x18
-#define _OMAP_TIMER_INT_EN_OFFSET      0x1c
-#define _OMAP_TIMER_WAKEUP_EN_OFFSET   0x20
-#define _OMAP_TIMER_CTRL_OFFSET                0x24
-#define                OMAP_TIMER_CTRL_GPOCFG          (1 << 14)
-#define                OMAP_TIMER_CTRL_CAPTMODE        (1 << 13)
-#define                OMAP_TIMER_CTRL_PT              (1 << 12)
-#define                OMAP_TIMER_CTRL_TCM_LOWTOHIGH   (0x1 << 8)
-#define                OMAP_TIMER_CTRL_TCM_HIGHTOLOW   (0x2 << 8)
-#define                OMAP_TIMER_CTRL_TCM_BOTHEDGES   (0x3 << 8)
-#define                OMAP_TIMER_CTRL_SCPWM           (1 << 7)
-#define                OMAP_TIMER_CTRL_CE              (1 << 6) /* compare enable */
-#define                OMAP_TIMER_CTRL_PRE             (1 << 5) /* prescaler enable */
-#define                OMAP_TIMER_CTRL_PTV_SHIFT       2 /* prescaler value shift */
-#define                OMAP_TIMER_CTRL_POSTED          (1 << 2)
-#define                OMAP_TIMER_CTRL_AR              (1 << 1) /* auto-reload enable */
-#define                OMAP_TIMER_CTRL_ST              (1 << 0) /* start timer */
-#define _OMAP_TIMER_COUNTER_OFFSET     0x28
-#define _OMAP_TIMER_LOAD_OFFSET                0x2c
-#define _OMAP_TIMER_TRIGGER_OFFSET     0x30
-#define _OMAP_TIMER_WRITE_PEND_OFFSET  0x34
-#define                WP_NONE                 0       /* no write pending bit */
-#define                WP_TCLR                 (1 << 0)
-#define                WP_TCRR                 (1 << 1)
-#define                WP_TLDR                 (1 << 2)
-#define                WP_TTGR                 (1 << 3)
-#define                WP_TMAR                 (1 << 4)
-#define                WP_TPIR                 (1 << 5)
-#define                WP_TNIR                 (1 << 6)
-#define                WP_TCVR                 (1 << 7)
-#define                WP_TOCR                 (1 << 8)
-#define                WP_TOWR                 (1 << 9)
-#define _OMAP_TIMER_MATCH_OFFSET       0x38
-#define _OMAP_TIMER_CAPTURE_OFFSET     0x3c
-#define _OMAP_TIMER_IF_CTRL_OFFSET     0x40
-#define _OMAP_TIMER_CAPTURE2_OFFSET            0x44    /* TCAR2, 34xx only */
-#define _OMAP_TIMER_TICK_POS_OFFSET            0x48    /* TPIR, 34xx only */
-#define _OMAP_TIMER_TICK_NEG_OFFSET            0x4c    /* TNIR, 34xx only */
-#define _OMAP_TIMER_TICK_COUNT_OFFSET          0x50    /* TCVR, 34xx only */
-#define _OMAP_TIMER_TICK_INT_MASK_SET_OFFSET   0x54    /* TOCR, 34xx only */
-#define _OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET 0x58    /* TOWR, 34xx only */
-
-/* register offsets with the write pending bit encoded */
-#define        WPSHIFT                                 16
-
-#define OMAP_TIMER_ID_REG                      (_OMAP_TIMER_ID_OFFSET \
-                                                       | (WP_NONE << WPSHIFT))
-
-#define OMAP_TIMER_OCP_CFG_REG                 (_OMAP_TIMER_OCP_CFG_OFFSET \
-                                                       | (WP_NONE << WPSHIFT))
-
-#define OMAP_TIMER_SYS_STAT_REG                        (_OMAP_TIMER_SYS_STAT_OFFSET \
-                                                       | (WP_NONE << WPSHIFT))
-
-#define OMAP_TIMER_STAT_REG                    (_OMAP_TIMER_STAT_OFFSET \
-                                                       | (WP_NONE << WPSHIFT))
-
-#define OMAP_TIMER_INT_EN_REG                  (_OMAP_TIMER_INT_EN_OFFSET \
-                                                       | (WP_NONE << WPSHIFT))
-
-#define OMAP_TIMER_WAKEUP_EN_REG               (_OMAP_TIMER_WAKEUP_EN_OFFSET \
-                                                       | (WP_NONE << WPSHIFT))
-
-#define OMAP_TIMER_CTRL_REG                    (_OMAP_TIMER_CTRL_OFFSET \
-                                                       | (WP_TCLR << WPSHIFT))
-
-#define OMAP_TIMER_COUNTER_REG                 (_OMAP_TIMER_COUNTER_OFFSET \
-                                                       | (WP_TCRR << WPSHIFT))
-
-#define OMAP_TIMER_LOAD_REG                    (_OMAP_TIMER_LOAD_OFFSET \
-                                                       | (WP_TLDR << WPSHIFT))
-
-#define OMAP_TIMER_TRIGGER_REG                 (_OMAP_TIMER_TRIGGER_OFFSET \
-                                                       | (WP_TTGR << WPSHIFT))
-
-#define OMAP_TIMER_WRITE_PEND_REG              (_OMAP_TIMER_WRITE_PEND_OFFSET \
-                                                       | (WP_NONE << WPSHIFT))
-
-#define OMAP_TIMER_MATCH_REG                   (_OMAP_TIMER_MATCH_OFFSET \
-                                                       | (WP_TMAR << WPSHIFT))
-
-#define OMAP_TIMER_CAPTURE_REG                 (_OMAP_TIMER_CAPTURE_OFFSET \
-                                                       | (WP_NONE << WPSHIFT))
-
-#define OMAP_TIMER_IF_CTRL_REG                 (_OMAP_TIMER_IF_CTRL_OFFSET \
-                                                       | (WP_NONE << WPSHIFT))
-
-#define OMAP_TIMER_CAPTURE2_REG                        (_OMAP_TIMER_CAPTURE2_OFFSET \
-                                                       | (WP_NONE << WPSHIFT))
-
-#define OMAP_TIMER_TICK_POS_REG                        (_OMAP_TIMER_TICK_POS_OFFSET \
-                                                       | (WP_TPIR << WPSHIFT))
-
-#define OMAP_TIMER_TICK_NEG_REG                        (_OMAP_TIMER_TICK_NEG_OFFSET \
-                                                       | (WP_TNIR << WPSHIFT))
-
-#define OMAP_TIMER_TICK_COUNT_REG              (_OMAP_TIMER_TICK_COUNT_OFFSET \
-                                                       | (WP_TCVR << WPSHIFT))
-
-#define OMAP_TIMER_TICK_INT_MASK_SET_REG                               \
-               (_OMAP_TIMER_TICK_INT_MASK_SET_OFFSET | (WP_TOCR << WPSHIFT))
-
-#define OMAP_TIMER_TICK_INT_MASK_COUNT_REG                             \
-               (_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR << WPSHIFT))
-
-struct omap_dm_timer {
-       unsigned long phys_base;
-       int irq;
-#ifdef CONFIG_ARCH_OMAP2PLUS
-       struct clk *iclk, *fclk;
-#endif
-       void __iomem *io_base;
-       unsigned reserved:1;
-       unsigned enabled:1;
-       unsigned posted:1;
-};
-
 static int dm_timer_count;
 
 #ifdef CONFIG_ARCH_OMAP1
@@ -291,11 +170,7 @@ static spinlock_t dm_timer_lock;
  */
 static inline u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, u32 reg)
 {
-       if (timer->posted)
-               while (readl(timer->io_base + (OMAP_TIMER_WRITE_PEND_REG & 0xff))
-                               & (reg >> WPSHIFT))
-                       cpu_relax();
-       return readl(timer->io_base + (reg & 0xff));
+       return __omap_dm_timer_read(timer->io_base, reg, timer->posted);
 }
 
 /*
@@ -307,11 +182,7 @@ static inline u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, u32 reg)
 static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg,
                                                u32 value)
 {
-       if (timer->posted)
-               while (readl(timer->io_base + (OMAP_TIMER_WRITE_PEND_REG & 0xff))
-                               & (reg >> WPSHIFT))
-                       cpu_relax();
-       writel(value, timer->io_base + (reg & 0xff));
+       __omap_dm_timer_write(timer->io_base, reg, value, timer->posted);
 }
 
 static void omap_dm_timer_wait_for_reset(struct omap_dm_timer *timer)
@@ -330,7 +201,7 @@ static void omap_dm_timer_wait_for_reset(struct omap_dm_timer *timer)
 
 static void omap_dm_timer_reset(struct omap_dm_timer *timer)
 {
-       u32 l;
+       int autoidle = 0, wakeup = 0;
 
        if (!cpu_class_is_omap2() || timer != &dm_timers[0]) {
                omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06);
@@ -338,28 +209,21 @@ static void omap_dm_timer_reset(struct omap_dm_timer *timer)
        }
        omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ);
 
-       l = omap_dm_timer_read_reg(timer, OMAP_TIMER_OCP_CFG_REG);
-       l |= 0x02 << 3;  /* Set to smart-idle mode */
-       l |= 0x2 << 8;   /* Set clock activity to perserve f-clock on idle */
-
        /* Enable autoidle on OMAP2 / OMAP3 */
        if (cpu_is_omap24xx() || cpu_is_omap34xx())
-               l |= 0x1 << 0;
+               autoidle = 1;
 
        /*
         * Enable wake-up on OMAP2 CPUs.
         */
        if (cpu_class_is_omap2())
-               l |= 1 << 2;
-       omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, l);
+               wakeup = 1;
 
-       /* Match hardware reset default of posted mode */
-       omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG,
-                       OMAP_TIMER_CTRL_POSTED);
+       __omap_dm_timer_reset(timer->io_base, autoidle, wakeup);
        timer->posted = 1;
 }
 
-static void omap_dm_timer_prepare(struct omap_dm_timer *timer)
+void omap_dm_timer_prepare(struct omap_dm_timer *timer)
 {
        omap_dm_timer_enable(timer);
        omap_dm_timer_reset(timer);
@@ -531,25 +395,13 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_start);
 
 void omap_dm_timer_stop(struct omap_dm_timer *timer)
 {
-       u32 l;
+       unsigned long rate = 0;
 
-       l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
-       if (l & OMAP_TIMER_CTRL_ST) {
-               l &= ~0x1;
-               omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
 #ifdef CONFIG_ARCH_OMAP2PLUS
-               /* Readback to make sure write has completed */
-               omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
-                /*
-                 * Wait for functional clock period x 3.5 to make sure that
-                 * timer is stopped
-                 */
-               udelay(3500000 / clk_get_rate(timer->fclk) + 1);
+       rate = clk_get_rate(timer->fclk);
 #endif
-       }
-       /* Ack possibly pending interrupt */
-       omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG,
-                       OMAP_TIMER_INT_OVERFLOW);
+
+       __omap_dm_timer_stop(timer->io_base, timer->posted, rate);
 }
 EXPORT_SYMBOL_GPL(omap_dm_timer_stop);
 
@@ -572,22 +424,11 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_set_source);
 
 int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
 {
-       int ret = -EINVAL;
-
        if (source < 0 || source >= 3)
                return -EINVAL;
 
-       clk_disable(timer->fclk);
-       ret = clk_set_parent(timer->fclk, dm_source_clocks[source]);
-       clk_enable(timer->fclk);
-
-       /*
-        * When the functional clock disappears, too quick writes seem
-        * to cause an abort. XXX Is this still necessary?
-        */
-       __delay(300000);
-
-       return ret;
+       return __omap_dm_timer_set_source(timer->fclk,
+                                               dm_source_clocks[source]);
 }
 EXPORT_SYMBOL_GPL(omap_dm_timer_set_source);
 
@@ -625,8 +466,7 @@ void omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload,
        }
        l |= OMAP_TIMER_CTRL_ST;
 
-       omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, load);
-       omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
+       __omap_dm_timer_load_start(timer->io_base, l, load, timer->posted);
 }
 EXPORT_SYMBOL_GPL(omap_dm_timer_set_load_start);
 
@@ -679,8 +519,7 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_set_prescaler);
 void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer,
                                  unsigned int value)
 {
-       omap_dm_timer_write_reg(timer, OMAP_TIMER_INT_EN_REG, value);
-       omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, value);
+       __omap_dm_timer_int_enable(timer->io_base, value);
 }
 EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_enable);
 
@@ -696,17 +535,13 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_read_status);
 
 void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value)
 {
-       omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, value);
+       __omap_dm_timer_write_status(timer->io_base, value);
 }
 EXPORT_SYMBOL_GPL(omap_dm_timer_write_status);
 
 unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer)
 {
-       unsigned int l;
-
-       l = omap_dm_timer_read_reg(timer, OMAP_TIMER_COUNTER_REG);
-
-       return l;
+       return __omap_dm_timer_read_counter(timer->io_base, timer->posted);
 }
 EXPORT_SYMBOL_GPL(omap_dm_timer_read_counter);
 
@@ -737,7 +572,7 @@ int omap_dm_timers_active(void)
 }
 EXPORT_SYMBOL_GPL(omap_dm_timers_active);
 
-int __init omap_dm_timer_init(void)
+static int __init omap_dm_timer_init(void)
 {
        struct omap_dm_timer *timer;
        int i, map_size = SZ_8K;        /* Module 4KB + L4 4KB except on omap1 */
@@ -790,8 +625,16 @@ int __init omap_dm_timer_init(void)
                        sprintf(clk_name, "gpt%d_fck", i + 1);
                        timer->fclk = clk_get(NULL, clk_name);
                }
+
+               /* One or two timers may be set up early for sys_timer */
+               if (sys_timer_reserved & (1  << i)) {
+                       timer->reserved = 1;
+                       timer->posted = 1;
+               }
 #endif
        }
 
        return 0;
 }
+
+arch_initcall(omap_dm_timer_init);
index 006e599c66136bb82fcde63654b87ad34a829510..f57e0649ab3082903964485a4843b60c8548f882 100644 (file)
@@ -152,7 +152,7 @@ struct dpll_data {
        u16                     max_multiplier;
        u8                      last_rounded_n;
        u8                      min_divider;
-       u                     max_divider;
+       u16                     max_divider;
        u8                      modes;
 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
        void __iomem            *autoidle_reg;
index 5288130be96e9b4cb95ff6b14ce6b8ad171e5558..4564cc697d7ff867726ec7ccb636a958d0bd9794 100644 (file)
 struct sys_timer;
 
 extern void omap_map_common_io(void);
-extern struct sys_timer omap_timer;
+extern struct sys_timer omap1_timer;
+extern struct sys_timer omap2_timer;
+extern struct sys_timer omap3_timer;
+extern struct sys_timer omap3_secure_timer;
+extern struct sys_timer omap4_timer;
 extern bool omap_32k_timer_init(void);
 extern int __init omap_init_clocksource_32k(void);
 extern unsigned long long notrace omap_32k_sched_clock(void);
index d6c70d2f4030d99fdd543dc10be5aeaeb5992e29..eb5d16c60cd9343589461d50465a6e8d5fee38e1 100644 (file)
  * 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <linux/clk.h>
+#include <linux/delay.h>
+#include <linux/io.h>
+
 #ifndef __ASM_ARCH_DMTIMER_H
 #define __ASM_ARCH_DMTIMER_H
 
  */
 #define OMAP_TIMER_IP_VERSION_1                        0x1
 struct omap_dm_timer;
-extern struct omap_dm_timer *gptimer_wakeup;
-extern struct sys_timer omap_timer;
 struct clk;
 
-int omap_dm_timer_init(void);
-
 struct omap_dm_timer *omap_dm_timer_request(void);
 struct omap_dm_timer *omap_dm_timer_request_specific(int timer_id);
 void omap_dm_timer_free(struct omap_dm_timer *timer);
@@ -93,5 +93,248 @@ void omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value
 
 int omap_dm_timers_active(void);
 
+/*
+ * Do not use the defines below, they are not needed. They should be only
+ * used by dmtimer.c and sys_timer related code.
+ */
+
+/* register offsets */
+#define _OMAP_TIMER_ID_OFFSET          0x00
+#define _OMAP_TIMER_OCP_CFG_OFFSET     0x10
+#define _OMAP_TIMER_SYS_STAT_OFFSET    0x14
+#define _OMAP_TIMER_STAT_OFFSET                0x18
+#define _OMAP_TIMER_INT_EN_OFFSET      0x1c
+#define _OMAP_TIMER_WAKEUP_EN_OFFSET   0x20
+#define _OMAP_TIMER_CTRL_OFFSET                0x24
+#define                OMAP_TIMER_CTRL_GPOCFG          (1 << 14)
+#define                OMAP_TIMER_CTRL_CAPTMODE        (1 << 13)
+#define                OMAP_TIMER_CTRL_PT              (1 << 12)
+#define                OMAP_TIMER_CTRL_TCM_LOWTOHIGH   (0x1 << 8)
+#define                OMAP_TIMER_CTRL_TCM_HIGHTOLOW   (0x2 << 8)
+#define                OMAP_TIMER_CTRL_TCM_BOTHEDGES   (0x3 << 8)
+#define                OMAP_TIMER_CTRL_SCPWM           (1 << 7)
+#define                OMAP_TIMER_CTRL_CE              (1 << 6) /* compare enable */
+#define                OMAP_TIMER_CTRL_PRE             (1 << 5) /* prescaler enable */
+#define                OMAP_TIMER_CTRL_PTV_SHIFT       2 /* prescaler value shift */
+#define                OMAP_TIMER_CTRL_POSTED          (1 << 2)
+#define                OMAP_TIMER_CTRL_AR              (1 << 1) /* auto-reload enable */
+#define                OMAP_TIMER_CTRL_ST              (1 << 0) /* start timer */
+#define _OMAP_TIMER_COUNTER_OFFSET     0x28
+#define _OMAP_TIMER_LOAD_OFFSET                0x2c
+#define _OMAP_TIMER_TRIGGER_OFFSET     0x30
+#define _OMAP_TIMER_WRITE_PEND_OFFSET  0x34
+#define                WP_NONE                 0       /* no write pending bit */
+#define                WP_TCLR                 (1 << 0)
+#define                WP_TCRR                 (1 << 1)
+#define                WP_TLDR                 (1 << 2)
+#define                WP_TTGR                 (1 << 3)
+#define                WP_TMAR                 (1 << 4)
+#define                WP_TPIR                 (1 << 5)
+#define                WP_TNIR                 (1 << 6)
+#define                WP_TCVR                 (1 << 7)
+#define                WP_TOCR                 (1 << 8)
+#define                WP_TOWR                 (1 << 9)
+#define _OMAP_TIMER_MATCH_OFFSET       0x38
+#define _OMAP_TIMER_CAPTURE_OFFSET     0x3c
+#define _OMAP_TIMER_IF_CTRL_OFFSET     0x40
+#define _OMAP_TIMER_CAPTURE2_OFFSET            0x44    /* TCAR2, 34xx only */
+#define _OMAP_TIMER_TICK_POS_OFFSET            0x48    /* TPIR, 34xx only */
+#define _OMAP_TIMER_TICK_NEG_OFFSET            0x4c    /* TNIR, 34xx only */
+#define _OMAP_TIMER_TICK_COUNT_OFFSET          0x50    /* TCVR, 34xx only */
+#define _OMAP_TIMER_TICK_INT_MASK_SET_OFFSET   0x54    /* TOCR, 34xx only */
+#define _OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET 0x58    /* TOWR, 34xx only */
+
+/* register offsets with the write pending bit encoded */
+#define        WPSHIFT                                 16
+
+#define OMAP_TIMER_ID_REG                      (_OMAP_TIMER_ID_OFFSET \
+                                                       | (WP_NONE << WPSHIFT))
+
+#define OMAP_TIMER_OCP_CFG_REG                 (_OMAP_TIMER_OCP_CFG_OFFSET \
+                                                       | (WP_NONE << WPSHIFT))
+
+#define OMAP_TIMER_SYS_STAT_REG                        (_OMAP_TIMER_SYS_STAT_OFFSET \
+                                                       | (WP_NONE << WPSHIFT))
+
+#define OMAP_TIMER_STAT_REG                    (_OMAP_TIMER_STAT_OFFSET \
+                                                       | (WP_NONE << WPSHIFT))
+
+#define OMAP_TIMER_INT_EN_REG                  (_OMAP_TIMER_INT_EN_OFFSET \
+                                                       | (WP_NONE << WPSHIFT))
+
+#define OMAP_TIMER_WAKEUP_EN_REG               (_OMAP_TIMER_WAKEUP_EN_OFFSET \
+                                                       | (WP_NONE << WPSHIFT))
+
+#define OMAP_TIMER_CTRL_REG                    (_OMAP_TIMER_CTRL_OFFSET \
+                                                       | (WP_TCLR << WPSHIFT))
+
+#define OMAP_TIMER_COUNTER_REG                 (_OMAP_TIMER_COUNTER_OFFSET \
+                                                       | (WP_TCRR << WPSHIFT))
+
+#define OMAP_TIMER_LOAD_REG                    (_OMAP_TIMER_LOAD_OFFSET \
+                                                       | (WP_TLDR << WPSHIFT))
+
+#define OMAP_TIMER_TRIGGER_REG                 (_OMAP_TIMER_TRIGGER_OFFSET \
+                                                       | (WP_TTGR << WPSHIFT))
+
+#define OMAP_TIMER_WRITE_PEND_REG              (_OMAP_TIMER_WRITE_PEND_OFFSET \
+                                                       | (WP_NONE << WPSHIFT))
+
+#define OMAP_TIMER_MATCH_REG                   (_OMAP_TIMER_MATCH_OFFSET \
+                                                       | (WP_TMAR << WPSHIFT))
+
+#define OMAP_TIMER_CAPTURE_REG                 (_OMAP_TIMER_CAPTURE_OFFSET \
+                                                       | (WP_NONE << WPSHIFT))
+
+#define OMAP_TIMER_IF_CTRL_REG                 (_OMAP_TIMER_IF_CTRL_OFFSET \
+                                                       | (WP_NONE << WPSHIFT))
+
+#define OMAP_TIMER_CAPTURE2_REG                        (_OMAP_TIMER_CAPTURE2_OFFSET \
+                                                       | (WP_NONE << WPSHIFT))
+
+#define OMAP_TIMER_TICK_POS_REG                        (_OMAP_TIMER_TICK_POS_OFFSET \
+                                                       | (WP_TPIR << WPSHIFT))
+
+#define OMAP_TIMER_TICK_NEG_REG                        (_OMAP_TIMER_TICK_NEG_OFFSET \
+                                                       | (WP_TNIR << WPSHIFT))
+
+#define OMAP_TIMER_TICK_COUNT_REG              (_OMAP_TIMER_TICK_COUNT_OFFSET \
+                                                       | (WP_TCVR << WPSHIFT))
+
+#define OMAP_TIMER_TICK_INT_MASK_SET_REG                               \
+               (_OMAP_TIMER_TICK_INT_MASK_SET_OFFSET | (WP_TOCR << WPSHIFT))
+
+#define OMAP_TIMER_TICK_INT_MASK_COUNT_REG                             \
+               (_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR << WPSHIFT))
+
+struct omap_dm_timer {
+       unsigned long phys_base;
+       int irq;
+#ifdef CONFIG_ARCH_OMAP2PLUS
+       struct clk *iclk, *fclk;
+#endif
+       void __iomem *io_base;
+       unsigned long rate;
+       unsigned reserved:1;
+       unsigned enabled:1;
+       unsigned posted:1;
+};
+
+extern u32 sys_timer_reserved;
+void omap_dm_timer_prepare(struct omap_dm_timer *timer);
+
+static inline u32 __omap_dm_timer_read(void __iomem *base, u32 reg,
+                                               int posted)
+{
+       if (posted)
+               while (__raw_readl(base + (OMAP_TIMER_WRITE_PEND_REG & 0xff))
+                               & (reg >> WPSHIFT))
+                       cpu_relax();
+
+       return __raw_readl(base + (reg & 0xff));
+}
+
+static inline void __omap_dm_timer_write(void __iomem *base, u32 reg, u32 val,
+                                               int posted)
+{
+       if (posted)
+               while (__raw_readl(base + (OMAP_TIMER_WRITE_PEND_REG & 0xff))
+                               & (reg >> WPSHIFT))
+                       cpu_relax();
+
+       __raw_writel(val, base + (reg & 0xff));
+}
+
+/* Assumes the source clock has been set by caller */
+static inline void __omap_dm_timer_reset(void __iomem *base, int autoidle,
+                                               int wakeup)
+{
+       u32 l;
+
+       l = __omap_dm_timer_read(base, OMAP_TIMER_OCP_CFG_REG, 0);
+       l |= 0x02 << 3;  /* Set to smart-idle mode */
+       l |= 0x2 << 8;   /* Set clock activity to perserve f-clock on idle */
+
+       if (autoidle)
+               l |= 0x1 << 0;
+
+       if (wakeup)
+               l |= 1 << 2;
+
+       __omap_dm_timer_write(base, OMAP_TIMER_OCP_CFG_REG, l, 0);
+
+       /* Match hardware reset default of posted mode */
+       __omap_dm_timer_write(base, OMAP_TIMER_IF_CTRL_REG,
+                                       OMAP_TIMER_CTRL_POSTED, 0);
+}
+
+static inline int __omap_dm_timer_set_source(struct clk *timer_fck,
+                                               struct clk *parent)
+{
+       int ret;
+
+       clk_disable(timer_fck);
+       ret = clk_set_parent(timer_fck, parent);
+       clk_enable(timer_fck);
+
+       /*
+        * When the functional clock disappears, too quick writes seem
+        * to cause an abort. XXX Is this still necessary?
+        */
+       __delay(300000);
+
+       return ret;
+}
+
+static inline void __omap_dm_timer_stop(void __iomem *base, int posted,
+                                               unsigned long rate)
+{
+       u32 l;
+
+       l = __omap_dm_timer_read(base, OMAP_TIMER_CTRL_REG, posted);
+       if (l & OMAP_TIMER_CTRL_ST) {
+               l &= ~0x1;
+               __omap_dm_timer_write(base, OMAP_TIMER_CTRL_REG, l, posted);
+#ifdef CONFIG_ARCH_OMAP2PLUS
+               /* Readback to make sure write has completed */
+               __omap_dm_timer_read(base, OMAP_TIMER_CTRL_REG, posted);
+               /*
+                * Wait for functional clock period x 3.5 to make sure that
+                * timer is stopped
+                */
+               udelay(3500000 / rate + 1);
+#endif
+       }
+
+       /* Ack possibly pending interrupt */
+       __omap_dm_timer_write(base, OMAP_TIMER_STAT_REG,
+                                       OMAP_TIMER_INT_OVERFLOW, 0);
+}
+
+static inline void __omap_dm_timer_load_start(void __iomem *base, u32 ctrl,
+                                               unsigned int load, int posted)
+{
+       __omap_dm_timer_write(base, OMAP_TIMER_COUNTER_REG, load, posted);
+       __omap_dm_timer_write(base, OMAP_TIMER_CTRL_REG, ctrl, posted);
+}
+
+static inline void __omap_dm_timer_int_enable(void __iomem *base,
+                                               unsigned int value)
+{
+       __omap_dm_timer_write(base, OMAP_TIMER_INT_EN_REG, value, 0);
+       __omap_dm_timer_write(base, OMAP_TIMER_WAKEUP_EN_REG, value, 0);
+}
+
+static inline unsigned int __omap_dm_timer_read_counter(void __iomem *base,
+                                                       int posted)
+{
+       return __omap_dm_timer_read(base, OMAP_TIMER_COUNTER_REG, posted);
+}
+
+static inline void __omap_dm_timer_write_status(void __iomem *base,
+                                               unsigned int value)
+{
+       __omap_dm_timer_write(base, OMAP_TIMER_STAT_REG, value, 0);
+}
 
 #endif /* __ASM_ARCH_DMTIMER_H */
index 5a25098ea7ea8ed3b8d30fcd3f1518dfa66db7f7..c88432005665418b1897559461862d7c17fc4d8f 100644 (file)
 #define INTCPS_NR_IRQS         96
 
 #ifndef __ASSEMBLY__
-extern void omap_init_irq(void);
+extern void __iomem *omap_irq_base;
+void omap1_init_irq(void);
+void omap2_init_irq(void);
+void omap3_init_irq(void);
+void ti816x_init_irq(void);
 extern int omap_irq_pending(void);
 void omap_intc_save_context(void);
 void omap_intc_restore_context(void);
index f8f690ab2997602d2da31286409ea627a51cabed..9882c657b2d4f80b3e85cb36f64082311612d3e0 100644 (file)
@@ -24,7 +24,6 @@
 #ifndef __ASM_ARCH_OMAP_MCBSP_H
 #define __ASM_ARCH_OMAP_MCBSP_H
 
-#include <linux/completion.h>
 #include <linux/spinlock.h>
 
 #include <mach/hardware.h>
@@ -34,7 +33,7 @@
 #define OMAP_MCBSP_PLATFORM_DEVICE(port_nr)            \
 static struct platform_device omap_mcbsp##port_nr = {  \
        .name   = "omap-mcbsp-dai",                     \
-       .id     = OMAP_MCBSP##port_nr,                  \
+       .id     = port_nr - 1,                  \
 }
 
 #define MCBSP_CONFIG_TYPE2     0x2
@@ -332,18 +331,6 @@ struct omap_mcbsp_reg_cfg {
        u16 rccr;
 };
 
-typedef enum {
-       OMAP_MCBSP1 = 0,
-       OMAP_MCBSP2,
-       OMAP_MCBSP3,
-       OMAP_MCBSP4,
-       OMAP_MCBSP5
-} omap_mcbsp_id;
-
-typedef int __bitwise omap_mcbsp_io_type_t;
-#define OMAP_MCBSP_IRQ_IO ((__force omap_mcbsp_io_type_t) 1)
-#define OMAP_MCBSP_POLL_IO ((__force omap_mcbsp_io_type_t) 2)
-
 typedef enum {
        OMAP_MCBSP_WORD_8 = 0,
        OMAP_MCBSP_WORD_12,
@@ -353,38 +340,6 @@ typedef enum {
        OMAP_MCBSP_WORD_32,
 } omap_mcbsp_word_length;
 
-typedef enum {
-       OMAP_MCBSP_CLK_RISING = 0,
-       OMAP_MCBSP_CLK_FALLING,
-} omap_mcbsp_clk_polarity;
-
-typedef enum {
-       OMAP_MCBSP_FS_ACTIVE_HIGH = 0,
-       OMAP_MCBSP_FS_ACTIVE_LOW,
-} omap_mcbsp_fs_polarity;
-
-typedef enum {
-       OMAP_MCBSP_CLK_STP_MODE_NO_DELAY = 0,
-       OMAP_MCBSP_CLK_STP_MODE_DELAY,
-} omap_mcbsp_clk_stp_mode;
-
-
-/******* SPI specific mode **********/
-typedef enum {
-       OMAP_MCBSP_SPI_MASTER = 0,
-       OMAP_MCBSP_SPI_SLAVE,
-} omap_mcbsp_spi_mode;
-
-struct omap_mcbsp_spi_cfg {
-       omap_mcbsp_spi_mode             spi_mode;
-       omap_mcbsp_clk_polarity         rx_clock_polarity;
-       omap_mcbsp_clk_polarity         tx_clock_polarity;
-       omap_mcbsp_fs_polarity          fsx_polarity;
-       u8                              clk_div;
-       omap_mcbsp_clk_stp_mode         clk_stp_mode;
-       omap_mcbsp_word_length          word_length;
-};
-
 /* Platform specific configuration */
 struct omap_mcbsp_ops {
        void (*request)(unsigned int);
@@ -422,25 +377,13 @@ struct omap_mcbsp {
        void __iomem *io_base;
        u8 id;
        u8 free;
-       omap_mcbsp_word_length rx_word_length;
-       omap_mcbsp_word_length tx_word_length;
 
-       omap_mcbsp_io_type_t io_type; /* IRQ or poll */
-       /* IRQ based TX/RX */
        int rx_irq;
        int tx_irq;
 
        /* DMA stuff */
        u8 dma_rx_sync;
-       short dma_rx_lch;
        u8 dma_tx_sync;
-       short dma_tx_lch;
-
-       /* Completion queues */
-       struct completion tx_irq_completion;
-       struct completion rx_irq_completion;
-       struct completion tx_dma_completion;
-       struct completion rx_dma_completion;
 
        /* Protect the field .free, while checking if the mcbsp is in use */
        spinlock_t lock;
@@ -499,24 +442,9 @@ int omap_mcbsp_request(unsigned int id);
 void omap_mcbsp_free(unsigned int id);
 void omap_mcbsp_start(unsigned int id, int tx, int rx);
 void omap_mcbsp_stop(unsigned int id, int tx, int rx);
-void omap_mcbsp_xmit_word(unsigned int id, u32 word);
-u32 omap_mcbsp_recv_word(unsigned int id);
-
-int omap_mcbsp_xmit_buffer(unsigned int id, dma_addr_t buffer, unsigned int length);
-int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer, unsigned int length);
-int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word);
-int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 * word);
-
 
 /* McBSP functional clock source changing function */
 extern int omap2_mcbsp_set_clks_src(u8 id, u8 fck_src_id);
-/* SPI specific API */
-void omap_mcbsp_set_spi_mode(unsigned int id, const struct omap_mcbsp_spi_cfg * spi_cfg);
-
-/* Polled read/write functions */
-int omap_mcbsp_pollread(unsigned int id, u16 * buf);
-int omap_mcbsp_pollwrite(unsigned int id, u16 buf);
-int omap_mcbsp_set_io_type(unsigned int id, omap_mcbsp_io_type_t io_type);
 
 /* McBSP signal muxing API */
 void omap2_mcbsp1_mux_clkr_src(u8 mux);
index d86d1ecf0068a70c0aff69410f7498cb5ee85c64..67fc5060183ea28f137f20862863e62cb99ccf74 100644 (file)
@@ -19,15 +19,11 @@ enum nand_io {
 };
 
 struct omap_nand_platform_data {
-       unsigned int            options;
        int                     cs;
-       int                     gpio_irq;
        struct mtd_partition    *parts;
        struct gpmc_timings     *gpmc_t;
        int                     nr_parts;
-       int                     (*nand_setup)(void);
-       int                     (*dev_ready)(struct omap_nand_platform_data *);
-       int                     dma_channel;
+       bool                    dev_ready;
        int                     gpmc_irq;
        enum nand_io            xfer_type;
        unsigned long           phys_base;
index c0a752053039a5387b34807954b924fe330b64f7..0840df813f4f15f4e5b0ecc1cfcd0b53269f0549 100644 (file)
  * framework starts.  The "_if_" is to avoid name collisions with the
  * PM idle-loop code.
  */
-#ifdef CONFIG_OMAP_PM_NONE
-#define omap_pm_if_early_init() 0
-#else
 int __init omap_pm_if_early_init(void);
-#endif
 
 /**
  * omap_pm_if_init - OMAP PM init code called after clock fw init
@@ -52,11 +48,7 @@ int __init omap_pm_if_early_init(void);
  * The main initialization code.  OPP tables are passed in here.  The
  * "_if_" is to avoid name collisions with the PM idle-loop code.
  */
-#ifdef CONFIG_OMAP_PM_NONE
-#define omap_pm_if_init() 0
-#else
 int __init omap_pm_if_init(void);
-#endif
 
 /**
  * omap_pm_if_exit - OMAP PM exit code
index 1adea9c629849151dbe01788b9ddcb23f446abd0..ce06ac6a9709e8ec6fb6e012c4f4f39cc011dc53 100644 (file)
@@ -77,7 +77,6 @@ extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type2;
 #define HWMOD_IDLEMODE_FORCE           (1 << 0)
 #define HWMOD_IDLEMODE_NO              (1 << 1)
 #define HWMOD_IDLEMODE_SMART           (1 << 2)
-/* Slave idle mode flag only */
 #define HWMOD_IDLEMODE_SMART_WKUP      (1 << 3)
 
 /**
@@ -98,7 +97,7 @@ struct omap_hwmod_mux_info {
 /**
  * struct omap_hwmod_irq_info - MPU IRQs used by the hwmod
  * @name: name of the IRQ channel (module local name)
- * @irq_ch: IRQ channel ID
+ * @irq: IRQ channel ID (should be non-negative except -1 = terminator)
  *
  * @name should be something short, e.g., "tx" or "rx".  It is for use
  * by platform_get_resource_byname().  It is defined locally to the
@@ -106,13 +105,13 @@ struct omap_hwmod_mux_info {
  */
 struct omap_hwmod_irq_info {
        const char      *name;
-       u16             irq;
+       s16             irq;
 };
 
 /**
  * struct omap_hwmod_dma_info - DMA channels used by the hwmod
  * @name: name of the DMA channel (module local name)
- * @dma_req: DMA request ID
+ * @dma_req: DMA request ID (should be non-negative except -1 = terminator)
  *
  * @name should be something short, e.g., "tx" or "rx".  It is for use
  * by platform_get_resource_byname().  It is defined locally to the
@@ -120,7 +119,7 @@ struct omap_hwmod_irq_info {
  */
 struct omap_hwmod_dma_info {
        const char      *name;
-       u16             dma_req;
+       s16             dma_req;
 };
 
 /**
@@ -220,7 +219,6 @@ struct omap_hwmod_addr_space {
  * @clk: interface clock: OMAP clock name
  * @_clk: pointer to the interface struct clk (filled in at runtime)
  * @fw: interface firewall data
- * @addr_cnt: ARRAY_SIZE(@addr)
  * @width: OCP data width
  * @user: initiators using this interface (see OCP_USER_* macros above)
  * @flags: OCP interface flags (see OCPIF_* macros above)
@@ -239,7 +237,6 @@ struct omap_hwmod_ocp_if {
        union {
                struct omap_hwmod_omap2_firewall omap2;
        }                               fw;
-       u8                              addr_cnt;
        u8                              width;
        u8                              user;
        u8                              flags;
@@ -258,6 +255,7 @@ struct omap_hwmod_ocp_if {
 #define MSTANDBY_FORCE         (HWMOD_IDLEMODE_FORCE << MASTER_STANDBY_SHIFT)
 #define MSTANDBY_NO            (HWMOD_IDLEMODE_NO << MASTER_STANDBY_SHIFT)
 #define MSTANDBY_SMART         (HWMOD_IDLEMODE_SMART << MASTER_STANDBY_SHIFT)
+#define MSTANDBY_SMART_WKUP    (HWMOD_IDLEMODE_SMART_WKUP << MASTER_STANDBY_SHIFT)
 
 /* omap_hwmod_sysconfig.sysc_flags capability flags */
 #define SYSC_HAS_AUTOIDLE      (1 << 0)
@@ -468,8 +466,8 @@ struct omap_hwmod_class {
  * @name: name of the hwmod
  * @class: struct omap_hwmod_class * to the class of this hwmod
  * @od: struct omap_device currently associated with this hwmod (internal use)
- * @mpu_irqs: ptr to an array of MPU IRQs (see also mpu_irqs_cnt)
- * @sdma_reqs: ptr to an array of System DMA request IDs (see sdma_reqs_cnt)
+ * @mpu_irqs: ptr to an array of MPU IRQs
+ * @sdma_reqs: ptr to an array of System DMA request IDs
  * @prcm: PRCM data pertaining to this hwmod
  * @main_clk: main clock: OMAP clock name
  * @_clk: pointer to the main struct clk (filled in at runtime)
@@ -482,8 +480,6 @@ struct omap_hwmod_class {
  * @_sysc_cache: internal-use hwmod flags
  * @_mpu_rt_va: cached register target start address (internal use)
  * @_mpu_port_index: cached MPU register target slave ID (internal use)
- * @mpu_irqs_cnt: number of @mpu_irqs
- * @sdma_reqs_cnt: number of @sdma_reqs
  * @opt_clks_cnt: number of @opt_clks
  * @master_cnt: number of @master entries
  * @slaves_cnt: number of @slave entries
@@ -531,8 +527,6 @@ struct omap_hwmod {
        u16                             flags;
        u8                              _mpu_port_index;
        u8                              response_lat;
-       u8                              mpu_irqs_cnt;
-       u8                              sdma_reqs_cnt;
        u8                              rst_lines_cnt;
        u8                              opt_clks_cnt;
        u8                              masters_cnt;
index 5587acf0eb2c3ed35657572000b20ca1d0e4bbc3..3c1fbdc92468480a3781e65095e35cbe12154b67 100644 (file)
@@ -16,8 +16,6 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/platform_device.h>
-#include <linux/wait.h>
-#include <linux/completion.h>
 #include <linux/interrupt.h>
 #include <linux/err.h>
 #include <linux/clk.h>
@@ -25,7 +23,6 @@
 #include <linux/io.h>
 #include <linux/slab.h>
 
-#include <plat/dma.h>
 #include <plat/mcbsp.h>
 #include <plat/omap_device.h>
 #include <linux/pm_runtime.h>
@@ -136,8 +133,6 @@ static irqreturn_t omap_mcbsp_tx_irq_handler(int irq, void *dev_id)
                        irqst_spcr2);
                /* Writing zero to XSYNC_ERR clears the IRQ */
                MCBSP_WRITE(mcbsp_tx, SPCR2, MCBSP_READ_CACHE(mcbsp_tx, SPCR2));
-       } else {
-               complete(&mcbsp_tx->tx_irq_completion);
        }
 
        return IRQ_HANDLED;
@@ -156,41 +151,11 @@ static irqreturn_t omap_mcbsp_rx_irq_handler(int irq, void *dev_id)
                        irqst_spcr1);
                /* Writing zero to RSYNC_ERR clears the IRQ */
                MCBSP_WRITE(mcbsp_rx, SPCR1, MCBSP_READ_CACHE(mcbsp_rx, SPCR1));
-       } else {
-               complete(&mcbsp_rx->rx_irq_completion);
        }
 
        return IRQ_HANDLED;
 }
 
-static void omap_mcbsp_tx_dma_callback(int lch, u16 ch_status, void *data)
-{
-       struct omap_mcbsp *mcbsp_dma_tx = data;
-
-       dev_dbg(mcbsp_dma_tx->dev, "TX DMA callback : 0x%x\n",
-               MCBSP_READ(mcbsp_dma_tx, SPCR2));
-
-       /* We can free the channels */
-       omap_free_dma(mcbsp_dma_tx->dma_tx_lch);
-       mcbsp_dma_tx->dma_tx_lch = -1;
-
-       complete(&mcbsp_dma_tx->tx_dma_completion);
-}
-
-static void omap_mcbsp_rx_dma_callback(int lch, u16 ch_status, void *data)
-{
-       struct omap_mcbsp *mcbsp_dma_rx = data;
-
-       dev_dbg(mcbsp_dma_rx->dev, "RX DMA callback : 0x%x\n",
-               MCBSP_READ(mcbsp_dma_rx, SPCR2));
-
-       /* We can free the channels */
-       omap_free_dma(mcbsp_dma_rx->dma_rx_lch);
-       mcbsp_dma_rx->dma_rx_lch = -1;
-
-       complete(&mcbsp_dma_rx->rx_dma_completion);
-}
-
 /*
  * omap_mcbsp_config simply write a config to the
  * appropriate McBSP.
@@ -758,37 +723,6 @@ static inline void omap_st_start(struct omap_mcbsp *mcbsp) {}
 static inline void omap_st_stop(struct omap_mcbsp *mcbsp) {}
 #endif
 
-/*
- * We can choose between IRQ based or polled IO.
- * This needs to be called before omap_mcbsp_request().
- */
-int omap_mcbsp_set_io_type(unsigned int id, omap_mcbsp_io_type_t io_type)
-{
-       struct omap_mcbsp *mcbsp;
-
-       if (!omap_mcbsp_check_valid_id(id)) {
-               printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-               return -ENODEV;
-       }
-       mcbsp = id_to_mcbsp_ptr(id);
-
-       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 -EINVAL;
-       }
-
-       mcbsp->io_type = io_type;
-
-       spin_unlock(&mcbsp->lock);
-
-       return 0;
-}
-EXPORT_SYMBOL(omap_mcbsp_set_io_type);
-
 int omap_mcbsp_request(unsigned int id)
 {
        struct omap_mcbsp *mcbsp;
@@ -833,29 +767,24 @@ int omap_mcbsp_request(unsigned int id)
        MCBSP_WRITE(mcbsp, SPCR1, 0);
        MCBSP_WRITE(mcbsp, SPCR2, 0);
 
-       if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) {
-               /* We need to get IRQs here */
-               init_completion(&mcbsp->tx_irq_completion);
-               err = request_irq(mcbsp->tx_irq, omap_mcbsp_tx_irq_handler,
-                                       0, "McBSP", (void *)mcbsp);
+       err = request_irq(mcbsp->tx_irq, omap_mcbsp_tx_irq_handler,
+                               0, "McBSP", (void *)mcbsp);
+       if (err != 0) {
+               dev_err(mcbsp->dev, "Unable to request TX IRQ %d "
+                               "for McBSP%d\n", mcbsp->tx_irq,
+                               mcbsp->id);
+               goto err_clk_disable;
+       }
+
+       if (mcbsp->rx_irq) {
+               err = request_irq(mcbsp->rx_irq,
+                               omap_mcbsp_rx_irq_handler,
+                               0, "McBSP", (void *)mcbsp);
                if (err != 0) {
-                       dev_err(mcbsp->dev, "Unable to request TX IRQ %d "
-                                       "for McBSP%d\n", mcbsp->tx_irq,
+                       dev_err(mcbsp->dev, "Unable to request RX IRQ %d "
+                                       "for McBSP%d\n", mcbsp->rx_irq,
                                        mcbsp->id);
-                       goto err_clk_disable;
-               }
-
-               if (mcbsp->rx_irq) {
-                       init_completion(&mcbsp->rx_irq_completion);
-                       err = request_irq(mcbsp->rx_irq,
-                                       omap_mcbsp_rx_irq_handler,
-                                       0, "McBSP", (void *)mcbsp);
-                       if (err != 0) {
-                               dev_err(mcbsp->dev, "Unable to request RX IRQ %d "
-                                               "for McBSP%d\n", mcbsp->rx_irq,
-                                               mcbsp->id);
-                               goto err_free_irq;
-                       }
+                       goto err_free_irq;
                }
        }
 
@@ -901,12 +830,9 @@ void omap_mcbsp_free(unsigned int id)
 
        pm_runtime_put_sync(mcbsp->dev);
 
-       if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) {
-               /* Free IRQs */
-               if (mcbsp->rx_irq)
-                       free_irq(mcbsp->rx_irq, (void *)mcbsp);
-               free_irq(mcbsp->tx_irq, (void *)mcbsp);
-       }
+       if (mcbsp->rx_irq)
+               free_irq(mcbsp->rx_irq, (void *)mcbsp);
+       free_irq(mcbsp->tx_irq, (void *)mcbsp);
 
        reg_cache = mcbsp->reg_cache;
 
@@ -943,9 +869,6 @@ void omap_mcbsp_start(unsigned int id, int tx, int rx)
        if (cpu_is_omap34xx())
                omap_st_start(mcbsp);
 
-       mcbsp->rx_word_length = (MCBSP_READ_CACHE(mcbsp, RCR1) >> 5) & 0x7;
-       mcbsp->tx_word_length = (MCBSP_READ_CACHE(mcbsp, XCR1) >> 5) & 0x7;
-
        /* Only enable SRG, if McBSP is master */
        w = MCBSP_READ_CACHE(mcbsp, PCR0);
        if (w & (FSXM | FSRM | CLKXM | CLKRM))
@@ -1043,485 +966,6 @@ void omap_mcbsp_stop(unsigned int id, int tx, int rx)
 }
 EXPORT_SYMBOL(omap_mcbsp_stop);
 
-/* polled mcbsp i/o operations */
-int omap_mcbsp_pollwrite(unsigned int id, u16 buf)
-{
-       struct omap_mcbsp *mcbsp;
-
-       if (!omap_mcbsp_check_valid_id(id)) {
-               printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-               return -ENODEV;
-       }
-
-       mcbsp = id_to_mcbsp_ptr(id);
-
-       MCBSP_WRITE(mcbsp, DXR1, buf);
-       /* if frame sync error - clear the error */
-       if (MCBSP_READ(mcbsp, SPCR2) & XSYNC_ERR) {
-               /* clear error */
-               MCBSP_WRITE(mcbsp, SPCR2, MCBSP_READ_CACHE(mcbsp, SPCR2));
-               /* resend */
-               return -1;
-       } else {
-               /* wait for transmit confirmation */
-               int attemps = 0;
-               while (!(MCBSP_READ(mcbsp, SPCR2) & XRDY)) {
-                       if (attemps++ > 1000) {
-                               MCBSP_WRITE(mcbsp, SPCR2,
-                                               MCBSP_READ_CACHE(mcbsp, SPCR2) &
-                                               (~XRST));
-                               udelay(10);
-                               MCBSP_WRITE(mcbsp, SPCR2,
-                                               MCBSP_READ_CACHE(mcbsp, SPCR2) |
-                                               (XRST));
-                               udelay(10);
-                               dev_err(mcbsp->dev, "Could not write to"
-                                       " McBSP%d Register\n", mcbsp->id);
-                               return -2;
-                       }
-               }
-       }
-
-       return 0;
-}
-EXPORT_SYMBOL(omap_mcbsp_pollwrite);
-
-int omap_mcbsp_pollread(unsigned int id, u16 *buf)
-{
-       struct omap_mcbsp *mcbsp;
-
-       if (!omap_mcbsp_check_valid_id(id)) {
-               printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-               return -ENODEV;
-       }
-       mcbsp = id_to_mcbsp_ptr(id);
-
-       /* if frame sync error - clear the error */
-       if (MCBSP_READ(mcbsp, SPCR1) & RSYNC_ERR) {
-               /* clear error */
-               MCBSP_WRITE(mcbsp, SPCR1, MCBSP_READ_CACHE(mcbsp, SPCR1));
-               /* resend */
-               return -1;
-       } else {
-               /* wait for receive confirmation */
-               int attemps = 0;
-               while (!(MCBSP_READ(mcbsp, SPCR1) & RRDY)) {
-                       if (attemps++ > 1000) {
-                               MCBSP_WRITE(mcbsp, SPCR1,
-                                               MCBSP_READ_CACHE(mcbsp, SPCR1) &
-                                               (~RRST));
-                               udelay(10);
-                               MCBSP_WRITE(mcbsp, SPCR1,
-                                               MCBSP_READ_CACHE(mcbsp, SPCR1) |
-                                               (RRST));
-                               udelay(10);
-                               dev_err(mcbsp->dev, "Could not read from"
-                                       " McBSP%d Register\n", mcbsp->id);
-                               return -2;
-                       }
-               }
-       }
-       *buf = MCBSP_READ(mcbsp, DRR1);
-
-       return 0;
-}
-EXPORT_SYMBOL(omap_mcbsp_pollread);
-
-/*
- * IRQ based word transmission.
- */
-void omap_mcbsp_xmit_word(unsigned int id, u32 word)
-{
-       struct omap_mcbsp *mcbsp;
-       omap_mcbsp_word_length word_length;
-
-       if (!omap_mcbsp_check_valid_id(id)) {
-               printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-               return;
-       }
-
-       mcbsp = id_to_mcbsp_ptr(id);
-       word_length = mcbsp->tx_word_length;
-
-       wait_for_completion(&mcbsp->tx_irq_completion);
-
-       if (word_length > OMAP_MCBSP_WORD_16)
-               MCBSP_WRITE(mcbsp, DXR2, word >> 16);
-       MCBSP_WRITE(mcbsp, DXR1, word & 0xffff);
-}
-EXPORT_SYMBOL(omap_mcbsp_xmit_word);
-
-u32 omap_mcbsp_recv_word(unsigned int id)
-{
-       struct omap_mcbsp *mcbsp;
-       u16 word_lsb, word_msb = 0;
-       omap_mcbsp_word_length word_length;
-
-       if (!omap_mcbsp_check_valid_id(id)) {
-               printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-               return -ENODEV;
-       }
-       mcbsp = id_to_mcbsp_ptr(id);
-
-       word_length = mcbsp->rx_word_length;
-
-       wait_for_completion(&mcbsp->rx_irq_completion);
-
-       if (word_length > OMAP_MCBSP_WORD_16)
-               word_msb = MCBSP_READ(mcbsp, DRR2);
-       word_lsb = MCBSP_READ(mcbsp, DRR1);
-
-       return (word_lsb | (word_msb << 16));
-}
-EXPORT_SYMBOL(omap_mcbsp_recv_word);
-
-int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word)
-{
-       struct omap_mcbsp *mcbsp;
-       omap_mcbsp_word_length tx_word_length;
-       omap_mcbsp_word_length rx_word_length;
-       u16 spcr2, spcr1, attempts = 0, word_lsb, word_msb = 0;
-
-       if (!omap_mcbsp_check_valid_id(id)) {
-               printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-               return -ENODEV;
-       }
-       mcbsp = id_to_mcbsp_ptr(id);
-       tx_word_length = mcbsp->tx_word_length;
-       rx_word_length = mcbsp->rx_word_length;
-
-       if (tx_word_length != rx_word_length)
-               return -EINVAL;
-
-       /* First we wait for the transmitter to be ready */
-       spcr2 = MCBSP_READ(mcbsp, SPCR2);
-       while (!(spcr2 & XRDY)) {
-               spcr2 = MCBSP_READ(mcbsp, SPCR2);
-               if (attempts++ > 1000) {
-                       /* We must reset the transmitter */
-                       MCBSP_WRITE(mcbsp, SPCR2,
-                                   MCBSP_READ_CACHE(mcbsp, SPCR2) & (~XRST));
-                       udelay(10);
-                       MCBSP_WRITE(mcbsp, SPCR2,
-                                   MCBSP_READ_CACHE(mcbsp, SPCR2) | XRST);
-                       udelay(10);
-                       dev_err(mcbsp->dev, "McBSP%d transmitter not "
-                               "ready\n", mcbsp->id);
-                       return -EAGAIN;
-               }
-       }
-
-       /* Now we can push the data */
-       if (tx_word_length > OMAP_MCBSP_WORD_16)
-               MCBSP_WRITE(mcbsp, DXR2, word >> 16);
-       MCBSP_WRITE(mcbsp, DXR1, word & 0xffff);
-
-       /* We wait for the receiver to be ready */
-       spcr1 = MCBSP_READ(mcbsp, SPCR1);
-       while (!(spcr1 & RRDY)) {
-               spcr1 = MCBSP_READ(mcbsp, SPCR1);
-               if (attempts++ > 1000) {
-                       /* We must reset the receiver */
-                       MCBSP_WRITE(mcbsp, SPCR1,
-                                   MCBSP_READ_CACHE(mcbsp, SPCR1) & (~RRST));
-                       udelay(10);
-                       MCBSP_WRITE(mcbsp, SPCR1,
-                                   MCBSP_READ_CACHE(mcbsp, SPCR1) | RRST);
-                       udelay(10);
-                       dev_err(mcbsp->dev, "McBSP%d receiver not "
-                               "ready\n", mcbsp->id);
-                       return -EAGAIN;
-               }
-       }
-
-       /* Receiver is ready, let's read the dummy data */
-       if (rx_word_length > OMAP_MCBSP_WORD_16)
-               word_msb = MCBSP_READ(mcbsp, DRR2);
-       word_lsb = MCBSP_READ(mcbsp, DRR1);
-
-       return 0;
-}
-EXPORT_SYMBOL(omap_mcbsp_spi_master_xmit_word_poll);
-
-int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 *word)
-{
-       struct omap_mcbsp *mcbsp;
-       u32 clock_word = 0;
-       omap_mcbsp_word_length tx_word_length;
-       omap_mcbsp_word_length rx_word_length;
-       u16 spcr2, spcr1, attempts = 0, word_lsb, word_msb = 0;
-
-       if (!omap_mcbsp_check_valid_id(id)) {
-               printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-               return -ENODEV;
-       }
-
-       mcbsp = id_to_mcbsp_ptr(id);
-
-       tx_word_length = mcbsp->tx_word_length;
-       rx_word_length = mcbsp->rx_word_length;
-
-       if (tx_word_length != rx_word_length)
-               return -EINVAL;
-
-       /* First we wait for the transmitter to be ready */
-       spcr2 = MCBSP_READ(mcbsp, SPCR2);
-       while (!(spcr2 & XRDY)) {
-               spcr2 = MCBSP_READ(mcbsp, SPCR2);
-               if (attempts++ > 1000) {
-                       /* We must reset the transmitter */
-                       MCBSP_WRITE(mcbsp, SPCR2,
-                                   MCBSP_READ_CACHE(mcbsp, SPCR2) & (~XRST));
-                       udelay(10);
-                       MCBSP_WRITE(mcbsp, SPCR2,
-                                   MCBSP_READ_CACHE(mcbsp, SPCR2) | XRST);
-                       udelay(10);
-                       dev_err(mcbsp->dev, "McBSP%d transmitter not "
-                               "ready\n", mcbsp->id);
-                       return -EAGAIN;
-               }
-       }
-
-       /* We first need to enable the bus clock */
-       if (tx_word_length > OMAP_MCBSP_WORD_16)
-               MCBSP_WRITE(mcbsp, DXR2, clock_word >> 16);
-       MCBSP_WRITE(mcbsp, DXR1, clock_word & 0xffff);
-
-       /* We wait for the receiver to be ready */
-       spcr1 = MCBSP_READ(mcbsp, SPCR1);
-       while (!(spcr1 & RRDY)) {
-               spcr1 = MCBSP_READ(mcbsp, SPCR1);
-               if (attempts++ > 1000) {
-                       /* We must reset the receiver */
-                       MCBSP_WRITE(mcbsp, SPCR1,
-                                   MCBSP_READ_CACHE(mcbsp, SPCR1) & (~RRST));
-                       udelay(10);
-                       MCBSP_WRITE(mcbsp, SPCR1,
-                                   MCBSP_READ_CACHE(mcbsp, SPCR1) | RRST);
-                       udelay(10);
-                       dev_err(mcbsp->dev, "McBSP%d receiver not "
-                               "ready\n", mcbsp->id);
-                       return -EAGAIN;
-               }
-       }
-
-       /* Receiver is ready, there is something for us */
-       if (rx_word_length > OMAP_MCBSP_WORD_16)
-               word_msb = MCBSP_READ(mcbsp, DRR2);
-       word_lsb = MCBSP_READ(mcbsp, DRR1);
-
-       word[0] = (word_lsb | (word_msb << 16));
-
-       return 0;
-}
-EXPORT_SYMBOL(omap_mcbsp_spi_master_recv_word_poll);
-
-/*
- * Simple DMA based buffer rx/tx routines.
- * Nothing fancy, just a single buffer tx/rx through DMA.
- * The DMA resources are released once the transfer is done.
- * For anything fancier, you should use your own customized DMA
- * routines and callbacks.
- */
-int omap_mcbsp_xmit_buffer(unsigned int id, dma_addr_t buffer,
-                               unsigned int length)
-{
-       struct omap_mcbsp *mcbsp;
-       int dma_tx_ch;
-       int src_port = 0;
-       int dest_port = 0;
-       int sync_dev = 0;
-
-       if (!omap_mcbsp_check_valid_id(id)) {
-               printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-               return -ENODEV;
-       }
-       mcbsp = id_to_mcbsp_ptr(id);
-
-       if (omap_request_dma(mcbsp->dma_tx_sync, "McBSP TX",
-                               omap_mcbsp_tx_dma_callback,
-                               mcbsp,
-                               &dma_tx_ch)) {
-               dev_err(mcbsp->dev, " Unable to request DMA channel for "
-                               "McBSP%d TX. Trying IRQ based TX\n",
-                               mcbsp->id);
-               return -EAGAIN;
-       }
-       mcbsp->dma_tx_lch = dma_tx_ch;
-
-       dev_err(mcbsp->dev, "McBSP%d TX DMA on channel %d\n", mcbsp->id,
-               dma_tx_ch);
-
-       init_completion(&mcbsp->tx_dma_completion);
-
-       if (cpu_class_is_omap1()) {
-               src_port = OMAP_DMA_PORT_TIPB;
-               dest_port = OMAP_DMA_PORT_EMIFF;
-       }
-       if (cpu_class_is_omap2())
-               sync_dev = mcbsp->dma_tx_sync;
-
-       omap_set_dma_transfer_params(mcbsp->dma_tx_lch,
-                                    OMAP_DMA_DATA_TYPE_S16,
-                                    length >> 1, 1,
-                                    OMAP_DMA_SYNC_ELEMENT,
-        sync_dev, 0);
-
-       omap_set_dma_dest_params(mcbsp->dma_tx_lch,
-                                src_port,
-                                OMAP_DMA_AMODE_CONSTANT,
-                                mcbsp->phys_base + OMAP_MCBSP_REG_DXR1,
-                                0, 0);
-
-       omap_set_dma_src_params(mcbsp->dma_tx_lch,
-                               dest_port,
-                               OMAP_DMA_AMODE_POST_INC,
-                               buffer,
-                               0, 0);
-
-       omap_start_dma(mcbsp->dma_tx_lch);
-       wait_for_completion(&mcbsp->tx_dma_completion);
-
-       return 0;
-}
-EXPORT_SYMBOL(omap_mcbsp_xmit_buffer);
-
-int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer,
-                               unsigned int length)
-{
-       struct omap_mcbsp *mcbsp;
-       int dma_rx_ch;
-       int src_port = 0;
-       int dest_port = 0;
-       int sync_dev = 0;
-
-       if (!omap_mcbsp_check_valid_id(id)) {
-               printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-               return -ENODEV;
-       }
-       mcbsp = id_to_mcbsp_ptr(id);
-
-       if (omap_request_dma(mcbsp->dma_rx_sync, "McBSP RX",
-                               omap_mcbsp_rx_dma_callback,
-                               mcbsp,
-                               &dma_rx_ch)) {
-               dev_err(mcbsp->dev, "Unable to request DMA channel for "
-                               "McBSP%d RX. Trying IRQ based RX\n",
-                               mcbsp->id);
-               return -EAGAIN;
-       }
-       mcbsp->dma_rx_lch = dma_rx_ch;
-
-       dev_err(mcbsp->dev, "McBSP%d RX DMA on channel %d\n", mcbsp->id,
-               dma_rx_ch);
-
-       init_completion(&mcbsp->rx_dma_completion);
-
-       if (cpu_class_is_omap1()) {
-               src_port = OMAP_DMA_PORT_TIPB;
-               dest_port = OMAP_DMA_PORT_EMIFF;
-       }
-       if (cpu_class_is_omap2())
-               sync_dev = mcbsp->dma_rx_sync;
-
-       omap_set_dma_transfer_params(mcbsp->dma_rx_lch,
-                                       OMAP_DMA_DATA_TYPE_S16,
-                                       length >> 1, 1,
-                                       OMAP_DMA_SYNC_ELEMENT,
-                                       sync_dev, 0);
-
-       omap_set_dma_src_params(mcbsp->dma_rx_lch,
-                               src_port,
-                               OMAP_DMA_AMODE_CONSTANT,
-                               mcbsp->phys_base + OMAP_MCBSP_REG_DRR1,
-                               0, 0);
-
-       omap_set_dma_dest_params(mcbsp->dma_rx_lch,
-                                       dest_port,
-                                       OMAP_DMA_AMODE_POST_INC,
-                                       buffer,
-                                       0, 0);
-
-       omap_start_dma(mcbsp->dma_rx_lch);
-       wait_for_completion(&mcbsp->rx_dma_completion);
-
-       return 0;
-}
-EXPORT_SYMBOL(omap_mcbsp_recv_buffer);
-
-/*
- * SPI wrapper.
- * Since SPI setup is much simpler than the generic McBSP one,
- * this wrapper just need an omap_mcbsp_spi_cfg structure as an input.
- * Once this is done, you can call omap_mcbsp_start().
- */
-void omap_mcbsp_set_spi_mode(unsigned int id,
-                               const struct omap_mcbsp_spi_cfg *spi_cfg)
-{
-       struct omap_mcbsp *mcbsp;
-       struct omap_mcbsp_reg_cfg mcbsp_cfg;
-
-       if (!omap_mcbsp_check_valid_id(id)) {
-               printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
-               return;
-       }
-       mcbsp = id_to_mcbsp_ptr(id);
-
-       memset(&mcbsp_cfg, 0, sizeof(struct omap_mcbsp_reg_cfg));
-
-       /* SPI has only one frame */
-       mcbsp_cfg.rcr1 |= (RWDLEN1(spi_cfg->word_length) | RFRLEN1(0));
-       mcbsp_cfg.xcr1 |= (XWDLEN1(spi_cfg->word_length) | XFRLEN1(0));
-
-       /* Clock stop mode */
-       if (spi_cfg->clk_stp_mode == OMAP_MCBSP_CLK_STP_MODE_NO_DELAY)
-               mcbsp_cfg.spcr1 |= (1 << 12);
-       else
-               mcbsp_cfg.spcr1 |= (3 << 11);
-
-       /* Set clock parities */
-       if (spi_cfg->rx_clock_polarity == OMAP_MCBSP_CLK_RISING)
-               mcbsp_cfg.pcr0 |= CLKRP;
-       else
-               mcbsp_cfg.pcr0 &= ~CLKRP;
-
-       if (spi_cfg->tx_clock_polarity == OMAP_MCBSP_CLK_RISING)
-               mcbsp_cfg.pcr0 &= ~CLKXP;
-       else
-               mcbsp_cfg.pcr0 |= CLKXP;
-
-       /* Set SCLKME to 0 and CLKSM to 1 */
-       mcbsp_cfg.pcr0 &= ~SCLKME;
-       mcbsp_cfg.srgr2 |= CLKSM;
-
-       /* Set FSXP */
-       if (spi_cfg->fsx_polarity == OMAP_MCBSP_FS_ACTIVE_HIGH)
-               mcbsp_cfg.pcr0 &= ~FSXP;
-       else
-               mcbsp_cfg.pcr0 |= FSXP;
-
-       if (spi_cfg->spi_mode == OMAP_MCBSP_SPI_MASTER) {
-               mcbsp_cfg.pcr0 |= CLKXM;
-               mcbsp_cfg.srgr1 |= CLKGDV(spi_cfg->clk_div - 1);
-               mcbsp_cfg.pcr0 |= FSXM;
-               mcbsp_cfg.srgr2 &= ~FSGM;
-               mcbsp_cfg.xcr2 |= XDATDLY(1);
-               mcbsp_cfg.rcr2 |= RDATDLY(1);
-       } else {
-               mcbsp_cfg.pcr0 &= ~CLKXM;
-               mcbsp_cfg.srgr1 |= CLKGDV(1);
-               mcbsp_cfg.pcr0 &= ~FSXM;
-               mcbsp_cfg.xcr2 &= ~XDATDLY(3);
-               mcbsp_cfg.rcr2 &= ~RDATDLY(3);
-       }
-
-       mcbsp_cfg.xcr2 &= ~XPHASE;
-       mcbsp_cfg.rcr2 &= ~RPHASE;
-
-       omap_mcbsp_config(id, &mcbsp_cfg);
-}
-EXPORT_SYMBOL(omap_mcbsp_set_spi_mode);
-
 #ifdef CONFIG_ARCH_OMAP3
 #define max_thres(m)                   (mcbsp->pdata->buffer_size)
 #define valid_threshold(m, val)                ((val) <= max_thres(m))
@@ -1833,8 +1277,6 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev)
        spin_lock_init(&mcbsp->lock);
        mcbsp->id = id + 1;
        mcbsp->free = true;
-       mcbsp->dma_tx_lch = -1;
-       mcbsp->dma_rx_lch = -1;
 
        res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
        if (!res) {
@@ -1860,9 +1302,6 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev)
        else
                mcbsp->phys_dma_base = res->start;
 
-       /* Default I/O is IRQ based */
-       mcbsp->io_type = OMAP_MCBSP_IRQ_IO;
-
        mcbsp->tx_irq = platform_get_irq_byname(pdev, "tx");
        mcbsp->rx_irq = platform_get_irq_byname(pdev, "rx");
 
index 2526fa312b8a3ea0bf0c573b57e0efdc0ff3f67d..3471c650743b656f47e0d7015987b07556ba2b9d 100644 (file)
@@ -236,11 +236,6 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat)
        return 0;
 }
 
-static inline struct omap_device *_find_by_pdev(struct platform_device *pdev)
-{
-       return container_of(pdev, struct omap_device, pdev);
-}
-
 /**
  * _add_optional_clock_clkdev - Add clkdev entry for hwmod optional clocks
  * @od: struct omap_device *od
@@ -316,7 +311,7 @@ u32 omap_device_get_context_loss_count(struct platform_device *pdev)
        struct omap_device *od;
        u32 ret = 0;
 
-       od = _find_by_pdev(pdev);
+       od = to_omap_device(pdev);
 
        if (od->hwmods_cnt)
                ret = omap_hwmod_get_context_loss_count(od->hwmods[0]);
@@ -654,7 +649,7 @@ int omap_device_enable(struct platform_device *pdev)
        int ret;
        struct omap_device *od;
 
-       od = _find_by_pdev(pdev);
+       od = to_omap_device(pdev);
 
        if (od->_state == OMAP_DEVICE_STATE_ENABLED) {
                WARN(1, "omap_device: %s.%d: %s() called from invalid state %d\n",
@@ -693,7 +688,7 @@ int omap_device_idle(struct platform_device *pdev)
        int ret;
        struct omap_device *od;
 
-       od = _find_by_pdev(pdev);
+       od = to_omap_device(pdev);
 
        if (od->_state != OMAP_DEVICE_STATE_ENABLED) {
                WARN(1, "omap_device: %s.%d: %s() called from invalid state %d\n",
@@ -724,7 +719,7 @@ int omap_device_shutdown(struct platform_device *pdev)
        int ret, i;
        struct omap_device *od;
 
-       od = _find_by_pdev(pdev);
+       od = to_omap_device(pdev);
 
        if (od->_state != OMAP_DEVICE_STATE_ENABLED &&
            od->_state != OMAP_DEVICE_STATE_IDLE) {
@@ -765,7 +760,7 @@ int omap_device_align_pm_lat(struct platform_device *pdev,
        int ret = -EINVAL;
        struct omap_device *od;
 
-       od = _find_by_pdev(pdev);
+       od = to_omap_device(pdev);
 
        if (new_wakeup_lat_limit == od->dev_wakeup_lat)
                return 0;
index d9c4096ebf45e9830f3ca973b7c6b01ac3f6f751..8c5b3029b39fca958703da3a73316daf85a212a7 100644 (file)
@@ -4,7 +4,7 @@
 
 config PLAT_S3C24XX
        bool
-       depends on ARCH_S3C2410 || ARCH_S3C24A0
+       depends on ARCH_S3C2410
        default y
        select NO_IOPORT
        select ARCH_REQUIRE_GPIOLIB
index cf97caafe56b6cf52290eee5e9db699a7dec5627..f95d3268ae1fe9e07b282991afd2885873086279 100644 (file)
@@ -169,7 +169,6 @@ static struct clk_ops dclk_ops = {
 
 struct clk s3c24xx_dclk0 = {
        .name           = "dclk0",
-       .id             = -1,
        .ctrlbit        = S3C2410_DCLKCON_DCLK0EN,
        .enable         = s3c24xx_dclk_enable,
        .ops            = &dclk_ops,
@@ -177,7 +176,6 @@ struct clk s3c24xx_dclk0 = {
 
 struct clk s3c24xx_dclk1 = {
        .name           = "dclk1",
-       .id             = -1,
        .ctrlbit        = S3C2410_DCLKCON_DCLK1EN,
        .enable         = s3c24xx_dclk_enable,
        .ops            = &dclk_ops,
@@ -189,12 +187,10 @@ static struct clk_ops clkout_ops = {
 
 struct clk s3c24xx_clkout0 = {
        .name           = "clkout0",
-       .id             = -1,
        .ops            = &clkout_ops,
 };
 
 struct clk s3c24xx_clkout1 = {
        .name           = "clkout1",
-       .id             = -1,
        .ops            = &clkout_ops,
 };
index 4a10c0f684b2952cdb0ebf3fe6e33914f0eca9fb..c1fc6c6fac7200f4e2cd181282a11ed4fcb651c7 100644 (file)
@@ -46,7 +46,6 @@
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/clock.h>
-#include <plat/s3c2400.h>
 #include <plat/s3c2410.h>
 #include <plat/s3c2412.h>
 #include <plat/s3c2416.h>
@@ -55,7 +54,6 @@
 
 /* table of supported CPUs */
 
-static const char name_s3c2400[]  = "S3C2400";
 static const char name_s3c2410[]  = "S3C2410";
 static const char name_s3c2412[]  = "S3C2412";
 static const char name_s3c2416[]  = "S3C2416/S3C2450";
@@ -157,15 +155,6 @@ static struct cpu_table cpu_ids[] __initdata = {
                .init           = s3c2443_init,
                .name           = name_s3c2443,
        },
-       {
-               .idcode         = 0x0,   /* S3C2400 doesn't have an idcode */
-               .idmask         = 0xffffffff,
-               .map_io         = s3c2400_map_io,
-               .init_clocks    = s3c2400_init_clocks,
-               .init_uarts     = s3c2400_init_uarts,
-               .init           = s3c2400_init,
-               .name           = name_s3c2400
-       },
 };
 
 /* minimal IO mapping */
@@ -200,11 +189,7 @@ static unsigned long s3c24xx_read_idcode_v5(void)
 
 static unsigned long s3c24xx_read_idcode_v4(void)
 {
-#ifndef CONFIG_CPU_S3C2400
        return __raw_readl(S3C2410_GSTATUS1);
-#else
-       return 0UL;
-#endif
 }
 
 /* Hook for arm_pm_restart to ensure we execute the reset code
index 73667994518acdab1946029656cd31e98fa71092..a76bf2df33339cf5021931c96526d4be17a614d9 100644 (file)
@@ -150,9 +150,8 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd)
 {
        struct s3c2410fb_mach_info *npd;
 
-       npd = kmemdup(pd, sizeof(*npd), GFP_KERNEL);
+       npd = s3c_set_platdata(pd, sizeof(*npd), &s3c_device_lcd);
        if (npd) {
-               s3c_device_lcd.dev.platform_data = npd;
                npd->displays = kmemdup(pd->displays,
                        sizeof(struct s3c2410fb_display) * npd->num_displays,
                        GFP_KERNEL);
@@ -188,12 +187,10 @@ struct platform_device s3c_device_ts = {
 };
 EXPORT_SYMBOL(s3c_device_ts);
 
-static struct s3c2410_ts_mach_info s3c2410ts_info;
-
 void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *hard_s3c2410ts_info)
 {
-       memcpy(&s3c2410ts_info, hard_s3c2410ts_info, sizeof(struct s3c2410_ts_mach_info));
-       s3c_device_ts.dev.platform_data = &s3c2410ts_info;
+       s3c_set_platdata(hard_s3c2410ts_info,
+                        sizeof(struct s3c2410_ts_mach_info), &s3c_device_ts);
 }
 
 /* USB Device (Gadget)*/
@@ -223,15 +220,7 @@ EXPORT_SYMBOL(s3c_device_usbgadget);
 
 void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *pd)
 {
-       struct s3c2410_udc_mach_info *npd;
-
-       npd = kmalloc(sizeof(*npd), GFP_KERNEL);
-       if (npd) {
-               memcpy(npd, pd, sizeof(*npd));
-               s3c_device_usbgadget.dev.platform_data = npd;
-       } else {
-               printk(KERN_ERR "no memory for udc platform data\n");
-       }
+       s3c_set_platdata(pd, sizeof(*pd), &s3c_device_usbgadget);
 }
 
 /* USB High Speed 2.0 Device (Gadget) */
@@ -263,15 +252,7 @@ struct platform_device s3c_device_usb_hsudc = {
 
 void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd)
 {
-       struct s3c24xx_hsudc_platdata *npd;
-
-       npd = kmalloc(sizeof(*npd), GFP_KERNEL);
-       if (npd) {
-               memcpy(npd, pd, sizeof(*npd));
-               s3c_device_usb_hsudc.dev.platform_data = npd;
-       } else {
-               printk(KERN_ERR "no memory for udc platform data\n");
-       }
+       s3c_set_platdata(pd, sizeof(*pd), &s3c_device_usb_hsudc);
 }
 
 /* IIS */
@@ -383,13 +364,8 @@ EXPORT_SYMBOL(s3c_device_sdi);
 
 void __init s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata)
 {
-       struct s3c24xx_mci_pdata *npd;
-
-       npd = kmemdup(pdata, sizeof(struct s3c24xx_mci_pdata), GFP_KERNEL);
-       if (!npd)
-               printk(KERN_ERR "%s: no memory to copy pdata", __func__);
-
-       s3c_device_sdi.dev.platform_data = npd;
+       s3c_set_platdata(pdata, sizeof(struct s3c24xx_mci_pdata),
+                        &s3c_device_sdi);
 }
 
 
diff --git a/arch/arm/plat-s3c24xx/include/mach/clkdev.h b/arch/arm/plat-s3c24xx/include/mach/clkdev.h
new file mode 100644 (file)
index 0000000..7dffa83
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef __MACH_CLKDEV_H__
+#define __MACH_CLKDEV_H__
+
+#define __clk_get(clk) ({ 1; })
+#define __clk_put(clk) do {} while (0)
+
+#endif
index a6f1d5df13b4631ba7a129133f307d274f50d5fe..cc44e0e931e9c09084fc3b832978a1fc1a6e1463 100644 (file)
 #define S3C2410_IISFCON_RXMASK   (0x3f)
 #define S3C2410_IISFCON_RXSHIFT          (0)
 
-#define S3C2400_IISFCON_TXDMA     (1<<11)
-#define S3C2400_IISFCON_RXDMA     (1<<10)
-#define S3C2400_IISFCON_TXENABLE  (1<<9)
-#define S3C2400_IISFCON_RXENABLE  (1<<8)
-#define S3C2400_IISFCON_TXMASK   (0x07 << 4)
-#define S3C2400_IISFCON_TXSHIFT          (4)
-#define S3C2400_IISFCON_RXMASK   (0x07)
-#define S3C2400_IISFCON_RXSHIFT          (0)
-
 #define S3C2410_IISFIFO  (0x10)
 #endif /* __ASM_ARCH_REGS_IIS_H */
index 2b35479ee35c947071ab624b3f268f828703bbb5..892e2f680fcadc9684c94baae0c860d282136e92 100644 (file)
@@ -67,7 +67,6 @@
 
 #define S3C2410_SPPIN_ENMUL      (1<<2)        /* Multi Master Error detect */
 #define S3C2410_SPPIN_RESERVED   (1<<1)
-#define S3C2400_SPPIN_nCS        (1<<1)        /* SPI Card Select */
 #define S3C2410_SPPIN_KEEP       (1<<0)        /* Master Out keep */
 
 #define S3C2410_SPPRE   (0x0C)
diff --git a/arch/arm/plat-s3c24xx/include/plat/s3c2400.h b/arch/arm/plat-s3c24xx/include/plat/s3c2400.h
deleted file mode 100644 (file)
index b3feaea..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* linux/include/asm-arm/plat-s3c24xx/s3c2400.h
- *
- * Copyright (c) 2004 Simtec Electronics
- *     Ben Dooks <ben@simtec.co.uk>
- *
- * Header file for S3C2400 cpu support
- *
- * 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.
- *
- * Modifications:
- *     09-Fev-2006 LCVR  First version, based on s3c2410.h
-*/
-
-#ifdef CONFIG_CPU_S3C2400
-
-extern  int s3c2400_init(void);
-
-extern void s3c2400_map_io(void);
-
-extern void s3c2400_init_uarts(struct s3c2410_uartcfg *cfg, int no);
-
-extern void s3c2400_init_clocks(int xtal);
-
-#else
-#define s3c2400_init_clocks NULL
-#define s3c2400_init_uarts NULL
-#define s3c2400_map_io NULL
-#define s3c2400_init NULL
-#endif
index 9ecc5d913679d863bf1daacefbd49a749b849e92..def76aa3825af1c1ca880e89ec2eb8bd23b431c1 100644 (file)
@@ -90,37 +90,31 @@ static int s3c2410_upll_enable(struct clk *clk, int enable)
 static struct clk init_clocks_off[] = {
        {
                .name           = "nand",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c2410_clkcon_enable,
                .ctrlbit        = S3C2410_CLKCON_NAND,
        }, {
                .name           = "sdi",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2410_clkcon_enable,
                .ctrlbit        = S3C2410_CLKCON_SDI,
        }, {
                .name           = "adc",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2410_clkcon_enable,
                .ctrlbit        = S3C2410_CLKCON_ADC,
        }, {
                .name           = "i2c",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2410_clkcon_enable,
                .ctrlbit        = S3C2410_CLKCON_IIC,
        }, {
                .name           = "iis",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2410_clkcon_enable,
                .ctrlbit        = S3C2410_CLKCON_IIS,
        }, {
                .name           = "spi",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2410_clkcon_enable,
                .ctrlbit        = S3C2410_CLKCON_SPI,
@@ -130,70 +124,61 @@ static struct clk init_clocks_off[] = {
 static struct clk init_clocks[] = {
        {
                .name           = "lcd",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c2410_clkcon_enable,
                .ctrlbit        = S3C2410_CLKCON_LCDC,
        }, {
                .name           = "gpio",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2410_clkcon_enable,
                .ctrlbit        = S3C2410_CLKCON_GPIO,
        }, {
                .name           = "usb-host",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c2410_clkcon_enable,
                .ctrlbit        = S3C2410_CLKCON_USBH,
        }, {
                .name           = "usb-device",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c2410_clkcon_enable,
                .ctrlbit        = S3C2410_CLKCON_USBD,
        }, {
                .name           = "timers",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2410_clkcon_enable,
                .ctrlbit        = S3C2410_CLKCON_PWMT,
        }, {
                .name           = "uart",
-               .id             = 0,
+               .devname        = "s3c2410-uart.0",
                .parent         = &clk_p,
                .enable         = s3c2410_clkcon_enable,
                .ctrlbit        = S3C2410_CLKCON_UART0,
        }, {
                .name           = "uart",
-               .id             = 1,
+               .devname        = "s3c2410-uart.1",
                .parent         = &clk_p,
                .enable         = s3c2410_clkcon_enable,
                .ctrlbit        = S3C2410_CLKCON_UART1,
        }, {
                .name           = "uart",
-               .id             = 2,
+               .devname        = "s3c2410-uart.2",
                .parent         = &clk_p,
                .enable         = s3c2410_clkcon_enable,
                .ctrlbit        = S3C2410_CLKCON_UART2,
        }, {
                .name           = "rtc",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2410_clkcon_enable,
                .ctrlbit        = S3C2410_CLKCON_RTC,
        }, {
                .name           = "watchdog",
-               .id             = -1,
                .parent         = &clk_p,
                .ctrlbit        = 0,
        }, {
                .name           = "usb-bus-host",
-               .id             = -1,
                .parent         = &clk_usb_bus,
        }, {
                .name           = "usb-bus-gadget",
-               .id             = -1,
                .parent         = &clk_usb_bus,
        },
 };
index 82f2d4a3929159ffef96dc14204592fccff3ea70..59552c0ea5fb3efe6feaaa17a42b39a8cfd05685 100644 (file)
@@ -56,7 +56,6 @@ int s3c2443_clkcon_enable_s(struct clk *clk, int enable)
 struct clk clk_mpllref = {
        .name           = "mpllref",
        .parent         = &clk_xtal,
-       .id             = -1,
 };
 
 static struct clk *clk_epllref_sources[] = {
@@ -69,7 +68,6 @@ static struct clk *clk_epllref_sources[] = {
 struct clksrc_clk clk_epllref = {
        .clk    = {
                .name           = "epllref",
-               .id             = -1,
        },
        .sources = &(struct clksrc_sources) {
                .sources = clk_epllref_sources,
@@ -92,7 +90,6 @@ struct clksrc_clk clk_esysclk = {
        .clk    = {
                .name           = "esysclk",
                .parent         = &clk_epll,
-               .id             = -1,
        },
        .sources = &(struct clksrc_sources) {
                .sources = clk_sysclk_sources,
@@ -115,7 +112,6 @@ static unsigned long s3c2443_getrate_mdivclk(struct clk *clk)
 static struct clk clk_mdivclk = {
        .name           = "mdivclk",
        .parent         = &clk_mpllref,
-       .id             = -1,
        .ops            = &(struct clk_ops) {
                .get_rate       = s3c2443_getrate_mdivclk,
        },
@@ -132,7 +128,6 @@ struct clksrc_clk clk_msysclk = {
        .clk    = {
                .name           = "msysclk",
                .parent         = &clk_xtal,
-               .id             = -1,
        },
        .sources = &(struct clksrc_sources) {
                .sources = clk_msysclk_sources,
@@ -159,7 +154,6 @@ static unsigned long s3c2443_prediv_getrate(struct clk *clk)
 
 static struct clk clk_prediv = {
        .name           = "prediv",
-       .id             = -1,
        .parent         = &clk_msysclk.clk,
        .ops            = &(struct clk_ops) {
                .get_rate       = s3c2443_prediv_getrate,
@@ -174,7 +168,6 @@ static struct clk clk_prediv = {
 static struct clksrc_clk clk_usb_bus_host = {
        .clk    = {
                .name           = "usb-bus-host-parent",
-               .id             = -1,
                .parent         = &clk_esysclk.clk,
                .ctrlbit        = S3C2443_SCLKCON_USBHOST,
                .enable         = s3c2443_clkcon_enable_s,
@@ -189,7 +182,6 @@ static struct clksrc_clk clksrc_clks[] = {
                /* ART baud-rate clock sourced from esysclk via a divisor */
                .clk    = {
                        .name           = "uartclk",
-                       .id             = -1,
                        .parent         = &clk_esysclk.clk,
                },
                .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 8 },
@@ -197,7 +189,6 @@ static struct clksrc_clk clksrc_clks[] = {
                /* camera interface bus-clock, divided down from esysclk */
                .clk    = {
                        .name           = "camif-upll", /* same as 2440 name */
-                       .id             = -1,
                        .parent         = &clk_esysclk.clk,
                        .ctrlbit        = S3C2443_SCLKCON_CAMCLK,
                        .enable         = s3c2443_clkcon_enable_s,
@@ -206,7 +197,6 @@ static struct clksrc_clk clksrc_clks[] = {
        }, {
                .clk    = {
                        .name           = "display-if",
-                       .id             = -1,
                        .parent         = &clk_esysclk.clk,
                        .ctrlbit        = S3C2443_SCLKCON_DISPCLK,
                        .enable         = s3c2443_clkcon_enable_s,
@@ -219,13 +209,11 @@ static struct clksrc_clk clksrc_clks[] = {
 static struct clk init_clocks_off[] = {
        {
                .name           = "adc",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2443_clkcon_enable_p,
                .ctrlbit        = S3C2443_PCLKCON_ADC,
        }, {
                .name           = "i2c",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2443_clkcon_enable_p,
                .ctrlbit        = S3C2443_PCLKCON_IIC,
@@ -235,136 +223,117 @@ static struct clk init_clocks_off[] = {
 static struct clk init_clocks[] = {
        {
                .name           = "dma",
-               .id             = 0,
                .parent         = &clk_h,
                .enable         = s3c2443_clkcon_enable_h,
                .ctrlbit        = S3C2443_HCLKCON_DMA0,
        }, {
                .name           = "dma",
-               .id             = 1,
                .parent         = &clk_h,
                .enable         = s3c2443_clkcon_enable_h,
                .ctrlbit        = S3C2443_HCLKCON_DMA1,
        }, {
                .name           = "dma",
-               .id             = 2,
                .parent         = &clk_h,
                .enable         = s3c2443_clkcon_enable_h,
                .ctrlbit        = S3C2443_HCLKCON_DMA2,
        }, {
                .name           = "dma",
-               .id             = 3,
                .parent         = &clk_h,
                .enable         = s3c2443_clkcon_enable_h,
                .ctrlbit        = S3C2443_HCLKCON_DMA3,
        }, {
                .name           = "dma",
-               .id             = 4,
                .parent         = &clk_h,
                .enable         = s3c2443_clkcon_enable_h,
                .ctrlbit        = S3C2443_HCLKCON_DMA4,
        }, {
                .name           = "dma",
-               .id             = 5,
                .parent         = &clk_h,
                .enable         = s3c2443_clkcon_enable_h,
                .ctrlbit        = S3C2443_HCLKCON_DMA5,
        }, {
                .name           = "hsmmc",
-               .id             = 1,
                .parent         = &clk_h,
                .enable         = s3c2443_clkcon_enable_h,
                .ctrlbit        = S3C2443_HCLKCON_HSMMC,
        }, {
                .name           = "gpio",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2443_clkcon_enable_p,
                .ctrlbit        = S3C2443_PCLKCON_GPIO,
        }, {
                .name           = "usb-host",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c2443_clkcon_enable_h,
                .ctrlbit        = S3C2443_HCLKCON_USBH,
        }, {
                .name           = "usb-device",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c2443_clkcon_enable_h,
                .ctrlbit        = S3C2443_HCLKCON_USBD,
        }, {
                .name           = "lcd",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c2443_clkcon_enable_h,
                .ctrlbit        = S3C2443_HCLKCON_LCDC,
 
        }, {
                .name           = "timers",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2443_clkcon_enable_p,
                .ctrlbit        = S3C2443_PCLKCON_PWMT,
        }, {
                .name           = "cfc",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c2443_clkcon_enable_h,
                .ctrlbit        = S3C2443_HCLKCON_CFC,
        }, {
                .name           = "ssmc",
-               .id             = -1,
                .parent         = &clk_h,
                .enable         = s3c2443_clkcon_enable_h,
                .ctrlbit        = S3C2443_HCLKCON_SSMC,
        }, {
                .name           = "uart",
-               .id             = 0,
+               .devname        = "s3c2440-uart.0",
                .parent         = &clk_p,
                .enable         = s3c2443_clkcon_enable_p,
                .ctrlbit        = S3C2443_PCLKCON_UART0,
        }, {
                .name           = "uart",
-               .id             = 1,
+               .devname        = "s3c2440-uart.1",
                .parent         = &clk_p,
                .enable         = s3c2443_clkcon_enable_p,
                .ctrlbit        = S3C2443_PCLKCON_UART1,
        }, {
                .name           = "uart",
-               .id             = 2,
+               .devname        = "s3c2440-uart.2",
                .parent         = &clk_p,
                .enable         = s3c2443_clkcon_enable_p,
                .ctrlbit        = S3C2443_PCLKCON_UART2,
        }, {
                .name           = "uart",
-               .id             = 3,
+               .devname        = "s3c2440-uart.3",
                .parent         = &clk_p,
                .enable         = s3c2443_clkcon_enable_p,
                .ctrlbit        = S3C2443_PCLKCON_UART3,
        }, {
                .name           = "rtc",
-               .id             = -1,
                .parent         = &clk_p,
                .enable         = s3c2443_clkcon_enable_p,
                .ctrlbit        = S3C2443_PCLKCON_RTC,
        }, {
                .name           = "watchdog",
-               .id             = -1,
                .parent         = &clk_p,
                .ctrlbit        = S3C2443_PCLKCON_WDT,
        }, {
                .name           = "ac97",
-               .id             = -1,
                .parent         = &clk_p,
                .ctrlbit        = S3C2443_PCLKCON_AC97,
        }, {
                .name           = "nand",
-               .id             = -1,
                .parent         = &clk_h,
        }, {
                .name           = "usb-bus-host",
-               .id             = -1,
                .parent         = &clk_usb_bus_host.clk,
        }
 };
index 8d081d968c58ddec76c40beef9a452e5511f68f7..02af235298e2e1ff4f1e850afe3b67f0b43f9856 100644 (file)
@@ -168,6 +168,41 @@ unsigned long s5p_epll_get_rate(struct clk *clk)
        return clk->rate;
 }
 
+int s5p_spdif_set_rate(struct clk *clk, unsigned long rate)
+{
+       struct clk *pclk;
+       int ret;
+
+       pclk = clk_get_parent(clk);
+       if (IS_ERR(pclk))
+               return -EINVAL;
+
+       ret = pclk->ops->set_rate(pclk, rate);
+       clk_put(pclk);
+
+       return ret;
+}
+
+unsigned long s5p_spdif_get_rate(struct clk *clk)
+{
+       struct clk *pclk;
+       int rate;
+
+       pclk = clk_get_parent(clk);
+       if (IS_ERR(pclk))
+               return -EINVAL;
+
+       rate = pclk->ops->get_rate(clk);
+       clk_put(pclk);
+
+       return rate;
+}
+
+struct clk_ops s5p_sclk_spdif_ops = {
+       .set_rate       = s5p_spdif_set_rate,
+       .get_rate       = s5p_spdif_get_rate,
+};
+
 static struct clk *s5p_clks[] __initdata = {
        &clk_ext_xtal_mux,
        &clk_48m,
index 2b6dcff8ab2beb4ccf80c452d78e7ece974e0e64..769b5bdfb046490ea590844bbbb1f77fc0b8b206 100644 (file)
@@ -47,4 +47,9 @@ extern int s5p_gatectrl(void __iomem *reg, struct clk *clk, int enable);
 extern int s5p_epll_enable(struct clk *clk, int enable);
 extern unsigned long s5p_epll_get_rate(struct clk *clk);
 
+/* SPDIF clk operations common for S5PC100/V210/C110 and Exynos4 */
+extern int s5p_spdif_set_rate(struct clk *clk, unsigned long rate);
+extern unsigned long s5p_spdif_get_rate(struct clk *clk);
+
+extern struct clk_ops s5p_sclk_spdif_ops;
 #endif /* __ASM_PLAT_S5P_CLOCK_H */
index 612934c48b0d25fc3d2bacbb1eed22e2806f191d..c833e7b57599d40a254abce3ca34aa305ba3fd78 100644 (file)
@@ -314,13 +314,6 @@ static void __iomem *s5p_timer_reg(void)
        return S3C_TIMERREG(offset);
 }
 
-static cycle_t s5p_timer_read(struct clocksource *cs)
-{
-       void __iomem *reg = s5p_timer_reg();
-
-       return (cycle_t) (reg ? ~__raw_readl(reg) : 0);
-}
-
 /*
  * Override the global weak sched_clock symbol with this
  * local implementation which uses the clocksource to get some
@@ -350,14 +343,6 @@ static void notrace s5p_update_sched_clock(void)
        update_sched_clock(&cd, ~__raw_readl(reg), (u32)~0);
 }
 
-struct clocksource time_clocksource = {
-       .name           = "s5p_clocksource_timer",
-       .rating         = 250,
-       .read           = s5p_timer_read,
-       .mask           = CLOCKSOURCE_MASK(32),
-       .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
-};
-
 static void __init s5p_clocksource_init(void)
 {
        unsigned long pclk;
@@ -375,8 +360,9 @@ static void __init s5p_clocksource_init(void)
 
        init_sched_clock(&cd, s5p_update_sched_clock, 32, clock_rate);
 
-       if (clocksource_register_hz(&time_clocksource, clock_rate))
-               panic("%s: can't register clocksource\n", time_clocksource.name);
+       if (clocksource_mmio_init(s5p_timer_reg(), "s5p_clocksource_timer",
+                       clock_rate, 250, 32, clocksource_mmio_readl_down))
+               panic("s5p_clocksource_timer: can't register clocksource\n");
 }
 
 static void __init s5p_timer_resources(void)
@@ -384,6 +370,7 @@ static void __init s5p_timer_resources(void)
 
        unsigned long event_id = timer_source.event_id;
        unsigned long source_id = timer_source.source_id;
+       char devname[15];
 
        timerclk = clk_get(NULL, "timers");
        if (IS_ERR(timerclk))
@@ -391,6 +378,10 @@ static void __init s5p_timer_resources(void)
 
        clk_enable(timerclk);
 
+       sprintf(devname, "s3c24xx-pwm.%lu", event_id);
+       s3c_device_timer[event_id].id = event_id;
+       s3c_device_timer[event_id].dev.init_name = devname;
+
        tin_event = clk_get(&s3c_device_timer[event_id].dev, "pwm-tin");
        if (IS_ERR(tin_event))
                panic("failed to get pwm-tin clock for event timer");
@@ -401,6 +392,10 @@ static void __init s5p_timer_resources(void)
 
        clk_enable(tin_event);
 
+       sprintf(devname, "s3c24xx-pwm.%lu", source_id);
+       s3c_device_timer[source_id].id = source_id;
+       s3c_device_timer[source_id].dev.init_name = devname;
+
        tin_source = clk_get(&s3c_device_timer[source_id].dev, "pwm-tin");
        if (IS_ERR(tin_source))
                panic("failed to get pwm-tin clock for source timer");
index 54f5eddc921df7dadee61d0b8f734092c1452fd7..e1cbc728c7759b1e1f54923f11120b3ea4647cb2 100644 (file)
@@ -232,8 +232,8 @@ static int s5p_sysmmu_probe(struct platform_device *pdev)
                        goto err_res;
                }
 
-               mem = request_mem_region(res->start,
-                               ((res->end) - (res->start)) + 1, pdev->name);
+               mem = request_mem_region(res->start, resource_size(res),
+                                        pdev->name);
                if (!mem) {
                        dev_err(dev, "Failed to request the memory region of %s.\n",
                                                        sysmmu_ips_name[i]);
@@ -241,7 +241,7 @@ static int s5p_sysmmu_probe(struct platform_device *pdev)
                        goto err_res;
                }
 
-               sysmmusfrs[i] = ioremap(res->start, res->end - res->start + 1);
+               sysmmusfrs[i] = ioremap(res->start, resource_size(res));
                if (!sysmmusfrs[i]) {
                        dev_err(dev, "Failed to ioremap() for %s.\n",
                                                        sysmmu_ips_name[i]);
index 4d79519d19a4146b8c6d3a9c780b0e1e0fec6954..b3e10659e4b80a81fe6e7dcf16703d728b1ea48a 100644 (file)
@@ -280,6 +280,12 @@ config SAMSUNG_DEV_PWM
        help
          Compile in platform device definition for PWM Timer
 
+config SAMSUNG_DEV_BACKLIGHT
+       bool
+       depends on SAMSUNG_DEV_PWM
+       help
+         Compile in platform device definition LCD backlight with PWM Timer
+
 config S3C24XX_PWM
        bool "PWM device support"
        select HAVE_PWM
index 53eb15b0a07d6efe6d1c26eb01d7c306eaff6f07..853764ba8cc51a0cbdecaed732f5bf3225811cf2 100644 (file)
@@ -59,6 +59,7 @@ obj-$(CONFIG_SAMSUNG_DEV_IDE) += dev-ide.o
 obj-$(CONFIG_SAMSUNG_DEV_TS)   += dev-ts.o
 obj-$(CONFIG_SAMSUNG_DEV_KEYPAD)       += dev-keypad.o
 obj-$(CONFIG_SAMSUNG_DEV_PWM)  += dev-pwm.o
+obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT)    += dev-backlight.o
 
 # DMA support
 
index 0c9f95d98561863aa458a415c388f3a821bd7822..302c42670bd1dafacb20056d9e18e3bc36f118ce 100644 (file)
@@ -71,74 +71,6 @@ static int clk_null_enable(struct clk *clk, int enable)
        return 0;
 }
 
-static int dev_is_s3c_uart(struct device *dev)
-{
-       struct platform_device **pdev = s3c24xx_uart_devs;
-       int i;
-       for (i = 0; i < ARRAY_SIZE(s3c24xx_uart_devs); i++, pdev++)
-               if (*pdev && dev == &(*pdev)->dev)
-                       return 1;
-       return 0;
-}
-
-/*
- * Serial drivers call get_clock() very early, before platform bus
- * has been set up, this requires a special check to let them get
- * a proper clock
- */
-
-static int dev_is_platform_device(struct device *dev)
-{
-       return dev->bus == &platform_bus_type ||
-              (dev->bus == NULL && dev_is_s3c_uart(dev));
-}
-
-/* Clock API calls */
-
-struct clk *clk_get(struct device *dev, const char *id)
-{
-       struct clk *p;
-       struct clk *clk = ERR_PTR(-ENOENT);
-       int idno;
-
-       if (dev == NULL || !dev_is_platform_device(dev))
-               idno = -1;
-       else
-               idno = to_platform_device(dev)->id;
-
-       spin_lock(&clocks_lock);
-
-       list_for_each_entry(p, &clocks, list) {
-               if (p->id == idno &&
-                   strcmp(id, p->name) == 0 &&
-                   try_module_get(p->owner)) {
-                       clk = p;
-                       break;
-               }
-       }
-
-       /* check for the case where a device was supplied, but the
-        * clock that was being searched for is not device specific */
-
-       if (IS_ERR(clk)) {
-               list_for_each_entry(p, &clocks, list) {
-                       if (p->id == -1 && strcmp(id, p->name) == 0 &&
-                           try_module_get(p->owner)) {
-                               clk = p;
-                               break;
-                       }
-               }
-       }
-
-       spin_unlock(&clocks_lock);
-       return clk;
-}
-
-void clk_put(struct clk *clk)
-{
-       module_put(clk->owner);
-}
-
 int clk_enable(struct clk *clk)
 {
        if (IS_ERR(clk) || clk == NULL)
@@ -241,8 +173,6 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
        return ret;
 }
 
-EXPORT_SYMBOL(clk_get);
-EXPORT_SYMBOL(clk_put);
 EXPORT_SYMBOL(clk_enable);
 EXPORT_SYMBOL(clk_disable);
 EXPORT_SYMBOL(clk_get_rate);
@@ -265,7 +195,6 @@ struct clk_ops clk_ops_def_setrate = {
 
 struct clk clk_xtal = {
        .name           = "xtal",
-       .id             = -1,
        .rate           = 0,
        .parent         = NULL,
        .ctrlbit        = 0,
@@ -273,30 +202,25 @@ struct clk clk_xtal = {
 
 struct clk clk_ext = {
        .name           = "ext",
-       .id             = -1,
 };
 
 struct clk clk_epll = {
        .name           = "epll",
-       .id             = -1,
 };
 
 struct clk clk_mpll = {
        .name           = "mpll",
-       .id             = -1,
        .ops            = &clk_ops_def_setrate,
 };
 
 struct clk clk_upll = {
        .name           = "upll",
-       .id             = -1,
        .parent         = NULL,
        .ctrlbit        = 0,
 };
 
 struct clk clk_f = {
        .name           = "fclk",
-       .id             = -1,
        .rate           = 0,
        .parent         = &clk_mpll,
        .ctrlbit        = 0,
@@ -304,7 +228,6 @@ struct clk clk_f = {
 
 struct clk clk_h = {
        .name           = "hclk",
-       .id             = -1,
        .rate           = 0,
        .parent         = NULL,
        .ctrlbit        = 0,
@@ -313,7 +236,6 @@ struct clk clk_h = {
 
 struct clk clk_p = {
        .name           = "pclk",
-       .id             = -1,
        .rate           = 0,
        .parent         = NULL,
        .ctrlbit        = 0,
@@ -322,7 +244,6 @@ struct clk clk_p = {
 
 struct clk clk_usb_bus = {
        .name           = "usb-bus",
-       .id             = -1,
        .rate           = 0,
        .parent         = &clk_upll,
 };
@@ -330,7 +251,6 @@ struct clk clk_usb_bus = {
 
 struct clk s3c24xx_uclk = {
        .name           = "uclk",
-       .id             = -1,
 };
 
 /* initialise the clock system */
@@ -346,14 +266,11 @@ int s3c24xx_register_clock(struct clk *clk)
        if (clk->enable == NULL)
                clk->enable = clk_null_enable;
 
-       /* add to the list of available clocks */
-
-       /* Quick check to see if this clock has already been registered. */
-       BUG_ON(clk->list.prev != clk->list.next);
-
-       spin_lock(&clocks_lock);
-       list_add(&clk->list, &clocks);
-       spin_unlock(&clocks_lock);
+       /* fill up the clk_lookup structure and register it*/
+       clk->lookup.dev_id = clk->devname;
+       clk->lookup.con_id = clk->name;
+       clk->lookup.clk = clk;
+       clkdev_add(&clk->lookup);
 
        return 0;
 }
@@ -463,10 +380,7 @@ static int clk_debugfs_register_one(struct clk *c)
        char s[255];
        char *p = s;
 
-       p += sprintf(p, "%s", c->name);
-
-       if (c->id >= 0)
-               sprintf(p, ":%d", c->id);
+       p += sprintf(p, "%s", c->devname);
 
        d = debugfs_create_dir(s, pa ? pa->dent : clk_debugfs_root);
        if (!d)
diff --git a/arch/arm/plat-samsung/dev-backlight.c b/arch/arm/plat-samsung/dev-backlight.c
new file mode 100644 (file)
index 0000000..3cedd4c
--- /dev/null
@@ -0,0 +1,149 @@
+/* linux/arch/arm/plat-samsung/dev-backlight.c
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ *              http://www.samsung.com
+ *
+ * Common infrastructure for PWM Backlight for Samsung boards
+ *
+ * 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/gpio.h>
+#include <linux/platform_device.h>
+#include <linux/io.h>
+#include <linux/pwm_backlight.h>
+
+#include <plat/devs.h>
+#include <plat/gpio-cfg.h>
+#include <plat/backlight.h>
+
+static int samsung_bl_init(struct device *dev)
+{
+       int ret = 0;
+       struct platform_device *timer_dev =
+                       container_of(dev->parent, struct platform_device, dev);
+       struct samsung_bl_gpio_info *bl_gpio_info =
+                       timer_dev->dev.platform_data;
+
+       ret = gpio_request(bl_gpio_info->no, "Backlight");
+       if (ret) {
+               printk(KERN_ERR "failed to request GPIO for LCD Backlight\n");
+               return ret;
+       }
+
+       /* Configure GPIO pin with specific GPIO function for PWM timer */
+       s3c_gpio_cfgpin(bl_gpio_info->no, bl_gpio_info->func);
+
+       return 0;
+}
+
+static void samsung_bl_exit(struct device *dev)
+{
+       struct platform_device *timer_dev =
+                       container_of(dev->parent, struct platform_device, dev);
+       struct samsung_bl_gpio_info *bl_gpio_info =
+                       timer_dev->dev.platform_data;
+
+       s3c_gpio_cfgpin(bl_gpio_info->no, S3C_GPIO_OUTPUT);
+       gpio_free(bl_gpio_info->no);
+}
+
+/* Initialize few important fields of platform_pwm_backlight_data
+ * structure with default values. These fields can be overridden by
+ * board-specific values sent from machine file.
+ * For ease of operation, these fields are initialized with values
+ * used by most samsung boards.
+ * Users has the option of sending info about other parameters
+ * for their specific boards
+ */
+
+static struct platform_pwm_backlight_data samsung_dfl_bl_data __initdata = {
+       .max_brightness = 255,
+       .dft_brightness = 255,
+       .pwm_period_ns  = 78770,
+       .init           = samsung_bl_init,
+       .exit           = samsung_bl_exit,
+};
+
+static struct platform_device samsung_dfl_bl_device __initdata = {
+       .name           = "pwm-backlight",
+};
+
+/* samsung_bl_set - Set board specific data (if any) provided by user for
+ * PWM Backlight control and register specific PWM and backlight device.
+ * @gpio_info: structure containing GPIO info for PWM timer
+ * @bl_data:   structure containing Backlight control data
+ */
+void samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
+       struct platform_pwm_backlight_data *bl_data)
+{
+       int ret = 0;
+       struct platform_device *samsung_bl_device;
+       struct platform_pwm_backlight_data *samsung_bl_data;
+
+       samsung_bl_device = kmemdup(&samsung_dfl_bl_device,
+                       sizeof(struct platform_device), GFP_KERNEL);
+       if (!samsung_bl_device) {
+               printk(KERN_ERR "%s: no memory for platform dev\n", __func__);
+               return;
+       }
+
+       samsung_bl_data = s3c_set_platdata(&samsung_dfl_bl_data,
+               sizeof(struct platform_pwm_backlight_data), samsung_bl_device);
+       if (!samsung_bl_data) {
+               printk(KERN_ERR "%s: no memory for platform dev\n", __func__);
+               goto err_data;
+       }
+
+       /* Copy board specific data provided by user */
+       samsung_bl_data->pwm_id = bl_data->pwm_id;
+       samsung_bl_device->dev.parent =
+                       &s3c_device_timer[samsung_bl_data->pwm_id].dev;
+
+       if (bl_data->max_brightness)
+               samsung_bl_data->max_brightness = bl_data->max_brightness;
+       if (bl_data->dft_brightness)
+               samsung_bl_data->dft_brightness = bl_data->dft_brightness;
+       if (bl_data->lth_brightness)
+               samsung_bl_data->lth_brightness = bl_data->lth_brightness;
+       if (bl_data->pwm_period_ns)
+               samsung_bl_data->pwm_period_ns = bl_data->pwm_period_ns;
+       if (bl_data->init)
+               samsung_bl_data->init = bl_data->init;
+       if (bl_data->notify)
+               samsung_bl_data->notify = bl_data->notify;
+       if (bl_data->exit)
+               samsung_bl_data->exit = bl_data->exit;
+       if (bl_data->check_fb)
+               samsung_bl_data->check_fb = bl_data->check_fb;
+
+       /* Keep the GPIO info for future use */
+       s3c_device_timer[samsung_bl_data->pwm_id].dev.platform_data = gpio_info;
+
+       /* Register the specific PWM timer dev for Backlight control */
+       ret = platform_device_register(
+                       &s3c_device_timer[samsung_bl_data->pwm_id]);
+       if (ret) {
+               printk(KERN_ERR "failed to register pwm timer for backlight: %d\n", ret);
+               goto err_plat_reg1;
+       }
+
+       /* Register the Backlight dev */
+       ret = platform_device_register(samsung_bl_device);
+       if (ret) {
+               printk(KERN_ERR "failed to register backlight device: %d\n", ret);
+               goto err_plat_reg2;
+       }
+
+       return;
+
+err_plat_reg2:
+       platform_device_unregister(&s3c_device_timer[samsung_bl_data->pwm_id]);
+err_plat_reg1:
+       kfree(samsung_bl_data);
+err_data:
+       kfree(samsung_bl_device);
+       return;
+}
index bf60204c62976f1b583d08eebe34bd13d23500d7..49a1362fd25b616d1e087c05982451fe781fd0b5 100644 (file)
@@ -58,16 +58,6 @@ struct platform_device s3c_device_fb = {
 
 void __init s3c_fb_set_platdata(struct s3c_fb_platdata *pd)
 {
-       struct s3c_fb_platdata *npd;
-
-       if (!pd) {
-               printk(KERN_ERR "%s: no platform data\n", __func__);
-               return;
-       }
-
-       npd = kmemdup(pd, sizeof(struct s3c_fb_platdata), GFP_KERNEL);
-       if (!npd)
-               printk(KERN_ERR "%s: no memory for platform data\n", __func__);
-
-       s3c_device_fb.dev.platform_data = npd;
+       s3c_set_platdata(pd, sizeof(struct s3c_fb_platdata),
+                        &s3c_device_fb);
 }
index b3ffb9587250ca90387f48ffdde872ac6d4793a7..c91a79ce8f3947399f98e3fb8e7934c757e0175d 100644 (file)
@@ -27,16 +27,6 @@ struct platform_device s3c_device_hwmon = {
 
 void __init s3c_hwmon_set_platdata(struct s3c_hwmon_pdata *pd)
 {
-       struct s3c_hwmon_pdata *npd;
-
-       if (!pd) {
-               printk(KERN_ERR "%s: no platform data\n", __func__);
-               return;
-       }
-
-       npd = kmemdup(pd, sizeof(struct s3c_hwmon_pdata), GFP_KERNEL);
-       if (!npd)
-               printk(KERN_ERR "%s: no memory for platform data\n", __func__);
-
-       s3c_device_hwmon.dev.platform_data = npd;
+       s3c_set_platdata(pd, sizeof(struct s3c_hwmon_pdata),
+                        &s3c_device_hwmon);
 }
index 3a601c16f03c78c4a40dcd81c70d24b503204c09..f8251f5098bd868867e957fb82a62fa39155cd5e 100644 (file)
@@ -48,7 +48,7 @@ struct platform_device s3c_device_i2c0 = {
        .resource         = s3c_i2c_resource,
 };
 
-static struct s3c2410_platform_i2c default_i2c_data0 __initdata = {
+struct s3c2410_platform_i2c default_i2c_data __initdata = {
        .flags          = 0,
        .slave_addr     = 0x10,
        .frequency      = 100*1000,
@@ -60,13 +60,11 @@ void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd)
        struct s3c2410_platform_i2c *npd;
 
        if (!pd)
-               pd = &default_i2c_data0;
+               pd = &default_i2c_data;
 
-       npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL);
-       if (!npd)
-               printk(KERN_ERR "%s: no memory for platform data\n", __func__);
-       else if (!npd->cfg_gpio)
-               npd->cfg_gpio = s3c_i2c0_cfg_gpio;
+       npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
+                              &s3c_device_i2c0);
 
-       s3c_device_i2c0.dev.platform_data = npd;
+       if (!npd->cfg_gpio)
+               npd->cfg_gpio = s3c_i2c0_cfg_gpio;
 }
index 858ee2a0414c57154129cbb07bb06ccd2aa9121c..3b7c7bec1cf9a88b5d0a04f83d0b3d8a2e790653 100644 (file)
@@ -44,26 +44,18 @@ struct platform_device s3c_device_i2c1 = {
        .resource         = s3c_i2c_resource,
 };
 
-static struct s3c2410_platform_i2c default_i2c_data1 __initdata = {
-       .flags          = 0,
-       .bus_num        = 1,
-       .slave_addr     = 0x10,
-       .frequency      = 100*1000,
-       .sda_delay      = 100,
-};
-
 void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd)
 {
        struct s3c2410_platform_i2c *npd;
 
-       if (!pd)
-               pd = &default_i2c_data1;
+       if (!pd) {
+               pd = &default_i2c_data;
+               pd->bus_num = 1;
+       }
 
-       npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL);
-       if (!npd)
-               printk(KERN_ERR "%s: no memory for platform data\n", __func__);
-       else if (!npd->cfg_gpio)
-               npd->cfg_gpio = s3c_i2c1_cfg_gpio;
+       npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
+                              &s3c_device_i2c1);
 
-       s3c_device_i2c1.dev.platform_data = npd;
+       if (!npd->cfg_gpio)
+               npd->cfg_gpio = s3c_i2c1_cfg_gpio;
 }
index ff4ba69b683013e358c3e2221351fecc7ff9241d..07e9fd0b1b8b7657c9b75b6e14941b8253ffc171 100644 (file)
@@ -45,26 +45,18 @@ struct platform_device s3c_device_i2c2 = {
        .resource         = s3c_i2c_resource,
 };
 
-static struct s3c2410_platform_i2c default_i2c_data2 __initdata = {
-       .flags          = 0,
-       .bus_num        = 2,
-       .slave_addr     = 0x10,
-       .frequency      = 100*1000,
-       .sda_delay      = 100,
-};
-
 void __init s3c_i2c2_set_platdata(struct s3c2410_platform_i2c *pd)
 {
        struct s3c2410_platform_i2c *npd;
 
-       if (!pd)
-               pd = &default_i2c_data2;
+       if (!pd) {
+               pd = &default_i2c_data;
+               pd->bus_num = 2;
+       }
 
-       npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL);
-       if (!npd)
-               printk(KERN_ERR "%s: no memory for platform data\n", __func__);
-       else if (!npd->cfg_gpio)
-               npd->cfg_gpio = s3c_i2c2_cfg_gpio;
+       npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
+                              &s3c_device_i2c2);
 
-       s3c_device_i2c2.dev.platform_data = npd;
+       if (!npd->cfg_gpio)
+               npd->cfg_gpio = s3c_i2c2_cfg_gpio;
 }
index 8586a10014b70930710afc820dfc43ed64511823..d48efa93c6e781812d7fb0891dadd8422a82795e 100644 (file)
@@ -43,26 +43,18 @@ struct platform_device s3c_device_i2c3 = {
        .resource       = s3c_i2c_resource,
 };
 
-static struct s3c2410_platform_i2c default_i2c_data3 __initdata = {
-       .flags          = 0,
-       .bus_num        = 3,
-       .slave_addr     = 0x10,
-       .frequency      = 100*1000,
-       .sda_delay      = 100,
-};
-
 void __init s3c_i2c3_set_platdata(struct s3c2410_platform_i2c *pd)
 {
        struct s3c2410_platform_i2c *npd;
 
-       if (!pd)
-               pd = &default_i2c_data3;
+       if (!pd) {
+               pd = &default_i2c_data;
+               pd->bus_num = 3;
+       }
 
-       npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL);
-       if (!npd)
-               printk(KERN_ERR "%s: no memory for platform data\n", __func__);
-       else if (!npd->cfg_gpio)
-               npd->cfg_gpio = s3c_i2c3_cfg_gpio;
+       npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
+                              &s3c_device_i2c3);
 
-       s3c_device_i2c3.dev.platform_data = npd;
+       if (!npd->cfg_gpio)
+               npd->cfg_gpio = s3c_i2c3_cfg_gpio;
 }
index df2159e2daa6822617c7590716949cf37df9e929..07e26444efe61b17d7768ad02791b7ed22af14cf 100644 (file)
@@ -43,26 +43,18 @@ struct platform_device s3c_device_i2c4 = {
        .resource       = s3c_i2c_resource,
 };
 
-static struct s3c2410_platform_i2c default_i2c_data4 __initdata = {
-       .flags          = 0,
-       .bus_num        = 4,
-       .slave_addr     = 0x10,
-       .frequency      = 100*1000,
-       .sda_delay      = 100,
-};
-
 void __init s3c_i2c4_set_platdata(struct s3c2410_platform_i2c *pd)
 {
        struct s3c2410_platform_i2c *npd;
 
-       if (!pd)
-               pd = &default_i2c_data4;
+       if (!pd) {
+               pd = &default_i2c_data;
+               pd->bus_num = 4;
+       }
 
-       npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL);
-       if (!npd)
-               printk(KERN_ERR "%s: no memory for platform data\n", __func__);
-       else if (!npd->cfg_gpio)
-               npd->cfg_gpio = s3c_i2c4_cfg_gpio;
+       npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
+                              &s3c_device_i2c4);
 
-       s3c_device_i2c4.dev.platform_data = npd;
+       if (!npd->cfg_gpio)
+               npd->cfg_gpio = s3c_i2c4_cfg_gpio;
 }
index 0499c2c3877b8521d3f6f12a9d3da0eb7d96665c..f49655784563213991cdde904608c9e6f9123c67 100644 (file)
@@ -43,26 +43,18 @@ struct platform_device s3c_device_i2c5 = {
        .resource       = s3c_i2c_resource,
 };
 
-static struct s3c2410_platform_i2c default_i2c_data5 __initdata = {
-       .flags          = 0,
-       .bus_num        = 5,
-       .slave_addr     = 0x10,
-       .frequency      = 100*1000,
-       .sda_delay      = 100,
-};
-
 void __init s3c_i2c5_set_platdata(struct s3c2410_platform_i2c *pd)
 {
        struct s3c2410_platform_i2c *npd;
 
-       if (!pd)
-               pd = &default_i2c_data5;
+       if (!pd) {
+               pd = &default_i2c_data;
+               pd->bus_num = 5;
+       }
 
-       npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL);
-       if (!npd)
-               printk(KERN_ERR "%s: no memory for platform data\n", __func__);
-       else if (!npd->cfg_gpio)
-               npd->cfg_gpio = s3c_i2c5_cfg_gpio;
+       npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
+                              &s3c_device_i2c5);
 
-       s3c_device_i2c5.dev.platform_data = npd;
+       if (!npd->cfg_gpio)
+               npd->cfg_gpio = s3c_i2c5_cfg_gpio;
 }
index 4083108908a8b8518971edb7de645dbccd8df407..141d799944e2fd0605b956ceeb99359bc34c43ca 100644 (file)
@@ -43,26 +43,18 @@ struct platform_device s3c_device_i2c6 = {
        .resource       = s3c_i2c_resource,
 };
 
-static struct s3c2410_platform_i2c default_i2c_data6 __initdata = {
-       .flags          = 0,
-       .bus_num        = 6,
-       .slave_addr     = 0x10,
-       .frequency      = 100*1000,
-       .sda_delay      = 100,
-};
-
 void __init s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *pd)
 {
        struct s3c2410_platform_i2c *npd;
 
-       if (!pd)
-               pd = &default_i2c_data6;
+       if (!pd) {
+               pd = &default_i2c_data;
+               pd->bus_num = 6;
+       }
 
-       npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL);
-       if (!npd)
-               printk(KERN_ERR "%s: no memory for platform data\n", __func__);
-       else if (!npd->cfg_gpio)
-               npd->cfg_gpio = s3c_i2c6_cfg_gpio;
+       npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
+                              &s3c_device_i2c6);
 
-       s3c_device_i2c6.dev.platform_data = npd;
+       if (!npd->cfg_gpio)
+               npd->cfg_gpio = s3c_i2c6_cfg_gpio;
 }
index 1182451d7dce62191d9d1c3b3d9af23c45db2bd6..9dddcd1665b51f600e9b3dd5331f2603123065f2 100644 (file)
@@ -43,26 +43,18 @@ struct platform_device s3c_device_i2c7 = {
        .resource       = s3c_i2c_resource,
 };
 
-static struct s3c2410_platform_i2c default_i2c_data7 __initdata = {
-       .flags          = 0,
-       .bus_num        = 7,
-       .slave_addr     = 0x10,
-       .frequency      = 100*1000,
-       .sda_delay      = 100,
-};
-
 void __init s3c_i2c7_set_platdata(struct s3c2410_platform_i2c *pd)
 {
        struct s3c2410_platform_i2c *npd;
 
-       if (!pd)
-               pd = &default_i2c_data7;
+       if (!pd) {
+               pd = &default_i2c_data;
+               pd->bus_num = 7;
+       }
 
-       npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL);
-       if (!npd)
-               printk(KERN_ERR "%s: no memory for platform data\n", __func__);
-       else if (!npd->cfg_gpio)
-               npd->cfg_gpio = s3c_i2c7_cfg_gpio;
+       npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
+                              &s3c_device_i2c7);
 
-       s3c_device_i2c7.dev.platform_data = npd;
+       if (!npd->cfg_gpio)
+               npd->cfg_gpio = s3c_i2c7_cfg_gpio;
 }
index 6927ae8fd118815620b1383dd7d314911a4e78fa..b8e30ec6ac2648c633f9c941ea3b79f9e3f0300d 100644 (file)
@@ -91,11 +91,10 @@ void __init s3c_nand_set_platdata(struct s3c2410_platform_nand *nand)
         * time then there is little chance the system is going to run.
         */ 
 
-       npd = kmemdup(nand, sizeof(struct s3c2410_platform_nand), GFP_KERNEL);
-       if (!npd) {
-               printk(KERN_ERR "%s: failed copying platform data\n", __func__);
+       npd = s3c_set_platdata(nand, sizeof(struct s3c2410_platform_nand),
+                               &s3c_device_nand);
+       if (!npd)
                return;
-       }
 
        /* now see if we need to copy any of the nand set data */
 
@@ -123,6 +122,4 @@ void __init s3c_nand_set_platdata(struct s3c2410_platform_nand *nand)
                        to++;
                }
        }
-
-       s3c_device_nand.dev.platform_data = npd;
 }
index 3e4bd8147bf408bfb04b1b1368eac198416c8012..82543f0248ac38ae4f50bfb7b5a102659cf8952f 100644 (file)
@@ -45,16 +45,6 @@ struct platform_device s3c_device_ts = {
 
 void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *pd)
 {
-       struct s3c2410_ts_mach_info *npd;
-
-       if (!pd) {
-               printk(KERN_ERR "%s: no platform data\n", __func__);
-               return;
-       }
-
-       npd = kmemdup(pd, sizeof(struct s3c2410_ts_mach_info), GFP_KERNEL);
-       if (!npd)
-               printk(KERN_ERR "%s: no memory for platform data\n", __func__);
-
-       s3c_device_ts.dev.platform_data = npd;
+       s3c_set_platdata(pd, sizeof(struct s3c2410_ts_mach_info),
+                        &s3c_device_ts);
 }
index 0e0a3bf5c982121ea08021db043dccfaf7b7d3c1..33fbaa96770048df82b08940bbfc6dccaffff512 100644 (file)
@@ -60,11 +60,6 @@ EXPORT_SYMBOL(s3c_device_ohci);
  */
 void __init s3c_ohci_set_platdata(struct s3c2410_hcd_info *info)
 {
-       struct s3c2410_hcd_info *npd;
-
-       npd = kmemdup(info, sizeof(struct s3c2410_hcd_info), GFP_KERNEL);
-       if (!npd)
-               printk(KERN_ERR "%s: no memory for platform data\n", __func__);
-
-       s3c_device_ohci.dev.platform_data = npd;
+       s3c_set_platdata(info, sizeof(struct s3c2410_hcd_info),
+                        &s3c_device_ohci);
 }
diff --git a/arch/arm/plat-samsung/include/plat/backlight.h b/arch/arm/plat-samsung/include/plat/backlight.h
new file mode 100644 (file)
index 0000000..51d8da8
--- /dev/null
@@ -0,0 +1,26 @@
+/* linux/arch/arm/plat-samsung/include/plat/backlight.h
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ *              http://www.samsung.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_PLAT_BACKLIGHT_H
+#define __ASM_PLAT_BACKLIGHT_H __FILE__
+
+/* samsung_bl_gpio_info - GPIO info for PWM Backlight control
+ * @no:                GPIO number for PWM timer out
+ * @func:      Special function of GPIO line for PWM timer
+ */
+struct samsung_bl_gpio_info {
+       int no;
+       int func;
+};
+
+extern void samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
+       struct platform_pwm_backlight_data *bl_data);
+
+#endif /* __ASM_PLAT_BACKLIGHT_H */
index 983c578b82764d28e1a1ecf47e482aee2b7b3bc9..87d5b38a86fb77a19144f476f2691a7a735d2229 100644 (file)
@@ -10,6 +10,7 @@
 */
 
 #include <linux/spinlock.h>
+#include <linux/clkdev.h>
 
 struct clk;
 
@@ -40,6 +41,7 @@ struct clk {
        struct module        *owner;
        struct clk           *parent;
        const char           *name;
+       const char              *devname;
        int                   id;
        int                   usage;
        unsigned long         rate;
@@ -47,6 +49,7 @@ struct clk {
 
        struct clk_ops          *ops;
        int                 (*enable)(struct clk *, int enable);
+       struct clk_lookup       lookup;
 #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS)
        struct dentry           *dent;  /* For visible tree hierarchy */
 #endif
index 3ad8386599c3f2af4b3e64d23cd567e9ff6fbf3a..9a4e53d5296747b35411b85ae8f5ae572fb4ea9a 100644 (file)
@@ -140,7 +140,7 @@ extern unsigned s3c_gpio_getcfg_s3c64xx_4bit(struct s3c_gpio_chip *chip,
 
 /* Pull-{up,down} resistor controls.
  *
- * S3C2410,S3C2440,S3C24A0 = Pull-UP,
+ * S3C2410,S3C2440 = Pull-UP,
  * S3C2412,S3C2413 = Pull-Down
  * S3C6400,S3C6410 = Pull-Both [None,Down,Up,Undef]
  * S3C2443 = Pull-Both [not same as S3C6400]
index 1543da8f85c1727168f7f622182940ba27ce801b..56b0059439e158edba132f10c15fdaa1fba14e1b 100644 (file)
@@ -71,4 +71,6 @@ extern void s3c_i2c5_cfg_gpio(struct platform_device *dev);
 extern void s3c_i2c6_cfg_gpio(struct platform_device *dev);
 extern void s3c_i2c7_cfg_gpio(struct platform_device *dev);
 
+extern struct s3c2410_platform_i2c default_i2c_data;
+
 #endif /* __ASM_ARCH_IIC_H */
index 116edfe120b972612aad96fa9217ad2fdc279c84..bac36fa3becb3e9af9a6607a7af6e7334b323cb6 100644 (file)
 #define S3C2410_UFSTAT_RXMASK    (15<<0)
 #define S3C2410_UFSTAT_RXSHIFT   (0)
 
-/* UFSTAT S3C24A0 */
-#define S3C24A0_UFSTAT_TXFULL    (1 << 14)
-#define S3C24A0_UFSTAT_RXFULL    (1 << 6)
-#define S3C24A0_UFSTAT_TXMASK    (63 << 8)
-#define S3C24A0_UFSTAT_TXSHIFT   (8)
-#define S3C24A0_UFSTAT_RXMASK    (63)
-#define S3C24A0_UFSTAT_RXSHIFT   (0)
-
 /* UFSTAT S3C2443 same as S3C2440 */
 #define S3C2440_UFSTAT_TXFULL    (1<<14)
 #define S3C2440_UFSTAT_RXFULL    (1<<6)
index 6b733fafe7cda41815d88115fa866d1a6976a71b..3cbd62666b1ef291ba89b3d75a4795a1424cf6f0 100644 (file)
@@ -72,7 +72,7 @@ static void s3c_pm_run_sysram(run_fn_t fn, u32 *arg)
 
 static u32 *s3c_pm_countram(struct resource *res, u32 *val)
 {
-       u32 size = (u32)(res->end - res->start)+1;
+       u32 size = (u32)resource_size(res);
 
        size += CHECK_CHUNKSIZE-1;
        size /= CHECK_CHUNKSIZE;
index 46c9381e083b2e19a8a40499d9baec71a5a68c68..f1bba88ed2f571f9980a56c0af29798e6d75e244 100644 (file)
@@ -268,6 +268,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = {
        [0]     = {
                .clk    = {
                        .name   = "pwm-tdiv",
+                       .devname        = "s3c24xx-pwm.0",
                        .ops    = &clk_tdiv_ops,
                        .parent = &clk_timer_scaler[0],
                },
@@ -275,6 +276,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = {
        [1]     = {
                .clk    = {
                        .name   = "pwm-tdiv",
+                       .devname        = "s3c24xx-pwm.1",
                        .ops    = &clk_tdiv_ops,
                        .parent = &clk_timer_scaler[0],
                }
@@ -282,6 +284,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = {
        [2]     = {
                .clk    = {
                        .name   = "pwm-tdiv",
+                       .devname        = "s3c24xx-pwm.2",
                        .ops    = &clk_tdiv_ops,
                        .parent = &clk_timer_scaler[1],
                },
@@ -289,6 +292,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = {
        [3]     = {
                .clk    = {
                        .name   = "pwm-tdiv",
+                       .devname        = "s3c24xx-pwm.3",
                        .ops    = &clk_tdiv_ops,
                        .parent = &clk_timer_scaler[1],
                },
@@ -296,6 +300,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = {
        [4]     = {
                .clk    = {
                        .name   = "pwm-tdiv",
+                       .devname        = "s3c24xx-pwm.4",
                        .ops    = &clk_tdiv_ops,
                        .parent = &clk_timer_scaler[1],
                },
@@ -361,26 +366,31 @@ static struct clk_ops clk_tin_ops = {
 static struct clk clk_tin[] = {
        [0]     = {
                .name   = "pwm-tin",
+               .devname        = "s3c24xx-pwm.0",
                .id     = 0,
                .ops    = &clk_tin_ops,
        },
        [1]     = {
                .name   = "pwm-tin",
+               .devname        = "s3c24xx-pwm.1",
                .id     = 1,
                .ops    = &clk_tin_ops,
        },
        [2]     = {
                .name   = "pwm-tin",
+               .devname        = "s3c24xx-pwm.2",
                .id     = 2,
                .ops    = &clk_tin_ops,
        },
        [3]     = {
                .name   = "pwm-tin",
+               .devname        = "s3c24xx-pwm.3",
                .id     = 3,
                .ops    = &clk_tin_ops,
        },
        [4]     = {
                .name   = "pwm-tin",
+               .devname        = "s3c24xx-pwm.4",
                .id     = 4,
                .ops    = &clk_tin_ops,
        },
index 2231d80ad817356ada2d2b03c95c666dada13c57..e3bb806bbafe2397a1d6072a3e77306591eb914c 100644 (file)
@@ -259,6 +259,8 @@ static void __init s3c2410_timer_resources(void)
        clk_enable(timerclk);
 
        if (!use_tclk1_12()) {
+               tmpdev.id = 4;
+               tmpdev.dev.init_name = "s3c24xx-pwm.4";
                tin = clk_get(&tmpdev.dev, "pwm-tin");
                if (IS_ERR(tin))
                        panic("failed to get pwm-tin clock for system timer");
index bb0974cce4accf3c0a0d01cdfce08d7533d86ab7..b4247f4780657993eef27f9e15ed2169b088793b 100644 (file)
@@ -444,7 +444,7 @@ static unsigned long __init
 find_bootmap_pfn(const struct resource *mem)
 {
        unsigned long bootmap_pages, bootmap_len;
-       unsigned long node_pages = PFN_UP(mem->end - mem->start + 1);
+       unsigned long node_pages = PFN_UP(resource_size(mem));
        unsigned long bootmap_start;
 
        bootmap_pages = bootmem_bootmap_pages(node_pages);
@@ -541,10 +541,10 @@ static void __init setup_bootmem(void)
                         */
                        if (res->start >= PFN_PHYS(first_pfn)
                            && res->end < PFN_PHYS(max_pfn))
-                               reserve_bootmem_node(
-                                       NODE_DATA(node), res->start,
-                                       res->end - res->start + 1,
-                                       BOOTMEM_DEFAULT);
+                               reserve_bootmem_node(NODE_DATA(node),
+                                                    res->start,
+                                                    resource_size(res),
+                                                    BOOTMEM_DEFAULT);
                }
 
                node_set_online(node);
index fbc2aeaebddbde6023bb4853814f2e598436a1bd..cfb298d6630582b6924824a6b7bd4aed4663d526 100644 (file)
@@ -204,7 +204,7 @@ static int __init eic_probe(struct platform_device *pdev)
        }
 
        eic->first_irq = EIM_IRQ_BASE + 32 * pdev->id;
-       eic->regs = ioremap(regs->start, regs->end - regs->start + 1);
+       eic->regs = ioremap(regs->start, resource_size(regs));
        if (!eic->regs) {
                dev_dbg(&pdev->dev, "failed to map regs\n");
                goto err_ioremap;
index f7672d3e86b842b56e74cad31a4892ba42d05e2f..f66245e6e63e7876291901bbe138fc52d765b9c4 100644 (file)
@@ -245,7 +245,7 @@ static int hsmc_probe(struct platform_device *pdev)
 
        hsmc->pclk = pclk;
        hsmc->mck = mck;
-       hsmc->regs = ioremap(regs->start, regs->end - regs->start + 1);
+       hsmc->regs = ioremap(regs->start, resource_size(regs));
        if (!hsmc->regs)
                goto out_disable_clocks;
 
index c9ac2f8e8f648af54f08407c7f31fb85a4807d06..258682bc12784cf08914e252c4d05279ecdb7329 100644 (file)
@@ -107,7 +107,7 @@ void __init init_IRQ(void)
 
        clk_enable(pclk);
 
-       intc0.regs = ioremap(regs->start, regs->end - regs->start + 1);
+       intc0.regs = ioremap(regs->start, resource_size(regs));
        if (!intc0.regs) {
                printk(KERN_EMERG "intc: failed to map registers (0x%08lx)\n",
                       (unsigned long)regs->start);
index 2e0aa853a4bcecec88339d30b22d112114edc5be..9b39dea6682f83de9f81561ab6619299ede26c2e 100644 (file)
@@ -461,7 +461,7 @@ void __init at32_init_pio(struct platform_device *pdev)
                clk_enable(pio->clk);
 
        pio->pdev = pdev;
-       pio->regs = ioremap(regs->start, regs->end - regs->start + 1);
+       pio->regs = ioremap(regs->start, resource_size(regs));
 
        /* start with irqs disabled and acked */
        pio_writel(pio, IDR, ~0UL);
index 7fda657110eb3d7a7cab104dd3d81f1693506526..68d651081bd3f00dcbc71767e86b1614a98c9ab8 100644 (file)
@@ -46,7 +46,7 @@
 #include <asm/regs267x.h>
 #endif
 
-#define STUBSIZE 0xc000;
+#define STUBSIZE 0xc000
 
 unsigned long rom_length;
 unsigned long memory_start;
index 893468e1b41b7f4214a9f1057f6387015c7dd671..6eae8ada90f00f308fbb8e5c2e12721d795e1c31 100644 (file)
@@ -467,7 +467,7 @@ typedef volatile struct tioce {
 #define CE_LSI_GB_CFG1_RXL0S_THS_SHFT  0
 #define CE_LSI_GB_CFG1_RXL0S_THS_MASK  (0xffULL << 0)
 #define CE_LSI_GB_CFG1_RXL0S_SMP_SHFT  8
-#define CE_LSI_GB_CFG1_RXL0S_SMP_MASK  (0xfULL << 8);
+#define CE_LSI_GB_CFG1_RXL0S_SMP_MASK  (0xfULL << 8)
 #define CE_LSI_GB_CFG1_RXL0S_ADJ_SHFT  12
 #define CE_LSI_GB_CFG1_RXL0S_ADJ_MASK  (0x7ULL << 12)
 #define CE_LSI_GB_CFG1_RXL0S_FLT_SHFT  15
index 041b1d86d75b8ca5a81ea2ed234f4a84a7db844e..4cfae20f1067a81af7b4a2d58ea0d84ebbe3769c 100644 (file)
@@ -94,7 +94,7 @@ void pcibios_free_controller(struct pci_controller *phb)
 
 static resource_size_t pcibios_io_size(const struct pci_controller *hose)
 {
-       return hose->io_resource.end - hose->io_resource.start + 1;
+       return resource_size(&hose->io_resource);
 }
 
 int pcibios_vaddr_is_ioport(void __iomem *address)
index 73b529b57433d359ab75d6a9733d79ed925417d9..cfae81571dedd91d9411d7457fc9322497b93896 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  Copyright (C) 2004 Florian Schirmer <jolt@tuxbox.org>
  *  Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
- *  Copyright (C) 2006 Michael Buesch <mb@bu3sch.de>
+ *  Copyright (C) 2006 Michael Buesch <m@bues.ch>
  *  Copyright (C) 2010 Waldemar Brodkorb <wbx@openadk.org>
  *  Copyright (C) 2010-2011 Hauke Mehrtens <hauke@hauke-m.de>
  *
index c5c7c0e6064c509b92c4c965bab3264a2318beab..4456c9c47e2144c67cd2449c98f9c8e4e5a1728b 100644 (file)
@@ -29,7 +29,7 @@ static inline void fd_cacheflush(char * addr, long size)
 #define FLOPPY0_TYPE           fd_drive_type(0)
 #define FLOPPY1_TYPE           fd_drive_type(1)
 
-#define FDC1                   fd_getfdaddr1();
+#define FDC1                   fd_getfdaddr1()
 
 #define N_FDC 1                        /* do you *really* want a second controller? */
 #define N_DRIVE 8
index 7b74703745bb16b6e69c23a0658d589e934e1ade..1a6482ea0bb37d6413a51cbeb880f96563da96fc 100644 (file)
@@ -25,14 +25,13 @@ enum jz_gpio_function {
     JZ_GPIO_FUNC3,
 };
 
-
 /*
  Usually a driver for a SoC component has to request several gpio pins and
  configure them as funcion pins.
  jz_gpio_bulk_request can be used to ease this process.
  Usually one would do something like:
 
const static struct jz_gpio_bulk_request i2c_pins[] = {
static const struct jz_gpio_bulk_request i2c_pins[] = {
        JZ_GPIO_BULK_PIN(I2C_SDA),
        JZ_GPIO_BULK_PIN(I2C_SCK),
  };
@@ -47,8 +46,8 @@ enum jz_gpio_function {
 
     jz_gpio_bulk_free(i2c_pins, ARRAY_SIZE(i2c_pins));
 
-
 */
+
 struct jz_gpio_bulk_request {
        int gpio;
        const char *name;
index 7b82c34cb16915f0a4446c98e0d1b674a7f47512..44a36771c819bebcb03732744566764c6d60b574 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/leds.h>
 #include <linux/etherdevice.h>
-#include <linux/reboot.h>
 #include <linux/time.h>
 #include <linux/io.h>
 #include <linux/gpio.h>
-#include <linux/leds.h>
 
 #include <asm/bootinfo.h>
 #include <asm/irq.h>
index e09e789dfc27f9b9f80749455a416241c418eb0a..d0e32ab2ea074b9fa75ebd56e2c77ff1a15c994a 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/leds.h>
 #include <linux/etherdevice.h>
-#include <linux/reboot.h>
 #include <linux/time.h>
 #include <linux/io.h>
 #include <linux/gpio.h>
-#include <linux/leds.h>
 
 #include <asm/bootinfo.h>
 #include <asm/irq.h>
index f31218e17d3c1437f4f8ef15a7d1855ddc6a32fb..764362ce5e404119b375f327d0c01111ee559383 100644 (file)
@@ -215,7 +215,7 @@ static int __init rc32434_pci_init(void)
        rc32434_pcibridge_init();
 
        io_map_base = ioremap(rc32434_res_pci_io1.start,
-               rc32434_res_pci_io1.end - rc32434_res_pci_io1.start + 1);
+                             resource_size(&rcrc32434_res_pci_io1));
 
        if (!io_map_base)
                return -ENOMEM;
index 56525711f8b75deb270b6c6b7f32db0b38289029..444b8d8004ad392d34dd69e3f63006365396df43 100644 (file)
@@ -305,7 +305,7 @@ static int __init vr41xx_pciu_init(void)
                struct resource *res = vr41xx_pci_controller.io_resource;
                master = setup->master_io;
                io_map_base = ioremap(master->bus_base_address,
-                                     res->end - res->start + 1);
+                                     resource_size(res));
                if (!io_map_base)
                        return -EBUSY;
 
index e56fa61b39916a8e869350f715ee4d169c37f122..bce1872249bab6b4fba83950354078919451f37e 100644 (file)
@@ -394,23 +394,21 @@ void __init platform_alloc_bootmem(void)
 
        /* Loop through looking for resources that want a particular address */
        for (i = 0; gp_resources[i].flags != 0; i++) {
-               int size = gp_resources[i].end - gp_resources[i].start + 1;
+               int size = resource_size(&gp_resources[i]);
                if ((gp_resources[i].start != 0) &&
                        ((gp_resources[i].flags & IORESOURCE_MEM) != 0)) {
                        reserve_bootmem(dma_to_phys(gp_resources[i].start),
                                size, 0);
-                       total += gp_resources[i].end -
-                               gp_resources[i].start + 1;
+                       total += resource_size(&gp_resources[i]);
                        pr_info("reserve resource %s at %08x (%u bytes)\n",
                                gp_resources[i].name, gp_resources[i].start,
-                               gp_resources[i].end -
-                                       gp_resources[i].start + 1);
+                               resource_size(&gp_resources[i]));
                }
        }
 
        /* Loop through assigning addresses for those that are left */
        for (i = 0; gp_resources[i].flags != 0; i++) {
-               int size = gp_resources[i].end - gp_resources[i].start + 1;
+               int size = resource_size(&gp_resources[i]);
                if ((gp_resources[i].start == 0) &&
                        ((gp_resources[i].flags & IORESOURCE_MEM) != 0)) {
                        void *mem = alloc_bootmem_pages(size);
index 4ef73b09b1681db7aaef8ce95a4f8f1ea7db1349..890531e32fe87462f4a0cdbc20c8df019ad2db71 100644 (file)
@@ -210,7 +210,7 @@ parisc_walk_tree(struct device *dev)
        return dev->platform_data;
 }
                
-#define GET_IOC(dev) (HBA_DATA(parisc_walk_tree(dev))->iommu)
+#define GET_IOC(dev) (HBA_DATA(parisc_walk_tree(dev))->iommu)
        
 
 #ifdef CONFIG_IOMMU_CCIO
index 27a7492ddb0d66f7762e94dea40ff3f3ac1fcd85..04e550e76ae81ac3a4d226d26702240a35b22223 100644 (file)
@@ -56,7 +56,7 @@
 /* General definitions */
 #define DOESTRAP 1
 #define NOTRAP 0
-#define SIGNALCODE(signal, code) ((signal) << 24 | (code));
+#define SIGNALCODE(signal, code) ((signal) << 24 | (code))
 #define copropbit      1<<31-2 /* bit position 2 */
 #define opclass                9       /* bits 21 & 22 */
 #define fmt            11      /* bits 19 & 20 */
index 2b917c69ed15683bc4d761a5c5b6a5d7304718af..3bf9cca3514798d44d3a358bc42554a6e6d41845 100644 (file)
@@ -267,7 +267,7 @@ extern int ucache_bsize;
 struct linux_binprm;
 extern int arch_setup_additional_pages(struct linux_binprm *bprm,
                                       int uses_interp);
-#define VDSO_AUX_ENT(a,b) NEW_AUX_ENT(a,b);
+#define VDSO_AUX_ENT(a,b) NEW_AUX_ENT(a,b)
 
 /* 1GB for 64bit, 8MB for 32bit */
 #define STACK_RND_MASK (is_32bit_task() ? \
@@ -298,7 +298,7 @@ do {                                                                        \
        NEW_AUX_ENT(AT_DCACHEBSIZE, dcache_bsize);                      \
        NEW_AUX_ENT(AT_ICACHEBSIZE, icache_bsize);                      \
        NEW_AUX_ENT(AT_UCACHEBSIZE, ucache_bsize);                      \
-       VDSO_AUX_ENT(AT_SYSINFO_EHDR, current->mm->context.vdso_base)   \
+       VDSO_AUX_ENT(AT_SYSINFO_EHDR, current->mm->context.vdso_base);  \
 } while (0)
 
 /* PowerPC64 relocations defined by the ABIs */
index 7ab82c825a034f7af25c19f5d78a88880022e2a2..27af7f8bbb8da6245f7c5d0f971c7c07ba9d1fea 100644 (file)
@@ -76,7 +76,7 @@ static inline unsigned long macio_resource_len(struct macio_dev *dev, int resour
        struct resource *res = &dev->resource[resource_no];
        if (res->start == 0 || res->end == 0 || res->end < res->start)
                return 0;
-       return res->end - res->start + 1;
+       return resource_size(res);
 }
 
 extern int macio_enable_devres(struct macio_dev *dev);
index e3bdada8c542b732d619d5ac9192fe26180003ee..ae20ce1af4c739e9085f3e53caf421a35f41c529 100644 (file)
@@ -547,7 +547,7 @@ struct smu_sdbp_header {
  * (currently, afaik, this concerns only the FVT partition
  * (0x12)
  */
-#define SMU_U16_MIX(x) le16_to_cpu(x);
+#define SMU_U16_MIX(x) le16_to_cpu(x)
 #define SMU_U32_MIX(x)  ((((x) & 0xff00ff00u) >> 8)|(((x) & 0x00ff00ffu) << 8))
 
 
index 7ee50f0547cb73de52be535b8f4b6543536b5405..6658a1589955577859afc62af05f0cd4c66cda6a 100644 (file)
@@ -126,7 +126,7 @@ void __init reserve_crashkernel(void)
        /* We might have got these values via the command line or the
         * device tree, either way sanitise them now. */
 
-       crash_size = crashk_res.end - crashk_res.start + 1;
+       crash_size = resource_size(&crashk_res);
 
 #ifndef CONFIG_RELOCATABLE
        if (crashk_res.start != KDUMP_KERNELBASE)
@@ -222,7 +222,7 @@ static void __init export_crashk_values(struct device_node *node)
 
        if (crashk_res.start != 0) {
                prom_add_property(node, &crashk_base_prop);
-               crashk_size = crashk_res.end - crashk_res.start + 1;
+               crashk_size = resource_size(&crashk_res);
                prom_add_property(node, &crashk_size_prop);
        }
 }
index a3c92770e422b523ef130868cb16e5470bf60b31..45ebb14c5c274d09471c0dddeae1e98abd4d3577 100644 (file)
@@ -107,7 +107,7 @@ static resource_size_t pcibios_io_size(const struct pci_controller *hose)
 #ifdef CONFIG_PPC64
        return hose->pci_io_size;
 #else
-       return hose->io_resource.end - hose->io_resource.start + 1;
+       return resource_size(&hose->io_resource);
 #endif
 }
 
index da110bd8834677b2b59e7f7625e4f8bb28d9c87c..5f5e693090800e8f6672ac9597701c520aeb6576 100644 (file)
@@ -264,7 +264,7 @@ mpc52xx_pci_setup(struct pci_controller *hose,
                         (unsigned long long)res->flags);
                out_be32(&pci_regs->iw0btar,
                         MPC52xx_PCI_IWBTAR_TRANSLATION(res->start, res->start,
-                                 res->end - res->start + 1));
+                                                       resource_size(res)));
                iwcr0 = MPC52xx_PCI_IWCR_ENABLE | MPC52xx_PCI_IWCR_MEM;
                if (res->flags & IORESOURCE_PREFETCH)
                        iwcr0 |= MPC52xx_PCI_IWCR_READ_MULTI;
@@ -278,7 +278,7 @@ mpc52xx_pci_setup(struct pci_controller *hose,
                         res->start, res->end, res->flags);
                out_be32(&pci_regs->iw1btar,
                         MPC52xx_PCI_IWBTAR_TRANSLATION(res->start, res->start,
-                                 res->end - res->start + 1));
+                                                       resource_size(res)));
                iwcr1 = MPC52xx_PCI_IWCR_ENABLE | MPC52xx_PCI_IWCR_MEM;
                if (res->flags & IORESOURCE_PREFETCH)
                        iwcr1 |= MPC52xx_PCI_IWCR_READ_MULTI;
@@ -300,7 +300,7 @@ mpc52xx_pci_setup(struct pci_controller *hose,
        out_be32(&pci_regs->iw2btar,
                 MPC52xx_PCI_IWBTAR_TRANSLATION(hose->io_base_phys,
                                                res->start,
-                                               res->end - res->start + 1));
+                                               resource_size(res)));
        iwcr2 = MPC52xx_PCI_IWCR_ENABLE | MPC52xx_PCI_IWCR_IO;
 
        /* Set all the IWCR fields at once; they're in the same reg */
@@ -402,7 +402,7 @@ mpc52xx_add_bridge(struct device_node *node)
 
        hose->ops = &mpc52xx_pci_ops;
 
-       pci_regs = ioremap(rsrc.start, rsrc.end - rsrc.start + 1);
+       pci_regs = ioremap(rsrc.start, resource_size(&rsrc));
        if (!pci_regs)
                return -ENOMEM;
 
index a2b9b9ef1240fc9d40d994ce4e6aecabb1675abc..f8fa2fc3129f1ad170d2529096f7653f502623da 100644 (file)
@@ -101,7 +101,7 @@ static void __init mpc83xx_km_setup_arch(void)
                                        __func__);
                                return;
                        }
-                       base = ioremap(res.start, res.end - res.start + 1);
+                       base = ioremap(res.start, resource_size(&res));
 
                        /*
                         * IMMR + 0x14A8[4:5] = 11 (clk delay for UCC 2)
index ec0b401bc9cf1b9afbc1d2527ed7a36ed7c0f817..93e60f1f21a9c23de86fc5a7eb56de5ee31582e4 100644 (file)
@@ -68,7 +68,7 @@ static void __init mpc832x_sys_setup_arch(void)
                struct resource res;
 
                of_address_to_resource(np, 0, &res);
-               bcsr_regs = ioremap(res.start, res.end - res.start +1);
+               bcsr_regs = ioremap(res.start, resource_size(&res));
                of_node_put(np);
        }
 
index d0a634b056ca549040d79f0112de75e6062dbadf..c1b1dc50b32af92520f8f1c5f097759f6a1dcd9b 100644 (file)
@@ -53,7 +53,7 @@ static int mpc834xemds_usb_cfg(void)
                struct resource res;
 
                of_address_to_resource(np, 0, &res);
-               bcsr_regs = ioremap(res.start, res.end - res.start + 1);
+               bcsr_regs = ioremap(res.start, resource_size(&res));
                of_node_put(np);
        }
        if (!bcsr_regs)
index 09e9d6fb74115327a98167104f136ecb8961d196..81c052b1353efa883239ec3462210b39d14b9499 100644 (file)
@@ -76,7 +76,7 @@ static void __init mpc836x_mds_setup_arch(void)
                struct resource res;
 
                of_address_to_resource(np, 0, &res);
-               bcsr_regs = ioremap(res.start, res.end - res.start +1);
+               bcsr_regs = ioremap(res.start, resource_size(&res));
                of_node_put(np);
        }
 
index 2c64164722d05886cfde3e2a2da2cd9a8d8cd6d0..1ad748bb39b4b506c8596d658d612048946ea46d 100644 (file)
@@ -171,7 +171,7 @@ int mpc831x_usb_cfg(void)
                of_node_put(np);
                return ret;
        }
-       usb_regs = ioremap(res.start, res.end - res.start + 1);
+       usb_regs = ioremap(res.start, resource_size(&res));
 
        /* Using on-chip PHY */
        if (prop && (!strcmp(prop, "utmi_wide") ||
index d2dfd465fbf67cf92f79d772284aa7e0bde6f554..09ced72217501fdb1da38ffa0612441b40d9f6b1 100644 (file)
@@ -285,7 +285,7 @@ static int __init sbc8560_bdrstcr_init(void)
 
        printk(KERN_INFO "sbc8560: Found BRSTCR at i/o 0x%x\n", res.start);
 
-       brstcr = ioremap(res.start, res.end - res.start);
+       brstcr = ioremap(res.start, resource_size(&res));
        if(!brstcr)
                printk(KERN_WARNING "sbc8560: ioremap of brstcr failed.\n");
 
index 0125604d096e917de7c7c6a923aa61df37c538a8..a9dc5e795123b00d7ff27fcc086559e7702066d7 100644 (file)
@@ -123,7 +123,7 @@ static void xes_mpc85xx_fixups(void)
                        continue;
                }
 
-               l2_base = ioremap(r[0].start, r[0].end - r[0].start + 1);
+               l2_base = ioremap(r[0].start, resource_size(&r[0]));
 
                xes_mpc85xx_configure_l2(l2_base);
        }
index 05b0db3ef6388bb4a5d6a7742be572f8b4c7f81c..844c0facb4f7ee6547f375741e78b3c22507dfda 100644 (file)
@@ -393,19 +393,19 @@ static int __init celleb_setup_epci(struct device_node *node,
 
        if (of_address_to_resource(node, 0, &r))
                goto error;
-       hose->cfg_addr = ioremap(r.start, (r.end - r.start + 1));
+       hose->cfg_addr = ioremap(r.start, resource_size(&r));
        if (!hose->cfg_addr)
                goto error;
        pr_debug("EPCI: cfg_addr map 0x%016llx->0x%016lx + 0x%016llx\n",
-                r.start, (unsigned long)hose->cfg_addr, (r.end - r.start + 1));
+                r.start, (unsigned long)hose->cfg_addr, resource_size(&r));
 
        if (of_address_to_resource(node, 2, &r))
                goto error;
-       hose->cfg_data = ioremap(r.start, (r.end - r.start + 1));
+       hose->cfg_data = ioremap(r.start, resource_size(&r));
        if (!hose->cfg_data)
                goto error;
        pr_debug("EPCI: cfg_data map 0x%016llx->0x%016lx + 0x%016llx\n",
-                r.start, (unsigned long)hose->cfg_data, (r.end - r.start + 1));
+                r.start, (unsigned long)hose->cfg_data, resource_size(&r));
 
        hose->ops = &celleb_epci_ops;
        celleb_epci_init(hose);
index a881bbee8de0564b6a995ad7ed5e1fe7fb5f637e..ae790ac4a589182b3f1e4a5873396cbcd71fdc6f 100644 (file)
@@ -494,7 +494,7 @@ static __init int celleb_setup_pciex(struct device_node *node,
                pr_err("PCIEXC:Failed to get config resource.\n");
                return 1;
        }
-       phb->cfg_addr = ioremap(r.start, r.end - r.start + 1);
+       phb->cfg_addr = ioremap(r.start, resource_size(&r));
        if (!phb->cfg_addr) {
                pr_err("PCIEXC:Failed to remap SMMIO region.\n");
                return 1;
index f465d474ad9b13b7813921bfa6cd4e9260b15d26..4e5c91489c0294c049f81fe3178fe2e682c4bb58 100644 (file)
@@ -222,7 +222,7 @@ static int spu_map_resource(struct spu *spu, int nr,
                return ret;
        if (phys)
                *phys = resource.start;
-       len = resource.end - resource.start + 1;
+       len = resource_size(&resource);
        *virt = ioremap(resource.start, len);
        if (!*virt)
                return -EINVAL;
index 8f67a394b2d068869cc045779e55e33bd7da4efd..3f65443f1714faca97fb239572eea21b5b765817 100644 (file)
@@ -142,7 +142,7 @@ hydra_init(void)
                return 0;
        }
        of_node_put(np);
-       Hydra = ioremap(r.start, r.end-r.start);
+       Hydra = ioremap(r.start, resource_size(&r));
        printk("Hydra Mac I/O at %llx\n", (unsigned long long)r.start);
        printk("Hydra Feature_Control was %x",
               in_le32(&Hydra->Feature_Control));
index 321a9b3a2d00e6039b92fb9d92d6eda704bf63f4..756123bf06ac2c7ee2eac1f3efb813acffa2394b 100644 (file)
@@ -576,7 +576,7 @@ int pasemi_dma_init(void)
                res.start = 0xfd800000;
                res.end = res.start + 0x1000;
        }
-       dma_status = __ioremap(res.start, res.end-res.start, 0);
+       dma_status = __ioremap(res.start, resource_size(&res), 0);
        pci_dev_put(iob_pdev);
 
        for (i = 0; i < MAX_TXCH; i++)
index b1cdcf94aa8e95daab73fa9cd757795e19d09301..695443bfdb089f83711b51c46dee58fb039ca028 100644 (file)
@@ -580,10 +580,10 @@ int __init pmac_nvram_init(void)
        /* Try to obtain an address */
        if (of_address_to_resource(dp, 0, &r1) == 0) {
                nvram_naddrs = 1;
-               s1 = (r1.end - r1.start) + 1;
+               s1 = resource_size(&r1);
                if (of_address_to_resource(dp, 1, &r2) == 0) {
                        nvram_naddrs = 2;
-                       s2 = (r2.end - r2.start) + 1;
+                       s2 = resource_size(&r2);
                }
        }
 
index abe8d7e2ebeb53c76d118576021ed186f2a29b50..41a80a4fb97e0c1ca2c9aef2ced1d79a594528a0 100644 (file)
@@ -839,8 +839,7 @@ static void __init setup_u3_ht(struct pci_controller* hose)
         * into cfg_addr
         */
        hose->cfg_data = ioremap(cfg_res.start, 0x02000000);
-       hose->cfg_addr = ioremap(self_res.start,
-                                self_res.end - self_res.start + 1);
+       hose->cfg_addr = ioremap(self_res.start, resource_size(&self_res));
 
        /*
         * /ht node doesn't expose a "ranges" property, we read the register
@@ -1324,8 +1323,7 @@ static void fixup_u4_pcie(struct pci_dev* dev)
                 */
                if (r->start >= 0xf0000000 && r->start < 0xf3000000)
                        continue;
-               if (!region || (r->end - r->start) >
-                   (region->end - region->start))
+               if (!region || resource_size(r) > resource_size(region))
                        region = r;
        }
        /* Nothing found, bail */
index 48211ca134c3b3845c80af2a8ab58d9549ffa776..11c9fce43b5b876a5078e1731a785d962137aeb9 100644 (file)
@@ -274,7 +274,7 @@ int __init via_calibrate_decr(void)
                return 0;
        }
        of_node_put(vias);
-       via = ioremap(rsrc.start, rsrc.end - rsrc.start + 1);
+       via = ioremap(rsrc.start, resource_size(&rsrc));
        if (via == NULL) {
                printk(KERN_ERR "Failed to map VIA for timer calibration !\n");
                return 0;
index fbffd7e47ab85fd86face2f8cba35c6537c5fe65..cd70be5ff27efb3255b6ad6ab9e1b2d9e27c2c12 100644 (file)
@@ -44,7 +44,6 @@
 #include <asm/mpic.h>
 #include <asm/vdso_datapage.h>
 #include <asm/cputhreads.h>
-#include <asm/mpic.h>
 #include <asm/xics.h>
 
 #include "plpar_wrappers.h"
index bd0d54060b94048ffea74c4c30f0bed1eac10ebf..265f0f09395ae53c56f95b9c0e838939db6eb480 100644 (file)
@@ -203,7 +203,7 @@ static int axon_ram_probe(struct platform_device *device)
                goto failed;
        }
 
-       bank->size = resource.end - resource.start + 1;
+       bank->size = resource_size(&resource);
 
        if (bank->size == 0) {
                dev_err(&device->dev, "No DDR2 memory found for %s%d\n",
index 350787c83e2284e146d6421a7e8bab87cbec7a0c..5d7d59a43c4c821e98cb3ac68dcbf447be37445a 100644 (file)
@@ -148,7 +148,7 @@ unsigned int cpm_pic_init(void)
        if (ret)
                goto end;
 
-       cpic_reg = ioremap(res.start, res.end - res.start + 1);
+       cpic_reg = ioremap(res.start, resource_size(&res));
        if (cpic_reg == NULL)
                goto end;
 
index 2b69aa0315b3c5ec1ea9d87081209639d237aa6a..d55d0ad0deab937f28780e1673052b96d3b44439 100644 (file)
@@ -115,7 +115,7 @@ int cpm_muram_init(void)
                        max = r.end;
 
                rh_attach_region(&cpm_muram_info, r.start - muram_pbase,
-                                r.end - r.start + 1);
+                                resource_size(&r));
        }
 
        muram_vbase = ioremap(muram_pbase, max - muram_pbase + 1);
index 8e9e06a7ca59ab4c3d467fc9361c5527a989cf9f..4f2680f431b5070fa26aeecacb73edc0345fe453 100644 (file)
@@ -239,7 +239,7 @@ static int __init dart_init(struct device_node *dart_node)
                                         DARTMAP_RPNMASK);
 
        /* Map in DART registers */
-       dart = ioremap(r.start, r.end - r.start + 1);
+       dart = ioremap(r.start, resource_size(&r));
        if (dart == NULL)
                panic("DART: Cannot map registers!");
 
index 92e78333c47cca84490f8022126b4a4bee149cc5..419a77239bd7a31833952024ffaae3d3587160a3 100644 (file)
@@ -349,7 +349,7 @@ static int __devinit fsl_of_msi_probe(struct platform_device *dev)
                goto error_out;
        }
 
-       msi->msi_regs = ioremap(res.start, res.end - res.start + 1);
+       msi->msi_regs = ioremap(res.start, resource_size(&res));
        if (!msi->msi_regs) {
                dev_err(&dev->dev, "ioremap problem failed\n");
                goto error_out;
index 68ca9290df9451886e74d24fa4834c15780979f5..ba5cb3fa7074ea713945f2e6f52f18b233cb1e7e 100644 (file)
@@ -64,7 +64,7 @@ static int __init setup_one_atmu(struct ccsr_pci __iomem *pci,
 {
        resource_size_t pci_addr = res->start - offset;
        resource_size_t phys_addr = res->start;
-       resource_size_t size = res->end - res->start + 1;
+       resource_size_t size = resource_size(res);
        u32 flags = 0x80044000; /* enable & mem R/W */
        unsigned int i;
 
@@ -108,7 +108,7 @@ static void __init setup_pci_atmu(struct pci_controller *hose,
        char *name = hose->dn->full_name;
 
        pr_debug("PCI memory map start 0x%016llx, size 0x%016llx\n",
-                   (u64)rsrc->start, (u64)rsrc->end - (u64)rsrc->start + 1);
+                (u64)rsrc->start, (u64)resource_size(rsrc));
 
        if (of_device_is_compatible(hose->dn, "fsl,qoriq-pcie-v2.2")) {
                win_idx = 2;
@@ -116,7 +116,7 @@ static void __init setup_pci_atmu(struct pci_controller *hose,
                end_idx = 3;
        }
 
-       pci = ioremap(rsrc->start, rsrc->end - rsrc->start + 1);
+       pci = ioremap(rsrc->start, resource_size(rsrc));
        if (!pci) {
            dev_err(hose->parent, "Unable to map ATMU registers\n");
            return;
@@ -153,9 +153,9 @@ static void __init setup_pci_atmu(struct pci_controller *hose,
                } else {
                        pr_debug("PCI IO resource start 0x%016llx, size 0x%016llx, "
                                 "phy base 0x%016llx.\n",
-                               (u64)hose->io_resource.start,
-                               (u64)hose->io_resource.end - (u64)hose->io_resource.start + 1,
-                               (u64)hose->io_base_phys);
+                                (u64)hose->io_resource.start,
+                                (u64)resource_size(&hose->io_resource),
+                                (u64)hose->io_base_phys);
                        out_be32(&pci->pow[j].potar, (hose->io_resource.start >> 12));
                        out_be32(&pci->pow[j].potear, 0);
                        out_be32(&pci->pow[j].powbar, (hose->io_base_phys >> 12));
index b3fd081d56f5fdfbb5ee650889a7a645b7598edb..2de8551df40fc2ab6fc9bd0570a6fe83bf9994bf 100644 (file)
@@ -1524,7 +1524,7 @@ int fsl_rio_setup(struct platform_device *dev)
        port->priv = priv;
        port->phys_efptr = 0x100;
 
-       priv->regs_win = ioremap(regs.start, regs.end - regs.start + 1);
+       priv->regs_win = ioremap(regs.start, resource_size(&regs));
        rio_regs_win = priv->regs_win;
 
        /* Probe the master port phy type */
index 7367d17364cb0ee37cf5addeacb7038030eb49f0..95da897f05a7f11f8fdf5c0ff297ed54813211ed 100644 (file)
@@ -736,7 +736,7 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)
                return NULL;
        }
 
-       ipic->regs = ioremap(res.start, res.end - res.start + 1);
+       ipic->regs = ioremap(res.start, resource_size(&res));
 
        ipic->irqhost->host_data = ipic;
 
index ddc877a3a23a1abae323e3ab2f3a694fad9ff570..69f5814ae6d42684c753db9a29f4ece7d5054a7e 100644 (file)
@@ -129,7 +129,7 @@ int __init mmio_nvram_init(void)
                goto out;
        }
        nvram_addr = r.start;
-       mmio_nvram_len = r.end - r.start + 1;
+       mmio_nvram_len = resource_size(&r);
        if ( (!mmio_nvram_len) || (!nvram_addr) ) {
                printk(KERN_WARNING "nvram: address or length is 0\n");
                ret = -EIO;
index 20924f2246f016f97f577a0733d5149acb640ce3..22e48e2d71f107a59f6cb308393655eb39de0e64 100644 (file)
@@ -166,7 +166,7 @@ int mpc8xx_pic_init(void)
        if (ret)
                goto out;
 
-       siu_reg = ioremap(res.start, res.end - res.start + 1);
+       siu_reg = ioremap(res.start, resource_size(&res));
        if (siu_reg == NULL) {
                ret = -EINVAL;
                goto out;
index 2792dc8b038c6efe52f626ffadd4edde64d29777..50a81387e9b1537f70f195037319f395869d4cfb 100644 (file)
@@ -125,11 +125,11 @@ static void mv64x60_udbg_init(void)
 
        of_node_put(np);
 
-       mpsc_base = ioremap(r[0].start, r[0].end - r[0].start + 1);
+       mpsc_base = ioremap(r[0].start, resource_size(&r[0]));
        if (!mpsc_base)
                return;
 
-       mpsc_intr_cause = ioremap(r[1].start, r[1].end - r[1].start + 1);
+       mpsc_intr_cause = ioremap(r[1].start, resource_size(&r[1]));
        if (!mpsc_intr_cause) {
                iounmap(mpsc_base);
                return;
index 156aa7d362584048945c8f10475edcf801eb0e8b..deda60a7f99641646ae83f0221508d93b51273e1 100644 (file)
@@ -265,7 +265,7 @@ static void __init ppc4xx_configure_pci_PMMs(struct pci_controller *hose,
                if (ppc4xx_setup_one_pci_PMM(hose, reg,
                                             res->start,
                                             res->start - hose->pci_mem_offset,
-                                            res->end + 1 - res->start,
+                                            resource_size(res),
                                             res->flags,
                                             j) == 0) {
                        j++;
@@ -290,7 +290,7 @@ static void __init ppc4xx_configure_pci_PTMs(struct pci_controller *hose,
                                             void __iomem *reg,
                                             const struct resource *res)
 {
-       resource_size_t size = res->end - res->start + 1;
+       resource_size_t size = resource_size(res);
        u32 sa;
 
        /* Calculate window size */
@@ -349,7 +349,7 @@ static void __init ppc4xx_probe_pci_bridge(struct device_node *np)
        bus_range = of_get_property(np, "bus-range", NULL);
 
        /* Map registers */
-       reg = ioremap(rsrc_reg.start, rsrc_reg.end + 1 - rsrc_reg.start);
+       reg = ioremap(rsrc_reg.start, resource_size(&rsrc_reg));
        if (reg == NULL) {
                printk(KERN_ERR "%s: Can't map registers !", np->full_name);
                goto fail;
@@ -465,7 +465,7 @@ static void __init ppc4xx_configure_pcix_POMs(struct pci_controller *hose,
                if (ppc4xx_setup_one_pcix_POM(hose, reg,
                                              res->start,
                                              res->start - hose->pci_mem_offset,
-                                             res->end + 1 - res->start,
+                                             resource_size(res),
                                              res->flags,
                                              j) == 0) {
                        j++;
@@ -492,7 +492,7 @@ static void __init ppc4xx_configure_pcix_PIMs(struct pci_controller *hose,
                                              int big_pim,
                                              int enable_msi_hole)
 {
-       resource_size_t size = res->end - res->start + 1;
+       resource_size_t size = resource_size(res);
        u32 sa;
 
        /* RAM is always at 0 */
@@ -555,7 +555,7 @@ static void __init ppc4xx_probe_pcix_bridge(struct device_node *np)
        bus_range = of_get_property(np, "bus-range", NULL);
 
        /* Map registers */
-       reg = ioremap(rsrc_reg.start, rsrc_reg.end + 1 - rsrc_reg.start);
+       reg = ioremap(rsrc_reg.start, resource_size(&rsrc_reg));
        if (reg == NULL) {
                printk(KERN_ERR "%s: Can't map registers !", np->full_name);
                goto fail;
@@ -1604,7 +1604,7 @@ static void __init ppc4xx_configure_pciex_POMs(struct ppc4xx_pciex_port *port,
                if (ppc4xx_setup_one_pciex_POM(port, hose, mbase,
                                               res->start,
                                               res->start - hose->pci_mem_offset,
-                                              res->end + 1 - res->start,
+                                              resource_size(res),
                                               res->flags,
                                               j) == 0) {
                        j++;
@@ -1639,7 +1639,7 @@ static void __init ppc4xx_configure_pciex_PIMs(struct ppc4xx_pciex_port *port,
                                               void __iomem *mbase,
                                               struct resource *res)
 {
-       resource_size_t size = res->end - res->start + 1;
+       resource_size_t size = resource_size(res);
        u64 sa;
 
        if (port->endpoint) {
index b2acda07220dfd45fc941bb4d788d5fcac6ee32b..18e75ca19fe688d7e1eb6c321bce98d7214a8d38 100644 (file)
@@ -347,7 +347,7 @@ void __init qe_ic_init(struct device_node *node, unsigned int flags,
                return;
        }
 
-       qe_ic->regs = ioremap(res.start, res.end - res.start + 1);
+       qe_ic->regs = ioremap(res.start, resource_size(&res));
 
        qe_ic->irqhost->host_data = qe_ic;
        qe_ic->hc_irq = qe_ic_irq_chip;
index 77e4934b88c5463dcd73c4b0f531aea79682b7d3..fd1a6c3b1721e73e6178f7b3209541ed2142e032 100644 (file)
@@ -41,7 +41,7 @@ int par_io_init(struct device_node *np)
        ret = of_address_to_resource(np, 0, &res);
        if (ret)
                return ret;
-       par_io = ioremap(res.start, res.end - res.start + 1);
+       par_io = ioremap(res.start, resource_size(&res));
 
        num_ports = of_get_property(np, "num-ports", NULL);
        if (num_ports)
index ba382b59b926defaa81e02046df2bbf8498689fc..50e32afe392e1b734c9b86629b67c9460b66f705 100644 (file)
@@ -256,7 +256,7 @@ static int __init icp_native_init_one_node(struct device_node *np,
                        return -1;
                }
 
-               if (icp_native_map_one_cpu(*indx, r.start, r.end - r.start))
+               if (icp_native_map_one_cpu(*indx, r.start, resource_size(&r)))
                        return -1;
 
                (*indx)++;
index 0e358c2cffeb5e6bf1955ba6ca2c3de7092e03b3..6efc18b5e60af4e3ce202edb5e381fe2ab45c03e 100644 (file)
@@ -13,8 +13,6 @@
 #include <linux/oprofile.h>
 #include <linux/init.h>
 #include <linux/errno.h>
-#include <linux/oprofile.h>
-#include <linux/errno.h>
 #include <linux/fs.h>
 
 #include "../../../drivers/oprofile/oprof.h"
index 969421f64a150a777b6a7f97e1d7b69aff4e1534..1dc924b2f5087ffa9b1bf8ff212644752fe23fd7 100644 (file)
@@ -188,7 +188,7 @@ static void ap320_wvga_power_off(void *board_data)
        __raw_writew(0, FPGA_LCDREG);
 }
 
-const static struct fb_videomode ap325rxa_lcdc_modes[] = {
+static const struct fb_videomode ap325rxa_lcdc_modes[] = {
        {
                .name = "LB070WV1",
                .xres = 800,
index 513cb1a2e6c830bc2d25cf27cf485ff8b37c37f8..b24d69d509e7d7ccfe7e78454fca4014b5c286a4 100644 (file)
@@ -280,7 +280,7 @@ static struct platform_device usbhs_device = {
 };
 
 /* LCDC */
-const static struct fb_videomode ecovec_lcd_modes[] = {
+static const struct fb_videomode ecovec_lcd_modes[] = {
        {
                .name           = "Panel",
                .xres           = 800,
@@ -295,7 +295,7 @@ const static struct fb_videomode ecovec_lcd_modes[] = {
        },
 };
 
-const static struct fb_videomode ecovec_dvi_modes[] = {
+static const struct fb_videomode ecovec_dvi_modes[] = {
        {
                .name           = "DVI",
                .xres           = 1280,
index 8b4abbbd1477f1fb6112de54ac2c35dff9b260e1..f65271a8d0754af996d0e8f2519d5d46c21edb7b 100644 (file)
@@ -127,7 +127,7 @@ static struct platform_device kfr2r09_sh_keysc_device = {
        },
 };
 
-const static struct fb_videomode kfr2r09_lcdc_modes[] = {
+static const struct fb_videomode kfr2r09_lcdc_modes[] = {
        {
                .name = "TX07D34VM0AAA",
                .xres = 240,
index 184fde16913282c76e51c6ba1a2ddab1d267d789..2d4c9c8c6664ba040214f016516c525d14018396 100644 (file)
@@ -214,7 +214,7 @@ static struct platform_device migor_nand_flash_device = {
        }
 };
 
-const static struct fb_videomode migor_lcd_modes[] = {
+static const struct fb_videomode migor_lcd_modes[] = {
        {
 #if defined(CONFIG_SH_MIGOR_RTA_WVGA)
                .name = "LB070WV1",
index 12357671023e38c8e1df3ccf5cfd211f2fc31ff8..d00756728bd231d577d1d65342768e1cfa237c8e 100644 (file)
@@ -145,7 +145,7 @@ static struct platform_device nor_flash_device = {
 };
 
 /* LCDC */
-const static struct fb_videomode lcdc_720p_modes[] = {
+static const struct fb_videomode lcdc_720p_modes[] = {
        {
                .name           = "LB070WV1",
                .sync           = 0, /* hsync and vsync are active low */
@@ -160,7 +160,7 @@ const static struct fb_videomode lcdc_720p_modes[] = {
        },
 };
 
-const static struct fb_videomode lcdc_vga_modes[] = {
+static const struct fb_videomode lcdc_vga_modes[] = {
        {
                .name           = "LB070WV1",
                .sync           = 0, /* hsync and vsync are active low */
index 32c385ef1011778cb172ddd33392343418b939b5..0f62f467275403554b018f26463cf7887592bf16 100644 (file)
@@ -58,7 +58,7 @@ int register_trapped_io(struct trapped_io *tiop)
 
        for (k = 0; k < tiop->num_resources; k++) {
                res = tiop->resource + k;
-               len += roundup((res->end - res->start) + 1, PAGE_SIZE);
+               len += roundup(resource_size(res), PAGE_SIZE);
                flags |= res->flags;
        }
 
@@ -85,7 +85,7 @@ int register_trapped_io(struct trapped_io *tiop)
                       (unsigned long)(tiop->virt_base + len),
                       res->flags & IORESOURCE_IO ? "io" : "mmio",
                       (unsigned long)res->start);
-               len += roundup((res->end - res->start) + 1, PAGE_SIZE);
+               len += roundup(resource_size(res), PAGE_SIZE);
        }
 
        tiop->magic = IO_TRAPPED_MAGIC;
@@ -128,7 +128,7 @@ void __iomem *match_trapped_io_handler(struct list_head *list,
                                return tiop->virt_base + voffs;
                        }
 
-                       len = (res->end - res->start) + 1;
+                       len = resource_size(res);
                        voffs += roundup(len, PAGE_SIZE);
                }
        }
@@ -173,7 +173,7 @@ static unsigned long lookup_address(struct trapped_io *tiop,
 
        for (k = 0; k < tiop->num_resources; k++) {
                res = tiop->resource + k;
-               len = roundup((res->end - res->start) + 1, PAGE_SIZE);
+               len = roundup(resource_size(res), PAGE_SIZE);
                if (address < (vaddr + len))
                        return res->start + (address - vaddr);
                vaddr += len;
index e2a3af31ff9930b534c5b1ee7e5bce9721905ba1..c5a33f007f886b571443a96d5c4c4f30847269ef 100644 (file)
@@ -170,7 +170,7 @@ void __init reserve_crashkernel(void)
        if (crashk_res.end == crashk_res.start)
                goto disable;
 
-       crash_size = PAGE_ALIGN(crashk_res.end - crashk_res.start + 1);
+       crash_size = PAGE_ALIGN(resource_size(&crashk_res));
        if (!crashk_res.start) {
                unsigned long max = memblock_end_of_DRAM() - memory_limit;
                crashk_res.start = __memblock_alloc_base(crash_size, PAGE_SIZE, max);
index e67880381b84e6a0ebe04f1d6ef8efd2ce00d662..cfa9cd2e5519b65f620048d2836f9c91c5d070c8 100644 (file)
@@ -186,7 +186,7 @@ static inline unsigned int sparc64_elf_hwcap(void)
        return cap;
 }
 
-#define ELF_HWCAP      sparc64_elf_hwcap();
+#define ELF_HWCAP      sparc64_elf_hwcap()
 
 /* This yields a string that ld.so will use to load implementation
    specific libraries for optimization.  This is more specific in
index 1c9c80a1a86af87611d4b77cc8b5a2c5244d1574..6ffccd6e0156aa87e9d5ca4134bf15a4b036d89f 100644 (file)
@@ -228,7 +228,7 @@ _sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz)
        }
 
        pa &= PAGE_MASK;
-       sparc_mapiorange(bus, pa, res->start, res->end - res->start + 1);
+       sparc_mapiorange(bus, pa, res->start, resource_size(res));
 
        return (void __iomem *)(unsigned long)(res->start + offset);
 }
@@ -240,7 +240,7 @@ static void _sparc_free_io(struct resource *res)
 {
        unsigned long plen;
 
-       plen = res->end - res->start + 1;
+       plen = resource_size(res);
        BUG_ON((plen & (PAGE_SIZE-1)) != 0);
        sparc_unmapiorange(res->start, plen);
        release_resource(res);
@@ -331,9 +331,9 @@ static void sbus_free_coherent(struct device *dev, size_t n, void *p,
        }
 
        n = PAGE_ALIGN(n);
-       if ((res->end-res->start)+1 != n) {
+       if (resource_size(res) != n) {
                printk("sbus_free_consistent: region 0x%lx asked 0x%zx\n",
-                   (long)((res->end-res->start)+1), n);
+                   (long)resource_size(res), n);
                return;
        }
 
@@ -504,9 +504,9 @@ static void pci32_free_coherent(struct device *dev, size_t n, void *p,
        }
 
        n = PAGE_ALIGN(n);
-       if ((res->end-res->start)+1 != n) {
+       if (resource_size(res) != n) {
                printk("pci_free_consistent: region 0x%lx asked 0x%lx\n",
-                   (long)((res->end-res->start)+1), (long)n);
+                   (long)resource_size(res), (long)n);
                return;
        }
 
index 80a87e2a3e7cb7b05c1ce04c38fd2bf5586306f0..1e94f946570ee6bfb56f66b6a42b9d99032d2a75 100644 (file)
@@ -820,11 +820,9 @@ static int __pci_mmap_make_offset_bus(struct pci_dev *pdev, struct vm_area_struc
        unsigned long space_size, user_offset, user_size;
 
        if (mmap_state == pci_mmap_io) {
-               space_size = (pbm->io_space.end -
-                             pbm->io_space.start) + 1;
+               space_size = resource_size(&pbm->io_space);
        } else {
-               space_size = (pbm->mem_space.end -
-                             pbm->mem_space.start) + 1;
+               space_size = resource_size(&pbm->mem_space);
        }
 
        /* Make sure the request is in range. */
index 6cdc9ba55fe0443dd8906fd60056d1ad9e6e783f..5f85d8b34dbb0ed717484c03954a1254f4c5f0b1 100644 (file)
@@ -553,8 +553,7 @@ static void __init setup_bootmem_allocator(void)
 
 #ifdef CONFIG_KEXEC
        if (crashk_res.start != crashk_res.end)
-               reserve_bootmem(crashk_res.start,
-                       crashk_res.end - crashk_res.start + 1, 0);
+               reserve_bootmem(crashk_res.start, resource_size(&crashk_res), 0);
 #endif
 }
 
index 129647375a6ccfb7f61910f0c8543ed9053f7480..89a46626bfd894c54d683622b7148633c1f91c97 100644 (file)
@@ -58,7 +58,7 @@ static inline unsigned long twd_fxsr_to_i387(struct user_fxsr_struct *fxsave)
        unsigned long ret = 0xffff0000;
        int i;
 
-#define FPREG_ADDR(f, n)       ((char *)&(f)->st_space + (n) * 16);
+#define FPREG_ADDR(f, n)       ((char *)&(f)->st_space + (n) * 16)
 
        for (i = 0; i < 8; i++) {
                if (twd & 0x1) {
index a67e014e4e446ac44cc8b7b9ea705459b38982d9..78fe57dcfc569b5e75dc39ba54dd09e73d51673c 100644 (file)
@@ -1737,8 +1737,8 @@ menuconfig APM
          machines with more than one CPU.
 
          In order to use APM, you will need supporting software. For location
-         and more information, read <file:Documentation/power/pm.txt> and the
-         Battery Powered Linux mini-HOWTO, available from
+         and more information, read <file:Documentation/power/apm-acpi.txt>
+         and the Battery Powered Linux mini-HOWTO, available from
          <http://www.tldp.org/docs.html#howto>.
 
          This driver does not spin down disk drives (see the hdparm(8)
index 12aff2537682b29cbb4264fac836a6371732c4a9..739d8598f7899bbebd4cd6666d9df08ca8f988f1 100644 (file)
@@ -321,7 +321,7 @@ static inline unsigned short twd_i387_to_fxsr(unsigned short twd)
        return tmp;
 }
 
-#define FPREG_ADDR(f, n)       ((void *)&(f)->st_space + (n) * 16);
+#define FPREG_ADDR(f, n)       ((void *)&(f)->st_space + (n) * 16)
 #define FP_EXP_TAG_VALID       0
 #define FP_EXP_TAG_ZERO                1
 #define FP_EXP_TAG_SPECIAL     2
index e8c33a3020063b8425f48bae80f78c083da3fc91..726494b5834584d85ccc461f8a8ac04d283c1e31 100644 (file)
@@ -1553,7 +1553,7 @@ static void __init calgary_fixup_one_tce_space(struct pci_dev *dev)
                        continue;
 
                /* cover the whole region */
-               npages = (r->end - r->start) >> PAGE_SHIFT;
+               npages = resource_size(r) >> PAGE_SHIFT;
                npages++;
 
                iommu_range_reserve(tbl, r->start, npages);
index ba0a4cce53be2d70cf4b14c07e39d9756907d110..63228035f9d7417c758960ae69b844756fda3ee0 100644 (file)
@@ -234,7 +234,7 @@ void __init probe_roms(void)
        /* check for extension rom (ignore length byte!) */
        rom = isa_bus_to_virt(extension_rom_resource.start);
        if (romsignature(rom)) {
-               length = extension_rom_resource.end - extension_rom_resource.start + 1;
+               length = resource_size(&extension_rom_resource);
                if (romchecksum(rom, length)) {
                        request_resource(&iomem_resource, &extension_rom_resource);
                        upper = extension_rom_resource.start;
index 9335e1bf72ad9120597a5d909687331824c0ae83..1c5b69373a0078b6926f04d694d42da5cd9a51ae 100644 (file)
@@ -22,7 +22,6 @@
 #include "mmu.h"
 #include "x86.h"
 #include "kvm_cache_regs.h"
-#include "x86.h"
 
 #include <linux/kvm_host.h>
 #include <linux/types.h>
index c141b115d3becefb4f9780c5a18dd5cc1e4686f5..3fa526fd3c9989a3b279e4720cbb03742739cb16 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <linux/errno.h>
 #include <linux/prefetch.h>
+#include <asm/types.h>
 
 #define VERIFY_READ    0
 #define VERIFY_WRITE   1
@@ -27,7 +28,6 @@
 #include <asm/current.h>
 #include <asm/asm-offsets.h>
 #include <asm/processor.h>
-#include <asm/types.h>
 
 /*
  * These assembly macros mirror the C macros that follow below.  They
 #else /* __ASSEMBLY__ not defined */
 
 #include <linux/sched.h>
-#include <asm/types.h>
 
 /*
  * The fs value determines whether argument validity checking should
index 89ab9484fb710b87d5314e3599e5103abc79ff72..e81735b2a206bcf2e0f717bcaf2f25bab6c33eaa 100644 (file)
@@ -357,7 +357,7 @@ static inline u32 s6dmac_channel_enabled(u32 dmac, int chan)
 static inline void s6dmac_dp_setup_group(u32 dmac, int port,
                        int nrch, int frrep)
 {
-       const static u8 mask[4] = {0, 3, 1, 2};
+       static const u8 mask[4] = {0, 3, 1, 2};
        BUG_ON(dmac != S6_REG_DPDMA);
        if ((port < 0) || (port > 3) || (nrch < 1) || (nrch > 4))
                return;
index 1d49e1c7c905cd1dadd8daf286205cee24e055b9..f8cb099518305949b154ce6e065be17109577d45 100644 (file)
@@ -1282,10 +1282,8 @@ get_rq:
        init_request_from_bio(req, bio);
 
        if (test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags) ||
-           bio_flagged(bio, BIO_CPU_AFFINE)) {
-               req->cpu = blk_cpu_to_group(get_cpu());
-               put_cpu();
-       }
+           bio_flagged(bio, BIO_CPU_AFFINE))
+               req->cpu = smp_processor_id();
 
        plug = current->plug;
        if (plug) {
@@ -1305,7 +1303,10 @@ get_rq:
                                plug->should_sort = 1;
                }
                list_add_tail(&req->queuelist, &plug->list);
+               plug->count++;
                drive_stat_acct(req, 1);
+               if (plug->count >= BLK_MAX_REQUEST_COUNT)
+                       blk_flush_plug_list(plug, false);
        } else {
                spin_lock_irq(q->queue_lock);
                add_acct_request(q, req, where);
@@ -2629,6 +2630,7 @@ void blk_start_plug(struct blk_plug *plug)
        INIT_LIST_HEAD(&plug->list);
        INIT_LIST_HEAD(&plug->cb_list);
        plug->should_sort = 0;
+       plug->count = 0;
 
        /*
         * If this is a nested plug, don't actually assign it. It will be
@@ -2712,6 +2714,7 @@ void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule)
                return;
 
        list_splice_init(&plug->list, &list);
+       plug->count = 0;
 
        if (plug->should_sort) {
                list_sort(NULL, &list, plug_rq_cmp);
index 342eae9b0d3cf982762987dfc5efb9a59f9b7275..6f9bbd978653e631f4fdd5cb36eee160d6045031 100644 (file)
@@ -82,26 +82,26 @@ void exit_io_context(struct task_struct *task)
 
 struct io_context *alloc_io_context(gfp_t gfp_flags, int node)
 {
-       struct io_context *ret;
+       struct io_context *ioc;
 
-       ret = kmem_cache_alloc_node(iocontext_cachep, gfp_flags, node);
-       if (ret) {
-               atomic_long_set(&ret->refcount, 1);
-               atomic_set(&ret->nr_tasks, 1);
-               spin_lock_init(&ret->lock);
-               ret->ioprio_changed = 0;
-               ret->ioprio = 0;
-               ret->last_waited = 0; /* doesn't matter... */
-               ret->nr_batch_requests = 0; /* because this is 0 */
-               INIT_RADIX_TREE(&ret->radix_root, GFP_ATOMIC | __GFP_HIGH);
-               INIT_HLIST_HEAD(&ret->cic_list);
-               ret->ioc_data = NULL;
+       ioc = kmem_cache_alloc_node(iocontext_cachep, gfp_flags, node);
+       if (ioc) {
+               atomic_long_set(&ioc->refcount, 1);
+               atomic_set(&ioc->nr_tasks, 1);
+               spin_lock_init(&ioc->lock);
+               ioc->ioprio_changed = 0;
+               ioc->ioprio = 0;
+               ioc->last_waited = 0; /* doesn't matter... */
+               ioc->nr_batch_requests = 0; /* because this is 0 */
+               INIT_RADIX_TREE(&ioc->radix_root, GFP_ATOMIC | __GFP_HIGH);
+               INIT_HLIST_HEAD(&ioc->cic_list);
+               ioc->ioc_data = NULL;
 #if defined(CONFIG_BLK_CGROUP) || defined(CONFIG_BLK_CGROUP_MODULE)
-               ret->cgroup_changed = 0;
+               ioc->cgroup_changed = 0;
 #endif
        }
 
-       return ret;
+       return ioc;
 }
 
 /*
@@ -139,19 +139,19 @@ struct io_context *current_io_context(gfp_t gfp_flags, int node)
  */
 struct io_context *get_io_context(gfp_t gfp_flags, int node)
 {
-       struct io_context *ret = NULL;
+       struct io_context *ioc = NULL;
 
        /*
         * Check for unlikely race with exiting task. ioc ref count is
         * zero when ioc is being detached.
         */
        do {
-               ret = current_io_context(gfp_flags, node);
-               if (unlikely(!ret))
+               ioc = current_io_context(gfp_flags, node);
+               if (unlikely(!ioc))
                        break;
-       } while (!atomic_long_inc_not_zero(&ret->refcount));
+       } while (!atomic_long_inc_not_zero(&ioc->refcount));
 
-       return ret;
+       return ioc;
 }
 EXPORT_SYMBOL(get_io_context);
 
index 78e627e2581d5a6c80ec12d9267c57c0468ecf5f..2b461b496a788c11d00616efaf16df121e620160 100644 (file)
@@ -59,7 +59,10 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
         * granularity
         */
        max_discard_sectors = min(q->limits.max_discard_sectors, UINT_MAX >> 9);
-       if (q->limits.discard_granularity) {
+       if (unlikely(!max_discard_sectors)) {
+               /* Avoid infinite loop below. Being cautious never hurts. */
+               return -EOPNOTSUPP;
+       } else if (q->limits.discard_granularity) {
                unsigned int disc_sects = q->limits.discard_granularity >> 9;
 
                max_discard_sectors &= ~(disc_sects - 1);
index ee9c21602228e0dcb1b6ab8adf6909dae4adc2fd..475fab809a80cce9eb5573fbb392597d8dd9b838 100644 (file)
@@ -103,22 +103,25 @@ static struct notifier_block __cpuinitdata blk_cpu_notifier = {
 
 void __blk_complete_request(struct request *req)
 {
+       int ccpu, cpu, group_cpu = NR_CPUS;
        struct request_queue *q = req->q;
        unsigned long flags;
-       int ccpu, cpu, group_cpu;
 
        BUG_ON(!q->softirq_done_fn);
 
        local_irq_save(flags);
        cpu = smp_processor_id();
-       group_cpu = blk_cpu_to_group(cpu);
 
        /*
         * Select completion CPU
         */
-       if (test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags) && req->cpu != -1)
+       if (test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags) && req->cpu != -1) {
                ccpu = req->cpu;
-       else
+               if (!test_bit(QUEUE_FLAG_SAME_FORCE, &q->queue_flags)) {
+                       ccpu = blk_cpu_to_group(ccpu);
+                       group_cpu = blk_cpu_to_group(cpu);
+               }
+       } else
                ccpu = cpu;
 
        if (ccpu == cpu || ccpu == group_cpu) {
index d935bd859c87bc1c9a0e39eb61438583f91690f9..0ee17b5e7fb656235de604deb5838029456222ea 100644 (file)
@@ -244,8 +244,9 @@ static ssize_t queue_nomerges_store(struct request_queue *q, const char *page,
 static ssize_t queue_rq_affinity_show(struct request_queue *q, char *page)
 {
        bool set = test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags);
+       bool force = test_bit(QUEUE_FLAG_SAME_FORCE, &q->queue_flags);
 
-       return queue_var_show(set, page);
+       return queue_var_show(set << force, page);
 }
 
 static ssize_t
@@ -257,10 +258,14 @@ queue_rq_affinity_store(struct request_queue *q, const char *page, size_t count)
 
        ret = queue_var_store(&val, page, count);
        spin_lock_irq(q->queue_lock);
-       if (val)
+       if (val) {
                queue_flag_set(QUEUE_FLAG_SAME_COMP, q);
-       else
-               queue_flag_clear(QUEUE_FLAG_SAME_COMP,  q);
+               if (val == 2)
+                       queue_flag_set(QUEUE_FLAG_SAME_FORCE, q);
+       } else {
+               queue_flag_clear(QUEUE_FLAG_SAME_COMP, q);
+               queue_flag_clear(QUEUE_FLAG_SAME_FORCE, q);
+       }
        spin_unlock_irq(q->queue_lock);
 #endif
        return ret;
index 3689f833afdc57c12916e2fc985ef8c18ccc2904..f6a794120505668084929afdacd0b5e17f8fca8d 100644 (file)
@@ -142,9 +142,9 @@ static inline struct throtl_grp *tg_of_blkg(struct blkio_group *blkg)
        return NULL;
 }
 
-static inline int total_nr_queued(struct throtl_data *td)
+static inline unsigned int total_nr_queued(struct throtl_data *td)
 {
-       return (td->nr_queued[0] + td->nr_queued[1]);
+       return td->nr_queued[0] + td->nr_queued[1];
 }
 
 static inline struct throtl_grp *throtl_ref_get_tg(struct throtl_grp *tg)
@@ -927,7 +927,7 @@ static int throtl_dispatch(struct request_queue *q)
 
        bio_list_init(&bio_list_on_stack);
 
-       throtl_log(td, "dispatch nr_queued=%d read=%u write=%u",
+       throtl_log(td, "dispatch nr_queued=%u read=%u write=%u",
                        total_nr_queued(td), td->nr_queued[READ],
                        td->nr_queued[WRITE]);
 
@@ -970,7 +970,7 @@ throtl_schedule_delayed_work(struct throtl_data *td, unsigned long delay)
        struct delayed_work *dwork = &td->throtl_work;
 
        /* schedule work if limits changed even if no bio is queued */
-       if (total_nr_queued(td) > 0 || td->limits_changed) {
+       if (total_nr_queued(td) || td->limits_changed) {
                /*
                 * We might have a work scheduled to be executed in future.
                 * Cancel that and schedule a new one.
index 0c8b64a16484721308587c7a6b635344a9144a1e..702f1316bb8fec6d68fcb7e0fc262c960530fc29 100644 (file)
@@ -182,7 +182,7 @@ static int blk_fill_sgv4_hdr_rq(struct request_queue *q, struct request *rq,
                        return -ENOMEM;
        }
 
-       if (copy_from_user(rq->cmd, (void *)(unsigned long)hdr->request,
+       if (copy_from_user(rq->cmd, (void __user *)(unsigned long)hdr->request,
                           hdr->request_len))
                return -EFAULT;
 
@@ -249,7 +249,7 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,
        struct request *rq, *next_rq = NULL;
        int ret, rw;
        unsigned int dxfer_len;
-       void *dxferp = NULL;
+       void __user *dxferp = NULL;
        struct bsg_class_device *bcd = &q->bsg_dev;
 
        /* if the LLD has been removed then the bsg_unregister_queue will
@@ -291,7 +291,7 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,
                rq->next_rq = next_rq;
                next_rq->cmd_type = rq->cmd_type;
 
-               dxferp = (void*)(unsigned long)hdr->din_xferp;
+               dxferp = (void __user *)(unsigned long)hdr->din_xferp;
                ret =  blk_rq_map_user(q, next_rq, NULL, dxferp,
                                       hdr->din_xfer_len, GFP_KERNEL);
                if (ret)
@@ -300,10 +300,10 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,
 
        if (hdr->dout_xfer_len) {
                dxfer_len = hdr->dout_xfer_len;
-               dxferp = (void*)(unsigned long)hdr->dout_xferp;
+               dxferp = (void __user *)(unsigned long)hdr->dout_xferp;
        } else if (hdr->din_xfer_len) {
                dxfer_len = hdr->din_xfer_len;
-               dxferp = (void*)(unsigned long)hdr->din_xferp;
+               dxferp = (void __user *)(unsigned long)hdr->din_xferp;
        } else
                dxfer_len = 0;
 
@@ -445,7 +445,7 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr,
                int len = min_t(unsigned int, hdr->max_response_len,
                                        rq->sense_len);
 
-               ret = copy_to_user((void*)(unsigned long)hdr->response,
+               ret = copy_to_user((void __user *)(unsigned long)hdr->response,
                                   rq->sense, len);
                if (!ret)
                        hdr->response_len = len;
@@ -606,7 +606,7 @@ bsg_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
        ret = __bsg_read(buf, count, bd, NULL, &bytes_read);
        *ppos = bytes_read;
 
-       if (!bytes_read || (bytes_read && err_block_err(ret)))
+       if (!bytes_read || err_block_err(ret))
                bytes_read = ret;
 
        return bytes_read;
@@ -686,7 +686,7 @@ bsg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
        /*
         * return bytes written on non-fatal errors
         */
-       if (!bytes_written || (bytes_written && err_block_err(ret)))
+       if (!bytes_written || err_block_err(ret))
                bytes_written = ret;
 
        dprintk("%s: returning %Zd\n", bd->name, bytes_written);
@@ -878,7 +878,7 @@ static unsigned int bsg_poll(struct file *file, poll_table *wait)
        spin_lock_irq(&bd->lock);
        if (!list_empty(&bd->done_list))
                mask |= POLLIN | POLLRDNORM;
-       if (bd->queued_cmds >= bd->max_queue)
+       if (bd->queued_cmds < bd->max_queue)
                mask |= POLLOUT;
        spin_unlock_irq(&bd->lock);
 
index ae21919f15e1edf2ea6880efc6d5d43deae7fd9f..1f96ad6254f1eea18478b80f3a58de4173c9f8ef 100644 (file)
@@ -87,9 +87,10 @@ struct cfq_rb_root {
        unsigned count;
        unsigned total_weight;
        u64 min_vdisktime;
+       struct cfq_ttime ttime;
 };
-#define CFQ_RB_ROOT    (struct cfq_rb_root) { .rb = RB_ROOT, .left = NULL, \
-                       .count = 0, .min_vdisktime = 0, }
+#define CFQ_RB_ROOT    (struct cfq_rb_root) { .rb = RB_ROOT, \
+                       .ttime = {.last_end_request = jiffies,},}
 
 /*
  * Per process-grouping structure
@@ -129,14 +130,12 @@ struct cfq_queue {
        unsigned long slice_end;
        long slice_resid;
 
-       /* pending metadata requests */
-       int meta_pending;
        /* number of requests that are on the dispatch list or inside driver */
        int dispatched;
 
        /* io prio of this group */
        unsigned short ioprio, org_ioprio;
-       unsigned short ioprio_class, org_ioprio_class;
+       unsigned short ioprio_class;
 
        pid_t pid;
 
@@ -212,6 +211,7 @@ struct cfq_group {
 #endif
        /* number of requests that are on the dispatch list or inside driver */
        int dispatched;
+       struct cfq_ttime ttime;
 };
 
 /*
@@ -393,6 +393,18 @@ CFQ_CFQQ_FNS(wait_busy);
                        j++, st = i < IDLE_WORKLOAD ? \
                        &cfqg->service_trees[i][j]: NULL) \
 
+static inline bool cfq_io_thinktime_big(struct cfq_data *cfqd,
+       struct cfq_ttime *ttime, bool group_idle)
+{
+       unsigned long slice;
+       if (!sample_valid(ttime->ttime_samples))
+               return false;
+       if (group_idle)
+               slice = cfqd->cfq_group_idle;
+       else
+               slice = cfqd->cfq_slice_idle;
+       return ttime->ttime_mean > slice;
+}
 
 static inline bool iops_mode(struct cfq_data *cfqd)
 {
@@ -670,9 +682,6 @@ cfq_choose_req(struct cfq_data *cfqd, struct request *rq1, struct request *rq2,
        if (rq_is_sync(rq1) != rq_is_sync(rq2))
                return rq_is_sync(rq1) ? rq1 : rq2;
 
-       if ((rq1->cmd_flags ^ rq2->cmd_flags) & REQ_META)
-               return rq1->cmd_flags & REQ_META ? rq1 : rq2;
-
        s1 = blk_rq_pos(rq1);
        s2 = blk_rq_pos(rq2);
 
@@ -1005,8 +1014,8 @@ static inline struct cfq_group *cfqg_of_blkg(struct blkio_group *blkg)
        return NULL;
 }
 
-void cfq_update_blkio_group_weight(void *key, struct blkio_group *blkg,
-                                       unsigned int weight)
+static void cfq_update_blkio_group_weight(void *key, struct blkio_group *blkg,
+                                         unsigned int weight)
 {
        struct cfq_group *cfqg = cfqg_of_blkg(blkg);
        cfqg->new_weight = weight;
@@ -1059,6 +1068,8 @@ static struct cfq_group * cfq_alloc_cfqg(struct cfq_data *cfqd)
                *st = CFQ_RB_ROOT;
        RB_CLEAR_NODE(&cfqg->rb_node);
 
+       cfqg->ttime.last_end_request = jiffies;
+
        /*
         * Take the initial reference that will be released on destroy
         * This can be thought of a joint reference by cgroup and
@@ -1235,7 +1246,7 @@ static void cfq_release_cfq_groups(struct cfq_data *cfqd)
  * it should not be NULL as even if elevator was exiting, cgroup deltion
  * path got to it first.
  */
-void cfq_unlink_blkio_group(void *key, struct blkio_group *blkg)
+static void cfq_unlink_blkio_group(void *key, struct blkio_group *blkg)
 {
        unsigned long  flags;
        struct cfq_data *cfqd = key;
@@ -1502,16 +1513,11 @@ static void cfq_add_rq_rb(struct request *rq)
 {
        struct cfq_queue *cfqq = RQ_CFQQ(rq);
        struct cfq_data *cfqd = cfqq->cfqd;
-       struct request *__alias, *prev;
+       struct request *prev;
 
        cfqq->queued[rq_is_sync(rq)]++;
 
-       /*
-        * looks a little odd, but the first insert might return an alias.
-        * if that happens, put the alias on the dispatch list
-        */
-       while ((__alias = elv_rb_add(&cfqq->sort_list, rq)) != NULL)
-               cfq_dispatch_insert(cfqd->queue, __alias);
+       elv_rb_add(&cfqq->sort_list, rq);
 
        if (!cfq_cfqq_on_rr(cfqq))
                cfq_add_cfqq_rr(cfqd, cfqq);
@@ -1598,10 +1604,6 @@ static void cfq_remove_request(struct request *rq)
        cfqq->cfqd->rq_queued--;
        cfq_blkiocg_update_io_remove_stats(&(RQ_CFQG(rq))->blkg,
                                        rq_data_dir(rq), rq_is_sync(rq));
-       if (rq->cmd_flags & REQ_META) {
-               WARN_ON(!cfqq->meta_pending);
-               cfqq->meta_pending--;
-       }
 }
 
 static int cfq_merge(struct request_queue *q, struct request **req,
@@ -1969,7 +1971,8 @@ static bool cfq_should_idle(struct cfq_data *cfqd, struct cfq_queue *cfqq)
         * Otherwise, we do only if they are the last ones
         * in their service tree.
         */
-       if (service_tree->count == 1 && cfq_cfqq_sync(cfqq))
+       if (service_tree->count == 1 && cfq_cfqq_sync(cfqq) &&
+          !cfq_io_thinktime_big(cfqd, &service_tree->ttime, false))
                return true;
        cfq_log_cfqq(cfqd, cfqq, "Not idling. st->count:%d",
                        service_tree->count);
@@ -2022,10 +2025,10 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd)
         * slice, then don't idle. This avoids overrunning the allotted
         * time slice.
         */
-       if (sample_valid(cic->ttime_samples) &&
-           (cfqq->slice_end - jiffies < cic->ttime_mean)) {
+       if (sample_valid(cic->ttime.ttime_samples) &&
+           (cfqq->slice_end - jiffies < cic->ttime.ttime_mean)) {
                cfq_log_cfqq(cfqd, cfqq, "Not idling. think_time:%lu",
-                            cic->ttime_mean);
+                            cic->ttime.ttime_mean);
                return;
        }
 
@@ -2381,8 +2384,9 @@ static struct cfq_queue *cfq_select_queue(struct cfq_data *cfqd)
         * this group, wait for requests to complete.
         */
 check_group_idle:
-       if (cfqd->cfq_group_idle && cfqq->cfqg->nr_cfqq == 1
-           && cfqq->cfqg->dispatched) {
+       if (cfqd->cfq_group_idle && cfqq->cfqg->nr_cfqq == 1 &&
+           cfqq->cfqg->dispatched &&
+           !cfq_io_thinktime_big(cfqd, &cfqq->cfqg->ttime, true)) {
                cfqq = NULL;
                goto keep_queue;
        }
@@ -2833,7 +2837,7 @@ cfq_alloc_io_context(struct cfq_data *cfqd, gfp_t gfp_mask)
        cic = kmem_cache_alloc_node(cfq_ioc_pool, gfp_mask | __GFP_ZERO,
                                                        cfqd->queue->node);
        if (cic) {
-               cic->last_end_request = jiffies;
+               cic->ttime.last_end_request = jiffies;
                INIT_LIST_HEAD(&cic->queue_list);
                INIT_HLIST_NODE(&cic->cic_list);
                cic->dtor = cfq_free_io_context;
@@ -2883,7 +2887,6 @@ static void cfq_init_prio_data(struct cfq_queue *cfqq, struct io_context *ioc)
         * elevate the priority of this queue
         */
        cfqq->org_ioprio = cfqq->ioprio;
-       cfqq->org_ioprio_class = cfqq->ioprio_class;
        cfq_clear_cfqq_prio_changed(cfqq);
 }
 
@@ -3221,14 +3224,28 @@ err:
 }
 
 static void
-cfq_update_io_thinktime(struct cfq_data *cfqd, struct cfq_io_context *cic)
+__cfq_update_io_thinktime(struct cfq_ttime *ttime, unsigned long slice_idle)
 {
-       unsigned long elapsed = jiffies - cic->last_end_request;
-       unsigned long ttime = min(elapsed, 2UL * cfqd->cfq_slice_idle);
+       unsigned long elapsed = jiffies - ttime->last_end_request;
+       elapsed = min(elapsed, 2UL * slice_idle);
 
-       cic->ttime_samples = (7*cic->ttime_samples + 256) / 8;
-       cic->ttime_total = (7*cic->ttime_total + 256*ttime) / 8;
-       cic->ttime_mean = (cic->ttime_total + 128) / cic->ttime_samples;
+       ttime->ttime_samples = (7*ttime->ttime_samples + 256) / 8;
+       ttime->ttime_total = (7*ttime->ttime_total + 256*elapsed) / 8;
+       ttime->ttime_mean = (ttime->ttime_total + 128) / ttime->ttime_samples;
+}
+
+static void
+cfq_update_io_thinktime(struct cfq_data *cfqd, struct cfq_queue *cfqq,
+       struct cfq_io_context *cic)
+{
+       if (cfq_cfqq_sync(cfqq)) {
+               __cfq_update_io_thinktime(&cic->ttime, cfqd->cfq_slice_idle);
+               __cfq_update_io_thinktime(&cfqq->service_tree->ttime,
+                       cfqd->cfq_slice_idle);
+       }
+#ifdef CONFIG_CFQ_GROUP_IOSCHED
+       __cfq_update_io_thinktime(&cfqq->cfqg->ttime, cfqd->cfq_group_idle);
+#endif
 }
 
 static void
@@ -3277,8 +3294,8 @@ cfq_update_idle_window(struct cfq_data *cfqd, struct cfq_queue *cfqq,
        else if (!atomic_read(&cic->ioc->nr_tasks) || !cfqd->cfq_slice_idle ||
            (!cfq_cfqq_deep(cfqq) && CFQQ_SEEKY(cfqq)))
                enable_idle = 0;
-       else if (sample_valid(cic->ttime_samples)) {
-               if (cic->ttime_mean > cfqd->cfq_slice_idle)
+       else if (sample_valid(cic->ttime.ttime_samples)) {
+               if (cic->ttime.ttime_mean > cfqd->cfq_slice_idle)
                        enable_idle = 0;
                else
                        enable_idle = 1;
@@ -3339,13 +3356,6 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq,
            RB_EMPTY_ROOT(&cfqq->sort_list))
                return true;
 
-       /*
-        * So both queues are sync. Let the new request get disk time if
-        * it's a metadata request and the current queue is doing regular IO.
-        */
-       if ((rq->cmd_flags & REQ_META) && !cfqq->meta_pending)
-               return true;
-
        /*
         * Allow an RT request to pre-empt an ongoing non-RT cfqq timeslice.
         */
@@ -3410,10 +3420,8 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
        struct cfq_io_context *cic = RQ_CIC(rq);
 
        cfqd->rq_queued++;
-       if (rq->cmd_flags & REQ_META)
-               cfqq->meta_pending++;
 
-       cfq_update_io_thinktime(cfqd, cic);
+       cfq_update_io_thinktime(cfqd, cfqq, cic);
        cfq_update_io_seektime(cfqd, cfqq, rq);
        cfq_update_idle_window(cfqd, cfqq, cic);
 
@@ -3520,12 +3528,16 @@ static bool cfq_should_wait_busy(struct cfq_data *cfqd, struct cfq_queue *cfqq)
        if (cfqq->cfqg->nr_cfqq > 1)
                return false;
 
+       /* the only queue in the group, but think time is big */
+       if (cfq_io_thinktime_big(cfqd, &cfqq->cfqg->ttime, true))
+               return false;
+
        if (cfq_slice_used(cfqq))
                return true;
 
        /* if slice left is less than think time, wait busy */
-       if (cic && sample_valid(cic->ttime_samples)
-           && (cfqq->slice_end - jiffies < cic->ttime_mean))
+       if (cic && sample_valid(cic->ttime.ttime_samples)
+           && (cfqq->slice_end - jiffies < cic->ttime.ttime_mean))
                return true;
 
        /*
@@ -3566,11 +3578,24 @@ static void cfq_completed_request(struct request_queue *q, struct request *rq)
        cfqd->rq_in_flight[cfq_cfqq_sync(cfqq)]--;
 
        if (sync) {
-               RQ_CIC(rq)->last_end_request = now;
+               struct cfq_rb_root *service_tree;
+
+               RQ_CIC(rq)->ttime.last_end_request = now;
+
+               if (cfq_cfqq_on_rr(cfqq))
+                       service_tree = cfqq->service_tree;
+               else
+                       service_tree = service_tree_for(cfqq->cfqg,
+                               cfqq_prio(cfqq), cfqq_type(cfqq));
+               service_tree->ttime.last_end_request = now;
                if (!time_after(rq->start_time + cfqd->cfq_fifo_expire[1], now))
                        cfqd->last_delayed_sync = now;
        }
 
+#ifdef CONFIG_CFQ_GROUP_IOSCHED
+       cfqq->cfqg->ttime.last_end_request = now;
+#endif
+
        /*
         * If this is the active queue, check if it needs to be expired,
         * or if we want to idle in case it has no pending requests.
@@ -3616,30 +3641,6 @@ static void cfq_completed_request(struct request_queue *q, struct request *rq)
                cfq_schedule_dispatch(cfqd);
 }
 
-/*
- * we temporarily boost lower priority queues if they are holding fs exclusive
- * resources. they are boosted to normal prio (CLASS_BE/4)
- */
-static void cfq_prio_boost(struct cfq_queue *cfqq)
-{
-       if (has_fs_excl()) {
-               /*
-                * boost idle prio on transactions that would lock out other
-                * users of the filesystem
-                */
-               if (cfq_class_idle(cfqq))
-                       cfqq->ioprio_class = IOPRIO_CLASS_BE;
-               if (cfqq->ioprio > IOPRIO_NORM)
-                       cfqq->ioprio = IOPRIO_NORM;
-       } else {
-               /*
-                * unboost the queue (if needed)
-                */
-               cfqq->ioprio_class = cfqq->org_ioprio_class;
-               cfqq->ioprio = cfqq->org_ioprio;
-       }
-}
-
 static inline int __cfq_may_queue(struct cfq_queue *cfqq)
 {
        if (cfq_cfqq_wait_request(cfqq) && !cfq_cfqq_must_alloc_slice(cfqq)) {
@@ -3670,7 +3671,6 @@ static int cfq_may_queue(struct request_queue *q, int rw)
        cfqq = cic_to_cfqq(cic, rw_is_sync(rw));
        if (cfqq) {
                cfq_init_prio_data(cfqq, cic->ioc);
-               cfq_prio_boost(cfqq);
 
                return __cfq_may_queue(cfqq);
        }
index cc3eb78e333acaf14eb27a4ae8e54737d816f255..7b725020823c82243418c7d0105b9f6d23260589 100644 (file)
@@ -208,19 +208,6 @@ static int compat_blkpg_ioctl(struct block_device *bdev, fmode_t mode,
 #define BLKBSZSET_32           _IOW(0x12, 113, int)
 #define BLKGETSIZE64_32                _IOR(0x12, 114, int)
 
-struct compat_floppy_struct {
-       compat_uint_t   size;
-       compat_uint_t   sect;
-       compat_uint_t   head;
-       compat_uint_t   track;
-       compat_uint_t   stretch;
-       unsigned char   gap;
-       unsigned char   rate;
-       unsigned char   spec1;
-       unsigned char   fmt_gap;
-       const compat_caddr_t name;
-};
-
 struct compat_floppy_drive_params {
        char            cmos;
        compat_ulong_t  max_dtr;
@@ -288,7 +275,6 @@ struct compat_floppy_write_errors {
 
 #define FDSETPRM32 _IOW(2, 0x42, struct compat_floppy_struct)
 #define FDDEFPRM32 _IOW(2, 0x43, struct compat_floppy_struct)
-#define FDGETPRM32 _IOR(2, 0x04, struct compat_floppy_struct)
 #define FDSETDRVPRM32 _IOW(2, 0x90, struct compat_floppy_drive_params)
 #define FDGETDRVPRM32 _IOR(2, 0x11, struct compat_floppy_drive_params)
 #define FDGETDRVSTAT32 _IOR(2, 0x12, struct compat_floppy_drive_struct)
index 5139c0ea1864a858b6072febcf636a71e9bc6f13..c644137d9cd643b0e3b80750333dc42e92d1e964 100644 (file)
@@ -77,10 +77,8 @@ static void
 deadline_add_rq_rb(struct deadline_data *dd, struct request *rq)
 {
        struct rb_root *root = deadline_rb_root(dd, rq);
-       struct request *__alias;
 
-       while (unlikely(__alias = elv_rb_add(root, rq)))
-               deadline_move_request(dd, __alias);
+       elv_rb_add(root, rq);
 }
 
 static inline void
index b0b38ce0dcb6ec4cca1cbf28454e834cf3f1073e..a3b64bc71d8821fcdf4fa15dbbd0704ac34b843a 100644 (file)
@@ -353,7 +353,7 @@ static struct request *elv_rqhash_find(struct request_queue *q, sector_t offset)
  * RB-tree support functions for inserting/lookup/removal of requests
  * in a sorted RB tree.
  */
-struct request *elv_rb_add(struct rb_root *root, struct request *rq)
+void elv_rb_add(struct rb_root *root, struct request *rq)
 {
        struct rb_node **p = &root->rb_node;
        struct rb_node *parent = NULL;
@@ -365,15 +365,12 @@ struct request *elv_rb_add(struct rb_root *root, struct request *rq)
 
                if (blk_rq_pos(rq) < blk_rq_pos(__rq))
                        p = &(*p)->rb_left;
-               else if (blk_rq_pos(rq) > blk_rq_pos(__rq))
+               else if (blk_rq_pos(rq) >= blk_rq_pos(__rq))
                        p = &(*p)->rb_right;
-               else
-                       return __rq;
        }
 
        rb_link_node(&rq->rb_node, parent, p);
        rb_insert_color(&rq->rb_node, root);
-       return NULL;
 }
 EXPORT_SYMBOL(elv_rb_add);
 
index 6024b82e3209408fcfeb979435b1151739ce2b0f..5cb51c55f6d8d57309888aa2810b89f44d876301 100644 (file)
@@ -602,7 +602,7 @@ void add_disk(struct gendisk *disk)
        disk->major = MAJOR(devt);
        disk->first_minor = MINOR(devt);
 
-       /* Register BDI before referencing it from bdev */ 
+       /* Register BDI before referencing it from bdev */
        bdi = &disk->queue->backing_dev_info;
        bdi_register_dev(bdi, disk_devt(disk));
 
@@ -1140,7 +1140,7 @@ static int diskstats_show(struct seq_file *seqf, void *v)
                                "wsect wuse running use aveq"
                                "\n\n");
        */
+
        disk_part_iter_init(&piter, gp, DISK_PITER_INCL_EMPTY_PART0);
        while ((hd = disk_part_iter_next(&piter))) {
                cpu = part_stat_lock();
@@ -1164,7 +1164,7 @@ static int diskstats_show(struct seq_file *seqf, void *v)
                        );
        }
        disk_part_iter_exit(&piter);
+
        return 0;
 }
 
@@ -1492,30 +1492,32 @@ void disk_unblock_events(struct gendisk *disk)
 }
 
 /**
- * disk_check_events - schedule immediate event checking
- * @disk: disk to check events for
+ * disk_flush_events - schedule immediate event checking and flushing
+ * @disk: disk to check and flush events for
+ * @mask: events to flush
  *
- * Schedule immediate event checking on @disk if not blocked.
+ * Schedule immediate event checking on @disk if not blocked.  Events in
+ * @mask are scheduled to be cleared from the driver.  Note that this
+ * doesn't clear the events from @disk->ev.
  *
  * CONTEXT:
- * Don't care.  Safe to call from irq context.
+ * If @mask is non-zero must be called with bdev->bd_mutex held.
  */
-void disk_check_events(struct gendisk *disk)
+void disk_flush_events(struct gendisk *disk, unsigned int mask)
 {
        struct disk_events *ev = disk->ev;
-       unsigned long flags;
 
        if (!ev)
                return;
 
-       spin_lock_irqsave(&ev->lock, flags);
+       spin_lock_irq(&ev->lock);
+       ev->clearing |= mask;
        if (!ev->block) {
                cancel_delayed_work(&ev->dwork);
                queue_delayed_work(system_nrt_wq, &ev->dwork, 0);
        }
-       spin_unlock_irqrestore(&ev->lock, flags);
+       spin_unlock_irq(&ev->lock);
 }
-EXPORT_SYMBOL_GPL(disk_check_events);
 
 /**
  * disk_clear_events - synchronously check, clear and return pending events
@@ -1705,7 +1707,7 @@ static int disk_events_set_dfl_poll_msecs(const char *val,
        mutex_lock(&disk_events_mutex);
 
        list_for_each_entry(ev, &disk_events, node)
-               disk_check_events(ev->disk);
+               disk_flush_events(ev->disk, 0);
 
        mutex_unlock(&disk_events_mutex);
 
index 2af81552d65bede45261874e1a74e98923f67134..ae27b7534ea7d14ee0c5f493e3eaf6e8f123eaa2 100644 (file)
@@ -354,7 +354,7 @@ config CRYPTO_RMD128
          RIPEMD-128 (ISO/IEC 10118-3:2004).
 
          RIPEMD-128 is a 128-bit cryptographic hash function. It should only
-         to be used as a secure replacement for RIPEMD. For other use cases
+         be used as a secure replacement for RIPEMD. For other use cases,
          RIPEMD-160 should be used.
 
          Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel.
index 58c3f74bd84cb2158bdd4a69e49931cee33c2ede..6512b20aeccdce0184a6a5c524af85c6f7f6db91 100644 (file)
@@ -89,7 +89,7 @@ struct acpi_ac {
        unsigned long long state;
 };
 
-#define to_acpi_ac(x) container_of(x, struct acpi_ac, charger);
+#define to_acpi_ac(x) container_of(x, struct acpi_ac, charger)
 
 #ifdef CONFIG_ACPI_PROCFS_POWER
 static const struct file_operations acpi_ac_fops = {
index fcc13ac0aa1870009ad0fd9dc41712795e582aab..2c661353e8f26145dffffbc5339a11d22272acea 100644 (file)
@@ -132,7 +132,7 @@ struct acpi_battery {
        unsigned long flags;
 };
 
-#define to_acpi_battery(x) container_of(x, struct acpi_battery, bat);
+#define to_acpi_battery(x) container_of(x, struct acpi_battery, bat)
 
 inline int acpi_battery_present(struct acpi_battery *battery)
 {
index 51ae3794ec7f895f16cb2cf4545f6f146860909f..50658ff887d99a51f51bca23be2ba8fee4470281 100644 (file)
@@ -112,7 +112,7 @@ struct acpi_battery {
        u8 have_sysfs_alarm:1;
 };
 
-#define to_acpi_battery(x) container_of(x, struct acpi_battery, bat);
+#define to_acpi_battery(x) container_of(x, struct acpi_battery, bat)
 
 struct acpi_sbs {
        struct power_supply charger;
index 6d678c99512e383ea9c7dee9dd1c5519151768ef..b89fffc1d777b277abd7bac4221b0fbc98e265ff 100644 (file)
@@ -406,9 +406,10 @@ static int devtmpfsd(void *p)
                        requests = NULL;
                        spin_unlock(&req_lock);
                        while (req) {
+                               struct req *next = req->next;
                                req->err = handle(req->name, req->mode, req->dev);
                                complete(&req->done);
-                               req = req->next;
+                               req = next;
                        }
                        spin_lock(&req_lock);
                }
index fb543024df2f7529920b577607539920cfa8d202..851e05bc948afea6740d5b590e26c1320654c6a8 100644 (file)
@@ -3,7 +3,7 @@
  * ChipCommon core driver
  *
  * Copyright 2005, Broadcom Corporation
- * Copyright 2006, 2007, Michael Buesch <mb@bu3sch.de>
+ * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
  *
  * Licensed under the GNU/GPL. See COPYING for details.
  */
index dd5846bef029fc6d7400a436f3bdc506ff94a830..fcc63db0ce7542ded6428071103315370dda11cb 100644 (file)
@@ -2,7 +2,7 @@
  * Broadcom specific AMBA
  * ChipCommon Power Management Unit driver
  *
- * Copyright 2009, Michael Buesch <mb@bu3sch.de>
+ * Copyright 2009, Michael Buesch <m@bues.ch>
  * Copyright 2007, Broadcom Corporation
  *
  * Licensed under the GNU/GPL. See COPYING for details.
index 745d26491291c34a030358414fbaf80325a20cbd..25f3ddf33823122433edfb6c1464598cc832acc5 100644 (file)
@@ -3,7 +3,7 @@
  * PCI Core
  *
  * Copyright 2005, Broadcom Corporation
- * Copyright 2006, 2007, Michael Buesch <mb@bu3sch.de>
+ * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
  *
  * Licensed under the GNU/GPL. See COPYING for details.
  */
index 16b4d58d84dd1e690a63b2f91efdce58aafe8d44..c049548e68b7ba39d27cf7b9c216868c8fc2b18e 100644 (file)
@@ -223,7 +223,7 @@ static void SA5_submit_command( ctlr_info_t *h, CommandList_struct *c)
                        h->ctlr, c->busaddr);
 #endif /* CCISS_DEBUG */
          writel(c->busaddr, h->vaddr + SA5_REQUEST_PORT_OFFSET);
-       readl(h->vaddr + SA5_REQUEST_PORT_OFFSET);
+       readl(h->vaddr + SA5_SCRATCHPAD_OFFSET);
         h->commands_outstanding++;
         if ( h->commands_outstanding > h->max_outstanding)
                h->max_outstanding = h->commands_outstanding;
index 5cf2993a8338c9e325fb6126d5a6ec3ca371f6e3..2330a9ad5e9568c2e4e1944e76eca10f7c5cdb53 100644 (file)
@@ -458,7 +458,8 @@ static void end_block_io_op(struct bio *bio, int error)
  * (which has the sectors we want, number of them, grant references, etc),
  * and transmute  it to the block API to hand it over to the proper block disk.
  */
-static int do_block_io_op(struct xen_blkif *blkif)
+static int
+__do_block_io_op(struct xen_blkif *blkif)
 {
        union blkif_back_rings *blk_rings = &blkif->blk_rings;
        struct blkif_request req;
@@ -515,6 +516,23 @@ static int do_block_io_op(struct xen_blkif *blkif)
        return more_to_do;
 }
 
+static int
+do_block_io_op(struct xen_blkif *blkif)
+{
+       union blkif_back_rings *blk_rings = &blkif->blk_rings;
+       int more_to_do;
+
+       do {
+               more_to_do = __do_block_io_op(blkif);
+               if (more_to_do)
+                       break;
+
+               RING_FINAL_CHECK_FOR_REQUESTS(&blk_rings->common, more_to_do);
+       } while (more_to_do);
+
+       return more_to_do;
+}
+
 /*
  * Transmutation of the 'struct blkif_request' to a proper 'struct bio'
  * and call the 'submit_bio' to pass it to the underlying storage.
@@ -700,7 +718,6 @@ static void make_response(struct xen_blkif *blkif, u64 id,
        struct blkif_response  resp;
        unsigned long     flags;
        union blkif_back_rings *blk_rings = &blkif->blk_rings;
-       int more_to_do = 0;
        int notify;
 
        resp.id        = id;
@@ -727,22 +744,7 @@ static void make_response(struct xen_blkif *blkif, u64 id,
        }
        blk_rings->common.rsp_prod_pvt++;
        RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&blk_rings->common, notify);
-       if (blk_rings->common.rsp_prod_pvt == blk_rings->common.req_cons) {
-               /*
-                * Tail check for pending requests. Allows frontend to avoid
-                * notifications if requests are already in flight (lower
-                * overheads and promotes batching).
-                */
-               RING_FINAL_CHECK_FOR_REQUESTS(&blk_rings->common, more_to_do);
-
-       } else if (RING_HAS_UNCONSUMED_REQUESTS(&blk_rings->common)) {
-               more_to_do = 1;
-       }
-
        spin_unlock_irqrestore(&blkif->blk_ring_lock, flags);
-
-       if (more_to_do)
-               blkif_notify_work(blkif);
        if (notify)
                notify_remote_via_irq(blkif->irq);
 }
@@ -824,3 +826,4 @@ static int __init xen_blkif_init(void)
 module_init(xen_blkif_init);
 
 MODULE_LICENSE("Dual BSD/GPL");
+MODULE_ALIAS("xen-backend:vbd");
index cf39bc08ce08e3a0dbfa975cdc7fda4d053e656e..0c688232aab3596824cd37ce4f1c6b0a4f90a351 100644 (file)
@@ -212,7 +212,7 @@ static int bsr_add_node(struct device_node *bn)
 
                cur->bsr_minor  = i + total_bsr_devs;
                cur->bsr_addr   = res.start;
-               cur->bsr_len    = res.end - res.start + 1;
+               cur->bsr_len    = resource_size(&res);
                cur->bsr_bytes  = bsr_bytes[i];
                cur->bsr_stride = bsr_stride[i];
                cur->bsr_dev    = MKDEV(bsr_major, i + total_bsr_devs);
index 2016aad85203ac2e868d5be0df20b267ab9e5ecf..1bafb40ec8a213480f355b480819f092fdfebd08 100644 (file)
@@ -19,7 +19,7 @@
        Copyright 2000,2001 Philipp Rumpf <prumpf@mandrakesoft.com>
 
        Added generic RNG API
-       Copyright 2006 Michael Buesch <mbuesch@freenet.de>
+       Copyright 2006 Michael Buesch <m@bues.ch>
        Copyright 2005 (c) MontaVista Software, Inc.
 
        Please read Documentation/hw_random.txt for details on use.
index 39ccdeada79101fe2e910328110843fd569d3188..e90e1c74fd4c1f61a006dc82dbfe481d38c84ceb 100644 (file)
@@ -621,7 +621,7 @@ static int __devinit hwicap_setup(struct device *dev, int id,
 
        drvdata->mem_start = regs_res->start;
        drvdata->mem_end = regs_res->end;
-       drvdata->mem_size = regs_res->end - regs_res->start + 1;
+       drvdata->mem_size = resource_size(regs_res);
 
        if (!request_mem_region(drvdata->mem_start,
                                        drvdata->mem_size, DRIVER_NAME)) {
index fc2d9ed22470890cbd1bd07807c4d7ae2fcda232..73988bb7322abde6822094851801a0beb97b9169 100644 (file)
@@ -166,52 +166,52 @@ static int caam_probe(struct platform_device *pdev)
        /* Controller-level - performance monitor counters */
        ctrlpriv->ctl_rq_dequeued =
                debugfs_create_u64("rq_dequeued",
-                                  S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
+                                  S_IRUSR | S_IRGRP | S_IROTH,
                                   ctrlpriv->ctl, &perfmon->req_dequeued);
        ctrlpriv->ctl_ob_enc_req =
                debugfs_create_u64("ob_rq_encrypted",
-                                  S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
+                                  S_IRUSR | S_IRGRP | S_IROTH,
                                   ctrlpriv->ctl, &perfmon->ob_enc_req);
        ctrlpriv->ctl_ib_dec_req =
                debugfs_create_u64("ib_rq_decrypted",
-                                  S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
+                                  S_IRUSR | S_IRGRP | S_IROTH,
                                   ctrlpriv->ctl, &perfmon->ib_dec_req);
        ctrlpriv->ctl_ob_enc_bytes =
                debugfs_create_u64("ob_bytes_encrypted",
-                                  S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
+                                  S_IRUSR | S_IRGRP | S_IROTH,
                                   ctrlpriv->ctl, &perfmon->ob_enc_bytes);
        ctrlpriv->ctl_ob_prot_bytes =
                debugfs_create_u64("ob_bytes_protected",
-                                  S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
+                                  S_IRUSR | S_IRGRP | S_IROTH,
                                   ctrlpriv->ctl, &perfmon->ob_prot_bytes);
        ctrlpriv->ctl_ib_dec_bytes =
                debugfs_create_u64("ib_bytes_decrypted",
-                                  S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
+                                  S_IRUSR | S_IRGRP | S_IROTH,
                                   ctrlpriv->ctl, &perfmon->ib_dec_bytes);
        ctrlpriv->ctl_ib_valid_bytes =
                debugfs_create_u64("ib_bytes_validated",
-                                  S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
+                                  S_IRUSR | S_IRGRP | S_IROTH,
                                   ctrlpriv->ctl, &perfmon->ib_valid_bytes);
 
        /* Controller level - global status values */
        ctrlpriv->ctl_faultaddr =
                debugfs_create_u64("fault_addr",
-                                  S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
+                                  S_IRUSR | S_IRGRP | S_IROTH,
                                   ctrlpriv->ctl, &perfmon->faultaddr);
        ctrlpriv->ctl_faultdetail =
                debugfs_create_u32("fault_detail",
-                                  S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
+                                  S_IRUSR | S_IRGRP | S_IROTH,
                                   ctrlpriv->ctl, &perfmon->faultdetail);
        ctrlpriv->ctl_faultstatus =
                debugfs_create_u32("fault_status",
-                                  S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
+                                  S_IRUSR | S_IRGRP | S_IROTH,
                                   ctrlpriv->ctl, &perfmon->status);
 
        /* Internal covering keys (useful in non-secure mode only) */
        ctrlpriv->ctl_kek_wrap.data = &ctrlpriv->ctrl->kek[0];
        ctrlpriv->ctl_kek_wrap.size = KEK_KEY_SIZE * sizeof(u32);
        ctrlpriv->ctl_kek = debugfs_create_blob("kek",
-                                               S_IFCHR | S_IRUSR |
+                                               S_IRUSR |
                                                S_IRGRP | S_IROTH,
                                                ctrlpriv->ctl,
                                                &ctrlpriv->ctl_kek_wrap);
@@ -219,7 +219,7 @@ static int caam_probe(struct platform_device *pdev)
        ctrlpriv->ctl_tkek_wrap.data = &ctrlpriv->ctrl->tkek[0];
        ctrlpriv->ctl_tkek_wrap.size = KEK_KEY_SIZE * sizeof(u32);
        ctrlpriv->ctl_tkek = debugfs_create_blob("tkek",
-                                                S_IFCHR | S_IRUSR |
+                                                S_IRUSR |
                                                 S_IRGRP | S_IROTH,
                                                 ctrlpriv->ctl,
                                                 &ctrlpriv->ctl_tkek_wrap);
@@ -227,7 +227,7 @@ static int caam_probe(struct platform_device *pdev)
        ctrlpriv->ctl_tdsk_wrap.data = &ctrlpriv->ctrl->tdsk[0];
        ctrlpriv->ctl_tdsk_wrap.size = KEK_KEY_SIZE * sizeof(u32);
        ctrlpriv->ctl_tdsk = debugfs_create_blob("tdsk",
-                                                S_IFCHR | S_IRUSR |
+                                                S_IRUSR |
                                                 S_IRGRP | S_IROTH,
                                                 ctrlpriv->ctl,
                                                 &ctrlpriv->ctl_tdsk_wrap);
index e18eaabe92b97bea100b6baa5528078696abb1ec..d99f71c356b51cb5387423b22c49290ea26a1869 100644 (file)
@@ -135,7 +135,8 @@ static int imxdma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
                if (ret)
                        return ret;
 
-               imx_dma_config_burstlen(imxdmac->imxdma_channel, imxdmac->watermark_level);
+               imx_dma_config_burstlen(imxdmac->imxdma_channel,
+                               imxdmac->watermark_level * imxdmac->word_size);
 
                return 0;
        default:
index 954e334e01bbea5a5c028f445dd8551dd51dd718..06f9f27dbe7cdfcd1639f3644727d23ed5a20799 100644 (file)
@@ -1304,8 +1304,7 @@ static int mv_xor_shared_probe(struct platform_device *pdev)
        if (!res)
                return -ENODEV;
 
-       msp->xor_base = devm_ioremap(&pdev->dev, res->start,
-                                    res->end - res->start + 1);
+       msp->xor_base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
        if (!msp->xor_base)
                return -EBUSY;
 
@@ -1314,7 +1313,7 @@ static int mv_xor_shared_probe(struct platform_device *pdev)
                return -ENODEV;
 
        msp->xor_high_base = devm_ioremap(&pdev->dev, res->start,
-                                         res->end - res->start + 1);
+                                         resource_size(res));
        if (!msp->xor_high_base)
                return -EBUSY;
 
index db1df59ae2b6f72c739eba721ea051d2fc66bc5a..9a6a274e6925f2c03edf2a92fda72b28f1d65aa6 100644 (file)
@@ -140,7 +140,7 @@ static void __devinit cell_edac_init_csrows(struct mem_ctl_info *mci)
                if (of_node_to_nid(np) != priv->node)
                        continue;
                csrow->first_page = r.start >> PAGE_SHIFT;
-               csrow->nr_pages = (r.end - r.start + 1) >> PAGE_SHIFT;
+               csrow->nr_pages = resource_size(&r) >> PAGE_SHIFT;
                csrow->last_page = csrow->first_page + csrow->nr_pages - 1;
                csrow->mtype = MEM_XDR;
                csrow->edac_mode = EDAC_SECDED;
index 38ab8e2cd7f4f864500aa3cac45dedb76e51d50c..11e1a5dad96fe417963286227dcc244b96da82a9 100644 (file)
@@ -538,15 +538,15 @@ static int __devinit mpc85xx_l2_err_probe(struct platform_device *op)
        /* we only need the error registers */
        r.start += 0xe00;
 
-       if (!devm_request_mem_region(&op->dev, r.start,
-                                    r.end - r.start + 1, pdata->name)) {
+       if (!devm_request_mem_region(&op->dev, r.start, resource_size(&r),
+                                    pdata->name)) {
                printk(KERN_ERR "%s: Error while requesting mem region\n",
                       __func__);
                res = -EBUSY;
                goto err;
        }
 
-       pdata->l2_vbase = devm_ioremap(&op->dev, r.start, r.end - r.start + 1);
+       pdata->l2_vbase = devm_ioremap(&op->dev, r.start, resource_size(&r));
        if (!pdata->l2_vbase) {
                printk(KERN_ERR "%s: Unable to setup L2 err regs\n", __func__);
                res = -ENOMEM;
@@ -987,15 +987,15 @@ static int __devinit mpc85xx_mc_err_probe(struct platform_device *op)
                goto err;
        }
 
-       if (!devm_request_mem_region(&op->dev, r.start,
-                                    r.end - r.start + 1, pdata->name)) {
+       if (!devm_request_mem_region(&op->dev, r.start, resource_size(&r),
+                                    pdata->name)) {
                printk(KERN_ERR "%s: Error while requesting mem region\n",
                       __func__);
                res = -EBUSY;
                goto err;
        }
 
-       pdata->mc_vbase = devm_ioremap(&op->dev, r.start, r.end - r.start + 1);
+       pdata->mc_vbase = devm_ioremap(&op->dev, r.start, resource_size(&r));
        if (!pdata->mc_vbase) {
                printk(KERN_ERR "%s: Unable to setup MC err regs\n", __func__);
                res = -ENOMEM;
index 970053c89ff7a70d80c7536477c8e06e52530951..ed795e64eea7d68eaca749832225e3c3ef01108b 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/module.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
-#include <linux/slab.h>
 #include <linux/gpio.h>
 #include <linux/irq.h>
 #include <linux/interrupt.h>
index aa4f09ad3cede46381641831d0b00a305f9c9099..ec57936aef62ff936bc6cb0244dc029be467a879 100644 (file)
@@ -2,7 +2,7 @@
 
     bt8xx GPIO abuser
 
-    Copyright (C) 2008 Michael Buesch <mb@bu3sch.de>
+    Copyright (C) 2008 Michael Buesch <m@bues.ch>
 
     Please do _only_ contact the people listed _above_ with issues related to this driver.
     All the other people listed below are not related to this driver. Their names
index 3bfd3417ab113f9fa596e13563158a0cf2c7c20d..72fb9c665320804b43c7e9bff8bcd663fdc2ba74 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Generic EP93xx GPIO handling
  *
- * Copyright (c) 2008 Ryan Mallon <ryan@bluewatersys.com>
+ * Copyright (c) 2008 Ryan Mallon
  * Copyright (c) 2011 H Hartley Sweeten <hsweeten@visionengravers.com>
  *
  * Based on code originally from:
index fd2dfeeefdf3710675c30b76790e37788a92030c..53e8255cb0bac91dd5562a0c15336257229d015a 100644 (file)
@@ -578,8 +578,8 @@ static int __init gpio_probe(struct platform_device *pdev)
        if (!memres)
                goto err_no_resource;
 
-       if (request_mem_region(memres->start, memres->end - memres->start, "GPIO Controller")
-           == NULL) {
+       if (!request_mem_region(memres->start, resource_size(memres),
+                               "GPIO Controller")) {
                err = -ENODEV;
                goto err_no_ioregion;
        }
@@ -637,7 +637,7 @@ static int __init gpio_probe(struct platform_device *pdev)
                free_irq(gpio_ports[i].irq, &gpio_ports[i]);
        iounmap(virtbase);
  err_no_ioremap:
-       release_mem_region(memres->start, memres->end - memres->start);
+       release_mem_region(memres->start, resource_size(memres));
  err_no_ioregion:
  err_no_resource:
        clk_disable(clk);
@@ -657,7 +657,7 @@ static int __exit gpio_remove(struct platform_device *pdev)
        for (i = 0 ; i < U300_GPIO_NUM_PORTS; i++)
                free_irq(gpio_ports[i].irq, &gpio_ports[i]);
        iounmap(virtbase);
-       release_mem_region(memres->start, memres->end - memres->start);
+       release_mem_region(memres->start, resource_size(memres));
        clk_disable(clk);
        clk_put(clk);
        return 0;
index e25cbb46789a6780b5cf9611680468a835a09cff..40680f2b423146810a14812e406a8e9e46875c4e 100644 (file)
@@ -31,7 +31,6 @@
 #include "nouveau_grctx.h"
 #include "nouveau_dma.h"
 #include "nouveau_vm.h"
-#include "nouveau_ramht.h"
 #include "nv50_evo.h"
 
 struct nv50_graph_engine {
index ef940bad63f7516703f2402859c973386753754c..194303c177ad65375af2801200e219f69894d3c6 100644 (file)
@@ -48,8 +48,8 @@ enum sis_family {
 
 
 #define SIS_BASE (dev_priv->mmio)
-#define SIS_READ(reg)         DRM_READ32(SIS_BASE, reg);
-#define SIS_WRITE(reg, val)   DRM_WRITE32(SIS_BASE, reg, val);
+#define SIS_READ(reg)         DRM_READ32(SIS_BASE, reg)
+#define SIS_WRITE(reg, val)   DRM_WRITE32(SIS_BASE, reg, val)
 
 typedef struct drm_sis_private {
        drm_local_map_t *mmio;
index 5f888f7e7dcb827586c47a2fb2bfdbb3936c13f2..0598cd22edf2d80fbe28d89f61df98beaa0a6755 100644 (file)
@@ -1041,8 +1041,13 @@ config SENSORS_SMSC47B397
          This driver can also be built as a module.  If so, the module
          will be called smsc47b397.
 
+config SENSORS_SCH56XX_COMMON
+       tristate
+       default n
+
 config SENSORS_SCH5627
        tristate "SMSC SCH5627"
+       select SENSORS_SCH56XX_COMMON
        help
          If you say yes here you get support for the hardware monitoring
          features of the SMSC SCH5627 Super-I/O chip.
@@ -1050,6 +1055,21 @@ config SENSORS_SCH5627
          This driver can also be built as a module.  If so, the module
          will be called sch5627.
 
+config SENSORS_SCH5636
+       tristate "SMSC SCH5636"
+       select SENSORS_SCH56XX_COMMON
+       help
+         SMSC SCH5636 Super I/O chips include an embedded microcontroller for
+         hardware monitoring solutions, allowing motherboard manufacturers to
+         create their own custom hwmon solution based upon the SCH5636.
+
+         Currently this driver only supports the Fujitsu Theseus SCH5636 based
+         hwmon solution. Say yes here if you want support for the Fujitsu
+         Theseus' hardware monitoring features.
+
+         This driver can also be built as a module.  If so, the module
+         will be called sch5636.
+
 config SENSORS_ADS1015
        tristate "Texas Instruments ADS1015"
        depends on I2C
@@ -1142,6 +1162,7 @@ config SENSORS_TWL4030_MADC
 config SENSORS_VIA_CPUTEMP
        tristate "VIA CPU temperature sensor"
        depends on X86
+       select HWMON_VID
        help
          If you say yes here you get support for the temperature
          sensor inside your CPU. Supported are all known variants of
index 28061cfa0cdb11c26558d3e0af68eb5c17c7af33..d7995a1d0784fa829465e116f00e168312291c3f 100644 (file)
@@ -95,7 +95,9 @@ obj-$(CONFIG_SENSORS_PC87360) += pc87360.o
 obj-$(CONFIG_SENSORS_PC87427)  += pc87427.o
 obj-$(CONFIG_SENSORS_PCF8591)  += pcf8591.o
 obj-$(CONFIG_SENSORS_S3C)      += s3c-hwmon.o
+obj-$(CONFIG_SENSORS_SCH56XX_COMMON)+= sch56xx-common.o
 obj-$(CONFIG_SENSORS_SCH5627)  += sch5627.o
+obj-$(CONFIG_SENSORS_SCH5636)  += sch5636.o
 obj-$(CONFIG_SENSORS_SHT15)    += sht15.o
 obj-$(CONFIG_SENSORS_SHT21)    += sht21.o
 obj-$(CONFIG_SENSORS_SIS5595)  += sis5595.o
index ec588026f0a9c46c2ffd37347b5ac69da6f7b721..131ea8625f0830b1bfcc81d251ebf7e9cf3551f7 100644 (file)
@@ -273,7 +273,7 @@ static SENSOR_DEVICE_ATTR(in4_max, S_IRUGO | S_IWUSR,
 
 #define DIV_FROM_REG(val) (1 << (val))
 #define FAN_FROM_REG(val,div) ((val)==0 ? 0 : (480000/((val) << (div))))
-#define FAN_TO_REG(val,div) ((val)<=0?0:SENSORS_LIMIT((480000 + ((val) << ((div)-1))) / ((val) << (div)), 1, 255));
+#define FAN_TO_REG(val,div) ((val)<=0?0:SENSORS_LIMIT((480000 + ((val) << ((div)-1))) / ((val) << (div)), 1, 255))
 
 static ssize_t get_fan_input(struct device *dev, struct device_attribute *attr,
                             char *buf)
index c8195a077da364a14e0146bf24a4691bbac78bb5..932da8a5aaf45d85c2982a0506aae9ea19649daa 100644 (file)
@@ -140,7 +140,11 @@ int vid_from_reg(int val, u8 vrm)
                return(val & 0x10 ? 975 - (val & 0xF) * 25 :
                                    1750 - val * 50);
        case 13:
+       case 131:
                val &= 0x3f;
+               /* Exception for Eden ULV 500 MHz */
+               if (vrm == 131 && val == 0x3f)
+                       val++;
                return(1708 - val * 16);
        case 14:                /* Intel Core */
                                /* compute in uV, round to mV */
@@ -205,11 +209,45 @@ static struct vrm_model vrm_models[] = {
        {X86_VENDOR_CENTAUR, 0x6, 0x9, 0x7, 85},        /* Nehemiah */
        {X86_VENDOR_CENTAUR, 0x6, 0x9, ANY, 17},        /* C3-M, Eden-N */
        {X86_VENDOR_CENTAUR, 0x6, 0xA, 0x7, 0},         /* No information */
-       {X86_VENDOR_CENTAUR, 0x6, 0xA, ANY, 13},        /* C7, Esther */
+       {X86_VENDOR_CENTAUR, 0x6, 0xA, ANY, 13},        /* C7-M, C7, Eden (Esther) */
+       {X86_VENDOR_CENTAUR, 0x6, 0xD, ANY, 134},       /* C7-D, C7-M, C7, Eden (Esther) */
 
        {X86_VENDOR_UNKNOWN, ANY, ANY, ANY, 0}          /* stop here */
 };
 
+/*
+ * Special case for VIA model D: there are two different possible
+ * VID tables, so we have to figure out first, which one must be
+ * used. This resolves temporary drm value 134 to 14 (Intel Core
+ * 7-bit VID), 13 (Pentium M 6-bit VID) or 131 (Pentium M 6-bit VID
+ * + quirk for Eden ULV 500 MHz).
+ * Note: something similar might be needed for model A, I'm not sure.
+ */
+static u8 get_via_model_d_vrm(void)
+{
+       unsigned int vid, brand, dummy;
+       static const char *brands[4] = {
+               "C7-M", "C7", "Eden", "C7-D"
+       };
+
+       rdmsr(0x198, dummy, vid);
+       vid &= 0xff;
+
+       rdmsr(0x1154, brand, dummy);
+       brand = ((brand >> 4) ^ (brand >> 2)) & 0x03;
+
+       if (vid > 0x3f) {
+               pr_info("Using %d-bit VID table for VIA %s CPU\n",
+                       7, brands[brand]);
+               return 14;
+       } else {
+               pr_info("Using %d-bit VID table for VIA %s CPU\n",
+                       6, brands[brand]);
+               /* Enable quirk for Eden */
+               return brand == 2 ? 131 : 13;
+       }
+}
+
 static u8 find_vrm(u8 eff_family, u8 eff_model, u8 eff_stepping, u8 vendor)
 {
        int i = 0;
@@ -247,6 +285,8 @@ u8 vid_which_vrm(void)
                eff_model += ((eax & 0x000F0000)>>16)<<4;
        }
        vrm_ret = find_vrm(eff_family, eff_model, eff_stepping, c->x86_vendor);
+       if (vrm_ret == 134)
+               vrm_ret = get_via_model_d_vrm();
        if (vrm_ret == 0)
                pr_info("Unknown VRM version of your x86 CPU\n");
        return vrm_ret;
index 5f52477504305e9f679e8d74e6cd4a402808c821..d912649fac5031e6855d2b967ac375d8d702d43e 100644 (file)
@@ -1172,6 +1172,32 @@ static ssize_t show_alarm(struct device *dev, struct device_attribute *attr,
        struct it87_data *data = it87_update_device(dev);
        return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1);
 }
+
+static ssize_t clear_intrusion(struct device *dev, struct device_attribute
+               *attr, const char *buf, size_t count)
+{
+       struct it87_data *data = dev_get_drvdata(dev);
+       long val;
+       int config;
+
+       if (strict_strtol(buf, 10, &val) < 0 || val != 0)
+               return -EINVAL;
+
+       mutex_lock(&data->update_lock);
+       config = it87_read_value(data, IT87_REG_CONFIG);
+       if (config < 0) {
+               count = config;
+       } else {
+               config |= 1 << 5;
+               it87_write_value(data, IT87_REG_CONFIG, config);
+               /* Invalidate cache to force re-read */
+               data->valid = 0;
+       }
+       mutex_unlock(&data->update_lock);
+
+       return count;
+}
+
 static SENSOR_DEVICE_ATTR(in0_alarm, S_IRUGO, show_alarm, NULL, 8);
 static SENSOR_DEVICE_ATTR(in1_alarm, S_IRUGO, show_alarm, NULL, 9);
 static SENSOR_DEVICE_ATTR(in2_alarm, S_IRUGO, show_alarm, NULL, 10);
@@ -1188,6 +1214,8 @@ static SENSOR_DEVICE_ATTR(fan5_alarm, S_IRUGO, show_alarm, NULL, 6);
 static SENSOR_DEVICE_ATTR(temp1_alarm, S_IRUGO, show_alarm, NULL, 16);
 static SENSOR_DEVICE_ATTR(temp2_alarm, S_IRUGO, show_alarm, NULL, 17);
 static SENSOR_DEVICE_ATTR(temp3_alarm, S_IRUGO, show_alarm, NULL, 18);
+static SENSOR_DEVICE_ATTR(intrusion0_alarm, S_IRUGO | S_IWUSR,
+                         show_alarm, clear_intrusion, 4);
 
 static ssize_t show_beep(struct device *dev, struct device_attribute *attr,
                char *buf)
@@ -1350,6 +1378,7 @@ static struct attribute *it87_attributes[] = {
        &sensor_dev_attr_temp3_alarm.dev_attr.attr,
 
        &dev_attr_alarms.attr,
+       &sensor_dev_attr_intrusion0_alarm.dev_attr.attr,
        &dev_attr_name.attr,
        NULL
 };
index 4cb24eafe31819bdc7932c8894463428e545edf9..6df0b4681710e8baaa24d72f059f49ef060b8c0c 100644 (file)
@@ -2,7 +2,7 @@
     lm78.c - Part of lm_sensors, Linux kernel modules for hardware
              monitoring
     Copyright (c) 1998, 1999  Frodo Looijaard <frodol@dds.nl> 
-    Copyright (c) 2007        Jean Delvare <khali@linux-fr.org>
+    Copyright (c) 2007, 2011  Jean Delvare <khali@linux-fr.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
 #include <linux/slab.h>
 #include <linux/jiffies.h>
 #include <linux/i2c.h>
-#include <linux/platform_device.h>
-#include <linux/ioport.h>
 #include <linux/hwmon.h>
 #include <linux/hwmon-vid.h>
 #include <linux/hwmon-sysfs.h>
 #include <linux/err.h>
 #include <linux/mutex.h>
-#include <linux/io.h>
 
-/* ISA device, if found */
-static struct platform_device *pdev;
+#ifdef CONFIG_ISA
+#include <linux/platform_device.h>
+#include <linux/ioport.h>
+#include <linux/io.h>
+#endif
 
 /* Addresses to scan */
 static const unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
                                                0x2e, 0x2f, I2C_CLIENT_END };
-static unsigned short isa_address = 0x290;
-
 enum chips { lm78, lm79 };
 
 /* Many LM78 constants specified below */
@@ -143,50 +141,12 @@ struct lm78_data {
 };
 
 
-static int lm78_i2c_detect(struct i2c_client *client,
-                          struct i2c_board_info *info);
-static int lm78_i2c_probe(struct i2c_client *client,
-                         const struct i2c_device_id *id);
-static int lm78_i2c_remove(struct i2c_client *client);
-
-static int __devinit lm78_isa_probe(struct platform_device *pdev);
-static int __devexit lm78_isa_remove(struct platform_device *pdev);
-
 static int lm78_read_value(struct lm78_data *data, u8 reg);
 static int lm78_write_value(struct lm78_data *data, u8 reg, u8 value);
 static struct lm78_data *lm78_update_device(struct device *dev);
 static void lm78_init_device(struct lm78_data *data);
 
 
-static const struct i2c_device_id lm78_i2c_id[] = {
-       { "lm78", lm78 },
-       { "lm79", lm79 },
-       { }
-};
-MODULE_DEVICE_TABLE(i2c, lm78_i2c_id);
-
-static struct i2c_driver lm78_driver = {
-       .class          = I2C_CLASS_HWMON,
-       .driver = {
-               .name   = "lm78",
-       },
-       .probe          = lm78_i2c_probe,
-       .remove         = lm78_i2c_remove,
-       .id_table       = lm78_i2c_id,
-       .detect         = lm78_i2c_detect,
-       .address_list   = normal_i2c,
-};
-
-static struct platform_driver lm78_isa_driver = {
-       .driver = {
-               .owner  = THIS_MODULE,
-               .name   = "lm78",
-       },
-       .probe          = lm78_isa_probe,
-       .remove         = __devexit_p(lm78_isa_remove),
-};
-
-
 /* 7 Voltages */
 static ssize_t show_in(struct device *dev, struct device_attribute *da,
                       char *buf)
@@ -514,6 +474,16 @@ static const struct attribute_group lm78_group = {
        .attrs = lm78_attributes,
 };
 
+/*
+ * ISA related code
+ */
+#ifdef CONFIG_ISA
+
+/* ISA device, if found */
+static struct platform_device *pdev;
+
+static unsigned short isa_address = 0x290;
+
 /* I2C devices get this name attribute automatically, but for ISA devices
    we must create it by ourselves. */
 static ssize_t show_name(struct device *dev, struct device_attribute
@@ -525,6 +495,11 @@ static ssize_t show_name(struct device *dev, struct device_attribute
 }
 static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
 
+static struct lm78_data *lm78_data_if_isa(void)
+{
+       return pdev ? platform_get_drvdata(pdev) : NULL;
+}
+
 /* Returns 1 if the I2C chip appears to be an alias of the ISA chip */
 static int lm78_alias_detect(struct i2c_client *client, u8 chipid)
 {
@@ -558,12 +533,24 @@ static int lm78_alias_detect(struct i2c_client *client, u8 chipid)
 
        return 1;
 }
+#else /* !CONFIG_ISA */
+
+static int lm78_alias_detect(struct i2c_client *client, u8 chipid)
+{
+       return 0;
+}
+
+static struct lm78_data *lm78_data_if_isa(void)
+{
+       return NULL;
+}
+#endif /* CONFIG_ISA */
 
 static int lm78_i2c_detect(struct i2c_client *client,
                           struct i2c_board_info *info)
 {
        int i;
-       struct lm78_data *isa = pdev ? platform_get_drvdata(pdev) : NULL;
+       struct lm78_data *isa = lm78_data_if_isa();
        const char *client_name;
        struct i2c_adapter *adapter = client->adapter;
        int address = client->addr;
@@ -663,76 +650,24 @@ static int lm78_i2c_remove(struct i2c_client *client)
        return 0;
 }
 
-static int __devinit lm78_isa_probe(struct platform_device *pdev)
-{
-       int err;
-       struct lm78_data *data;
-       struct resource *res;
-
-       /* Reserve the ISA region */
-       res = platform_get_resource(pdev, IORESOURCE_IO, 0);
-       if (!request_region(res->start + LM78_ADDR_REG_OFFSET, 2, "lm78")) {
-               err = -EBUSY;
-               goto exit;
-       }
-
-       if (!(data = kzalloc(sizeof(struct lm78_data), GFP_KERNEL))) {
-               err = -ENOMEM;
-               goto exit_release_region;
-       }
-       mutex_init(&data->lock);
-       data->isa_addr = res->start;
-       platform_set_drvdata(pdev, data);
-
-       if (lm78_read_value(data, LM78_REG_CHIPID) & 0x80) {
-               data->type = lm79;
-               data->name = "lm79";
-       } else {
-               data->type = lm78;
-               data->name = "lm78";
-       }
-
-       /* Initialize the LM78 chip */
-       lm78_init_device(data);
-
-       /* Register sysfs hooks */
-       if ((err = sysfs_create_group(&pdev->dev.kobj, &lm78_group))
-        || (err = device_create_file(&pdev->dev, &dev_attr_name)))
-               goto exit_remove_files;
-
-       data->hwmon_dev = hwmon_device_register(&pdev->dev);
-       if (IS_ERR(data->hwmon_dev)) {
-               err = PTR_ERR(data->hwmon_dev);
-               goto exit_remove_files;
-       }
-
-       return 0;
-
- exit_remove_files:
-       sysfs_remove_group(&pdev->dev.kobj, &lm78_group);
-       device_remove_file(&pdev->dev, &dev_attr_name);
-       kfree(data);
- exit_release_region:
-       release_region(res->start + LM78_ADDR_REG_OFFSET, 2);
- exit:
-       return err;
-}
-
-static int __devexit lm78_isa_remove(struct platform_device *pdev)
-{
-       struct lm78_data *data = platform_get_drvdata(pdev);
-       struct resource *res;
-
-       hwmon_device_unregister(data->hwmon_dev);
-       sysfs_remove_group(&pdev->dev.kobj, &lm78_group);
-       device_remove_file(&pdev->dev, &dev_attr_name);
-       kfree(data);
-
-       res = platform_get_resource(pdev, IORESOURCE_IO, 0);
-       release_region(res->start + LM78_ADDR_REG_OFFSET, 2);
+static const struct i2c_device_id lm78_i2c_id[] = {
+       { "lm78", lm78 },
+       { "lm79", lm79 },
+       { }
+};
+MODULE_DEVICE_TABLE(i2c, lm78_i2c_id);
 
-       return 0;
-}
+static struct i2c_driver lm78_driver = {
+       .class          = I2C_CLASS_HWMON,
+       .driver = {
+               .name   = "lm78",
+       },
+       .probe          = lm78_i2c_probe,
+       .remove         = lm78_i2c_remove,
+       .id_table       = lm78_i2c_id,
+       .detect         = lm78_i2c_detect,
+       .address_list   = normal_i2c,
+};
 
 /* The SMBus locks itself, but ISA access must be locked explicitly! 
    We don't want to lock the whole ISA bus, so we lock each client
@@ -743,6 +678,7 @@ static int lm78_read_value(struct lm78_data *data, u8 reg)
 {
        struct i2c_client *client = data->client;
 
+#ifdef CONFIG_ISA
        if (!client) { /* ISA device */
                int res;
                mutex_lock(&data->lock);
@@ -751,6 +687,7 @@ static int lm78_read_value(struct lm78_data *data, u8 reg)
                mutex_unlock(&data->lock);
                return res;
        } else
+#endif
                return i2c_smbus_read_byte_data(client, reg);
 }
 
@@ -765,6 +702,7 @@ static int lm78_write_value(struct lm78_data *data, u8 reg, u8 value)
 {
        struct i2c_client *client = data->client;
 
+#ifdef CONFIG_ISA
        if (!client) { /* ISA device */
                mutex_lock(&data->lock);
                outb_p(reg, data->isa_addr + LM78_ADDR_REG_OFFSET);
@@ -772,6 +710,7 @@ static int lm78_write_value(struct lm78_data *data, u8 reg, u8 value)
                mutex_unlock(&data->lock);
                return 0;
        } else
+#endif
                return i2c_smbus_write_byte_data(client, reg, value);
 }
 
@@ -849,6 +788,88 @@ static struct lm78_data *lm78_update_device(struct device *dev)
        return data;
 }
 
+#ifdef CONFIG_ISA
+static int __devinit lm78_isa_probe(struct platform_device *pdev)
+{
+       int err;
+       struct lm78_data *data;
+       struct resource *res;
+
+       /* Reserve the ISA region */
+       res = platform_get_resource(pdev, IORESOURCE_IO, 0);
+       if (!request_region(res->start + LM78_ADDR_REG_OFFSET, 2, "lm78")) {
+               err = -EBUSY;
+               goto exit;
+       }
+
+       data = kzalloc(sizeof(struct lm78_data), GFP_KERNEL);
+       if (!data) {
+               err = -ENOMEM;
+               goto exit_release_region;
+       }
+       mutex_init(&data->lock);
+       data->isa_addr = res->start;
+       platform_set_drvdata(pdev, data);
+
+       if (lm78_read_value(data, LM78_REG_CHIPID) & 0x80) {
+               data->type = lm79;
+               data->name = "lm79";
+       } else {
+               data->type = lm78;
+               data->name = "lm78";
+       }
+
+       /* Initialize the LM78 chip */
+       lm78_init_device(data);
+
+       /* Register sysfs hooks */
+       if ((err = sysfs_create_group(&pdev->dev.kobj, &lm78_group))
+        || (err = device_create_file(&pdev->dev, &dev_attr_name)))
+               goto exit_remove_files;
+
+       data->hwmon_dev = hwmon_device_register(&pdev->dev);
+       if (IS_ERR(data->hwmon_dev)) {
+               err = PTR_ERR(data->hwmon_dev);
+               goto exit_remove_files;
+       }
+
+       return 0;
+
+ exit_remove_files:
+       sysfs_remove_group(&pdev->dev.kobj, &lm78_group);
+       device_remove_file(&pdev->dev, &dev_attr_name);
+       kfree(data);
+ exit_release_region:
+       release_region(res->start + LM78_ADDR_REG_OFFSET, 2);
+ exit:
+       return err;
+}
+
+static int __devexit lm78_isa_remove(struct platform_device *pdev)
+{
+       struct lm78_data *data = platform_get_drvdata(pdev);
+       struct resource *res;
+
+       hwmon_device_unregister(data->hwmon_dev);
+       sysfs_remove_group(&pdev->dev.kobj, &lm78_group);
+       device_remove_file(&pdev->dev, &dev_attr_name);
+       kfree(data);
+
+       res = platform_get_resource(pdev, IORESOURCE_IO, 0);
+       release_region(res->start + LM78_ADDR_REG_OFFSET, 2);
+
+       return 0;
+}
+
+static struct platform_driver lm78_isa_driver = {
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = "lm78",
+       },
+       .probe          = lm78_isa_probe,
+       .remove         = __devexit_p(lm78_isa_remove),
+};
+
 /* return 1 if a supported chip is found, 0 otherwise */
 static int __init lm78_isa_found(unsigned short address)
 {
@@ -969,12 +990,10 @@ static int __init lm78_isa_device_add(unsigned short address)
        return err;
 }
 
-static int __init sm_lm78_init(void)
+static int __init lm78_isa_register(void)
 {
        int res;
 
-       /* We register the ISA device first, so that we can skip the
-        * registration of an I2C interface to the same device. */
        if (lm78_isa_found(isa_address)) {
                res = platform_driver_register(&lm78_isa_driver);
                if (res)
@@ -986,32 +1005,62 @@ static int __init sm_lm78_init(void)
                        goto exit_unreg_isa_driver;
        }
 
-       res = i2c_add_driver(&lm78_driver);
-       if (res)
-               goto exit_unreg_isa_device;
-
        return 0;
 
- exit_unreg_isa_device:
-       platform_device_unregister(pdev);
  exit_unreg_isa_driver:
        platform_driver_unregister(&lm78_isa_driver);
  exit:
        return res;
 }
 
-static void __exit sm_lm78_exit(void)
+static void lm78_isa_unregister(void)
 {
        if (pdev) {
                platform_device_unregister(pdev);
                platform_driver_unregister(&lm78_isa_driver);
        }
-       i2c_del_driver(&lm78_driver);
 }
+#else /* !CONFIG_ISA */
 
+static int __init lm78_isa_register(void)
+{
+       return 0;
+}
+
+static void lm78_isa_unregister(void)
+{
+}
+#endif /* CONFIG_ISA */
 
+static int __init sm_lm78_init(void)
+{
+       int res;
+
+       /* We register the ISA device first, so that we can skip the
+        * registration of an I2C interface to the same device. */
+       res = lm78_isa_register();
+       if (res)
+               goto exit;
+
+       res = i2c_add_driver(&lm78_driver);
+       if (res)
+               goto exit_unreg_isa_device;
+
+       return 0;
+
+ exit_unreg_isa_device:
+       lm78_isa_unregister();
+ exit:
+       return res;
+}
+
+static void __exit sm_lm78_exit(void)
+{
+       lm78_isa_unregister();
+       i2c_del_driver(&lm78_driver);
+}
 
-MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>");
+MODULE_AUTHOR("Frodo Looijaard, Jean Delvare <khali@linux-fr.org>");
 MODULE_DESCRIPTION("LM78/LM79 driver");
 MODULE_LICENSE("GPL");
 
index 14335bbc9bdce30512422770f8772bb86827bf5e..c97b78ef911694e0e818a48029ef01c2208b76b9 100644 (file)
@@ -38,8 +38,8 @@ struct max1111_data {
        struct device           *hwmon_dev;
        struct spi_message      msg;
        struct spi_transfer     xfer[2];
-       uint8_t *tx_buf;
-       uint8_t *rx_buf;
+       uint8_t tx_buf[MAX1111_TX_BUF_SIZE];
+       uint8_t rx_buf[MAX1111_RX_BUF_SIZE];
        struct mutex            drvdata_lock;
        /* protect msg, xfer and buffers from multiple access */
 };
@@ -131,33 +131,23 @@ static const struct attribute_group max1111_attr_group = {
        .attrs  = max1111_attributes,
 };
 
-static int setup_transfer(struct max1111_data *data)
+static int __devinit setup_transfer(struct max1111_data *data)
 {
        struct spi_message *m;
        struct spi_transfer *x;
 
-       data->tx_buf = kmalloc(MAX1111_TX_BUF_SIZE, GFP_KERNEL);
-       if (!data->tx_buf)
-               return -ENOMEM;
-
-       data->rx_buf = kmalloc(MAX1111_RX_BUF_SIZE, GFP_KERNEL);
-       if (!data->rx_buf) {
-               kfree(data->tx_buf);
-               return -ENOMEM;
-       }
-
        m = &data->msg;
        x = &data->xfer[0];
 
        spi_message_init(m);
 
        x->tx_buf = &data->tx_buf[0];
-       x->len = 1;
+       x->len = MAX1111_TX_BUF_SIZE;
        spi_message_add_tail(x, m);
 
        x++;
        x->rx_buf = &data->rx_buf[0];
-       x->len = 2;
+       x->len = MAX1111_RX_BUF_SIZE;
        spi_message_add_tail(x, m);
 
        return 0;
@@ -192,7 +182,7 @@ static int __devinit max1111_probe(struct spi_device *spi)
        err = sysfs_create_group(&spi->dev.kobj, &max1111_attr_group);
        if (err) {
                dev_err(&spi->dev, "failed to create attribute group\n");
-               goto err_free_all;
+               goto err_free_data;
        }
 
        data->hwmon_dev = hwmon_device_register(&spi->dev);
@@ -209,9 +199,6 @@ static int __devinit max1111_probe(struct spi_device *spi)
 
 err_remove:
        sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group);
-err_free_all:
-       kfree(data->rx_buf);
-       kfree(data->tx_buf);
 err_free_data:
        kfree(data);
        return err;
@@ -224,8 +211,6 @@ static int __devexit max1111_remove(struct spi_device *spi)
        hwmon_device_unregister(data->hwmon_dev);
        sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group);
        mutex_destroy(&data->drvdata_lock);
-       kfree(data->rx_buf);
-       kfree(data->tx_buf);
        kfree(data);
        return 0;
 }
index 3494a4cce414304784fb95dadec1379c010286c4..e3b5c6039c2541e67e63066e4311f2dc6c1021b6 100644 (file)
 #include <linux/hwmon-sysfs.h>
 #include <linux/err.h>
 #include <linux/mutex.h>
-#include <linux/io.h>
-#include <linux/acpi.h>
-#include <linux/delay.h>
+#include "sch56xx-common.h"
 
 #define DRVNAME "sch5627"
 #define DEVNAME DRVNAME /* We only support one model */
 
-#define SIO_SCH5627_EM_LD      0x0C    /* Embedded Microcontroller LD */
-#define SIO_UNLOCK_KEY         0x55    /* Key to enable Super-I/O */
-#define SIO_LOCK_KEY           0xAA    /* Key to disable Super-I/O */
-
-#define SIO_REG_LDSEL          0x07    /* Logical device select */
-#define SIO_REG_DEVID          0x20    /* Device ID */
-#define SIO_REG_ENABLE         0x30    /* Logical device enable */
-#define SIO_REG_ADDR           0x66    /* Logical device address (2 bytes) */
-
-#define SIO_SCH5627_ID         0xC6    /* Chipset ID */
-
-#define REGION_LENGTH          9
-
 #define SCH5627_HWMON_ID               0xa5
 #define SCH5627_COMPANY_ID             0x5c
 #define SCH5627_PRIMARY_ID             0xa0
 
-#define SCH5627_CMD_READ               0x02
-#define SCH5627_CMD_WRITE              0x03
-
 #define SCH5627_REG_BUILD_CODE         0x39
 #define SCH5627_REG_BUILD_ID           0x3a
 #define SCH5627_REG_HWMON_ID           0x3c
@@ -111,182 +93,6 @@ struct sch5627_data {
        u16 in[SCH5627_NO_IN];
 };
 
-static struct platform_device *sch5627_pdev;
-
-/* Super I/O functions */
-static inline int superio_inb(int base, int reg)
-{
-       outb(reg, base);
-       return inb(base + 1);
-}
-
-static inline int superio_enter(int base)
-{
-       /* Don't step on other drivers' I/O space by accident */
-       if (!request_muxed_region(base, 2, DRVNAME)) {
-               pr_err("I/O address 0x%04x already in use\n", base);
-               return -EBUSY;
-       }
-
-       outb(SIO_UNLOCK_KEY, base);
-
-       return 0;
-}
-
-static inline void superio_select(int base, int ld)
-{
-       outb(SIO_REG_LDSEL, base);
-       outb(ld, base + 1);
-}
-
-static inline void superio_exit(int base)
-{
-       outb(SIO_LOCK_KEY, base);
-       release_region(base, 2);
-}
-
-static int sch5627_send_cmd(struct sch5627_data *data, u8 cmd, u16 reg, u8 v)
-{
-       u8 val;
-       int i;
-       /*
-        * According to SMSC for the commands we use the maximum time for
-        * the EM to respond is 15 ms, but testing shows in practice it
-        * responds within 15-32 reads, so we first busy poll, and if
-        * that fails sleep a bit and try again until we are way past
-        * the 15 ms maximum response time.
-        */
-       const int max_busy_polls = 64;
-       const int max_lazy_polls = 32;
-
-       /* (Optional) Write-Clear the EC to Host Mailbox Register */
-       val = inb(data->addr + 1);
-       outb(val, data->addr + 1);
-
-       /* Set Mailbox Address Pointer to first location in Region 1 */
-       outb(0x00, data->addr + 2);
-       outb(0x80, data->addr + 3);
-
-       /* Write Request Packet Header */
-       outb(cmd, data->addr + 4); /* VREG Access Type read:0x02 write:0x03 */
-       outb(0x01, data->addr + 5); /* # of Entries: 1 Byte (8-bit) */
-       outb(0x04, data->addr + 2); /* Mailbox AP to first data entry loc. */
-
-       /* Write Value field */
-       if (cmd == SCH5627_CMD_WRITE)
-               outb(v, data->addr + 4);
-
-       /* Write Address field */
-       outb(reg & 0xff, data->addr + 6);
-       outb(reg >> 8, data->addr + 7);
-
-       /* Execute the Random Access Command */
-       outb(0x01, data->addr); /* Write 01h to the Host-to-EC register */
-
-       /* EM Interface Polling "Algorithm" */
-       for (i = 0; i < max_busy_polls + max_lazy_polls; i++) {
-               if (i >= max_busy_polls)
-                       msleep(1);
-               /* Read Interrupt source Register */
-               val = inb(data->addr + 8);
-               /* Write Clear the interrupt source bits */
-               if (val)
-                       outb(val, data->addr + 8);
-               /* Command Completed ? */
-               if (val & 0x01)
-                       break;
-       }
-       if (i == max_busy_polls + max_lazy_polls) {
-               pr_err("Max retries exceeded reading virtual "
-                      "register 0x%04hx (%d)\n", reg, 1);
-               return -EIO;
-       }
-
-       /*
-        * According to SMSC we may need to retry this, but sofar I've always
-        * seen this succeed in 1 try.
-        */
-       for (i = 0; i < max_busy_polls; i++) {
-               /* Read EC-to-Host Register */
-               val = inb(data->addr + 1);
-               /* Command Completed ? */
-               if (val == 0x01)
-                       break;
-
-               if (i == 0)
-                       pr_warn("EC reports: 0x%02x reading virtual register "
-                               "0x%04hx\n", (unsigned int)val, reg);
-       }
-       if (i == max_busy_polls) {
-               pr_err("Max retries exceeded reading virtual "
-                      "register 0x%04hx (%d)\n", reg, 2);
-               return -EIO;
-       }
-
-       /*
-        * According to the SMSC app note we should now do:
-        *
-        * Set Mailbox Address Pointer to first location in Region 1 *
-        * outb(0x00, data->addr + 2);
-        * outb(0x80, data->addr + 3);
-        *
-        * But if we do that things don't work, so let's not.
-        */
-
-       /* Read Value field */
-       if (cmd == SCH5627_CMD_READ)
-               return inb(data->addr + 4);
-
-       return 0;
-}
-
-static int sch5627_read_virtual_reg(struct sch5627_data *data, u16 reg)
-{
-       return sch5627_send_cmd(data, SCH5627_CMD_READ, reg, 0);
-}
-
-static int sch5627_write_virtual_reg(struct sch5627_data *data,
-                                    u16 reg, u8 val)
-{
-       return sch5627_send_cmd(data, SCH5627_CMD_WRITE, reg, val);
-}
-
-static int sch5627_read_virtual_reg16(struct sch5627_data *data, u16 reg)
-{
-       int lsb, msb;
-
-       /* Read LSB first, this will cause the matching MSB to be latched */
-       lsb = sch5627_read_virtual_reg(data, reg);
-       if (lsb < 0)
-               return lsb;
-
-       msb = sch5627_read_virtual_reg(data, reg + 1);
-       if (msb < 0)
-               return msb;
-
-       return lsb | (msb << 8);
-}
-
-static int sch5627_read_virtual_reg12(struct sch5627_data *data, u16 msb_reg,
-                                     u16 lsn_reg, int high_nibble)
-{
-       int msb, lsn;
-
-       /* Read MSB first, this will cause the matching LSN to be latched */
-       msb = sch5627_read_virtual_reg(data, msb_reg);
-       if (msb < 0)
-               return msb;
-
-       lsn = sch5627_read_virtual_reg(data, lsn_reg);
-       if (lsn < 0)
-               return lsn;
-
-       if (high_nibble)
-               return (msb << 4) | (lsn >> 4);
-       else
-               return (msb << 4) | (lsn & 0x0f);
-}
-
 static struct sch5627_data *sch5627_update_device(struct device *dev)
 {
        struct sch5627_data *data = dev_get_drvdata(dev);
@@ -297,7 +103,7 @@ static struct sch5627_data *sch5627_update_device(struct device *dev)
 
        /* Trigger a Vbat voltage measurement every 5 minutes */
        if (time_after(jiffies, data->last_battery + 300 * HZ)) {
-               sch5627_write_virtual_reg(data, SCH5627_REG_CTRL,
+               sch56xx_write_virtual_reg(data->addr, SCH5627_REG_CTRL,
                                          data->control | 0x10);
                data->last_battery = jiffies;
        }
@@ -305,7 +111,7 @@ static struct sch5627_data *sch5627_update_device(struct device *dev)
        /* Cache the values for 1 second */
        if (time_after(jiffies, data->last_updated + HZ) || !data->valid) {
                for (i = 0; i < SCH5627_NO_TEMPS; i++) {
-                       val = sch5627_read_virtual_reg12(data,
+                       val = sch56xx_read_virtual_reg12(data->addr,
                                SCH5627_REG_TEMP_MSB[i],
                                SCH5627_REG_TEMP_LSN[i],
                                SCH5627_REG_TEMP_HIGH_NIBBLE[i]);
@@ -317,7 +123,7 @@ static struct sch5627_data *sch5627_update_device(struct device *dev)
                }
 
                for (i = 0; i < SCH5627_NO_FANS; i++) {
-                       val = sch5627_read_virtual_reg16(data,
+                       val = sch56xx_read_virtual_reg16(data->addr,
                                                         SCH5627_REG_FAN[i]);
                        if (unlikely(val < 0)) {
                                ret = ERR_PTR(val);
@@ -327,7 +133,7 @@ static struct sch5627_data *sch5627_update_device(struct device *dev)
                }
 
                for (i = 0; i < SCH5627_NO_IN; i++) {
-                       val = sch5627_read_virtual_reg12(data,
+                       val = sch56xx_read_virtual_reg12(data->addr,
                                SCH5627_REG_IN_MSB[i],
                                SCH5627_REG_IN_LSN[i],
                                SCH5627_REG_IN_HIGH_NIBBLE[i]);
@@ -355,18 +161,21 @@ static int __devinit sch5627_read_limits(struct sch5627_data *data)
                 * Note what SMSC calls ABS, is what lm_sensors calls max
                 * (aka high), and HIGH is what lm_sensors calls crit.
                 */
-               val = sch5627_read_virtual_reg(data, SCH5627_REG_TEMP_ABS[i]);
+               val = sch56xx_read_virtual_reg(data->addr,
+                                              SCH5627_REG_TEMP_ABS[i]);
                if (val < 0)
                        return val;
                data->temp_max[i] = val;
 
-               val = sch5627_read_virtual_reg(data, SCH5627_REG_TEMP_HIGH[i]);
+               val = sch56xx_read_virtual_reg(data->addr,
+                                              SCH5627_REG_TEMP_HIGH[i]);
                if (val < 0)
                        return val;
                data->temp_crit[i] = val;
        }
        for (i = 0; i < SCH5627_NO_FANS; i++) {
-               val = sch5627_read_virtual_reg16(data, SCH5627_REG_FAN_MIN[i]);
+               val = sch56xx_read_virtual_reg16(data->addr,
+                                                SCH5627_REG_FAN_MIN[i]);
                if (val < 0)
                        return val;
                data->fan_min[i] = val;
@@ -667,7 +476,7 @@ static int __devinit sch5627_probe(struct platform_device *pdev)
        mutex_init(&data->update_lock);
        platform_set_drvdata(pdev, data);
 
-       val = sch5627_read_virtual_reg(data, SCH5627_REG_HWMON_ID);
+       val = sch56xx_read_virtual_reg(data->addr, SCH5627_REG_HWMON_ID);
        if (val < 0) {
                err = val;
                goto error;
@@ -679,7 +488,7 @@ static int __devinit sch5627_probe(struct platform_device *pdev)
                goto error;
        }
 
-       val = sch5627_read_virtual_reg(data, SCH5627_REG_COMPANY_ID);
+       val = sch56xx_read_virtual_reg(data->addr, SCH5627_REG_COMPANY_ID);
        if (val < 0) {
                err = val;
                goto error;
@@ -691,7 +500,7 @@ static int __devinit sch5627_probe(struct platform_device *pdev)
                goto error;
        }
 
-       val = sch5627_read_virtual_reg(data, SCH5627_REG_PRIMARY_ID);
+       val = sch56xx_read_virtual_reg(data->addr, SCH5627_REG_PRIMARY_ID);
        if (val < 0) {
                err = val;
                goto error;
@@ -703,25 +512,28 @@ static int __devinit sch5627_probe(struct platform_device *pdev)
                goto error;
        }
 
-       build_code = sch5627_read_virtual_reg(data, SCH5627_REG_BUILD_CODE);
+       build_code = sch56xx_read_virtual_reg(data->addr,
+                                             SCH5627_REG_BUILD_CODE);
        if (build_code < 0) {
                err = build_code;
                goto error;
        }
 
-       build_id = sch5627_read_virtual_reg16(data, SCH5627_REG_BUILD_ID);
+       build_id = sch56xx_read_virtual_reg16(data->addr,
+                                             SCH5627_REG_BUILD_ID);
        if (build_id < 0) {
                err = build_id;
                goto error;
        }
 
-       hwmon_rev = sch5627_read_virtual_reg(data, SCH5627_REG_HWMON_REV);
+       hwmon_rev = sch56xx_read_virtual_reg(data->addr,
+                                            SCH5627_REG_HWMON_REV);
        if (hwmon_rev < 0) {
                err = hwmon_rev;
                goto error;
        }
 
-       val = sch5627_read_virtual_reg(data, SCH5627_REG_CTRL);
+       val = sch56xx_read_virtual_reg(data->addr, SCH5627_REG_CTRL);
        if (val < 0) {
                err = val;
                goto error;
@@ -734,7 +546,7 @@ static int __devinit sch5627_probe(struct platform_device *pdev)
        }
        /* Trigger a Vbat voltage measurement, so that we get a valid reading
           the first time we read Vbat */
-       sch5627_write_virtual_reg(data, SCH5627_REG_CTRL,
+       sch56xx_write_virtual_reg(data->addr, SCH5627_REG_CTRL,
                                  data->control | 0x10);
        data->last_battery = jiffies;
 
@@ -746,6 +558,7 @@ static int __devinit sch5627_probe(struct platform_device *pdev)
        if (err)
                goto error;
 
+       pr_info("found %s chip at %#hx\n", DEVNAME, data->addr);
        pr_info("firmware build: code 0x%02X, id 0x%04X, hwmon: rev 0x%02X\n",
                build_code, build_id, hwmon_rev);
 
@@ -768,85 +581,6 @@ error:
        return err;
 }
 
-static int __init sch5627_find(int sioaddr, unsigned short *address)
-{
-       u8 devid;
-       int err = superio_enter(sioaddr);
-       if (err)
-               return err;
-
-       devid = superio_inb(sioaddr, SIO_REG_DEVID);
-       if (devid != SIO_SCH5627_ID) {
-               pr_debug("Unsupported device id: 0x%02x\n",
-                        (unsigned int)devid);
-               err = -ENODEV;
-               goto exit;
-       }
-
-       superio_select(sioaddr, SIO_SCH5627_EM_LD);
-
-       if (!(superio_inb(sioaddr, SIO_REG_ENABLE) & 0x01)) {
-               pr_warn("Device not activated\n");
-               err = -ENODEV;
-               goto exit;
-       }
-
-       /*
-        * Warning the order of the low / high byte is the other way around
-        * as on most other superio devices!!
-        */
-       *address = superio_inb(sioaddr, SIO_REG_ADDR) |
-                  superio_inb(sioaddr, SIO_REG_ADDR + 1) << 8;
-       if (*address == 0) {
-               pr_warn("Base address not set\n");
-               err = -ENODEV;
-               goto exit;
-       }
-
-       pr_info("Found %s chip at %#hx\n", DEVNAME, *address);
-exit:
-       superio_exit(sioaddr);
-       return err;
-}
-
-static int __init sch5627_device_add(unsigned short address)
-{
-       struct resource res = {
-               .start  = address,
-               .end    = address + REGION_LENGTH - 1,
-               .flags  = IORESOURCE_IO,
-       };
-       int err;
-
-       sch5627_pdev = platform_device_alloc(DRVNAME, address);
-       if (!sch5627_pdev)
-               return -ENOMEM;
-
-       res.name = sch5627_pdev->name;
-       err = acpi_check_resource_conflict(&res);
-       if (err)
-               goto exit_device_put;
-
-       err = platform_device_add_resources(sch5627_pdev, &res, 1);
-       if (err) {
-               pr_err("Device resource addition failed\n");
-               goto exit_device_put;
-       }
-
-       err = platform_device_add(sch5627_pdev);
-       if (err) {
-               pr_err("Device addition failed\n");
-               goto exit_device_put;
-       }
-
-       return 0;
-
-exit_device_put:
-       platform_device_put(sch5627_pdev);
-
-       return err;
-}
-
 static struct platform_driver sch5627_driver = {
        .driver = {
                .owner  = THIS_MODULE,
@@ -858,31 +592,11 @@ static struct platform_driver sch5627_driver = {
 
 static int __init sch5627_init(void)
 {
-       int err = -ENODEV;
-       unsigned short address;
-
-       if (sch5627_find(0x4e, &address) && sch5627_find(0x2e, &address))
-               goto exit;
-
-       err = platform_driver_register(&sch5627_driver);
-       if (err)
-               goto exit;
-
-       err = sch5627_device_add(address);
-       if (err)
-               goto exit_driver;
-
-       return 0;
-
-exit_driver:
-       platform_driver_unregister(&sch5627_driver);
-exit:
-       return err;
+       return platform_driver_register(&sch5627_driver);
 }
 
 static void __exit sch5627_exit(void)
 {
-       platform_device_unregister(sch5627_pdev);
        platform_driver_unregister(&sch5627_driver);
 }
 
diff --git a/drivers/hwmon/sch5636.c b/drivers/hwmon/sch5636.c
new file mode 100644 (file)
index 0000000..244407a
--- /dev/null
@@ -0,0 +1,539 @@
+/***************************************************************************
+ *   Copyright (C) 2011 Hans de Goede <hdegoede@redhat.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.             *
+ ***************************************************************************/
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/jiffies.h>
+#include <linux/platform_device.h>
+#include <linux/hwmon.h>
+#include <linux/hwmon-sysfs.h>
+#include <linux/err.h>
+#include <linux/mutex.h>
+#include "sch56xx-common.h"
+
+#define DRVNAME "sch5636"
+#define DEVNAME "theseus" /* We only support one model for now */
+
+#define SCH5636_REG_FUJITSU_ID         0x780
+#define SCH5636_REG_FUJITSU_REV                0x783
+
+#define SCH5636_NO_INS                 5
+#define SCH5636_NO_TEMPS               16
+#define SCH5636_NO_FANS                        8
+
+static const u16 SCH5636_REG_IN_VAL[SCH5636_NO_INS] = {
+       0x22, 0x23, 0x24, 0x25, 0x189 };
+static const u16 SCH5636_REG_IN_FACTORS[SCH5636_NO_INS] = {
+       4400, 1500, 4000, 4400, 16000 };
+static const char * const SCH5636_IN_LABELS[SCH5636_NO_INS] = {
+       "3.3V", "VREF", "VBAT", "3.3AUX", "12V" };
+
+static const u16 SCH5636_REG_TEMP_VAL[SCH5636_NO_TEMPS] = {
+       0x2B, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x180, 0x181,
+       0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C };
+#define SCH5636_REG_TEMP_CTRL(i)       (0x790 + (i))
+#define SCH5636_TEMP_WORKING           0x01
+#define SCH5636_TEMP_ALARM             0x02
+#define SCH5636_TEMP_DEACTIVATED       0x80
+
+static const u16 SCH5636_REG_FAN_VAL[SCH5636_NO_FANS] = {
+       0x2C, 0x2E, 0x30, 0x32, 0x62, 0x64, 0x66, 0x68 };
+#define SCH5636_REG_FAN_CTRL(i)                (0x880 + (i))
+/* FAULT in datasheet, but acts as an alarm */
+#define SCH5636_FAN_ALARM              0x04
+#define SCH5636_FAN_NOT_PRESENT                0x08
+#define SCH5636_FAN_DEACTIVATED                0x80
+
+
+struct sch5636_data {
+       unsigned short addr;
+       struct device *hwmon_dev;
+
+       struct mutex update_lock;
+       char valid;                     /* !=0 if following fields are valid */
+       unsigned long last_updated;     /* In jiffies */
+       u8 in[SCH5636_NO_INS];
+       u8 temp_val[SCH5636_NO_TEMPS];
+       u8 temp_ctrl[SCH5636_NO_TEMPS];
+       u16 fan_val[SCH5636_NO_FANS];
+       u8 fan_ctrl[SCH5636_NO_FANS];
+};
+
+static struct sch5636_data *sch5636_update_device(struct device *dev)
+{
+       struct sch5636_data *data = dev_get_drvdata(dev);
+       struct sch5636_data *ret = data;
+       int i, val;
+
+       mutex_lock(&data->update_lock);
+
+       /* Cache the values for 1 second */
+       if (data->valid && !time_after(jiffies, data->last_updated + HZ))
+               goto abort;
+
+       for (i = 0; i < SCH5636_NO_INS; i++) {
+               val = sch56xx_read_virtual_reg(data->addr,
+                                              SCH5636_REG_IN_VAL[i]);
+               if (unlikely(val < 0)) {
+                       ret = ERR_PTR(val);
+                       goto abort;
+               }
+               data->in[i] = val;
+       }
+
+       for (i = 0; i < SCH5636_NO_TEMPS; i++) {
+               if (data->temp_ctrl[i] & SCH5636_TEMP_DEACTIVATED)
+                       continue;
+
+               val = sch56xx_read_virtual_reg(data->addr,
+                                              SCH5636_REG_TEMP_VAL[i]);
+               if (unlikely(val < 0)) {
+                       ret = ERR_PTR(val);
+                       goto abort;
+               }
+               data->temp_val[i] = val;
+
+               val = sch56xx_read_virtual_reg(data->addr,
+                                              SCH5636_REG_TEMP_CTRL(i));
+               if (unlikely(val < 0)) {
+                       ret = ERR_PTR(val);
+                       goto abort;
+               }
+               data->temp_ctrl[i] = val;
+               /* Alarms need to be explicitly write-cleared */
+               if (val & SCH5636_TEMP_ALARM) {
+                       sch56xx_write_virtual_reg(data->addr,
+                                               SCH5636_REG_TEMP_CTRL(i), val);
+               }
+       }
+
+       for (i = 0; i < SCH5636_NO_FANS; i++) {
+               if (data->fan_ctrl[i] & SCH5636_FAN_DEACTIVATED)
+                       continue;
+
+               val = sch56xx_read_virtual_reg16(data->addr,
+                                                SCH5636_REG_FAN_VAL[i]);
+               if (unlikely(val < 0)) {
+                       ret = ERR_PTR(val);
+                       goto abort;
+               }
+               data->fan_val[i] = val;
+
+               val = sch56xx_read_virtual_reg(data->addr,
+                                              SCH5636_REG_FAN_CTRL(i));
+               if (unlikely(val < 0)) {
+                       ret = ERR_PTR(val);
+                       goto abort;
+               }
+               data->fan_ctrl[i] = val;
+               /* Alarms need to be explicitly write-cleared */
+               if (val & SCH5636_FAN_ALARM) {
+                       sch56xx_write_virtual_reg(data->addr,
+                                               SCH5636_REG_FAN_CTRL(i), val);
+               }
+       }
+
+       data->last_updated = jiffies;
+       data->valid = 1;
+abort:
+       mutex_unlock(&data->update_lock);
+       return ret;
+}
+
+static int reg_to_rpm(u16 reg)
+{
+       if (reg == 0)
+               return -EIO;
+       if (reg == 0xffff)
+               return 0;
+
+       return 5400540 / reg;
+}
+
+static ssize_t show_name(struct device *dev, struct device_attribute *devattr,
+       char *buf)
+{
+       return snprintf(buf, PAGE_SIZE, "%s\n", DEVNAME);
+}
+
+static ssize_t show_in_value(struct device *dev, struct device_attribute
+       *devattr, char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct sch5636_data *data = sch5636_update_device(dev);
+       int val;
+
+       if (IS_ERR(data))
+               return PTR_ERR(data);
+
+       val = DIV_ROUND_CLOSEST(
+               data->in[attr->index] * SCH5636_REG_IN_FACTORS[attr->index],
+               255);
+       return snprintf(buf, PAGE_SIZE, "%d\n", val);
+}
+
+static ssize_t show_in_label(struct device *dev, struct device_attribute
+       *devattr, char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+
+       return snprintf(buf, PAGE_SIZE, "%s\n",
+                       SCH5636_IN_LABELS[attr->index]);
+}
+
+static ssize_t show_temp_value(struct device *dev, struct device_attribute
+       *devattr, char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct sch5636_data *data = sch5636_update_device(dev);
+       int val;
+
+       if (IS_ERR(data))
+               return PTR_ERR(data);
+
+       val = (data->temp_val[attr->index] - 64) * 1000;
+       return snprintf(buf, PAGE_SIZE, "%d\n", val);
+}
+
+static ssize_t show_temp_fault(struct device *dev, struct device_attribute
+       *devattr, char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct sch5636_data *data = sch5636_update_device(dev);
+       int val;
+
+       if (IS_ERR(data))
+               return PTR_ERR(data);
+
+       val = (data->temp_ctrl[attr->index] & SCH5636_TEMP_WORKING) ? 0 : 1;
+       return snprintf(buf, PAGE_SIZE, "%d\n", val);
+}
+
+static ssize_t show_temp_alarm(struct device *dev, struct device_attribute
+       *devattr, char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct sch5636_data *data = sch5636_update_device(dev);
+       int val;
+
+       if (IS_ERR(data))
+               return PTR_ERR(data);
+
+       val = (data->temp_ctrl[attr->index] & SCH5636_TEMP_ALARM) ? 1 : 0;
+       return snprintf(buf, PAGE_SIZE, "%d\n", val);
+}
+
+static ssize_t show_fan_value(struct device *dev, struct device_attribute
+       *devattr, char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct sch5636_data *data = sch5636_update_device(dev);
+       int val;
+
+       if (IS_ERR(data))
+               return PTR_ERR(data);
+
+       val = reg_to_rpm(data->fan_val[attr->index]);
+       if (val < 0)
+               return val;
+
+       return snprintf(buf, PAGE_SIZE, "%d\n", val);
+}
+
+static ssize_t show_fan_fault(struct device *dev, struct device_attribute
+       *devattr, char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct sch5636_data *data = sch5636_update_device(dev);
+       int val;
+
+       if (IS_ERR(data))
+               return PTR_ERR(data);
+
+       val = (data->fan_ctrl[attr->index] & SCH5636_FAN_NOT_PRESENT) ? 1 : 0;
+       return snprintf(buf, PAGE_SIZE, "%d\n", val);
+}
+
+static ssize_t show_fan_alarm(struct device *dev, struct device_attribute
+       *devattr, char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct sch5636_data *data = sch5636_update_device(dev);
+       int val;
+
+       if (IS_ERR(data))
+               return PTR_ERR(data);
+
+       val = (data->fan_ctrl[attr->index] & SCH5636_FAN_ALARM) ? 1 : 0;
+       return snprintf(buf, PAGE_SIZE, "%d\n", val);
+}
+
+static struct sensor_device_attribute sch5636_attr[] = {
+       SENSOR_ATTR(name, 0444, show_name, NULL, 0),
+       SENSOR_ATTR(in0_input, 0444, show_in_value, NULL, 0),
+       SENSOR_ATTR(in0_label, 0444, show_in_label, NULL, 0),
+       SENSOR_ATTR(in1_input, 0444, show_in_value, NULL, 1),
+       SENSOR_ATTR(in1_label, 0444, show_in_label, NULL, 1),
+       SENSOR_ATTR(in2_input, 0444, show_in_value, NULL, 2),
+       SENSOR_ATTR(in2_label, 0444, show_in_label, NULL, 2),
+       SENSOR_ATTR(in3_input, 0444, show_in_value, NULL, 3),
+       SENSOR_ATTR(in3_label, 0444, show_in_label, NULL, 3),
+       SENSOR_ATTR(in4_input, 0444, show_in_value, NULL, 4),
+       SENSOR_ATTR(in4_label, 0444, show_in_label, NULL, 4),
+};
+
+static struct sensor_device_attribute sch5636_temp_attr[] = {
+       SENSOR_ATTR(temp1_input, 0444, show_temp_value, NULL, 0),
+       SENSOR_ATTR(temp1_fault, 0444, show_temp_fault, NULL, 0),
+       SENSOR_ATTR(temp1_alarm, 0444, show_temp_alarm, NULL, 0),
+       SENSOR_ATTR(temp2_input, 0444, show_temp_value, NULL, 1),
+       SENSOR_ATTR(temp2_fault, 0444, show_temp_fault, NULL, 1),
+       SENSOR_ATTR(temp2_alarm, 0444, show_temp_alarm, NULL, 1),
+       SENSOR_ATTR(temp3_input, 0444, show_temp_value, NULL, 2),
+       SENSOR_ATTR(temp3_fault, 0444, show_temp_fault, NULL, 2),
+       SENSOR_ATTR(temp3_alarm, 0444, show_temp_alarm, NULL, 2),
+       SENSOR_ATTR(temp4_input, 0444, show_temp_value, NULL, 3),
+       SENSOR_ATTR(temp4_fault, 0444, show_temp_fault, NULL, 3),
+       SENSOR_ATTR(temp4_alarm, 0444, show_temp_alarm, NULL, 3),
+       SENSOR_ATTR(temp5_input, 0444, show_temp_value, NULL, 4),
+       SENSOR_ATTR(temp5_fault, 0444, show_temp_fault, NULL, 4),
+       SENSOR_ATTR(temp5_alarm, 0444, show_temp_alarm, NULL, 4),
+       SENSOR_ATTR(temp6_input, 0444, show_temp_value, NULL, 5),
+       SENSOR_ATTR(temp6_fault, 0444, show_temp_fault, NULL, 5),
+       SENSOR_ATTR(temp6_alarm, 0444, show_temp_alarm, NULL, 5),
+       SENSOR_ATTR(temp7_input, 0444, show_temp_value, NULL, 6),
+       SENSOR_ATTR(temp7_fault, 0444, show_temp_fault, NULL, 6),
+       SENSOR_ATTR(temp7_alarm, 0444, show_temp_alarm, NULL, 6),
+       SENSOR_ATTR(temp8_input, 0444, show_temp_value, NULL, 7),
+       SENSOR_ATTR(temp8_fault, 0444, show_temp_fault, NULL, 7),
+       SENSOR_ATTR(temp8_alarm, 0444, show_temp_alarm, NULL, 7),
+       SENSOR_ATTR(temp9_input, 0444, show_temp_value, NULL, 8),
+       SENSOR_ATTR(temp9_fault, 0444, show_temp_fault, NULL, 8),
+       SENSOR_ATTR(temp9_alarm, 0444, show_temp_alarm, NULL, 8),
+       SENSOR_ATTR(temp10_input, 0444, show_temp_value, NULL, 9),
+       SENSOR_ATTR(temp10_fault, 0444, show_temp_fault, NULL, 9),
+       SENSOR_ATTR(temp10_alarm, 0444, show_temp_alarm, NULL, 9),
+       SENSOR_ATTR(temp11_input, 0444, show_temp_value, NULL, 10),
+       SENSOR_ATTR(temp11_fault, 0444, show_temp_fault, NULL, 10),
+       SENSOR_ATTR(temp11_alarm, 0444, show_temp_alarm, NULL, 10),
+       SENSOR_ATTR(temp12_input, 0444, show_temp_value, NULL, 11),
+       SENSOR_ATTR(temp12_fault, 0444, show_temp_fault, NULL, 11),
+       SENSOR_ATTR(temp12_alarm, 0444, show_temp_alarm, NULL, 11),
+       SENSOR_ATTR(temp13_input, 0444, show_temp_value, NULL, 12),
+       SENSOR_ATTR(temp13_fault, 0444, show_temp_fault, NULL, 12),
+       SENSOR_ATTR(temp13_alarm, 0444, show_temp_alarm, NULL, 12),
+       SENSOR_ATTR(temp14_input, 0444, show_temp_value, NULL, 13),
+       SENSOR_ATTR(temp14_fault, 0444, show_temp_fault, NULL, 13),
+       SENSOR_ATTR(temp14_alarm, 0444, show_temp_alarm, NULL, 13),
+       SENSOR_ATTR(temp15_input, 0444, show_temp_value, NULL, 14),
+       SENSOR_ATTR(temp15_fault, 0444, show_temp_fault, NULL, 14),
+       SENSOR_ATTR(temp15_alarm, 0444, show_temp_alarm, NULL, 14),
+       SENSOR_ATTR(temp16_input, 0444, show_temp_value, NULL, 15),
+       SENSOR_ATTR(temp16_fault, 0444, show_temp_fault, NULL, 15),
+       SENSOR_ATTR(temp16_alarm, 0444, show_temp_alarm, NULL, 15),
+};
+
+static struct sensor_device_attribute sch5636_fan_attr[] = {
+       SENSOR_ATTR(fan1_input, 0444, show_fan_value, NULL, 0),
+       SENSOR_ATTR(fan1_fault, 0444, show_fan_fault, NULL, 0),
+       SENSOR_ATTR(fan1_alarm, 0444, show_fan_alarm, NULL, 0),
+       SENSOR_ATTR(fan2_input, 0444, show_fan_value, NULL, 1),
+       SENSOR_ATTR(fan2_fault, 0444, show_fan_fault, NULL, 1),
+       SENSOR_ATTR(fan2_alarm, 0444, show_fan_alarm, NULL, 1),
+       SENSOR_ATTR(fan3_input, 0444, show_fan_value, NULL, 2),
+       SENSOR_ATTR(fan3_fault, 0444, show_fan_fault, NULL, 2),
+       SENSOR_ATTR(fan3_alarm, 0444, show_fan_alarm, NULL, 2),
+       SENSOR_ATTR(fan4_input, 0444, show_fan_value, NULL, 3),
+       SENSOR_ATTR(fan4_fault, 0444, show_fan_fault, NULL, 3),
+       SENSOR_ATTR(fan4_alarm, 0444, show_fan_alarm, NULL, 3),
+       SENSOR_ATTR(fan5_input, 0444, show_fan_value, NULL, 4),
+       SENSOR_ATTR(fan5_fault, 0444, show_fan_fault, NULL, 4),
+       SENSOR_ATTR(fan5_alarm, 0444, show_fan_alarm, NULL, 4),
+       SENSOR_ATTR(fan6_input, 0444, show_fan_value, NULL, 5),
+       SENSOR_ATTR(fan6_fault, 0444, show_fan_fault, NULL, 5),
+       SENSOR_ATTR(fan6_alarm, 0444, show_fan_alarm, NULL, 5),
+       SENSOR_ATTR(fan7_input, 0444, show_fan_value, NULL, 6),
+       SENSOR_ATTR(fan7_fault, 0444, show_fan_fault, NULL, 6),
+       SENSOR_ATTR(fan7_alarm, 0444, show_fan_alarm, NULL, 6),
+       SENSOR_ATTR(fan8_input, 0444, show_fan_value, NULL, 7),
+       SENSOR_ATTR(fan8_fault, 0444, show_fan_fault, NULL, 7),
+       SENSOR_ATTR(fan8_alarm, 0444, show_fan_alarm, NULL, 7),
+};
+
+static int sch5636_remove(struct platform_device *pdev)
+{
+       struct sch5636_data *data = platform_get_drvdata(pdev);
+       int i;
+
+       if (data->hwmon_dev)
+               hwmon_device_unregister(data->hwmon_dev);
+
+       for (i = 0; i < ARRAY_SIZE(sch5636_attr); i++)
+               device_remove_file(&pdev->dev, &sch5636_attr[i].dev_attr);
+
+       for (i = 0; i < SCH5636_NO_TEMPS * 3; i++)
+               device_remove_file(&pdev->dev,
+                                  &sch5636_temp_attr[i].dev_attr);
+
+       for (i = 0; i < SCH5636_NO_FANS * 3; i++)
+               device_remove_file(&pdev->dev,
+                                  &sch5636_fan_attr[i].dev_attr);
+
+       platform_set_drvdata(pdev, NULL);
+       kfree(data);
+
+       return 0;
+}
+
+static int __devinit sch5636_probe(struct platform_device *pdev)
+{
+       struct sch5636_data *data;
+       int i, err, val, revision[2];
+       char id[4];
+
+       data = kzalloc(sizeof(struct sch5636_data), GFP_KERNEL);
+       if (!data)
+               return -ENOMEM;
+
+       data->addr = platform_get_resource(pdev, IORESOURCE_IO, 0)->start;
+       mutex_init(&data->update_lock);
+       platform_set_drvdata(pdev, data);
+
+       for (i = 0; i < 3; i++) {
+               val = sch56xx_read_virtual_reg(data->addr,
+                                              SCH5636_REG_FUJITSU_ID + i);
+               if (val < 0) {
+                       pr_err("Could not read Fujitsu id byte at %#x\n",
+                               SCH5636_REG_FUJITSU_ID + i);
+                       err = val;
+                       goto error;
+               }
+               id[i] = val;
+       }
+       id[i] = '\0';
+
+       if (strcmp(id, "THS")) {
+               pr_err("Unknown Fujitsu id: %02x%02x%02x\n",
+                      id[0], id[1], id[2]);
+               err = -ENODEV;
+               goto error;
+       }
+
+       for (i = 0; i < 2; i++) {
+               val = sch56xx_read_virtual_reg(data->addr,
+                                              SCH5636_REG_FUJITSU_REV + i);
+               if (val < 0) {
+                       err = val;
+                       goto error;
+               }
+               revision[i] = val;
+       }
+       pr_info("Found %s chip at %#hx, revison: %d.%02d\n", DEVNAME,
+               data->addr, revision[0], revision[1]);
+
+       /* Read all temp + fan ctrl registers to determine which are active */
+       for (i = 0; i < SCH5636_NO_TEMPS; i++) {
+               val = sch56xx_read_virtual_reg(data->addr,
+                                              SCH5636_REG_TEMP_CTRL(i));
+               if (unlikely(val < 0)) {
+                       err = val;
+                       goto error;
+               }
+               data->temp_ctrl[i] = val;
+       }
+
+       for (i = 0; i < SCH5636_NO_FANS; i++) {
+               val = sch56xx_read_virtual_reg(data->addr,
+                                              SCH5636_REG_FAN_CTRL(i));
+               if (unlikely(val < 0)) {
+                       err = val;
+                       goto error;
+               }
+               data->fan_ctrl[i] = val;
+       }
+
+       for (i = 0; i < ARRAY_SIZE(sch5636_attr); i++) {
+               err = device_create_file(&pdev->dev,
+                                        &sch5636_attr[i].dev_attr);
+               if (err)
+                       goto error;
+       }
+
+       for (i = 0; i < (SCH5636_NO_TEMPS * 3); i++) {
+               if (data->temp_ctrl[i/3] & SCH5636_TEMP_DEACTIVATED)
+                       continue;
+
+               err = device_create_file(&pdev->dev,
+                                       &sch5636_temp_attr[i].dev_attr);
+               if (err)
+                       goto error;
+       }
+
+       for (i = 0; i < (SCH5636_NO_FANS * 3); i++) {
+               if (data->fan_ctrl[i/3] & SCH5636_FAN_DEACTIVATED)
+                       continue;
+
+               err = device_create_file(&pdev->dev,
+                                       &sch5636_fan_attr[i].dev_attr);
+               if (err)
+                       goto error;
+       }
+
+       data->hwmon_dev = hwmon_device_register(&pdev->dev);
+       if (IS_ERR(data->hwmon_dev)) {
+               err = PTR_ERR(data->hwmon_dev);
+               data->hwmon_dev = NULL;
+               goto error;
+       }
+
+       return 0;
+
+error:
+       sch5636_remove(pdev);
+       return err;
+}
+
+static struct platform_driver sch5636_driver = {
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = DRVNAME,
+       },
+       .probe          = sch5636_probe,
+       .remove         = sch5636_remove,
+};
+
+static int __init sch5636_init(void)
+{
+       return platform_driver_register(&sch5636_driver);
+}
+
+static void __exit sch5636_exit(void)
+{
+       platform_driver_unregister(&sch5636_driver);
+}
+
+MODULE_DESCRIPTION("SMSC SCH5636 Hardware Monitoring Driver");
+MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");
+MODULE_LICENSE("GPL");
+
+module_init(sch5636_init);
+module_exit(sch5636_exit);
diff --git a/drivers/hwmon/sch56xx-common.c b/drivers/hwmon/sch56xx-common.c
new file mode 100644 (file)
index 0000000..fac32ee
--- /dev/null
@@ -0,0 +1,340 @@
+/***************************************************************************
+ *   Copyright (C) 2010-2011 Hans de Goede <hdegoede@redhat.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.             *
+ ***************************************************************************/
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/acpi.h>
+#include <linux/delay.h>
+#include "sch56xx-common.h"
+
+#define SIO_SCH56XX_LD_EM      0x0C    /* Embedded uController Logical Dev */
+#define SIO_UNLOCK_KEY         0x55    /* Key to enable Super-I/O */
+#define SIO_LOCK_KEY           0xAA    /* Key to disable Super-I/O */
+
+#define SIO_REG_LDSEL          0x07    /* Logical device select */
+#define SIO_REG_DEVID          0x20    /* Device ID */
+#define SIO_REG_ENABLE         0x30    /* Logical device enable */
+#define SIO_REG_ADDR           0x66    /* Logical device address (2 bytes) */
+
+#define SIO_SCH5627_ID         0xC6    /* Chipset ID */
+#define SIO_SCH5636_ID         0xC7    /* Chipset ID */
+
+#define REGION_LENGTH          9
+
+#define SCH56XX_CMD_READ       0x02
+#define SCH56XX_CMD_WRITE      0x03
+
+static struct platform_device *sch56xx_pdev;
+
+/* Super I/O functions */
+static inline int superio_inb(int base, int reg)
+{
+       outb(reg, base);
+       return inb(base + 1);
+}
+
+static inline int superio_enter(int base)
+{
+       /* Don't step on other drivers' I/O space by accident */
+       if (!request_muxed_region(base, 2, "sch56xx")) {
+               pr_err("I/O address 0x%04x already in use\n", base);
+               return -EBUSY;
+       }
+
+       outb(SIO_UNLOCK_KEY, base);
+
+       return 0;
+}
+
+static inline void superio_select(int base, int ld)
+{
+       outb(SIO_REG_LDSEL, base);
+       outb(ld, base + 1);
+}
+
+static inline void superio_exit(int base)
+{
+       outb(SIO_LOCK_KEY, base);
+       release_region(base, 2);
+}
+
+static int sch56xx_send_cmd(u16 addr, u8 cmd, u16 reg, u8 v)
+{
+       u8 val;
+       int i;
+       /*
+        * According to SMSC for the commands we use the maximum time for
+        * the EM to respond is 15 ms, but testing shows in practice it
+        * responds within 15-32 reads, so we first busy poll, and if
+        * that fails sleep a bit and try again until we are way past
+        * the 15 ms maximum response time.
+        */
+       const int max_busy_polls = 64;
+       const int max_lazy_polls = 32;
+
+       /* (Optional) Write-Clear the EC to Host Mailbox Register */
+       val = inb(addr + 1);
+       outb(val, addr + 1);
+
+       /* Set Mailbox Address Pointer to first location in Region 1 */
+       outb(0x00, addr + 2);
+       outb(0x80, addr + 3);
+
+       /* Write Request Packet Header */
+       outb(cmd, addr + 4); /* VREG Access Type read:0x02 write:0x03 */
+       outb(0x01, addr + 5); /* # of Entries: 1 Byte (8-bit) */
+       outb(0x04, addr + 2); /* Mailbox AP to first data entry loc. */
+
+       /* Write Value field */
+       if (cmd == SCH56XX_CMD_WRITE)
+               outb(v, addr + 4);
+
+       /* Write Address field */
+       outb(reg & 0xff, addr + 6);
+       outb(reg >> 8, addr + 7);
+
+       /* Execute the Random Access Command */
+       outb(0x01, addr); /* Write 01h to the Host-to-EC register */
+
+       /* EM Interface Polling "Algorithm" */
+       for (i = 0; i < max_busy_polls + max_lazy_polls; i++) {
+               if (i >= max_busy_polls)
+                       msleep(1);
+               /* Read Interrupt source Register */
+               val = inb(addr + 8);
+               /* Write Clear the interrupt source bits */
+               if (val)
+                       outb(val, addr + 8);
+               /* Command Completed ? */
+               if (val & 0x01)
+                       break;
+       }
+       if (i == max_busy_polls + max_lazy_polls) {
+               pr_err("Max retries exceeded reading virtual "
+                      "register 0x%04hx (%d)\n", reg, 1);
+               return -EIO;
+       }
+
+       /*
+        * According to SMSC we may need to retry this, but sofar I've always
+        * seen this succeed in 1 try.
+        */
+       for (i = 0; i < max_busy_polls; i++) {
+               /* Read EC-to-Host Register */
+               val = inb(addr + 1);
+               /* Command Completed ? */
+               if (val == 0x01)
+                       break;
+
+               if (i == 0)
+                       pr_warn("EC reports: 0x%02x reading virtual register "
+                               "0x%04hx\n", (unsigned int)val, reg);
+       }
+       if (i == max_busy_polls) {
+               pr_err("Max retries exceeded reading virtual "
+                      "register 0x%04hx (%d)\n", reg, 2);
+               return -EIO;
+       }
+
+       /*
+        * According to the SMSC app note we should now do:
+        *
+        * Set Mailbox Address Pointer to first location in Region 1 *
+        * outb(0x00, addr + 2);
+        * outb(0x80, addr + 3);
+        *
+        * But if we do that things don't work, so let's not.
+        */
+
+       /* Read Value field */
+       if (cmd == SCH56XX_CMD_READ)
+               return inb(addr + 4);
+
+       return 0;
+}
+
+int sch56xx_read_virtual_reg(u16 addr, u16 reg)
+{
+       return sch56xx_send_cmd(addr, SCH56XX_CMD_READ, reg, 0);
+}
+EXPORT_SYMBOL(sch56xx_read_virtual_reg);
+
+int sch56xx_write_virtual_reg(u16 addr, u16 reg, u8 val)
+{
+       return sch56xx_send_cmd(addr, SCH56XX_CMD_WRITE, reg, val);
+}
+EXPORT_SYMBOL(sch56xx_write_virtual_reg);
+
+int sch56xx_read_virtual_reg16(u16 addr, u16 reg)
+{
+       int lsb, msb;
+
+       /* Read LSB first, this will cause the matching MSB to be latched */
+       lsb = sch56xx_read_virtual_reg(addr, reg);
+       if (lsb < 0)
+               return lsb;
+
+       msb = sch56xx_read_virtual_reg(addr, reg + 1);
+       if (msb < 0)
+               return msb;
+
+       return lsb | (msb << 8);
+}
+EXPORT_SYMBOL(sch56xx_read_virtual_reg16);
+
+int sch56xx_read_virtual_reg12(u16 addr, u16 msb_reg, u16 lsn_reg,
+                              int high_nibble)
+{
+       int msb, lsn;
+
+       /* Read MSB first, this will cause the matching LSN to be latched */
+       msb = sch56xx_read_virtual_reg(addr, msb_reg);
+       if (msb < 0)
+               return msb;
+
+       lsn = sch56xx_read_virtual_reg(addr, lsn_reg);
+       if (lsn < 0)
+               return lsn;
+
+       if (high_nibble)
+               return (msb << 4) | (lsn >> 4);
+       else
+               return (msb << 4) | (lsn & 0x0f);
+}
+EXPORT_SYMBOL(sch56xx_read_virtual_reg12);
+
+static int __init sch56xx_find(int sioaddr, unsigned short *address,
+                              const char **name)
+{
+       u8 devid;
+       int err;
+
+       err = superio_enter(sioaddr);
+       if (err)
+               return err;
+
+       devid = superio_inb(sioaddr, SIO_REG_DEVID);
+       switch (devid) {
+       case SIO_SCH5627_ID:
+               *name = "sch5627";
+               break;
+       case SIO_SCH5636_ID:
+               *name = "sch5636";
+               break;
+       default:
+               pr_debug("Unsupported device id: 0x%02x\n",
+                        (unsigned int)devid);
+               err = -ENODEV;
+               goto exit;
+       }
+
+       superio_select(sioaddr, SIO_SCH56XX_LD_EM);
+
+       if (!(superio_inb(sioaddr, SIO_REG_ENABLE) & 0x01)) {
+               pr_warn("Device not activated\n");
+               err = -ENODEV;
+               goto exit;
+       }
+
+       /*
+        * Warning the order of the low / high byte is the other way around
+        * as on most other superio devices!!
+        */
+       *address = superio_inb(sioaddr, SIO_REG_ADDR) |
+                  superio_inb(sioaddr, SIO_REG_ADDR + 1) << 8;
+       if (*address == 0) {
+               pr_warn("Base address not set\n");
+               err = -ENODEV;
+               goto exit;
+       }
+
+exit:
+       superio_exit(sioaddr);
+       return err;
+}
+
+static int __init sch56xx_device_add(unsigned short address, const char *name)
+{
+       struct resource res = {
+               .start  = address,
+               .end    = address + REGION_LENGTH - 1,
+               .flags  = IORESOURCE_IO,
+       };
+       int err;
+
+       sch56xx_pdev = platform_device_alloc(name, address);
+       if (!sch56xx_pdev)
+               return -ENOMEM;
+
+       res.name = sch56xx_pdev->name;
+       err = acpi_check_resource_conflict(&res);
+       if (err)
+               goto exit_device_put;
+
+       err = platform_device_add_resources(sch56xx_pdev, &res, 1);
+       if (err) {
+               pr_err("Device resource addition failed\n");
+               goto exit_device_put;
+       }
+
+       err = platform_device_add(sch56xx_pdev);
+       if (err) {
+               pr_err("Device addition failed\n");
+               goto exit_device_put;
+       }
+
+       return 0;
+
+exit_device_put:
+       platform_device_put(sch56xx_pdev);
+
+       return err;
+}
+
+static int __init sch56xx_init(void)
+{
+       int err;
+       unsigned short address;
+       const char *name;
+
+       err = sch56xx_find(0x4e, &address, &name);
+       if (err)
+               err = sch56xx_find(0x2e, &address, &name);
+       if (err)
+               return err;
+
+       return sch56xx_device_add(address, name);
+}
+
+static void __exit sch56xx_exit(void)
+{
+       platform_device_unregister(sch56xx_pdev);
+}
+
+MODULE_DESCRIPTION("SMSC SCH56xx Hardware Monitoring Common Code");
+MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");
+MODULE_LICENSE("GPL");
+
+module_init(sch56xx_init);
+module_exit(sch56xx_exit);
diff --git a/drivers/hwmon/sch56xx-common.h b/drivers/hwmon/sch56xx-common.h
new file mode 100644 (file)
index 0000000..d5eaf3b
--- /dev/null
@@ -0,0 +1,24 @@
+/***************************************************************************
+ *   Copyright (C) 2010-2011 Hans de Goede <hdegoede@redhat.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.             *
+ ***************************************************************************/
+
+int sch56xx_read_virtual_reg(u16 addr, u16 reg);
+int sch56xx_write_virtual_reg(u16 addr, u16 reg, u8 val);
+int sch56xx_read_virtual_reg16(u16 addr, u16 reg);
+int sch56xx_read_virtual_reg12(u16 addr, u16 msb_reg, u16 lsn_reg,
+                              int high_nibble);
index cf4330b352ef2c9b439b1685c5d94ad29eba31f4..7d231cf5d2ced2fe71c40b6dda38b809874a1e6f 100644 (file)
@@ -671,7 +671,7 @@ static ssize_t sht15_show_status(struct device *dev,
  * @buf:       sysfs buffer to read the new heater state from.
  * @count:     length of the data.
  *
- * Will be called on read access to heater_enable sysfs attribute.
+ * Will be called on write access to heater_enable sysfs attribute.
  * Returns number of bytes actually decoded, negative errno on error.
  */
 static ssize_t sht15_store_heater(struct device *dev,
index 0d18de424c66dca941cb2540c8f1d6aeb508fdd1..8eac67d769fa8a18788b15da2debe6a5256ed47a 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/hwmon.h>
+#include <linux/hwmon-vid.h>
 #include <linux/sysfs.h>
 #include <linux/hwmon-sysfs.h>
 #include <linux/err.h>
@@ -48,8 +49,10 @@ enum { SHOW_TEMP, SHOW_LABEL, SHOW_NAME };
 struct via_cputemp_data {
        struct device *hwmon_dev;
        const char *name;
+       u8 vrm;
        u32 id;
-       u32 msr;
+       u32 msr_temp;
+       u32 msr_vid;
 };
 
 /*
@@ -77,13 +80,27 @@ static ssize_t show_temp(struct device *dev,
        u32 eax, edx;
        int err;
 
-       err = rdmsr_safe_on_cpu(data->id, data->msr, &eax, &edx);
+       err = rdmsr_safe_on_cpu(data->id, data->msr_temp, &eax, &edx);
        if (err)
                return -EAGAIN;
 
        return sprintf(buf, "%lu\n", ((unsigned long)eax & 0xffffff) * 1000);
 }
 
+static ssize_t show_cpu_vid(struct device *dev,
+                           struct device_attribute *devattr, char *buf)
+{
+       struct via_cputemp_data *data = dev_get_drvdata(dev);
+       u32 eax, edx;
+       int err;
+
+       err = rdmsr_safe_on_cpu(data->id, data->msr_vid, &eax, &edx);
+       if (err)
+               return -EAGAIN;
+
+       return sprintf(buf, "%d\n", vid_from_reg(~edx & 0x7f, data->vrm));
+}
+
 static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL,
                          SHOW_TEMP);
 static SENSOR_DEVICE_ATTR(temp1_label, S_IRUGO, show_name, NULL, SHOW_LABEL);
@@ -100,6 +117,9 @@ static const struct attribute_group via_cputemp_group = {
        .attrs = via_cputemp_attributes,
 };
 
+/* Optional attributes */
+static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_cpu_vid, NULL);
+
 static int __devinit via_cputemp_probe(struct platform_device *pdev)
 {
        struct via_cputemp_data *data;
@@ -122,11 +142,12 @@ static int __devinit via_cputemp_probe(struct platform_device *pdev)
                /* C7 A */
        case 0xD:
                /* C7 D */
-               data->msr = 0x1169;
+               data->msr_temp = 0x1169;
+               data->msr_vid = 0x198;
                break;
        case 0xF:
                /* Nano */
-               data->msr = 0x1423;
+               data->msr_temp = 0x1423;
                break;
        default:
                err = -ENODEV;
@@ -134,7 +155,7 @@ static int __devinit via_cputemp_probe(struct platform_device *pdev)
        }
 
        /* test if we can access the TEMPERATURE MSR */
-       err = rdmsr_safe_on_cpu(data->id, data->msr, &eax, &edx);
+       err = rdmsr_safe_on_cpu(data->id, data->msr_temp, &eax, &edx);
        if (err) {
                dev_err(&pdev->dev,
                        "Unable to access TEMPERATURE MSR, giving up\n");
@@ -147,6 +168,15 @@ static int __devinit via_cputemp_probe(struct platform_device *pdev)
        if (err)
                goto exit_free;
 
+       if (data->msr_vid)
+               data->vrm = vid_which_vrm();
+
+       if (data->vrm) {
+               err = device_create_file(&pdev->dev, &dev_attr_cpu0_vid);
+               if (err)
+                       goto exit_remove;
+       }
+
        data->hwmon_dev = hwmon_device_register(&pdev->dev);
        if (IS_ERR(data->hwmon_dev)) {
                err = PTR_ERR(data->hwmon_dev);
@@ -158,6 +188,8 @@ static int __devinit via_cputemp_probe(struct platform_device *pdev)
        return 0;
 
 exit_remove:
+       if (data->vrm)
+               device_remove_file(&pdev->dev, &dev_attr_cpu0_vid);
        sysfs_remove_group(&pdev->dev.kobj, &via_cputemp_group);
 exit_free:
        platform_set_drvdata(pdev, NULL);
@@ -171,6 +203,8 @@ static int __devexit via_cputemp_remove(struct platform_device *pdev)
        struct via_cputemp_data *data = platform_get_drvdata(pdev);
 
        hwmon_device_unregister(data->hwmon_dev);
+       if (data->vrm)
+               device_remove_file(&pdev->dev, &dev_attr_cpu0_vid);
        sysfs_remove_group(&pdev->dev.kobj, &via_cputemp_group);
        platform_set_drvdata(pdev, NULL);
        kfree(data);
index 30f06e956bfb77e4f183e524657c21dbc211d1fe..5f13c62e64b4c4053c8d8cf8ebc60a1d7f144726 100644 (file)
@@ -7,7 +7,7 @@ menuconfig I2C
        depends on HAS_IOMEM
        select RT_MUTEXES
        ---help---
-         I2C (pronounce: I-square-C) is a slow serial bus protocol used in
+         I2C (pronounce: I-squared-C) is a slow serial bus protocol used in
          many micro controller applications and developed by Philips.  SMBus,
          or System Management Bus is a subset of the I2C protocol.  More
          information is contained in the directory <file:Documentation/i2c/>,
index dd364171f9c5deedd88094288bd5c4d4a6573530..b6807db7b36f98f03ff00d15f6677906c4ddc8aa 100644 (file)
@@ -1,23 +1,23 @@
 /*
-    Copyright (c) 2000  Frodo Looijaard <frodol@dds.nl>, 
-                        Philip Edelbrock <phil@netroedge.com>, 
                       Mark D. Studebaker <mdsxyz123@yahoo.com>,
-                        Dan Eaton <dan.eaton@rocketlogix.com> and 
-                        Stephen Rousset<stephen.rousset@rocketlogix.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Copyright (c) 2000  Frodo Looijaard <frodol@dds.nl>,
+ *                      Philip Edelbrock <phil@netroedge.com>,
*                      Mark D. Studebaker <mdsxyz123@yahoo.com>,
+ *                      Dan Eaton <dan.eaton@rocketlogix.com> and
+ *                      Stephen Rousset <stephen.rousset@rocketlogix.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., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
 /*
@@ -254,8 +254,8 @@ static int ali1535_transaction(struct i2c_adapter *adap)
        if (temp & (ALI1535_STS_ERR | ALI1535_STS_BUSY)) {
                /* do a clear-on-write */
                outb_p(0xFF, SMBHSTSTS);
-               if ((temp = inb_p(SMBHSTSTS)) &
-                   (ALI1535_STS_ERR | ALI1535_STS_BUSY)) {
+               temp = inb_p(SMBHSTSTS);
+               if (temp & (ALI1535_STS_ERR | ALI1535_STS_BUSY)) {
                        /* This is probably going to be correctable only by a
                         * power reset as one of the bits now appears to be
                         * stuck */
@@ -267,9 +267,8 @@ static int ali1535_transaction(struct i2c_adapter *adap)
                }
        } else {
                /* check and clear done bit */
-               if (temp & ALI1535_STS_DONE) {
+               if (temp & ALI1535_STS_DONE)
                        outb_p(temp, SMBHSTSTS);
-               }
        }
 
        /* start the transaction by writing anything to the start register */
@@ -278,7 +277,7 @@ static int ali1535_transaction(struct i2c_adapter *adap)
        /* We will always wait for a fraction of a second! */
        timeout = 0;
        do {
-               msleep(1);
+               usleep_range(1000, 2000);
                temp = inb_p(SMBHSTSTS);
        } while (((temp & ALI1535_STS_BUSY) && !(temp & ALI1535_STS_IDLE))
                 && (timeout++ < MAX_TIMEOUT));
@@ -325,12 +324,12 @@ static int ali1535_transaction(struct i2c_adapter *adap)
        /* take consequent actions for error conditions */
        if (!(temp & ALI1535_STS_DONE)) {
                /* issue "kill" to reset host controller */
-               outb_p(ALI1535_KILL,SMBHSTTYP);
-               outb_p(0xFF,SMBHSTSTS);
+               outb_p(ALI1535_KILL, SMBHSTTYP);
+               outb_p(0xFF, SMBHSTSTS);
        } else if (temp & ALI1535_STS_ERR) {
                /* issue "timeout" to reset all devices on bus */
-               outb_p(ALI1535_T_OUT,SMBHSTTYP);
-               outb_p(0xFF,SMBHSTSTS);
+               outb_p(ALI1535_T_OUT, SMBHSTTYP);
+               outb_p(0xFF, SMBHSTSTS);
        }
 
        return result;
@@ -351,7 +350,7 @@ static s32 ali1535_access(struct i2c_adapter *adap, u16 addr,
        for (timeout = 0;
             (timeout < MAX_TIMEOUT) && !(temp & ALI1535_STS_IDLE);
             timeout++) {
-               msleep(1);
+               usleep_range(1000, 2000);
                temp = inb_p(SMBHSTSTS);
        }
        if (timeout >= MAX_TIMEOUT)
@@ -480,12 +479,12 @@ static struct i2c_adapter ali1535_adapter = {
        .algo           = &smbus_algorithm,
 };
 
-static const struct pci_device_id ali1535_ids[] = {
+static DEFINE_PCI_DEVICE_TABLE(ali1535_ids) = {
        { PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101) },
        { },
 };
 
-MODULE_DEVICE_TABLE (pci, ali1535_ids);
+MODULE_DEVICE_TABLE(pci, ali1535_ids);
 
 static int __devinit ali1535_probe(struct pci_dev *dev, const struct pci_device_id *id)
 {
index 3a20961bef1e4e675472b9e5ab5886910ea03d46..b1d9cd28d8da9d92906a6cd5dc6b20c50ac3b48e 100644 (file)
@@ -662,11 +662,8 @@ static int __devinit cpm_i2c_probe(struct platform_device *ofdev)
        /* register new adapter to i2c module... */
 
        data = of_get_property(ofdev->dev.of_node, "linux,i2c-index", &len);
-       if (data && len == 4) {
-               cpm->adap.nr = *data;
-               result = i2c_add_numbered_adapter(&cpm->adap);
-       } else
-               result = i2c_add_adapter(&cpm->adap);
+       cpm->adap.nr = (data && len == 4) ? be32_to_cpup(data) : -1;
+       result = i2c_add_numbered_adapter(&cpm->adap);
 
        if (result < 0) {
                dev_err(&ofdev->dev, "Unable to register with I2C\n");
index 3df1bc80f37a6dd2edc6530424cea6a122d3564f..3876a2478bd7a00d11c906aeb4503915a92075ac 100644 (file)
@@ -227,7 +227,7 @@ static int highlander_i2c_read(struct highlander_i2c_dev *dev)
 
        /*
         * The R0P7780LC0011RL FPGA needs a significant delay between
-        * data read cycles, otherwise the transciever gets confused and
+        * data read cycles, otherwise the transceiver gets confused and
         * garbage is returned when the read is subsequently aborted.
         *
         * It is not sufficient to wait for BBSY.
index 58a58c7eaa17d6eb7fac8b2ca6014110e0e3f225..1a766cf74f6be3cbf05dc7cdd950c1292bce34e8 100644 (file)
@@ -204,7 +204,7 @@ struct omap_i2c_dev {
        u16                     errata;
 };
 
-const static u8 reg_map[] = {
+static const u8 reg_map[] = {
        [OMAP_I2C_REV_REG] = 0x00,
        [OMAP_I2C_IE_REG] = 0x01,
        [OMAP_I2C_STAT_REG] = 0x02,
@@ -225,7 +225,7 @@ const static u8 reg_map[] = {
        [OMAP_I2C_BUFSTAT_REG] = 0x10,
 };
 
-const static u8 omap4_reg_map[] = {
+static const u8 omap4_reg_map[] = {
        [OMAP_I2C_REV_REG] = 0x04,
        [OMAP_I2C_IE_REG] = 0x2c,
        [OMAP_I2C_STAT_REG] = 0x28,
index f59224a5c76183374eaefd99ff072eb38231d80c..d60364650990746897669725ac5b2324c7cb1d04 100644 (file)
@@ -1079,7 +1079,7 @@ static int i2c_pxa_probe(struct platform_device *dev)
         * The reason to do so is to avoid sysfs names that only make
         * sense when there are multiple adapters.
         */
-       i2c->adap.nr = dev->id != -1 ? dev->id : 0;
+       i2c->adap.nr = dev->id;
        snprintf(i2c->adap.name, sizeof(i2c->adap.name), "pxa_i2c-i2c.%u",
                 i2c->adap.nr);
 
@@ -1142,10 +1142,7 @@ static int i2c_pxa_probe(struct platform_device *dev)
        i2c->adap.dev.of_node = dev->dev.of_node;
 #endif
 
-       if (i2c_type == REGS_CE4100)
-               ret = i2c_add_adapter(&i2c->adap);
-       else
-               ret = i2c_add_numbered_adapter(&i2c->adap);
+       ret = i2c_add_numbered_adapter(&i2c->adap);
        if (ret < 0) {
                printk(KERN_INFO "I2C: Failed to add bus\n");
                goto eadapt;
index cb5d01e279c6606b69c448bf42f45a3388747b74..c64ba736f4802f9e093673c4a832156bc309ebfd 100644 (file)
@@ -341,10 +341,7 @@ static int __devinit s6i2c_probe(struct platform_device *dev)
        i2c_wr16(iface, S6_I2C_TXTL, 0);
 
        platform_set_drvdata(dev, iface);
-       if (bus_num < 0)
-               rc = i2c_add_adapter(p_adap);
-       else
-               rc = i2c_add_numbered_adapter(p_adap);
+       rc = i2c_add_numbered_adapter(p_adap);
        if (rc)
                goto err_irq_free;
        return 0;
index 9a58994ff7ea54bd46cf6b576e9e43b10e736b79..131079a3e2923a1feaa05248a236d8ee27890c4a 100644 (file)
@@ -925,6 +925,9 @@ EXPORT_SYMBOL(i2c_add_adapter);
  * or otherwise built in to the system's mainboard, and where i2c_board_info
  * is used to properly configure I2C devices.
  *
+ * If the requested bus number is set to -1, then this function will behave
+ * identically to i2c_add_adapter, and will dynamically assign a bus number.
+ *
  * If no devices have pre-been declared for this bus, then be sure to
  * register the adapter before any dynamically allocated ones.  Otherwise
  * the required bus ID may not be available.
@@ -940,6 +943,8 @@ int i2c_add_numbered_adapter(struct i2c_adapter *adap)
        int     id;
        int     status;
 
+       if (adap->nr == -1) /* -1 means dynamically assign bus id */
+               return i2c_add_adapter(adap);
        if (adap->nr & ~MAX_ID_MASK)
                return -EINVAL;
 
index 9e8f4e1b0cc9c4c650a375e47c35712cd6696970..712c7904d03e5d460854cc565bf139bf29f3290e 100644 (file)
@@ -342,7 +342,7 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)
                return -ENODEV;
        }
 
-       mem_size = mem->end - mem->start + 1;
+       mem_size = resource_size(mem);
        if (request_mem_region(mem->start, mem_size, "palm_bk3710") == NULL) {
                printk(KERN_ERR "failed to request memory region\n");
                return -EBUSY;
index bed3e39aac9610ac2434558e32295b1c59a8e8ea..71c231954972d304f6e402995ae963b56c20763b 100644 (file)
@@ -551,10 +551,10 @@ static int __init tx4939ide_probe(struct platform_device *pdev)
                return -ENODEV;
 
        if (!devm_request_mem_region(&pdev->dev, res->start,
-                                    res->end - res->start + 1, "tx4938ide"))
+                                    resource_size(res), "tx4938ide"))
                return -EBUSY;
        mapbase = (unsigned long)devm_ioremap(&pdev->dev, res->start,
-                                             res->end - res->start + 1);
+                                             resource_size(res));
        if (!mapbase)
                return -EBUSY;
        memset(&hw, 0, sizeof(hw));
index 980af94ba9c822aef9fc520ac41962c9b0d249a2..07a8363f3c5c817e077f6cf9db954608585494a7 100644 (file)
@@ -210,7 +210,7 @@ int __ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command)
        /*
         * Some devices (Synaptics) peform the reset before
         * ACKing the reset command, and so it can take a long
-        * time before the ACK arrrives.
+        * time before the ACK arrives.
         */
        if (ps2_sendbyte(ps2dev, command & 0xff,
                         command == PS2_CMD_RESET_BAT ? 1000 : 200))
index d55874e5d1c2d1b72f58b40d1dbe270614f120d6..44fc8b4bcd8157632b5e4bab9b8851dcac9e6523 100644 (file)
@@ -300,8 +300,7 @@ static int __devinit ps2_probe(struct sa1111_dev *dev)
 
  out:
        sa1111_disable_device(ps2if->dev);
-       release_mem_region(dev->res.start,
-                          dev->res.end - dev->res.start + 1);
+       release_mem_region(dev->res.start, resource_size(&dev->res));
  free:
        sa1111_set_drvdata(dev, NULL);
        kfree(ps2if);
@@ -317,8 +316,7 @@ static int __devexit ps2_remove(struct sa1111_dev *dev)
        struct ps2if *ps2if = sa1111_get_drvdata(dev);
 
        serio_unregister_port(ps2if->io);
-       release_mem_region(dev->res.start,
-                          dev->res.end - dev->res.start + 1);
+       release_mem_region(dev->res.start, resource_size(&dev->res));
        sa1111_set_drvdata(dev, NULL);
 
        kfree(ps2if);
index 02d9918705dd5d70a96f538e6244e641f4dc9bca..aa0b6a6f5ef4e0ad4d4607610eb2f3c315e15951 100644 (file)
@@ -155,7 +155,7 @@ struct bsd_db {
 #define LAST   255
 
 #define MAXCODE(b)     ((1 << (b)) - 1)
-#define BADCODEM1      MAXCODE(MAX_BSD_BITS);
+#define BADCODEM1      MAXCODE(MAX_BSD_BITS)
 
 #define BSD_HASH(prefix,suffix,hshift) ((((unsigned long)(suffix))<<(hshift)) \
                                         ^ (unsigned long)(prefix))
index ecd3d028076852b3ee8da36794bbac1c58a59157..d20168fe4c40a673301af4ea985c9c1f18e4ce72 100644 (file)
@@ -42,7 +42,6 @@
 #include <linux/bitops.h>
 #include <media/rc-core.h>
 #include <linux/pci_ids.h>
-#include <linux/delay.h>
 
 #include "ite-cir.h"
 
index 9f3bfc1eb2402648a25dc0c1e90ce21cc374e50b..af9680273ff9723b56f2285532a084dd2bbc49c2 100644 (file)
@@ -422,7 +422,7 @@ static int __init vpif_probe(struct platform_device *pdev)
        if (!res)
                return -ENOENT;
 
-       res_len = res->end - res->start + 1;
+       res_len = resource_size(res);
 
        res = request_mem_region(res->start, res_len, res->name);
        if (!res)
index d9471928369df378adf9c14f5134f0be53563f40..a45d8f098e02a200a52c05a4155866050bb15c6b 100644 (file)
@@ -22,7 +22,6 @@
 #include <linux/gpio.h>
 #include <linux/regulator/consumer.h>
 #include <linux/videodev2.h>
-#include <linux/version.h>
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-subdev.h>
index 4d07c58444024c48dd2bb7859d7149da324e6d71..a647894d3a717a9307be0a0b1ad243012f7d25bf 100644 (file)
@@ -129,7 +129,7 @@ module_param(debug, bool, S_IRUGO);
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
 /* list of image formats supported by OMAP2 video pipelines */
-const static struct v4l2_fmtdesc omap_formats[] = {
+static const struct v4l2_fmtdesc omap_formats[] = {
        {
                /* Note:  V4L2 defines RGB565 as:
                 *
index f6626e87dbc55248577f3d479067a87316a8ac99..69b60ba5dd7a90830ad175b9b4f4dfde60a2dd3d 100644 (file)
@@ -1768,14 +1768,13 @@ static int __devinit omap24xxcam_probe(struct platform_device *pdev)
                dev_err(cam->dev, "no mem resource?\n");
                goto err;
        }
-       if (!request_mem_region(mem->start, (mem->end - mem->start) + 1,
-                               pdev->name)) {
+       if (!request_mem_region(mem->start, resource_size(mem), pdev->name)) {
                dev_err(cam->dev,
                        "cannot reserve camera register I/O region\n");
                goto err;
        }
        cam->mmio_base_phys = mem->start;
-       cam->mmio_size = (mem->end - mem->start) + 1;
+       cam->mmio_size = resource_size(mem);
 
        /* map the region */
        cam->mmio_base = (unsigned long)
index 5370a3a7ee25bdba0f90969b542b7ff42ad14a5e..b03c3aea5beaf08ac1c51296240dfa573b3b7481 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/mm.h>
 #include <linux/sched.h>
 #include <linux/file.h>
-#include <linux/slab.h>
 
 #include <media/videobuf2-core.h>
 #include <media/videobuf2-memops.h>
index 090d2a3a6548e0aa2d56ca5350a6ae2d012945a7..a8c08f332da04c596cf1ae3aa33c2a09f1a4f892 100644 (file)
@@ -681,11 +681,11 @@ static int i2o_iop_systab_set(struct i2o_controller *c)
                if (root && allocate_resource(root, res, sb->desired_mem_size, sb->desired_mem_size, sb->desired_mem_size, 1 << 20,     /* Unspecified, so use 1Mb and play safe */
                                              NULL, NULL) >= 0) {
                        c->mem_alloc = 1;
-                       sb->current_mem_size = 1 + res->end - res->start;
+                       sb->current_mem_size = resource_size(res);
                        sb->current_mem_base = res->start;
                        osm_info("%s: allocated %llu bytes of PCI memory at "
                                "0x%016llX.\n", c->name,
-                               (unsigned long long)(1 + res->end - res->start),
+                               (unsigned long long)resource_size(res),
                                (unsigned long long)res->start);
                }
        }
@@ -703,11 +703,11 @@ static int i2o_iop_systab_set(struct i2o_controller *c)
                if (root && allocate_resource(root, res, sb->desired_io_size, sb->desired_io_size, sb->desired_io_size, 1 << 20,        /* Unspecified, so use 1Mb and play safe */
                                              NULL, NULL) >= 0) {
                        c->io_alloc = 1;
-                       sb->current_io_size = 1 + res->end - res->start;
+                       sb->current_io_size = resource_size(res);
                        sb->current_mem_base = res->start;
                        osm_info("%s: allocated %llu bytes of PCI I/O at "
                                "0x%016llX.\n", c->name,
-                               (unsigned long long)(1 + res->end - res->start),
+                               (unsigned long long)resource_size(res),
                                (unsigned long long)res->start);
                }
        }
index ad715bf49cac916fa86b15179c3f6415ecec265f..71bc835324d8743d55ff95383b03027652645f7b 100644 (file)
@@ -177,7 +177,7 @@ static int __devinit tc6387xb_probe(struct platform_device *dev)
        if (ret)
                goto err_resource;
 
-       tc6387xb->scr = ioremap(rscr->start, rscr->end - rscr->start + 1);
+       tc6387xb->scr = ioremap(rscr->start, resource_size(rscr));
        if (!tc6387xb->scr) {
                ret = -ENOMEM;
                goto err_ioremap;
index 4afffe610f99d09a34e28790cbf67971012c70ea..769a4e8e10dc17a0a10e8e206b24567a2ba6747f 100644 (file)
@@ -95,7 +95,7 @@ static int __init ssc_probe(struct platform_device *pdev)
        }
 
        ssc->pdev = pdev;
-       ssc->regs = ioremap(regs->start, regs->end - regs->start + 1);
+       ssc->regs = ioremap(regs->start, resource_size(regs));
        if (!ssc->regs) {
                dev_dbg(&pdev->dev, "ioremap failed\n");
                retval = -EINVAL;
index 0f3fb4f03bdf0b93851cfa10156296c6303d7557..28f5aaa19d4a289b8b0cf9241f42ab641e4051ca 100644 (file)
@@ -329,7 +329,7 @@ static int __init pwm_probe(struct platform_device *pdev)
        p->pdev = pdev;
        p->mask = *mp;
        p->irq = irq;
-       p->base = ioremap(r->start, r->end - r->start + 1);
+       p->base = ioremap(r->start, resource_size(r));
        if (!p->base)
                goto fail;
        p->clk = clk_get(&pdev->dev, "pwm_clk");
index 0c839d3338db9334f28a19734a9f3d961afa917d..77f0b6b1681ddc8ba74658a06a4aa8ad62276053 100644 (file)
@@ -1825,7 +1825,7 @@ static int dw_mci_probe(struct platform_device *pdev)
        INIT_LIST_HEAD(&host->queue);
 
        ret = -ENOMEM;
-       host->regs = ioremap(regs->start, regs->end - regs->start + 1);
+       host->regs = ioremap(regs->start, resource_size(regs));
        if (!host->regs)
                goto err_freehost;
 
index cc20e025932593db93deb84d3e27f05bf9ed89c0..14aa213b00da3a3b2a8d5e332528bb2d952e44a9 100644 (file)
@@ -715,13 +715,13 @@ static void mxcmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
        int burstlen, ret;
 
        /*
-        * use burstlen of 64 in 4 bit mode (--> reg value  0)
-        * use burstlen of 16 in 1 bit mode (--> reg value 16)
+        * use burstlen of 64 (16 words) in 4 bit mode (--> reg value  0)
+        * use burstlen of 16 (4 words) in 1 bit mode (--> reg value 16)
         */
        if (ios->bus_width == MMC_BUS_WIDTH_4)
-               burstlen = 64;
-       else
                burstlen = 16;
+       else
+               burstlen = 4;
 
        if (mxcmci_use_dma(host) && burstlen != host->burstlen) {
                host->burstlen = burstlen;
index d4455ffbefd8a931317beaad43eefb563b10c62b..e8f6e65183d77d1a6eeb8d8137af21d57f07ca90 100644 (file)
@@ -1625,8 +1625,8 @@ static void __vub300_command_response(struct vub300_mmc_host *vub300,
                cmd->error = respretval;
        } else if (cmd->error) {
                /*
-                * the error occured sending the command
-                * or recieving the response
+                * the error occurred sending the command
+                * or receiving the response
                 */
        } else if (vub300->command_out_urb->status) {
                vub300->usb_transport_fail = vub300->command_out_urb->status;
index 1e2c430aaad241b112d4c33a3c90d1db1e3b3efe..83e80c65d6e70ce9b508591ff814eab6150c9d08 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright Â© 2009 Bluewater Systems Ltd
  * Author: Andre Renaud <andre@bluewatersys.com>
- * Author: Ryan Mallon <ryan@bluewatersys.com>
+ * Author: Ryan Mallon
  *
  * Based on m25p80.c
  *
@@ -498,5 +498,5 @@ module_exit(sst25l_exit);
 
 MODULE_DESCRIPTION("MTD SPI driver for SST25L Flash chips");
 MODULE_AUTHOR("Andre Renaud <andre@bluewatersys.com>, "
-             "Ryan Mallon <ryan@bluewatersys.com>");
+             "Ryan Mallon");
 MODULE_LICENSE("GPL");
index d4297a97e1002d73769c6d7d7829a0fee12c17b9..67815eed2f0039b94a8e86301cf21bc4b88b9df5 100644 (file)
@@ -142,7 +142,7 @@ static int __devinit bfin_flash_probe(struct platform_device *pdev)
        state->map.write      = bfin_flash_write;
        state->map.copy_to    = bfin_flash_copy_to;
        state->map.bankwidth  = pdata->width;
-       state->map.size       = memory->end - memory->start + 1;
+       state->map.size       = resource_size(memory);
        state->map.virt       = (void __iomem *)memory->start;
        state->map.phys       = memory->start;
        state->map.map_priv_1 = (unsigned long)state;
index c00b9175ba9e7c3a747a0ecba02c17486419d106..1594a802631d439f008c58b601e5c29ab6d14a21 100644 (file)
@@ -155,7 +155,7 @@ static int ixp2000_flash_probe(struct platform_device *dev)
        if (!plat)
                return -ENODEV;
 
-       window_size = dev->resource->end - dev->resource->start + 1;
+       window_size = resource_size(dev->resource);
        dev_info(&dev->dev, "Probe of IXP2000 flash(%d banks x %dMiB)\n",
                 ixp_data->nr_banks, ((u32)window_size >> 20));
 
@@ -194,16 +194,17 @@ static int ixp2000_flash_probe(struct platform_device *dev)
        info->map.copy_to = ixp2000_flash_copy_to;
 
        info->res = request_mem_region(dev->resource->start,
-                       dev->resource->end - dev->resource->start + 1,
-                       dev_name(&dev->dev));
+                                      resource_size(dev->resource),
+                                      dev_name(&dev->dev));
        if (!info->res) {
                dev_err(&dev->dev, "Could not reserve memory region\n");
                err = -ENOMEM;
                goto Error;
        }
 
-       info->map.map_priv_1 = (unsigned long) ioremap(dev->resource->start,
-                               dev->resource->end - dev->resource->start + 1);
+       info->map.map_priv_1 =
+               (unsigned long)ioremap(dev->resource->start,
+                                      resource_size(dev->resource));
        if (!info->map.map_priv_1) {
                dev_err(&dev->dev, "Failed to ioremap flash region\n");
                err = -EIO;
index f59d62f74d44a39ed9ccea62358ed64e57361f56..7ae137d4b99871bbbe94f6b11effa25b5537875d 100644 (file)
@@ -70,7 +70,7 @@ static int __devinit pxa2xx_flash_probe(struct platform_device *pdev)
        info->map.name = (char *) flash->name;
        info->map.bankwidth = flash->width;
        info->map.phys = res->start;
-       info->map.size = res->end - res->start + 1;
+       info->map.size = resource_size(res);
        info->parts = flash->parts;
        info->nr_parts = flash->nr_parts;
 
index 3f92731a5b9ebf288ed83602c36972e5d32dee8d..f1af2228a1b1ec2e90ee2cb19958a68f0d7bb0da 100644 (file)
@@ -1192,7 +1192,7 @@ err_unregister_chdev:
 static void __exit cleanup_mtdchar(void)
 {
        unregister_mtd_user(&mtdchar_notifier);
-       mntput(mtd_inode_mnt);
+       kern_unmount(mtd_inode_mnt);
        unregister_filesystem(&mtd_inodefs_type);
        __unregister_chrdev(MTD_CHAR_MAJOR, 0, 1 << MINORBITS, "mtd");
 }
index 1b90fd56bef113625f729013c5d81ff0d28b0660..55da20ccc7a8996f0d80be785b91452e35dd8225 100644 (file)
@@ -514,7 +514,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
 
        host->io_phys = (dma_addr_t)mem->start;
 
-       host->io_base = ioremap(mem->start, mem->end - mem->start + 1);
+       host->io_base = ioremap(mem->start, resource_size(mem));
        if (host->io_base == NULL) {
                printk(KERN_ERR "atmel_nand: ioremap failed\n");
                res = -EIO;
@@ -548,7 +548,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
        if (no_ecc)
                nand_chip->ecc.mode = NAND_ECC_NONE;
        if (hard_ecc && regs) {
-               host->ecc = ioremap(regs->start, regs->end - regs->start + 1);
+               host->ecc = ioremap(regs->start, resource_size(regs));
                if (host->ecc == NULL) {
                        printk(KERN_ERR "atmel_nand: ioremap failed\n");
                        res = -EIO;
index 9ec280738a9a51f3b22519e76103328445ae3954..8c569e454dc5b52248fa98017e0d1071f6700f64 100644 (file)
@@ -380,7 +380,7 @@ static int __devinit bcm_umi_nand_probe(struct platform_device *pdev)
                return -ENXIO;
 
        /* map physical address */
-       bcm_umi_io_base = ioremap(r->start, r->end - r->start + 1);
+       bcm_umi_io_base = ioremap(r->start, resource_size(r));
 
        if (!bcm_umi_io_base) {
                printk(KERN_ERR "ioremap to access BCM UMI NAND chip failed\n");
index 2f7c930872f9b5715bcd0313e0251f93010ef3a6..eb1fbac63eb6015ce2804d7e676698c4b51cd3ed 100644 (file)
@@ -713,7 +713,7 @@ static int __devinit mpc5121_nfc_probe(struct platform_device *op)
        }
 
        regs_paddr = res.start;
-       regs_size = res.end - res.start + 1;
+       regs_size = resource_size(&res);
 
        if (!devm_request_mem_region(dev, regs_paddr, regs_size, DRV_NAME)) {
                dev_err(dev, "Error requesting memory region!\n");
index 6c4ef966ca58d240276ac47f9d2a2e307f49de2b..41ea84e3f69c60fc9785254a254bd14ecfea1da7 100644 (file)
@@ -5,7 +5,7 @@
  * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org)
  * Copyright (C) 2006 Felix Fietkau (nbd@openwrt.org)
  * Copyright (C) 2006 Broadcom Corporation.
- * Copyright (C) 2007 Michael Buesch <mb@bu3sch.de>
+ * Copyright (C) 2007 Michael Buesch <m@bues.ch>
  *
  * Distribute under GPL.
  */
index 4753bb9731f599525e105ae9455f3012177c3f3c..1d9b9858067cfb25cb62dd2622a9a7bdf3eb9e56 100644 (file)
@@ -1647,7 +1647,7 @@ static int __devinit bcm_enet_probe(struct platform_device *pdev)
        if (ret)
                goto out;
 
-       iomem_size = res_mem->end - res_mem->start + 1;
+       iomem_size = resource_size(res_mem);
        if (!request_mem_region(res_mem->start, iomem_size, "bcm63xx_enet")) {
                ret = -EBUSY;
                goto out;
@@ -1862,7 +1862,7 @@ static int __devexit bcm_enet_remove(struct platform_device *pdev)
        /* release device resources */
        iounmap(priv->base);
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       release_mem_region(res->start, res->end - res->start + 1);
+       release_mem_region(res->start, resource_size(res));
 
        /* disable hw block clocks */
        if (priv->phy_clk) {
@@ -1898,7 +1898,7 @@ static int __devinit bcm_enet_shared_probe(struct platform_device *pdev)
        if (!res)
                return -ENODEV;
 
-       iomem_size = res->end - res->start + 1;
+       iomem_size = resource_size(res);
        if (!request_mem_region(res->start, iomem_size, "bcm63xx_enet_dma"))
                return -EBUSY;
 
@@ -1916,7 +1916,7 @@ static int __devexit bcm_enet_shared_remove(struct platform_device *pdev)
 
        iounmap(bcm_enet_shared_base);
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       release_mem_region(res->start, res->end - res->start + 1);
+       release_mem_region(res->start, resource_size(res));
        return 0;
 }
 
index 6e99d80ec409be994fb1a9d41d5a8a5e5b14c33c..a9b759add187ad3033849c402b4854f2dfb2b074 100644 (file)
@@ -201,7 +201,7 @@ extern void ppp_unregister_compressor (struct compressor *cp);
 #define LAST   255
 
 #define MAXCODE(b)     ((1 << (b)) - 1)
-#define BADCODEM1      MAXCODE(MAX_BSD_BITS);
+#define BADCODEM1      MAXCODE(MAX_BSD_BITS)
 
 #define BSD_HASH(prefix,suffix,hshift) ((((unsigned long)(suffix))<<(hshift)) \
                                         ^ (unsigned long)(prefix))
index a79925e72d66d0fb1f4383ac0046d64d5996649b..09a8b86cf1ac314819a5e386bf3500bea76ec9e5 100644 (file)
@@ -799,7 +799,7 @@ static __devinit int softing_pdev_probe(struct platform_device *pdev)
        if (!pres)
                goto platform_resource_failed;
        card->dpram_phys = pres->start;
-       card->dpram_size = pres->end - pres->start + 1;
+       card->dpram_size = resource_size(pres);
        card->dpram = ioremap_nocache(card->dpram_phys, card->dpram_size);
        if (!card->dpram) {
                dev_alert(&card->pdev->dev, "dpram ioremap failed\n");
index acef7e96c9fd5c1f7e72de62eacce7af7b9201c8..3f451e4d8361699b617a5745d4de0c2f8f9ce183 100644 (file)
@@ -1822,7 +1822,7 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev)
        }
 
        priv->emac_base_phys = res->start + pdata->ctrl_reg_offset;
-       size = res->end - res->start + 1;
+       size = resource_size(res);
        if (!request_mem_region(res->start, size, ndev->name)) {
                dev_err(&pdev->dev, "failed request_mem_region() for regs\n");
                rc = -ENXIO;
@@ -1927,7 +1927,7 @@ no_irq_res:
        cpdma_ctlr_destroy(priv->dma);
 no_dma:
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       release_mem_region(res->start, res->end - res->start + 1);
+       release_mem_region(res->start, resource_size(res));
        iounmap(priv->remap_addr);
 
 probe_quit:
@@ -1961,7 +1961,7 @@ static int __devexit davinci_emac_remove(struct platform_device *pdev)
                cpdma_chan_destroy(priv->rxchan);
        cpdma_ctlr_destroy(priv->dma);
 
-       release_mem_region(res->start, res->end - res->start + 1);
+       release_mem_region(res->start, resource_size(res));
 
        unregister_netdev(ndev);
        iounmap(priv->remap_addr);
index 48ee51bb9e50fea0bae06852bc87b4ef60ba9a25..a19228563efd9e9b3e15ab029acf65947f1021c4 100644 (file)
@@ -365,7 +365,7 @@ static int __init do_express_probe(struct net_device *dev)
                        dev->irq = mca_irqmap[(pos1>>4)&0x7];
 
                        /*
-                        * XXX: Transciever selection is done
+                        * XXX: Transceiver selection is done
                         * differently on the MCA version.
                         * How to get it to select something
                         * other than external/AUI is currently
index 0da6295d9da67c2150bba47f4721abaf33422376..8abbe1d828267dfa73025b4e1bf01c2bdde977d6 100644 (file)
@@ -968,7 +968,7 @@ static int __devinit ethoc_probe(struct platform_device *pdev)
        priv = netdev_priv(netdev);
        priv->netdev = netdev;
        priv->dma_alloc = 0;
-       priv->io_region_size = mmio->end - mmio->start + 1;
+       priv->io_region_size = resource_size(mmio);
 
        priv->iobase = devm_ioremap_nocache(&pdev->dev, netdev->base_addr,
                        resource_size(mmio));
index 381bdea97d5f3dd78c7a88b0d0d80b4e60890777..cb4416e591f1f180c9b94b8a7fe4e25ff7758a78 100644 (file)
@@ -871,10 +871,11 @@ static int __devinit mpc52xx_fec_probe(struct platform_device *op)
                                "Error while parsing device node resource\n" );
                goto err_netdev;
        }
-       if ((mem.end - mem.start + 1) < sizeof(struct mpc52xx_fec)) {
+       if (resource_size(&mem) < sizeof(struct mpc52xx_fec)) {
                printk(KERN_ERR DRIVER_NAME
-                       " - invalid resource size (%lx < %x), check mpc52xx_devices.c\n",
-                       (unsigned long)(mem.end - mem.start + 1), sizeof(struct mpc52xx_fec));
+                      " - invalid resource size (%lx < %x), check mpc52xx_devices.c\n",
+                      (unsigned long)resource_size(&mem),
+                      sizeof(struct mpc52xx_fec));
                rv = -EINVAL;
                goto err_netdev;
        }
index ad2975440719fd168b1da705adf061d04190bd45..b09270b5d0a56fe484ac0d5a6a77ddaf995adfec 100644 (file)
@@ -120,7 +120,7 @@ static int __devinit fs_mii_bitbang_init(struct mii_bus *bus,
        if (ret)
                return ret;
 
-       if (res.end - res.start < 13)
+       if (resource_size(&res) <= 13)
                return -ENODEV;
 
        /* This should really encode the pin number as well, but all
@@ -139,7 +139,7 @@ static int __devinit fs_mii_bitbang_init(struct mii_bus *bus,
                return -ENODEV;
        mdc_pin = *data;
 
-       bitbang->dir = ioremap(res.start, res.end - res.start + 1);
+       bitbang->dir = ioremap(res.start, resource_size(&res));
        if (!bitbang->dir)
                return -ENOMEM;
 
index 6a2e150e75bb2d774d2afc50f3913f558c92ae77..e0e9d6c35d83f61dee22ae9c4c8d54d82e6e538e 100644 (file)
@@ -136,7 +136,7 @@ static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev)
 
        snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
 
-       fec->fecp = ioremap(res.start, res.end - res.start + 1);
+       fec->fecp = ioremap(res.start, resource_size(&res));
        if (!fec->fecp)
                goto out_fec;
 
index d8e175382d1d2e7f44786309b688ef50396cf40d..1c97861596f03cbcdcfa1aa30daac23360f90f4e 100644 (file)
@@ -491,7 +491,7 @@ static int gianfar_ptp_probe(struct platform_device *dev)
        spin_lock_init(&etsects->lock);
 
        etsects->regs = ioremap(etsects->rsrc->start,
-                               1 + etsects->rsrc->end - etsects->rsrc->start);
+                               resource_size(etsects->rsrc));
        if (!etsects->regs) {
                pr_err("ioremap ptp registers failed\n");
                goto no_ioremap;
index 079450fe5e96d040b4c35edd270e94abfba4a842..725399ea06902f33e7e480b7f4f31826e019b7be 100644 (file)
@@ -2770,7 +2770,7 @@ static int __devinit emac_probe(struct platform_device *ofdev)
        }
        // TODO : request_mem_region
        dev->emacp = ioremap(dev->rsrc_regs.start,
-                            dev->rsrc_regs.end - dev->rsrc_regs.start + 1);
+                            resource_size(&dev->rsrc_regs));
        if (dev->emacp == NULL) {
                printk(KERN_ERR "%s: Can't map device registers!\n",
                       np->full_name);
index 99e1ec02a011108d7066f6e27fa4a49a3645c2ca..19ad4606b799cc427848439b389dca9360cedd6f 100644 (file)
@@ -78,7 +78,7 @@
  * Target hardware: IRWave IR320ST-2
  *
  *     The IRWave IR320ST-2 is a simple dongle based on the Vishay/Temic
- *     TOIM3232 SIR Endec and the Vishay/Temic TFDS4500 SIR IRDA transciever.
+ *     TOIM3232 SIR Endec and the Vishay/Temic TFDS4500 SIR IRDA transceiver.
  *     It uses a hex inverter and some discrete components to buffer and
  *     line convert the RS232 down to 5V.
  *
index dcf6011b136c1fd0cfdbb4492a28094bd273a145..0fcdc25699d8880238d9db011cd084a3ecc3b3de 100644 (file)
@@ -1172,7 +1172,7 @@ static int __init macb_probe(struct platform_device *pdev)
        clk_enable(bp->hclk);
 #endif
 
-       bp->regs = ioremap(regs->start, regs->end - regs->start + 1);
+       bp->regs = ioremap(regs->start, resource_size(regs));
        if (!bp->regs) {
                dev_err(&pdev->dev, "failed to map registers, aborting.\n");
                err = -ENOMEM;
index 77dc6abe186765789cd77db04def9155a15ebfba..259699983ca51c272a3ee42bfd4d922c85238440 100644 (file)
@@ -2597,7 +2597,7 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
        if (msp == NULL)
                goto out;
 
-       msp->base = ioremap(res->start, res->end - res->start + 1);
+       msp->base = ioremap(res->start, resource_size(res));
        if (msp->base == NULL)
                goto out_free;
 
index 60f46bc2bf64076bca146c272b9dcf6059dab609..2962cc695ce383202dfce41437380507a595d026 100644 (file)
@@ -1382,7 +1382,7 @@ static int find_mii(struct net_device *dev)
 /* WCSR bits [0:4] [9:10] */
 #define WCSR_RESET_SAVE 0x61f
 /* RFCR bits [20] [22] [27:31] */
-#define RFCR_RESET_SAVE 0xf8500000;
+#define RFCR_RESET_SAVE 0xf8500000
 
 static void natsemi_reset(struct net_device *dev)
 {
@@ -2920,7 +2920,7 @@ static int netdev_set_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd)
 
        /*
         * If we're ignoring the PHY then autoneg and the internal
-        * transciever are really not going to work so don't let the
+        * transceiver are really not going to work so don't let the
         * user select them.
         */
        if (np->ignore_phy && (ecmd->autoneg == AUTONEG_ENABLE ||
index c1bb05be7a7ce189f0a5dd0ecc8d64585c1516f2..1a3033d8e7edfd7edc41cb4a02c6c83835040615 100644 (file)
@@ -1505,7 +1505,7 @@ static int pxa168_eth_probe(struct platform_device *pdev)
                err = -ENODEV;
                goto err_netdev;
        }
-       pep->base = ioremap(res->start, res->end - res->start + 1);
+       pep->base = ioremap(res->start, resource_size(res));
        if (pep->base == NULL) {
                err = -ENOMEM;
                goto err_netdev;
index 4e2d1448093cda6f10bb42041d574c803bea3382..7d9c650f395e1399a7185c9338f26b5fd8713db7 100644 (file)
@@ -694,7 +694,7 @@ struct rtl8169_private {
                        size_t size;
                } phy_action;
        } *rtl_fw;
-#define RTL_FIRMWARE_UNKNOWN   ERR_PTR(-EAGAIN);
+#define RTL_FIRMWARE_UNKNOWN   ERR_PTR(-EAGAIN)
 };
 
 MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>");
index ae3c8e79b32f6494e60b6c1a67d1891ac181cf38..d5596926a1ef5f9735d64012d84679dd7fdde815 100644 (file)
@@ -967,8 +967,8 @@ struct s2io_nic {
        u8  serial_num[VPD_STRING_LEN];
 };
 
-#define RESET_ERROR 1;
-#define CMD_ERROR   2;
+#define RESET_ERROR 1
+#define CMD_ERROR   2
 
 /*  OS related system calls */
 #ifndef readq
index 68d50429ddf3bfa1295491c0e042807aa503f856..ea65f7ec360a346259583505fb998ce8406b6b3b 100644 (file)
@@ -2597,7 +2597,7 @@ static int __devinit sbmac_probe(struct platform_device *pldev)
 
        res = platform_get_resource(pldev, IORESOURCE_MEM, 0);
        BUG_ON(!res);
-       sbm_base = ioremap_nocache(res->start, res->end - res->start + 1);
+       sbm_base = ioremap_nocache(res->start, resource_size(res));
        if (!sbm_base) {
                printk(KERN_ERR "%s: unable to map device registers\n",
                       dev_name(&pldev->dev));
index ade35dde5b51593638327ab5a640f995fb0c08a3..be745ae8f4e39f7e6fe867564a4b2e8f20acf7cd 100644 (file)
 #include <asm/byteorder.h>
 #include <asm/uaccess.h>
 #include <asm/irq.h>
+#include <asm/prom.h>
 
 #ifdef CONFIG_SPARC
 #include <asm/idprom.h>
-#include <asm/prom.h>
 #endif
 
 #ifdef CONFIG_PPC_PMAC
 #include <asm/pci-bridge.h>
-#include <asm/prom.h>
 #include <asm/machdep.h>
 #include <asm/pmac_feature.h>
 #endif
index 01ad45218d192a16fcb8020ef39eafaf2cf29e72..a1d202d8ad6768227c39dcb55c2b6c083d22389c 100644 (file)
@@ -380,7 +380,7 @@ struct lmc___softc {
 /* CSR6 settings */
 #define OPERATION_MODE  0x00000200 /* Full Duplex      */
 #define PROMISC_MODE    0x00000040 /* Promiscuous Mode */
-#define RECIEVE_ALL     0x40000000 /* Receive All      */
+#define RECEIVE_ALL     0x40000000 /* Receive All      */
 #define PASS_BAD_FRAMES 0x00000008 /* Pass Bad Frames  */
 
 /* Dec control registers  CSR6 as well */
index 9f69a4c9a3f33a3587225e25cec927d1e1339cac..a2a167363dbfcb7fe8634db1ea7eb192fdea1fa6 100644 (file)
@@ -24,7 +24,6 @@
 #include "debug.h"
 #include "base.h"
 #include "reg.h"
-#include "debug.h"
 
 /* return bus cachesize in 4B word units */
 static void ath5k_ahb_read_cachesize(struct ath_common *common, int *csz)
index 59f59fa40334f75715259f6456b32b9fd3b4ebce..e751fdee89b25fc39eb2d41009d8e9ca07e7448a 100644 (file)
@@ -4,7 +4,7 @@
 
   debugfs driver debugging code
 
-  Copyright (c) 2005-2007 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
 
   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
index 0953ce1ac1b0f331fff3f7425cf469e76c6cdc12..83cba22ac6e88d6c6bddeecc1d65815b62db5f3f 100644 (file)
@@ -4,7 +4,7 @@
 
   DMA ringbuffer and descriptor allocation/management
 
-  Copyright (c) 2005, 2006 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2005, 2006 Michael Buesch <m@bues.ch>
 
   Some code in this file is derived from the b44.c driver
   Copyright (C) 2002 David S. Miller
index b56ed41fc1bd31c55a7abc7b799b1d47bf97191a..a38c1c6446adafa8b2b9bd56d6ce0fa4f069438f 100644 (file)
@@ -5,7 +5,7 @@
 
   Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
   Copyright (c) 2005 Stefano Brivio <stefano.brivio@polimi.it>
-  Copyright (c) 2005-2007 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
   Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org>
   Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
 
index a3dc8bb8ca956d3d9a5465647c01e46e65a0d153..4c82d582a524dbf512eb2ab8e2b14bba2540186e 100644 (file)
@@ -6,7 +6,7 @@
 
   Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
   Copyright (c) 2005, 2006 Stefano Brivio <stefano.brivio@polimi.it>
-  Copyright (c) 2005-2007 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
   Copyright (c) 2005, 2006 Danny van Dyk <kugelfang@gentoo.org>
   Copyright (c) 2005, 2006 Andreas Jaggi <andreas.jaggi@waterwave.ch>
 
index 73fbf0358f962f3a377aa78acc55bc465c3a4c99..032d46674f6bb278441e897ddd6581f33736e6e5 100644 (file)
@@ -4,7 +4,7 @@
 
   Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>
   Copyright (c) 2005 Stefano Brivio <stefano.brivio@polimi.it>
-  Copyright (c) 2005-2009 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2005-2009 Michael Buesch <m@bues.ch>
   Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org>
   Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
 
index e4ebce9be5921663a4971927d5055a9a4aa979c5..8c684cd3352942ccaadcf843290d014cbb8599bd 100644 (file)
@@ -4,7 +4,7 @@
 
   Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
                      Stefano Brivio <stefano.brivio@polimi.it>
-                     Michael Buesch <mb@bu3sch.de>
+                     Michael Buesch <m@bues.ch>
                      Danny van Dyk <kugelfang@gentoo.org>
                      Andreas Jaggi <andreas.jaggi@waterwave.ch>
 
index 2c8461dcf1b0b8f39df2c179a38f4200f4d4b46d..12b6b4067a398e7b6958a76af9b48f7d81831172 100644 (file)
@@ -2,7 +2,7 @@
 
   Broadcom B43 wireless driver
 
-  Copyright (c) 2007 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2007 Michael Buesch <m@bues.ch>
 
   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
index 73ace5552bad42770fd8085aefaaf4601ee804a4..a6c38104693d4f60276cc087aedb67aab1fc0c99 100644 (file)
@@ -5,7 +5,7 @@
 
   Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
   Copyright (c) 2005-2007 Stefano Brivio <stefano.brivio@polimi.it>
-  Copyright (c) 2005-2008 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2005-2008 Michael Buesch <m@bues.ch>
   Copyright (c) 2005, 2006 Danny van Dyk <kugelfang@gentoo.org>
   Copyright (c) 2005, 2006 Andreas Jaggi <andreas.jaggi@waterwave.ch>
 
index 101957512bcce2842e351ddb1095c59f343383f9..07f009ff5ee2bfdf58a87002a24b6702c24e2b85 100644 (file)
@@ -5,7 +5,7 @@
 
   Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
   Copyright (c) 2005-2007 Stefano Brivio <stefano.brivio@polimi.it>
-  Copyright (c) 2005-2008 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2005-2008 Michael Buesch <m@bues.ch>
   Copyright (c) 2005, 2006 Danny van Dyk <kugelfang@gentoo.org>
   Copyright (c) 2005, 2006 Andreas Jaggi <andreas.jaggi@waterwave.ch>
 
index 83532d19347f8b812909d20b2dfcfb1df09769ec..8e157bc213f3016935b86387a47a7823dd7cdaa6 100644 (file)
@@ -5,7 +5,7 @@
 
   Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
   Copyright (c) 2005-2007 Stefano Brivio <stefano.brivio@polimi.it>
-  Copyright (c) 2005-2008 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2005-2008 Michael Buesch <m@bues.ch>
   Copyright (c) 2005, 2006 Danny van Dyk <kugelfang@gentoo.org>
   Copyright (c) 2005, 2006 Andreas Jaggi <andreas.jaggi@waterwave.ch>
 
index daec1d9e4a18304a8aff1bb563e48ea91a634a2d..f93d66b1817b156727d91cb5210d225293148b6a 100644 (file)
@@ -3,7 +3,7 @@
   Broadcom B43 wireless driver
   IEEE 802.11a/g LP-PHY driver
 
-  Copyright (c) 2008-2009 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2008-2009 Michael Buesch <m@bues.ch>
   Copyright (c) 2009 Gábor Stefanik <netrolller.3d@gmail.com>
 
   This program is free software; you can redistribute it and/or modify
index 1ae1e84cb4d181db4de3823a11511099c80c25fd..3b46360da99b5790dac9020ceaa055dad8131f2b 100644 (file)
@@ -3,7 +3,7 @@
   Broadcom B43 wireless driver
   IEEE 802.11n PHY support
 
-  Copyright (c) 2008 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2008 Michael Buesch <m@bues.ch>
 
   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
index 44da620d9cc28a9cb3f87aaf286b57d17278c88f..6e4228c3ed1bde3b6e143bd06add80399ff334fe 100644 (file)
@@ -4,7 +4,7 @@
 
   PIO data transfer
 
-  Copyright (c) 2005-2008 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2005-2008 Michael Buesch <m@bues.ch>
 
   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
index 44c6dea668820da78fb70851bf22eb6d26045d0c..93643f18c2b3ab5706808f5e99cf50a0d630d64c 100644 (file)
@@ -3,7 +3,7 @@
   Broadcom B43 wireless driver
   IEEE 802.11n PHY and radio device data tables
 
-  Copyright (c) 2008 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2008 Michael Buesch <m@bues.ch>
 
   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
index 59c3afe047af6a1052ea19d3668544769b894194..70c2fcedd1bb24e6670185472862734eb07756c9 100644 (file)
@@ -3,7 +3,7 @@
   Broadcom B43 wireless driver
   RFKILL support
 
-  Copyright (c) 2007 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2007 Michael Buesch <m@bues.ch>
 
   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
index 4fd6775b8c338e76fb839b077a0190cc04dd00fe..80b0755ed3afedd67debacc5f2c6349445f518c0 100644 (file)
@@ -4,7 +4,7 @@
  * SDIO over Sonics Silicon Backplane bus glue for b43.
  *
  * Copyright (C) 2009 Albert Herranz
- * Copyright (C) 2009 Michael Buesch <mb@bu3sch.de>
+ * Copyright (C) 2009 Michael Buesch <m@bues.ch>
  *
  * 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
index f1ae4e05a32cf3b77b356dbf2ea97b56b6e72c68..8e8431d4eb0c0d9c4ee86463e5823a91cca952dc 100644 (file)
@@ -4,7 +4,7 @@
 
   SYSFS support routines
 
-  Copyright (c) 2006 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2006 Michael Buesch <m@bues.ch>
 
   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
index 1ef9a6463ec6a169f431b67f1734cb4b4223bb21..ea288df8aee9e62b1e64fec8f0a55159a916b62c 100644 (file)
@@ -4,7 +4,7 @@
 
   Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
   Copyright (c) 2005-2007 Stefano Brivio <stefano.brivio@polimi.it>
-  Copyright (c) 2006, 2006 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2006, 2006 Michael Buesch <m@bues.ch>
   Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org>
   Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
 
index 6748c5a196e9c6b4ac152d0949dd171891c32f4b..cff187c5616d23922bfd7e8d633c3a6f47942f01 100644 (file)
@@ -3,7 +3,7 @@
   Broadcom B43 wireless driver
   IEEE 802.11a/g LP-PHY and radio device data tables
 
-  Copyright (c) 2009 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2009 Michael Buesch <m@bues.ch>
   Copyright (c) 2009 Gábor Stefanik <netrolller.3d@gmail.com>
 
   This program is free software; you can redistribute it and/or modify
index 2de483b3d3bafde6690f86046c42fcdf302479f4..916f238a71dfbe307991364caff6f6879de32580 100644 (file)
@@ -3,7 +3,7 @@
   Broadcom B43 wireless driver
   IEEE 802.11n PHY data tables
 
-  Copyright (c) 2008 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2008 Michael Buesch <m@bues.ch>
 
   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
index 5d00d0eaf2e7aee1d58bf83c4ad7669876e37397..9b1a038be08b860da91461b82c6bd84dd5000531 100644 (file)
@@ -5,7 +5,7 @@
   PHY workarounds.
 
   Copyright (c) 2005-2007 Stefano Brivio <stefano.brivio@polimi.it>
-  Copyright (c) 2005-2007 Michael Buesch <mbuesch@freenet.de>
+  Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
 
   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
index 82bcf7595139c99e877e2df474a2e2cf06b60f0a..b74f25ec1ab4a89b4c1380b9ca9213b396a0ca49 100644 (file)
@@ -6,7 +6,7 @@
 
   Copyright (C) 2005 Martin Langer <martin-langer@gmx.de>
   Copyright (C) 2005 Stefano Brivio <stefano.brivio@polimi.it>
-  Copyright (C) 2005, 2006 Michael Buesch <mb@bu3sch.de>
+  Copyright (C) 2005, 2006 Michael Buesch <m@bues.ch>
   Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org>
   Copyright (C) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
 
index f232618f2cd1097b462b0c88a634becbde71c93a..5e28ad0d6d17f8a1c43401594a42f2b040bbdad5 100644 (file)
@@ -4,7 +4,7 @@
 
   debugfs driver debugging code
 
-  Copyright (c) 2005-2007 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
 
   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
index 704ee62101bd31b31ba2c79d380d6370e694f058..5010c477abdfe2f63fbc4e56e6d76d8be5c4b3e9 100644 (file)
@@ -4,7 +4,7 @@
 
   DMA ringbuffer and descriptor allocation/management
 
-  Copyright (c) 2005, 2006 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2005, 2006 Michael Buesch <m@bues.ch>
 
   Some code in this file is derived from the b44.c driver
   Copyright (C) 2002 David S. Miller
index a849078aea699e144354d4b68bcedb30d1b75877..ee5682e54204d6fa2bbecd4270a7ef43e4b891b7 100644 (file)
@@ -4,7 +4,7 @@
 
   Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
                     Stefano Brivio <stefano.brivio@polimi.it>
-                    Michael Buesch <mbuesch@freenet.de>
+                    Michael Buesch <m@bues.ch>
                     Danny van Dyk <kugelfang@gentoo.org>
                     Andreas Jaggi <andreas.jaggi@waterwave.ch>
 
index 37e9be893560a19e938ea026044d879f31932238..2f1bfdc44f94ff2658f90561b21814bbdce72ffd 100644 (file)
@@ -5,7 +5,7 @@
 
   Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
   Copyright (c) 2005 Stefano Brivio <stefano.brivio@polimi.it>
-  Copyright (c) 2005-2007 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
   Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org>
   Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
 
index d6db6c17da4f77544350d3de09af5cd5ed459ef9..04c03b212a5ee3facede4cd7a164ebd5dde15c43 100644 (file)
@@ -4,7 +4,7 @@
  *
  *  Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>
  *  Copyright (c) 2005-2008 Stefano Brivio <stefano.brivio@polimi.it>
- *  Copyright (c) 2005, 2006 Michael Buesch <mb@bu3sch.de>
+ *  Copyright (c) 2005, 2006 Michael Buesch <m@bues.ch>
  *  Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org>
  *  Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
  *  Copyright (c) 2007 Larry Finger <Larry.Finger@lwfinger.net>
index 1f0e2e379b02cd5c11aeccd7daa84f70444a6055..b74a058d7bac064ab04bbfd5d978152c1e5f0a87 100644 (file)
@@ -4,7 +4,7 @@
 
   Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
   Copyright (c) 2005 Stefano Brivio <stefano.brivio@polimi.it>
-  Copyright (c) 2005, 2006 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2005, 2006 Michael Buesch <m@bues.ch>
   Copyright (c) 2005  Danny van Dyk <kugelfang@gentoo.org>
   Copyright (c) 2005  Andreas Jaggi <andreas.jaggi@waterwave.ch>
   Copyright (c) 2007  Larry Finger <Larry.Finger@lwfinger.net>
index 28e477d01587f34385c371c512cb4e134a6a0301..96faaef3661b075fc2a3b52f8c08a7d91b708d20 100644 (file)
@@ -4,7 +4,7 @@
 
   Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
                     Stefano Brivio <stefano.brivio@polimi.it>
-                    Michael Buesch <mbuesch@freenet.de>
+                    Michael Buesch <m@bues.ch>
                     Danny van Dyk <kugelfang@gentoo.org>
      Andreas Jaggi <andreas.jaggi@waterwave.ch>
   Copyright (c) 2007 Larry Finger <Larry.Finger@lwfinger.net>
index ecbe409f9a9435dfe360d07a9b7ff0c2f67ebc32..831a7a4760e5ff041688416dcd916ebdeace7dfe 100644 (file)
@@ -4,7 +4,7 @@
 
   Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
                     Stefano Brivio <stefano.brivio@polimi.it>
-                    Michael Buesch <mbuesch@freenet.de>
+                    Michael Buesch <m@bues.ch>
                     Danny van Dyk <kugelfang@gentoo.org>
                     Andreas Jaggi <andreas.jaggi@waterwave.ch>
   Copyright (c) 2007 Larry Finger <Larry.Finger@lwfinger.net>
index b033b0ed4ca099dc63a9dbea167fdb88fed64c2d..192251adf986c97579539025055f91c592f189bd 100644 (file)
@@ -4,7 +4,7 @@
 
   PIO Transmission
 
-  Copyright (c) 2005 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2005 Michael Buesch <m@bues.ch>
 
   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
index 2df545cfad1435fbc966fbb47d3ab25c9f7e7c3a..475eb14e665bb324ade483f67336d89a04a1a113 100644 (file)
@@ -4,7 +4,7 @@
 
   Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
                     Stefano Brivio <stefano.brivio@polimi.it>
-                    Michael Buesch <mbuesch@freenet.de>
+                    Michael Buesch <m@bues.ch>
                     Danny van Dyk <kugelfang@gentoo.org>
                     Andreas Jaggi <andreas.jaggi@waterwave.ch>
   Copyright (c) 2007 Larry Finger <Larry.Finger@lwfinger.net>
index ec4de2811c52db0d460c549d5f98e74113a266db..bccb3d7da6825382192b3591aedecb08bbec019a 100644 (file)
@@ -4,7 +4,7 @@
 
   Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
                     Stefano Brivio <stefano.brivio@polimi.it>
-                    Michael Buesch <mbuesch@freenet.de>
+                    Michael Buesch <m@bues.ch>
                     Danny van Dyk <kugelfang@gentoo.org>
                     Andreas Jaggi <andreas.jaggi@waterwave.ch>
 
index b90f223fb31cb87463263ae6ffad5e71b367525c..c4559bcbc707aa00ff4f047876683451c8382619 100644 (file)
@@ -3,7 +3,7 @@
   Broadcom B43 wireless driver
   RFKILL support
 
-  Copyright (c) 2007 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2007 Michael Buesch <m@bues.ch>
 
   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
index 56c384fa9b1feea926bdc194741344fc8ce29fb5..57f8b089767ca0f7d9700e16fee71bbe76998855 100644 (file)
@@ -4,7 +4,7 @@
 
   SYSFS support routines
 
-  Copyright (c) 2006 Michael Buesch <mb@bu3sch.de>
+  Copyright (c) 2006 Michael Buesch <m@bues.ch>
 
   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
index 6c174f38ca3c0e166f60e4df412e22e1dc63c906..5188fab0b377aae80f5b46e904d78608dc6e16ad 100644 (file)
@@ -6,7 +6,7 @@
 
   Copyright (C) 2005 Martin Langer <martin-langer@gmx.de>
   Copyright (C) 2005 Stefano Brivio <stefano.brivio@polimi.it>
-  Copyright (C) 2005, 2006 Michael Buesch <mb@bu3sch.de>
+  Copyright (C) 2005, 2006 Michael Buesch <m@bues.ch>
   Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org>
   Copyright (C) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
   Copyright (C) 2007 Larry Finger <Larry.Finger@lwfinger.net>
index ee21210bea9c1d60adb3485b060acb23b2040bb3..89904054473fe850e4e567f7f262a138cdac7dc0 100644 (file)
@@ -2617,8 +2617,8 @@ struct iwl_scanstart_notification {
        __le32 status;
 } __packed;
 
-#define  SCAN_OWNER_STATUS 0x1;
-#define  MEASURE_OWNER_STATUS 0x2;
+#define  SCAN_OWNER_STATUS 0x1
+#define  MEASURE_OWNER_STATUS 0x2
 
 #define IWL_PROBE_STATUS_OK            0
 #define IWL_PROBE_STATUS_TX_FAILED     BIT(0)
index 5769ca5cebca7df18e7a42856f887133ee8c4258..e9e9d1d1778dcc0dd86189bf25f7dfee9dd06ecd 100644 (file)
@@ -2468,8 +2468,8 @@ struct iwl_scanstart_notification {
        __le32 status;
 } __packed;
 
-#define  SCAN_OWNER_STATUS 0x1;
-#define  MEASURE_OWNER_STATUS 0x2;
+#define  SCAN_OWNER_STATUS 0x1
+#define  MEASURE_OWNER_STATUS 0x2
 
 #define IWL_PROBE_STATUS_OK            0
 #define IWL_PROBE_STATUS_TX_FAILED     BIT(0)
index 72a3d5497547e53b6b6aba28f65971c6a2213cb3..ba5ff0411f0abce3c6e4e1e87b2e764b6182e6d0 100644 (file)
 #define _SRL(x)                                        (((x) & 0x3F) << 8)
 
 #define _SIFS_CCK_CTX(x)                       ((x) & 0xFF)
-#define _SIFS_CCK_TRX(x)                       (((x) & 0xFF) << 8);
+#define _SIFS_CCK_TRX(x)                       (((x) & 0xFF) << 8)
 
 #define _SIFS_OFDM_CTX(x)                      ((x) & 0xFF)
-#define _SIFS_OFDM_TRX(x)                      (((x) & 0xFF) << 8);
+#define _SIFS_OFDM_TRX(x)                      (((x) & 0xFF) << 8)
 
 #define _TBTT_PROHIBIT_HOLD(x)                 (((x) & 0xFF) << 8)
 
index 2c5ac2bf5c565ecd03041b4b9117f8742fb877bf..844f6137970ae1e9247e3ccf9dc5b1a373097896 100644 (file)
@@ -293,7 +293,7 @@ static int parport_ax88796_probe(struct platform_device *pdev)
                goto exit_mem;
        }
 
-       size = (res->end - res->start) + 1;
+       size = resource_size(res);
        spacing = size / 3;
 
        dd->io = request_mem_region(res->start, size, pdev->name);
index 071b7dc0094b5eeab56f32ef2c2a13d357334a27..efa30da1ae8f6b4562cde92bf4ddeffbe48def51 100644 (file)
@@ -50,29 +50,26 @@ static ssize_t show_ctrl (struct device *dev, struct device_attribute *attr, cha
        pci_bus_for_each_resource(bus, res, index) {
                if (res && (res->flags & IORESOURCE_MEM) &&
                                !(res->flags & IORESOURCE_PREFETCH)) {
-                       out += sprintf(out, "start = %8.8llx, "
-                                       "length = %8.8llx\n",
-                                       (unsigned long long)res->start,
-                                       (unsigned long long)(res->end - res->start));
+                       out += sprintf(out, "start = %8.8llx, length = %8.8llx\n",
+                                      (unsigned long long)res->start,
+                                      (unsigned long long)resource_size(res));
                }
        }
        out += sprintf(out, "Free resources: prefetchable memory\n");
        pci_bus_for_each_resource(bus, res, index) {
                if (res && (res->flags & IORESOURCE_MEM) &&
                               (res->flags & IORESOURCE_PREFETCH)) {
-                       out += sprintf(out, "start = %8.8llx, "
-                                       "length = %8.8llx\n",
-                                       (unsigned long long)res->start,
-                                       (unsigned long long)(res->end - res->start));
+                       out += sprintf(out, "start = %8.8llx, length = %8.8llx\n",
+                                      (unsigned long long)res->start,
+                                      (unsigned long long)resource_size(res));
                }
        }
        out += sprintf(out, "Free resources: IO\n");
        pci_bus_for_each_resource(bus, res, index) {
                if (res && (res->flags & IORESOURCE_IO)) {
-                       out += sprintf(out, "start = %8.8llx, "
-                                       "length = %8.8llx\n",
-                                       (unsigned long long)res->start,
-                                       (unsigned long long)(res->end - res->start));
+                       out += sprintf(out, "start = %8.8llx, length = %8.8llx\n",
+                                      (unsigned long long)res->start,
+                                      (unsigned long long)resource_size(res));
                }
        }
        out += sprintf(out, "Free resources: bus numbers\n");
index 6892601fc76f402bd6f9cdacca44adcef82dc921..cbfbab18be91d7ecdf9ebd3952e9b77aac590726 100644 (file)
@@ -940,7 +940,7 @@ static int __init pcie_aspm_disable(char *str)
                printk(KERN_INFO "PCIe ASPM is disabled\n");
        } else if (!strcmp(str, "force")) {
                aspm_force = 1;
-               printk(KERN_INFO "PCIe ASPM is forcedly enabled\n");
+               printk(KERN_INFO "PCIe ASPM is forcibly enabled\n");
        }
        return 1;
 }
index fb33fa42d249847d1c900a5c374b6859f3cd8dde..4902206f53d942ec6174243991c842ea580feb34 100644 (file)
@@ -283,8 +283,7 @@ static int __init at91_cf_probe(struct platform_device *pdev)
        }
 
        /* reserve chip-select regions */
-       if (!request_mem_region(io->start, io->end + 1 - io->start,
-                               driver_name)) {
+       if (!request_mem_region(io->start, resource_size(io), driver_name)) {
                status = -ENXIO;
                goto fail1;
        }
@@ -308,7 +307,7 @@ static int __init at91_cf_probe(struct platform_device *pdev)
        return 0;
 
 fail2:
-       release_mem_region(io->start, io->end + 1 - io->start);
+       release_mem_region(io->start, resource_size(io));
 fail1:
        if (cf->socket.io_offset)
                iounmap((void __iomem *) cf->socket.io_offset);
@@ -339,7 +338,7 @@ static int __exit at91_cf_remove(struct platform_device *pdev)
        struct resource         *io = cf->socket.io[0].res;
 
        pcmcia_unregister_socket(&cf->socket);
-       release_mem_region(io->start, io->end + 1 - io->start);
+       release_mem_region(io->start, resource_size(io));
        iounmap((void __iomem *) cf->socket.io_offset);
        if (board->irq_pin) {
                free_irq(board->irq_pin, cf);
index 6defd4a8168ee27597872c718d58a2f60804e9fe..06ad3e5e7d3d246b9acab61dd049a3f41c430f50 100644 (file)
@@ -209,9 +209,9 @@ static int __devinit electra_cf_probe(struct platform_device *ofdev)
 
        cf->ofdev = ofdev;
        cf->mem_phys = mem.start;
-       cf->mem_size = PAGE_ALIGN(mem.end - mem.start);
+       cf->mem_size = PAGE_ALIGN(resource_size(&mem));
        cf->mem_base = ioremap(cf->mem_phys, cf->mem_size);
-       cf->io_size = PAGE_ALIGN(io.end - io.start);
+       cf->io_size = PAGE_ALIGN(resource_size(&io));
 
        area = __get_vm_area(cf->io_size, 0, PHB_IO_BASE, PHB_IO_END);
        if (area == NULL)
index 81af2b3bcc005ae90a77d349edd7212b093b29a1..69ae2fd22400a7b9db6f59420f90b9c29dfd5ade 100644 (file)
@@ -48,9 +48,6 @@ static int sharpsl_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
 {
        int ret;
 
-       if (platform_scoop_config->pcmcia_init)
-               platform_scoop_config->pcmcia_init();
-
        /* Register interrupts */
        if (SCOOP_DEV[skt->nr].cd_irq >= 0) {
                struct pcmcia_irqs cd_irq;
index b829e655457b7df517175dae74099d7275d0c1e3..57ddb969d888508c68cb701fd1252e16c6d00ada 100644 (file)
@@ -55,10 +55,6 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
                }
                skt->socket.pci_irq = IRQ_GPIO(GPIO_PRDY);
                break;
-
-#ifndef CONFIG_MACH_TRIZEPS_CONXS
-       case 1:
-#endif
        default:
                break;
        }
index 523eb691c30b954e3a14d05f4b4e91fc3d27675c..f53c237bda2f0324d75a37efe5bb43f891ff52ff 100644 (file)
@@ -135,7 +135,7 @@ static int iodyn_find_io(struct pcmcia_socket *s, unsigned int attr,
                try = res->end + 1;
                if ((*base == 0) || (*base == try)) {
                        if (adjust_resource(s->io[i].res, res->start,
-                                       res->end - res->start + num + 1))
+                                           resource_size(res) + num))
                                continue;
                        *base = try;
                        s->io[i].InUse += num;
@@ -147,8 +147,8 @@ static int iodyn_find_io(struct pcmcia_socket *s, unsigned int attr,
                try = res->start - num;
                if ((*base == 0) || (*base == try)) {
                        if (adjust_resource(s->io[i].res,
-                                       res->start - num,
-                                       res->end - res->start + num + 1))
+                                           res->start - num,
+                                           resource_size(res) + num))
                                continue;
                        *base = try;
                        s->io[i].InUse += num;
index b187555d4388d394345f06997ffaa39361ed1de3..9da9656242af8b327d2859169df0acae2a56fd17 100644 (file)
@@ -770,7 +770,7 @@ static int nonstatic_find_io(struct pcmcia_socket *s, unsigned int attr,
                                                        res->end + num);
                        if (!ret) {
                                ret = adjust_resource(s->io[i].res, res->start,
-                                              res->end - res->start + num + 1);
+                                                     resource_size(res) + num);
                                if (ret)
                                        continue;
                                *base = try;
@@ -788,8 +788,8 @@ static int nonstatic_find_io(struct pcmcia_socket *s, unsigned int attr,
                                                        res->end);
                        if (!ret) {
                                ret = adjust_resource(s->io[i].res,
-                                              res->start - num,
-                                              res->end - res->start + num + 1);
+                                                     res->start - num,
+                                                     resource_size(res) + num);
                                if (ret)
                                        continue;
                                *base = try;
index 3c7857c71a230e12b2fc1bac6446c08af0e0c893..65b66aa44c786f64dba15a94d607b292260630e7 100644 (file)
@@ -857,7 +857,7 @@ static mode_t asus_hwmon_sysfs_is_visible(struct kobject *kobj,
                int err = asus_wmi_get_devstate(asus, dev_id, &value);
 
                if (err < 0)
-                       return err;
+                       return 0; /* can't return negative here */
        }
 
        if (dev_id == ASUS_WMI_DEVID_FAN_CTRL) {
index 4a07cd96f78758161ae4111d73d90973247fb92a..bbf3edd85beb0c404b4e5b7791cfd1b79908dc3a 100644 (file)
@@ -1020,7 +1020,7 @@ static void pnpacpi_encode_io(struct pnp_dev *dev,
                io->minimum = p->start;
                io->maximum = p->end;
                io->alignment = 0;      /* Correct? */
-               io->address_length = p->end - p->start + 1;
+               io->address_length = resource_size(p);
        } else {
                io->minimum = 0;
                io->address_length = 0;
@@ -1038,7 +1038,7 @@ static void pnpacpi_encode_fixed_io(struct pnp_dev *dev,
 
        if (pnp_resource_enabled(p)) {
                fixed_io->address = p->start;
-               fixed_io->address_length = p->end - p->start + 1;
+               fixed_io->address_length = resource_size(p);
        } else {
                fixed_io->address = 0;
                fixed_io->address_length = 0;
@@ -1061,7 +1061,7 @@ static void pnpacpi_encode_mem24(struct pnp_dev *dev,
                memory24->minimum = p->start;
                memory24->maximum = p->end;
                memory24->alignment = 0;
-               memory24->address_length = p->end - p->start + 1;
+               memory24->address_length = resource_size(p);
        } else {
                memory24->minimum = 0;
                memory24->address_length = 0;
@@ -1085,7 +1085,7 @@ static void pnpacpi_encode_mem32(struct pnp_dev *dev,
                memory32->minimum = p->start;
                memory32->maximum = p->end;
                memory32->alignment = 0;
-               memory32->address_length = p->end - p->start + 1;
+               memory32->address_length = resource_size(p);
        } else {
                memory32->minimum = 0;
                memory32->alignment = 0;
@@ -1108,7 +1108,7 @@ static void pnpacpi_encode_fixed_mem32(struct pnp_dev *dev,
                    p->flags & IORESOURCE_MEM_WRITEABLE ?
                    ACPI_READ_WRITE_MEMORY : ACPI_READ_ONLY_MEMORY;
                fixed_memory32->address = p->start;
-               fixed_memory32->address_length = p->end - p->start + 1;
+               fixed_memory32->address_length = resource_size(p);
        } else {
                fixed_memory32->address = 0;
                fixed_memory32->address_length = 0;
index cb1f47bfee96685637d81ca51c3f9415092fe7e3..cca2f9f9f3e30e6f8a1201ac0fd03774a980a8bc 100644 (file)
@@ -505,7 +505,7 @@ static void pnpbios_encode_mem(struct pnp_dev *dev, unsigned char *p,
 
        if (pnp_resource_enabled(res)) {
                base = res->start;
-               len = res->end - res->start + 1;
+               len = resource_size(res);
        } else {
                base = 0;
                len = 0;
@@ -529,7 +529,7 @@ static void pnpbios_encode_mem32(struct pnp_dev *dev, unsigned char *p,
 
        if (pnp_resource_enabled(res)) {
                base = res->start;
-               len = res->end - res->start + 1;
+               len = resource_size(res);
        } else {
                base = 0;
                len = 0;
@@ -559,7 +559,7 @@ static void pnpbios_encode_fixed_mem32(struct pnp_dev *dev, unsigned char *p,
 
        if (pnp_resource_enabled(res)) {
                base = res->start;
-               len = res->end - res->start + 1;
+               len = resource_size(res);
        } else {
                base = 0;
                len = 0;
@@ -617,7 +617,7 @@ static void pnpbios_encode_port(struct pnp_dev *dev, unsigned char *p,
 
        if (pnp_resource_enabled(res)) {
                base = res->start;
-               len = res->end - res->start + 1;
+               len = resource_size(res);
        } else {
                base = 0;
                len = 0;
@@ -636,11 +636,11 @@ static void pnpbios_encode_fixed_port(struct pnp_dev *dev, unsigned char *p,
                                      struct resource *res)
 {
        unsigned long base = res->start;
-       unsigned long len = res->end - res->start + 1;
+       unsigned long len = resource_size(res);
 
        if (pnp_resource_enabled(res)) {
                base = res->start;
-               len = res->end - res->start + 1;
+               len = resource_size(res);
        } else {
                base = 0;
                len = 0;
index 4d2dc4fa2888fe2953b4b7c10a1aa53648b1f298..bfbce5de49daeeccfc3b8cf9daa585dbbd1076e4 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2009 Bluewater Systems Ltd
  *
- * Author: Ryan Mallon <ryan@bluewatersys.com>
+ * Author: Ryan Mallon
  *
  * DS2786 added by Yulia Vilensky <vilensky@compulab.co.il>
  *
@@ -416,6 +416,6 @@ static void __exit ds278x_exit(void)
 }
 module_exit(ds278x_exit);
 
-MODULE_AUTHOR("Ryan Mallon <ryan@bluewatersys.com>");
+MODULE_AUTHOR("Ryan Mallon");
 MODULE_DESCRIPTION("Maxim/Dallas DS2782 Stand-Alone Fuel Gauage IC driver");
 MODULE_LICENSE("GPL");
index e725d51e773d94c84f2f12361f6abb36eb5dcfcf..8dd08305aae13148239dfb5c6f27823ac51edad3 100644 (file)
@@ -223,7 +223,7 @@ static int __init at32_rtc_probe(struct platform_device *pdev)
        }
 
        rtc->irq = irq;
-       rtc->regs = ioremap(regs->start, regs->end - regs->start + 1);
+       rtc->regs = ioremap(regs->start, resource_size(regs));
        if (!rtc->regs) {
                ret = -ENOMEM;
                dev_dbg(&pdev->dev, "could not map I/O memory\n");
index 911e75cdc125107186a53518b748dbc10329afe8..05beb6c1ca79c7a0e22793818debbfb774da4187 100644 (file)
@@ -606,7 +606,7 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
         * (needing ioremap etc), not i/o space resources like this ...
         */
        ports = request_region(ports->start,
-                       ports->end + 1 - ports->start,
+                       resource_size(ports),
                        driver_name);
        if (!ports) {
                dev_dbg(dev, "i/o registers already in use\n");
@@ -750,7 +750,7 @@ cleanup1:
        cmos_rtc.dev = NULL;
        rtc_device_unregister(cmos_rtc.rtc);
 cleanup0:
-       release_region(ports->start, ports->end + 1 - ports->start);
+       release_region(ports->start, resource_size(ports));
        return retval;
 }
 
@@ -779,7 +779,7 @@ static void __exit cmos_do_remove(struct device *dev)
        cmos->rtc = NULL;
 
        ports = cmos->iomem;
-       release_region(ports->start, ports->end + 1 - ports->start);
+       release_region(ports->start, resource_size(ports));
        cmos->iomem = NULL;
 
        cmos->dev = NULL;
index 47e681df31e280d27f4ce1a926b0f1c5bedbc13e..68e6caf2549662a66a84b7f94196a2c20ac2f93b 100644 (file)
@@ -343,7 +343,7 @@ static int __devinit ds1286_probe(struct platform_device *pdev)
        if (!priv)
                return -ENOMEM;
 
-       priv->size = res->end - res->start + 1;
+       priv->size = resource_size(res);
        if (!request_mem_region(res->start, priv->size, pdev->name)) {
                ret = -EBUSY;
                goto out;
index fbabc773dded52eb6ee17e3f6c92b589bef0d189..568ad30617e7dad58f38f7a6583b8c73630a4aa7 100644 (file)
@@ -490,7 +490,7 @@ ds1511_rtc_probe(struct platform_device *pdev)
        pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
        if (!pdata)
                return -ENOMEM;
-       pdata->size = res->end - res->start + 1;
+       pdata->size = resource_size(res);
        if (!devm_request_mem_region(&pdev->dev, res->start, pdata->size,
                        pdev->name))
                return -EBUSY;
index 042630c90dd34e7c8232a3ddde5b14809bf0176e..d84a448dd754b32203ace25e336df50e5710f43f 100644 (file)
@@ -173,7 +173,7 @@ static int __devinit ds1742_rtc_probe(struct platform_device *pdev)
        pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
        if (!pdata)
                return -ENOMEM;
-       pdata->size = res->end - res->start + 1;
+       pdata->size = resource_size(res);
        if (!devm_request_mem_region(&pdev->dev, res->start, pdata->size,
                pdev->name))
                return -EBUSY;
index 7410875e5838957d0763a079f967c78c72a0751c..8e2a24e33ed69f89530ab9996707c109c5d76816 100644 (file)
@@ -154,7 +154,7 @@ static int __devinit m48t35_probe(struct platform_device *pdev)
        if (!priv)
                return -ENOMEM;
 
-       priv->size = res->end - res->start + 1;
+       priv->size = resource_size(res);
        /*
         * kludge: remove the #ifndef after ioc3 resource
         * conflicts are resolved
index 3978f4caf724df35449a8f84c34e897f26c2cee8..28365388fb6c8665a96c9d7fb68638300d748dc0 100644 (file)
@@ -433,7 +433,7 @@ static int __devinit m48t59_rtc_probe(struct platform_device *pdev)
 
        if (!m48t59->ioaddr) {
                /* ioaddr not mapped externally */
-               m48t59->ioaddr = ioremap(res->start, res->end - res->start + 1);
+               m48t59->ioaddr = ioremap(res->start, resource_size(res));
                if (!m48t59->ioaddr)
                        goto out;
        }
index 0cec5650d56a3d03e7ed1c50fb3a3f46a90043bf..d33544802a2ea5fc023390a069bcbc1f9d147a41 100644 (file)
@@ -332,9 +332,8 @@ vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq)
        if (!iomem)
                return -ENODEV;
 
-       iomem = request_mem_region(iomem->start,
-                       iomem->end + 1 - iomem->start,
-                       driver_name);
+       iomem = request_mem_region(iomem->start, resource_size(iomem),
+                                  driver_name);
        if (!iomem) {
                dev_dbg(dev, "i/o mem already in use.\n");
                return -EBUSY;
index 46f14b82f3ab6e987efef66d90181414e34d475c..b3eba3cddd42658f76cb7ec84a3c13187993d1b4 100644 (file)
@@ -267,9 +267,8 @@ static int puv3_rtc_probe(struct platform_device *pdev)
                return -ENOENT;
        }
 
-       puv3_rtc_mem = request_mem_region(res->start,
-                                        res->end-res->start+1,
-                                        pdev->name);
+       puv3_rtc_mem = request_mem_region(res->start, resource_size(res),
+                                         pdev->name);
 
        if (puv3_rtc_mem == NULL) {
                dev_err(&pdev->dev, "failed to reserve memory region\n");
index 53c99b1a3c923dd4a6320859a3eaa49eedfcc78a..9329dbb9ebabeafc5bbfe5f0b1123a5ed5bac33d 100644 (file)
@@ -474,8 +474,7 @@ static int __devinit s3c_rtc_probe(struct platform_device *pdev)
                return -ENOENT;
        }
 
-       s3c_rtc_mem = request_mem_region(res->start,
-                                        res->end-res->start+1,
+       s3c_rtc_mem = request_mem_region(res->start, resource_size(res),
                                         pdev->name);
 
        if (s3c_rtc_mem == NULL) {
@@ -484,7 +483,7 @@ static int __devinit s3c_rtc_probe(struct platform_device *pdev)
                goto err_nores;
        }
 
-       s3c_rtc_base = ioremap(res->start, res->end - res->start + 1);
+       s3c_rtc_base = ioremap(res->start, resource_size(res));
        if (s3c_rtc_base == NULL) {
                dev_err(&pdev->dev, "failed ioremap()\n");
                ret = -EINVAL;
index e7fc70d6b478734fb2b71f34f91400d331ee8070..2e7c136bb80528906ca2374eca7f235ac02a997a 100644 (file)
@@ -35,7 +35,7 @@
  * mode page were taken from the LSI RDAC 2.4 GPL'd
  * driver, and then converted to Linux conventions.
  */
-#define RDAC_QUIESCENCE_TIME 20;
+#define RDAC_QUIESCENCE_TIME 20
 /*
  * Page Codes
  */
index 9059524cf225410d71041a0555c3432ba2e0d734..ab4c4d651d0cf83226e9e00ba9d760c6dbbd7c09 100644 (file)
@@ -2955,18 +2955,18 @@ typedef struct _SLI2_RDSC {
 typedef struct _PCB {
 #ifdef __BIG_ENDIAN_BITFIELD
        uint32_t type:8;
-#define TYPE_NATIVE_SLI2       0x01;
+#define TYPE_NATIVE_SLI2       0x01
        uint32_t feature:8;
-#define FEATURE_INITIAL_SLI2   0x01;
+#define FEATURE_INITIAL_SLI2   0x01
        uint32_t rsvd:12;
        uint32_t maxRing:4;
 #else  /*  __LITTLE_ENDIAN_BITFIELD */
        uint32_t maxRing:4;
        uint32_t rsvd:12;
        uint32_t feature:8;
-#define FEATURE_INITIAL_SLI2   0x01;
+#define FEATURE_INITIAL_SLI2   0x01
        uint32_t type:8;
-#define TYPE_NATIVE_SLI2       0x01;
+#define TYPE_NATIVE_SLI2       0x01
 #endif
 
        uint32_t mailBoxSize;
index 1b60a95adb5064b9edb0762e772a8e44c167d24c..ae8e298746bae1f02d25473ecbde6bcf3e8b52db 100644 (file)
@@ -63,7 +63,7 @@ qla2100_intr_handler(int irq, void *dev_id)
 
                        /*
                         * Issue a "HARD" reset in order for the RISC interrupt
-                        * bit to be cleared.  Schedule a big hammmer to get
+                        * bit to be cleared.  Schedule a big hammer to get
                         * out of the RISC PAUSED state.
                         */
                        WRT_REG_WORD(&reg->hccr, HCCR_RESET_RISC);
@@ -169,7 +169,7 @@ qla2300_intr_handler(int irq, void *dev_id)
                        /*
                         * Issue a "HARD" reset in order for the RISC
                         * interrupt bit to be cleared.  Schedule a big
-                        * hammmer to get out of the RISC PAUSED state.
+                        * hammer to get out of the RISC PAUSED state.
                         */
                        WRT_REG_WORD(&reg->hccr, HCCR_RESET_RISC);
                        RD_REG_WORD(&reg->hccr);
index 744d3f6e470987c773f72a733dbbc146fa358706..bf53e44c82a1f48c2d8dca06d55b29db21935cba 100644 (file)
@@ -5,7 +5,7 @@
  * because of its small size we include it in the SSB core
  * instead of creating a standalone module.
  *
- * Copyright 2007  Michael Buesch <mb@bu3sch.de>
+ * Copyright 2007  Michael Buesch <m@bues.ch>
  *
  * Licensed under the GNU/GPL. See COPYING for details.
  */
index 06d15b6f2215694b1c380c3891c4bedbf726858e..5d9c97c24797200c3b69634ff29f75271977d1b4 100644 (file)
@@ -3,7 +3,7 @@
  * Broadcom ChipCommon core driver
  *
  * Copyright 2005, Broadcom Corporation
- * Copyright 2006, 2007, Michael Buesch <mb@bu3sch.de>
+ * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
  *
  * Licensed under the GNU/GPL. See COPYING for details.
  */
index a7aef47bf73926fff6f7243141be3244ee9f8b1f..52901c14c68b47a36da5d74452f31eaede9ea7ed 100644 (file)
@@ -2,7 +2,7 @@
  * Sonics Silicon Backplane
  * Broadcom ChipCommon Power Management Unit driver
  *
- * Copyright 2009, Michael Buesch <mb@bu3sch.de>
+ * Copyright 2009, Michael Buesch <m@bues.ch>
  * Copyright 2007, Broadcom Corporation
  *
  * Licensed under the GNU/GPL. See COPYING for details.
index c3e1d3e6d610195a1f6e7767c12719e78af347db..dc47f30e9cf7c1be458291ba0d9691bc7768e569 100644 (file)
@@ -3,7 +3,7 @@
  * Broadcom EXTIF core driver
  *
  * Copyright 2005, Broadcom Corporation
- * Copyright 2006, 2007, Michael Buesch <mb@bu3sch.de>
+ * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
  * Copyright 2006, 2007, Felix Fietkau <nbd@openwrt.org>
  * Copyright 2007, Aurelien Jarno <aurelien@aurel32.net>
  *
index d758909092228ec2ddf59f0fcf6e825101e7c44e..3adb98dad70cd34d82f7031cc1b399916f9e197c 100644 (file)
@@ -3,7 +3,7 @@
  * Broadcom Gigabit Ethernet core driver
  *
  * Copyright 2008, Broadcom Corporation
- * Copyright 2008, Michael Buesch <mb@bu3sch.de>
+ * Copyright 2008, Michael Buesch <m@bues.ch>
  *
  * Licensed under the GNU/GPL. See COPYING for details.
  */
index 97efce184a8f08d860e3eb310383dfcf80f7ea59..ced501568594837a7852350a8449a997cb03033c 100644 (file)
@@ -3,7 +3,7 @@
  * Broadcom MIPS core driver
  *
  * Copyright 2005, Broadcom Corporation
- * Copyright 2006, 2007, Michael Buesch <mb@bu3sch.de>
+ * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
  *
  * Licensed under the GNU/GPL. See COPYING for details.
  */
index 11d85bfd774ebf624a2ac9437d90a9acf98e4a28..e6ac3177fbbe57437fe0844457ffcbed784c8f21 100644 (file)
@@ -3,7 +3,7 @@
  * Broadcom PCI-core driver
  *
  * Copyright 2005, Broadcom Corporation
- * Copyright 2006, 2007, Michael Buesch <mb@bu3sch.de>
+ * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
  *
  * Licensed under the GNU/GPL. See COPYING for details.
  */
index a0e0d246b5928d061c5d3ca4738e1afd4bbeb874..eec3e267be4d5038be0d569926944a3c841f5d5e 100644 (file)
@@ -3,7 +3,7 @@
  * Embedded systems support code
  *
  * Copyright 2005-2008, Broadcom Corporation
- * Copyright 2006-2008, Michael Buesch <mb@bu3sch.de>
+ * Copyright 2006-2008, Michael Buesch <m@bues.ch>
  *
  * Licensed under the GNU/GPL. See COPYING for details.
  */
index 6ec6e099fe041da1f74c904151d1fe28d8588a7d..29c7d4f9d1ae1b7b9a073b6bf223e949b3d3be24 100644 (file)
@@ -3,7 +3,7 @@
  * Subsystem core
  *
  * Copyright 2005, Broadcom Corporation
- * Copyright 2006, 2007, Michael Buesch <mb@bu3sch.de>
+ * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
  *
  * Licensed under the GNU/GPL. See COPYING for details.
  */
index a00b35f0308478d5c8cb36b4f6022d70bba69d95..34c3bab90b9a1e6a9e5f0032c207d16fc86ef21c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Sonics Silicon Backplane PCI-Hostbus related functions.
  *
- * Copyright (C) 2005-2006 Michael Buesch <mb@bu3sch.de>
+ * Copyright (C) 2005-2006 Michael Buesch <m@bues.ch>
  * Copyright (C) 2005 Martin Langer <martin-langer@gmx.de>
  * Copyright (C) 2005 Stefano Brivio <st3@riseup.net>
  * Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org>
index d7a98131ebf3b464714ecbe73ab3f56305b8a523..116a8116984b2479038adb1f2da6574eef7ec7b4 100644 (file)
@@ -6,7 +6,7 @@
  * Copyright (c) 2005 Stefano Brivio <st3@riseup.net>
  * Copyright (c) 2005 Danny van Dyk <kugelfang@gentoo.org>
  * Copyright (c) 2005 Andreas Jaggi <andreas.jaggi@waterwave.ch>
- * Copyright (c) 2005-2007 Michael Buesch <mbuesch@freenet.de>
+ * Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
  *
  * Licensed under the GNU/GPL. See COPYING for details.
  */
index f8533795ee7f6f10a32ec4aac1d236cd700ce052..c821c6b2a6a0b778da37a7994ad1ad2d57335428 100644 (file)
@@ -3,7 +3,7 @@
  * PCMCIA-Hostbus related functions
  *
  * Copyright 2006 Johannes Berg <johannes@sipsolutions.net>
- * Copyright 2007-2008 Michael Buesch <mb@bu3sch.de>
+ * Copyright 2007-2008 Michael Buesch <m@bues.ch>
  *
  * Licensed under the GNU/GPL. See COPYING for details.
  */
index 8047f9aaa4b202abb6419e5d51c282ea7563f64a..3e844874631f84badb6faead992d6391253d9348 100644 (file)
@@ -2,7 +2,7 @@
  * Sonics Silicon Backplane
  * Bus scanning
  *
- * Copyright (C) 2005-2007 Michael Buesch <mb@bu3sch.de>
+ * Copyright (C) 2005-2007 Michael Buesch <m@bues.ch>
  * Copyright (C) 2005 Martin Langer <martin-langer@gmx.de>
  * Copyright (C) 2005 Stefano Brivio <st3@riseup.net>
  * Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org>
index 65a6080cb02af83bc39083fa00da1d64cc3acf50..63fd709038caed0d7bbb70121159f27028bd0b41 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Based on drivers/ssb/pcmcia.c
  * Copyright 2006 Johannes Berg <johannes@sipsolutions.net>
- * Copyright 2007-2008 Michael Buesch <mb@bu3sch.de>
+ * Copyright 2007-2008 Michael Buesch <m@bues.ch>
  *
  * Licensed under the GNU/GPL. See COPYING for details.
  *
index 45ff0e3a3828df3de8f9188dc5043df3152e24b5..80d366fcf8d30acecd5cb43a3541d4182947770e 100644 (file)
@@ -2,7 +2,7 @@
  * Sonics Silicon Backplane
  * Common SPROM support routines
  *
- * Copyright (C) 2005-2008 Michael Buesch <mb@bu3sch.de>
+ * Copyright (C) 2005-2008 Michael Buesch <m@bues.ch>
  * Copyright (C) 2005 Martin Langer <martin-langer@gmx.de>
  * Copyright (C) 2005 Stefano Brivio <st3@riseup.net>
  * Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org>
index 22453b0873e4cb0e0481cad4bca11b0c247cdf22..11dc39c6987a22f3c60c8443705d2e513d874c3d 100644 (file)
@@ -52,7 +52,6 @@
 #include "aggr_recv_api.h"
 #include <host_version.h>
 #include <linux/rtnetlink.h>
-#include <linux/init.h>
 #include <linux/moduleparam.h>
 #include "ar6000_api.h"
 #ifdef CONFIG_HOST_TCMD_SUPPORT
index 1148e5e22eb9de5214025d4f10aa2e3257e0c018..8fe8d2b1f6277382cbc40b1289c466ed08208081 100644 (file)
 #include <linux/file.h>
 #include <linux/string.h>
 #include <linux/etherdevice.h>
-#include <net/ip.h>
 #include <linux/wait.h>
 #include <linux/proc_fs.h>
 #include <linux/interrupt.h>
-
 #include <linux/version.h>
 #include <linux/stddef.h>
-#include <linux/kernel.h>
 #include <linux/stat.h>
 #include <linux/fcntl.h>
 #include <linux/unistd.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/pagemap.h>
-#include <asm/uaccess.h>
 #include <linux/kthread.h>
 #include <linux/tcp.h>
 #include <linux/udp.h>
 #include <linux/usb.h>
+#include <asm/uaccess.h>
+#include <net/ip.h>
 
 #include "Typedefs.h"
 #include "Version.h"
@@ -61,7 +59,6 @@
 #include "Queue.h"
 #include "vendorspecificextn.h"
 
-
 #include "InterfaceMacros.h"
 #include "InterfaceAdapter.h"
 #include "InterfaceIsr.h"
index a71c6f8ee8a388f943bef128ccb626b2cfce5fb8..8cbfeae464b1b3f89d2b3352df3340a1e0ca3e6d 100644 (file)
@@ -26,7 +26,6 @@
 #include BCMEMBEDIMAGE
 #endif                         /* BCMEMBEDIMAGE */
 
-#include <bcmdefs.h>
 #include <bcmutils.h>
 #include <bcmdevs.h>
 
index 996033cf9b09a6da5386149f6c504ba54bc8e270..d4bcc1edddb2e97786830e34ef8111ca09fc6e4b 100644 (file)
@@ -17,7 +17,6 @@
 #ifndef _wl_cfg80211_h_
 #define _wl_cfg80211_h_
 
-#include <linux/wireless.h>
 #include <linux/wireless.h>
 #include <net/cfg80211.h>
 #include <wlioctl.h>
index 35eec917f2321b23599f8773416a6c3c48110292..53e6a10655e1ed346cc8e5ca48e6f70049227da1 100644 (file)
 #include <linux/netdevice.h>
 #include <linux/hardirq.h>
 #include <wlioctl.h>
-
 #include <bcmutils.h>
-
 #include <linux/if_arp.h>
 #include <asm/uaccess.h>
+#include <linux/ieee80211.h>
 
 #include <dngl_stats.h>
 #include <dhd.h>
 #include <dhdioctl.h>
-#include <linux/ieee80211.h>
-typedef const struct si_pub si_t;
-#include <wlioctl.h>
 
-#include <dngl_stats.h>
-#include <dhd.h>
+typedef const struct si_pub si_t;
 
 #define WL_ERROR(fmt, args...) printk(fmt, ##args)
 #define WL_TRACE(fmt, args...) no_printk(fmt, ##args)
index 359e73741c484ea5da31b0e41531f1701526d420..b3324d609c8b5e56db35432a79e9d3787acd8a19 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/hiddev.h>
 #include <linux/pci.h>
 #include <linux/dmi.h>
-#include <linux/delay.h>
 
 #include "hyperv.h"
 
index 33f0f1c8ad736e8487c1e549a8efde7d5af01ed7..a4a407f7052abcc2c47827096889e978aabb0aac 100644 (file)
@@ -35,7 +35,6 @@
 #include <arpa/inet.h>
 #include <linux/connector.h>
 #include <linux/netlink.h>
-#include <sys/socket.h>
 #include <ifaddrs.h>
 #include <netdb.h>
 #include <syslog.h>
index 1a94364c48b587f1139e1ad15c386c1351525d18..72258e8c64ca34e52192ce5900dc1423a4a7c938 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/semaphore.h>
 #include <linux/list.h>
 #include <linux/notifier.h>
-#include <linux/workqueue.h>
 #include <linux/platform_device.h>
 #include "nvec.h"
 
index bae7d85fe831a56234b234ee413c146da1b1719b..4c6651aac30793ffab9ade20bd167acd3303de7d 100644 (file)
@@ -307,7 +307,7 @@ static int proc_get_stats_tx(char *page, char **start,
 void rtl8180_proc_module_init(void)
 {
        DMESG("Initializing proc filesystem");
-       rtl8180_proc = create_proc_entry(RTL8180_MODULE_NAME, S_IFDIR, init_net.proc_net);
+       rtl8180_proc = proc_mkdir(RTL8180_MODULE_NAME, init_net.proc_net);
 }
 
 void rtl8180_proc_module_remove(void)
index 663b0b8e109500fd4baf376b8171a1e98eb567ff..c2901b50dbfe116912119b67fe1e4e4a7f165587 100644 (file)
@@ -311,7 +311,7 @@ int __init ieee80211_rtl_init(void)
        }
 
        ieee80211_debug_level = debug;
-       ieee80211_proc = create_proc_entry(DRV_NAME, S_IFDIR, init_net.proc_net);
+       ieee80211_proc = proc_mkdir(DRV_NAME, init_net.proc_net);
        if (ieee80211_proc == NULL) {
                IEEE80211_ERROR("Unable to create " DRV_NAME
                                " proc directory\n");
index 19a9a07224a2f12ee39346f6b1809c34b1187397..8550794c6b91be30079428f989659a3519d74028 100644 (file)
@@ -508,7 +508,7 @@ static int proc_get_stats_rx(char *page, char **start,
 static void rtl8192_proc_module_init(void)
 {
        RT_TRACE(COMP_INIT, "Initializing proc filesystem\n");
-       rtl8192_proc=create_proc_entry(RTL819xE_MODULE_NAME, S_IFDIR, init_net.proc_net);
+       rtl8192_proc = proc_mkdir(RTL819xE_MODULE_NAME, init_net.proc_net);
 }
 
 
@@ -540,9 +540,7 @@ static void rtl8192_proc_init_one(struct r8192_priv *priv)
        struct net_device *dev = priv->ieee80211->dev;
        struct proc_dir_entry *e;
 
-       priv->dir_dev = create_proc_entry(dev->name,
-                                         S_IFDIR | S_IRUGO | S_IXUGO,
-                                         rtl8192_proc);
+       priv->dir_dev = proc_mkdir(dev->name, rtl8192_proc);
        if (!priv->dir_dev) {
                RT_TRACE(COMP_ERR, "Unable to initialize /proc/net/rtl8192/%s\n",
                      dev->name);
index fe978f359f91d9b9caba2aee28253fa682b4f19f..d315b256b7a7cfd63aa9cfb8996e0ed8bf7aa6bd 100644 (file)
@@ -283,7 +283,7 @@ int __init ieee80211_debug_init(void)
 
        ieee80211_debug_level = debug;
 
-       ieee80211_proc = create_proc_entry(DRV_NAME, S_IFDIR, init_net.proc_net);
+       ieee80211_proc = proc_mkdir(DRV_NAME, init_net.proc_net);
        if (ieee80211_proc == NULL) {
                IEEE80211_ERROR("Unable to create " DRV_NAME
                                " proc directory\n");
index e81b8ab6aa9d160c6a8c30327a751d9d6b82ef48..6a1b5c179027b955ce50a04fb8c28fd680653acf 100644 (file)
@@ -671,7 +671,7 @@ static int proc_get_stats_rx(char *page, char **start,
 void rtl8192_proc_module_init(void)
 {
        RT_TRACE(COMP_INIT, "Initializing proc filesystem");
-       rtl8192_proc=create_proc_entry(RTL819xU_MODULE_NAME, S_IFDIR, init_net.proc_net);
+       rtl8192_proc = proc_mkdir(RTL819xU_MODULE_NAME, init_net.proc_net);
 }
 
 
@@ -706,9 +706,7 @@ void rtl8192_proc_init_one(struct net_device *dev)
 {
        struct proc_dir_entry *e;
        struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
-       priv->dir_dev = create_proc_entry(dev->name,
-                                         S_IFDIR | S_IRUGO | S_IXUGO,
-                                         rtl8192_proc);
+       priv->dir_dev = proc_mkdir(dev->name, rtl8192_proc);
        if (!priv->dir_dev) {
                RT_TRACE(COMP_ERR, "Unable to initialize /proc/net/rtl8192/%s\n",
                      dev->name);
index 3bb66dc2eb2c9a7f2b2e3a4580941afa41da8047..4f380a64aa85018bf6dbb983697b8049f50d06fc 100644 (file)
@@ -29,7 +29,6 @@ struct        qos_priv        {
 
 #include "rtl871x_ht.h"
 #include "rtl871x_cmd.h"
-#include "wlan_bssdef.h"
 #include "rtl871x_xmit.h"
 #include "rtl871x_recv.h"
 #include "rtl871x_security.h"
index 3d3f73c5cd5bc47c2681bc9879bc5702fc00fff9..505395cff282641d2130027f5dde0f8d8d0a10e5 100644 (file)
@@ -22,7 +22,6 @@
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/kref.h>
-#include <linux/netdevice.h>
 #include <linux/skbuff.h>
 #include <linux/usb.h>
 #include <linux/usb/ch9.h>
index 52342c17eaddd797968265dee3762be1a9bfcff4..848b4c57531dcafac0edc102aaa2672c2e00564c 100644 (file)
@@ -50,7 +50,6 @@
 #include <linux/interrupt.h>
 #include <linux/pagemap.h>
 #include <asm/cacheflush.h>
-#include <linux/sched.h>
 #include <linux/delay.h>
 #include <linux/jiffies.h>
 #include <linux/rar_register.h>
index 6c29ae94521299fbfdb614bcfa490eadbedc48f6..991f662720bb6f5723c8269a98163d5d94ef3545 100644 (file)
@@ -13,7 +13,6 @@
 #include <glib.h>
 #include <unistd.h>
 #include <stdio.h>
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <stdlib.h>
index a6bfb6deba94c611cdce8c2e52ce82c56e169972..09df38b4610ce6f5d4abf6b8df844bad51acc425 100644 (file)
@@ -45,7 +45,6 @@
 #include <target/target_core_device.h>
 #include <target/target_core_tpg.h>
 #include <target/target_core_configfs.h>
-#include <target/target_core_base.h>
 #include <target/target_core_tmr.h>
 #include <target/configfs_macros.h>
 
index d63e3dd3b180d093ddf542d23326a297e666b6e8..8781d1e423df31629d2d5eaa19e2db0e409059d8 100644 (file)
@@ -48,7 +48,6 @@
 #include <target/target_core_device.h>
 #include <target/target_core_tpg.h>
 #include <target/target_core_configfs.h>
-#include <target/target_core_base.h>
 #include <target/configfs_macros.h>
 
 #include "tcm_fc.h"
index 11e6483fc1276013e92234cb1c19538d6b09994a..8e2a46ddcccb5b5ce808b1545e7c91afb741d56a 100644 (file)
@@ -54,7 +54,6 @@
 #include <target/target_core_device.h>
 #include <target/target_core_tpg.h>
 #include <target/target_core_configfs.h>
-#include <target/target_core_base.h>
 #include <target/configfs_macros.h>
 
 #include "tcm_fc.h"
index fbcbb3d1d06b64f06742ced9d5073764678d0676..dbb5eaeee39984445e673ee2ea9b8064752b3804 100644 (file)
 #include <target/target_core_device.h>
 #include <target/target_core_tpg.h>
 #include <target/target_core_configfs.h>
-#include <target/target_core_base.h>
 #include <target/configfs_macros.h>
 
-#include <scsi/libfc.h>
 #include "tcm_fc.h"
 
 static void ft_sess_delete_all(struct ft_tport *);
index f41b4259ecddea3e6fc49c858c77a070ba400bcc..cf35e0dc50854bbf536ab004243fdfcdb76f42c1 100644 (file)
@@ -743,7 +743,7 @@ pci_ni8430_setup(struct serial_private *priv,
        len =  pci_resource_len(priv->dev, bar);
        p = ioremap_nocache(base, len);
 
-       /* enable the transciever */
+       /* enable the transceiver */
        writeb(readb(p + offset + NI8430_PORTCON) | NI8430_PORTCON_TXVR_ENABLE,
               p + offset + NI8430_PORTCON);
 
index 636144cea932e40b21a43cb9ceb1ba714729b79e..8f41e1123461e255984e0ec828ef12ec53bb1092 100644 (file)
@@ -457,7 +457,6 @@ config SERIAL_SAMSUNG_UARTS_4
 config SERIAL_SAMSUNG_UARTS
        int
        depends on ARM && PLAT_SAMSUNG
-       default 2 if ARCH_S3C2400
        default 6 if ARCH_S5P6450
        default 4 if SERIAL_SAMSUNG_UARTS_4
        default 3
@@ -489,13 +488,6 @@ config SERIAL_SAMSUNG_CONSOLE
          your boot loader about how to pass options to the kernel at
          boot time.)
 
-config SERIAL_S3C2400
-       tristate "Samsung S3C2410 Serial port support"
-       depends on ARM && SERIAL_SAMSUNG && CPU_S3C2400
-       default y if CPU_S3C2400
-       help
-         Serial port support for the Samsung S3C2400 SoC
-
 config SERIAL_S3C2410
        tristate "Samsung S3C2410 Serial port support"
        depends on SERIAL_SAMSUNG && CPU_S3C2410
@@ -519,13 +511,6 @@ config SERIAL_S3C2440
        help
          Serial port support for the Samsung S3C2440, S3C2416 and S3C2442 SoC
 
-config SERIAL_S3C24A0
-       tristate "Samsung S3C24A0 Serial port support"
-       depends on SERIAL_SAMSUNG && CPU_S3C24A0
-       default y if CPU_S3C24A0
-       help
-         Serial port support for the Samsung S3C24A0 SoC
-
 config SERIAL_S3C6400
        tristate "Samsung S3C6400/S3C6410/S5P6440/S5P6450/S5PC100 Serial port support"
        depends on SERIAL_SAMSUNG && (CPU_S3C6400 || CPU_S3C6410 || CPU_S5P6440 || CPU_S5P6450 || CPU_S5PC100)
index cb2628fee4c7160e20f16eec800c76642ecfe9f8..83b4da6a1062014ed7d65ed669548797ea91e776 100644 (file)
@@ -38,11 +38,9 @@ obj-$(CONFIG_SERIAL_BCM63XX) += bcm63xx_uart.o
 obj-$(CONFIG_SERIAL_BFIN) += bfin_5xx.o
 obj-$(CONFIG_SERIAL_BFIN_SPORT) += bfin_sport_uart.o
 obj-$(CONFIG_SERIAL_SAMSUNG) += samsung.o
-obj-$(CONFIG_SERIAL_S3C2400) += s3c2400.o
 obj-$(CONFIG_SERIAL_S3C2410) += s3c2410.o
 obj-$(CONFIG_SERIAL_S3C2412) += s3c2412.o
 obj-$(CONFIG_SERIAL_S3C2440) += s3c2440.o
-obj-$(CONFIG_SERIAL_S3C24A0) += s3c24a0.o
 obj-$(CONFIG_SERIAL_S3C6400) += s3c6400.o
 obj-$(CONFIG_SERIAL_S5PV210) += s5pv210.o
 obj-$(CONFIG_SERIAL_MAX3100) += max3100.o
index 9b1ff2b6bb3703e98fcf7b9cd758d1b923ce5fd0..ff6979181ac5bf1b0dd3464e3c6a837062776586 100644 (file)
@@ -1304,8 +1304,7 @@ static int bfin_serial_probe(struct platform_device *pdev)
                        goto out_error_free_peripherals;
                }
 
-               uart->port.membase = ioremap(res->start,
-                       res->end - res->start);
+               uart->port.membase = ioremap(res->start, resource_size(res));
                if (!uart->port.membase) {
                        dev_err(&pdev->dev, "Cannot map uart IO\n");
                        ret = -ENXIO;
@@ -1483,7 +1482,7 @@ static int bfin_earlyprintk_probe(struct platform_device *pdev)
        }
 
        bfin_earlyprintk_port.port.membase = ioremap(res->start,
-                       res->end - res->start);
+                                                    resource_size(res));
        if (!bfin_earlyprintk_port.port.membase) {
                dev_err(&pdev->dev, "Cannot map uart IO\n");
                ret = -ENXIO;
index a54473123e0aad5c02e8e33177007b4b843cbb96..22fe801cce31725cc8c2be37a45b01469d4394a1 100644 (file)
@@ -954,7 +954,7 @@ static void imx_release_port(struct uart_port *port)
        struct resource *mmres;
 
        mmres = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       release_mem_region(mmres->start, mmres->end - mmres->start + 1);
+       release_mem_region(mmres->start, resource_size(mmres));
 }
 
 /*
@@ -970,8 +970,7 @@ static int imx_request_port(struct uart_port *port)
        if (!mmres)
                return -ENODEV;
 
-       ret = request_mem_region(mmres->start, mmres->end - mmres->start + 1,
-                       "imx-uart");
+       ret = request_mem_region(mmres->start, resource_size(mmres), "imx-uart");
 
        return  ret ? 0 : -EBUSY;
 }
index 84db7321cce85e5d2be2a9cb3f7794c8f23ef0e3..8e07517f8acdc4276dd445428adf97f12709fc34 100644 (file)
@@ -892,7 +892,7 @@ static int m32r_sio_request_port(struct uart_port *port)
         * If we have a mapbase, then request that as well.
         */
        if (ret == 0 && up->port.flags & UPF_IOREMAP) {
-               int size = res->end - res->start + 1;
+               int size = resource_size(res);
 
                up->port.membase = ioremap(up->port.mapbase, size);
                if (!up->port.membase)
index 47cadf474149fe957a179458f24dc66ea6a57f9f..c37df8d0fa2819261dffccc5bc4d0180b9531f49 100644 (file)
@@ -1241,8 +1241,8 @@ static int serial_omap_probe(struct platform_device *pdev)
                return -ENODEV;
        }
 
-       if (!request_mem_region(mem->start, (mem->end - mem->start) + 1,
-                                    pdev->dev.driver->name)) {
+       if (!request_mem_region(mem->start, resource_size(mem),
+                               pdev->dev.driver->name)) {
                dev_err(&pdev->dev, "memory region already claimed\n");
                return -EBUSY;
        }
@@ -1308,7 +1308,7 @@ err:
        dev_err(&pdev->dev, "[UART%d]: failure [%s]: %d\n",
                                pdev->id, __func__, ret);
 do_release_region:
-       release_mem_region(mem->start, (mem->end - mem->start) + 1);
+       release_mem_region(mem->start, resource_size(mem));
        return ret;
 }
 
index 4302e6e3768e504d76f63d2be40198195c303290..531931c1b250129508040c2a2c78425827159951 100644 (file)
@@ -803,7 +803,7 @@ static int serial_pxa_probe(struct platform_device *dev)
                break;
        }
 
-       sport->port.membase = ioremap(mmres->start, mmres->end - mmres->start + 1);
+       sport->port.membase = ioremap(mmres->start, resource_size(mmres));
        if (!sport->port.membase) {
                ret = -ENOMEM;
                goto err_clk;
diff --git a/drivers/tty/serial/s3c2400.c b/drivers/tty/serial/s3c2400.c
deleted file mode 100644 (file)
index d13051b..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Driver for Samsung SoC onboard UARTs.
- *
- * Ben Dooks, Copyright (c) 2003-2005 Simtec Electronics
- *     http://armlinux.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/module.h>
-#include <linux/ioport.h>
-#include <linux/io.h>
-#include <linux/platform_device.h>
-
-#include <asm/irq.h>
-
-#include <mach/hardware.h>
-
-#include <plat/regs-serial.h>
-#include <mach/regs-gpio.h>
-
-#include "samsung.h"
-
-static int s3c2400_serial_getsource(struct uart_port *port,
-                                   struct s3c24xx_uart_clksrc *clk)
-{
-       clk->divisor = 1;
-       clk->name = "pclk";
-
-       return 0;
-}
-
-static int s3c2400_serial_setsource(struct uart_port *port,
-                                   struct s3c24xx_uart_clksrc *clk)
-{
-       return 0;
-}
-
-static int s3c2400_serial_resetport(struct uart_port *port,
-                                   struct s3c2410_uartcfg *cfg)
-{
-       dbg("s3c2400_serial_resetport: port=%p (%08lx), cfg=%p\n",
-           port, port->mapbase, cfg);
-
-       wr_regl(port, S3C2410_UCON,  cfg->ucon);
-       wr_regl(port, S3C2410_ULCON, cfg->ulcon);
-
-       /* reset both fifos */
-
-       wr_regl(port, S3C2410_UFCON, cfg->ufcon | S3C2410_UFCON_RESETBOTH);
-       wr_regl(port, S3C2410_UFCON, cfg->ufcon);
-
-       return 0;
-}
-
-static struct s3c24xx_uart_info s3c2400_uart_inf = {
-       .name           = "Samsung S3C2400 UART",
-       .type           = PORT_S3C2400,
-       .fifosize       = 16,
-       .rx_fifomask    = S3C2410_UFSTAT_RXMASK,
-       .rx_fifoshift   = S3C2410_UFSTAT_RXSHIFT,
-       .rx_fifofull    = S3C2410_UFSTAT_RXFULL,
-       .tx_fifofull    = S3C2410_UFSTAT_TXFULL,
-       .tx_fifomask    = S3C2410_UFSTAT_TXMASK,
-       .tx_fifoshift   = S3C2410_UFSTAT_TXSHIFT,
-       .get_clksrc     = s3c2400_serial_getsource,
-       .set_clksrc     = s3c2400_serial_setsource,
-       .reset_port     = s3c2400_serial_resetport,
-};
-
-static int s3c2400_serial_probe(struct platform_device *dev)
-{
-       return s3c24xx_serial_probe(dev, &s3c2400_uart_inf);
-}
-
-static struct platform_driver s3c2400_serial_driver = {
-       .probe          = s3c2400_serial_probe,
-       .remove         = __devexit_p(s3c24xx_serial_remove),
-       .driver         = {
-               .name   = "s3c2400-uart",
-               .owner  = THIS_MODULE,
-       },
-};
-
-s3c24xx_console_init(&s3c2400_serial_driver, &s3c2400_uart_inf);
-
-static inline int s3c2400_serial_init(void)
-{
-       return s3c24xx_serial_init(&s3c2400_serial_driver, &s3c2400_uart_inf);
-}
-
-static inline void s3c2400_serial_exit(void)
-{
-       platform_driver_unregister(&s3c2400_serial_driver);
-}
-
-module_init(s3c2400_serial_init);
-module_exit(s3c2400_serial_exit);
-
-MODULE_LICENSE("GPL v2");
-MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
-MODULE_DESCRIPTION("Samsung S3C2400 SoC Serial port driver");
-MODULE_ALIAS("platform:s3c2400-uart");
index bffe6ff9b1589d5d7a35bb5726d2476f2a5dead5..b1d7e7c1849d22192c21c03e9bdc5073df5be8f2 100644 (file)
@@ -96,8 +96,6 @@ static struct platform_driver s3c2410_serial_driver = {
        },
 };
 
-s3c24xx_console_init(&s3c2410_serial_driver, &s3c2410_uart_inf);
-
 static int __init s3c2410_serial_init(void)
 {
        return s3c24xx_serial_init(&s3c2410_serial_driver, &s3c2410_uart_inf);
index 7e2b9504a68732c73c645f564b39bc77436b37b6..2234bf9ced45bc4fde8bcfba3d170ce69d229f34 100644 (file)
@@ -130,8 +130,6 @@ static struct platform_driver s3c2412_serial_driver = {
        },
 };
 
-s3c24xx_console_init(&s3c2412_serial_driver, &s3c2412_uart_inf);
-
 static inline int s3c2412_serial_init(void)
 {
        return s3c24xx_serial_init(&s3c2412_serial_driver, &s3c2412_uart_inf);
index 9e10d415d5fd2c90e3cfe778fb2e64d598887fcc..1d0c324b813f46f0fc589c69067249fa05332fc4 100644 (file)
@@ -159,8 +159,6 @@ static struct platform_driver s3c2440_serial_driver = {
        },
 };
 
-s3c24xx_console_init(&s3c2440_serial_driver, &s3c2440_uart_inf);
-
 static int __init s3c2440_serial_init(void)
 {
        return s3c24xx_serial_init(&s3c2440_serial_driver, &s3c2440_uart_inf);
diff --git a/drivers/tty/serial/s3c24a0.c b/drivers/tty/serial/s3c24a0.c
deleted file mode 100644 (file)
index 914eff2..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Driver for Samsung S3C24A0 SoC onboard UARTs.
- *
- * Based on drivers/serial/s3c2410.c
- *
- * Author: Sandeep Patil <sandeep.patil@azingo.com>
- *
- * Ben Dooks, Copyright (c) 2003-2008 Simtec Electronics
- *     http://armlinux.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/module.h>
-#include <linux/ioport.h>
-#include <linux/platform_device.h>
-#include <linux/init.h>
-#include <linux/serial_core.h>
-#include <linux/serial.h>
-#include <linux/io.h>
-#include <linux/irq.h>
-
-#include <mach/hardware.h>
-
-#include <plat/regs-serial.h>
-#include <mach/regs-gpio.h>
-
-#include "samsung.h"
-
-static int s3c24a0_serial_setsource(struct uart_port *port,
-                                   struct s3c24xx_uart_clksrc *clk)
-{
-       unsigned long ucon = rd_regl(port, S3C2410_UCON);
-
-       if (strcmp(clk->name, "uclk") == 0)
-               ucon |= S3C2410_UCON_UCLK;
-       else
-               ucon &= ~S3C2410_UCON_UCLK;
-
-       wr_regl(port, S3C2410_UCON, ucon);
-       return 0;
-}
-
-static int s3c24a0_serial_getsource(struct uart_port *port,
-                                   struct s3c24xx_uart_clksrc *clk)
-{
-       unsigned long ucon = rd_regl(port, S3C2410_UCON);
-
-       clk->divisor = 1;
-       clk->name = (ucon & S3C2410_UCON_UCLK) ? "uclk" : "pclk";
-
-       return 0;
-}
-
-static int s3c24a0_serial_resetport(struct uart_port *port,
-                                   struct s3c2410_uartcfg *cfg)
-{
-       dbg("s3c24a0_serial_resetport: port=%p (%08lx), cfg=%p\n",
-           port, port->mapbase, cfg);
-
-       wr_regl(port, S3C2410_UCON,  cfg->ucon);
-       wr_regl(port, S3C2410_ULCON, cfg->ulcon);
-
-       /* reset both fifos */
-
-       wr_regl(port, S3C2410_UFCON, cfg->ufcon | S3C2410_UFCON_RESETBOTH);
-       wr_regl(port, S3C2410_UFCON, cfg->ufcon);
-
-       return 0;
-}
-
-static struct s3c24xx_uart_info s3c24a0_uart_inf = {
-       .name           = "Samsung S3C24A0 UART",
-       .type           = PORT_S3C2410,
-       .fifosize       = 16,
-       .rx_fifomask    = S3C24A0_UFSTAT_RXMASK,
-       .rx_fifoshift   = S3C24A0_UFSTAT_RXSHIFT,
-       .rx_fifofull    = S3C24A0_UFSTAT_RXFULL,
-       .tx_fifofull    = S3C24A0_UFSTAT_TXFULL,
-       .tx_fifomask    = S3C24A0_UFSTAT_TXMASK,
-       .tx_fifoshift   = S3C24A0_UFSTAT_TXSHIFT,
-       .get_clksrc     = s3c24a0_serial_getsource,
-       .set_clksrc     = s3c24a0_serial_setsource,
-       .reset_port     = s3c24a0_serial_resetport,
-};
-
-static int s3c24a0_serial_probe(struct platform_device *dev)
-{
-       return s3c24xx_serial_probe(dev, &s3c24a0_uart_inf);
-}
-
-static struct platform_driver s3c24a0_serial_driver = {
-       .probe          = s3c24a0_serial_probe,
-       .remove         = __devexit_p(s3c24xx_serial_remove),
-       .driver         = {
-               .name   = "s3c24a0-uart",
-               .owner  = THIS_MODULE,
-       },
-};
-
-s3c24xx_console_init(&s3c24a0_serial_driver, &s3c24a0_uart_inf);
-
-static int __init s3c24a0_serial_init(void)
-{
-       return s3c24xx_serial_init(&s3c24a0_serial_driver, &s3c24a0_uart_inf);
-}
-
-static void __exit s3c24a0_serial_exit(void)
-{
-       platform_driver_unregister(&s3c24a0_serial_driver);
-}
-
-module_init(s3c24a0_serial_init);
-module_exit(s3c24a0_serial_exit);
-
index ded26c42ff37e4260c2911d72d66ff3477d2e016..e2f6913d84d58d5de95d580f45fcffba20be3d27 100644 (file)
@@ -130,8 +130,6 @@ static struct platform_driver s3c6400_serial_driver = {
        },
 };
 
-s3c24xx_console_init(&s3c6400_serial_driver, &s3c6400_uart_inf);
-
 static int __init s3c6400_serial_init(void)
 {
        return s3c24xx_serial_init(&s3c6400_serial_driver, &s3c6400_uart_inf);
index dd194dc80ee9a4f0adbbeae30e4c222756b20d19..8dd160c96e873f66f2657d444d4ddbc53ab5c8e0 100644 (file)
@@ -135,13 +135,6 @@ static struct platform_driver s5p_serial_driver = {
        },
 };
 
-static int __init s5pv210_serial_console_init(void)
-{
-       return s3c24xx_serial_initconsole(&s5p_serial_driver, s5p_uart_inf);
-}
-
-console_initcall(s5pv210_serial_console_init);
-
 static int __init s5p_serial_init(void)
 {
        return s3c24xx_serial_init(&s5p_serial_driver, *s5p_uart_inf);
index f66f6482930363a9cbd2b69af11588021970cbfe..7ead42104c67221a0ba4e5bfb1a981118d2acd50 100644 (file)
@@ -1416,10 +1416,8 @@ s3c24xx_serial_console_setup(struct console *co, char *options)
 
        /* is the port configured? */
 
-       if (port->mapbase == 0x0) {
-               co->index = 0;
-               port = &s3c24xx_serial_ports[co->index].port;
-       }
+       if (port->mapbase == 0x0)
+               return -ENODEV;
 
        cons_uart = port;
 
@@ -1451,7 +1449,8 @@ static struct console s3c24xx_serial_console = {
        .flags          = CON_PRINTBUFFER,
        .index          = -1,
        .write          = s3c24xx_serial_console_write,
-       .setup          = s3c24xx_serial_console_setup
+       .setup          = s3c24xx_serial_console_setup,
+       .data           = &s3c24xx_uart_drv,
 };
 
 int s3c24xx_serial_initconsole(struct platform_driver *drv,
index 5b098cd7604096af3dc3f9992b424d11055911f2..a69d9a54be94cdcbe3368128694da413830b045e 100644 (file)
@@ -79,25 +79,6 @@ extern int s3c24xx_serial_initconsole(struct platform_driver *drv,
 extern int s3c24xx_serial_init(struct platform_driver *drv,
                               struct s3c24xx_uart_info *info);
 
-#ifdef CONFIG_SERIAL_SAMSUNG_CONSOLE
-
-#define s3c24xx_console_init(__drv, __inf)                             \
-static int __init s3c_serial_console_init(void)                                \
-{                                                                      \
-       struct s3c24xx_uart_info *uinfo[CONFIG_SERIAL_SAMSUNG_UARTS];   \
-       int i;                                                          \
-                                                                       \
-       for (i = 0; i < CONFIG_SERIAL_SAMSUNG_UARTS; i++)               \
-               uinfo[i] = __inf;                                       \
-       return s3c24xx_serial_initconsole(__drv, uinfo);                \
-}                                                                      \
-                                                                       \
-console_initcall(s3c_serial_console_init)
-
-#else
-#define s3c24xx_console_init(drv, inf) extern void no_console(void)
-#endif
-
 #ifdef CONFIG_SERIAL_SAMSUNG_DEBUG
 
 extern void printascii(const char *);
index 92aa54550e84babbae1d4451e87efe6e65690d4a..ad0f8f5f6ea189e1ba4e389a8626c2e1231a6033 100644 (file)
@@ -1435,7 +1435,7 @@ static int __devinit su_probe(struct platform_device *op)
 
        rp = &op->resource[0];
        up->port.mapbase = rp->start;
-       up->reg_size = (rp->end - rp->start) + 1;
+       up->reg_size = resource_size(rp);
        up->port.membase = of_ioremap(rp, 0, up->reg_size, "su");
        if (!up->port.membase) {
                if (type != SU_PORT_PORT)
index 37fc4e3d487c5f0ce53da3df7e59781134ef875a..026cb9ea5cd1503280d1da82ec42a186f7cc3d87 100644 (file)
@@ -573,8 +573,7 @@ static int __init vt8500_serial_probe(struct platform_device *pdev)
        snprintf(vt8500_port->name, sizeof(vt8500_port->name),
                 "VT8500 UART%d", pdev->id);
 
-       vt8500_port->uart.membase = ioremap(mmres->start,
-                                           mmres->end - mmres->start + 1);
+       vt8500_port->uart.membase = ioremap(mmres->start, resource_size(mmres));
        if (!vt8500_port->uart.membase) {
                ret = -ENOMEM;
                goto err;
index 7d3e469b99045be5ad1ff6e0dfecc4dd1870d50e..bdc3db946122f425a13b2cf619e61d3acbcae622 100644 (file)
@@ -58,7 +58,7 @@ static int uio_pdrv_probe(struct platform_device *pdev)
 
                uiomem->memtype = UIO_MEM_PHYS;
                uiomem->addr = r->start;
-               uiomem->size = r->end - r->start + 1;
+               uiomem->size = resource_size(r);
                ++uiomem;
        }
 
index 0f424af7f10934f530f608aa24f4f63ba0438142..31e799d9efe5d0c38da50c147678986b8e47dc92 100644 (file)
@@ -137,7 +137,7 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)
 
                uiomem->memtype = UIO_MEM_PHYS;
                uiomem->addr = r->start;
-               uiomem->size = r->end - r->start + 1;
+               uiomem->size = resource_size(r);
                ++uiomem;
        }
 
index db1a659702ba0b50607ea738393a1deb6c5dfdc6..f045c8968a6e4ed4be7fbbd959cbd94f9135074b 100644 (file)
@@ -272,7 +272,7 @@ static void usba_init_debugfs(struct usba_udc *udc)
 
        regs_resource = platform_get_resource(udc->pdev, IORESOURCE_MEM,
                                CTRL_IOMEM_ID);
-       regs->d_inode->i_size = regs_resource->end - regs_resource->start + 1;
+       regs->d_inode->i_size = resource_size(regs_resource);
        udc->debugfs_regs = regs;
 
        usba_ep_init_debugfs(udc, to_usba_ep(udc->gadget.ep0));
index 4e4833168087565215274dd1dab672628cd303b9..3e59035e6de8b4c0fc821a6e3c61eb9156c94f1a 100644 (file)
@@ -2463,7 +2463,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
        }
 
        if (pdata->operating_mode == FSL_USB2_DR_DEVICE) {
-               if (!request_mem_region(res->start, res->end - res->start + 1,
+               if (!request_mem_region(res->start, resource_size(res),
                                        driver_name)) {
                        ERR("request mem region for %s failed\n", pdev->name);
                        ret = -EBUSY;
@@ -2605,7 +2605,7 @@ err_iounmap_noclk:
        iounmap(dr_regs);
 err_release_mem_region:
        if (pdata->operating_mode == FSL_USB2_DR_DEVICE)
-               release_mem_region(res->start, res->end - res->start + 1);
+               release_mem_region(res->start, resource_size(res));
 err_kfree:
        kfree(udc_controller);
        udc_controller = NULL;
@@ -2640,7 +2640,7 @@ static int __exit fsl_udc_remove(struct platform_device *pdev)
        free_irq(udc_controller->irq, udc_controller);
        iounmap(dr_regs);
        if (pdata->operating_mode == FSL_USB2_DR_DEVICE)
-               release_mem_region(res->start, res->end - res->start + 1);
+               release_mem_region(res->start, resource_size(res));
 
        device_unregister(&udc_controller->gadget.dev);
        /* free udc --wait for the release() finished */
index cd16231d8c731633d3ed211f6a8b788e72e64113..b01696eab0682c960cb1ad0bf9eeec7428c07ec8 100644 (file)
@@ -88,9 +88,9 @@
 #define UDCISR_INT_MASK        (UDCICR_FIFOERR | UDCICR_PKTCOMPL)
 
 #define UDCOTGICR_IESF (1 << 24)       /* OTG SET_FEATURE command recvd */
-#define UDCOTGICR_IEXR (1 << 17)       /* Extra Transciever Interrupt
+#define UDCOTGICR_IEXR (1 << 17)       /* Extra Transceiver Interrupt
                                           Rising Edge Interrupt Enable */
-#define UDCOTGICR_IEXF (1 << 16)       /* Extra Transciever Interrupt
+#define UDCOTGICR_IEXF (1 << 16)       /* Extra Transceiver Interrupt
                                           Falling Edge Interrupt Enable */
 #define UDCOTGICR_IEVV40R (1 << 9)     /* OTG Vbus Valid 4.0V Rising Edge
                                           Interrupt Enable */
index aa248c2f2c60d6a7de7996e48fa0ecffc1691519..4d2e88d04dab318a8210f88fe7001f42cc10f3c1 100644 (file)
@@ -148,7 +148,7 @@ static int ehci_ath79_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        hcd->rsrc_start = res->start;
-       hcd->rsrc_len   = res->end - res->start + 1;
+       hcd->rsrc_len   = resource_size(res);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
                dev_dbg(&pdev->dev, "controller already in use\n");
index d41745c6f0c47edbe5632683ccaeaa5bce0aaa05..6536abdea6e6f117e0f5ea99968a069c96e35e62 100644 (file)
@@ -107,7 +107,7 @@ static int cns3xxx_ehci_probe(struct platform_device *pdev)
        }
 
        hcd->rsrc_start = res->start;
-       hcd->rsrc_len = res->end - res->start + 1;
+       hcd->rsrc_len = resource_size(res);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
                                driver->description)) {
index f380bf97e5af71d614092c300d1e786949da1254..34a3140d1e5f169e182d2c2ce37762fd8413e8d6 100644 (file)
@@ -100,7 +100,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
                goto err2;
        }
        hcd->rsrc_start = res->start;
-       hcd->rsrc_len = res->end - res->start + 1;
+       hcd->rsrc_len = resource_size(res);
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
                                driver->description)) {
                dev_dbg(&pdev->dev, "controller already in use\n");
index 93b230dc51a2b0903ae5da70bed20a8b8200e139..fdfd8c5b639b843d6170a7afed710e2d58ab18c8 100644 (file)
@@ -130,7 +130,7 @@ static int __devinit ehci_hcd_grlib_probe(struct platform_device *op)
                return -ENOMEM;
 
        hcd->rsrc_start = res.start;
-       hcd->rsrc_len = res.end - res.start + 1;
+       hcd->rsrc_len = resource_size(&res);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
                printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
index 50e600d26e287165e93cfdf205217850e077abd8..c4460f3d009fdb6595e0566b19a70a6302f3fd10 100644 (file)
@@ -100,7 +100,7 @@ static int ixp4xx_ehci_probe(struct platform_device *pdev)
                goto fail_request_resource;
        }
        hcd->rsrc_start = res->start;
-       hcd->rsrc_len = res->end - res->start + 1;
+       hcd->rsrc_len = resource_size(res);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
                                driver->description)) {
index ff55757ba7d82c01068914620ae54bbcf948627b..c3ba3ed5f3a6d5ddf31173c2f8c0dda065d05fa4 100644 (file)
@@ -124,7 +124,7 @@ static int ehci_octeon_drv_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        hcd->rsrc_start = res_mem->start;
-       hcd->rsrc_len = res_mem->end - res_mem->start + 1;
+       hcd->rsrc_len = resource_size(res_mem);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
                                OCTEON_EHCI_HCD_NAME)) {
index cd69099cda1910f9e5aa1f2af67780a872ec28c0..e8d54de44acc679bc5622d4075e7a16276efac52 100644 (file)
@@ -124,7 +124,7 @@ static int usb_hcd_msp_map_regs(struct mspusb_device *dev)
        res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
        if (res == NULL)
                return -ENOMEM;
-       res_len = res->end - res->start + 1;
+       res_len = resource_size(res);
        if (!request_mem_region(res->start, res_len, "mab regs"))
                return -EBUSY;
 
@@ -140,7 +140,7 @@ static int usb_hcd_msp_map_regs(struct mspusb_device *dev)
                retval = -ENOMEM;
                goto err2;
        }
-       res_len = res->end - res->start + 1;
+       res_len = resource_size(res);
        if (!request_mem_region(res->start, res_len, "usbid regs")) {
                retval = -EBUSY;
                goto err2;
@@ -154,13 +154,13 @@ static int usb_hcd_msp_map_regs(struct mspusb_device *dev)
        return 0;
 err3:
        res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
-       res_len = res->end - res->start + 1;
+       res_len = resource_size(res);
        release_mem_region(res->start, res_len);
 err2:
        iounmap(dev->mab_regs);
 err1:
        res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-       res_len = res->end - res->start + 1;
+       res_len = resource_size(res);
        release_mem_region(res->start, res_len);
        dev_err(&pdev->dev, "Failed to map non-EHCI regs.\n");
        return retval;
@@ -194,7 +194,7 @@ int usb_hcd_msp_probe(const struct hc_driver *driver,
                goto err1;
        }
        hcd->rsrc_start = res->start;
-       hcd->rsrc_len = res->end - res->start + 1;
+       hcd->rsrc_len = resource_size(res);
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, dev->name)) {
                retval = -EBUSY;
                goto err1;
index 8552db6c29c9e4cce9c5896bf296cd5a3cb71853..41d11fe14252ad7963d9e08ca277822aa8c8ff9c 100644 (file)
@@ -130,7 +130,7 @@ static int __devinit ehci_hcd_ppc_of_probe(struct platform_device *op)
                return -ENOMEM;
 
        hcd->rsrc_start = res.start;
-       hcd->rsrc_len = res.end - res.start + 1;
+       hcd->rsrc_len = resource_size(&res);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
                printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
index 52a027aaa37028d464c73236725a74e3c578e7fc..d661cf7de140731d17cd46acf38ba689863656c8 100644 (file)
@@ -41,7 +41,7 @@ static int __devinit usb_w90x900_probe(const struct hc_driver *driver,
        }
 
        hcd->rsrc_start = res->start;
-       hcd->rsrc_len = res->end - res->start + 1;
+       hcd->rsrc_len = resource_size(res);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
                retval = -EBUSY;
index a64d6d66d7600e8f73e1ae1fba3feafb52f31cfa..32793ce3d9e9dd4a32588204d5a59680046374e6 100644 (file)
@@ -174,7 +174,7 @@ static int __devinit ehci_hcd_xilinx_of_probe(struct platform_device *op)
                return -ENOMEM;
 
        hcd->rsrc_start = res.start;
-       hcd->rsrc_len = res.end - res.start + 1;
+       hcd->rsrc_len = resource_size(&res);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
                printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
index 19223c7449e152a9a144d4fd174ad452c2c53113..572ea53b0226eb084d6134b1b7fe853bf0d67374 100644 (file)
@@ -605,7 +605,7 @@ static int __devinit of_fhci_probe(struct platform_device *ofdev)
                goto err_regs;
        }
 
-       hcd->regs = ioremap(usb_regs.start, usb_regs.end - usb_regs.start + 1);
+       hcd->regs = ioremap(usb_regs.start, resource_size(&usb_regs));
        if (!hcd->regs) {
                dev_err(dev, "could not ioremap regs\n");
                ret = -ENOMEM;
index ffea3e7cb0a88445ab3a60f23752282c65634317..c620c50f6770bf9f2ee1fa0ca6c2783ff7d1d2be 100644 (file)
@@ -93,8 +93,8 @@ static int ohci_ath79_probe(struct platform_device *pdev)
                ret = -ENODEV;
                goto err_put_hcd;
        }
-       hcd->rsrc_start = res->start;
-       hcd->rsrc_len   = res->end - res->start + 1;
+       hcd->rsrc_start = res->start;
+       hcd->rsrc_len = resource_size(res);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
                dev_dbg(&pdev->dev, "controller already in use\n");
index f05ef87e934cb976f4eb9581f03927260cdd06d3..5a00a1e1c6ca680df5ac8e4dc952944abffa074b 100644 (file)
@@ -100,7 +100,7 @@ static int cns3xxx_ohci_probe(struct platform_device *pdev)
                goto err1;
        }
        hcd->rsrc_start = res->start;
-       hcd->rsrc_len = res->end - res->start + 1;
+       hcd->rsrc_len = resource_size(res);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
                        driver->description)) {
index d22fb4d577b775b9b2144796d4d57453bb98cda4..6aca2c4453f7aed7884e5b1e6520f6fffbeac753 100644 (file)
@@ -322,7 +322,7 @@ static int usb_hcd_da8xx_probe(const struct hc_driver *driver,
                goto err2;
        }
        hcd->rsrc_start = mem->start;
-       hcd->rsrc_len = mem->end - mem->start + 1;
+       hcd->rsrc_len = resource_size(mem);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
                dev_dbg(&pdev->dev, "request_mem_region failed\n");
index e4ddfaf8870f72bde4dac4d2b0e90f4094534b69..d8b45647d1dc5595353c8d055c856b98e6395db3 100644 (file)
@@ -135,7 +135,7 @@ static int ohci_octeon_drv_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        hcd->rsrc_start = res_mem->start;
-       hcd->rsrc_len = res_mem->end - res_mem->start + 1;
+       hcd->rsrc_len = resource_size(res_mem);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
                                OCTEON_OHCI_HCD_NAME)) {
index 1ca1821320f4116e4ec05a5d74d05eee27e68041..0c12f4e14dcd0b4877a6e50c6a3923b9661bfc13 100644 (file)
@@ -110,7 +110,7 @@ static int __devinit ohci_hcd_ppc_of_probe(struct platform_device *op)
                return -ENOMEM;
 
        hcd->rsrc_start = res.start;
-       hcd->rsrc_len = res.end - res.start + 1;
+       hcd->rsrc_len = resource_size(&res);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
                printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
index 89e670e38c106b79f8851563728280e5e442e744..c0f595c444874ddf1b1e5210fb33d14f91475afa 100644 (file)
@@ -56,7 +56,7 @@ static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver,
        if (!hcd)
                return -ENOMEM;
        hcd->rsrc_start = res->start;
-       hcd->rsrc_len = res->end - res->start + 1;
+       hcd->rsrc_len = resource_size(res);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
                pr_debug("%s: request_mem_region failed\n", __FILE__);
index d8eb3bdafabb9287a5d98a77c8ee96c0ea4df339..4204d9720d2331bb6e0b4d2f2e60e3ce42cdda1e 100644 (file)
@@ -131,7 +131,7 @@ int usb_hcd_sa1111_probe (const struct hc_driver *driver,
        if (!hcd)
                return -ENOMEM;
        hcd->rsrc_start = dev->res.start;
-       hcd->rsrc_len = dev->res.end - dev->res.start + 1;
+       hcd->rsrc_len = resource_size(&dev->res);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
                dbg("request_mem_region failed");
index 041d30f30c1045830f6db43de606c62390a497b5..78918ca0da238cce69525f42b01387ccaaf1f8dd 100644 (file)
@@ -103,8 +103,7 @@ static int ohci_hcd_sm501_drv_probe(struct platform_device *pdev)
                goto err0;
        }
 
-       if (!request_mem_region(mem->start, mem->end - mem->start + 1,
-                               pdev->name)) {
+       if (!request_mem_region(mem->start, resource_size(mem), pdev->name)) {
                dev_err(dev, "request_mem_region failed\n");
                retval = -EBUSY;
                goto err0;
@@ -126,7 +125,7 @@ static int ohci_hcd_sm501_drv_probe(struct platform_device *pdev)
 
        if (!dma_declare_coherent_memory(dev, mem->start,
                                         mem->start - mem->parent->start,
-                                        (mem->end - mem->start) + 1,
+                                        resource_size(mem),
                                         DMA_MEMORY_MAP |
                                         DMA_MEMORY_EXCLUSIVE)) {
                dev_err(dev, "cannot declare coherent memory\n");
@@ -149,7 +148,7 @@ static int ohci_hcd_sm501_drv_probe(struct platform_device *pdev)
        }
 
        hcd->rsrc_start = res->start;
-       hcd->rsrc_len = res->end - res->start + 1;
+       hcd->rsrc_len = resource_size(res);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, pdev->name)) {
                dev_err(dev, "request_mem_region failed\n");
@@ -185,7 +184,7 @@ err3:
 err2:
        dma_release_declared_memory(dev);
 err1:
-       release_mem_region(mem->start, mem->end - mem->start + 1);
+       release_mem_region(mem->start, resource_size(mem));
 err0:
        return retval;
 }
@@ -201,7 +200,7 @@ static int ohci_hcd_sm501_drv_remove(struct platform_device *pdev)
        dma_release_declared_memory(&pdev->dev);
        mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
        if (mem)
-               release_mem_region(mem->start, mem->end - mem->start + 1);
+               release_mem_region(mem->start, resource_size(mem));
 
        /* mask interrupts and disable power */
 
index 48ee6943bf35af8d463ee4d6f05254a3bbd1da79..c4aea3b8315e668eae752e7d8f1ac9ce6250c8f3 100644 (file)
@@ -2,7 +2,7 @@
  * Sonics Silicon Backplane
  * Broadcom USB-core OHCI driver
  *
- * Copyright 2007 Michael Buesch <mb@bu3sch.de>
+ * Copyright 2007 Michael Buesch <m@bues.ch>
  *
  * Derived from the OHCI-PCI driver
  * Copyright 1999 Roman Weissgaerber
index 3558491dd87d5eaae84df78fc15e0348382eaaf4..57ad1271fc9bec740bf57fe736bd86741d506d6d 100644 (file)
@@ -208,13 +208,13 @@ static int __devinit ohci_hcd_tmio_drv_probe(struct platform_device *dev)
        }
 
        hcd->rsrc_start = regs->start;
-       hcd->rsrc_len = regs->end - regs->start + 1;
+       hcd->rsrc_len = resource_size(regs);
 
        tmio = hcd_to_tmio(hcd);
 
        spin_lock_init(&tmio->lock);
 
-       tmio->ccr = ioremap(config->start, config->end - config->start + 1);
+       tmio->ccr = ioremap(config->start, resource_size(config));
        if (!tmio->ccr) {
                ret = -ENOMEM;
                goto err_ioremap_ccr;
@@ -228,7 +228,7 @@ static int __devinit ohci_hcd_tmio_drv_probe(struct platform_device *dev)
 
        if (!dma_declare_coherent_memory(&dev->dev, sram->start,
                                sram->start,
-                               sram->end - sram->start + 1,
+                               resource_size(sram),
                                DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE)) {
                ret = -EBUSY;
                goto err_dma_declare;
index 5fbe997dc6dfbf91989056ef93f29cc9dd72e571..dcd889803f0f2eb920582403c268868e4b00e50c 100644 (file)
@@ -3828,7 +3828,7 @@ static int oxu_drv_probe(struct platform_device *pdev)
                return -ENODEV;
        }
        memstart = res->start;
-       memlen = res->end - res->start + 1;
+       memlen = resource_size(res);
        dev_dbg(&pdev->dev, "MEM resource %lx-%lx\n", memstart, memlen);
        if (!request_mem_region(memstart, memlen,
                                oxu_hc_driver.description)) {
index d01c1e227681940c21cd7af480243d062b9ffa40..f7a62138e3e0d3bbdbdad19f130f4e489ce3fc08 100644 (file)
@@ -111,7 +111,7 @@ static int __devinit uhci_hcd_grlib_probe(struct platform_device *op)
                return -ENOMEM;
 
        hcd->rsrc_start = res.start;
-       hcd->rsrc_len = res.end - res.start + 1;
+       hcd->rsrc_len = resource_size(&res);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
                printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
index f7582e8e2169216c64e0f75ff6e67e037579f885..d3e13b640d4ba28493f27ca99fc26cfd3677981f 100644 (file)
@@ -178,7 +178,7 @@ void whc_clean_up(struct whc *whc)
        if (whc->qset_pool)
                dma_pool_destroy(whc->qset_pool);
 
-       len   = whc->umc->resource.end - whc->umc->resource.start + 1;
+       len   = resource_size(&whc->umc->resource);
        if (whc->base)
                iounmap(whc->base);
        if (whc->base_phys)
index b16bd3ce391539fdf3af9a7293df4903c5960204..2f41089cd854a7793dda2309d65e9dede81f21c0 100644 (file)
@@ -187,7 +187,7 @@ struct usb_ftdi {
         u32 controlreg;
         u8 response[4 + 1024];
         int expected;
-        int recieved;
+        int received;
         int ed_found;
 };
 #define kref_to_usb_ftdi(d) container_of(d, struct usb_ftdi, kref)
@@ -353,7 +353,7 @@ static void ftdi_elan_abandon_targets(struct usb_ftdi *ftdi)
                         mutex_lock(&ftdi->u132_lock);
                 }
         }
-        ftdi->recieved = 0;
+        ftdi->received = 0;
         ftdi->expected = 4;
         ftdi->ed_found = 0;
         mutex_unlock(&ftdi->u132_lock);
@@ -411,7 +411,7 @@ static void ftdi_elan_flush_targets(struct usb_ftdi *ftdi)
                         }
                 }
         }
-        ftdi->recieved = 0;
+        ftdi->received = 0;
         ftdi->expected = 4;
         ftdi->ed_found = 0;
         mutex_unlock(&ftdi->u132_lock);
@@ -447,7 +447,7 @@ static void ftdi_elan_cancel_targets(struct usb_ftdi *ftdi)
                         }
                 }
         }
-        ftdi->recieved = 0;
+        ftdi->received = 0;
         ftdi->expected = 4;
         ftdi->ed_found = 0;
         mutex_unlock(&ftdi->u132_lock);
@@ -874,7 +874,7 @@ static char *have_ed_set_response(struct usb_ftdi *ftdi,
                         mutex_unlock(&ftdi->u132_lock);
                         ftdi_elan_do_callback(ftdi, target, 4 + ftdi->response,
                                 payload);
-                        ftdi->recieved = 0;
+                        ftdi->received = 0;
                         ftdi->expected = 4;
                         ftdi->ed_found = 0;
                         return ftdi->response;
@@ -890,7 +890,7 @@ static char *have_ed_set_response(struct usb_ftdi *ftdi,
                         mutex_unlock(&ftdi->u132_lock);
                         ftdi_elan_do_callback(ftdi, target, 4 + ftdi->response,
                                 payload);
-                        ftdi->recieved = 0;
+                        ftdi->received = 0;
                         ftdi->expected = 4;
                         ftdi->ed_found = 0;
                         return ftdi->response;
@@ -905,7 +905,7 @@ static char *have_ed_set_response(struct usb_ftdi *ftdi,
                 mutex_unlock(&ftdi->u132_lock);
                 ftdi_elan_do_callback(ftdi, target, 4 + ftdi->response,
                         payload);
-                ftdi->recieved = 0;
+                ftdi->received = 0;
                 ftdi->expected = 4;
                 ftdi->ed_found = 0;
                 return ftdi->response;
@@ -914,7 +914,7 @@ static char *have_ed_set_response(struct usb_ftdi *ftdi,
                 mutex_unlock(&ftdi->u132_lock);
                 ftdi_elan_do_callback(ftdi, target, 4 + ftdi->response,
                         payload);
-                ftdi->recieved = 0;
+                ftdi->received = 0;
                 ftdi->expected = 4;
                 ftdi->ed_found = 0;
                 return ftdi->response;
@@ -934,7 +934,7 @@ static char *have_ed_get_response(struct usb_ftdi *ftdi,
         if (target->active)
                 ftdi_elan_do_callback(ftdi, target, NULL, 0);
         target->abandoning = 0;
-        ftdi->recieved = 0;
+        ftdi->received = 0;
         ftdi->expected = 4;
         ftdi->ed_found = 0;
         return ftdi->response;
@@ -951,7 +951,7 @@ static char *have_ed_get_response(struct usb_ftdi *ftdi,
 */
 static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi)
 {
-        u8 *b = ftdi->response + ftdi->recieved;
+        u8 *b = ftdi->response + ftdi->received;
         int bytes_read = 0;
         int retry_on_empty = 1;
         int retry_on_timeout = 3;
@@ -1043,11 +1043,11 @@ static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi)
                 u8 c = ftdi->bulk_in_buffer[++ftdi->bulk_in_last];
                 bytes_read += 1;
                 ftdi->bulk_in_left -= 1;
-                if (ftdi->recieved == 0 && c == 0xFF) {
+                if (ftdi->received == 0 && c == 0xFF) {
                         goto have;
                 } else
                         *b++ = c;
-                if (++ftdi->recieved < ftdi->expected) {
+                if (++ftdi->received < ftdi->expected) {
                         goto have;
                 } else if (ftdi->ed_found) {
                         int ed_number = (ftdi->response[0] >> 5) & 0x03;
@@ -1069,7 +1069,7 @@ static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi)
                         }
                         ftdi_elan_do_callback(ftdi, target, 4 + ftdi->response,
                                 payload);
-                        ftdi->recieved = 0;
+                        ftdi->received = 0;
                         ftdi->expected = 4;
                         ftdi->ed_found = 0;
                         b = ftdi->response;
@@ -1089,7 +1089,7 @@ static int ftdi_elan_respond_engine(struct usb_ftdi *ftdi)
                         *respond->value = data;
                         *respond->result = 0;
                         complete(&respond->wait_completion);
-                        ftdi->recieved = 0;
+                        ftdi->received = 0;
                         ftdi->expected = 4;
                         ftdi->ed_found = 0;
                         b = ftdi->response;
index c71b0372786e00482bf2f9fadf4bf6293721d27f..bcbd1aba961a4b243fad9408d93f38208f5a04d4 100644 (file)
@@ -1955,7 +1955,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
         *   - initializes musb->xceiv, usually by otg_get_transceiver()
         *   - stops powering VBUS
         *
-        * There are various transciever configurations.  Blackfin,
+        * There are various transceiver configurations.  Blackfin,
         * DaVinci, TUSB60x0, and others integrate them.  OMAP3 uses
         * external/discrete ones in various flavors (twl4030 family,
         * isp1504, non-OTG, etc) mostly hooking up through ULPI.
index 8c282258e1bd8053625d13548fa0d0c4b853e1b7..ca9b690a7e402309a7f9eb58a39a5289625c10c0 100644 (file)
@@ -660,7 +660,7 @@ static irqreturn_t omap_otg_irq(int irq, void *_isp)
        int             ret = IRQ_NONE;
        struct isp1301  *isp = _isp;
 
-       /* update ISP1301 transciever from OTG controller */
+       /* update ISP1301 transceiver from OTG controller */
        if (otg_irq & OPRT_CHG) {
                omap_writew(OPRT_CHG, OTG_IRQ_SRC);
                isp1301_defer_work(isp, WORK_UPDATE_ISP);
@@ -755,7 +755,7 @@ static irqreturn_t omap_otg_irq(int irq, void *_isp)
                omap_writew(A_VBUS_ERR, OTG_IRQ_SRC);
                ret = IRQ_HANDLED;
 
-       /* switch driver; the transciever code activates it,
+       /* switch driver; the transceiver code activates it,
         * ungating the udc clock or resuming OHCI.
         */
        } else if (otg_irq & DRIVER_SWITCH) {
index b0cc422f2ff9dca0c1feae364c48c9df581c3087..09117387d2a49baa3454932787e0d615cc501313 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/usb.h>
 #include <linux/usb/gadget.h>
 #include <linux/usb/otg.h>
-#include <linux/types.h>
 
 #include "otg_fsm.h"
 
index efeb4d1517ff12cfda0493362c93941eec622938..14f66c35862938adc5817c123233521c9ca1f925 100644 (file)
@@ -166,7 +166,7 @@ struct twl4030_usb {
 };
 
 /* internal define on top of container_of */
-#define xceiv_to_twl(x)                container_of((x), struct twl4030_usb, otg);
+#define xceiv_to_twl(x)                container_of((x), struct twl4030_usb, otg)
 
 /*-------------------------------------------------------------------------*/
 
index 001c8b4020a84c7073f2fc99489bf9047571e086..bdcb13cc1d541312cd62b2320964e3fe22fb6635 100644 (file)
@@ -256,7 +256,7 @@ static void uwbd_event_handle(struct uwb_event *evt)
  * UWB Daemon
  *
  * Listens to all UWB notifications and takes care to track the state
- * of the UWB neighboorhood for the kernel. When we do a run, we
+ * of the UWB neighbourhood for the kernel. When we do a run, we
  * spinlock, move the list to a private copy and release the
  * lock. Hold it as little as possible. Not a conflict: it is
  * guaranteed we own the events in the private list.
index 70a004aa19db64edfb69c3f20018ef008c556c0e..3ae3c702500d65a7b7c9b456ac34488085d0d715 100644 (file)
@@ -222,7 +222,7 @@ int whcrc_setup_rc_umc(struct whcrc *whcrc)
        struct umc_dev *umc_dev = whcrc->umc_dev;
 
        whcrc->area = umc_dev->resource.start;
-       whcrc->rc_len = umc_dev->resource.end - umc_dev->resource.start + 1;
+       whcrc->rc_len = resource_size(&umc_dev->resource);
        result = -EBUSY;
        if (request_mem_region(whcrc->area, whcrc->rc_len, KBUILD_MODNAME) == NULL) {
                dev_err(dev, "can't request URC region (%zu bytes @ 0x%lx): %d\n",
index 4484c721f0f9b1ce6a160b5d7e450d0245b2e772..817ab60f7537266d5f63e2e3ef9bbeb1b108bac5 100644 (file)
@@ -906,7 +906,7 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
        if (map) {
                /* use a pre-allocated memory buffer */
                info->fix.smem_start = map->start;
-               info->fix.smem_len = map->end - map->start + 1;
+               info->fix.smem_len = resource_size(map);
                if (!request_mem_region(info->fix.smem_start,
                                        info->fix.smem_len, pdev->name)) {
                        ret = -EBUSY;
@@ -932,7 +932,7 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
 
        /* LCDC registers */
        info->fix.mmio_start = regs->start;
-       info->fix.mmio_len = regs->end - regs->start + 1;
+       info->fix.mmio_len = resource_size(regs);
 
        if (!request_mem_region(info->fix.mmio_start,
                                info->fix.mmio_len, pdev->name)) {
index d7aaec5667bfd6ca1e1407e52c8c503577339405..44bdce4242ad0a8d48e09ae6c1b94481fb602de5 100644 (file)
@@ -3458,9 +3458,10 @@ static int __devinit atyfb_setup_generic(struct pci_dev *pdev,
 
        raddr = addr + 0x7ff000UL;
        rrp = &pdev->resource[2];
-       if ((rrp->flags & IORESOURCE_MEM) && request_mem_region(rrp->start, rrp->end - rrp->start + 1, "atyfb")) {
+       if ((rrp->flags & IORESOURCE_MEM) &&
+           request_mem_region(rrp->start, resource_size(rrp), "atyfb")) {
                par->aux_start = rrp->start;
-               par->aux_size = rrp->end - rrp->start + 1;
+               par->aux_size = resource_size(rrp);
                raddr = rrp->start;
                PRINTKI("using auxiliary register aperture\n");
        }
@@ -3550,7 +3551,7 @@ static int __devinit atyfb_pci_probe(struct pci_dev *pdev,
 
        /* Reserve space */
        res_start = rp->start;
-       res_size = rp->end - rp->start + 1;
+       res_size = resource_size(rp);
        if (!request_mem_region(res_start, res_size, "atyfb"))
                return -EBUSY;
 
index 34b2fc472fe8c917d08738b620aac63b49ea9914..01a8fde67f20ab906b55ef2739159c430f905e55 100644 (file)
@@ -486,7 +486,7 @@ static int __devinit au1100fb_drv_probe(struct platform_device *dev)
        }
 
        au1100fb_fix.mmio_start = regs_res->start;
-       au1100fb_fix.mmio_len = regs_res->end - regs_res->start + 1;
+       au1100fb_fix.mmio_len = resource_size(regs_res);
 
        if (!request_mem_region(au1100fb_fix.mmio_start, au1100fb_fix.mmio_len,
                                DRIVER_NAME)) {
index 42fe155aba0e348a409c2aa002735fc382563e53..e02764319ff77e3590b04ec0297651b5672e6258 100644 (file)
@@ -303,7 +303,7 @@ static int __devinit cobalt_lcdfb_probe(struct platform_device *dev)
                return -EBUSY;
        }
 
-       info->screen_size = res->end - res->start + 1;
+       info->screen_size = resource_size(res);
        info->screen_base = ioremap(res->start, info->screen_size);
        info->fbops = &cobalt_lcd_fbops;
        info->fix = cobalt_lcdfb_fix;
index c225dcce89e78f083f0e02c60b3064b29d001748..9075bea55879fc9c3eb507dc9e7e2a4c707111e1 100644 (file)
@@ -709,11 +709,11 @@ static int __init control_of_init(struct device_node *dp)
 
        /* Map in frame buffer and registers */
        p->fb_orig_base = fb_res.start;
-       p->fb_orig_size = fb_res.end - fb_res.start + 1;
+       p->fb_orig_size = resource_size(&fb_res);
        /* use the big-endian aperture (??) */
        p->frame_buffer_phys = fb_res.start + 0x800000;
        p->control_regs_phys = reg_res.start;
-       p->control_regs_size = reg_res.end - reg_res.start + 1;
+       p->control_regs_size = resource_size(&reg_res);
 
        if (!p->fb_orig_base ||
            !request_mem_region(p->fb_orig_base,p->fb_orig_size,"controlfb")) {
index cbdb1bd77c2103b284f07cddcee95178d48a0b10..40e5f17d1e4bda1ccdb59ac156a8b02b41d91cbd 100644 (file)
@@ -4,7 +4,7 @@
  * Framebuffer support for the EP93xx series.
  *
  * Copyright (C) 2007 Bluewater Systems Ltd
- * Author: Ryan Mallon <ryan@bluewatersys.com>
+ * Author: Ryan Mallon
  *
  * Copyright (c) 2009 H Hartley Sweeten <hsweeten@visionengravers.com>
  *
@@ -644,6 +644,6 @@ module_exit(ep93xxfb_exit);
 
 MODULE_DESCRIPTION("EP93XX Framebuffer Driver");
 MODULE_ALIAS("platform:ep93xx-fb");
-MODULE_AUTHOR("Ryan Mallon <ryan&bluewatersys.com>, "
+MODULE_AUTHOR("Ryan Mallon, "
              "H Hartley Sweeten <hsweeten@visionengravers.com");
 MODULE_LICENSE("GPL");
index f37de60ecc5961856015fd729fa4d731d703790f..1414b73ac55b67f0ffbdde5da0f8923572252169 100644 (file)
 #define DRAM_ON                     0x08            
 #define DRAM_OFF                    0xE7
 #define PG_ENABLE_MASK              0x01
-#define RING_SIZE_MASK              (RINGBUFFER_SIZE - 1);
+#define RING_SIZE_MASK              (RINGBUFFER_SIZE - 1)
 
 /* defines for restoring registers partially */
 #define ADDR_MAP_MASK               (0x07 << 5)
index f70bd63b01871223d74a2930bdd4823c27a120d7..ee1de3e26dece9a80f152478ffa642cfef00beae 100644 (file)
@@ -697,7 +697,7 @@ static int __devinit of_platform_mb862xx_probe(struct platform_device *ofdev)
                goto fbrel;
        }
 
-       res_size = 1 + res.end - res.start;
+       res_size = resource_size(&res);
        par->res = request_mem_region(res.start, res_size, DRV_NAME);
        if (par->res == NULL) {
                dev_err(dev, "Cannot claim framebuffer/mmio\n");
@@ -787,7 +787,7 @@ static int __devexit of_platform_mb862xx_remove(struct platform_device *ofdev)
 {
        struct fb_info *fbi = dev_get_drvdata(&ofdev->dev);
        struct mb862xxfb_par *par = fbi->par;
-       resource_size_t res_size = 1 + par->res->end - par->res->start;
+       resource_size_t res_size = resource_size(par->res);
        unsigned long reg;
 
        dev_dbg(fbi->dev, "%s release\n", fbi->fix.id);
index c3636d55a3c5aa1b39cd15accc9e6c7454d5224a..243d16f09b8a2cbbfc6f5604f1775ec97cf91d72 100644 (file)
@@ -406,8 +406,7 @@ int mdp_probe(struct platform_device *pdev)
                goto error_get_irq;
        }
 
-       mdp->base = ioremap(resource->start,
-                           resource->end - resource->start);
+       mdp->base = ioremap(resource->start, resource_size(resource));
        if (mdp->base == 0) {
                printk(KERN_ERR "msmfb: cannot allocate mdp regs!\n");
                ret = -ENOMEM;
index ec351309e60739c1969102614b6d55a46d95d837..c6e3b4fcdd683b52eaebc7da3afd49bd24497590 100644 (file)
@@ -525,10 +525,9 @@ static int setup_fbmem(struct msmfb_info *msmfb, struct platform_device *pdev)
                return -ENOMEM;
        }
        fb->fix.smem_start = resource->start;
-       fb->fix.smem_len = resource->end - resource->start;
-       fbram = ioremap(resource->start,
-                       resource->end - resource->start);
-       if (fbram == 0) {
+       fb->fix.smem_len = resource_size(resource);
+       fbram = ioremap(resource->start, resource_size(resource));
+       if (fbram == NULL) {
                printk(KERN_ERR "msmfb: cannot allocate fbram!\n");
                return -ENOMEM;
        }
index f838d9e277f05e4fb5c9ee724d1f028a560e07a2..0fff59782e45936cd86b481c4dff09326d94e5a5 100644 (file)
@@ -551,7 +551,7 @@ static int __devinit nuc900fb_probe(struct platform_device *pdev)
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 
-       size = (res->end - res->start) + 1;
+       size = resource_size(res);
        fbi->mem = request_mem_region(res->start, size, pdev->name);
        if (fbi->mem == NULL) {
                dev_err(&pdev->dev, "failed to alloc memory region\n");
index ef532d9d3c99d9376e8c5c260eda261f46c203c5..f27ae16ead2ea1671e782821a1f6836140120ee7 100644 (file)
@@ -567,7 +567,7 @@ static int __devinit platinumfb_probe(struct platform_device* odev)
         * northbridge and that can fail. Only request framebuffer
         */
        if (!request_mem_region(pinfo->rsrc_fb.start,
-                               pinfo->rsrc_fb.end - pinfo->rsrc_fb.start + 1,
+                               resource_size(&pinfo->rsrc_fb),
                                "platinumfb framebuffer")) {
                printk(KERN_ERR "platinumfb: Can't request framebuffer !\n");
                framebuffer_release(info);
@@ -658,8 +658,7 @@ static int __devexit platinumfb_remove(struct platform_device* odev)
        iounmap(pinfo->cmap_regs);
 
        release_mem_region(pinfo->rsrc_fb.start,
-                          pinfo->rsrc_fb.end -
-                          pinfo->rsrc_fb.start + 1);
+                          resource_size(&pinfo->rsrc_fb));
 
        release_mem_region(pinfo->cmap_regs_phys, 0x1000);
 
index bb95ec56d25d9943aef4150595c0f190c9bb0cbc..18ead6f0184d136dcfc884e21db207748e18a0ef 100644 (file)
@@ -662,7 +662,7 @@ static int __devinit pxa168fb_probe(struct platform_device *pdev)
        info->fix.ypanstep = 0;
        info->fix.ywrapstep = 0;
        info->fix.mmio_start = res->start;
-       info->fix.mmio_len = res->end - res->start + 1;
+       info->fix.mmio_len = resource_size(res);
        info->fix.accel = FB_ACCEL_NONE;
        info->fbops = &pxa168fb_ops;
        info->pseudo_palette = fbi->pseudo_palette;
index 816a4fda04f5b9c0637721054a5c7aba1a456932..087fc9960bb9bbb2d1b60136631f815dd2325685 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/slab.h>
 #include <linux/prefetch.h>
 #include <linux/delay.h>
-#include <linux/prefetch.h>
 #include <video/udlfb.h>
 #include "edid.h"
 
index cf43c80d27f6e47659d3add9aac2c22c2bc02e36..53aa4430d86ea74cb525a1adc37484ee60c07b07 100644 (file)
@@ -2016,7 +2016,7 @@ static int __init viafb_setup(void)
 int __init viafb_init(void)
 {
        u32 dummy_x, dummy_y;
-       int r;
+       int r = 0;
 
        if (machine_is_olpc())
                /* Apply XO-1.5-specific configuration. */
@@ -2039,7 +2039,7 @@ int __init viafb_init(void)
        printk(KERN_INFO
        "VIA Graphics Integration Chipset framebuffer %d.%d initializing\n",
               VERSION_MAJOR, VERSION_MINOR);
-       return 0;
+       return r;
 }
 
 void __exit viafb_exit(void)
index e98f56d3787dff9f68bbd80772f8690f903ee114..814be079c185277e5fde8f186cd1d2611e32e73d 100644 (file)
@@ -96,14 +96,11 @@ static struct posix_acl *v9fs_get_cached_acl(struct inode *inode, int type)
        return acl;
 }
 
-int v9fs_check_acl(struct inode *inode, int mask)
+struct posix_acl *v9fs_iop_get_acl(struct inode *inode, int type)
 {
        struct posix_acl *acl;
        struct v9fs_session_info *v9ses;
 
-       if (mask & MAY_NOT_BLOCK)
-               return -ECHILD;
-
        v9ses = v9fs_inode2v9ses(inode);
        if (((v9ses->flags & V9FS_ACCESS_MASK) != V9FS_ACCESS_CLIENT) ||
                        ((v9ses->flags & V9FS_ACL_MASK) != V9FS_POSIX_ACL)) {
@@ -111,18 +108,10 @@ int v9fs_check_acl(struct inode *inode, int mask)
                 * On access = client  and acl = on mode get the acl
                 * values from the server
                 */
-               return 0;
+               return NULL;
        }
-       acl = v9fs_get_cached_acl(inode, ACL_TYPE_ACCESS);
+       return v9fs_get_cached_acl(inode, type);
 
-       if (IS_ERR(acl))
-               return PTR_ERR(acl);
-       if (acl) {
-               int error = posix_acl_permission(inode, acl, mask);
-               posix_acl_release(acl);
-               return error;
-       }
-       return -EAGAIN;
 }
 
 static int v9fs_set_acl(struct dentry *dentry, int type, struct posix_acl *acl)
@@ -165,32 +154,32 @@ err_free_out:
 int v9fs_acl_chmod(struct dentry *dentry)
 {
        int retval = 0;
-       struct posix_acl *acl, *clone;
+       struct posix_acl *acl;
        struct inode *inode = dentry->d_inode;
 
        if (S_ISLNK(inode->i_mode))
                return -EOPNOTSUPP;
        acl = v9fs_get_cached_acl(inode, ACL_TYPE_ACCESS);
        if (acl) {
-               clone = posix_acl_clone(acl, GFP_KERNEL);
+               retval = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
+               if (retval)
+                       return retval;
+               retval = v9fs_set_acl(dentry, ACL_TYPE_ACCESS, acl);
                posix_acl_release(acl);
-               if (!clone)
-                       return -ENOMEM;
-               retval = posix_acl_chmod_masq(clone, inode->i_mode);
-               if (!retval)
-                       retval = v9fs_set_acl(dentry, ACL_TYPE_ACCESS, clone);
-               posix_acl_release(clone);
        }
        return retval;
 }
 
 int v9fs_set_create_acl(struct dentry *dentry,
-                       struct posix_acl *dpacl, struct posix_acl *pacl)
+                       struct posix_acl **dpacl, struct posix_acl **pacl)
 {
-       v9fs_set_acl(dentry, ACL_TYPE_DEFAULT, dpacl);
-       v9fs_set_acl(dentry, ACL_TYPE_ACCESS, pacl);
-       posix_acl_release(dpacl);
-       posix_acl_release(pacl);
+       if (dentry) {
+               v9fs_set_acl(dentry, ACL_TYPE_DEFAULT, *dpacl);
+               v9fs_set_acl(dentry, ACL_TYPE_ACCESS, *pacl);
+       }
+       posix_acl_release(*dpacl);
+       posix_acl_release(*pacl);
+       *dpacl = *pacl = NULL;
        return 0;
 }
 
@@ -209,29 +198,18 @@ int v9fs_acl_mode(struct inode *dir, mode_t *modep,
                        mode &= ~current_umask();
        }
        if (acl) {
-               struct posix_acl *clone;
-
                if (S_ISDIR(mode))
-                       *dpacl = acl;
-               clone = posix_acl_clone(acl, GFP_NOFS);
-               retval = -ENOMEM;
-               if (!clone)
-                       goto cleanup;
-
-               retval = posix_acl_create_masq(clone, &mode);
-               if (retval < 0) {
-                       posix_acl_release(clone);
-                       goto cleanup;
-               }
+                       *dpacl = posix_acl_dup(acl);
+               retval = posix_acl_create(&acl, GFP_NOFS, &mode);
+               if (retval < 0)
+                       return retval;
                if (retval > 0)
-                       *pacl = clone;
+                       *pacl = acl;
+               else
+                       posix_acl_release(acl);
        }
        *modep  = mode;
        return 0;
-cleanup:
-       posix_acl_release(acl);
-       return retval;
-
 }
 
 static int v9fs_remote_get_acl(struct dentry *dentry, const char *name,
index 59e18c2e8c7e6ba3b7e1fd4386155bad519adc9e..ddb7ae19d9718933398fad6d18ac11bcc15c116c 100644 (file)
 
 #ifdef CONFIG_9P_FS_POSIX_ACL
 extern int v9fs_get_acl(struct inode *, struct p9_fid *);
-extern int v9fs_check_acl(struct inode *inode, int mask);
+extern struct posix_acl *v9fs_iop_get_acl(struct inode *inode, int type);
 extern int v9fs_acl_chmod(struct dentry *);
 extern int v9fs_set_create_acl(struct dentry *,
-                              struct posix_acl *, struct posix_acl *);
+                              struct posix_acl **, struct posix_acl **);
 extern int v9fs_acl_mode(struct inode *dir, mode_t *modep,
                         struct posix_acl **dpacl, struct posix_acl **pacl);
 #else
-#define v9fs_check_acl NULL
+#define v9fs_iop_get_acl NULL
 static inline int v9fs_get_acl(struct inode *inode, struct p9_fid *fid)
 {
        return 0;
@@ -33,8 +33,8 @@ static inline int v9fs_acl_chmod(struct dentry *dentry)
        return 0;
 }
 static inline int v9fs_set_create_acl(struct dentry *dentry,
-                                     struct posix_acl *dpacl,
-                                     struct posix_acl *pacl)
+                                     struct posix_acl **dpacl,
+                                     struct posix_acl **pacl)
 {
        return 0;
 }
index 276f4a69ecd459e029f665c6acf0959d536009c1..9a26dce5a99f023e9d2d53b95dd8fb5286cf30b0 100644 (file)
@@ -287,7 +287,7 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode,
                goto error;
 
        /* Now set the ACL based on the default value */
-       v9fs_set_create_acl(dentry, dacl, pacl);
+       v9fs_set_create_acl(dentry, &dacl, &pacl);
 
        v9inode = V9FS_I(inode);
        mutex_lock(&v9inode->v_mutex);
@@ -328,6 +328,7 @@ error:
 err_clunk_old_fid:
        if (ofid)
                p9_client_clunk(ofid);
+       v9fs_set_create_acl(NULL, &dacl, &pacl);
        return err;
 }
 
@@ -421,12 +422,13 @@ static int v9fs_vfs_mkdir_dotl(struct inode *dir,
                d_instantiate(dentry, inode);
        }
        /* Now set the ACL based on the default value */
-       v9fs_set_create_acl(dentry, dacl, pacl);
+       v9fs_set_create_acl(dentry, &dacl, &pacl);
        inc_nlink(dir);
        v9fs_invalidate_inode_attr(dir);
 error:
        if (fid)
                p9_client_clunk(fid);
+       v9fs_set_create_acl(NULL, &dacl, &pacl);
        return err;
 }
 
@@ -826,10 +828,11 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, int omode,
                d_instantiate(dentry, inode);
        }
        /* Now set the ACL based on the default value */
-       v9fs_set_create_acl(dentry, dacl, pacl);
+       v9fs_set_create_acl(dentry, &dacl, &pacl);
 error:
        if (fid)
                p9_client_clunk(fid);
+       v9fs_set_create_acl(NULL, &dacl, &pacl);
        return err;
 }
 
@@ -914,7 +917,7 @@ const struct inode_operations v9fs_dir_inode_operations_dotl = {
        .getxattr = generic_getxattr,
        .removexattr = generic_removexattr,
        .listxattr = v9fs_listxattr,
-       .check_acl = v9fs_check_acl,
+       .get_acl = v9fs_iop_get_acl,
 };
 
 const struct inode_operations v9fs_file_inode_operations_dotl = {
@@ -924,7 +927,7 @@ const struct inode_operations v9fs_file_inode_operations_dotl = {
        .getxattr = generic_getxattr,
        .removexattr = generic_removexattr,
        .listxattr = v9fs_listxattr,
-       .check_acl = v9fs_check_acl,
+       .get_acl = v9fs_iop_get_acl,
 };
 
 const struct inode_operations v9fs_symlink_inode_operations_dotl = {
index c5567cb784325a7fa6f745c63e473edea592c4fb..4d433d34736f2e45784142012e1969f712443c93 100644 (file)
@@ -233,7 +233,7 @@ static int __init anon_inode_init(void)
        return 0;
 
 err_mntput:
-       mntput(anon_inode_mnt);
+       kern_unmount(anon_inode_mnt);
 err_unregister_filesystem:
        unregister_filesystem(&anon_inode_fs_type);
 err_exit:
index 9fb0b15331d3f1b941d7de553b544e437d42210d..c62fb84944d51a18570b960a1b603f80b72d1afb 100644 (file)
@@ -1448,6 +1448,8 @@ static int __blkdev_put(struct block_device *bdev, fmode_t mode, int for_part)
 
 int blkdev_put(struct block_device *bdev, fmode_t mode)
 {
+       mutex_lock(&bdev->bd_mutex);
+
        if (mode & FMODE_EXCL) {
                bool bdev_free;
 
@@ -1456,7 +1458,6 @@ int blkdev_put(struct block_device *bdev, fmode_t mode)
                 * are protected with bdev_lock.  bd_mutex is to
                 * synchronize disk_holder unlinking.
                 */
-               mutex_lock(&bdev->bd_mutex);
                spin_lock(&bdev_lock);
 
                WARN_ON_ONCE(--bdev->bd_holders < 0);
@@ -1474,17 +1475,21 @@ int blkdev_put(struct block_device *bdev, fmode_t mode)
                 * If this was the last claim, remove holder link and
                 * unblock evpoll if it was a write holder.
                 */
-               if (bdev_free) {
-                       if (bdev->bd_write_holder) {
-                               disk_unblock_events(bdev->bd_disk);
-                               disk_check_events(bdev->bd_disk);
-                               bdev->bd_write_holder = false;
-                       }
+               if (bdev_free && bdev->bd_write_holder) {
+                       disk_unblock_events(bdev->bd_disk);
+                       bdev->bd_write_holder = false;
                }
-
-               mutex_unlock(&bdev->bd_mutex);
        }
 
+       /*
+        * Trigger event checking and tell drivers to flush MEDIA_CHANGE
+        * event.  This is to ensure detection of media removal commanded
+        * from userland - e.g. eject(1).
+        */
+       disk_flush_events(bdev->bd_disk, DISK_EVENT_MEDIA_CHANGE);
+
+       mutex_unlock(&bdev->bd_mutex);
+
        return __blkdev_put(bdev, mode, 0);
 }
 EXPORT_SYMBOL(blkdev_put);
index 9f62ab2a7282ed49aeacc560ef8586b09ce37b24..65a735d8f6e44443c6044d6b71a59e5acf91f546 100644 (file)
@@ -30,7 +30,7 @@
 
 #ifdef CONFIG_BTRFS_FS_POSIX_ACL
 
-static struct posix_acl *btrfs_get_acl(struct inode *inode, int type)
+struct posix_acl *btrfs_get_acl(struct inode *inode, int type)
 {
        int size;
        const char *name;
@@ -195,27 +195,6 @@ out:
        return ret;
 }
 
-int btrfs_check_acl(struct inode *inode, int mask)
-{
-       int error = -EAGAIN;
-
-       if (mask & MAY_NOT_BLOCK) {
-               if (!negative_cached_acl(inode, ACL_TYPE_ACCESS))
-                       error = -ECHILD;
-       } else {
-               struct posix_acl *acl;
-               acl = btrfs_get_acl(inode, ACL_TYPE_ACCESS);
-               if (IS_ERR(acl))
-                       return PTR_ERR(acl);
-               if (acl) {
-                       error = posix_acl_permission(inode, acl, mask);
-                       posix_acl_release(acl);
-               }
-       }
-
-       return error;
-}
-
 /*
  * btrfs_init_acl is already generally called under fs_mutex, so the locking
  * stuff has been fixed to work with that.  If the locking stuff changes, we
@@ -243,8 +222,7 @@ int btrfs_init_acl(struct btrfs_trans_handle *trans,
        }
 
        if (IS_POSIXACL(dir) && acl) {
-               struct posix_acl *clone;
-               mode_t mode;
+               mode_t mode = inode->i_mode;
 
                if (S_ISDIR(inode->i_mode)) {
                        ret = btrfs_set_acl(trans, inode, acl,
@@ -252,22 +230,15 @@ int btrfs_init_acl(struct btrfs_trans_handle *trans,
                        if (ret)
                                goto failed;
                }
-               clone = posix_acl_clone(acl, GFP_NOFS);
-               ret = -ENOMEM;
-               if (!clone)
-                       goto failed;
+               ret = posix_acl_create(&acl, GFP_NOFS, &mode);
+               if (ret < 0)
+                       return ret;
 
-               mode = inode->i_mode;
-               ret = posix_acl_create_masq(clone, &mode);
-               if (ret >= 0) {
-                       inode->i_mode = mode;
-                       if (ret > 0) {
-                               /* we need an acl */
-                               ret = btrfs_set_acl(trans, inode, clone,
-                                                   ACL_TYPE_ACCESS);
-                       }
+               inode->i_mode = mode;
+               if (ret > 0) {
+                       /* we need an acl */
+                       ret = btrfs_set_acl(trans, inode, acl, ACL_TYPE_ACCESS);
                }
-               posix_acl_release(clone);
        }
 failed:
        posix_acl_release(acl);
@@ -277,7 +248,7 @@ failed:
 
 int btrfs_acl_chmod(struct inode *inode)
 {
-       struct posix_acl *acl, *clone;
+       struct posix_acl *acl;
        int ret = 0;
 
        if (S_ISLNK(inode->i_mode))
@@ -290,17 +261,11 @@ int btrfs_acl_chmod(struct inode *inode)
        if (IS_ERR_OR_NULL(acl))
                return PTR_ERR(acl);
 
-       clone = posix_acl_clone(acl, GFP_KERNEL);
+       ret = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
+       if (ret)
+               return ret;
+       ret = btrfs_set_acl(NULL, inode, acl, ACL_TYPE_ACCESS);
        posix_acl_release(acl);
-       if (!clone)
-               return -ENOMEM;
-
-       ret = posix_acl_chmod_masq(clone, inode->i_mode);
-       if (!ret)
-               ret = btrfs_set_acl(NULL, inode, clone, ACL_TYPE_ACCESS);
-
-       posix_acl_release(clone);
-
        return ret;
 }
 
index 82be74efbb26dd833a8a0b32bbf108ecfc63baca..fe9287b064969d503e0e2c44f8c7446a8767ce9b 100644 (file)
@@ -2645,9 +2645,9 @@ do {                                                              \
 
 /* acl.c */
 #ifdef CONFIG_BTRFS_FS_POSIX_ACL
-int btrfs_check_acl(struct inode *inode, int mask);
+struct posix_acl *btrfs_get_acl(struct inode *inode, int type);
 #else
-#define btrfs_check_acl NULL
+#define btrfs_get_acl NULL
 #endif
 int btrfs_init_acl(struct btrfs_trans_handle *trans,
                   struct inode *inode, struct inode *dir);
index 2548a04a0230c0f515bb45f71f1e3357727a7616..e91b097e7252a911dcaa61eed0188bfeae500d2a 100644 (file)
@@ -7351,12 +7351,12 @@ static const struct inode_operations btrfs_dir_inode_operations = {
        .listxattr      = btrfs_listxattr,
        .removexattr    = btrfs_removexattr,
        .permission     = btrfs_permission,
-       .check_acl      = btrfs_check_acl,
+       .get_acl        = btrfs_get_acl,
 };
 static const struct inode_operations btrfs_dir_ro_inode_operations = {
        .lookup         = btrfs_lookup,
        .permission     = btrfs_permission,
-       .check_acl      = btrfs_check_acl,
+       .get_acl        = btrfs_get_acl,
 };
 
 static const struct file_operations btrfs_dir_file_operations = {
@@ -7425,7 +7425,7 @@ static const struct inode_operations btrfs_file_inode_operations = {
        .removexattr    = btrfs_removexattr,
        .permission     = btrfs_permission,
        .fiemap         = btrfs_fiemap,
-       .check_acl      = btrfs_check_acl,
+       .get_acl        = btrfs_get_acl,
 };
 static const struct inode_operations btrfs_special_inode_operations = {
        .getattr        = btrfs_getattr,
@@ -7435,7 +7435,7 @@ static const struct inode_operations btrfs_special_inode_operations = {
        .getxattr       = btrfs_getxattr,
        .listxattr      = btrfs_listxattr,
        .removexattr    = btrfs_removexattr,
-       .check_acl      = btrfs_check_acl,
+       .get_acl        = btrfs_get_acl,
 };
 static const struct inode_operations btrfs_symlink_inode_operations = {
        .readlink       = generic_readlink,
@@ -7447,7 +7447,7 @@ static const struct inode_operations btrfs_symlink_inode_operations = {
        .getxattr       = btrfs_getxattr,
        .listxattr      = btrfs_listxattr,
        .removexattr    = btrfs_removexattr,
-       .check_acl      = btrfs_check_acl,
+       .get_acl        = btrfs_get_acl,
 };
 
 const struct dentry_operations btrfs_dentry_operations = {
index 14d602f178c29de58a5429ba2a099b424f7c771f..499f27fc85760becc9f9f623b933eba3512eb8c7 100644 (file)
@@ -641,7 +641,7 @@ lookup_out:
 static int
 cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
 {
-       if (nd->flags & LOOKUP_RCU)
+       if (nd && (nd->flags & LOOKUP_RCU))
                return -ECHILD;
 
        if (direntry->d_inode) {
index 61abb638b4bfdcef8c2a47446fb778714b9b25b8..8be086e9abe4d3e5598e85a562744e6e3708a678 100644 (file)
@@ -68,6 +68,8 @@
 
 #ifdef CONFIG_BLOCK
 #include <linux/loop.h>
+#include <linux/cdrom.h>
+#include <linux/fd.h>
 #include <scsi/scsi.h>
 #include <scsi/scsi_ioctl.h>
 #include <scsi/sg.h>
@@ -944,6 +946,9 @@ COMPATIBLE_IOCTL(FIOQSIZE)
 IGNORE_IOCTL(LOOP_CLR_FD)
 /* md calls this on random blockdevs */
 IGNORE_IOCTL(RAID_VERSION)
+/* qemu/qemu-img might call these two on plain files for probing */
+IGNORE_IOCTL(CDROM_DRIVE_STATUS)
+IGNORE_IOCTL(FDGETPRM32)
 /* SG stuff */
 COMPATIBLE_IOCTL(SG_SET_TIMEOUT)
 COMPATIBLE_IOCTL(SG_GET_TIMEOUT)
index 27a7fefb83eb07f04d092416654b3b3f4142e55d..fa8049ecdc64249f377b8b9d27fd230441af5272 100644 (file)
@@ -2248,7 +2248,7 @@ write_tag_3_packet(char *dest, size_t *remaining_bytes,
                       auth_tok->token.password.session_key_encryption_key,
                       crypt_stat->key_size);
                ecryptfs_printk(KERN_DEBUG,
-                               "Cached session key " "encryption key: \n");
+                               "Cached session key encryption key:\n");
                if (ecryptfs_verbosity > 0)
                        ecryptfs_dump_hex(session_key_encryption_key, 16);
        }
index bfe651f9ae1631ab0abd40281d92f18974530565..52c053763942eb0db19f72b7fb4618bbeeffd012 100644 (file)
@@ -128,7 +128,7 @@ fail:
 /*
  * inode->i_mutex: don't care
  */
-static struct posix_acl *
+struct posix_acl *
 ext2_get_acl(struct inode *inode, int type)
 {
        int name_index;
@@ -231,29 +231,6 @@ ext2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
        return error;
 }
 
-int
-ext2_check_acl(struct inode *inode, int mask)
-{
-       struct posix_acl *acl;
-
-       if (mask & MAY_NOT_BLOCK) {
-               if (!negative_cached_acl(inode, ACL_TYPE_ACCESS))
-                       return -ECHILD;
-               return -EAGAIN;
-       }
-
-       acl = ext2_get_acl(inode, ACL_TYPE_ACCESS);
-       if (IS_ERR(acl))
-               return PTR_ERR(acl);
-       if (acl) {
-               int error = posix_acl_permission(inode, acl, mask);
-               posix_acl_release(acl);
-               return error;
-       }
-
-       return -EAGAIN;
-}
-
 /*
  * Initialize the ACLs of a new inode. Called from ext2_new_inode.
  *
@@ -276,29 +253,20 @@ ext2_init_acl(struct inode *inode, struct inode *dir)
                        inode->i_mode &= ~current_umask();
        }
        if (test_opt(inode->i_sb, POSIX_ACL) && acl) {
-               struct posix_acl *clone;
-              mode_t mode;
-
+               mode_t mode = inode->i_mode;
                if (S_ISDIR(inode->i_mode)) {
                        error = ext2_set_acl(inode, ACL_TYPE_DEFAULT, acl);
                        if (error)
                                goto cleanup;
                }
-               clone = posix_acl_clone(acl, GFP_KERNEL);
-               error = -ENOMEM;
-               if (!clone)
-                       goto cleanup;
-               mode = inode->i_mode;
-               error = posix_acl_create_masq(clone, &mode);
-               if (error >= 0) {
-                       inode->i_mode = mode;
-                       if (error > 0) {
-                               /* This is an extended ACL */
-                               error = ext2_set_acl(inode,
-                                                    ACL_TYPE_ACCESS, clone);
-                       }
+               error = posix_acl_create(&acl, GFP_KERNEL, &mode);
+               if (error < 0)
+                       return error;
+               inode->i_mode = mode;
+               if (error > 0) {
+                       /* This is an extended ACL */
+                       error = ext2_set_acl(inode, ACL_TYPE_ACCESS, acl);
                }
-               posix_acl_release(clone);
        }
 cleanup:
        posix_acl_release(acl);
@@ -322,7 +290,7 @@ cleanup:
 int
 ext2_acl_chmod(struct inode *inode)
 {
-       struct posix_acl *acl, *clone;
+       struct posix_acl *acl;
         int error;
 
        if (!test_opt(inode->i_sb, POSIX_ACL))
@@ -332,14 +300,11 @@ ext2_acl_chmod(struct inode *inode)
        acl = ext2_get_acl(inode, ACL_TYPE_ACCESS);
        if (IS_ERR(acl) || !acl)
                return PTR_ERR(acl);
-       clone = posix_acl_clone(acl, GFP_KERNEL);
+       error = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
+       if (error)
+               return error;
+       error = ext2_set_acl(inode, ACL_TYPE_ACCESS, acl);
        posix_acl_release(acl);
-       if (!clone)
-               return -ENOMEM;
-       error = posix_acl_chmod_masq(clone, inode->i_mode);
-       if (!error)
-               error = ext2_set_acl(inode, ACL_TYPE_ACCESS, clone);
-       posix_acl_release(clone);
        return error;
 }
 
index 3ff6cbb9ac4486e2c6bc4e7b0ca83485ab01fd1f..5c0a6a4fb052c78a3d14df3b25bfc47a26b5fe9b 100644 (file)
@@ -54,13 +54,13 @@ static inline int ext2_acl_count(size_t size)
 #ifdef CONFIG_EXT2_FS_POSIX_ACL
 
 /* acl.c */
-extern int ext2_check_acl (struct inode *, int);
+extern struct posix_acl *ext2_get_acl(struct inode *inode, int type);
 extern int ext2_acl_chmod (struct inode *);
 extern int ext2_init_acl (struct inode *, struct inode *);
 
 #else
 #include <linux/sched.h>
-#define ext2_check_acl NULL
+#define ext2_get_acl   NULL
 #define ext2_get_acl   NULL
 #define ext2_set_acl   NULL
 
index 82e06321de359176c20c9603ba1a9dee2b15b638..a5b3a5db31206f8f3c84781362f7c45e919ddf0e 100644 (file)
@@ -102,6 +102,6 @@ const struct inode_operations ext2_file_inode_operations = {
        .removexattr    = generic_removexattr,
 #endif
        .setattr        = ext2_setattr,
-       .check_acl      = ext2_check_acl,
+       .get_acl        = ext2_get_acl,
        .fiemap         = ext2_fiemap,
 };
index d60b7099e2db3c649be7707924575891bd3d77d1..761fde807fc910f7961d494db363c341fa5f2baf 100644 (file)
@@ -408,7 +408,7 @@ const struct inode_operations ext2_dir_inode_operations = {
        .removexattr    = generic_removexattr,
 #endif
        .setattr        = ext2_setattr,
-       .check_acl      = ext2_check_acl,
+       .get_acl        = ext2_get_acl,
 };
 
 const struct inode_operations ext2_special_inode_operations = {
@@ -419,5 +419,5 @@ const struct inode_operations ext2_special_inode_operations = {
        .removexattr    = generic_removexattr,
 #endif
        .setattr        = ext2_setattr,
-       .check_acl      = ext2_check_acl,
+       .get_acl        = ext2_get_acl,
 };
index edfeb293d4cb601457339ca97d5ceeae64416623..6c29bf0df04a0d0ed619a3b886e2d24847ab7a45 100644 (file)
@@ -131,7 +131,7 @@ fail:
  *
  * inode->i_mutex: don't care
  */
-static struct posix_acl *
+struct posix_acl *
 ext3_get_acl(struct inode *inode, int type)
 {
        int name_index;
@@ -239,29 +239,6 @@ ext3_set_acl(handle_t *handle, struct inode *inode, int type,
        return error;
 }
 
-int
-ext3_check_acl(struct inode *inode, int mask)
-{
-       struct posix_acl *acl;
-
-       if (mask & MAY_NOT_BLOCK) {
-               if (!negative_cached_acl(inode, ACL_TYPE_ACCESS))
-                       return -ECHILD;
-               return -EAGAIN;
-       }
-
-       acl = ext3_get_acl(inode, ACL_TYPE_ACCESS);
-       if (IS_ERR(acl))
-               return PTR_ERR(acl);
-       if (acl) {
-               int error = posix_acl_permission(inode, acl, mask);
-               posix_acl_release(acl);
-               return error;
-       }
-
-       return -EAGAIN;
-}
-
 /*
  * Initialize the ACLs of a new inode. Called from ext3_new_inode.
  *
@@ -284,8 +261,7 @@ ext3_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
                        inode->i_mode &= ~current_umask();
        }
        if (test_opt(inode->i_sb, POSIX_ACL) && acl) {
-               struct posix_acl *clone;
-               mode_t mode;
+               mode_t mode = inode->i_mode;
 
                if (S_ISDIR(inode->i_mode)) {
                        error = ext3_set_acl(handle, inode,
@@ -293,22 +269,15 @@ ext3_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
                        if (error)
                                goto cleanup;
                }
-               clone = posix_acl_clone(acl, GFP_NOFS);
-               error = -ENOMEM;
-               if (!clone)
-                       goto cleanup;
-
-               mode = inode->i_mode;
-               error = posix_acl_create_masq(clone, &mode);
-               if (error >= 0) {
-                       inode->i_mode = mode;
-                       if (error > 0) {
-                               /* This is an extended ACL */
-                               error = ext3_set_acl(handle, inode,
-                                                    ACL_TYPE_ACCESS, clone);
-                       }
+               error = posix_acl_create(&acl, GFP_NOFS, &mode);
+               if (error < 0)
+                       return error;
+
+               inode->i_mode = mode;
+               if (error > 0) {
+                       /* This is an extended ACL */
+                       error = ext3_set_acl(handle, inode, ACL_TYPE_ACCESS, acl);
                }
-               posix_acl_release(clone);
        }
 cleanup:
        posix_acl_release(acl);
@@ -332,7 +301,9 @@ cleanup:
 int
 ext3_acl_chmod(struct inode *inode)
 {
-       struct posix_acl *acl, *clone;
+       struct posix_acl *acl;
+       handle_t *handle;
+       int retries = 0;
         int error;
 
        if (S_ISLNK(inode->i_mode))
@@ -342,31 +313,24 @@ ext3_acl_chmod(struct inode *inode)
        acl = ext3_get_acl(inode, ACL_TYPE_ACCESS);
        if (IS_ERR(acl) || !acl)
                return PTR_ERR(acl);
-       clone = posix_acl_clone(acl, GFP_KERNEL);
-       posix_acl_release(acl);
-       if (!clone)
-               return -ENOMEM;
-       error = posix_acl_chmod_masq(clone, inode->i_mode);
-       if (!error) {
-               handle_t *handle;
-               int retries = 0;
-
-       retry:
-               handle = ext3_journal_start(inode,
-                               EXT3_DATA_TRANS_BLOCKS(inode->i_sb));
-               if (IS_ERR(handle)) {
-                       error = PTR_ERR(handle);
-                       ext3_std_error(inode->i_sb, error);
-                       goto out;
-               }
-               error = ext3_set_acl(handle, inode, ACL_TYPE_ACCESS, clone);
-               ext3_journal_stop(handle);
-               if (error == -ENOSPC &&
-                   ext3_should_retry_alloc(inode->i_sb, &retries))
-                       goto retry;
+       error = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
+       if (error)
+               return error;
+retry:
+       handle = ext3_journal_start(inode,
+                       EXT3_DATA_TRANS_BLOCKS(inode->i_sb));
+       if (IS_ERR(handle)) {
+               error = PTR_ERR(handle);
+               ext3_std_error(inode->i_sb, error);
+               goto out;
        }
+       error = ext3_set_acl(handle, inode, ACL_TYPE_ACCESS, acl);
+       ext3_journal_stop(handle);
+       if (error == -ENOSPC &&
+           ext3_should_retry_alloc(inode->i_sb, &retries))
+               goto retry;
 out:
-       posix_acl_release(clone);
+       posix_acl_release(acl);
        return error;
 }
 
index 597334626de93aee68631305d98a823e815058c4..dbc921e458c5599177fb86fc6e3fc95481cf06ab 100644 (file)
@@ -54,13 +54,13 @@ static inline int ext3_acl_count(size_t size)
 #ifdef CONFIG_EXT3_FS_POSIX_ACL
 
 /* acl.c */
-extern int ext3_check_acl (struct inode *, int);
+extern struct posix_acl *ext3_get_acl(struct inode *inode, int type);
 extern int ext3_acl_chmod (struct inode *);
 extern int ext3_init_acl (handle_t *, struct inode *, struct inode *);
 
 #else  /* CONFIG_EXT3_FS_POSIX_ACL */
 #include <linux/sched.h>
-#define ext3_check_acl NULL
+#define ext3_get_acl NULL
 
 static inline int
 ext3_acl_chmod(struct inode *inode)
index f55df0e61cbded50f25db7dc094c0ffc5a8dc7a3..2be5b99097f13ad44f2db41ca680bfc82a3fa741 100644 (file)
@@ -79,7 +79,7 @@ const struct inode_operations ext3_file_inode_operations = {
        .listxattr      = ext3_listxattr,
        .removexattr    = generic_removexattr,
 #endif
-       .check_acl      = ext3_check_acl,
+       .get_acl        = ext3_get_acl,
        .fiemap         = ext3_fiemap,
 };
 
index c095cf5640c79c4462ed0a60cd7aed5fd8c5472f..3b57230a17bbf9adad3748d790cc3376e7b3f9c2 100644 (file)
@@ -2529,7 +2529,7 @@ const struct inode_operations ext3_dir_inode_operations = {
        .listxattr      = ext3_listxattr,
        .removexattr    = generic_removexattr,
 #endif
-       .check_acl      = ext3_check_acl,
+       .get_acl        = ext3_get_acl,
 };
 
 const struct inode_operations ext3_special_inode_operations = {
@@ -2540,5 +2540,5 @@ const struct inode_operations ext3_special_inode_operations = {
        .listxattr      = ext3_listxattr,
        .removexattr    = generic_removexattr,
 #endif
-       .check_acl      = ext3_check_acl,
+       .get_acl        = ext3_get_acl,
 };
index 60d900fcc3dbbee54bba6d8ef4c77c8a3aa3bc39..dca2d1ded931eafbad76cda7cd9b0f07bf7fa6f8 100644 (file)
@@ -131,7 +131,7 @@ fail:
  *
  * inode->i_mutex: don't care
  */
-static struct posix_acl *
+struct posix_acl *
 ext4_get_acl(struct inode *inode, int type)
 {
        int name_index;
@@ -237,29 +237,6 @@ ext4_set_acl(handle_t *handle, struct inode *inode, int type,
        return error;
 }
 
-int
-ext4_check_acl(struct inode *inode, int mask)
-{
-       struct posix_acl *acl;
-
-       if (mask & MAY_NOT_BLOCK) {
-               if (!negative_cached_acl(inode, ACL_TYPE_ACCESS))
-                       return -ECHILD;
-               return -EAGAIN;
-       }
-
-       acl = ext4_get_acl(inode, ACL_TYPE_ACCESS);
-       if (IS_ERR(acl))
-               return PTR_ERR(acl);
-       if (acl) {
-               int error = posix_acl_permission(inode, acl, mask);
-               posix_acl_release(acl);
-               return error;
-       }
-
-       return -EAGAIN;
-}
-
 /*
  * Initialize the ACLs of a new inode. Called from ext4_new_inode.
  *
@@ -282,8 +259,7 @@ ext4_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
                        inode->i_mode &= ~current_umask();
        }
        if (test_opt(inode->i_sb, POSIX_ACL) && acl) {
-               struct posix_acl *clone;
-               mode_t mode;
+               mode_t mode = inode->i_mode;
 
                if (S_ISDIR(inode->i_mode)) {
                        error = ext4_set_acl(handle, inode,
@@ -291,22 +267,15 @@ ext4_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
                        if (error)
                                goto cleanup;
                }
-               clone = posix_acl_clone(acl, GFP_NOFS);
-               error = -ENOMEM;
-               if (!clone)
-                       goto cleanup;
-
-               mode = inode->i_mode;
-               error = posix_acl_create_masq(clone, &mode);
-               if (error >= 0) {
-                       inode->i_mode = mode;
-                       if (error > 0) {
-                               /* This is an extended ACL */
-                               error = ext4_set_acl(handle, inode,
-                                                    ACL_TYPE_ACCESS, clone);
-                       }
+               error = posix_acl_create(&acl, GFP_NOFS, &mode);
+               if (error < 0)
+                       return error;
+
+               inode->i_mode = mode;
+               if (error > 0) {
+                       /* This is an extended ACL */
+                       error = ext4_set_acl(handle, inode, ACL_TYPE_ACCESS, acl);
                }
-               posix_acl_release(clone);
        }
 cleanup:
        posix_acl_release(acl);
@@ -330,9 +299,12 @@ cleanup:
 int
 ext4_acl_chmod(struct inode *inode)
 {
-       struct posix_acl *acl, *clone;
+       struct posix_acl *acl;
+       handle_t *handle;
+       int retries = 0;
        int error;
 
+
        if (S_ISLNK(inode->i_mode))
                return -EOPNOTSUPP;
        if (!test_opt(inode->i_sb, POSIX_ACL))
@@ -340,31 +312,24 @@ ext4_acl_chmod(struct inode *inode)
        acl = ext4_get_acl(inode, ACL_TYPE_ACCESS);
        if (IS_ERR(acl) || !acl)
                return PTR_ERR(acl);
-       clone = posix_acl_clone(acl, GFP_KERNEL);
-       posix_acl_release(acl);
-       if (!clone)
-               return -ENOMEM;
-       error = posix_acl_chmod_masq(clone, inode->i_mode);
-       if (!error) {
-               handle_t *handle;
-               int retries = 0;
-
-       retry:
-               handle = ext4_journal_start(inode,
-                               EXT4_DATA_TRANS_BLOCKS(inode->i_sb));
-               if (IS_ERR(handle)) {
-                       error = PTR_ERR(handle);
-                       ext4_std_error(inode->i_sb, error);
-                       goto out;
-               }
-               error = ext4_set_acl(handle, inode, ACL_TYPE_ACCESS, clone);
-               ext4_journal_stop(handle);
-               if (error == -ENOSPC &&
-                   ext4_should_retry_alloc(inode->i_sb, &retries))
-                       goto retry;
+       error = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
+       if (error)
+               return error;
+retry:
+       handle = ext4_journal_start(inode,
+                       EXT4_DATA_TRANS_BLOCKS(inode->i_sb));
+       if (IS_ERR(handle)) {
+               error = PTR_ERR(handle);
+               ext4_std_error(inode->i_sb, error);
+               goto out;
        }
+       error = ext4_set_acl(handle, inode, ACL_TYPE_ACCESS, acl);
+       ext4_journal_stop(handle);
+       if (error == -ENOSPC &&
+           ext4_should_retry_alloc(inode->i_sb, &retries))
+               goto retry;
 out:
-       posix_acl_release(clone);
+       posix_acl_release(acl);
        return error;
 }
 
index 9d843d5deac402593b8b557e27c6ed25aafe401d..18cb39ed7c7bbb88dfb72f67150b40cf859e2a58 100644 (file)
@@ -54,13 +54,13 @@ static inline int ext4_acl_count(size_t size)
 #ifdef CONFIG_EXT4_FS_POSIX_ACL
 
 /* acl.c */
-extern int ext4_check_acl(struct inode *, int);
+struct posix_acl *ext4_get_acl(struct inode *inode, int type);
 extern int ext4_acl_chmod(struct inode *);
 extern int ext4_init_acl(handle_t *, struct inode *, struct inode *);
 
 #else  /* CONFIG_EXT4_FS_POSIX_ACL */
 #include <linux/sched.h>
-#define ext4_check_acl NULL
+#define ext4_get_acl NULL
 
 static inline int
 ext4_acl_chmod(struct inode *inode)
index ce766f974b1d49509941552983936e5e9ea62141..e4095e988ebacb379a7784f72f52f78f51176ac4 100644 (file)
@@ -301,7 +301,7 @@ const struct inode_operations ext4_file_inode_operations = {
        .listxattr      = ext4_listxattr,
        .removexattr    = generic_removexattr,
 #endif
-       .check_acl      = ext4_check_acl,
+       .get_acl        = ext4_get_acl,
        .fiemap         = ext4_fiemap,
 };
 
index 707d605bf76985dfe0b873b8fccda9c6459682b1..8c9babac43dc941fa62ece2773f234044b8a5b7b 100644 (file)
@@ -2590,7 +2590,7 @@ const struct inode_operations ext4_dir_inode_operations = {
        .listxattr      = ext4_listxattr,
        .removexattr    = generic_removexattr,
 #endif
-       .check_acl      = ext4_check_acl,
+       .get_acl        = ext4_get_acl,
        .fiemap         = ext4_fiemap,
 };
 
@@ -2602,5 +2602,5 @@ const struct inode_operations ext4_special_inode_operations = {
        .listxattr      = ext4_listxattr,
        .removexattr    = generic_removexattr,
 #endif
-       .check_acl      = ext4_check_acl,
+       .get_acl        = ext4_get_acl,
 };
index 70e90b4974cedd355467552653eae47ab3b07cd0..d5e33a077a67e7bb7cce426b5a4c5616e201c686 100644 (file)
@@ -132,31 +132,17 @@ generic_acl_init(struct inode *inode, struct inode *dir)
        if (!S_ISLNK(inode->i_mode))
                acl = get_cached_acl(dir, ACL_TYPE_DEFAULT);
        if (acl) {
-               struct posix_acl *clone;
-
-               if (S_ISDIR(inode->i_mode)) {
-                       clone = posix_acl_clone(acl, GFP_KERNEL);
-                       error = -ENOMEM;
-                       if (!clone)
-                               goto cleanup;
-                       set_cached_acl(inode, ACL_TYPE_DEFAULT, clone);
-                       posix_acl_release(clone);
-               }
-               clone = posix_acl_clone(acl, GFP_KERNEL);
-               error = -ENOMEM;
-               if (!clone)
-                       goto cleanup;
-               error = posix_acl_create_masq(clone, &mode);
-               if (error >= 0) {
-                       inode->i_mode = mode;
-                       if (error > 0)
-                               set_cached_acl(inode, ACL_TYPE_ACCESS, clone);
-               }
-               posix_acl_release(clone);
+               if (S_ISDIR(inode->i_mode))
+                       set_cached_acl(inode, ACL_TYPE_DEFAULT, acl);
+               error = posix_acl_create(&acl, GFP_KERNEL, &mode);
+               if (error < 0)
+                       return error;
+               inode->i_mode = mode;
+               if (error > 0)
+                       set_cached_acl(inode, ACL_TYPE_ACCESS, acl);
        }
        error = 0;
 
-cleanup:
        posix_acl_release(acl);
        return error;
 }
@@ -170,44 +156,22 @@ cleanup:
 int
 generic_acl_chmod(struct inode *inode)
 {
-       struct posix_acl *acl, *clone;
+       struct posix_acl *acl;
        int error = 0;
 
        if (S_ISLNK(inode->i_mode))
                return -EOPNOTSUPP;
        acl = get_cached_acl(inode, ACL_TYPE_ACCESS);
        if (acl) {
-               clone = posix_acl_clone(acl, GFP_KERNEL);
+               error = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
+               if (error)
+                       return error;
+               set_cached_acl(inode, ACL_TYPE_ACCESS, acl);
                posix_acl_release(acl);
-               if (!clone)
-                       return -ENOMEM;
-               error = posix_acl_chmod_masq(clone, inode->i_mode);
-               if (!error)
-                       set_cached_acl(inode, ACL_TYPE_ACCESS, clone);
-               posix_acl_release(clone);
        }
        return error;
 }
 
-int
-generic_check_acl(struct inode *inode, int mask)
-{
-       if (mask & MAY_NOT_BLOCK) {
-               if (!negative_cached_acl(inode, ACL_TYPE_ACCESS))
-                       return -ECHILD;
-       } else {
-               struct posix_acl *acl;
-
-               acl = get_cached_acl(inode, ACL_TYPE_ACCESS);
-               if (acl) {
-                       int error = posix_acl_permission(inode, acl, mask);
-                       posix_acl_release(acl);
-                       return error;
-               }
-       }
-       return -EAGAIN;
-}
-
 const struct xattr_handler generic_acl_access_handler = {
        .prefix = POSIX_ACL_XATTR_ACCESS,
        .flags  = ACL_TYPE_ACCESS,
index 8ef1079f166503e9c4c1a16dd9ea0eb57f2c5875..884c9af0542fac0658cf5108d7869e5a08668e5a 100644 (file)
@@ -67,36 +67,9 @@ static struct posix_acl *gfs2_acl_get(struct gfs2_inode *ip, int type)
        return acl;
 }
 
-/**
- * gfs2_check_acl - Check an ACL to see if we're allowed to do something
- * @inode: the file we want to do something to
- * @mask: what we want to do
- *
- * Returns: errno
- */
-
-int gfs2_check_acl(struct inode *inode, int mask)
+struct posix_acl *gfs2_get_acl(struct inode *inode, int type)
 {
-       struct posix_acl *acl;
-       int error;
-
-       if (mask & MAY_NOT_BLOCK) {
-               if (!negative_cached_acl(inode, ACL_TYPE_ACCESS))
-                       return -ECHILD;
-               return -EAGAIN;
-       }
-
-       acl = gfs2_acl_get(GFS2_I(inode), ACL_TYPE_ACCESS);
-       if (IS_ERR(acl))
-               return PTR_ERR(acl);
-
-       if (acl) {
-               error = posix_acl_permission(inode, acl, mask);
-               posix_acl_release(acl);
-               return error;
-       }
-
-       return -EAGAIN;
+       return gfs2_acl_get(GFS2_I(inode), type);
 }
 
 static int gfs2_set_mode(struct inode *inode, mode_t mode)
@@ -143,7 +116,7 @@ out:
 int gfs2_acl_create(struct gfs2_inode *dip, struct inode *inode)
 {
        struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode);
-       struct posix_acl *acl, *clone;
+       struct posix_acl *acl;
        mode_t mode = inode->i_mode;
        int error = 0;
 
@@ -168,16 +141,10 @@ int gfs2_acl_create(struct gfs2_inode *dip, struct inode *inode)
                        goto out;
        }
 
-       clone = posix_acl_clone(acl, GFP_NOFS);
-       error = -ENOMEM;
-       if (!clone)
-               goto out;
-       posix_acl_release(acl);
-       acl = clone;
-
-       error = posix_acl_create_masq(acl, &mode);
+       error = posix_acl_create(&acl, GFP_NOFS, &mode);
        if (error < 0)
-               goto out;
+               return error;
+
        if (error == 0)
                goto munge;
 
@@ -193,7 +160,7 @@ out:
 
 int gfs2_acl_chmod(struct gfs2_inode *ip, struct iattr *attr)
 {
-       struct posix_acl *acl, *clone;
+       struct posix_acl *acl;
        char *data;
        unsigned int len;
        int error;
@@ -204,25 +171,19 @@ int gfs2_acl_chmod(struct gfs2_inode *ip, struct iattr *attr)
        if (!acl)
                return gfs2_setattr_simple(ip, attr);
 
-       clone = posix_acl_clone(acl, GFP_NOFS);
+       error = posix_acl_chmod(&acl, GFP_NOFS, attr->ia_mode);
+       if (error)
+               return error;
+
+       len = posix_acl_to_xattr(acl, NULL, 0);
+       data = kmalloc(len, GFP_NOFS);
        error = -ENOMEM;
-       if (!clone)
+       if (data == NULL)
                goto out;
-       posix_acl_release(acl);
-       acl = clone;
-
-       error = posix_acl_chmod_masq(acl, attr->ia_mode);
-       if (!error) {
-               len = posix_acl_to_xattr(acl, NULL, 0);
-               data = kmalloc(len, GFP_NOFS);
-               error = -ENOMEM;
-               if (data == NULL)
-                       goto out;
-               posix_acl_to_xattr(acl, data, len);
-               error = gfs2_xattr_acl_chmod(ip, attr, data);
-               kfree(data);
-               set_cached_acl(&ip->i_inode, ACL_TYPE_ACCESS, acl);
-       }
+       posix_acl_to_xattr(acl, data, len);
+       error = gfs2_xattr_acl_chmod(ip, attr, data);
+       kfree(data);
+       set_cached_acl(&ip->i_inode, ACL_TYPE_ACCESS, acl);
 
 out:
        posix_acl_release(acl);
index b522b0cb39eaa12798649c2a8bd2b1e952a746f9..0da38dc7efec24959a1ad656ff2cda8b561db1e0 100644 (file)
@@ -16,7 +16,7 @@
 #define GFS2_POSIX_ACL_DEFAULT         "posix_acl_default"
 #define GFS2_ACL_MAX_ENTRIES           25
 
-extern int gfs2_check_acl(struct inode *inode, int mask);
+extern struct posix_acl *gfs2_get_acl(struct inode *inode, int type);
 extern int gfs2_acl_create(struct gfs2_inode *dip, struct inode *inode);
 extern int gfs2_acl_chmod(struct gfs2_inode *ip, struct iattr *attr);
 extern const struct xattr_handler gfs2_xattr_system_handler;
index 0fb51a96eff0a8bb743fc83b2961a16465d8fa0c..900cf986aadcc155d26028971f71bc6fa9a972ec 100644 (file)
@@ -1846,7 +1846,7 @@ const struct inode_operations gfs2_file_iops = {
        .listxattr = gfs2_listxattr,
        .removexattr = gfs2_removexattr,
        .fiemap = gfs2_fiemap,
-       .check_acl = gfs2_check_acl,
+       .get_acl = gfs2_get_acl,
 };
 
 const struct inode_operations gfs2_dir_iops = {
@@ -1867,7 +1867,7 @@ const struct inode_operations gfs2_dir_iops = {
        .listxattr = gfs2_listxattr,
        .removexattr = gfs2_removexattr,
        .fiemap = gfs2_fiemap,
-       .check_acl = gfs2_check_acl,
+       .get_acl = gfs2_get_acl,
 };
 
 const struct inode_operations gfs2_symlink_iops = {
@@ -1882,6 +1882,6 @@ const struct inode_operations gfs2_symlink_iops = {
        .listxattr = gfs2_listxattr,
        .removexattr = gfs2_removexattr,
        .fiemap = gfs2_fiemap,
-       .check_acl = gfs2_check_acl,
+       .get_acl = gfs2_get_acl,
 };
 
index 537a2093c0e1a60c7838ba7b326b5fa8d0775b37..87b6e0421c12b8a44b75bf0cf79c198893303552 100644 (file)
@@ -1030,6 +1030,7 @@ static int __init init_hugetlbfs_fs(void)
 static void __exit exit_hugetlbfs_fs(void)
 {
        kmem_cache_destroy(hugetlbfs_inode_cachep);
+       kern_unmount(hugetlbfs_vfsmount);
        unregister_filesystem(&hugetlbfs_fs_type);
        bdi_destroy(&hugetlbfs_backing_dev_info);
 }
index 3675b3cdee8921e9d958338489ab2e00b6e3a58d..27c511a1cf053f3dbbae46e76588af66f2bff7aa 100644 (file)
@@ -156,7 +156,7 @@ static void *jffs2_acl_to_medium(const struct posix_acl *acl, size_t *size)
        return ERR_PTR(-EINVAL);
 }
 
-static struct posix_acl *jffs2_get_acl(struct inode *inode, int type)
+struct posix_acl *jffs2_get_acl(struct inode *inode, int type)
 {
        struct posix_acl *acl;
        char *value = NULL;
@@ -259,30 +259,11 @@ static int jffs2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
        return rc;
 }
 
-int jffs2_check_acl(struct inode *inode, int mask)
+int jffs2_init_acl_pre(struct inode *dir_i, struct inode *inode, mode_t *i_mode)
 {
        struct posix_acl *acl;
        int rc;
 
-       if (mask & MAY_NOT_BLOCK)
-               return -ECHILD;
-
-       acl = jffs2_get_acl(inode, ACL_TYPE_ACCESS);
-       if (IS_ERR(acl))
-               return PTR_ERR(acl);
-       if (acl) {
-               rc = posix_acl_permission(inode, acl, mask);
-               posix_acl_release(acl);
-               return rc;
-       }
-       return -EAGAIN;
-}
-
-int jffs2_init_acl_pre(struct inode *dir_i, struct inode *inode, int *i_mode)
-{
-       struct posix_acl *acl, *clone;
-       int rc;
-
        cache_no_acl(inode);
 
        if (S_ISLNK(*i_mode))
@@ -298,18 +279,13 @@ int jffs2_init_acl_pre(struct inode *dir_i, struct inode *inode, int *i_mode)
                if (S_ISDIR(*i_mode))
                        set_cached_acl(inode, ACL_TYPE_DEFAULT, acl);
 
-               clone = posix_acl_clone(acl, GFP_KERNEL);
-               if (!clone)
-                       return -ENOMEM;
-               rc = posix_acl_create_masq(clone, (mode_t *)i_mode);
-               if (rc < 0) {
-                       posix_acl_release(clone);
+               rc = posix_acl_create(&acl, GFP_KERNEL, i_mode);
+               if (rc < 0)
                        return rc;
-               }
                if (rc > 0)
-                       set_cached_acl(inode, ACL_TYPE_ACCESS, clone);
+                       set_cached_acl(inode, ACL_TYPE_ACCESS, acl);
 
-               posix_acl_release(clone);
+               posix_acl_release(acl);
        }
        return 0;
 }
@@ -335,7 +311,7 @@ int jffs2_init_acl_post(struct inode *inode)
 
 int jffs2_acl_chmod(struct inode *inode)
 {
-       struct posix_acl *acl, *clone;
+       struct posix_acl *acl;
        int rc;
 
        if (S_ISLNK(inode->i_mode))
@@ -343,14 +319,11 @@ int jffs2_acl_chmod(struct inode *inode)
        acl = jffs2_get_acl(inode, ACL_TYPE_ACCESS);
        if (IS_ERR(acl) || !acl)
                return PTR_ERR(acl);
-       clone = posix_acl_clone(acl, GFP_KERNEL);
+       rc = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
+       if (rc)
+               return rc;
+       rc = jffs2_set_acl(inode, ACL_TYPE_ACCESS, acl);
        posix_acl_release(acl);
-       if (!clone)
-               return -ENOMEM;
-       rc = posix_acl_chmod_masq(clone, inode->i_mode);
-       if (!rc)
-               rc = jffs2_set_acl(inode, ACL_TYPE_ACCESS, clone);
-       posix_acl_release(clone);
        return rc;
 }
 
index 5e42de8d954126a46664125678cdd037a76470a7..b3421c78d9f85482be72d045fdde7194e2bb63d8 100644 (file)
@@ -26,9 +26,9 @@ struct jffs2_acl_header {
 
 #ifdef CONFIG_JFFS2_FS_POSIX_ACL
 
-extern int jffs2_check_acl(struct inode *, int);
+struct posix_acl *jffs2_get_acl(struct inode *inode, int type);
 extern int jffs2_acl_chmod(struct inode *);
-extern int jffs2_init_acl_pre(struct inode *, struct inode *, int *);
+extern int jffs2_init_acl_pre(struct inode *, struct inode *, mode_t *);
 extern int jffs2_init_acl_post(struct inode *);
 
 extern const struct xattr_handler jffs2_acl_access_xattr_handler;
@@ -36,7 +36,7 @@ extern const struct xattr_handler jffs2_acl_default_xattr_handler;
 
 #else
 
-#define jffs2_check_acl                                (NULL)
+#define jffs2_get_acl                          (NULL)
 #define jffs2_acl_chmod(inode)                 (0)
 #define jffs2_init_acl_pre(dir_i,inode,mode)   (0)
 #define jffs2_init_acl_post(inode)             (0)
index 5f243cd63afc330e817f1dbfa1a52cb5eb83b33c..9659b7c00468064cdc9e51be4d68d06229fc85eb 100644 (file)
@@ -56,7 +56,7 @@ const struct inode_operations jffs2_dir_inode_operations =
        .rmdir =        jffs2_rmdir,
        .mknod =        jffs2_mknod,
        .rename =       jffs2_rename,
-       .check_acl =    jffs2_check_acl,
+       .get_acl =      jffs2_get_acl,
        .setattr =      jffs2_setattr,
        .setxattr =     jffs2_setxattr,
        .getxattr =     jffs2_getxattr,
index 3989f7e09f7f649c96ad9e5737de886697c018b4..61e6723535b9d56f6cf727328ca7ae8d2a94090a 100644 (file)
@@ -63,7 +63,7 @@ const struct file_operations jffs2_file_operations =
 
 const struct inode_operations jffs2_file_inode_operations =
 {
-       .check_acl =    jffs2_check_acl,
+       .get_acl =      jffs2_get_acl,
        .setattr =      jffs2_setattr,
        .setxattr =     jffs2_setxattr,
        .getxattr =     jffs2_getxattr,
index 46ad619b6124fdd92ab0ac83e439311a58c4ca9b..eeead33d8ef0e617901fc7762891e8d24cde4c8f 100644 (file)
@@ -406,7 +406,7 @@ int jffs2_remount_fs (struct super_block *sb, int *flags, char *data)
 
 /* jffs2_new_inode: allocate a new inode and inocache, add it to the hash,
    fill in the raw_inode while you're at it. */
-struct inode *jffs2_new_inode (struct inode *dir_i, int mode, struct jffs2_raw_inode *ri)
+struct inode *jffs2_new_inode (struct inode *dir_i, mode_t mode, struct jffs2_raw_inode *ri)
 {
        struct inode *inode;
        struct super_block *sb = dir_i->i_sb;
index 9c252835e8e59507c8d9b56ddd985c5ed3e9ed84..526979c607b6b91e5354b16e35f825aa0ef21d11 100644 (file)
@@ -173,7 +173,7 @@ int jffs2_do_setattr (struct inode *, struct iattr *);
 struct inode *jffs2_iget(struct super_block *, unsigned long);
 void jffs2_evict_inode (struct inode *);
 void jffs2_dirty_inode(struct inode *inode, int flags);
-struct inode *jffs2_new_inode (struct inode *dir_i, int mode,
+struct inode *jffs2_new_inode (struct inode *dir_i, mode_t mode,
                               struct jffs2_raw_inode *ri);
 int jffs2_statfs (struct dentry *, struct kstatfs *);
 int jffs2_remount_fs (struct super_block *, int *, char *);
index 2ab1a0d91210b4903a976cd58cae63f06ad58f6e..ee57bac1ba6d07696053a3172457696311a88899 100644 (file)
@@ -1041,7 +1041,7 @@ static int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_inf
                /* FIXME: point() */
                err = jffs2_flash_read(c, ref_offset(ref), len, &retlen, buf);
                if (err) {
-                       JFFS2_ERROR("can not read %d bytes from 0x%08x, " "error code: %d.\n", len, ref_offset(ref), err);
+                       JFFS2_ERROR("can not read %d bytes from 0x%08x, error code: %d.\n", len, ref_offset(ref), err);
                        goto free_out;
                }
 
index b955626071c28acb8be9728b88399f8c9cdd7ab4..e3035afb18145e60add43a86640b1464fdac5aa4 100644 (file)
@@ -20,7 +20,7 @@ const struct inode_operations jffs2_symlink_inode_operations =
 {
        .readlink =     generic_readlink,
        .follow_link =  jffs2_follow_link,
-       .check_acl =    jffs2_check_acl,
+       .get_acl =      jffs2_get_acl,
        .setattr =      jffs2_setattr,
        .setxattr =     jffs2_setxattr,
        .getxattr =     jffs2_getxattr,
index 8a0a0666d5a6f141e4f1f5f387d3b69db9a02938..b3a32caf2b4596d8ce0fa8a53c5084787088c4cc 100644 (file)
@@ -27,7 +27,7 @@
 #include "jfs_xattr.h"
 #include "jfs_acl.h"
 
-static struct posix_acl *jfs_get_acl(struct inode *inode, int type)
+struct posix_acl *jfs_get_acl(struct inode *inode, int type)
 {
        struct posix_acl *acl;
        char *ea_name;
@@ -114,30 +114,9 @@ out:
        return rc;
 }
 
-int jfs_check_acl(struct inode *inode, int mask)
-{
-       struct posix_acl *acl;
-
-       if (mask & MAY_NOT_BLOCK)
-               return -ECHILD;
-
-       acl = jfs_get_acl(inode, ACL_TYPE_ACCESS);
-       if (IS_ERR(acl))
-               return PTR_ERR(acl);
-       if (acl) {
-               int error = posix_acl_permission(inode, acl, mask);
-               posix_acl_release(acl);
-               return error;
-       }
-
-       return -EAGAIN;
-}
-
 int jfs_init_acl(tid_t tid, struct inode *inode, struct inode *dir)
 {
        struct posix_acl *acl = NULL;
-       struct posix_acl *clone;
-       mode_t mode;
        int rc = 0;
 
        if (S_ISLNK(inode->i_mode))
@@ -148,25 +127,18 @@ int jfs_init_acl(tid_t tid, struct inode *inode, struct inode *dir)
                return PTR_ERR(acl);
 
        if (acl) {
+               mode_t mode = inode->i_mode;
                if (S_ISDIR(inode->i_mode)) {
                        rc = jfs_set_acl(tid, inode, ACL_TYPE_DEFAULT, acl);
                        if (rc)
                                goto cleanup;
                }
-               clone = posix_acl_clone(acl, GFP_KERNEL);
-               if (!clone) {
-                       rc = -ENOMEM;
-                       goto cleanup;
-               }
-               mode = inode->i_mode;
-               rc = posix_acl_create_masq(clone, &mode);
-               if (rc >= 0) {
-                       inode->i_mode = mode;
-                       if (rc > 0)
-                               rc = jfs_set_acl(tid, inode, ACL_TYPE_ACCESS,
-                                                clone);
-               }
-               posix_acl_release(clone);
+               rc = posix_acl_create(&acl, GFP_KERNEL, &mode);
+               if (rc < 0)
+                       goto cleanup; /* posix_acl_release(NULL) is no-op */
+               inode->i_mode = mode;
+               if (rc > 0)
+                       rc = jfs_set_acl(tid, inode, ACL_TYPE_ACCESS, acl);
 cleanup:
                posix_acl_release(acl);
        } else
@@ -180,8 +152,9 @@ cleanup:
 
 int jfs_acl_chmod(struct inode *inode)
 {
-       struct posix_acl *acl, *clone;
+       struct posix_acl *acl;
        int rc;
+       tid_t tid;
 
        if (S_ISLNK(inode->i_mode))
                return -EOPNOTSUPP;
@@ -190,22 +163,18 @@ int jfs_acl_chmod(struct inode *inode)
        if (IS_ERR(acl) || !acl)
                return PTR_ERR(acl);
 
-       clone = posix_acl_clone(acl, GFP_KERNEL);
-       posix_acl_release(acl);
-       if (!clone)
-               return -ENOMEM;
-
-       rc = posix_acl_chmod_masq(clone, inode->i_mode);
-       if (!rc) {
-               tid_t tid = txBegin(inode->i_sb, 0);
-               mutex_lock(&JFS_IP(inode)->commit_mutex);
-               rc = jfs_set_acl(tid, inode, ACL_TYPE_ACCESS, clone);
-               if (!rc)
-                       rc = txCommit(tid, 1, &inode, 0);
-               txEnd(tid);
-               mutex_unlock(&JFS_IP(inode)->commit_mutex);
-       }
+       rc = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
+       if (rc)
+               return rc;
 
-       posix_acl_release(clone);
+       tid = txBegin(inode->i_sb, 0);
+       mutex_lock(&JFS_IP(inode)->commit_mutex);
+       rc = jfs_set_acl(tid, inode, ACL_TYPE_ACCESS, acl);
+       if (!rc)
+               rc = txCommit(tid, 1, &inode, 0);
+       txEnd(tid);
+       mutex_unlock(&JFS_IP(inode)->commit_mutex);
+
+       posix_acl_release(acl);
        return rc;
 }
index 7527855b5cc6fc71ec5b613fbf022bd725843f20..844f9460cb11344dc65253c79ef5ec0baf6fe576 100644 (file)
@@ -140,7 +140,7 @@ const struct inode_operations jfs_file_inode_operations = {
        .removexattr    = jfs_removexattr,
        .setattr        = jfs_setattr,
 #ifdef CONFIG_JFS_POSIX_ACL
-       .check_acl      = jfs_check_acl,
+       .get_acl        = jfs_get_acl,
 #endif
 };
 
index 54e07559878d12e2fe77c7b39e4f2114c7a3abdb..ad84fe50ca9e897362caa12101d63a590b56073f 100644 (file)
@@ -20,7 +20,7 @@
 
 #ifdef CONFIG_JFS_POSIX_ACL
 
-int jfs_check_acl(struct inode *, int);
+struct posix_acl *jfs_get_acl(struct inode *inode, int type);
 int jfs_init_acl(tid_t, struct inode *, struct inode *);
 int jfs_acl_chmod(struct inode *inode);
 
index 03787ef6a11826523abaa38fcfce77f57c8c199d..29b1f1a21142d773d9fe0ec783745cc82cd2a21b 100644 (file)
@@ -1537,7 +1537,7 @@ const struct inode_operations jfs_dir_inode_operations = {
        .removexattr    = jfs_removexattr,
        .setattr        = jfs_setattr,
 #ifdef CONFIG_JFS_POSIX_ACL
-       .check_acl      = jfs_check_acl,
+       .get_acl        = jfs_get_acl,
 #endif
 };
 
index b7fad009bbf69884ab938ed26d4fd6ab0a257d9c..ef00b984fb20fe4dbbb023d927b93afdd3839905 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/fcntl.h>
 #include <linux/device_cgroup.h>
 #include <linux/fs_struct.h>
+#include <linux/posix_acl.h>
 #include <asm/uaccess.h>
 
 #include "internal.h"
@@ -173,12 +174,60 @@ void putname(const char *name)
 EXPORT_SYMBOL(putname);
 #endif
 
+static int check_acl(struct inode *inode, int mask)
+{
+       struct posix_acl *acl;
+
+       /*
+        * Under RCU walk, we cannot even do a "get_cached_acl()",
+        * because that involves locking and getting a refcount on
+        * a cached ACL.
+        *
+        * So the only case we handle during RCU walking is the
+        * case of a cached "no ACL at all", which needs no locks
+        * or refcounts.
+        */
+       if (mask & MAY_NOT_BLOCK) {
+               if (negative_cached_acl(inode, ACL_TYPE_ACCESS))
+                       return -EAGAIN;
+               return -ECHILD;
+       }
+
+       acl = get_cached_acl(inode, ACL_TYPE_ACCESS);
+
+       /*
+        * A filesystem can force a ACL callback by just never filling the
+        * ACL cache. But normally you'd fill the cache either at inode
+        * instantiation time, or on the first ->get_acl call.
+        *
+        * If the filesystem doesn't have a get_acl() function at all, we'll
+        * just create the negative cache entry.
+        */
+       if (acl == ACL_NOT_CACHED) {
+               if (inode->i_op->get_acl) {
+                       acl = inode->i_op->get_acl(inode, ACL_TYPE_ACCESS);
+                       if (IS_ERR(acl))
+                               return PTR_ERR(acl);
+               } else {
+                       set_cached_acl(inode, ACL_TYPE_ACCESS, NULL);
+                       return -EAGAIN;
+               }
+       }
+
+       if (acl) {
+               int error = posix_acl_permission(inode, acl, mask);
+               posix_acl_release(acl);
+               return error;
+       }
+
+       return -EAGAIN;
+}
+
 /*
  * This does basic POSIX ACL permission checking
  */
 static int acl_permission_check(struct inode *inode, int mask)
 {
-       int (*check_acl)(struct inode *inode, int mask);
        unsigned int mode = inode->i_mode;
 
        mask &= MAY_READ | MAY_WRITE | MAY_EXEC | MAY_NOT_BLOCK;
@@ -186,11 +235,10 @@ static int acl_permission_check(struct inode *inode, int mask)
        if (current_user_ns() != inode_userns(inode))
                goto other_perms;
 
-       if (current_fsuid() == inode->i_uid)
+       if (likely(current_fsuid() == inode->i_uid))
                mode >>= 6;
        else {
-               check_acl = inode->i_op->check_acl;
-               if (IS_POSIXACL(inode) && (mode & S_IRWXG) && check_acl) {
+               if (IS_POSIXACL(inode) && (mode & S_IRWXG)) {
                        int error = check_acl(inode, mask);
                        if (error != -EAGAIN)
                                return error;
index cda50fe9250ac3e7eb52d6a56143731505ef732f..22bfe8273c680b441f43a0191c7bd0e805a51ec2 100644 (file)
@@ -2721,6 +2721,25 @@ EXPORT_SYMBOL(put_mnt_ns);
 
 struct vfsmount *kern_mount_data(struct file_system_type *type, void *data)
 {
-       return vfs_kern_mount(type, MS_KERNMOUNT, type->name, data);
+       struct vfsmount *mnt;
+       mnt = vfs_kern_mount(type, MS_KERNMOUNT, type->name, data);
+       if (!IS_ERR(mnt)) {
+               /*
+                * it is a longterm mount, don't release mnt until
+                * we unmount before file sys is unregistered
+               */
+               mnt_make_longterm(mnt);
+       }
+       return mnt;
 }
 EXPORT_SYMBOL_GPL(kern_mount_data);
+
+void kern_unmount(struct vfsmount *mnt)
+{
+       /* release long term mount so mount point can be released */
+       if (!IS_ERR_OR_NULL(mnt)) {
+               mnt_make_shortterm(mnt);
+               mntput(mnt);
+       }
+}
+EXPORT_SYMBOL(kern_unmount);
index 79664a1025af54cb61d1ff684b7b117a5ca3afeb..f20801ae0a16582850f95e03f148d5b704b720aa 100644 (file)
@@ -36,6 +36,8 @@
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/nfs_idmap.h>
 
 static int nfs_map_string_to_numeric(const char *name, size_t namelen, __u32 *res)
 {
@@ -59,12 +61,10 @@ static int nfs_map_numeric_to_string(__u32 id, char *buf, size_t buflen)
 
 #ifdef CONFIG_NFS_USE_NEW_IDMAPPER
 
-#include <linux/slab.h>
 #include <linux/cred.h>
 #include <linux/sunrpc/sched.h>
 #include <linux/nfs4.h>
 #include <linux/nfs_fs_sb.h>
-#include <linux/nfs_idmap.h>
 #include <linux/keyctl.h>
 #include <linux/key-type.h>
 #include <linux/rcupdate.h>
@@ -284,18 +284,15 @@ int nfs_map_gid_to_group(const struct nfs_server *server, __u32 gid, char *buf,
 #include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/init.h>
-#include <linux/slab.h>
 #include <linux/socket.h>
 #include <linux/in.h>
 #include <linux/sched.h>
-
 #include <linux/sunrpc/clnt.h>
 #include <linux/workqueue.h>
 #include <linux/sunrpc/rpc_pipe_fs.h>
 
 #include <linux/nfs_fs.h>
 
-#include <linux/nfs_idmap.h>
 #include "nfs4_fs.h"
 
 #define IDMAP_HASH_SZ          128
index 27434277165570b4f1f00c06f42dc2ca6818804f..e49e73107e6290dda0f9bfa5d625edf5fc54ec2b 100644 (file)
@@ -427,16 +427,12 @@ int nfs3_proc_set_default_acl(struct inode *dir, struct inode *inode,
        }
        if (!dfacl)
                return 0;
-       acl = posix_acl_clone(dfacl, GFP_KERNEL);
-       error = -ENOMEM;
-       if (!acl)
-               goto out_release_dfacl;
-       error = posix_acl_create_masq(acl, &mode);
+       acl = posix_acl_dup(dfacl);
+       error = posix_acl_create(&acl, GFP_KERNEL, &mode);
        if (error < 0)
-               goto out_release_acl;
+               goto out_release_dfacl;
        error = nfs3_proc_setacls(inode, acl, S_ISDIR(inode->i_mode) ?
                                                      dfacl : NULL);
-out_release_acl:
        posix_acl_release(acl);
 out_release_dfacl:
        posix_acl_release(dfacl);
index 1cee970eb55a520e258434125c21466cc6160acb..783c58d9daf11b92898676b2af2f55765cdd3caf 100644 (file)
@@ -290,47 +290,32 @@ static int ocfs2_set_acl(handle_t *handle,
        return ret;
 }
 
-int ocfs2_check_acl(struct inode *inode, int mask)
+struct posix_acl *ocfs2_iop_get_acl(struct inode *inode, int type)
 {
        struct ocfs2_super *osb;
        struct buffer_head *di_bh = NULL;
        struct posix_acl *acl;
        int ret = -EAGAIN;
 
-       if (mask & MAY_NOT_BLOCK)
-               return -ECHILD;
-
        osb = OCFS2_SB(inode->i_sb);
        if (!(osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL))
-               return ret;
+               return NULL;
 
        ret = ocfs2_read_inode_block(inode, &di_bh);
-       if (ret < 0) {
-               mlog_errno(ret);
-               return ret;
-       }
+       if (ret < 0)
+               return ERR_PTR(ret);
 
-       acl = ocfs2_get_acl_nolock(inode, ACL_TYPE_ACCESS, di_bh);
+       acl = ocfs2_get_acl_nolock(inode, type, di_bh);
 
        brelse(di_bh);
 
-       if (IS_ERR(acl)) {
-               mlog_errno(PTR_ERR(acl));
-               return PTR_ERR(acl);
-       }
-       if (acl) {
-               ret = posix_acl_permission(inode, acl, mask);
-               posix_acl_release(acl);
-               return ret;
-       }
-
-       return -EAGAIN;
+       return acl;
 }
 
 int ocfs2_acl_chmod(struct inode *inode)
 {
        struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
-       struct posix_acl *acl, *clone;
+       struct posix_acl *acl;
        int ret;
 
        if (S_ISLNK(inode->i_mode))
@@ -342,15 +327,12 @@ int ocfs2_acl_chmod(struct inode *inode)
        acl = ocfs2_get_acl(inode, ACL_TYPE_ACCESS);
        if (IS_ERR(acl) || !acl)
                return PTR_ERR(acl);
-       clone = posix_acl_clone(acl, GFP_KERNEL);
+       ret = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
+       if (ret)
+               return ret;
+       ret = ocfs2_set_acl(NULL, inode, NULL, ACL_TYPE_ACCESS,
+                           acl, NULL, NULL);
        posix_acl_release(acl);
-       if (!clone)
-               return -ENOMEM;
-       ret = posix_acl_chmod_masq(clone, inode->i_mode);
-       if (!ret)
-               ret = ocfs2_set_acl(NULL, inode, NULL, ACL_TYPE_ACCESS,
-                                   clone, NULL, NULL);
-       posix_acl_release(clone);
        return ret;
 }
 
@@ -388,8 +370,6 @@ int ocfs2_init_acl(handle_t *handle,
                }
        }
        if ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) && acl) {
-               struct posix_acl *clone;
-
                if (S_ISDIR(inode->i_mode)) {
                        ret = ocfs2_set_acl(handle, inode, di_bh,
                                            ACL_TYPE_DEFAULT, acl,
@@ -397,27 +377,22 @@ int ocfs2_init_acl(handle_t *handle,
                        if (ret)
                                goto cleanup;
                }
-               clone = posix_acl_clone(acl, GFP_NOFS);
-               ret = -ENOMEM;
-               if (!clone)
-                       goto cleanup;
-
                mode = inode->i_mode;
-               ret = posix_acl_create_masq(clone, &mode);
-               if (ret >= 0) {
-                       ret2 = ocfs2_acl_set_mode(inode, di_bh, handle, mode);
-                       if (ret2) {
-                               mlog_errno(ret2);
-                               ret = ret2;
-                               goto cleanup;
-                       }
-                       if (ret > 0) {
-                               ret = ocfs2_set_acl(handle, inode,
-                                                   di_bh, ACL_TYPE_ACCESS,
-                                                   clone, meta_ac, data_ac);
-                       }
+               ret = posix_acl_create(&acl, GFP_NOFS, &mode);
+               if (ret < 0)
+                       return ret;
+
+               ret2 = ocfs2_acl_set_mode(inode, di_bh, handle, mode);
+               if (ret2) {
+                       mlog_errno(ret2);
+                       ret = ret2;
+                       goto cleanup;
+               }
+               if (ret > 0) {
+                       ret = ocfs2_set_acl(handle, inode,
+                                           di_bh, ACL_TYPE_ACCESS,
+                                           acl, meta_ac, data_ac);
                }
-               posix_acl_release(clone);
        }
 cleanup:
        posix_acl_release(acl);
index 5c5d31f05853175476cc0c9ed4c2460c67f40da9..071fbd380f2f52889fe4ddc459df3bf603d7629e 100644 (file)
@@ -26,7 +26,7 @@ struct ocfs2_acl_entry {
        __le32 e_id;
 };
 
-extern int ocfs2_check_acl(struct inode *, int);
+struct posix_acl *ocfs2_iop_get_acl(struct inode *inode, int type);
 extern int ocfs2_acl_chmod(struct inode *);
 extern int ocfs2_init_acl(handle_t *, struct inode *, struct inode *,
                          struct buffer_head *, struct buffer_head *,
index 0fc2bd34039dafd8d05e4bbe89885afbe11167af..de4ea1af041b654f8f1b4f1a000f6492226f701f 100644 (file)
@@ -2600,14 +2600,14 @@ const struct inode_operations ocfs2_file_iops = {
        .listxattr      = ocfs2_listxattr,
        .removexattr    = generic_removexattr,
        .fiemap         = ocfs2_fiemap,
-       .check_acl      = ocfs2_check_acl,
+       .get_acl        = ocfs2_iop_get_acl,
 };
 
 const struct inode_operations ocfs2_special_file_iops = {
        .setattr        = ocfs2_setattr,
        .getattr        = ocfs2_getattr,
        .permission     = ocfs2_permission,
-       .check_acl      = ocfs2_check_acl,
+       .get_acl        = ocfs2_iop_get_acl,
 };
 
 /*
index cd9427023d2e72dd1d5109113569f7dee6eb1066..d53cb706f14c27dfc5ec754dc6d0f846e424421c 100644 (file)
@@ -36,7 +36,6 @@
 #include "dir.h"
 #include "buffer_head_io.h"
 #include "sysfile.h"
-#include "suballoc.h"
 #include "refcounttree.h"
 #include "move_extents.h"
 
index 33889dc52dd7ee4d856ab482b6ca13cf1b47bb46..53aa41ed7bf39d34d2ad9064813b3e6feeb57971 100644 (file)
@@ -2498,5 +2498,5 @@ const struct inode_operations ocfs2_dir_iops = {
        .listxattr      = ocfs2_listxattr,
        .removexattr    = generic_removexattr,
        .fiemap         = ocfs2_fiemap,
-       .check_acl      = ocfs2_check_acl,
+       .get_acl        = ocfs2_iop_get_acl,
 };
index d545e97d99c3390706894ff1b030c2491a2c0a38..e3c63d1c5e13cc5c520c0d90963ede8ef4baaf8c 100644 (file)
@@ -237,22 +237,22 @@ ssize_t part_size_show(struct device *dev,
        return sprintf(buf, "%llu\n",(unsigned long long)p->nr_sects);
 }
 
-ssize_t part_ro_show(struct device *dev,
-                      struct device_attribute *attr, char *buf)
+static ssize_t part_ro_show(struct device *dev,
+                           struct device_attribute *attr, char *buf)
 {
        struct hd_struct *p = dev_to_part(dev);
        return sprintf(buf, "%d\n", p->policy ? 1 : 0);
 }
 
-ssize_t part_alignment_offset_show(struct device *dev,
-                                  struct device_attribute *attr, char *buf)
+static ssize_t part_alignment_offset_show(struct device *dev,
+                                         struct device_attribute *attr, char *buf)
 {
        struct hd_struct *p = dev_to_part(dev);
        return sprintf(buf, "%llu\n", (unsigned long long)p->alignment_offset);
 }
 
-ssize_t part_discard_alignment_show(struct device *dev,
-                                  struct device_attribute *attr, char *buf)
+static ssize_t part_discard_alignment_show(struct device *dev,
+                                          struct device_attribute *attr, char *buf)
 {
        struct hd_struct *p = dev_to_part(dev);
        return sprintf(buf, "%u\n", p->discard_alignment);
index da42f7db50de42640a7fa56df21e21bbb48cf588..1b7f9af67ccfff8ca6aaacb9ecdd8ddc87fa99a0 100644 (file)
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -1291,8 +1291,8 @@ static int __init init_pipe_fs(void)
 
 static void __exit exit_pipe_fs(void)
 {
+       kern_unmount(pipe_mnt);
        unregister_filesystem(&pipe_fs_type);
-       mntput(pipe_mnt);
 }
 
 fs_initcall(init_pipe_fs);
index b1cf6bf4b41dea46feb35d8d6d02f4d5c88153f8..a6227d219e93028f1bb0adc19002b3e12a89c8ef 100644 (file)
 
 EXPORT_SYMBOL(posix_acl_init);
 EXPORT_SYMBOL(posix_acl_alloc);
-EXPORT_SYMBOL(posix_acl_clone);
 EXPORT_SYMBOL(posix_acl_valid);
 EXPORT_SYMBOL(posix_acl_equiv_mode);
 EXPORT_SYMBOL(posix_acl_from_mode);
-EXPORT_SYMBOL(posix_acl_create_masq);
-EXPORT_SYMBOL(posix_acl_chmod_masq);
-EXPORT_SYMBOL(posix_acl_permission);
 
 /*
  * Init a fresh posix_acl
@@ -59,7 +55,7 @@ posix_acl_alloc(int count, gfp_t flags)
 /*
  * Clone an ACL.
  */
-struct posix_acl *
+static struct posix_acl *
 posix_acl_clone(const struct posix_acl *acl, gfp_t flags)
 {
        struct posix_acl *clone = NULL;
@@ -283,8 +279,7 @@ check_perm:
  * system calls. All permissions that are not granted by the acl are removed.
  * The permissions in the acl are changed to reflect the mode_p parameter.
  */
-int
-posix_acl_create_masq(struct posix_acl *acl, mode_t *mode_p)
+static int posix_acl_create_masq(struct posix_acl *acl, mode_t *mode_p)
 {
        struct posix_acl_entry *pa, *pe;
        struct posix_acl_entry *group_obj = NULL, *mask_obj = NULL;
@@ -341,8 +336,7 @@ posix_acl_create_masq(struct posix_acl *acl, mode_t *mode_p)
 /*
  * Modify the ACL for the chmod syscall.
  */
-int
-posix_acl_chmod_masq(struct posix_acl *acl, mode_t mode)
+static int posix_acl_chmod_masq(struct posix_acl *acl, mode_t mode)
 {
        struct posix_acl_entry *group_obj = NULL, *mask_obj = NULL;
        struct posix_acl_entry *pa, *pe;
@@ -386,3 +380,39 @@ posix_acl_chmod_masq(struct posix_acl *acl, mode_t mode)
 
        return 0;
 }
+
+int
+posix_acl_create(struct posix_acl **acl, gfp_t gfp, mode_t *mode_p)
+{
+       struct posix_acl *clone = posix_acl_clone(*acl, gfp);
+       int err = -ENOMEM;
+       if (clone) {
+               err = posix_acl_create_masq(clone, mode_p);
+               if (err < 0) {
+                       posix_acl_release(clone);
+                       clone = NULL;
+               }
+       }
+       posix_acl_release(*acl);
+       *acl = clone;
+       return err;
+}
+EXPORT_SYMBOL(posix_acl_create);
+
+int
+posix_acl_chmod(struct posix_acl **acl, gfp_t gfp, mode_t mode)
+{
+       struct posix_acl *clone = posix_acl_clone(*acl, gfp);
+       int err = -ENOMEM;
+       if (clone) {
+               err = posix_acl_chmod_masq(clone, mode);
+               if (err) {
+                       posix_acl_release(clone);
+                       clone = NULL;
+               }
+       }
+       posix_acl_release(*acl);
+       *acl = clone;
+       return err;
+}
+EXPORT_SYMBOL(posix_acl_chmod);
index c7156dc39ce7946b806e210dd0c4382cb1313185..ace635053a3677fa40080fee79897fa8281c7889 100644 (file)
@@ -319,5 +319,5 @@ const struct inode_operations reiserfs_file_inode_operations = {
        .listxattr = reiserfs_listxattr,
        .removexattr = reiserfs_removexattr,
        .permission = reiserfs_permission,
-       .check_acl = reiserfs_check_acl,
+       .get_acl = reiserfs_get_acl,
 };
index 2922b90ceac1a799daa881dfbc3ed991ed2664c2..9b0d4b78b4fbf83f8591b8910b794e4219466cda 100644 (file)
@@ -1475,6 +1475,11 @@ void reiserfs_read_locked_inode(struct inode *inode,
 
        reiserfs_check_path(&path_to_sd);       /* init inode should be relsing */
 
+       /*
+        * Stat data v1 doesn't support ACLs.
+        */
+       if (get_inode_sd_version(inode) == STAT_DATA_V1)
+               cache_no_acl(inode);
 }
 
 /**
index c5e82ece7c6c7d7afd2002d15c4293a99662bb4c..a159ba5a35e722457f83977bf4a82c1344528fc8 100644 (file)
@@ -678,23 +678,19 @@ struct buffer_chunk {
 static void write_chunk(struct buffer_chunk *chunk)
 {
        int i;
-       get_fs_excl();
        for (i = 0; i < chunk->nr; i++) {
                submit_logged_buffer(chunk->bh[i]);
        }
        chunk->nr = 0;
-       put_fs_excl();
 }
 
 static void write_ordered_chunk(struct buffer_chunk *chunk)
 {
        int i;
-       get_fs_excl();
        for (i = 0; i < chunk->nr; i++) {
                submit_ordered_buffer(chunk->bh[i]);
        }
        chunk->nr = 0;
-       put_fs_excl();
 }
 
 static int add_to_chunk(struct buffer_chunk *chunk, struct buffer_head *bh,
@@ -986,8 +982,6 @@ static int flush_commit_list(struct super_block *s,
                return 0;
        }
 
-       get_fs_excl();
-
        /* before we can put our commit blocks on disk, we have to make sure everyone older than
         ** us is on disk too
         */
@@ -1145,7 +1139,6 @@ static int flush_commit_list(struct super_block *s,
        if (retval)
                reiserfs_abort(s, retval, "Journal write error in %s",
                               __func__);
-       put_fs_excl();
        return retval;
 }
 
@@ -1374,8 +1367,6 @@ static int flush_journal_list(struct super_block *s,
                return 0;
        }
 
-       get_fs_excl();
-
        /* if all the work is already done, get out of here */
        if (atomic_read(&(jl->j_nonzerolen)) <= 0 &&
            atomic_read(&(jl->j_commit_left)) <= 0) {
@@ -1597,7 +1588,6 @@ static int flush_journal_list(struct super_block *s,
        put_journal_list(s, jl);
        if (flushall)
                mutex_unlock(&journal->j_flush_mutex);
-       put_fs_excl();
        return err;
 }
 
@@ -3108,7 +3098,6 @@ static int do_journal_begin_r(struct reiserfs_transaction_handle *th,
        th->t_trans_id = journal->j_trans_id;
        unlock_journal(sb);
        INIT_LIST_HEAD(&th->t_list);
-       get_fs_excl();
        return 0;
 
       out_fail:
@@ -3964,7 +3953,6 @@ static int do_journal_end(struct reiserfs_transaction_handle *th,
        flush = flags & FLUSH_ALL;
        wait_on_commit = flags & WAIT;
 
-       put_fs_excl();
        current->journal_info = th->t_handle_save;
        reiserfs_check_lock_depth(sb, "journal end");
        if (journal->j_len == 0) {
@@ -4316,4 +4304,3 @@ void reiserfs_abort_journal(struct super_block *sb, int errno)
        dump_stack();
 #endif
 }
-
index 551f1b79dbc479a810a849df2f9ce1a118ead575..ef392324bbf14f7b06de26ef30cc75461f7a1f84 100644 (file)
@@ -1529,7 +1529,7 @@ const struct inode_operations reiserfs_dir_inode_operations = {
        .listxattr = reiserfs_listxattr,
        .removexattr = reiserfs_removexattr,
        .permission = reiserfs_permission,
-       .check_acl = reiserfs_check_acl,
+       .get_acl = reiserfs_get_acl,
 };
 
 /*
@@ -1546,7 +1546,7 @@ const struct inode_operations reiserfs_symlink_inode_operations = {
        .listxattr = reiserfs_listxattr,
        .removexattr = reiserfs_removexattr,
        .permission = reiserfs_permission,
-       .check_acl = reiserfs_check_acl,
+       .get_acl = reiserfs_get_acl,
 
 };
 
@@ -1560,5 +1560,5 @@ const struct inode_operations reiserfs_special_inode_operations = {
        .listxattr = reiserfs_listxattr,
        .removexattr = reiserfs_removexattr,
        .permission = reiserfs_permission,
-       .check_acl = reiserfs_check_acl,
+       .get_acl = reiserfs_get_acl,
 };
index 6938d8c68d6e5114d427cb350ae7e8765da928dd..6bc346c160e71489ead30d54f41afc3e07ed23bd 100644 (file)
@@ -867,33 +867,6 @@ out:
        return err;
 }
 
-int reiserfs_check_acl(struct inode *inode, int mask)
-{
-       struct posix_acl *acl;
-       int error = -EAGAIN; /* do regular unix permission checks by default */
-
-       /*
-        * Stat data v1 doesn't support ACLs.
-        */
-       if (get_inode_sd_version(inode) == STAT_DATA_V1)
-               return -EAGAIN;
-
-       if (mask & MAY_NOT_BLOCK)
-               return -ECHILD;
-
-       acl = reiserfs_get_acl(inode, ACL_TYPE_ACCESS);
-
-       if (acl) {
-               if (!IS_ERR(acl)) {
-                       error = posix_acl_permission(inode, acl, mask);
-                       posix_acl_release(acl);
-               } else if (PTR_ERR(acl) != -ENODATA)
-                       error = PTR_ERR(acl);
-       }
-
-       return error;
-}
-
 static int create_privroot(struct dentry *dentry)
 {
        int err;
index 3dc38f1206fc06a6757521a399263edca7d1f844..7362cf4c946a0f46b94172d7b30bac31e8602c21 100644 (file)
@@ -354,9 +354,7 @@ reiserfs_inherit_default_acl(struct reiserfs_transaction_handle *th,
                return PTR_ERR(acl);
 
        if (acl) {
-               struct posix_acl *acl_copy;
                mode_t mode = inode->i_mode;
-               int need_acl;
 
                /* Copy the default ACL to the default ACL of a new directory */
                if (S_ISDIR(inode->i_mode)) {
@@ -368,29 +366,15 @@ reiserfs_inherit_default_acl(struct reiserfs_transaction_handle *th,
 
                /* Now we reconcile the new ACL and the mode,
                   potentially modifying both */
-               acl_copy = posix_acl_clone(acl, GFP_NOFS);
-               if (!acl_copy) {
-                       err = -ENOMEM;
-                       goto cleanup;
-               }
+               err = posix_acl_create(&acl, GFP_NOFS, &mode);
+               if (err < 0)
+                       return err;
 
-               need_acl = posix_acl_create_masq(acl_copy, &mode);
-               if (need_acl >= 0) {
-                       if (mode != inode->i_mode) {
-                               inode->i_mode = mode;
-                       }
+               inode->i_mode = mode;
 
-                       /* If we need an ACL.. */
-                       if (need_acl > 0) {
-                               err = reiserfs_set_acl(th, inode,
-                                                      ACL_TYPE_ACCESS,
-                                                      acl_copy);
-                               if (err)
-                                       goto cleanup_copy;
-                       }
-               }
-             cleanup_copy:
-               posix_acl_release(acl_copy);
+               /* If we need an ACL.. */
+               if (err > 0)
+                       err = reiserfs_set_acl(th, inode, ACL_TYPE_ACCESS, acl);
              cleanup:
                posix_acl_release(acl);
        } else {
@@ -445,7 +429,10 @@ int reiserfs_cache_default_acl(struct inode *inode)
 
 int reiserfs_acl_chmod(struct inode *inode)
 {
-       struct posix_acl *acl, *clone;
+       struct reiserfs_transaction_handle th;
+       struct posix_acl *acl;
+       size_t size;
+       int depth;
        int error;
 
        if (S_ISLNK(inode->i_mode))
@@ -463,30 +450,22 @@ int reiserfs_acl_chmod(struct inode *inode)
                return 0;
        if (IS_ERR(acl))
                return PTR_ERR(acl);
-       clone = posix_acl_clone(acl, GFP_NOFS);
-       posix_acl_release(acl);
-       if (!clone)
-               return -ENOMEM;
-       error = posix_acl_chmod_masq(clone, inode->i_mode);
+       error = posix_acl_chmod(&acl, GFP_NOFS, inode->i_mode);
+       if (error)
+               return error;
+
+       size = reiserfs_xattr_nblocks(inode, reiserfs_acl_size(acl->a_count));
+       depth = reiserfs_write_lock_once(inode->i_sb);
+       error = journal_begin(&th, inode->i_sb, size * 2);
        if (!error) {
-               struct reiserfs_transaction_handle th;
-               size_t size = reiserfs_xattr_nblocks(inode,
-                                            reiserfs_acl_size(clone->a_count));
-               int depth;
-
-               depth = reiserfs_write_lock_once(inode->i_sb);
-               error = journal_begin(&th, inode->i_sb, size * 2);
-               if (!error) {
-                       int error2;
-                       error = reiserfs_set_acl(&th, inode, ACL_TYPE_ACCESS,
-                                                clone);
-                       error2 = journal_end(&th, inode->i_sb, size * 2);
-                       if (error2)
-                               error = error2;
-               }
-               reiserfs_write_unlock_once(inode->i_sb, depth);
+               int error2;
+               error = reiserfs_set_acl(&th, inode, ACL_TYPE_ACCESS, acl);
+               error2 = journal_end(&th, inode->i_sb, size * 2);
+               if (error2)
+                       error = error2;
        }
-       posix_acl_release(clone);
+       reiserfs_write_unlock_once(inode->i_sb, depth);
+       posix_acl_release(acl);
        return error;
 }
 
index 7943f04cb3a92dd32b0ee68893cf2dfc3b3127af..3f56a269a4f4e30c4c31feb0b73b05064cc974b9 100644 (file)
@@ -351,13 +351,11 @@ bool grab_super_passive(struct super_block *sb)
  */
 void lock_super(struct super_block * sb)
 {
-       get_fs_excl();
        mutex_lock(&sb->s_lock);
 }
 
 void unlock_super(struct super_block * sb)
 {
-       put_fs_excl();
        mutex_unlock(&sb->s_lock);
 }
 
@@ -385,7 +383,6 @@ void generic_shutdown_super(struct super_block *sb)
        if (sb->s_root) {
                shrink_dcache_for_umount(sb);
                sync_filesystem(sb);
-               get_fs_excl();
                sb->s_flags &= ~MS_ACTIVE;
 
                fsnotify_unmount_inodes(&sb->s_inodes);
@@ -400,7 +397,6 @@ void generic_shutdown_super(struct super_block *sb)
                           "Self-destruct in 5 seconds.  Have a nice day...\n",
                           sb->s_id);
                }
-               put_fs_excl();
        }
        spin_lock(&sb_lock);
        /* should be initialized for __put_super_and_need_restart() */
index cac48fe22ad513ae3a85dd47beed88ce5011886f..44ce516568045386e282eb03456835f87417a45a 100644 (file)
@@ -114,6 +114,8 @@ xfs_get_acl(struct inode *inode, int type)
        if (acl != ACL_NOT_CACHED)
                return acl;
 
+       trace_xfs_get_acl(ip);
+
        switch (type) {
        case ACL_TYPE_ACCESS:
                ea_name = SGI_ACL_FILE;
@@ -218,40 +220,6 @@ xfs_set_acl(struct inode *inode, int type, struct posix_acl *acl)
        return error;
 }
 
-int
-xfs_check_acl(struct inode *inode, int mask)
-{
-       struct xfs_inode *ip;
-       struct posix_acl *acl;
-       int error = -EAGAIN;
-
-       ip = XFS_I(inode);
-       trace_xfs_check_acl(ip);
-
-       /*
-        * If there is no attribute fork no ACL exists on this inode and
-        * we can skip the whole exercise.
-        */
-       if (!XFS_IFORK_Q(ip))
-               return -EAGAIN;
-
-       if (mask & MAY_NOT_BLOCK) {
-               if (!negative_cached_acl(inode, ACL_TYPE_ACCESS))
-                       return -ECHILD;
-               return -EAGAIN;
-       }
-
-       acl = xfs_get_acl(inode, ACL_TYPE_ACCESS);
-       if (IS_ERR(acl))
-               return PTR_ERR(acl);
-       if (acl) {
-               error = posix_acl_permission(inode, acl, mask);
-               posix_acl_release(acl);
-       }
-
-       return error;
-}
-
 static int
 xfs_set_mode(struct inode *inode, mode_t mode)
 {
@@ -297,29 +265,23 @@ posix_acl_default_exists(struct inode *inode)
  * No need for i_mutex because the inode is not yet exposed to the VFS.
  */
 int
-xfs_inherit_acl(struct inode *inode, struct posix_acl *default_acl)
+xfs_inherit_acl(struct inode *inode, struct posix_acl *acl)
 {
-       struct posix_acl *clone;
-       mode_t mode;
+       mode_t mode = inode->i_mode;
        int error = 0, inherit = 0;
 
        if (S_ISDIR(inode->i_mode)) {
-               error = xfs_set_acl(inode, ACL_TYPE_DEFAULT, default_acl);
+               error = xfs_set_acl(inode, ACL_TYPE_DEFAULT, acl);
                if (error)
-                       return error;
+                       goto out;
        }
 
-       clone = posix_acl_clone(default_acl, GFP_KERNEL);
-       if (!clone)
-               return -ENOMEM;
-
-       mode = inode->i_mode;
-       error = posix_acl_create_masq(clone, &mode);
+       error = posix_acl_create(&acl, GFP_KERNEL, &mode);
        if (error < 0)
-               goto out_release_clone;
+               return error;
 
        /*
-        * If posix_acl_create_masq returns a positive value we need to
+        * If posix_acl_create returns a positive value we need to
         * inherit a permission that can't be represented using the Unix
         * mode bits and we actually need to set an ACL.
         */
@@ -328,20 +290,20 @@ xfs_inherit_acl(struct inode *inode, struct posix_acl *default_acl)
 
        error = xfs_set_mode(inode, mode);
        if (error)
-               goto out_release_clone;
+               goto out;
 
        if (inherit)
-               error = xfs_set_acl(inode, ACL_TYPE_ACCESS, clone);
+               error = xfs_set_acl(inode, ACL_TYPE_ACCESS, acl);
 
- out_release_clone:
-       posix_acl_release(clone);
+out:
+       posix_acl_release(acl);
        return error;
 }
 
 int
 xfs_acl_chmod(struct inode *inode)
 {
-       struct posix_acl *acl, *clone;
+       struct posix_acl *acl;
        int error;
 
        if (S_ISLNK(inode->i_mode))
@@ -351,16 +313,12 @@ xfs_acl_chmod(struct inode *inode)
        if (IS_ERR(acl) || !acl)
                return PTR_ERR(acl);
 
-       clone = posix_acl_clone(acl, GFP_KERNEL);
-       posix_acl_release(acl);
-       if (!clone)
-               return -ENOMEM;
-
-       error = posix_acl_chmod_masq(clone, inode->i_mode);
-       if (!error)
-               error = xfs_set_acl(inode, ACL_TYPE_ACCESS, clone);
+       error = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
+       if (error)
+               return error;
 
-       posix_acl_release(clone);
+       error = xfs_set_acl(inode, ACL_TYPE_ACCESS, acl);
+       posix_acl_release(acl);
        return error;
 }
 
index cca00f49e092a75f2726a79f4c1076469f0b2f36..825390e1c13850985c634fcbaec19c88ce2d6e46 100644 (file)
@@ -881,11 +881,14 @@ xfs_file_aio_write(
        /* Handle various SYNC-type writes */
        if ((file->f_flags & O_DSYNC) || IS_SYNC(inode)) {
                loff_t end = pos + ret - 1;
+               int error;
 
                xfs_rw_iunlock(ip, iolock);
-               ret = -xfs_file_fsync(file, pos, end,
+               error = xfs_file_fsync(file, pos, end,
                                      (file->f_flags & __O_SYNC) ? 0 : 1);
                xfs_rw_ilock(ip, iolock);
+               if (error)
+                       ret = error;
        }
 
 out_unlock:
index 501e4f630548ad7a4ffd50f78fbc91faf55d0241..6544c3236bc8dd51bff1c8d9935d1f979830553c 100644 (file)
@@ -202,9 +202,9 @@ xfs_vn_mknod(
 
        if (default_acl) {
                error = -xfs_inherit_acl(inode, default_acl);
+               default_acl = NULL;
                if (unlikely(error))
                        goto out_cleanup_inode;
-               posix_acl_release(default_acl);
        }
 
 
@@ -1022,7 +1022,7 @@ xfs_vn_fiemap(
 }
 
 static const struct inode_operations xfs_inode_operations = {
-       .check_acl              = xfs_check_acl,
+       .get_acl                = xfs_get_acl,
        .getattr                = xfs_vn_getattr,
        .setattr                = xfs_vn_setattr,
        .setxattr               = generic_setxattr,
@@ -1048,7 +1048,7 @@ static const struct inode_operations xfs_dir_inode_operations = {
        .rmdir                  = xfs_vn_unlink,
        .mknod                  = xfs_vn_mknod,
        .rename                 = xfs_vn_rename,
-       .check_acl              = xfs_check_acl,
+       .get_acl                = xfs_get_acl,
        .getattr                = xfs_vn_getattr,
        .setattr                = xfs_vn_setattr,
        .setxattr               = generic_setxattr,
@@ -1073,7 +1073,7 @@ static const struct inode_operations xfs_dir_ci_inode_operations = {
        .rmdir                  = xfs_vn_unlink,
        .mknod                  = xfs_vn_mknod,
        .rename                 = xfs_vn_rename,
-       .check_acl              = xfs_check_acl,
+       .get_acl                = xfs_get_acl,
        .getattr                = xfs_vn_getattr,
        .setattr                = xfs_vn_setattr,
        .setxattr               = generic_setxattr,
@@ -1086,7 +1086,7 @@ static const struct inode_operations xfs_symlink_inode_operations = {
        .readlink               = generic_readlink,
        .follow_link            = xfs_vn_follow_link,
        .put_link               = xfs_vn_put_link,
-       .check_acl              = xfs_check_acl,
+       .get_acl                = xfs_get_acl,
        .getattr                = xfs_vn_getattr,
        .setattr                = xfs_vn_setattr,
        .setxattr               = generic_setxattr,
@@ -1194,6 +1194,10 @@ xfs_setup_inode(
                break;
        }
 
+       /* if there is no attribute fork no ACL can exist on this inode */
+       if (!XFS_IFORK_Q(ip))
+               cache_no_acl(inode);
+
        xfs_iflags_clear(ip, XFS_INEW);
        barrier();
 
index fda0708ef2ea82f455bb87dcc0aee00cdbc85632..690fc7a7bd7283f78f24a35dc4e4d7ad10d0a65f 100644 (file)
@@ -571,7 +571,7 @@ DEFINE_INODE_EVENT(xfs_alloc_file_space);
 DEFINE_INODE_EVENT(xfs_free_file_space);
 DEFINE_INODE_EVENT(xfs_readdir);
 #ifdef CONFIG_XFS_POSIX_ACL
-DEFINE_INODE_EVENT(xfs_check_acl);
+DEFINE_INODE_EVENT(xfs_get_acl);
 #endif
 DEFINE_INODE_EVENT(xfs_vm_bmap);
 DEFINE_INODE_EVENT(xfs_file_ioctl);
index 0135e2a669d78924c2e4261450ad5d17676371b8..2c656ef49473b0f429d15861dfde1e1c6eb0b292 100644 (file)
@@ -42,7 +42,6 @@ struct xfs_acl {
 #define SGI_ACL_DEFAULT_SIZE   (sizeof(SGI_ACL_DEFAULT)-1)
 
 #ifdef CONFIG_XFS_POSIX_ACL
-extern int xfs_check_acl(struct inode *inode, int mask);
 extern struct posix_acl *xfs_get_acl(struct inode *inode, int type);
 extern int xfs_inherit_acl(struct inode *inode, struct posix_acl *default_acl);
 extern int xfs_acl_chmod(struct inode *inode);
@@ -52,7 +51,6 @@ extern int posix_acl_default_exists(struct inode *inode);
 extern const struct xattr_handler xfs_xattr_acl_access_handler;
 extern const struct xattr_handler xfs_xattr_acl_default_handler;
 #else
-# define xfs_check_acl                                 NULL
 # define xfs_get_acl(inode, type)                      NULL
 # define xfs_inherit_acl(inode, default_acl)           0
 # define xfs_acl_chmod(inode)                          0
index 084b3247d636c008db4287246314f1b60460487a..0179a41d9e5a651543252bbf23c4981640f88d39 100644 (file)
@@ -1564,7 +1564,7 @@ xfs_dir2_node_addname_int(
 
                        if (unlikely(xfs_dir2_db_to_fdb(mp, dbno) != fbno)) {
                                xfs_alert(mp,
-                       "%s: dir ino " "%llu needed freesp block %lld for\n"
+                       "%s: dir ino %llu needed freesp block %lld for\n"
                        "  data block %lld, got %lld ifbno %llu lastfbno %d",
                                        __func__, (unsigned long long)dp->i_ino,
                                        (long long)xfs_dir2_db_to_fdb(mp, dbno),
index c74ef2c6e633a95dd9b94f34ba418ea6f18091c1..98dcd76ce836db71243b031a2bdfc301627d7a03 100644 (file)
@@ -71,6 +71,14 @@ extern void ioport_unmap(void __iomem *);
 struct pci_dev;
 extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
 extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
+#else
+struct pci_dev;
+static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max)
+{
+       return NULL;
+}
+static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
+{ }
 #endif
 
 #endif
index 1a23722e8878619aec4017cbbd31b951439fdb2b..0e67c45b3bc95ec70c38836cd8801bb4e568f804 100644 (file)
@@ -73,7 +73,7 @@ enum rq_cmd_type_bits {
 
 /*
  * try to put the fields that are referenced together in the same cacheline.
- * if you modify this structure, be sure to check block/blk-core.c:rq_init()
+ * if you modify this structure, be sure to check block/blk-core.c:blk_rq_init()
  * as well!
  */
 struct request {
@@ -260,8 +260,7 @@ struct queue_limits {
        unsigned char           discard_zeroes_data;
 };
 
-struct request_queue
-{
+struct request_queue {
        /*
         * Together with queue_head for cacheline sharing
         */
@@ -304,14 +303,14 @@ struct request_queue
        void                    *queuedata;
 
        /*
-        * queue needs bounce pages for pages above this limit
+        * various queue flags, see QUEUE_* below
         */
-       gfp_t                   bounce_gfp;
+       unsigned long           queue_flags;
 
        /*
-        * various queue flags, see QUEUE_* below
+        * queue needs bounce pages for pages above this limit
         */
-       unsigned long           queue_flags;
+       gfp_t                   bounce_gfp;
 
        /*
         * protects queue structures from reentrancy. ->__queue_lock should
@@ -334,8 +333,8 @@ struct request_queue
        unsigned int            nr_congestion_off;
        unsigned int            nr_batching;
 
-       void                    *dma_drain_buffer;
        unsigned int            dma_drain_size;
+       void                    *dma_drain_buffer;
        unsigned int            dma_pad_mask;
        unsigned int            dma_alignment;
 
@@ -393,7 +392,7 @@ struct request_queue
 #define QUEUE_FLAG_ELVSWITCH   6       /* don't use elevator, just do FIFO */
 #define QUEUE_FLAG_BIDI                7       /* queue supports bidi requests */
 #define QUEUE_FLAG_NOMERGES     8      /* disable merge attempts */
-#define QUEUE_FLAG_SAME_COMP   9       /* force complete on same CPU */
+#define QUEUE_FLAG_SAME_COMP   9       /* complete on same CPU-group */
 #define QUEUE_FLAG_FAIL_IO     10      /* fake timeout */
 #define QUEUE_FLAG_STACKABLE   11      /* supports request stacking */
 #define QUEUE_FLAG_NONROT      12      /* non-rotational device (SSD) */
@@ -403,6 +402,7 @@ struct request_queue
 #define QUEUE_FLAG_NOXMERGES   15      /* No extended merges */
 #define QUEUE_FLAG_ADD_RANDOM  16      /* Contributes to random pool */
 #define QUEUE_FLAG_SECDISCARD  17      /* supports SECDISCARD */
+#define QUEUE_FLAG_SAME_FORCE  18      /* force complete on same CPU */
 
 #define QUEUE_FLAG_DEFAULT     ((1 << QUEUE_FLAG_IO_STAT) |            \
                                 (1 << QUEUE_FLAG_STACKABLE)    |       \
@@ -857,12 +857,21 @@ struct request_queue *blk_alloc_queue(gfp_t);
 struct request_queue *blk_alloc_queue_node(gfp_t, int);
 extern void blk_put_queue(struct request_queue *);
 
+/*
+ * Note: Code in between changing the blk_plug list/cb_list or element of such
+ * lists is preemptable, but such code can't do sleep (or be very careful),
+ * otherwise data is corrupted. For details, please check schedule() where
+ * blk_schedule_flush_plug() is called.
+ */
 struct blk_plug {
        unsigned long magic;
        struct list_head list;
        struct list_head cb_list;
        unsigned int should_sort;
+       unsigned int count;
 };
+#define BLK_MAX_REQUEST_COUNT 16
+
 struct blk_plug_cb {
        struct list_head list;
        void (*callback)(struct blk_plug_cb *);
index 6365f041745b87c04f21fa732a87ddea389f0520..563755181c1ea33e7a4c8ff99565704b5432d566 100644 (file)
@@ -35,7 +35,7 @@
 #define CEPH_OPT_MYIP             (1<<2) /* specified my ip */
 #define CEPH_OPT_NOCRC            (1<<3) /* no data crc on writes */
 
-#define CEPH_OPT_DEFAULT   (0);
+#define CEPH_OPT_DEFAULT   (0)
 
 #define ceph_set_opt(client, opt) \
        (client)->options->flags |= CEPH_OPT_##opt;
index ab4ac0ccb857ac4c6b5197c19f3a31a2dc2a3504..da7e4bc34e8cfe1339af4de1c96f55e777867161 100644 (file)
@@ -539,7 +539,6 @@ static inline struct cgroup_subsys_state *cgroup_subsys_state(
  */
 #define task_subsys_state_check(task, subsys_id, __c)                  \
        rcu_dereference_check(task->cgroups->subsys[subsys_id],         \
-                             rcu_read_lock_held() ||                   \
                              lockdep_is_held(&task->alloc_lock) ||     \
                              cgroup_lock_is_held() || (__c))
 
index 82607992f308aa4510f15c1becd64158e86947ca..f240f2fa0197f4ea44fc85ffdd94ac8d51cd5f6e 100644 (file)
@@ -284,7 +284,6 @@ static inline void put_cred(const struct cred *_cred)
        ({                                                              \
                const struct task_struct *__t = (task);                 \
                rcu_dereference_check(__t->real_cred,                   \
-                                     rcu_read_lock_held() ||           \
                                      task_is_dead(__t));               \
        })
 
index b2dd31ca17101fede259112846789e48f9f42c9a..2cc0fd00463f549082d8836cd041b24c53f3af13 100644 (file)
@@ -254,7 +254,7 @@ static inline struct dio_driver *dio_dev_driver(const struct dio_dev *d)
 
 #define dio_resource_start(d) ((d)->resource.start)
 #define dio_resource_end(d)   ((d)->resource.end)
-#define dio_resource_len(d)   ((d)->resource.end-(d)->resource.start+1)
+#define dio_resource_len(d)   (resource_size(&(d)->resource))
 #define dio_resource_flags(d) ((d)->resource.flags)
 
 #define dio_request_device(d, name) \
index 21a8ebf2dc3a2ab5a899077beaad61aa3e6e4f80..d800d5142184216bab18fb1858452fd896e85612 100644 (file)
@@ -146,7 +146,7 @@ extern struct request *elv_rb_latter_request(struct request_queue *, struct requ
 /*
  * rb support functions.
  */
-extern struct request *elv_rb_add(struct rb_root *, struct request *);
+extern void elv_rb_add(struct rb_root *, struct request *);
 extern void elv_rb_del(struct rb_root *, struct request *);
 extern struct request *elv_rb_find(struct rb_root *, sector_t);
 
index f5d194af07a878b093501bbada51bc51a1ca0710..72202b1b9a6a0e4fdd1184ee644e4d30f342b94a 100644 (file)
@@ -377,4 +377,26 @@ struct floppy_raw_cmd {
 #define FDEJECT _IO(2, 0x5a)
 /* eject the disk */
 
+
+#ifdef __KERNEL__
+#ifdef CONFIG_COMPAT
+#include <linux/compat.h>
+
+struct compat_floppy_struct {
+       compat_uint_t   size;
+       compat_uint_t   sect;
+       compat_uint_t   head;
+       compat_uint_t   track;
+       compat_uint_t   stretch;
+       unsigned char   gap;
+       unsigned char   rate;
+       unsigned char   spec1;
+       unsigned char   fmt_gap;
+       const compat_caddr_t name;
+};
+
+#define FDGETPRM32 _IOR(2, 0x04, struct compat_floppy_struct)
+#endif
+#endif
+
 #endif
index 133c0ba25e306a68199d399cf26fc15c242d347a..df7e3cf82e97135edf6338151d18160cb7b7c928 100644 (file)
@@ -60,7 +60,6 @@ struct files_struct {
 
 #define rcu_dereference_check_fdtable(files, fdtfd) \
        (rcu_dereference_check((fdtfd), \
-                              rcu_read_lock_held() || \
                               lockdep_is_held(&(files)->file_lock) || \
                               atomic_read(&(files)->count) == 1 || \
                               rcu_my_thread_group_empty()))
index b224dc468a232e30b752d7e2815d3dd8a975af89..a6658043258a923e3132da31ad2d502db22dc0da 100644 (file)
@@ -379,7 +379,6 @@ struct inodes_stat_t {
 
 #include <linux/linkage.h>
 #include <linux/wait.h>
-#include <linux/types.h>
 #include <linux/kdev_t.h>
 #include <linux/dcache.h>
 #include <linux/path.h>
@@ -1469,10 +1468,6 @@ enum {
 #define vfs_check_frozen(sb, level) \
        wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level)))
 
-#define get_fs_excl() atomic_inc(&current->fs_excl)
-#define put_fs_excl() atomic_dec(&current->fs_excl)
-#define has_fs_excl() atomic_read(&current->fs_excl)
-
 /*
  * until VFS tracks user namespaces for inodes, just make all files
  * belong to init_user_ns
@@ -1586,7 +1581,7 @@ struct inode_operations {
        struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
        void * (*follow_link) (struct dentry *, struct nameidata *);
        int (*permission) (struct inode *, int);
-       int (*check_acl)(struct inode *, int);
+       struct posix_acl * (*get_acl)(struct inode *, int);
 
        int (*readlink) (struct dentry *, char __user *,int);
        void (*put_link) (struct dentry *, struct nameidata *, void *);
@@ -1885,6 +1880,7 @@ extern int register_filesystem(struct file_system_type *);
 extern int unregister_filesystem(struct file_system_type *);
 extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data);
 #define kern_mount(type) kern_mount_data(type, NULL)
+extern void kern_unmount(struct vfsmount *mnt);
 extern int may_umount_tree(struct vfsmount *);
 extern int may_umount(struct vfsmount *);
 extern long do_mount(char *, char *, char *, unsigned long, void *);
index 574bea4013b618d0816d2280ced3670fa4e75bd4..b6d657544ef1afdbcfe2b867bbdaf0d91cfe749c 100644 (file)
@@ -10,6 +10,5 @@ extern const struct xattr_handler generic_acl_default_handler;
 
 int generic_acl_init(struct inode *, struct inode *);
 int generic_acl_chmod(struct inode *);
-int generic_check_acl(struct inode *inode, int mask);
 
 #endif /* LINUX_GENERIC_ACL_H */
index 300d7582006e49f6ea08a3df09fc9070748c5256..02fa4697a0e51b679d8b3962e87a919541956a1f 100644 (file)
@@ -420,7 +420,7 @@ static inline int get_disk_ro(struct gendisk *disk)
 
 extern void disk_block_events(struct gendisk *disk);
 extern void disk_unblock_events(struct gendisk *disk);
-extern void disk_check_events(struct gendisk *disk);
+extern void disk_flush_events(struct gendisk *disk, unsigned int mask);
 extern unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask);
 
 /* drivers/char/random.c */
index 9bede7633f745d7c5bd866d2f46df9a51021f92d..b4b0eef5fddf381d9d842658a3adb29f17877883 100644 (file)
@@ -25,7 +25,7 @@
  *                     there is always data available.  *OBSOLETE*
  * @data_read:         Read data from the RNG device.
  *                     Returns the number of lower random bytes in "data".
- *                     Must not be NULL.    *OSOLETE*
+ *                     Must not be NULL.    *OBSOLETE*
  * @read:              New API. drivers can fill up to max bytes of data
  *                     into the buffer. The buffer is aligned for any type.
  * @priv:              Private data, for use by the RNG driver.
index 580f70c02391712f7cc0351d645361b683b82a8b..d14e058aaeedd6e63bafc24aadce24a78127d7a6 100644 (file)
@@ -176,7 +176,6 @@ extern struct cred init_cred;
        .alloc_lock     = __SPIN_LOCK_UNLOCKED(tsk.alloc_lock),         \
        .journal_info   = NULL,                                         \
        .cpu_timers     = INIT_CPU_TIMERS(tsk.cpu_timers),              \
-       .fs_excl        = ATOMIC_INIT(0),                               \
        .pi_lock        = __RAW_SPIN_LOCK_UNLOCKED(tsk.pi_lock),        \
        .timer_slack_ns = 50000, /* 50 usec default slack */            \
        .pids = {                                                       \
index b2eee896dcbc7506f528be8b06a1fe3728aca141..5037a0ad231245b3b2779c81bf76f912df467879 100644 (file)
@@ -5,6 +5,14 @@
 #include <linux/rcupdate.h>
 
 struct cfq_queue;
+struct cfq_ttime {
+       unsigned long last_end_request;
+
+       unsigned long ttime_total;
+       unsigned long ttime_samples;
+       unsigned long ttime_mean;
+};
+
 struct cfq_io_context {
        void *key;
 
@@ -12,11 +20,7 @@ struct cfq_io_context {
 
        struct io_context *ioc;
 
-       unsigned long last_end_request;
-
-       unsigned long ttime_total;
-       unsigned long ttime_samples;
-       unsigned long ttime_mean;
+       struct cfq_ttime ttime;
 
        struct list_head queue_list;
        struct hlist_node cic_list;
index 8bb85b930c0783a5fb697a1cfa3daf3b7cd49254..73572c65d04f17e8bb6729689035bbe721c516f8 100644 (file)
 #define LDO1_SEL_MASK                                  0xFC
 #define LDO3_SEL_MASK                                  0x7C
 #define LDO_MIN_VOLT                                   1000
-#define LDO_MAX_VOLT                                   3300;
+#define LDO_MAX_VOLT                                   3300
 
 
 /*Register VDIG1  (0x80) register.RegisterDescription */
index e4da76c9e4d9f317d6a9b380c5c2ebf2f724df9d..8ad70dcac3f9195140e04ebcf1b008ecc44bbaf1 100644 (file)
@@ -6,7 +6,7 @@
  * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net>
  * Copyright 2008 Michael Wu <flamingice@sourmilk.net>
  * Copyright 2008 Luis Carlos Cobo <luisca@cozybit.com>
- * Copyright 2008 Michael Buesch <mb@bu3sch.de>
+ * Copyright 2008 Michael Buesch <m@bues.ch>
  * Copyright 2008, 2009 Luis R. Rodriguez <lrodriguez@atheros.com>
  * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>
  * Copyright 2008 Colin McCabe <colin@cozybit.com>
index 1bc1338b817b8ab7b257e2dbe6325e9bcee38bbc..195aafc6cd07c691e37e7d0247538dbd63ff5360 100644 (file)
@@ -50,7 +50,7 @@ static inline resource_size_t pnp_resource_len(struct resource *res)
 {
        if (res->start == 0 && res->end == 0)
                return 0;
-       return res->end - res->start + 1;
+       return resource_size(res);
 }
 
 
index 54211c1cd92634fb4f15bbcf5607948e499e3e52..9a53b99818e28d2302cd004eaf7ef0f05005d1af 100644 (file)
@@ -73,13 +73,12 @@ posix_acl_release(struct posix_acl *acl)
 
 extern void posix_acl_init(struct posix_acl *, int);
 extern struct posix_acl *posix_acl_alloc(int, gfp_t);
-extern struct posix_acl *posix_acl_clone(const struct posix_acl *, gfp_t);
 extern int posix_acl_valid(const struct posix_acl *);
 extern int posix_acl_permission(struct inode *, const struct posix_acl *, int);
 extern struct posix_acl *posix_acl_from_mode(mode_t, gfp_t);
 extern int posix_acl_equiv_mode(const struct posix_acl *, mode_t *);
-extern int posix_acl_create_masq(struct posix_acl *, mode_t *);
-extern int posix_acl_chmod_masq(struct posix_acl *, mode_t);
+extern int posix_acl_create(struct posix_acl **, gfp_t, mode_t *);
+extern int posix_acl_chmod(struct posix_acl **, gfp_t, mode_t);
 
 extern struct posix_acl *get_posix_acl(struct inode *, int);
 extern int set_posix_acl(struct inode *, int, struct posix_acl *);
index 3fd8c4506bbb32ef4347784e7a4c529883348bcb..f096b80e73d8145dc35bcdb36f008d29a61f07d9 100644 (file)
@@ -59,11 +59,7 @@ extern const struct xattr_handler reiserfs_posix_acl_access_handler;
 #else
 
 #define reiserfs_cache_default_acl(inode) 0
-
-static inline struct posix_acl *reiserfs_get_acl(struct inode *inode, int type)
-{
-       return NULL;
-}
+#define reiserfs_get_acl NULL
 
 static inline int reiserfs_acl_chmod(struct inode *inode)
 {
index 57958c0e1d38319fff4a2f83a3e58250e64cc794..c2b71473266efea1a172055d360c969b74f22680 100644 (file)
@@ -45,7 +45,6 @@ int reiserfs_permission(struct inode *inode, int mask);
 
 #ifdef CONFIG_REISERFS_FS_XATTR
 #define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir)
-int reiserfs_check_acl(struct inode *inode, int mask);
 ssize_t reiserfs_getxattr(struct dentry *dentry, const char *name,
                          void *buffer, size_t size);
 int reiserfs_setxattr(struct dentry *dentry, const char *name,
@@ -123,7 +122,6 @@ static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
 #define reiserfs_setxattr NULL
 #define reiserfs_listxattr NULL
 #define reiserfs_removexattr NULL
-#define reiserfs_check_acl NULL
 
 static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
 {
index c81226a9a35c111caf3c9953d49fb680a1cb2516..8e872ead88b5544079a9eebcc8946345177e62dc 100644 (file)
@@ -760,8 +760,7 @@ extern int lockdep_rtnl_is_held(void);
  * or RTNL. Note : Please prefer rtnl_dereference() or rcu_dereference()
  */
 #define rcu_dereference_rtnl(p)                                        \
-       rcu_dereference_check(p, rcu_read_lock_held() ||        \
-                                lockdep_rtnl_is_held())
+       rcu_dereference_check(p, lockdep_rtnl_is_held())
 
 /**
  * rtnl_dereference - fetch RCU pointer when updates are prevented by RTNL
index ed766add9b234b857ad367aae5f636a93320729e..20b03bf94748c4520bc7a87d7f2967227409c96b 100644 (file)
@@ -1512,7 +1512,6 @@ struct task_struct {
        short il_next;
        short pref_node_fork;
 #endif
-       atomic_t fs_excl;       /* holding fs exclusive resources */
        struct rcu_head rcu;
 
        /*
index a08d693d832461fe84805e372776dc98bf8cbb9b..1a6b0045b06b63a616946bd421ce3f7f8e530160 100644 (file)
@@ -8,7 +8,7 @@
  * gpio interface, extbus, and support for serial and parallel flashes.
  *
  * Copyright 2005, Broadcom Corporation
- * Copyright 2006, Michael Buesch <mb@bu3sch.de>
+ * Copyright 2006, Michael Buesch <m@bues.ch>
  *
  * Licensed under the GPL version 2. See COPYING for details.
  */
index 4a9d0c7edc65e2f8755b7763bc9da942ae37a5a0..2d04ea91676037e2c71bc8e1ff103253157888cd 100644 (file)
@@ -94,7 +94,7 @@ static inline int try_stop_cpus(const struct cpumask *cpumask,
  * stop_machine "Bogolock": stop the entire machine, disable
  * interrupts.  This is a very heavy lock, which is equivalent to
  * grabbing every spinlock (and more).  So the "read" side to such a
- * lock is anything which disables preeempt.
+ * lock is anything which disables preemption.
  */
 #if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP)
 
index 7bf9db525e9ee7e7092959c64059198a60bacc3d..dff42025649b32cb03f84d359c0c213ec5617569 100644 (file)
@@ -187,7 +187,7 @@ extern struct zorro_dev *zorro_find_device(zorro_id id,
 
 #define zorro_resource_start(z)        ((z)->resource.start)
 #define zorro_resource_end(z)  ((z)->resource.end)
-#define zorro_resource_len(z)  ((z)->resource.end-(z)->resource.start+1)
+#define zorro_resource_len(z)  (resource_size(&(z)->resource))
 #define zorro_resource_flags(z)        ((z)->resource.flags)
 
 #define zorro_request_device(z, name) \
index 396f735e0cd5994fc72abafbaa08420967c57def..8e4062f165b8ec19bab5aeea63730577aa3c31a8 100644 (file)
@@ -1303,8 +1303,7 @@ extern unsigned long sock_i_ino(struct sock *sk);
 static inline struct dst_entry *
 __sk_dst_get(struct sock *sk)
 {
-       return rcu_dereference_check(sk->sk_dst_cache, rcu_read_lock_held() ||
-                                                      sock_owned_by_user(sk) ||
+       return rcu_dereference_check(sk->sk_dst_cache, sock_owned_by_user(sk) ||
                                                       lockdep_is_held(&sk->sk_lock.slock));
 }
 
index 0a5079974fe98ce1a0148ff6796dbf03e52c3678..572fb549366196f7b0a04f17df51971a25e61ace 100644 (file)
@@ -262,7 +262,7 @@ int osd_execute_request_async(struct osd_request *or,
  * osd_req_decode_sense_full - Decode sense information after execution.
  *
  * @or:           - osd_request to examine
- * @osi           - Recievs a more detailed error report information (optional).
+ * @osi           - Receives a more detailed error report information (optional).
  * @silent        - Do not print to dmsg (Even if enabled)
  * @bad_obj_list  - Some commands act on multiple objects. Failed objects will
  *                  be received here (optional)
index 3668903e397bafea89a45292a9680e9118403112..8001ae4cd7bad3bb848d40749f5af836bdc008cf 100644 (file)
@@ -495,7 +495,7 @@ static inline int scsi_is_wlun(unsigned int lun)
 
 #define sense_class(sense)  (((sense) >> 4) & 0x7)
 #define sense_error(sense)  ((sense) & 0xf)
-#define sense_valid(sense)  ((sense) & 0x80);
+#define sense_valid(sense)  ((sense) & 0x80)
 
 /*
  * default timeouts
index f95d99ba7f7473028b497932cda5493805f0b6c0..679df0574066be08206971f8213fd7eae7f4c963 100644 (file)
@@ -121,7 +121,7 @@ int snd_soundfont_search_zone(struct snd_sf_list *sflist, int *notep, int vel,
 int snd_sf_calc_parm_hold(int msec);
 int snd_sf_calc_parm_attack(int msec);
 int snd_sf_calc_parm_decay(int msec);
-#define snd_sf_calc_parm_delay(msec) (0x8000 - (msec) * 1000 / 725);
+#define snd_sf_calc_parm_delay(msec) (0x8000 - (msec) * 1000 / 725)
 extern int snd_sf_vol_table[128];
 int snd_sf_linear_to_log(unsigned int amount, int offset, int ratio);
 
index 2d64cfcc8b42bd187bed3b3bf3124be74b392219..d06467fc8f7c9669ad11d8930fc413adb4962c4f 100644 (file)
@@ -125,11 +125,10 @@ targets += config_data.gz
 $(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE
        $(call if_changed,gzip)
 
-quiet_cmd_ikconfiggz = IKCFG   $@
-      cmd_ikconfiggz = (echo "static const char kernel_config_data[] __used = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;") > $@
+      filechk_ikconfiggz = (echo "static const char kernel_config_data[] __used = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;")
 targets += config_data.h
 $(obj)/config_data.h: $(obj)/config_data.gz FORCE
-       $(call if_changed,ikconfiggz)
+       $(call filechk,ikconfiggz)
 
 $(obj)/time.o: $(obj)/timeconst.h
 
index e1c72c0f512baf8044847e1428592ecf8f1c2821..a63507b92ca462073b6651e7d07640c48f26a933 100644 (file)
@@ -1697,7 +1697,6 @@ int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen)
 {
        char *start;
        struct dentry *dentry = rcu_dereference_check(cgrp->dentry,
-                                                     rcu_read_lock_held() ||
                                                      cgroup_lock_is_held());
 
        if (!dentry || cgrp == dummytop) {
@@ -1723,7 +1722,6 @@ int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen)
                        break;
 
                dentry = rcu_dereference_check(cgrp->dentry,
-                                              rcu_read_lock_held() ||
                                               cgroup_lock_is_held());
                if (!cgrp->parent)
                        continue;
@@ -4814,8 +4812,7 @@ unsigned short css_id(struct cgroup_subsys_state *css)
         * on this or this is under rcu_read_lock(). Once css->id is allocated,
         * it's unchanged until freed.
         */
-       cssid = rcu_dereference_check(css->id,
-                       rcu_read_lock_held() || atomic_read(&css->refcnt));
+       cssid = rcu_dereference_check(css->id, atomic_read(&css->refcnt));
 
        if (cssid)
                return cssid->id;
@@ -4827,8 +4824,7 @@ unsigned short css_depth(struct cgroup_subsys_state *css)
 {
        struct css_id *cssid;
 
-       cssid = rcu_dereference_check(css->id,
-                       rcu_read_lock_held() || atomic_read(&css->refcnt));
+       cssid = rcu_dereference_check(css->id, atomic_read(&css->refcnt));
 
        if (cssid)
                return cssid->depth;
index 73bb192a3d32d2aab43c572697d61af68de2d268..9ee58bb9e60fb0602755445c672c067db8f72ea4 100644 (file)
@@ -85,7 +85,6 @@ static void __exit_signal(struct task_struct *tsk)
        struct tty_struct *uninitialized_var(tty);
 
        sighand = rcu_dereference_check(tsk->sighand,
-                                       rcu_read_lock_held() ||
                                        lockdep_tasklist_lock_is_held());
        spin_lock(&sighand->siglock);
 
@@ -898,7 +897,6 @@ NORET_TYPE void do_exit(long code)
 
        profile_task_exit(tsk);
 
-       WARN_ON(atomic_read(&tsk->fs_excl));
        WARN_ON(blk_needs_flush_plug(tsk));
 
        if (unlikely(in_interrupt()))
index aeae5b11b62efa94682e5f0e862531485408b585..17bf7c8d65114497d5cd076a850d9a013e4d4df5 100644 (file)
@@ -290,7 +290,6 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
 
        /* One for us, one for whoever does the "release_task()" (usually parent) */
        atomic_set(&tsk->usage,2);
-       atomic_set(&tsk->fs_excl, 0);
 #ifdef CONFIG_BLK_DEV_IO_TRACE
        tsk->btrace_seq = 0;
 #endif
index 8d814cbc810950700113fc32b0bcaf8750265118..296fbc84d659d7d5749353e06d814b579ff50989 100644 (file)
@@ -1095,7 +1095,7 @@ size_t crash_get_memory_size(void)
        size_t size = 0;
        mutex_lock(&kexec_mutex);
        if (crashk_res.end != crashk_res.start)
-               size = crashk_res.end - crashk_res.start + 1;
+               size = resource_size(&crashk_res);
        mutex_unlock(&kexec_mutex);
        return size;
 }
index 57a8346a270e07702e21d7bab15303427bf2fce0..e432057f3b2147873f0de30ad00b16bbaecbedb1 100644 (file)
@@ -405,7 +405,6 @@ struct task_struct *pid_task(struct pid *pid, enum pid_type type)
        if (pid) {
                struct hlist_node *first;
                first = rcu_dereference_check(hlist_first_rcu(&pid->tasks[type]),
-                                             rcu_read_lock_held() ||
                                              lockdep_tasklist_lock_is_held());
                if (first)
                        result = hlist_entry(first, struct task_struct, pids[(type)].node);
index 7b856b3458d2fcfbb9fe1f7b34b8e3d61b299a9a..b1914cb9095c98bfc9c95705c15e0c3e015820a4 100644 (file)
@@ -193,8 +193,8 @@ config APM_EMULATION
          notification of APM "events" (e.g. battery status change).
 
          In order to use APM, you will need supporting software. For location
-         and more information, read <file:Documentation/power/pm.txt> and the
-         Battery Powered Linux mini-HOWTO, available from
+         and more information, read <file:Documentation/power/apm-acpi.txt>
+         and the Battery Powered Linux mini-HOWTO, available from
          <http://www.tldp.org/docs.html#howto>.
 
          This driver does not spin down disk drives (see the hdparm(8)
index 2e138db03382adfb86da06b45d619fc1d8a6dd25..ced72102adc2c10488e3e663fa4e328a35f98e78 100644 (file)
@@ -941,7 +941,6 @@ static void rcu_torture_timer(unsigned long unused)
        idx = cur_ops->readlock();
        completed = cur_ops->completed();
        p = rcu_dereference_check(rcu_torture_current,
-                                 rcu_read_lock_held() ||
                                  rcu_read_lock_bh_held() ||
                                  rcu_read_lock_sched_held() ||
                                  srcu_read_lock_held(&srcu_ctl));
@@ -1002,7 +1001,6 @@ rcu_torture_reader(void *arg)
                idx = cur_ops->readlock();
                completed = cur_ops->completed();
                p = rcu_dereference_check(rcu_torture_current,
-                                         rcu_read_lock_held() ||
                                          rcu_read_lock_bh_held() ||
                                          rcu_read_lock_sched_held() ||
                                          srcu_read_lock_held(&srcu_ctl));
index 751a7cc6a5cd621d82f28d618f30562b7f97aeb6..ccacdbdecf452bda8769878ca6e558d13ebb4e74 100644 (file)
@@ -590,7 +590,6 @@ static inline int cpu_of(struct rq *rq)
 
 #define rcu_dereference_check_sched_domain(p) \
        rcu_dereference_check((p), \
-                             rcu_read_lock_held() || \
                              lockdep_is_held(&sched_domains_mutex))
 
 /*
index 39e3e8f1d4ec113de5a7d3b95b545de07ba946b3..d7222a9c82671ea835377022fc3fbaf9f2364cd0 100644 (file)
@@ -1146,8 +1146,7 @@ qualifier:
  * %pi4 print an IPv4 address with leading zeros
  * %pI6 print an IPv6 address with colons
  * %pi6 print an IPv6 address without colons
- * %pI6c print an IPv6 address as specified by
- *   http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-00
+ * %pI6c print an IPv6 address as specified by RFC 5952
  * %pU[bBlL] print a UUID/GUID in big or little endian using lower or upper
  *   case.
  * %n is ignored
index 8ca47a5ee9c8529262c7d7e5a3224e1c2c36d27b..f2f1ca19ed535916af50fcce19a58febda83d38e 100644 (file)
@@ -356,7 +356,7 @@ config CLEANCACHE
          for clean pages that the kernel's pageframe replacement algorithm
          (PFRA) would like to keep around, but can't since there isn't enough
          memory.  So when the PFRA "evicts" a page, it first attempts to use
-         cleancacne code to put the data contained in that page into
+         cleancache code to put the data contained in that page into
          "transcendent memory", memory that is not directly accessible or
          addressable by the kernel and is of unknown and possibly
          time-varying size.  And when a cleancache-enabled
index e56fe35cef0547032faab7ccd095833abd5fbd2f..8290b1e882578b1c07ccf0dc0ec5ed9cfac1aa04 100644 (file)
@@ -505,7 +505,7 @@ static void bdi_remove_from_list(struct backing_dev_info *bdi)
        list_del_rcu(&bdi->bdi_list);
        spin_unlock_bh(&bdi_lock);
 
-       synchronize_rcu();
+       synchronize_rcu_expedited();
 }
 
 int bdi_register(struct backing_dev_info *bdi, struct device *parent,
index 7533574109dae9e754a7cd0667b0e55782da44c8..5cc21f8b4cd3e7e39dcd2f20f4fd0f710cf47dee 100644 (file)
@@ -2739,10 +2739,6 @@ static const struct inode_operations shmem_inode_operations = {
        .listxattr      = shmem_listxattr,
        .removexattr    = shmem_removexattr,
 #endif
-#ifdef CONFIG_TMPFS_POSIX_ACL
-       .check_acl      = generic_check_acl,
-#endif
-
 };
 
 static const struct inode_operations shmem_dir_inode_operations = {
@@ -2765,7 +2761,6 @@ static const struct inode_operations shmem_dir_inode_operations = {
 #endif
 #ifdef CONFIG_TMPFS_POSIX_ACL
        .setattr        = shmem_setattr,
-       .check_acl      = generic_check_acl,
 #endif
 };
 
@@ -2778,7 +2773,6 @@ static const struct inode_operations shmem_special_inode_operations = {
 #endif
 #ifdef CONFIG_TMPFS_POSIX_ACL
        .setattr        = shmem_setattr,
-       .check_acl      = generic_check_acl,
 #endif
 };
 
index ba83f3fd07572c0a6175a5c088b6739d5619fd8b..f8f5e8efeb88ee093a7d2e5535f3b2b56d467e4e 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4159,7 +4159,7 @@ static int any_slab_objects(struct kmem_cache *s)
 #endif
 
 #define to_slab_attr(n) container_of(n, struct slab_attribute, attr)
-#define to_slab(n) container_of(n, struct kmem_cache, kobj);
+#define to_slab(n) container_of(n, struct kmem_cache, kobj)
 
 struct slab_attribute {
        struct attribute attr;
index 26377e96fa1cf129d2b495c872647ca74281b5fd..bf2a333ca7c7651812f5318d644d19d185efff61 100644 (file)
@@ -216,7 +216,6 @@ unlock:
 nlmsg_failure:
        pr_debug("error during NLMSG_PUT. This should "
                 "not happen, please report to author.\n");
-       goto unlock;
 alloc_failure:
        goto unlock;
 }
index 2b18053070c1d45c08b8b9c7f1711f84006134a0..3460108810d5ea60930d87d15d1057187a427bb2 100644 (file)
@@ -57,29 +57,29 @@ static inline u32 u16_field_get(u8 *preq_elem, int offset, bool ae)
 #define PREQ_IE_TTL(x)         (*(x + 2))
 #define PREQ_IE_PREQ_ID(x)     u32_field_get(x, 3, 0)
 #define PREQ_IE_ORIG_ADDR(x)   (x + 7)
-#define PREQ_IE_ORIG_SN(x)     u32_field_get(x, 13, 0);
-#define PREQ_IE_LIFETIME(x)    u32_field_get(x, 17, AE_F_SET(x));
-#define PREQ_IE_METRIC(x)      u32_field_get(x, 21, AE_F_SET(x));
+#define PREQ_IE_ORIG_SN(x)     u32_field_get(x, 13, 0)
+#define PREQ_IE_LIFETIME(x)    u32_field_get(x, 17, AE_F_SET(x))
+#define PREQ_IE_METRIC(x)      u32_field_get(x, 21, AE_F_SET(x))
 #define PREQ_IE_TARGET_F(x)    (*(AE_F_SET(x) ? x + 32 : x + 26))
 #define PREQ_IE_TARGET_ADDR(x)         (AE_F_SET(x) ? x + 33 : x + 27)
-#define PREQ_IE_TARGET_SN(x)   u32_field_get(x, 33, AE_F_SET(x));
+#define PREQ_IE_TARGET_SN(x)   u32_field_get(x, 33, AE_F_SET(x))
 
 
 #define PREP_IE_FLAGS(x)       PREQ_IE_FLAGS(x)
 #define PREP_IE_HOPCOUNT(x)    PREQ_IE_HOPCOUNT(x)
 #define PREP_IE_TTL(x)         PREQ_IE_TTL(x)
 #define PREP_IE_ORIG_ADDR(x)   (x + 3)
-#define PREP_IE_ORIG_SN(x)     u32_field_get(x, 9, 0);
-#define PREP_IE_LIFETIME(x)    u32_field_get(x, 13, AE_F_SET(x));
-#define PREP_IE_METRIC(x)      u32_field_get(x, 17, AE_F_SET(x));
+#define PREP_IE_ORIG_SN(x)     u32_field_get(x, 9, 0)
+#define PREP_IE_LIFETIME(x)    u32_field_get(x, 13, AE_F_SET(x))
+#define PREP_IE_METRIC(x)      u32_field_get(x, 17, AE_F_SET(x))
 #define PREP_IE_TARGET_ADDR(x) (AE_F_SET(x) ? x + 27 : x + 21)
-#define PREP_IE_TARGET_SN(x)   u32_field_get(x, 27, AE_F_SET(x));
+#define PREP_IE_TARGET_SN(x)   u32_field_get(x, 27, AE_F_SET(x))
 
 #define PERR_IE_TTL(x)         (*(x))
 #define PERR_IE_TARGET_FLAGS(x)        (*(x + 2))
 #define PERR_IE_TARGET_ADDR(x) (x + 3)
-#define PERR_IE_TARGET_SN(x)   u32_field_get(x, 9, 0);
-#define PERR_IE_TARGET_RCODE(x)        u16_field_get(x, 13, 0);
+#define PERR_IE_TARGET_SN(x)   u32_field_get(x, 9, 0)
+#define PERR_IE_TARGET_RCODE(x)        u16_field_get(x, 13, 0)
 
 #define MSEC_TO_TU(x) (x*1000/1024)
 #define SN_GT(x, y) ((long) (y) - (long) (x) < 0)
index b83870bf60fa0ad976096155bb8cae0530d2be50..3db78b696c5ce4d6c844a4c0e81e4d3d7e32059a 100644 (file)
@@ -97,7 +97,6 @@ struct sta_info *sta_info_get(struct ieee80211_sub_if_data *sdata,
        struct sta_info *sta;
 
        sta = rcu_dereference_check(local->sta_hash[STA_HASH(addr)],
-                                   rcu_read_lock_held() ||
                                    lockdep_is_held(&local->sta_lock) ||
                                    lockdep_is_held(&local->sta_mtx));
        while (sta) {
@@ -105,7 +104,6 @@ struct sta_info *sta_info_get(struct ieee80211_sub_if_data *sdata,
                    memcmp(sta->sta.addr, addr, ETH_ALEN) == 0)
                        break;
                sta = rcu_dereference_check(sta->hnext,
-                                           rcu_read_lock_held() ||
                                            lockdep_is_held(&local->sta_lock) ||
                                            lockdep_is_held(&local->sta_mtx));
        }
@@ -123,7 +121,6 @@ struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
        struct sta_info *sta;
 
        sta = rcu_dereference_check(local->sta_hash[STA_HASH(addr)],
-                                   rcu_read_lock_held() ||
                                    lockdep_is_held(&local->sta_lock) ||
                                    lockdep_is_held(&local->sta_mtx));
        while (sta) {
@@ -132,7 +129,6 @@ struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
                    memcmp(sta->sta.addr, addr, ETH_ALEN) == 0)
                        break;
                sta = rcu_dereference_check(sta->hnext,
-                                           rcu_read_lock_held() ||
                                            lockdep_is_held(&local->sta_lock) ||
                                            lockdep_is_held(&local->sta_mtx));
        }
index de0d8e4cbfb64db0794f3f38ad151e607ec30f2f..2aa975e5452d90ca3a3758c5b8f4a5d5b9357c56 100644 (file)
@@ -55,8 +55,7 @@ struct netlbl_domhsh_tbl {
  * should be okay */
 static DEFINE_SPINLOCK(netlbl_domhsh_lock);
 #define netlbl_domhsh_rcu_deref(p) \
-       rcu_dereference_check(p, rcu_read_lock_held() || \
-                                lockdep_is_held(&netlbl_domhsh_lock))
+       rcu_dereference_check(p, lockdep_is_held(&netlbl_domhsh_lock))
 static struct netlbl_domhsh_tbl *netlbl_domhsh = NULL;
 static struct netlbl_dom_map *netlbl_domhsh_def = NULL;
 
index 8efd061a0ae94ce87edb04b158c8b20ee36b28a2..9a290ef5c1757421c638245fc9000afda6fd3c10 100644 (file)
@@ -116,8 +116,7 @@ struct netlbl_unlhsh_walk_arg {
  * hash table should be okay */
 static DEFINE_SPINLOCK(netlbl_unlhsh_lock);
 #define netlbl_unlhsh_rcu_deref(p) \
-       rcu_dereference_check(p, rcu_read_lock_held() || \
-                                lockdep_is_held(&netlbl_unlhsh_lock))
+       rcu_dereference_check(p, lockdep_is_held(&netlbl_unlhsh_lock))
 static struct netlbl_unlhsh_tbl *netlbl_unlhsh = NULL;
 static struct netlbl_unlhsh_iface *netlbl_unlhsh_def = NULL;
 
index be39cd1c74cff6009eac1120c1eafe18085ed37e..d897278b1f975f0c4a3af72ec32406056fc76bc9 100644 (file)
@@ -20,6 +20,10 @@ depfile = $(subst $(comma),_,$(dot-target).d)
 # filename of target with directory and extension stripped
 basetarget = $(basename $(notdir $@))
 
+###
+# filename of first prerequisite with directory and extension stripped
+baseprereq = $(basename $(notdir $<))
+
 ###
 # Escape single quote for use in echo statements
 escsq = $(subst $(squote),'\$(squote)',$1)
index 93b2b5938a2e9e714590ca9728ec53a39763db06..aeea84a2483638e8fd30379ca7c2c695dd1aff6a 100644 (file)
@@ -160,13 +160,51 @@ ld_flags       = $(LDFLAGS) $(ldflags-y)
 modname-multi = $(sort $(foreach m,$(multi-used),\
                $(if $(filter $(subst $(obj)/,,$*.o), $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=))))
 
+ifdef REGENERATE_PARSERS
+
+# GPERF
+# ---------------------------------------------------------------------------
+quiet_cmd_gperf = GPERF $@
+      cmd_gperf = gperf -t --output-file $@ -a -C -E -g -k 1,3,$$ -p -t $<
+
+$(src)/%.hash.c_shipped: $(src)/%.gperf
+       $(call cmd,gperf)
+
+# LEX
+# ---------------------------------------------------------------------------
+LEX_PREFIX = $(if $(LEX_PREFIX_${baseprereq}),$(LEX_PREFIX_${baseprereq}),yy)
+
+quiet_cmd_flex = LEX     $@
+      cmd_flex = flex -o$@ -L -P $(LEX_PREFIX) $<
+
+$(src)/%.lex.c_shipped: $(src)/%.l
+       $(call cmd,flex)
+
+# YACC
+# ---------------------------------------------------------------------------
+YACC_PREFIX = $(if $(YACC_PREFIX_${baseprereq}),$(YACC_PREFIX_${baseprereq}),yy)
+
+quiet_cmd_bison = YACC    $@
+      cmd_bison = bison -o$@ -t -l -p $(YACC_PREFIX) $<
+
+$(src)/%.tab.c_shipped: $(src)/%.y
+       $(call cmd,bison)
+
+quiet_cmd_bison_h = YACC    $@
+      cmd_bison_h = bison -o/dev/null --defines=$@ -t -l -p $(YACC_PREFIX) $<
+
+$(src)/%.tab.h_shipped: $(src)/%.y
+       $(call cmd,bison_h)
+
+endif
+
 # Shipped files
 # ===========================================================================
 
 quiet_cmd_shipped = SHIPPED $@
 cmd_shipped = cat $< > $@
 
-$(obj)/%:: $(src)/%_shipped
+$(obj)/%: $(src)/%_shipped
        $(call cmd,shipped)
 
 # Commands useful for building a boot image
index 56dfafc73c1a4559ee63c01b5a4d35dda0f2df73..08dce14f2dc862d78d30744e0e7cd7b4e915cc64 100644 (file)
@@ -18,7 +18,7 @@
 
 # Step 3 is used to place certain information in the module's ELF
 # section, including information such as:
-#   Version magic (see include/vermagic.h for full details)
+#   Version magic (see include/linux/vermagic.h for full details)
 #     - Kernel release
 #     - SMP is CONFIG_SMP
 #     - PREEMPT is CONFIG_PREEMPT
index 12caa822a232eeddc0fc97606fc5002a86a4daf7..b78fca994a15947a53a4c8438acabdbf771181ff 100644 (file)
@@ -44,7 +44,7 @@ my %end;
 my %type;
 my $done = 0;
 my $maxtime = 0;
-my $firsttime = 100;
+my $firsttime = 99999;
 my $count = 0;
 my %pids;
 my %pidctr;
index 98dec87974d0219fe698554103946a4c82203b34..4cfdc1797eb8c30d985505838eee6d754b222cbf 100644 (file)
@@ -205,8 +205,7 @@ static void find_export_symbols(char * filename)
                                PATH_MAX - strlen(real_filename));
                sym = add_new_file(filename);
                fp = fopen(real_filename, "r");
-               if (fp == NULL)
-               {
+               if (fp == NULL) {
                        fprintf(stderr, "docproc: ");
                        perror(real_filename);
                        exit(1);
@@ -487,8 +486,7 @@ static void parse_file(FILE *infile)
                                default:
                                        defaultline(line);
                        }
-               }
-               else {
+               } else {
                        defaultline(line);
                }
        }
@@ -519,8 +517,7 @@ int main(int argc, char *argv[])
                 exit(2);
         }
 
-       if (strcmp("doc", argv[1]) == 0)
-       {
+       if (strcmp("doc", argv[1]) == 0) {
                /* Need to do this in two passes.
                 * First pass is used to collect all symbols exported
                 * in the various files;
@@ -556,9 +553,7 @@ int main(int argc, char *argv[])
                        fprintf(stderr, "Warning: didn't use docs for %s\n",
                                all_list[i]);
                }
-       }
-       else if (strcmp("depend", argv[1]) == 0)
-       {
+       } else if (strcmp("depend", argv[1]) == 0) {
                /* Create first part of dependency chain
                 * file.tmpl */
                printf("%s\t", argv[2]);
@@ -571,9 +566,7 @@ int main(int argc, char *argv[])
                findall           = adddep;
                parse_file(infile);
                printf("\n");
-       }
-       else
-       {
+       } else {
                fprintf(stderr, "Unknown option: %s\n", argv[1]);
                exit(1);
        }
index 04a31c17639f84f3555389aa4d8980fe324d1e6a..6d1c6bb9f224d9e01303f15fdadef7643075e6c5 100644 (file)
@@ -25,31 +25,5 @@ HOSTCFLAGS_dtc-lexer.lex.o := $(HOSTCFLAGS_DTC)
 HOSTCFLAGS_dtc-parser.tab.o := $(HOSTCFLAGS_DTC)
 
 # dependencies on generated files need to be listed explicitly
-$(obj)/dtc-parser.tab.o: $(obj)/dtc-parser.tab.c $(obj)/dtc-parser.tab.h
-$(obj)/dtc-lexer.lex.o:  $(obj)/dtc-lexer.lex.c $(obj)/dtc-parser.tab.h
+$(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h
 
-targets += dtc-parser.tab.c dtc-lexer.lex.c
-
-clean-files += dtc-parser.tab.h
-
-# GENERATE_PARSER := 1         # Uncomment to rebuild flex/bison output
-
-ifdef GENERATE_PARSER
-
-BISON = bison
-FLEX = flex
-
-quiet_cmd_bison = BISON   $@
-      cmd_bison = $(BISON) -o$@ -d $<; cp $@ $@_shipped
-quiet_cmd_flex = FLEX    $@
-      cmd_flex = $(FLEX) -o$@ $<; cp $@ $@_shipped
-
-$(obj)/dtc-parser.tab.c: $(src)/dtc-parser.y FORCE
-        $(call if_changed,bison)
-
-$(obj)/dtc-parser.tab.h: $(obj)/dtc-parser.tab.c
-
-$(obj)/dtc-lexer.lex.c: $(src)/dtc-lexer.l FORCE
-        $(call if_changed,flex)
-
-endif
index 50c4420b4b2c9c6894d66bc7df30b0203637ec4f..8bbe128170505175f3182fb192ff5d9a55caf988 100644 (file)
@@ -1,6 +1,5 @@
-#line 2 "dtc-lexer.lex.c"
 
-#line 4 "dtc-lexer.lex.c"
+#line 3 "scripts/dtc/dtc-lexer.lex.c_shipped"
 
 #define  YY_INT_ALIGNED short int
 
@@ -54,6 +53,7 @@ typedef int flex_int32_t;
 typedef unsigned char flex_uint8_t; 
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
 
 /* Limits of integral types. */
 #ifndef INT8_MIN
@@ -84,8 +84,6 @@ typedef unsigned int flex_uint32_t;
 #define UINT32_MAX             (4294967295U)
 #endif
 
-#endif /* ! C99 */
-
 #endif /* ! FLEXINT_H */
 
 #ifdef __cplusplus
@@ -142,15 +140,7 @@ typedef unsigned int flex_uint32_t;
 
 /* Size of default input buffer. */
 #ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
 #define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
 #endif
 
 /* The state buf must be large enough to hold one state per character in the main buffer.
@@ -550,7 +540,6 @@ int yy_flex_debug = 0;
 #define YY_MORE_ADJ 0
 #define YY_RESTORE_YY_MORE_OFFSET
 char *yytext;
-#line 1 "dtc-lexer.l"
 /*
  * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation.  2005.
  *
@@ -572,10 +561,6 @@ char *yytext;
  */
 #define YY_NO_INPUT 1
 
-
-
-
-#line 37 "dtc-lexer.l"
 #include "dtc.h"
 #include "srcpos.h"
 #include "dtc-parser.tab.h"
@@ -603,7 +588,6 @@ static int dts_version = 1;
 
 static void push_input_file(const char *filename);
 static int pop_input_file(void);
-#line 607 "dtc-lexer.lex.c"
 
 #define INITIAL 0
 #define INCLUDE 1
@@ -686,12 +670,7 @@ static int input (void );
 
 /* Amount of stuff to slurp up with each read. */
 #ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
 #define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
 #endif
 
 /* Copy whatever the last rule matched to the standard output. */
@@ -710,7 +689,7 @@ static int input (void );
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
                { \
                int c = '*'; \
-               size_t n; \
+               unsigned n; \
                for ( n = 0; n < max_size && \
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
                        buf[n] = (char) c; \
@@ -792,10 +771,6 @@ YY_DECL
        register char *yy_cp, *yy_bp;
        register int yy_act;
     
-#line 66 "dtc-lexer.l"
-
-#line 798 "dtc-lexer.lex.c"
-
        if ( !(yy_init) )
                {
                (yy_init) = 1;
@@ -876,7 +851,6 @@ do_action:  /* This label is used only to access EOF actions. */
 case 1:
 /* rule 1 can match eol */
 YY_RULE_SETUP
-#line 67 "dtc-lexer.l"
 {
                        char *name = strchr(yytext, '\"') + 1;
                        yytext[yyleng-1] = '\0';
@@ -888,7 +862,6 @@ case YY_STATE_EOF(INCLUDE):
 case YY_STATE_EOF(BYTESTRING):
 case YY_STATE_EOF(PROPNODENAME):
 case YY_STATE_EOF(V1):
-#line 73 "dtc-lexer.l"
 {
                        if (!pop_input_file()) {
                                yyterminate();
@@ -898,7 +871,6 @@ case YY_STATE_EOF(V1):
 case 2:
 /* rule 2 can match eol */
 YY_RULE_SETUP
-#line 79 "dtc-lexer.l"
 {
                        DPRINT("String: %s\n", yytext);
                        yylval.data = data_copy_escape_string(yytext+1,
@@ -908,7 +880,6 @@ YY_RULE_SETUP
        YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 86 "dtc-lexer.l"
 {
                        DPRINT("Keyword: /dts-v1/\n");
                        dts_version = 1;
@@ -918,7 +889,6 @@ YY_RULE_SETUP
        YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 93 "dtc-lexer.l"
 {
                        DPRINT("Keyword: /memreserve/\n");
                        BEGIN_DEFAULT();
@@ -927,7 +897,6 @@ YY_RULE_SETUP
        YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 99 "dtc-lexer.l"
 {
                        DPRINT("Label: %s\n", yytext);
                        yylval.labelref = xstrdup(yytext);
@@ -937,7 +906,6 @@ YY_RULE_SETUP
        YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 106 "dtc-lexer.l"
 {
                        yylval.literal = xstrdup(yytext);
                        DPRINT("Literal: '%s'\n", yylval.literal);
@@ -946,7 +914,6 @@ YY_RULE_SETUP
        YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 112 "dtc-lexer.l"
 {      /* label reference */
                        DPRINT("Ref: %s\n", yytext+1);
                        yylval.labelref = xstrdup(yytext+1);
@@ -955,7 +922,6 @@ YY_RULE_SETUP
        YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 118 "dtc-lexer.l"
 {      /* new-style path reference */
                        yytext[yyleng-1] = '\0';
                        DPRINT("Ref: %s\n", yytext+2);
@@ -965,7 +931,6 @@ YY_RULE_SETUP
        YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 125 "dtc-lexer.l"
 {
                        yylval.byte = strtol(yytext, NULL, 16);
                        DPRINT("Byte: %02x\n", (int)yylval.byte);
@@ -974,7 +939,6 @@ YY_RULE_SETUP
        YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 131 "dtc-lexer.l"
 {
                        DPRINT("/BYTESTRING\n");
                        BEGIN_DEFAULT();
@@ -983,7 +947,6 @@ YY_RULE_SETUP
        YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 137 "dtc-lexer.l"
 {
                        DPRINT("PropNodeName: %s\n", yytext);
                        yylval.propnodename = xstrdup(yytext);
@@ -993,7 +956,6 @@ YY_RULE_SETUP
        YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 144 "dtc-lexer.l"
 {
                        DPRINT("Binary Include\n");
                        return DT_INCBIN;
@@ -1002,24 +964,20 @@ YY_RULE_SETUP
 case 13:
 /* rule 13 can match eol */
 YY_RULE_SETUP
-#line 149 "dtc-lexer.l"
 /* eat whitespace */
        YY_BREAK
 case 14:
 /* rule 14 can match eol */
 YY_RULE_SETUP
-#line 150 "dtc-lexer.l"
 /* eat C-style comments */
        YY_BREAK
 case 15:
 /* rule 15 can match eol */
 YY_RULE_SETUP
-#line 151 "dtc-lexer.l"
 /* eat C++-style comments */
        YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 153 "dtc-lexer.l"
 {
                        DPRINT("Char: %c (\\x%02x)\n", yytext[0],
                                (unsigned)yytext[0]);
@@ -1037,10 +995,8 @@ YY_RULE_SETUP
        YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 168 "dtc-lexer.l"
 ECHO;
        YY_BREAK
-#line 1044 "dtc-lexer.lex.c"
 
        case YY_END_OF_BUFFER:
                {
@@ -1756,8 +1712,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
 
 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
  * scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
  * 
  * @return the newly allocated buffer state object.
  */
@@ -1996,10 +1952,6 @@ void yyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 168 "dtc-lexer.l"
-
-
-
 static void push_input_file(const char *filename)
 {
        assert(filename);
@@ -2011,7 +1963,6 @@ static void push_input_file(const char *filename)
        yypush_buffer_state(yy_create_buffer(yyin,YY_BUF_SIZE));
 }
 
-
 static int pop_input_file(void)
 {
        if (srcfile_pop() == 0)
index 9be2eea18a304d8ca28cd812b6610fc546cfc00d..b05921e1e848c3e682eedcdeb8c901ea54b8b2eb 100644 (file)
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    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
@@ -46,7 +45,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -67,8 +66,6 @@
 
 /* Copy the first part of user declarations.  */
 
-/* Line 189 of yacc.c  */
-#line 21 "dtc-parser.y"
 
 #include <stdio.h>
 
@@ -87,12 +84,10 @@ extern int treesource_error;
 static unsigned long long eval_literal(const char *s, int base, int bits);
 
 
-/* Line 189 of yacc.c  */
-#line 92 "dtc-parser.tab.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
-# define YYDEBUG 0
+# define YYDEBUG 1
 #endif
 
 /* Enabling verbose error messages.  */
@@ -134,8 +129,6 @@ static unsigned long long eval_literal(const char *s, int base, int bits);
 typedef union YYSTYPE
 {
 
-/* Line 214 of yacc.c  */
-#line 39 "dtc-parser.y"
 
        char *propnodename;
        char *literal;
@@ -154,8 +147,6 @@ typedef union YYSTYPE
 
 
 
-/* Line 214 of yacc.c  */
-#line 159 "dtc-parser.tab.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -166,8 +157,6 @@ typedef union YYSTYPE
 /* Copy the second part of user declarations.  */
 
 
-/* Line 264 of yacc.c  */
-#line 171 "dtc-parser.tab.c"
 
 #ifdef short
 # undef short
@@ -217,7 +206,7 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -607,9 +596,18 @@ static const yytype_uint8 yystos[] =
 
 /* Like YYERROR except do call yyerror.  This remains here temporarily
    to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
 
 #define YYFAIL         goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
@@ -666,7 +664,7 @@ while (YYID (0))
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)                 \
      fprintf (File, "%d.%d-%d.%d",                     \
              (Loc).first_line, (Loc).first_column,     \
@@ -1405,8 +1403,6 @@ yyreduce:
     {
         case 2:
 
-/* Line 1455 of yacc.c  */
-#line 87 "dtc-parser.y"
     {
                        the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node),
                                                        guess_boot_cpuid((yyvsp[(4) - (4)].node)));
@@ -1415,8 +1411,6 @@ yyreduce:
 
   case 3:
 
-/* Line 1455 of yacc.c  */
-#line 95 "dtc-parser.y"
     {
                        (yyval.re) = NULL;
                ;}
@@ -1424,8 +1418,6 @@ yyreduce:
 
   case 4:
 
-/* Line 1455 of yacc.c  */
-#line 99 "dtc-parser.y"
     {
                        (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
                ;}
@@ -1433,8 +1425,6 @@ yyreduce:
 
   case 5:
 
-/* Line 1455 of yacc.c  */
-#line 106 "dtc-parser.y"
     {
                        (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].addr), (yyvsp[(3) - (4)].addr));
                ;}
@@ -1442,8 +1432,6 @@ yyreduce:
 
   case 6:
 
-/* Line 1455 of yacc.c  */
-#line 110 "dtc-parser.y"
     {
                        add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref));
                        (yyval.re) = (yyvsp[(2) - (2)].re);
@@ -1452,8 +1440,6 @@ yyreduce:
 
   case 7:
 
-/* Line 1455 of yacc.c  */
-#line 118 "dtc-parser.y"
     {
                        (yyval.addr) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64);
                ;}
@@ -1461,8 +1447,6 @@ yyreduce:
 
   case 8:
 
-/* Line 1455 of yacc.c  */
-#line 125 "dtc-parser.y"
     {
                        (yyval.node) = name_node((yyvsp[(2) - (2)].node), "");
                ;}
@@ -1470,8 +1454,6 @@ yyreduce:
 
   case 9:
 
-/* Line 1455 of yacc.c  */
-#line 129 "dtc-parser.y"
     {
                        (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
                ;}
@@ -1479,8 +1461,6 @@ yyreduce:
 
   case 10:
 
-/* Line 1455 of yacc.c  */
-#line 133 "dtc-parser.y"
     {
                        struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref));
 
@@ -1494,8 +1474,6 @@ yyreduce:
 
   case 11:
 
-/* Line 1455 of yacc.c  */
-#line 146 "dtc-parser.y"
     {
                        (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
                ;}
@@ -1503,8 +1481,6 @@ yyreduce:
 
   case 12:
 
-/* Line 1455 of yacc.c  */
-#line 153 "dtc-parser.y"
     {
                        (yyval.proplist) = NULL;
                ;}
@@ -1512,8 +1488,6 @@ yyreduce:
 
   case 13:
 
-/* Line 1455 of yacc.c  */
-#line 157 "dtc-parser.y"
     {
                        (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
                ;}
@@ -1521,8 +1495,6 @@ yyreduce:
 
   case 14:
 
-/* Line 1455 of yacc.c  */
-#line 164 "dtc-parser.y"
     {
                        (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data));
                ;}
@@ -1530,8 +1502,6 @@ yyreduce:
 
   case 15:
 
-/* Line 1455 of yacc.c  */
-#line 168 "dtc-parser.y"
     {
                        (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data);
                ;}
@@ -1539,8 +1509,6 @@ yyreduce:
 
   case 16:
 
-/* Line 1455 of yacc.c  */
-#line 172 "dtc-parser.y"
     {
                        add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref));
                        (yyval.prop) = (yyvsp[(2) - (2)].prop);
@@ -1549,8 +1517,6 @@ yyreduce:
 
   case 17:
 
-/* Line 1455 of yacc.c  */
-#line 180 "dtc-parser.y"
     {
                        (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
                ;}
@@ -1558,8 +1524,6 @@ yyreduce:
 
   case 18:
 
-/* Line 1455 of yacc.c  */
-#line 184 "dtc-parser.y"
     {
                        (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
                ;}
@@ -1567,8 +1531,6 @@ yyreduce:
 
   case 19:
 
-/* Line 1455 of yacc.c  */
-#line 188 "dtc-parser.y"
     {
                        (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
                ;}
@@ -1576,8 +1538,6 @@ yyreduce:
 
   case 20:
 
-/* Line 1455 of yacc.c  */
-#line 192 "dtc-parser.y"
     {
                        (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
                ;}
@@ -1585,8 +1545,6 @@ yyreduce:
 
   case 21:
 
-/* Line 1455 of yacc.c  */
-#line 196 "dtc-parser.y"
     {
                        FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL);
                        struct data d;
@@ -1607,8 +1565,6 @@ yyreduce:
 
   case 22:
 
-/* Line 1455 of yacc.c  */
-#line 213 "dtc-parser.y"
     {
                        FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL);
                        struct data d = empty_data;
@@ -1622,8 +1578,6 @@ yyreduce:
 
   case 23:
 
-/* Line 1455 of yacc.c  */
-#line 223 "dtc-parser.y"
     {
                        (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
                ;}
@@ -1631,8 +1585,6 @@ yyreduce:
 
   case 24:
 
-/* Line 1455 of yacc.c  */
-#line 230 "dtc-parser.y"
     {
                        (yyval.data) = empty_data;
                ;}
@@ -1640,8 +1592,6 @@ yyreduce:
 
   case 25:
 
-/* Line 1455 of yacc.c  */
-#line 234 "dtc-parser.y"
     {
                        (yyval.data) = (yyvsp[(1) - (2)].data);
                ;}
@@ -1649,8 +1599,6 @@ yyreduce:
 
   case 26:
 
-/* Line 1455 of yacc.c  */
-#line 238 "dtc-parser.y"
     {
                        (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
                ;}
@@ -1658,8 +1606,6 @@ yyreduce:
 
   case 27:
 
-/* Line 1455 of yacc.c  */
-#line 245 "dtc-parser.y"
     {
                        (yyval.data) = empty_data;
                ;}
@@ -1667,8 +1613,6 @@ yyreduce:
 
   case 28:
 
-/* Line 1455 of yacc.c  */
-#line 249 "dtc-parser.y"
     {
                        (yyval.data) = data_append_cell((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].cell));
                ;}
@@ -1676,8 +1620,6 @@ yyreduce:
 
   case 29:
 
-/* Line 1455 of yacc.c  */
-#line 253 "dtc-parser.y"
     {
                        (yyval.data) = data_append_cell(data_add_marker((yyvsp[(1) - (2)].data), REF_PHANDLE,
                                                              (yyvsp[(2) - (2)].labelref)), -1);
@@ -1686,8 +1628,6 @@ yyreduce:
 
   case 30:
 
-/* Line 1455 of yacc.c  */
-#line 258 "dtc-parser.y"
     {
                        (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
                ;}
@@ -1695,8 +1635,6 @@ yyreduce:
 
   case 31:
 
-/* Line 1455 of yacc.c  */
-#line 265 "dtc-parser.y"
     {
                        (yyval.cell) = eval_literal((yyvsp[(1) - (1)].literal), 0, 32);
                ;}
@@ -1704,8 +1642,6 @@ yyreduce:
 
   case 32:
 
-/* Line 1455 of yacc.c  */
-#line 272 "dtc-parser.y"
     {
                        (yyval.data) = empty_data;
                ;}
@@ -1713,8 +1649,6 @@ yyreduce:
 
   case 33:
 
-/* Line 1455 of yacc.c  */
-#line 276 "dtc-parser.y"
     {
                        (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
                ;}
@@ -1722,8 +1656,6 @@ yyreduce:
 
   case 34:
 
-/* Line 1455 of yacc.c  */
-#line 280 "dtc-parser.y"
     {
                        (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
                ;}
@@ -1731,8 +1663,6 @@ yyreduce:
 
   case 35:
 
-/* Line 1455 of yacc.c  */
-#line 287 "dtc-parser.y"
     {
                        (yyval.nodelist) = NULL;
                ;}
@@ -1740,8 +1670,6 @@ yyreduce:
 
   case 36:
 
-/* Line 1455 of yacc.c  */
-#line 291 "dtc-parser.y"
     {
                        (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
                ;}
@@ -1749,8 +1677,6 @@ yyreduce:
 
   case 37:
 
-/* Line 1455 of yacc.c  */
-#line 295 "dtc-parser.y"
     {
                        print_error("syntax error: properties must precede subnodes");
                        YYERROR;
@@ -1759,8 +1685,6 @@ yyreduce:
 
   case 38:
 
-/* Line 1455 of yacc.c  */
-#line 303 "dtc-parser.y"
     {
                        (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename));
                ;}
@@ -1768,8 +1692,6 @@ yyreduce:
 
   case 39:
 
-/* Line 1455 of yacc.c  */
-#line 307 "dtc-parser.y"
     {
                        add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref));
                        (yyval.node) = (yyvsp[(2) - (2)].node);
@@ -1778,8 +1700,6 @@ yyreduce:
 
 
 
-/* Line 1455 of yacc.c  */
-#line 1783 "dtc-parser.tab.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1990,8 +1910,6 @@ yyreturn:
 
 
 
-/* Line 1675 of yacc.c  */
-#line 313 "dtc-parser.y"
 
 
 void print_error(char const *fmt, ...)
index 95c9547adea52881532599186551d28e8791b587..4ee682bb7d332e1488b3b30f5e3a368424c1c5f9 100644 (file)
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton interface for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    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
@@ -58,8 +57,6 @@
 typedef union YYSTYPE
 {
 
-/* Line 1676 of yacc.c  */
-#line 39 "dtc-parser.y"
 
        char *propnodename;
        char *literal;
@@ -78,8 +75,6 @@ typedef union YYSTYPE
 
 
 
-/* Line 1676 of yacc.c  */
-#line 83 "dtc-parser.tab.h"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
index 520d16b1ffaf72c4c3171d97dfd1e37893523ef8..98cffcb941ea6e319fd4bee04db7f06de379031b 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Test for gcc 'asm goto' suport
+# Test for gcc 'asm goto' support
 # Copyright (C) 2010, Jason Baron <jbaron@redhat.com>
 
 echo "int main(void) { entry: asm goto (\"\"::::entry); return 0; }" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y"
index be5cadb1b9070c5dc1fd81a9524ad355cc7c912a..86dc07a01b4398a3e72e79584a2c447bb5643780 100644 (file)
@@ -1,4 +1,5 @@
-keywords.c
-lex.c
-parse.[ch]
+*.hash.c
+*.lex.c
+*.tab.c
+*.tab.h
 genksyms
index 13d03cf05d95115571839e2c791fc87fa1c9612a..a5510903e874a35a5cbb238e1eb50a7b82746fd6 100644 (file)
@@ -2,52 +2,12 @@
 hostprogs-y    := genksyms
 always         := $(hostprogs-y)
 
-genksyms-objs  := genksyms.o parse.lex.o
+genksyms-objs  := genksyms.o parse.tab.o lex.lex.o
 
 # -I needed for generated C source (shipped source)
-HOSTCFLAGS_parse.o := -Wno-uninitialized -I$(src)
+HOSTCFLAGS_parse.tab.o := -I$(src)
+HOSTCFLAGS_lex.lex.o := -I$(src)
 
 # dependencies on generated files need to be listed explicitly
-$(obj)/lex.o: $(obj)/parse.h $(obj)/keywords.c
+$(obj)/lex.lex.o: $(obj)/keywords.hash.c $(obj)/parse.tab.h
 
-# -I needed for generated C source (shipped source)
-HOSTCFLAGS_lex.o := -I$(src)
-
-ifdef GENERATE_PARSER
-
-# gperf
-
-quiet_cmd_keywords.c = GPERF   $@
-      cmd_keywords.c = gperf -L ANSI-C -a -C -E -g -H is_reserved_hash \
-                      -k 1,3,$$ -N is_reserved_word -p -t $< > $@
-
-$(obj)/keywords.c: $(obj)/keywords.gperf FORCE
-       $(call if_changed,keywords.c)
-       cp $@ $@_shipped
-
-# flex
-
-quiet_cmd_lex.c = FLEX    $@
-      cmd_lex.c = flex -o$@ -d $<
-
-$(obj)/lex.c: $(obj)/lex.l $(obj)/keywords.c FORCE
-       $(call if_changed,lex.c)
-       cp $@ $@_shipped
-
-# bison
-
-quiet_cmd_parse.c = BISON   $@
-      cmd_parse.c = bison -o$@ -dtv $(filter-out FORCE,$^)
-
-$(obj)/parse.c: $(obj)/parse.y FORCE
-       $(call if_changed,parse.c)
-       cp $@ $@_shipped
-       cp $(@:.c=.h) $(@:.c=.h)_shipped
-
-$(obj)/parse.h: $(obj)/parse.c ;
-
-clean-files    += parse.output
-
-endif
-
-targets += keywords.c lex.c parse.c parse.h
index f9e75531ea0390836bfdc0fa5c8ad5b42ca12924..6d3fda0ce2aeb6a3e0123de2f3d9f61538e7f7d9 100644 (file)
@@ -448,7 +448,7 @@ static struct string_list *read_node(FILE *f)
        node.string = buffer;
 
        if (node.string[1] == '#') {
-               int n;
+               size_t n;
 
                for (n = 0; n < ARRAY_SIZE(symbol_types); n++) {
                        if (node.string[0] == symbol_types[n].n) {
index e6349acb6f2f36994071acd1c30889f1e4a2d583..3e77a943e7b7c08af456f067a3053f21e5579883 100644 (file)
@@ -1,3 +1,6 @@
+%language=ANSI-C
+%define hash-function-name is_reserved_hash
+%define lookup-function-name is_reserved_word
 %{
 struct resword;
 static const struct resword *is_reserved_word(register const char *str, register unsigned int len);
similarity index 94%
rename from scripts/genksyms/keywords.c_shipped
rename to scripts/genksyms/keywords.hash.c_shipped
index 8060e06798b32990c58bba036161f01a74f3b789..82062607e8c05a2d0b51aac33d2d4639ab8f4b30 100644 (file)
@@ -1,5 +1,5 @@
 /* ANSI-C code produced by gperf version 3.0.4 */
-/* Command-line: gperf -L ANSI-C -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t scripts/genksyms/keywords.gperf  */
+/* Command-line: gperf -t --output-file scripts/genksyms/keywords.hash.c_shipped -a -C -E -g -k '1,3,$' -p -t scripts/genksyms/keywords.gperf  */
 
 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
       && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
 #endif
 
-#line 1 "scripts/genksyms/keywords.gperf"
+#line 4 "scripts/genksyms/keywords.gperf"
 
 struct resword;
 static const struct resword *is_reserved_word(register const char *str, register unsigned int len);
-#line 5 "scripts/genksyms/keywords.gperf"
+#line 8 "scripts/genksyms/keywords.gperf"
 struct resword { const char *name; int token; };
 /* maximum key range = 64, duplicates = 0 */
 
@@ -99,108 +99,108 @@ is_reserved_word (register const char *str, register unsigned int len)
   static const struct resword wordlist[] =
     {
       {""}, {""}, {""},
-#line 30 "scripts/genksyms/keywords.gperf"
+#line 33 "scripts/genksyms/keywords.gperf"
       {"asm", ASM_KEYW},
       {""},
-#line 12 "scripts/genksyms/keywords.gperf"
+#line 15 "scripts/genksyms/keywords.gperf"
       {"__asm", ASM_KEYW},
       {""},
-#line 13 "scripts/genksyms/keywords.gperf"
+#line 16 "scripts/genksyms/keywords.gperf"
       {"__asm__", ASM_KEYW},
       {""}, {""},
-#line 56 "scripts/genksyms/keywords.gperf"
+#line 59 "scripts/genksyms/keywords.gperf"
       {"__typeof__", TYPEOF_KEYW},
       {""},
-#line 16 "scripts/genksyms/keywords.gperf"
+#line 19 "scripts/genksyms/keywords.gperf"
       {"__const", CONST_KEYW},
-#line 15 "scripts/genksyms/keywords.gperf"
+#line 18 "scripts/genksyms/keywords.gperf"
       {"__attribute__", ATTRIBUTE_KEYW},
-#line 17 "scripts/genksyms/keywords.gperf"
+#line 20 "scripts/genksyms/keywords.gperf"
       {"__const__", CONST_KEYW},
-#line 22 "scripts/genksyms/keywords.gperf"
+#line 25 "scripts/genksyms/keywords.gperf"
       {"__signed__", SIGNED_KEYW},
-#line 48 "scripts/genksyms/keywords.gperf"
+#line 51 "scripts/genksyms/keywords.gperf"
       {"static", STATIC_KEYW},
       {""},
-#line 43 "scripts/genksyms/keywords.gperf"
+#line 46 "scripts/genksyms/keywords.gperf"
       {"int", INT_KEYW},
-#line 36 "scripts/genksyms/keywords.gperf"
+#line 39 "scripts/genksyms/keywords.gperf"
       {"char", CHAR_KEYW},
-#line 37 "scripts/genksyms/keywords.gperf"
+#line 40 "scripts/genksyms/keywords.gperf"
       {"const", CONST_KEYW},
-#line 49 "scripts/genksyms/keywords.gperf"
+#line 52 "scripts/genksyms/keywords.gperf"
       {"struct", STRUCT_KEYW},
-#line 28 "scripts/genksyms/keywords.gperf"
+#line 31 "scripts/genksyms/keywords.gperf"
       {"__restrict__", RESTRICT_KEYW},
-#line 29 "scripts/genksyms/keywords.gperf"
+#line 32 "scripts/genksyms/keywords.gperf"
       {"restrict", RESTRICT_KEYW},
-#line 9 "scripts/genksyms/keywords.gperf"
+#line 12 "scripts/genksyms/keywords.gperf"
       {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW},
-#line 20 "scripts/genksyms/keywords.gperf"
+#line 23 "scripts/genksyms/keywords.gperf"
       {"__inline__", INLINE_KEYW},
       {""},
-#line 24 "scripts/genksyms/keywords.gperf"
+#line 27 "scripts/genksyms/keywords.gperf"
       {"__volatile__", VOLATILE_KEYW},
-#line 7 "scripts/genksyms/keywords.gperf"
+#line 10 "scripts/genksyms/keywords.gperf"
       {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW},
-#line 27 "scripts/genksyms/keywords.gperf"
+#line 30 "scripts/genksyms/keywords.gperf"
       {"_restrict", RESTRICT_KEYW},
       {""},
-#line 14 "scripts/genksyms/keywords.gperf"
+#line 17 "scripts/genksyms/keywords.gperf"
       {"__attribute", ATTRIBUTE_KEYW},
-#line 8 "scripts/genksyms/keywords.gperf"
+#line 11 "scripts/genksyms/keywords.gperf"
       {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW},
-#line 18 "scripts/genksyms/keywords.gperf"
+#line 21 "scripts/genksyms/keywords.gperf"
       {"__extension__", EXTENSION_KEYW},
-#line 39 "scripts/genksyms/keywords.gperf"
+#line 42 "scripts/genksyms/keywords.gperf"
       {"enum", ENUM_KEYW},
-#line 10 "scripts/genksyms/keywords.gperf"
+#line 13 "scripts/genksyms/keywords.gperf"
       {"EXPORT_UNUSED_SYMBOL", EXPORT_SYMBOL_KEYW},
-#line 40 "scripts/genksyms/keywords.gperf"
+#line 43 "scripts/genksyms/keywords.gperf"
       {"extern", EXTERN_KEYW},
       {""},
-#line 21 "scripts/genksyms/keywords.gperf"
+#line 24 "scripts/genksyms/keywords.gperf"
       {"__signed", SIGNED_KEYW},
-#line 11 "scripts/genksyms/keywords.gperf"
+#line 14 "scripts/genksyms/keywords.gperf"
       {"EXPORT_UNUSED_SYMBOL_GPL", EXPORT_SYMBOL_KEYW},
-#line 51 "scripts/genksyms/keywords.gperf"
+#line 54 "scripts/genksyms/keywords.gperf"
       {"union", UNION_KEYW},
-#line 55 "scripts/genksyms/keywords.gperf"
+#line 58 "scripts/genksyms/keywords.gperf"
       {"typeof", TYPEOF_KEYW},
-#line 50 "scripts/genksyms/keywords.gperf"
+#line 53 "scripts/genksyms/keywords.gperf"
       {"typedef", TYPEDEF_KEYW},
-#line 19 "scripts/genksyms/keywords.gperf"
+#line 22 "scripts/genksyms/keywords.gperf"
       {"__inline", INLINE_KEYW},
-#line 35 "scripts/genksyms/keywords.gperf"
+#line 38 "scripts/genksyms/keywords.gperf"
       {"auto", AUTO_KEYW},
-#line 23 "scripts/genksyms/keywords.gperf"
+#line 26 "scripts/genksyms/keywords.gperf"
       {"__volatile", VOLATILE_KEYW},
       {""}, {""},
-#line 52 "scripts/genksyms/keywords.gperf"
+#line 55 "scripts/genksyms/keywords.gperf"
       {"unsigned", UNSIGNED_KEYW},
       {""},
-#line 46 "scripts/genksyms/keywords.gperf"
+#line 49 "scripts/genksyms/keywords.gperf"
       {"short", SHORT_KEYW},
-#line 42 "scripts/genksyms/keywords.gperf"
+#line 45 "scripts/genksyms/keywords.gperf"
       {"inline", INLINE_KEYW},
       {""},
-#line 54 "scripts/genksyms/keywords.gperf"
+#line 57 "scripts/genksyms/keywords.gperf"
       {"volatile", VOLATILE_KEYW},
-#line 44 "scripts/genksyms/keywords.gperf"
+#line 47 "scripts/genksyms/keywords.gperf"
       {"long", LONG_KEYW},
-#line 26 "scripts/genksyms/keywords.gperf"
+#line 29 "scripts/genksyms/keywords.gperf"
       {"_Bool", BOOL_KEYW},
       {""}, {""},
-#line 45 "scripts/genksyms/keywords.gperf"
+#line 48 "scripts/genksyms/keywords.gperf"
       {"register", REGISTER_KEYW},
-#line 53 "scripts/genksyms/keywords.gperf"
+#line 56 "scripts/genksyms/keywords.gperf"
       {"void", VOID_KEYW},
-#line 41 "scripts/genksyms/keywords.gperf"
+#line 44 "scripts/genksyms/keywords.gperf"
       {"float", FLOAT_KEYW},
-#line 38 "scripts/genksyms/keywords.gperf"
+#line 41 "scripts/genksyms/keywords.gperf"
       {"double", DOUBLE_KEYW},
       {""}, {""}, {""}, {""},
-#line 47 "scripts/genksyms/keywords.gperf"
+#line 50 "scripts/genksyms/keywords.gperf"
       {"signed", SIGNED_KEYW}
     };
 
index e4ddd493fec3eac20061b1d3701a47c0c36c6ab7..400ae06a70df0ba9b17640d8bd67f0756b802f36 100644 (file)
@@ -29,7 +29,7 @@
 #include <ctype.h>
 
 #include "genksyms.h"
-#include "parse.h"
+#include "parse.tab.h"
 
 /* We've got a two-level lexer here.  We let flex do basic tokenization
    and then we categorize those basic tokens in the second stage.  */
@@ -94,7 +94,7 @@ MC_TOKEN              ([~%^&*+=|<>/-]=)|(&&)|("||")|(->)|(<<)|(>>)
 
 /* Bring in the keyword recognizer.  */
 
-#include "keywords.c"
+#include "keywords.hash.c"
 
 
 /* Macros to append to our phrase collection list.  */
similarity index 89%
rename from scripts/genksyms/lex.c_shipped
rename to scripts/genksyms/lex.lex.c_shipped
index af4939041e4b6f082a446fab07b5d79addf30ef0..c83cf60410be1bdf643b5bf478c1ca355e189501 100644 (file)
@@ -1,20 +1,10 @@
-#line 2 "scripts/genksyms/lex.c"
 
-#line 4 "scripts/genksyms/lex.c"
+#line 3 "scripts/genksyms/lex.lex.c_shipped"
 
 #define  YY_INT_ALIGNED short int
 
 /* A lexical scanner generated by flex */
 
-/* %not-for-header */
-
-/* %if-c-only */
-/* %if-not-reentrant */
-
-/* %endif */
-/* %endif */
-/* %ok-for-header */
-
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
 #define YY_FLEX_MINOR_VERSION 5
 #define FLEX_BETA
 #endif
 
-/* %if-c++-only */
-/* %endif */
-
-/* %if-c-only */
-    
-/* %endif */
-
-/* %if-c-only */
-
-/* %endif */
-
 /* First, we deal with  platform-specific or compiler-specific issues. */
 
 /* begin standard C headers. */
-/* %if-c-only */
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
 #include <stdlib.h>
-/* %endif */
 
-/* %if-tables-serialization */
-/* %endif */
 /* end standard C headers. */
 
-/* %if-c-or-c++ */
 /* flex integer type definitions */
 
 #ifndef FLEXINT_H
@@ -112,11 +86,6 @@ typedef unsigned int flex_uint32_t;
 
 #endif /* ! FLEXINT_H */
 
-/* %endif */
-
-/* %if-c++-only */
-/* %endif */
-
 #ifdef __cplusplus
 
 /* The "const" storage-class-modifier is valid. */
@@ -138,13 +107,8 @@ typedef unsigned int flex_uint32_t;
 #define yyconst
 #endif
 
-/* %not-for-header */
-
 /* Returned upon end-of-file. */
 #define YY_NULL 0
-/* %ok-for-header */
-
-/* %not-for-header */
 
 /* Promotes a possibly negative, possibly signed char to an unsigned
  * integer for use as an array index.  If the signed char is negative,
@@ -152,14 +116,6 @@ typedef unsigned int flex_uint32_t;
  * double cast.
  */
 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-/* %ok-for-header */
-
-/* %if-reentrant */
-/* %endif */
-
-/* %if-not-reentrant */
-
-/* %endif */
 
 /* Enter a start condition.  This macro really ought to take a parameter,
  * but we do it the disgusting crufty way forced on us by the ()-less
@@ -196,15 +152,9 @@ typedef unsigned int flex_uint32_t;
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
 #endif
 
-/* %if-not-reentrant */
 extern int yyleng;
-/* %endif */
 
-/* %if-c-only */
-/* %if-not-reentrant */
 extern FILE *yyin, *yyout;
-/* %endif */
-/* %endif */
 
 #define EOB_ACT_CONTINUE_SCAN 0
 #define EOB_ACT_END_OF_FILE 1
@@ -237,12 +187,7 @@ typedef size_t yy_size_t;
 #define YY_STRUCT_YY_BUFFER_STATE
 struct yy_buffer_state
        {
-/* %if-c-only */
        FILE *yy_input_file;
-/* %endif */
-
-/* %if-c++-only */
-/* %endif */
 
        char *yy_ch_buf;                /* input buffer */
        char *yy_buf_pos;               /* current position in input buffer */
@@ -303,19 +248,10 @@ struct yy_buffer_state
        };
 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
 
-/* %if-c-only Standard (non-C++) definition */
-/* %not-for-header */
-
-/* %if-not-reentrant */
-
 /* Stack of input buffers. */
 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
-/* %endif */
-/* %ok-for-header */
-
-/* %endif */
 
 /* We provide macros for accessing buffer states in case in the
  * future we want to put the buffer states in a more general
@@ -332,11 +268,6 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
  */
 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
 
-/* %if-c-only Standard (non-C++) definition */
-
-/* %if-not-reentrant */
-/* %not-for-header */
-
 /* yy_hold_char holds the character lost when yytext is formed. */
 static char yy_hold_char;
 static int yy_n_chars;         /* number of characters read into yy_ch_buf */
@@ -351,9 +282,6 @@ static int yy_start = 0;    /* start state number */
  * instead of setting up a fresh yyin.  A bit of a hack ...
  */
 static int yy_did_buffer_switch_on_eof;
-/* %ok-for-header */
-
-/* %endif */
 
 void yyrestart (FILE *input_file  );
 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
@@ -373,8 +301,6 @@ YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
 
-/* %endif */
-
 void *yyalloc (yy_size_t  );
 void *yyrealloc (void *,yy_size_t  );
 void yyfree (void *  );
@@ -403,14 +329,11 @@ void yyfree (void *  );
 
 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
-/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
 /* Begin user sect3 */
 
 #define yywrap(n) 1
 #define YY_SKIP_YYWRAP
 
-#define FLEX_DEBUG
-
 typedef unsigned char YY_CHAR;
 
 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
@@ -424,28 +347,21 @@ int yylineno = 1;
 extern char *yytext;
 #define yytext_ptr yytext
 
-/* %if-c-only Standard (non-C++) definition */
-
 static yy_state_type yy_get_previous_state (void );
 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
 static int yy_get_next_buffer (void );
 static void yy_fatal_error (yyconst char msg[]  );
 
-/* %endif */
-
 /* Done after the current pattern has been matched and before the
  * corresponding action - sets up yytext.
  */
 #define YY_DO_BEFORE_ACTION \
        (yytext_ptr) = yy_bp; \
-/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
        yyleng = (size_t) (yy_cp - yy_bp); \
        (yy_hold_char) = *yy_cp; \
        *yy_cp = '\0'; \
-/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
        (yy_c_buf_p) = yy_cp;
 
-/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
 #define YY_NUM_RULES 13
 #define YY_END_OF_BUFFER 14
 /* This struct is not used in this scanner,
@@ -610,13 +526,7 @@ static yy_state_type yy_last_accepting_state;
 static char *yy_last_accepting_cpos;
 
 extern int yy_flex_debug;
-int yy_flex_debug = 1;
-
-static yyconst flex_int16_t yy_rule_linenum[13] =
-    {   0,
-       67,   68,   69,   72,   75,   76,   77,   83,   84,   85,
-       87,   90
-    } ;
+int yy_flex_debug = 0;
 
 /* The intent behind this definition is that it'll catch
  * any uses of REJECT which flex missed.
@@ -626,7 +536,6 @@ static yyconst flex_int16_t yy_rule_linenum[13] =
 #define YY_MORE_ADJ 0
 #define YY_RESTORE_YY_MORE_OFFSET
 char *yytext;
-#line 1 "scripts/genksyms/lex.l"
 /* Lexical analysis for genksyms.
    Copyright 1996, 1997 Linux International.
 
@@ -648,7 +557,6 @@ char *yytext;
    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.  */
-#line 25 "scripts/genksyms/lex.l"
 
 #include <limits.h>
 #include <stdlib.h>
@@ -656,7 +564,7 @@ char *yytext;
 #include <ctype.h>
 
 #include "genksyms.h"
-#include "parse.h"
+#include "parse.tab.h"
 
 /* We've got a two-level lexer here.  We let flex do basic tokenization
    and then we categorize those basic tokens in the second stage.  */
@@ -664,7 +572,6 @@ char *yytext;
 
 /* We don't do multiple input files.  */
 #define YY_NO_INPUT 1
-#line 668 "scripts/genksyms/lex.c"
 
 #define INITIAL 0
 
@@ -673,28 +580,15 @@ char *yytext;
  * down here because we want the user's section 1 to have been scanned first.
  * The user has a chance to override it with an option.
  */
-/* %if-c-only */
 #include <unistd.h>
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 #endif
 
 #ifndef YY_EXTRA_TYPE
 #define YY_EXTRA_TYPE void *
 #endif
 
-/* %if-c-only Reentrant structure and macros (non-C++). */
-/* %if-reentrant */
-/* %if-c-only */
-
 static int yy_init_globals (void );
 
-/* %endif */
-/* %if-reentrant */
-/* %endif */
-/* %endif End reentrant structures and macros. */
-
 /* Accessor methods to globals.
    These are made visible to non-reentrant scanners for convenience. */
 
@@ -724,9 +618,6 @@ int yyget_lineno (void );
 
 void yyset_lineno (int line_number  );
 
-/* %if-bison-bridge */
-/* %endif */
-
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
  */
@@ -739,14 +630,8 @@ extern int yywrap (void );
 #endif
 #endif
 
-/* %not-for-header */
-
     static void yyunput (int c,char *buf_ptr  );
     
-/* %ok-for-header */
-
-/* %endif */
-
 #ifndef yytext_ptr
 static void yy_flex_strncpy (char *,yyconst char *,int );
 #endif
@@ -756,23 +641,15 @@ static int yy_flex_strlen (yyconst char * );
 #endif
 
 #ifndef YY_NO_INPUT
-/* %if-c-only Standard (non-C++) definition */
-/* %not-for-header */
 
 #ifdef __cplusplus
 static int yyinput (void );
 #else
 static int input (void );
 #endif
-/* %ok-for-header */
 
-/* %endif */
 #endif
 
-/* %if-c-only */
-
-/* %endif */
-
 /* Amount of stuff to slurp up with each read. */
 #ifndef YY_READ_BUF_SIZE
 #define YY_READ_BUF_SIZE 8192
@@ -780,14 +657,10 @@ static int input (void );
 
 /* Copy whatever the last rule matched to the standard output. */
 #ifndef ECHO
-/* %if-c-only Standard (non-C++) definition */
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
-/* %endif */
-/* %if-c++-only C++ definition */
-/* %endif */
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -795,11 +668,10 @@ static int input (void );
  */
 #ifndef YY_INPUT
 #define YY_INPUT(buf,result,max_size) \
-/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
                { \
                int c = '*'; \
-               int n; \
+               unsigned n; \
                for ( n = 0; n < max_size && \
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
                        buf[n] = (char) c; \
@@ -824,8 +696,6 @@ static int input (void );
                        } \
                }\
 \
-/* %if-c++-only C++ definition \ */\
-/* %endif */
 
 #endif
 
@@ -844,39 +714,20 @@ static int input (void );
 
 /* Report a fatal error. */
 #ifndef YY_FATAL_ERROR
-/* %if-c-only */
 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 #endif
 
-/* %if-tables-serialization structures and prototypes */
-/* %not-for-header */
-
-/* %ok-for-header */
-
-/* %not-for-header */
-
-/* %tables-yydmap generated elements */
-/* %endif */
 /* end tables serialization structures and prototypes */
 
-/* %ok-for-header */
-
 /* Default declaration of generated scanner - a define so the user can
  * easily add parameters.
  */
 #ifndef YY_DECL
 #define YY_DECL_IS_OURS 1
-/* %if-c-only Standard (non-C++) definition */
 
 extern int yylex (void);
 
 #define YY_DECL int yylex (void)
-/* %endif */
-/* %if-c++-only C++ definition */
-/* %endif */
 #endif /* !YY_DECL */
 
 /* Code executed at the beginning of each rule, after yytext and yyleng
@@ -891,15 +742,12 @@ extern int yylex (void);
 #define YY_BREAK break;
 #endif
 
-/* %% [6.0] YY_RULE_SETUP definition goes here */
 #define YY_RULE_SETUP \
        if ( yyleng > 0 ) \
                YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
                                (yytext[yyleng - 1] == '\n'); \
        YY_USER_ACTION
 
-/* %not-for-header */
-
 /** The main scanner function which does all the work.
  */
 YY_DECL
@@ -908,13 +756,7 @@ YY_DECL
        register char *yy_cp, *yy_bp;
        register int yy_act;
     
-/* %% [7.0] user's declarations go here */
-#line 63 "scripts/genksyms/lex.l"
-
-
-
  /* Keep track of our location in the original source files.  */
-#line 918 "scripts/genksyms/lex.c"
 
        if ( !(yy_init) )
                {
@@ -928,18 +770,10 @@ YY_DECL
                        (yy_start) = 1; /* first start state */
 
                if ( ! yyin )
-/* %if-c-only */
                        yyin = stdin;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 
                if ( ! yyout )
-/* %if-c-only */
                        yyout = stdout;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 
                if ( ! YY_CURRENT_BUFFER ) {
                        yyensure_buffer_stack ();
@@ -952,7 +786,6 @@ YY_DECL
 
        while ( 1 )             /* loops until end-of-file is reached */
                {
-/* %% [8.0] yymore()-related code goes here */
                yy_cp = (yy_c_buf_p);
 
                /* Support of yytext. */
@@ -963,7 +796,6 @@ YY_DECL
                 */
                yy_bp = yy_cp;
 
-/* %% [9.0] code to set up and find next match goes here */
                yy_current_state = (yy_start);
                yy_current_state += YY_AT_BOL();
 yy_match:
@@ -987,7 +819,6 @@ yy_match:
                while ( yy_base[yy_current_state] != 266 );
 
 yy_find_action:
-/* %% [10.0] code to find the action number goes here */
                yy_act = yy_accept[yy_current_state];
                if ( yy_act == 0 )
                        { /* have to back up */
@@ -998,30 +829,10 @@ yy_find_action:
 
                YY_DO_BEFORE_ACTION;
 
-/* %% [11.0] code for yylineno update goes here */
-
 do_action:     /* This label is used only to access EOF actions. */
 
-/* %% [12.0] debug code goes here */
-               if ( yy_flex_debug )
-                       {
-                       if ( yy_act == 0 )
-                               fprintf( stderr, "--scanner backing up\n" );
-                       else if ( yy_act < 13 )
-                               fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
-                                        (long)yy_rule_linenum[yy_act], yytext );
-                       else if ( yy_act == 13 )
-                               fprintf( stderr, "--accepting default rule (\"%s\")\n",
-                                        yytext );
-                       else if ( yy_act == 14 )
-                               fprintf( stderr, "--(end of buffer or a NUL)\n" );
-                       else
-                               fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
-                       }
-
                switch ( yy_act )
        { /* beginning of action switch */
-/* %% [13.0] actions go here */
                        case 0: /* must back up */
                        /* undo the effects of YY_DO_BEFORE_ACTION */
                        *yy_cp = (yy_hold_char);
@@ -1032,42 +843,35 @@ do_action:       /* This label is used only to access EOF actions. */
 case 1:
 /* rule 1 can match eol */
 YY_RULE_SETUP
-#line 67 "scripts/genksyms/lex.l"
 return FILENAME;
        YY_BREAK
 case 2:
 /* rule 2 can match eol */
 YY_RULE_SETUP
-#line 68 "scripts/genksyms/lex.l"
 cur_line++;
        YY_BREAK
 case 3:
 /* rule 3 can match eol */
 YY_RULE_SETUP
-#line 69 "scripts/genksyms/lex.l"
 cur_line++;
        YY_BREAK
 /* Ignore all other whitespace.  */
 case 4:
 YY_RULE_SETUP
-#line 72 "scripts/genksyms/lex.l"
 ;
        YY_BREAK
 case 5:
 /* rule 5 can match eol */
 YY_RULE_SETUP
-#line 75 "scripts/genksyms/lex.l"
 return STRING;
        YY_BREAK
 case 6:
 /* rule 6 can match eol */
 YY_RULE_SETUP
-#line 76 "scripts/genksyms/lex.l"
 return CHAR;
        YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 77 "scripts/genksyms/lex.l"
 return IDENT;
        YY_BREAK
 /* The Pedant requires that the other C multi-character tokens be
@@ -1076,36 +880,29 @@ return IDENT;
     around them properly.  */
 case 8:
 YY_RULE_SETUP
-#line 83 "scripts/genksyms/lex.l"
 return OTHER;
        YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 84 "scripts/genksyms/lex.l"
 return INT;
        YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 85 "scripts/genksyms/lex.l"
 return REAL;
        YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 87 "scripts/genksyms/lex.l"
 return DOTS;
        YY_BREAK
 /* All other tokens are single characters.  */
 case 12:
 YY_RULE_SETUP
-#line 90 "scripts/genksyms/lex.l"
 return yytext[0];
        YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 93 "scripts/genksyms/lex.l"
 ECHO;
        YY_BREAK
-#line 1109 "scripts/genksyms/lex.c"
 case YY_STATE_EOF(INITIAL):
        yyterminate();
 
@@ -1172,7 +969,6 @@ case YY_STATE_EOF(INITIAL):
 
                        else
                                {
-/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
                                yy_cp = (yy_c_buf_p);
                                goto yy_find_action;
                                }
@@ -1238,14 +1034,6 @@ case YY_STATE_EOF(INITIAL):
        } /* end of action switch */
                } /* end of scanning one token */
 } /* end of yylex */
-/* %ok-for-header */
-
-/* %if-c++-only */
-/* %not-for-header */
-
-/* %ok-for-header */
-
-/* %endif */
 
 /* yy_get_next_buffer - try to read in a new buffer
  *
@@ -1254,11 +1042,7 @@ case YY_STATE_EOF(INITIAL):
  *     EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  *     EOB_ACT_END_OF_FILE - end of file
  */
-/* %if-c-only */
 static int yy_get_next_buffer (void)
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 {
        register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
        register char *source = (yytext_ptr);
@@ -1392,24 +1176,16 @@ static int yy_get_next_buffer (void)
 
 /* yy_get_previous_state - get the state just before the EOB char was reached */
 
-/* %if-c-only */
-/* %not-for-header */
-
     static yy_state_type yy_get_previous_state (void)
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 {
        register yy_state_type yy_current_state;
        register char *yy_cp;
     
-/* %% [15.0] code to get the start state into yy_current_state goes here */
        yy_current_state = (yy_start);
        yy_current_state += YY_AT_BOL();
 
        for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
                {
-/* %% [16.0] code to find the next state goes here */
                register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
                if ( yy_accept[yy_current_state] )
                        {
@@ -1433,15 +1209,10 @@ static int yy_get_next_buffer (void)
  * synopsis
  *     next_state = yy_try_NUL_trans( current_state );
  */
-/* %if-c-only */
     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 {
        register int yy_is_jam;
-    /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
-       register char *yy_cp = (yy_c_buf_p);
+       register char *yy_cp = (yy_c_buf_p);
 
        register YY_CHAR yy_c = 1;
        if ( yy_accept[yy_current_state] )
@@ -1461,12 +1232,7 @@ static int yy_get_next_buffer (void)
        return yy_is_jam ? 0 : yy_current_state;
 }
 
-/* %if-c-only */
-
     static void yyunput (int c, register char * yy_bp )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 {
        register char *yy_cp;
     
@@ -1498,17 +1264,11 @@ static int yy_get_next_buffer (void)
 
        *--yy_cp = (char) c;
 
-/* %% [18.0] update yylineno here */
-
        (yytext_ptr) = yy_bp;
        (yy_hold_char) = *yy_cp;
        (yy_c_buf_p) = yy_cp;
 }
-/* %if-c-only */
-
-/* %endif */
 
-/* %if-c-only */
 #ifndef YY_NO_INPUT
 #ifdef __cplusplus
     static int yyinput (void)
@@ -1516,9 +1276,6 @@ static int yy_get_next_buffer (void)
     static int input  (void)
 #endif
 
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 {
        int c;
     
@@ -1582,25 +1339,18 @@ static int yy_get_next_buffer (void)
        *(yy_c_buf_p) = '\0';   /* preserve yytext */
        (yy_hold_char) = *++(yy_c_buf_p);
 
-/* %% [19.0] update BOL and yylineno */
        YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
 
        return c;
 }
-/* %if-c-only */
 #endif /* ifndef YY_NO_INPUT */
-/* %endif */
 
 /** Immediately switch to a different input stream.
  * @param input_file A readable stream.
  * 
  * @note This function does not reset the start condition to @c INITIAL .
  */
-/* %if-c-only */
     void yyrestart  (FILE * input_file )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 {
     
        if ( ! YY_CURRENT_BUFFER ){
@@ -1617,11 +1367,7 @@ static int yy_get_next_buffer (void)
  * @param new_buffer The new input buffer.
  * 
  */
-/* %if-c-only */
     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 {
     
        /* TODO. We should be able to replace this entire function body
@@ -1652,11 +1398,7 @@ static int yy_get_next_buffer (void)
        (yy_did_buffer_switch_on_eof) = 1;
 }
 
-/* %if-c-only */
 static void yy_load_buffer_state  (void)
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 {
        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
        (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
@@ -1670,11 +1412,7 @@ static void yy_load_buffer_state  (void)
  * 
  * @return the allocated buffer state.
  */
-/* %if-c-only */
     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 {
        YY_BUFFER_STATE b;
     
@@ -1702,11 +1440,7 @@ static void yy_load_buffer_state  (void)
  * @param b a buffer created with yy_create_buffer()
  * 
  */
-/* %if-c-only */
     void yy_delete_buffer (YY_BUFFER_STATE  b )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 {
     
        if ( ! b )
@@ -1721,26 +1455,15 @@ static void yy_load_buffer_state  (void)
        yyfree((void *) b  );
 }
 
-/* %if-c-only */
-
 #ifndef __cplusplus
 extern int isatty (int );
 #endif /* __cplusplus */
     
-/* %endif */
-
-/* %if-c++-only */
-/* %endif */
-
 /* Initializes or reinitializes a buffer.
  * This function is sometimes called more than once on the same buffer,
  * such as during a yyrestart() or at EOF.
  */
-/* %if-c-only */
     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 
 {
        int oerrno = errno;
@@ -1759,13 +1482,8 @@ extern int isatty (int );
         b->yy_bs_column = 0;
     }
 
-/* %if-c-only */
-
         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
     
-/* %endif */
-/* %if-c++-only */
-/* %endif */
        errno = oerrno;
 }
 
@@ -1773,11 +1491,7 @@ extern int isatty (int );
  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
  * 
  */
-/* %if-c-only */
     void yy_flush_buffer (YY_BUFFER_STATE  b )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 {
        if ( ! b )
                return;
@@ -1800,18 +1514,13 @@ extern int isatty (int );
                yy_load_buffer_state( );
 }
 
-/* %if-c-or-c++ */
 /** Pushes the new state onto the stack. The new state becomes
  *  the current state. This function will allocate the stack
  *  if necessary.
  *  @param new_buffer The new state.
  *  
  */
-/* %if-c-only */
 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 {
        if (new_buffer == NULL)
                return;
@@ -1836,18 +1545,12 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
        yy_load_buffer_state( );
        (yy_did_buffer_switch_on_eof) = 1;
 }
-/* %endif */
 
-/* %if-c-or-c++ */
 /** Removes and deletes the top of the stack, if present.
  *  The next element becomes the new top.
  *  
  */
-/* %if-c-only */
 void yypop_buffer_state (void)
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 {
        if (!YY_CURRENT_BUFFER)
                return;
@@ -1862,17 +1565,11 @@ void yypop_buffer_state (void)
                (yy_did_buffer_switch_on_eof) = 1;
        }
 }
-/* %endif */
 
-/* %if-c-or-c++ */
 /* Allocates the stack if it does not exist.
  *  Guarantees space for at least one push.
  */
-/* %if-c-only */
 static void yyensure_buffer_stack (void)
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 {
        int num_to_alloc;
     
@@ -1914,9 +1611,7 @@ static void yyensure_buffer_stack (void)
                (yy_buffer_stack_max) = num_to_alloc;
        }
 }
-/* %endif */
 
-/* %if-c-only */
 /** Setup the input buffer state to scan directly from a user-specified character buffer.
  * @param base the character buffer
  * @param size the size in bytes of the character buffer
@@ -1951,9 +1646,7 @@ YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
 
        return b;
 }
-/* %endif */
 
-/* %if-c-only */
 /** Setup the input buffer state to scan a string. The next call to yylex() will
  * scan from a @e copy of @a str.
  * @param yystr a NUL-terminated string to scan
@@ -1967,9 +1660,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
     
        return yy_scan_bytes(yystr,strlen(yystr) );
 }
-/* %endif */
 
-/* %if-c-only */
 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
  * scan from a @e copy of @a bytes.
  * @param bytes the byte buffer to scan
@@ -2006,21 +1697,16 @@ YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
 
        return b;
 }
-/* %endif */
 
 #ifndef YY_EXIT_FAILURE
 #define YY_EXIT_FAILURE 2
 #endif
 
-/* %if-c-only */
 static void yy_fatal_error (yyconst char* msg )
 {
        (void) fprintf( stderr, "%s\n", msg );
        exit( YY_EXIT_FAILURE );
 }
-/* %endif */
-/* %if-c++-only */
-/* %endif */
 
 /* Redefine yyless() so it works in section 3 code. */
 
@@ -2041,10 +1727,6 @@ static void yy_fatal_error (yyconst char* msg )
 
 /* Accessor  methods (get/set functions) to struct members. */
 
-/* %if-c-only */
-/* %if-reentrant */
-/* %endif */
-
 /** Get the current line number.
  * 
  */
@@ -2087,9 +1769,6 @@ char *yyget_text  (void)
         return yytext;
 }
 
-/* %if-reentrant */
-/* %endif */
-
 /** Set the current line number.
  * @param line_number
  * 
@@ -2126,14 +1805,6 @@ void yyset_debug (int  bdebug )
         yy_flex_debug = bdebug ;
 }
 
-/* %endif */
-
-/* %if-reentrant */
-/* %if-bison-bridge */
-/* %endif */
-/* %endif if-c-only */
-
-/* %if-c-only */
 static int yy_init_globals (void)
 {
         /* Initialization is the same as for the non-reentrant scanner.
@@ -2161,9 +1832,7 @@ static int yy_init_globals (void)
      */
     return 0;
 }
-/* %endif */
 
-/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
 int yylex_destroy  (void)
 {
@@ -2183,11 +1852,8 @@ int yylex_destroy  (void)
      * yylex() is called, initialization will occur. */
     yy_init_globals( );
 
-/* %if-reentrant */
-/* %endif */
     return 0;
 }
-/* %endif */
 
 /*
  * Internal utility routines.
@@ -2235,21 +1901,11 @@ void yyfree (void * ptr )
        free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
 }
 
-/* %if-tables-serialization definitions */
-/* %define-yytables   The name for this specific scanner's tables. */
 #define YYTABLES_NAME "yytables"
-/* %endif */
-
-/* %ok-for-header */
-
-#line 93 "scripts/genksyms/lex.l"
-
-
 
 /* Bring in the keyword recognizer.  */
 
-#include "keywords.c"
-
+#include "keywords.hash.c"
 
 /* Macros to append to our phrase collection list.  */
 
@@ -2274,7 +1930,6 @@ void yyfree (void * ptr )
 
 #define APP            _APP(yytext, yyleng)
 
-
 /* The second stage lexer.  Here we incorporate knowledge of the state
    of the parser to tailor the tokens that are returned.  */
 
similarity index 92%
rename from scripts/genksyms/parse.c_shipped
rename to scripts/genksyms/parse.tab.c_shipped
index 1a0b8607fb0e5ff7412626598443bbe6807404a7..61d4a5d09856a6f90cc29c85f066b361bbc7c8ea 100644 (file)
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    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
@@ -46,7 +45,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -67,8 +66,6 @@
 
 /* Copy the first part of user declarations.  */
 
-/* Line 189 of yacc.c  */
-#line 24 "scripts/genksyms/parse.y"
 
 
 #include <assert.h>
@@ -101,8 +98,6 @@ remove_list(struct string_list **pb, struct string_list **pe)
 
 
 
-/* Line 189 of yacc.c  */
-#line 106 "scripts/genksyms/parse.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -186,8 +181,6 @@ typedef int YYSTYPE;
 /* Copy the second part of user declarations.  */
 
 
-/* Line 264 of yacc.c  */
-#line 191 "scripts/genksyms/parse.c"
 
 #ifdef short
 # undef short
@@ -237,7 +230,7 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -855,9 +848,18 @@ static const yytype_uint8 yystos[] =
 
 /* Like YYERROR except do call yyerror.  This remains here temporarily
    to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
 
 #define YYFAIL         goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
@@ -914,7 +916,7 @@ while (YYID (0))
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)                 \
      fprintf (File, "%d.%d-%d.%d",                     \
              (Loc).first_line, (Loc).first_column,     \
@@ -1653,64 +1655,46 @@ yyreduce:
     {
         case 4:
 
-/* Line 1455 of yacc.c  */
-#line 109 "scripts/genksyms/parse.y"
     { is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; ;}
     break;
 
   case 5:
 
-/* Line 1455 of yacc.c  */
-#line 111 "scripts/genksyms/parse.y"
     { free_list(*(yyvsp[(2) - (2)]), NULL); *(yyvsp[(2) - (2)]) = NULL; ;}
     break;
 
   case 6:
 
-/* Line 1455 of yacc.c  */
-#line 115 "scripts/genksyms/parse.y"
     { is_typedef = 1; ;}
     break;
 
   case 7:
 
-/* Line 1455 of yacc.c  */
-#line 116 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(4) - (4)]); ;}
     break;
 
   case 8:
 
-/* Line 1455 of yacc.c  */
-#line 117 "scripts/genksyms/parse.y"
     { is_typedef = 1; ;}
     break;
 
   case 9:
 
-/* Line 1455 of yacc.c  */
-#line 118 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 14:
 
-/* Line 1455 of yacc.c  */
-#line 123 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 15:
 
-/* Line 1455 of yacc.c  */
-#line 124 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 16:
 
-/* Line 1455 of yacc.c  */
-#line 129 "scripts/genksyms/parse.y"
     { if (current_name) {
                    struct string_list *decl = (*(yyvsp[(3) - (3)]))->next;
                    (*(yyvsp[(3) - (3)]))->next = NULL;
@@ -1725,15 +1709,11 @@ yyreduce:
 
   case 17:
 
-/* Line 1455 of yacc.c  */
-#line 142 "scripts/genksyms/parse.y"
     { (yyval) = NULL; ;}
     break;
 
   case 19:
 
-/* Line 1455 of yacc.c  */
-#line 148 "scripts/genksyms/parse.y"
     { struct string_list *decl = *(yyvsp[(1) - (1)]);
                  *(yyvsp[(1) - (1)]) = NULL;
                  add_symbol(current_name,
@@ -1745,8 +1725,6 @@ yyreduce:
 
   case 20:
 
-/* Line 1455 of yacc.c  */
-#line 156 "scripts/genksyms/parse.y"
     { struct string_list *decl = *(yyvsp[(3) - (3)]);
                  *(yyvsp[(3) - (3)]) = NULL;
                  free_list(*(yyvsp[(2) - (3)]), NULL);
@@ -1760,36 +1738,26 @@ yyreduce:
 
   case 21:
 
-/* Line 1455 of yacc.c  */
-#line 169 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(4) - (4)]) ? (yyvsp[(4) - (4)]) : (yyvsp[(3) - (4)]) ? (yyvsp[(3) - (4)]) : (yyvsp[(2) - (4)]) ? (yyvsp[(2) - (4)]) : (yyvsp[(1) - (4)]); ;}
     break;
 
   case 22:
 
-/* Line 1455 of yacc.c  */
-#line 174 "scripts/genksyms/parse.y"
     { decl_spec = NULL; ;}
     break;
 
   case 24:
 
-/* Line 1455 of yacc.c  */
-#line 179 "scripts/genksyms/parse.y"
     { decl_spec = *(yyvsp[(1) - (1)]); ;}
     break;
 
   case 25:
 
-/* Line 1455 of yacc.c  */
-#line 180 "scripts/genksyms/parse.y"
     { decl_spec = *(yyvsp[(2) - (2)]); ;}
     break;
 
   case 26:
 
-/* Line 1455 of yacc.c  */
-#line 185 "scripts/genksyms/parse.y"
     { /* Version 2 checksumming ignores storage class, as that
                     is really irrelevant to the linkage.  */
                  remove_node((yyvsp[(1) - (1)]));
@@ -1799,43 +1767,31 @@ yyreduce:
 
   case 31:
 
-/* Line 1455 of yacc.c  */
-#line 197 "scripts/genksyms/parse.y"
     { is_extern = 1; (yyval) = (yyvsp[(1) - (1)]); ;}
     break;
 
   case 32:
 
-/* Line 1455 of yacc.c  */
-#line 198 "scripts/genksyms/parse.y"
     { is_extern = 0; (yyval) = (yyvsp[(1) - (1)]); ;}
     break;
 
   case 37:
 
-/* Line 1455 of yacc.c  */
-#line 210 "scripts/genksyms/parse.y"
     { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_STRUCT; (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 38:
 
-/* Line 1455 of yacc.c  */
-#line 212 "scripts/genksyms/parse.y"
     { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_UNION; (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 39:
 
-/* Line 1455 of yacc.c  */
-#line 214 "scripts/genksyms/parse.y"
     { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_ENUM; (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 40:
 
-/* Line 1455 of yacc.c  */
-#line 218 "scripts/genksyms/parse.y"
     { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
                  r = copy_node(i); r->tag = SYM_STRUCT;
                  r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
@@ -1846,8 +1802,6 @@ yyreduce:
 
   case 41:
 
-/* Line 1455 of yacc.c  */
-#line 225 "scripts/genksyms/parse.y"
     { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
                  r = copy_node(i); r->tag = SYM_UNION;
                  r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
@@ -1858,8 +1812,6 @@ yyreduce:
 
   case 42:
 
-/* Line 1455 of yacc.c  */
-#line 232 "scripts/genksyms/parse.y"
     { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
                  r = copy_node(i); r->tag = SYM_ENUM;
                  r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
@@ -1870,57 +1822,41 @@ yyreduce:
 
   case 43:
 
-/* Line 1455 of yacc.c  */
-#line 242 "scripts/genksyms/parse.y"
     { add_symbol(NULL, SYM_ENUM, NULL, 0); (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 44:
 
-/* Line 1455 of yacc.c  */
-#line 244 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 45:
 
-/* Line 1455 of yacc.c  */
-#line 245 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 56:
 
-/* Line 1455 of yacc.c  */
-#line 259 "scripts/genksyms/parse.y"
     { (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); ;}
     break;
 
   case 57:
 
-/* Line 1455 of yacc.c  */
-#line 264 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
     break;
 
   case 58:
 
-/* Line 1455 of yacc.c  */
-#line 268 "scripts/genksyms/parse.y"
     { (yyval) = NULL; ;}
     break;
 
   case 61:
 
-/* Line 1455 of yacc.c  */
-#line 274 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 65:
 
-/* Line 1455 of yacc.c  */
-#line 280 "scripts/genksyms/parse.y"
     { /* restrict has no effect in prototypes so ignore it */
                  remove_node((yyvsp[(1) - (1)]));
                  (yyval) = (yyvsp[(1) - (1)]);
@@ -1929,15 +1865,11 @@ yyreduce:
 
   case 66:
 
-/* Line 1455 of yacc.c  */
-#line 287 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 68:
 
-/* Line 1455 of yacc.c  */
-#line 293 "scripts/genksyms/parse.y"
     { if (current_name != NULL) {
                    error_with_pos("unexpected second declaration name");
                    YYERROR;
@@ -1950,134 +1882,96 @@ yyreduce:
 
   case 69:
 
-/* Line 1455 of yacc.c  */
-#line 302 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(4) - (4)]); ;}
     break;
 
   case 70:
 
-/* Line 1455 of yacc.c  */
-#line 304 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(4) - (4)]); ;}
     break;
 
   case 71:
 
-/* Line 1455 of yacc.c  */
-#line 306 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 72:
 
-/* Line 1455 of yacc.c  */
-#line 308 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 73:
 
-/* Line 1455 of yacc.c  */
-#line 310 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 74:
 
-/* Line 1455 of yacc.c  */
-#line 316 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 78:
 
-/* Line 1455 of yacc.c  */
-#line 324 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(4) - (4)]); ;}
     break;
 
   case 79:
 
-/* Line 1455 of yacc.c  */
-#line 326 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(4) - (4)]); ;}
     break;
 
   case 80:
 
-/* Line 1455 of yacc.c  */
-#line 328 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 81:
 
-/* Line 1455 of yacc.c  */
-#line 330 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 82:
 
-/* Line 1455 of yacc.c  */
-#line 332 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 83:
 
-/* Line 1455 of yacc.c  */
-#line 336 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 85:
 
-/* Line 1455 of yacc.c  */
-#line 338 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 86:
 
-/* Line 1455 of yacc.c  */
-#line 342 "scripts/genksyms/parse.y"
     { (yyval) = NULL; ;}
     break;
 
   case 89:
 
-/* Line 1455 of yacc.c  */
-#line 349 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 90:
 
-/* Line 1455 of yacc.c  */
-#line 354 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
     break;
 
   case 91:
 
-/* Line 1455 of yacc.c  */
-#line 359 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
     break;
 
   case 93:
 
-/* Line 1455 of yacc.c  */
-#line 364 "scripts/genksyms/parse.y"
     { (yyval) = NULL; ;}
     break;
 
   case 94:
 
-/* Line 1455 of yacc.c  */
-#line 366 "scripts/genksyms/parse.y"
     { /* For version 2 checksums, we don't want to remember
                     private parameter names.  */
                  remove_node((yyvsp[(1) - (1)]));
@@ -2087,8 +1981,6 @@ yyreduce:
 
   case 95:
 
-/* Line 1455 of yacc.c  */
-#line 374 "scripts/genksyms/parse.y"
     { remove_node((yyvsp[(1) - (1)]));
                  (yyval) = (yyvsp[(1) - (1)]);
                ;}
@@ -2096,43 +1988,31 @@ yyreduce:
 
   case 96:
 
-/* Line 1455 of yacc.c  */
-#line 378 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(4) - (4)]); ;}
     break;
 
   case 97:
 
-/* Line 1455 of yacc.c  */
-#line 380 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(4) - (4)]); ;}
     break;
 
   case 98:
 
-/* Line 1455 of yacc.c  */
-#line 382 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 99:
 
-/* Line 1455 of yacc.c  */
-#line 384 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 100:
 
-/* Line 1455 of yacc.c  */
-#line 386 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 101:
 
-/* Line 1455 of yacc.c  */
-#line 391 "scripts/genksyms/parse.y"
     { struct string_list *decl = *(yyvsp[(2) - (3)]);
                  *(yyvsp[(2) - (3)]) = NULL;
                  add_symbol(current_name, SYM_NORMAL, decl, is_extern);
@@ -2142,120 +2022,86 @@ yyreduce:
 
   case 102:
 
-/* Line 1455 of yacc.c  */
-#line 399 "scripts/genksyms/parse.y"
     { (yyval) = NULL; ;}
     break;
 
   case 104:
 
-/* Line 1455 of yacc.c  */
-#line 406 "scripts/genksyms/parse.y"
     { remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 105:
 
-/* Line 1455 of yacc.c  */
-#line 410 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 106:
 
-/* Line 1455 of yacc.c  */
-#line 411 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 107:
 
-/* Line 1455 of yacc.c  */
-#line 415 "scripts/genksyms/parse.y"
     { (yyval) = NULL; ;}
     break;
 
   case 110:
 
-/* Line 1455 of yacc.c  */
-#line 421 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 111:
 
-/* Line 1455 of yacc.c  */
-#line 426 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 112:
 
-/* Line 1455 of yacc.c  */
-#line 428 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 113:
 
-/* Line 1455 of yacc.c  */
-#line 432 "scripts/genksyms/parse.y"
     { (yyval) = NULL; ;}
     break;
 
   case 116:
 
-/* Line 1455 of yacc.c  */
-#line 438 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 117:
 
-/* Line 1455 of yacc.c  */
-#line 442 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
     break;
 
   case 118:
 
-/* Line 1455 of yacc.c  */
-#line 443 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 120:
 
-/* Line 1455 of yacc.c  */
-#line 448 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 121:
 
-/* Line 1455 of yacc.c  */
-#line 452 "scripts/genksyms/parse.y"
     { (yyval) = NULL; ;}
     break;
 
   case 123:
 
-/* Line 1455 of yacc.c  */
-#line 457 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(3) - (3)]); ;}
     break;
 
   case 124:
 
-/* Line 1455 of yacc.c  */
-#line 458 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(4) - (4)]); ;}
     break;
 
   case 127:
 
-/* Line 1455 of yacc.c  */
-#line 467 "scripts/genksyms/parse.y"
     {
                        const char *name = strdup((*(yyvsp[(1) - (1)]))->string);
                        add_symbol(name, SYM_ENUM_CONST, NULL, 0);
@@ -2264,8 +2110,6 @@ yyreduce:
 
   case 128:
 
-/* Line 1455 of yacc.c  */
-#line 472 "scripts/genksyms/parse.y"
     {
                        const char *name = strdup((*(yyvsp[(1) - (3)]))->string);
                        struct string_list *expr = copy_list_range(*(yyvsp[(3) - (3)]), *(yyvsp[(2) - (3)]));
@@ -2275,29 +2119,21 @@ yyreduce:
 
   case 129:
 
-/* Line 1455 of yacc.c  */
-#line 479 "scripts/genksyms/parse.y"
     { (yyval) = (yyvsp[(2) - (2)]); ;}
     break;
 
   case 130:
 
-/* Line 1455 of yacc.c  */
-#line 483 "scripts/genksyms/parse.y"
     { (yyval) = NULL; ;}
     break;
 
   case 132:
 
-/* Line 1455 of yacc.c  */
-#line 489 "scripts/genksyms/parse.y"
     { export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); ;}
     break;
 
 
 
-/* Line 1455 of yacc.c  */
-#line 2301 "scripts/genksyms/parse.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2508,8 +2344,6 @@ yyreturn:
 
 
 
-/* Line 1675 of yacc.c  */
-#line 493 "scripts/genksyms/parse.y"
 
 
 static void
similarity index 96%
rename from scripts/genksyms/parse.h_shipped
rename to scripts/genksyms/parse.tab.h_shipped
index 517523669251b9638ff0e933c7cb9ff9fe97fb00..350c2b403e219ec8cd9b10808a511b2b62cec92d 100644 (file)
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton interface for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    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
index efb3be10d428cb09b623b499cc5c03d728b57102..48462be328bba603677d7f7c5e0707289d7af645 100644 (file)
@@ -35,6 +35,7 @@ foreach my $file (@files) {
                $line =~ s/([\s(])__iomem\s/$1/g;
                $line =~ s/\s__attribute_const__\s/ /g;
                $line =~ s/\s__attribute_const__$//g;
+               $line =~ s/\b__packed\b/__attribute__((packed))/g;
                $line =~ s/^#include <linux\/compiler.h>//;
                $line =~ s/(^|\s)(inline)\b/$1__$2__/g;
                $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g;
index 624f6502e03e704b7be881817924cddbbdb708f1..ee120d441565422f0a6283b55ab5258fb61de9e7 100644 (file)
@@ -2,7 +2,7 @@
 # Generated files
 #
 config*
-lex.*.c
+*.lex.c
 *.tab.c
 *.tab.h
 zconf.hash.c
index faa9a4701b6f27259b9f0094aa9ee3584f237fe4..0b4276c047b282f3b696e39a12c2291160046d7b 100644 (file)
@@ -204,7 +204,7 @@ ifeq ($(gconf-target),1)
 endif
 
 clean-files    := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck
-clean-files    += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
+clean-files    += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h
 clean-files     += mconf qconf gconf nconf
 clean-files     += config.pot linux.pot
 
@@ -220,9 +220,12 @@ always := dochecklxdialog
 HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
 
 # generated files seem to need this to find local include files
-HOSTCFLAGS_lex.zconf.o := -I$(src)
+HOSTCFLAGS_zconf.lex.o := -I$(src)
 HOSTCFLAGS_zconf.tab.o := -I$(src)
 
+LEX_PREFIX_zconf       := zconf
+YACC_PREFIX_zconf      := zconf
+
 HOSTLOADLIBES_qconf    = $(KC_QT_LIBS) -ldl
 HOSTCXXFLAGS_qconf.o   = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK
 
@@ -316,7 +319,7 @@ $(obj)/.tmp_gtkcheck:
        fi
 endif
 
-$(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c
+$(obj)/zconf.tab.o: $(obj)/zconf.lex.c $(obj)/zconf.hash.c
 
 $(obj)/kconfig_load.o: $(obj)/lkc_defs.h
 
@@ -335,28 +338,3 @@ $(obj)/gconf.glade.h: $(obj)/gconf.glade
        $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
        $(obj)/gconf.glade
 
-###
-# The following requires flex/bison/gperf
-# By default we use the _shipped versions, uncomment the following line if
-# you are modifying the flex/bison src.
-# LKC_GENPARSER := 1
-
-ifdef LKC_GENPARSER
-
-$(obj)/zconf.tab.c: $(src)/zconf.y
-$(obj)/lex.zconf.c: $(src)/zconf.l
-$(obj)/zconf.hash.c: $(src)/zconf.gperf
-
-%.tab.c: %.y
-       bison -l -b $* -p $(notdir $*) $<
-       cp $@ $@_shipped
-
-lex.%.c: %.l
-       flex -L -P$(notdir $*) -o$@ $<
-       cp $@ $@_shipped
-
-%.hash.c: %.gperf
-       gperf < $< > $@
-       cp $@ $@_shipped
-
-endif
index febf0c94d5583b37a1411d601ab387998c4dc2d4..f34a0a9b50f1eeba364465b849d25d9c5e73face 100644 (file)
@@ -68,9 +68,7 @@ struct kconf_id {
        enum symbol_type stype;
 };
 
-#ifdef YYDEBUG
 extern int zconfdebug;
-#endif
 
 int zconfparse(void);
 void zconfdump(FILE *out);
index c9e690eb75451fa5f87b2c7d4f4d15f71c83c33f..f14ab41154b665c5759e3234201296a0cfbd43aa 100644 (file)
@@ -9,7 +9,7 @@
 
 struct kconf_id;
 
-static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
+static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
 
 %%
 mainmenu,      T_MAINMENU,     TF_COMMAND
index 4055d5de1750261453c46d752f09ace7b17df74d..40df0005daa928d4684555297c2243d0aef45171 100644 (file)
@@ -1,6 +1,5 @@
-/* ANSI-C code produced by gperf version 3.0.3 */
-/* Command-line: gperf  */
-/* Computed positions: -k'1,3' */
+/* ANSI-C code produced by gperf version 3.0.4 */
+/* Command-line: gperf -t --output-file scripts/kconfig/zconf.hash.c_shipped -a -C -E -g -k '1,3,$' -p -t scripts/kconfig/zconf.gperf  */
 
 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
       && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
 #endif
 
+#line 10 "scripts/kconfig/zconf.gperf"
 struct kconf_id;
 
-static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
-/* maximum key range = 50, duplicates = 0 */
+static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
+/* maximum key range = 71, duplicates = 0 */
 
 #ifdef __GNUC__
 __inline
@@ -44,34 +44,34 @@ inline
 static unsigned int
 kconf_id_hash (register const char *str, register unsigned int len)
 {
-  static unsigned char asso_values[] =
+  static const unsigned char asso_values[] =
     {
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 40,  5,
-       0,  0,  5, 52,  0, 20, 52, 52, 10, 20,
-       5,  0, 35, 52,  0, 30,  0, 15,  0, 52,
-      15, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
-      52, 52, 52, 52, 52, 52
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 25, 25,
+       0,  0,  0,  5,  0,  0, 73, 73,  5,  0,
+      10,  5, 45, 73, 20, 20,  0, 15, 15, 73,
+      20, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+      73, 73, 73, 73, 73, 73
     };
   register int hval = len;
 
@@ -85,87 +85,87 @@ kconf_id_hash (register const char *str, register unsigned int len)
         hval += asso_values[(unsigned char)str[0]];
         break;
     }
-  return hval;
+  return hval + asso_values[(unsigned char)str[len - 1]];
 }
 
 struct kconf_id_strings_t
   {
-    char kconf_id_strings_str2[sizeof("on")];
-    char kconf_id_strings_str3[sizeof("env")];
+    char kconf_id_strings_str2[sizeof("if")];
+    char kconf_id_strings_str3[sizeof("int")];
     char kconf_id_strings_str5[sizeof("endif")];
-    char kconf_id_strings_str6[sizeof("option")];
-    char kconf_id_strings_str7[sizeof("endmenu")];
-    char kconf_id_strings_str8[sizeof("optional")];
+    char kconf_id_strings_str7[sizeof("default")];
+    char kconf_id_strings_str8[sizeof("tristate")];
     char kconf_id_strings_str9[sizeof("endchoice")];
-    char kconf_id_strings_str10[sizeof("range")];
-    char kconf_id_strings_str11[sizeof("choice")];
-    char kconf_id_strings_str12[sizeof("default")];
+    char kconf_id_strings_str12[sizeof("def_tristate")];
     char kconf_id_strings_str13[sizeof("def_bool")];
-    char kconf_id_strings_str14[sizeof("help")];
-    char kconf_id_strings_str16[sizeof("config")];
-    char kconf_id_strings_str17[sizeof("def_tristate")];
-    char kconf_id_strings_str18[sizeof("hex")];
-    char kconf_id_strings_str19[sizeof("defconfig_list")];
-    char kconf_id_strings_str22[sizeof("if")];
-    char kconf_id_strings_str23[sizeof("int")];
+    char kconf_id_strings_str14[sizeof("defconfig_list")];
+    char kconf_id_strings_str17[sizeof("on")];
+    char kconf_id_strings_str18[sizeof("optional")];
+    char kconf_id_strings_str21[sizeof("option")];
+    char kconf_id_strings_str22[sizeof("endmenu")];
+    char kconf_id_strings_str23[sizeof("mainmenu")];
+    char kconf_id_strings_str25[sizeof("menuconfig")];
     char kconf_id_strings_str27[sizeof("modules")];
-    char kconf_id_strings_str28[sizeof("tristate")];
     char kconf_id_strings_str29[sizeof("menu")];
+    char kconf_id_strings_str31[sizeof("select")];
     char kconf_id_strings_str32[sizeof("comment")];
-    char kconf_id_strings_str35[sizeof("menuconfig")];
-    char kconf_id_strings_str36[sizeof("string")];
-    char kconf_id_strings_str37[sizeof("visible")];
-    char kconf_id_strings_str41[sizeof("prompt")];
-    char kconf_id_strings_str42[sizeof("depends")];
-    char kconf_id_strings_str44[sizeof("bool")];
-    char kconf_id_strings_str46[sizeof("select")];
+    char kconf_id_strings_str33[sizeof("env")];
+    char kconf_id_strings_str35[sizeof("range")];
+    char kconf_id_strings_str36[sizeof("choice")];
+    char kconf_id_strings_str39[sizeof("bool")];
+    char kconf_id_strings_str41[sizeof("source")];
+    char kconf_id_strings_str42[sizeof("visible")];
+    char kconf_id_strings_str43[sizeof("hex")];
+    char kconf_id_strings_str46[sizeof("config")];
     char kconf_id_strings_str47[sizeof("boolean")];
-    char kconf_id_strings_str48[sizeof("mainmenu")];
-    char kconf_id_strings_str51[sizeof("source")];
+    char kconf_id_strings_str51[sizeof("string")];
+    char kconf_id_strings_str54[sizeof("help")];
+    char kconf_id_strings_str56[sizeof("prompt")];
+    char kconf_id_strings_str72[sizeof("depends")];
   };
-static struct kconf_id_strings_t kconf_id_strings_contents =
+static const struct kconf_id_strings_t kconf_id_strings_contents =
   {
-    "on",
-    "env",
+    "if",
+    "int",
     "endif",
-    "option",
-    "endmenu",
-    "optional",
-    "endchoice",
-    "range",
-    "choice",
     "default",
-    "def_bool",
-    "help",
-    "config",
+    "tristate",
+    "endchoice",
     "def_tristate",
-    "hex",
+    "def_bool",
     "defconfig_list",
-    "if",
-    "int",
+    "on",
+    "optional",
+    "option",
+    "endmenu",
+    "mainmenu",
+    "menuconfig",
     "modules",
-    "tristate",
     "menu",
+    "select",
     "comment",
-    "menuconfig",
-    "string",
-    "visible",
-    "prompt",
-    "depends",
+    "env",
+    "range",
+    "choice",
     "bool",
-    "select",
+    "source",
+    "visible",
+    "hex",
+    "config",
     "boolean",
-    "mainmenu",
-    "source"
+    "string",
+    "help",
+    "prompt",
+    "depends"
   };
 #define kconf_id_strings ((const char *) &kconf_id_strings_contents)
 #ifdef __GNUC__
 __inline
-#ifdef __GNUC_STDC_INLINE__
+#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
 __attribute__ ((__gnu_inline__))
 #endif
 #endif
-struct kconf_id *
+const struct kconf_id *
 kconf_id_lookup (register const char *str, register unsigned int len)
 {
   enum
@@ -174,54 +174,94 @@ kconf_id_lookup (register const char *str, register unsigned int len)
       MIN_WORD_LENGTH = 2,
       MAX_WORD_LENGTH = 14,
       MIN_HASH_VALUE = 2,
-      MAX_HASH_VALUE = 51
+      MAX_HASH_VALUE = 72
     };
 
-  static struct kconf_id wordlist[] =
+  static const struct kconf_id wordlist[] =
     {
       {-1}, {-1},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2,            T_ON,           TF_PARAM},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3,            T_OPT_ENV,      TF_OPTION},
+#line 25 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2,            T_IF,           TF_COMMAND|TF_PARAM},
+#line 36 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3,            T_TYPE,         TF_COMMAND, S_INT},
       {-1},
+#line 26 "scripts/kconfig/zconf.gperf"
       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5,            T_ENDIF,        TF_COMMAND},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6,            T_OPTION,       TF_COMMAND},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7,    T_ENDMENU,      TF_COMMAND},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8,    T_OPTIONAL,     TF_COMMAND},
+      {-1},
+#line 29 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7,    T_DEFAULT,      TF_COMMAND, S_UNKNOWN},
+#line 31 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8,    T_TYPE,         TF_COMMAND, S_TRISTATE},
+#line 20 "scripts/kconfig/zconf.gperf"
       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9,    T_ENDCHOICE,    TF_COMMAND},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10,           T_RANGE,        TF_COMMAND},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11,           T_CHOICE,       TF_COMMAND},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12,   T_DEFAULT,      TF_COMMAND, S_UNKNOWN},
+      {-1}, {-1},
+#line 32 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12,   T_DEFAULT,      TF_COMMAND, S_TRISTATE},
+#line 35 "scripts/kconfig/zconf.gperf"
       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13,   T_DEFAULT,      TF_COMMAND, S_BOOLEAN},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14,           T_HELP,         TF_COMMAND},
-      {-1},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16,           T_CONFIG,       TF_COMMAND},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17,   T_DEFAULT,      TF_COMMAND, S_TRISTATE},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18,           T_TYPE,         TF_COMMAND, S_HEX},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19,   T_OPT_DEFCONFIG_LIST,TF_OPTION},
+#line 45 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14,   T_OPT_DEFCONFIG_LIST,TF_OPTION},
       {-1}, {-1},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22,           T_IF,           TF_COMMAND|TF_PARAM},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23,           T_TYPE,         TF_COMMAND, S_INT},
-      {-1}, {-1}, {-1},
+#line 43 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17,           T_ON,           TF_PARAM},
+#line 28 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18,   T_OPTIONAL,     TF_COMMAND},
+      {-1}, {-1},
+#line 42 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21,           T_OPTION,       TF_COMMAND},
+#line 17 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22,   T_ENDMENU,      TF_COMMAND},
+#line 15 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23,   T_MAINMENU,     TF_COMMAND},
+      {-1},
+#line 23 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str25,   T_MENUCONFIG,   TF_COMMAND},
+      {-1},
+#line 44 "scripts/kconfig/zconf.gperf"
       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27,   T_OPT_MODULES,  TF_OPTION},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28,   T_TYPE,         TF_COMMAND, S_TRISTATE},
+      {-1},
+#line 16 "scripts/kconfig/zconf.gperf"
       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29,           T_MENU,         TF_COMMAND},
-      {-1}, {-1},
+      {-1},
+#line 39 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31,           T_SELECT,       TF_COMMAND},
+#line 21 "scripts/kconfig/zconf.gperf"
       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32,   T_COMMENT,      TF_COMMAND},
-      {-1}, {-1},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35,   T_MENUCONFIG,   TF_COMMAND},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36,           T_TYPE,         TF_COMMAND, S_STRING},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37,   T_VISIBLE,      TF_COMMAND},
-      {-1}, {-1}, {-1},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41,           T_PROMPT,       TF_COMMAND},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42,   T_DEPENDS,      TF_COMMAND},
+#line 46 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33,           T_OPT_ENV,      TF_OPTION},
       {-1},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str44,           T_TYPE,         TF_COMMAND, S_BOOLEAN},
+#line 40 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35,           T_RANGE,        TF_COMMAND},
+#line 19 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36,           T_CHOICE,       TF_COMMAND},
+      {-1}, {-1},
+#line 33 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39,           T_TYPE,         TF_COMMAND, S_BOOLEAN},
       {-1},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46,           T_SELECT,       TF_COMMAND},
+#line 18 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41,           T_SOURCE,       TF_COMMAND},
+#line 41 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42,   T_VISIBLE,      TF_COMMAND},
+#line 37 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43,           T_TYPE,         TF_COMMAND, S_HEX},
+      {-1}, {-1},
+#line 22 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46,           T_CONFIG,       TF_COMMAND},
+#line 34 "scripts/kconfig/zconf.gperf"
       {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47,   T_TYPE,         TF_COMMAND, S_BOOLEAN},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str48,   T_MAINMENU,     TF_COMMAND},
+      {-1}, {-1}, {-1},
+#line 38 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51,           T_TYPE,         TF_COMMAND, S_STRING},
       {-1}, {-1},
-      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51,           T_SOURCE,       TF_COMMAND}
+#line 24 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str54,           T_HELP,         TF_COMMAND},
+      {-1},
+#line 30 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str56,           T_PROMPT,       TF_COMMAND},
+      {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+      {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+#line 27 "scripts/kconfig/zconf.gperf"
+      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str72,   T_DEPENDS,      TF_COMMAND}
     };
 
   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -242,4 +282,5 @@ kconf_id_lookup (register const char *str, register unsigned int len)
     }
   return 0;
 }
+#line 47 "scripts/kconfig/zconf.gperf"
 
index b22f884f90221650ed46ef4cf509bf6a3b33170e..ddee5fc51811d93aeee760adf9c9b31e68c967c0 100644 (file)
@@ -1,5 +1,5 @@
-%option backup nostdinit noyywrap never-interactive full ecs
-%option 8bit backup nodefault perf-report perf-report
+%option nostdinit noyywrap never-interactive full ecs
+%option 8bit nodefault perf-report perf-report
 %option noinput
 %x COMMAND HELP STRING PARAM
 %{
@@ -96,7 +96,7 @@ n     [A-Za-z0-9_]
 
 <COMMAND>{
        {n}+    {
-               struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
+               const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
                BEGIN(PARAM);
                current_pos.file = current_file;
                current_pos.lineno = current_file->lineno;
@@ -132,7 +132,7 @@ n   [A-Za-z0-9_]
        \n      BEGIN(INITIAL); current_file->lineno++; return T_EOL;
        ---     /* ignore */
        ({n}|[-/.])+    {
-               struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
+               const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
                if (id && id->flags & TF_PARAM) {
                        zconflval.id = id;
                        return id->token;
similarity index 98%
rename from scripts/kconfig/lex.zconf.c_shipped
rename to scripts/kconfig/zconf.lex.c_shipped
index d9182916f72494d3138a93a352f24a11ee3f06e7..906c09911748c2efaba1bef5de59a3199a1dfff2 100644 (file)
@@ -1,5 +1,5 @@
 
-#line 3 "scripts/kconfig/lex.zconf.c"
+#line 3 "scripts/kconfig/zconf.lex.c_shipped"
 
 #define  YY_INT_ALIGNED short int
 
@@ -72,6 +72,7 @@ typedef int flex_int32_t;
 typedef unsigned char flex_uint8_t; 
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
 
 /* Limits of integral types. */
 #ifndef INT8_MIN
@@ -102,8 +103,6 @@ typedef unsigned int flex_uint32_t;
 #define UINT32_MAX             (4294967295U)
 #endif
 
-#endif /* ! C99 */
-
 #endif /* ! FLEXINT_H */
 
 #ifdef __cplusplus
@@ -160,15 +159,7 @@ typedef unsigned int flex_uint32_t;
 
 /* Size of default input buffer. */
 #ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
 #define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
 #endif
 
 /* The state buf must be large enough to hold one state per character in the main buffer.
@@ -922,12 +913,7 @@ static int input (void );
 
 /* Amount of stuff to slurp up with each read. */
 #ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
 #define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
 #endif
 
 /* Copy whatever the last rule matched to the standard output. */
@@ -1100,7 +1086,7 @@ YY_RULE_SETUP
 case 6:
 YY_RULE_SETUP
 {
-               struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
+               const struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
                BEGIN(PARAM);
                current_pos.file = current_file;
                current_pos.lineno = current_file->lineno;
@@ -1175,7 +1161,7 @@ YY_RULE_SETUP
 case 19:
 YY_RULE_SETUP
 {
-               struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
+               const struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
                if (id && id->flags & TF_PARAM) {
                        zconflval.id = id;
                        return id->token;
@@ -2073,8 +2059,8 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
 
 /** Setup the input buffer state to scan the given bytes. The next call to zconflex() will
  * scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
  * 
  * @return the newly allocated buffer state object.
  */
index 4c5495ea205e646ef9c4efff923dd6a678dbda4b..211e1a277037f813aa8c4fb83d4a7aecb300b5ab 100644 (file)
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    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
@@ -46,7 +45,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -102,22 +101,18 @@ extern int zconflex(void);
 static void zconfprint(const char *err, ...);
 static void zconf_error(const char *err, ...);
 static void zconferror(const char *err);
-static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken);
+static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken);
 
 struct symbol *symbol_hash[SYMBOL_HASHSIZE];
 
 static struct menu *current_menu, *current_entry;
 
-#define YYDEBUG 0
-#if YYDEBUG
-#define YYERROR_VERBOSE
-#endif
 
 
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
-# define YYDEBUG 0
+# define YYDEBUG 1
 #endif
 
 /* Enabling verbose error messages.  */
@@ -188,7 +183,7 @@ typedef union YYSTYPE
        struct symbol *symbol;
        struct expr *expr;
        struct menu *menu;
-       struct kconf_id *id;
+       const struct kconf_id *id;
 
 
 
@@ -255,7 +250,7 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -535,18 +530,18 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   108,   108,   108,   110,   110,   112,   114,   115,   116,
-     117,   118,   119,   123,   127,   127,   127,   127,   127,   127,
-     127,   127,   131,   132,   133,   134,   135,   136,   140,   141,
-     147,   155,   161,   169,   179,   181,   182,   183,   184,   185,
-     186,   189,   197,   203,   213,   219,   225,   228,   230,   241,
-     242,   247,   256,   261,   269,   272,   274,   275,   276,   277,
-     278,   281,   287,   298,   304,   314,   316,   321,   329,   337,
-     340,   342,   343,   344,   349,   356,   363,   368,   376,   379,
-     381,   382,   383,   386,   394,   401,   408,   414,   421,   423,
-     424,   425,   428,   436,   438,   439,   442,   449,   451,   456,
-     457,   460,   461,   462,   466,   467,   470,   471,   474,   475,
-     476,   477,   478,   479,   480,   483,   484,   487,   488
+       0,   104,   104,   104,   106,   106,   108,   110,   111,   112,
+     113,   114,   115,   119,   123,   123,   123,   123,   123,   123,
+     123,   123,   127,   128,   129,   130,   131,   132,   136,   137,
+     143,   151,   157,   165,   175,   177,   178,   179,   180,   181,
+     182,   185,   193,   199,   209,   215,   221,   224,   226,   237,
+     238,   243,   252,   257,   265,   268,   270,   271,   272,   273,
+     274,   277,   283,   294,   300,   310,   312,   317,   325,   333,
+     336,   338,   339,   340,   345,   352,   359,   364,   372,   375,
+     377,   378,   379,   382,   390,   397,   404,   410,   417,   419,
+     420,   421,   424,   432,   434,   435,   438,   445,   447,   452,
+     453,   456,   457,   458,   462,   463,   466,   467,   470,   471,
+     472,   473,   474,   475,   476,   479,   480,   483,   484
 };
 #endif
 
@@ -806,9 +801,18 @@ static const yytype_uint8 yystos[] =
 
 /* Like YYERROR except do call yyerror.  This remains here temporarily
    to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
 
 #define YYFAIL         goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
@@ -865,7 +869,7 @@ while (YYID (0))
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)                 \
      fprintf (File, "%d.%d-%d.%d",                     \
              (Loc).first_line, (Loc).first_column,     \
@@ -1753,7 +1757,7 @@ yyreduce:
   case 48:
 
     {
-       struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string)));
+       const struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string)));
        if (id && id->flags & TF_OPTION)
                menu_add_option(id->token, (yyvsp[(3) - (3)].string));
        else
@@ -2258,10 +2262,8 @@ void conf_parse(const char *name)
        modules_sym->flags |= SYMBOL_AUTO;
        rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
 
-#if YYDEBUG
        if (getenv("ZCONF_DEBUG"))
                zconfdebug = 1;
-#endif
        zconfparse();
        if (zconfnerrs)
                exit(1);
@@ -2300,7 +2302,7 @@ static const char *zconf_tokenname(int token)
        return "<token>";
 }
 
-static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken)
+static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken)
 {
        if (id->token != endtoken) {
                zconf_error("unexpected '%s' within %s block",
@@ -2345,9 +2347,7 @@ static void zconf_error(const char *err, ...)
 
 static void zconferror(const char *err)
 {
-#if YYDEBUG
        fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
-#endif
 }
 
 static void print_quoted_string(FILE *out, const char *str)
@@ -2496,7 +2496,7 @@ void zconfdump(FILE *out)
        }
 }
 
-#include "lex.zconf.c"
+#include "zconf.lex.c"
 #include "util.c"
 #include "confdata.c"
 #include "expr.c"
index 49fb4ab664c39b555692896f97fc8d6bfad36cd1..c38cc5aa8ed19ca55a22bc6b10034af01063443f 100644 (file)
@@ -25,16 +25,12 @@ extern int zconflex(void);
 static void zconfprint(const char *err, ...);
 static void zconf_error(const char *err, ...);
 static void zconferror(const char *err);
-static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken);
+static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken);
 
 struct symbol *symbol_hash[SYMBOL_HASHSIZE];
 
 static struct menu *current_menu, *current_entry;
 
-#define YYDEBUG 0
-#if YYDEBUG
-#define YYERROR_VERBOSE
-#endif
 %}
 %expect 30
 
@@ -45,7 +41,7 @@ static struct menu *current_menu, *current_entry;
        struct symbol *symbol;
        struct expr *expr;
        struct menu *menu;
-       struct kconf_id *id;
+       const struct kconf_id *id;
 }
 
 %token <id>T_MAINMENU
@@ -229,7 +225,7 @@ symbol_option_list:
          /* empty */
        | symbol_option_list T_WORD symbol_option_arg
 {
-       struct kconf_id *id = kconf_id_lookup($2, strlen($2));
+       const struct kconf_id *id = kconf_id_lookup($2, strlen($2));
        if (id && id->flags & TF_OPTION)
                menu_add_option(id->token, $3);
        else
@@ -503,10 +499,8 @@ void conf_parse(const char *name)
        modules_sym->flags |= SYMBOL_AUTO;
        rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
 
-#if YYDEBUG
        if (getenv("ZCONF_DEBUG"))
                zconfdebug = 1;
-#endif
        zconfparse();
        if (zconfnerrs)
                exit(1);
@@ -545,7 +539,7 @@ static const char *zconf_tokenname(int token)
        return "<token>";
 }
 
-static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken)
+static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken)
 {
        if (id->token != endtoken) {
                zconf_error("unexpected '%s' within %s block",
@@ -590,9 +584,7 @@ static void zconf_error(const char *err, ...)
 
 static void zconferror(const char *err)
 {
-#if YYDEBUG
        fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
-#endif
 }
 
 static void print_quoted_string(FILE *out, const char *str)
@@ -741,7 +733,7 @@ void zconfdump(FILE *out)
        }
 }
 
-#include "lex.zconf.c"
+#include "zconf.lex.c"
 #include "util.c"
 #include "confdata.c"
 #include "expr.c"
index 5325423ceab483833c8f09efb37a336aaa8f9588..0cc04426074403458583b73339754c2a588bfa13 100644 (file)
@@ -30,6 +30,13 @@ PATCHLEVEL = $4
 lastword = \$(word \$(words \$(1)),\$(1))
 makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST)))
 
+ifeq ("\$(origin V)", "command line")
+VERBOSE := \$(V)
+endif
+ifneq (\$(VERBOSE),1)
+Q := @
+endif
+
 MAKEARGS := -C $1
 MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$(makedir))
 
@@ -40,7 +47,7 @@ MAKEFLAGS += --no-print-directory
 all    := \$(filter-out all Makefile,\$(MAKECMDGOALS))
 
 all:
-       \$(MAKE) \$(MAKEARGS) \$(all)
+       \$(Q)\$(MAKE) \$(MAKEARGS) \$(all)
 
 Makefile:;
 
index 006960ebbce927adbb1761ecc1275858db00a62c..bc6aa003860e14150ff491e67b65fb580270289f 100644 (file)
@@ -118,10 +118,12 @@ perf-tar=perf-$(KERNELVERSION)
 
 quiet_cmd_perf_tar = TAR
       cmd_perf_tar = \
-git archive --prefix=$(perf-tar)/ HEAD^{tree}                       \
-       $$(cat $(srctree)/tools/perf/MANIFEST) -o $(perf-tar).tar;  \
+git --git-dir=$(srctree)/.git archive --prefix=$(perf-tar)/         \
+       HEAD^{tree} $$(cd $(srctree);                               \
+                      echo $$(cat $(srctree)/tools/perf/MANIFEST)) \
+       -o $(perf-tar).tar;                                         \
 mkdir -p $(perf-tar);                                               \
-git rev-parse HEAD > $(perf-tar)/HEAD;                              \
+git --git-dir=$(srctree)/.git rev-parse HEAD > $(perf-tar)/HEAD;    \
 tar rf $(perf-tar).tar $(perf-tar)/HEAD;                            \
 rm -r $(perf-tar);                                                  \
 $(if $(findstring tar-src,$@),,                                     \
index a06ffab38568809f5187970261888d6a9e673f18..30e242f7bd0ec413bca908f1a0fdc5398b00a124 100644 (file)
@@ -155,7 +155,6 @@ static void keyring_destroy(struct key *keyring)
        }
 
        klist = rcu_dereference_check(keyring->payload.subscriptions,
-                                     rcu_read_lock_held() ||
                                      atomic_read(&keyring->usage) == 0);
        if (klist) {
                for (loop = klist->nkeys - 1; loop >= 0; loop--)
index 35459340019e44399775c2f96aa9b5871f8d566c..de7900ef53da6257ab610629fd8ef65368526d62 100644 (file)
@@ -1984,6 +1984,7 @@ __initcall(init_sel_fs);
 void exit_sel_fs(void)
 {
        kobject_put(selinuxfs_kobj);
+       kern_unmount(selinuxfs_mount);
        unregister_filesystem(&sel_fs_type);
 }
 #endif
index 3ff8cc5f487a832c6620b656cb477797695c2f70..010658335881cf133b918d2159817267c375a522 100644 (file)
@@ -262,8 +262,7 @@ static int i2sbus_add_dev(struct macio_dev *macio,
                 */
                dev->allocated_resource[i] =
                        request_mem_region(dev->resources[i].start,
-                                          dev->resources[i].end -
-                                          dev->resources[i].start + 1,
+                                          resource_size(&dev->resources[i]),
                                           dev->rnames[i]);
                if (!dev->allocated_resource[i]) {
                        printk(KERN_ERR "i2sbus: failed to claim resource %d!\n", i);
@@ -272,19 +271,19 @@ static int i2sbus_add_dev(struct macio_dev *macio,
        }
 
        r = &dev->resources[aoa_resource_i2smmio];
-       rlen = r->end - r->start + 1;
+       rlen = resource_size(r);
        if (rlen < sizeof(struct i2s_interface_regs))
                goto err;
        dev->intfregs = ioremap(r->start, rlen);
 
        r = &dev->resources[aoa_resource_txdbdma];
-       rlen = r->end - r->start + 1;
+       rlen = resource_size(r);
        if (rlen < sizeof(struct dbdma_regs))
                goto err;
        dev->out.dbdma = ioremap(r->start, rlen);
 
        r = &dev->resources[aoa_resource_rxdbdma];
-       rlen = r->end - r->start + 1;
+       rlen = resource_size(r);
        if (rlen < sizeof(struct dbdma_regs))
                goto err;
        dev->in.dbdma = ioremap(r->start, rlen);
index bfee60c4d4c0e21386a39982f020350b446c4835..6fd9391b3a6cd1c4aeb60d791effd9edd985ac18 100644 (file)
@@ -448,7 +448,7 @@ static int __devinit atmel_abdac_probe(struct platform_device *pdev)
                goto out_free_card;
        }
 
-       dac->regs = ioremap(regs->start, regs->end - regs->start + 1);
+       dac->regs = ioremap(regs->start, resource_size(regs));
        if (!dac->regs) {
                dev_dbg(&pdev->dev, "could not remap register memory\n");
                goto out_free_card;
index ac35222ad0dd21993f0bd9d89a070ed3fa5fa329..6e5addeb236b49595ea563e7525d5a262a32e295 100644 (file)
@@ -971,7 +971,7 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev)
        chip->card = card;
        chip->pclk = pclk;
        chip->pdev = pdev;
-       chip->regs = ioremap(regs->start, regs->end - regs->start + 1);
+       chip->regs = ioremap(regs->start, resource_size(regs));
 
        if (!chip->regs) {
                dev_dbg(&pdev->dev, "could not remap register memory\n");
index 7077f601da5a66a279bed9be77159f2ec80dfc78..601f0ebb677ba7348abb41130a1fbd28952c919d 100644 (file)
@@ -531,7 +531,7 @@ int __init snd_info_init(void)
 {
        struct proc_dir_entry *p;
 
-       p = create_proc_entry("asound", S_IFDIR | S_IRUGO | S_IXUGO, NULL);
+       p = proc_mkdir("asound", NULL);
        if (p == NULL)
                return -ENOMEM;
        snd_proc_root = p;
index be06fb3e45a1e90d2fd4c3dcdeb5babc605bfdfe..0ccc0eb75775dd3f6ab4215f6098fb1f3311d2f5 100644 (file)
@@ -87,7 +87,7 @@ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;     /* ID for this card */
 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;/* Enable this card */
 static char *model[SNDRV_CARDS];
 static int omni[SNDRV_CARDS];                          /* Delta44 & 66 Omni I/O support */
-static int cs8427_timeout[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 500}; /* CS8427 S/PDIF transciever reset timeout value in msec */
+static int cs8427_timeout[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 500}; /* CS8427 S/PDIF transceiver reset timeout value in msec */
 static int dxr_enable[SNDRV_CARDS];                    /* DXR enable for DMX6FIRE */
 
 module_param_array(index, int, NULL, 0444);
index 3ecbd67f88c9143e31de7d4fcb38ca092d9ea758..ab96cde7417b833d6e9e14e44aea7cb91cf965ba 100644 (file)
@@ -881,8 +881,7 @@ static int snd_pmac_free(struct snd_pmac *chip)
                for (i = 0; i < 3; i++) {
                        if (chip->requested & (1 << i))
                                release_mem_region(chip->rsrc[i].start,
-                                                  chip->rsrc[i].end -
-                                                  chip->rsrc[i].start + 1);
+                                                  resource_size(&chip->rsrc[i]));
                }
        }
 
@@ -1228,8 +1227,7 @@ int __devinit snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
                                goto __error;
                        }
                        if (request_mem_region(chip->rsrc[i].start,
-                                              chip->rsrc[i].end -
-                                              chip->rsrc[i].start + 1,
+                                              resource_size(&chip->rsrc[i]),
                                               rnames[i]) == NULL) {
                                printk(KERN_ERR "snd: can't request rsrc "
                                       " %d (%s: %pR)\n",
@@ -1254,8 +1252,7 @@ int __devinit snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
                                goto __error;
                        }
                        if (request_mem_region(chip->rsrc[i].start,
-                                              chip->rsrc[i].end -
-                                              chip->rsrc[i].start + 1,
+                                              resource_size(&chip->rsrc[i]),
                                               rnames[i]) == NULL) {
                                printk(KERN_ERR "snd: can't request rsrc "
                                       " %d (%s: %pR)\n",
index 30df42568dbb098c007e9f23d5241140fb6a872b..56efa0c1c9a9c746b70e19e9d3bc966adea0edeb 100644 (file)
@@ -2,7 +2,7 @@
  * linux/sound/soc/ep93xx-i2s.c
  * EP93xx I2S driver
  *
- * Copyright (C) 2010 Ryan Mallon <ryan@bluewatersys.com>
+ * Copyright (C) 2010 Ryan Mallon
  *
  * Based on the original driver by:
  *   Copyright (C) 2007 Chase Douglas <chasedouglas@gmail>
@@ -477,6 +477,6 @@ module_init(ep93xx_i2s_init);
 module_exit(ep93xx_i2s_exit);
 
 MODULE_ALIAS("platform:ep93xx-i2s");
-MODULE_AUTHOR("Ryan Mallon <ryan@bluewatersys.com>");
+MODULE_AUTHOR("Ryan Mallon");
 MODULE_DESCRIPTION("EP93XX I2S driver");
 MODULE_LICENSE("GPL");
index dd7ac5374cef46905e1848a64c3a40d4e52e91dc..8dfd3ad84b19c8f36a1350887659b9024cba7534 100644 (file)
@@ -5,7 +5,7 @@
  * Copyright (C) 2006 Applied Data Systems
  *
  * Rewritten for the SoC audio subsystem (Based on PXA2xx code):
- *   Copyright (c) 2008 Ryan Mallon <ryan@bluewatersys.com>
+ *   Copyright (c) 2008 Ryan Mallon
  *
  * 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
@@ -352,6 +352,6 @@ static void __exit ep93xx_soc_platform_exit(void)
 module_init(ep93xx_soc_platform_init);
 module_exit(ep93xx_soc_platform_exit);
 
-MODULE_AUTHOR("Ryan Mallon <ryan@bluewatersys.com>");
+MODULE_AUTHOR("Ryan Mallon");
 MODULE_DESCRIPTION("EP93xx ALSA PCM interface");
 MODULE_LICENSE("GPL");
index dfe1d7f74ea6d1b311fa482cb1ea07c73d702e75..c8aa8a5003ca62c84fb8909c9955e80eec765ded 100644 (file)
@@ -2,7 +2,7 @@
  * snappercl15.c -- SoC audio for Bluewater Systems Snapper CL15 module
  *
  * Copyright (C) 2008 Bluewater Systems Ltd
- * Author: Ryan Mallon <ryan@bluewatersys.com>
+ * Author: Ryan Mallon
  *
  *  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
@@ -140,7 +140,7 @@ static void __exit snappercl15_exit(void)
 module_init(snappercl15_init);
 module_exit(snappercl15_exit);
 
-MODULE_AUTHOR("Ryan Mallon <ryan@bluewatersys.com>");
+MODULE_AUTHOR("Ryan Mallon");
 MODULE_DESCRIPTION("ALSA SoC Snapper CL15");
 MODULE_LICENSE("GPL");
 
index 19ad0c1be67e49d05047a561773418149da0175c..fd0dc46afc3413eafb6d9bdd0d3fb087f7fa3fa4 100644 (file)
@@ -385,7 +385,7 @@ static int mpc5200_hpcd_probe(struct of_device *op)
                dev_err(&op->dev, "Missing reg property\n");
                return -ENODEV;
        }
-       regs = ioremap(res.start, 1 + res.end - res.start);
+       regs = ioremap(res.start, resource_size(&res));
        if (!regs) {
                dev_err(&op->dev, "Could not map registers\n");
                return -ENODEV;
index 4173b3d87f979d2757f1498bd503f15b07195542..43fdc24f7e8d6fdf323f096fee6c01682c433a24 100644 (file)
@@ -110,12 +110,12 @@ static int imx_ssi_dma_alloc(struct snd_pcm_substream *substream,
                slave_config.direction = DMA_TO_DEVICE;
                slave_config.dst_addr = dma_params->dma_addr;
                slave_config.dst_addr_width = buswidth;
-               slave_config.dst_maxburst = dma_params->burstsize * buswidth;
+               slave_config.dst_maxburst = dma_params->burstsize;
        } else {
                slave_config.direction = DMA_FROM_DEVICE;
                slave_config.src_addr = dma_params->dma_addr;
                slave_config.src_addr_width = buswidth;
-               slave_config.src_maxburst = dma_params->burstsize * buswidth;
+               slave_config.src_maxburst = dma_params->burstsize;
        }
 
        ret = dmaengine_slave_config(iprtd->dma_chan, &slave_config);
index b40095a198835dd9f2dc38a28ea40a49b4d84949..30fe0d0efe1c7b5d290d5f247d271f6231340cf1 100644 (file)
@@ -330,7 +330,7 @@ static int cx81801_hangup(struct tty_struct *tty)
        return 0;
 }
 
-/* Line discipline .recieve_buf() */
+/* Line discipline .receive_buf() */
 static void cx81801_receive(struct tty_struct *tty,
                                const unsigned char *cp, char *fp, int count)
 {