aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-22 12:23:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-22 12:23:24 -0400
commit9bc747bea5fad819e0c0ad96e6a67ea0640dfe2b (patch)
treed500225e7a1c90a6bd17d3e63e2f6e781810db2b /arch
parent32b908eea9e5ecd1049008e134eadbfcd0da5e38 (diff)
parent0e896b1ddc1905df904df98c204bacf028219729 (diff)
Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull first batch of arm-soc cleanups from Olof Johansson: "These cleanups are basically all over the place. The idea is to collect changes with minimal impact but large number of changes so we can avoid them from distracting in the diffstat in the other series. A significant number of lines get removed here, in particular because the ixp2000 and ixp23xx platforms get removed. These have never been extremely popular and have fallen into disuse over time with no active maintainer taking care of them. The u5500 soc never made it into a product, so we are removing it from the ux500 platform. Many good cleanups also went into the at91 and omap platforms, as has been the case for a number of releases." Trivial modify-delete conflicts in arch/arm/mach-{ixp2000,ixp23xx} * tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (152 commits) ARM: clps711x: Cleanup IRQ handling ARM clps711x: Removed unused header mach/time.h ARM: clps711x: Added note about support EP731x CPU to Kconfig ARM: clps711x: Added missing register definitions ARM: clps711x: Used own subarch directory for store header file Dove: Fix Section mismatch warnings ARM: orion5x: ts78xx debugging changes ARM: orion5x: remove PM dependency from ts78xx ARM: orion5x: ts78xx fix NAND resource off by one ARM: orion5x: ts78xx whitespace cleanups Orion5x: Fix Section mismatch warnings Orion5x: Fix warning: struct pci_dev declared inside paramter list ARM: clps711x: Combine header files into one for clps711x-targets ARM: S3C24XX: Use common macro to define resources on mach-qt2410.c ARM: S3C24XX: Use common macro to define resources on mach-osiris.c ARM: EXYNOS: Adapt to cpuidle core time keeping and irq enable ARM: S5PV210: Use common macro to define resources on mach-smdkv210.c ARM: S5PV210: Use common macro to define resources on dev-audio.c ARM: S5PC100: Use common macro to define resources on dev-audio.c ARM: S5P64X0: Use common macro to define resources on dev-audio.c ...
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig34
-rw-r--r--arch/arm/Makefile2
-rw-r--r--arch/arm/boot/compressed/head-xscale.S7
-rw-r--r--arch/arm/common/Makefile2
-rw-r--r--arch/arm/common/uengine.c507
-rw-r--r--arch/arm/configs/at91_dt_defconfig196
-rw-r--r--arch/arm/configs/at91rm9200_defconfig1
-rw-r--r--arch/arm/configs/ixp2000_defconfig99
-rw-r--r--arch/arm/configs/ixp23xx_defconfig105
-rw-r--r--arch/arm/include/asm/hardware/cs89712.h49
-rw-r--r--arch/arm/include/asm/hardware/ep7211.h40
-rw-r--r--arch/arm/include/asm/hardware/ep7212.h83
-rw-r--r--arch/arm/include/asm/hardware/uengine.h62
-rw-r--r--arch/arm/mach-at91/Kconfig186
-rw-r--r--arch/arm/mach-at91/Makefile26
-rw-r--r--arch/arm/mach-at91/at91rm9200.c12
-rw-r--r--arch/arm/mach-at91/at91rm9200_devices.c12
-rw-r--r--arch/arm/mach-at91/at91sam9260.c12
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c12
-rw-r--r--arch/arm/mach-at91/at91sam9261.c12
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c12
-rw-r--r--arch/arm/mach-at91/at91sam9263.c12
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c12
-rw-r--r--arch/arm/mach-at91/at91sam9g45.c12
-rw-r--r--arch/arm/mach-at91/at91sam9g45_devices.c12
-rw-r--r--arch/arm/mach-at91/at91sam9rl.c12
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c12
-rw-r--r--arch/arm/mach-at91/board-1arm.c24
-rw-r--r--arch/arm/mach-at91/board-afeb-9260v1.c28
-rw-r--r--arch/arm/mach-at91/board-cam60.c8
-rw-r--r--arch/arm/mach-at91/board-carmeva.c18
-rw-r--r--arch/arm/mach-at91/board-cpu9krea.c52
-rw-r--r--arch/arm/mach-at91/board-cpuat91.c40
-rw-r--r--arch/arm/mach-at91/board-csb337.c13
-rw-r--r--arch/arm/mach-at91/board-csb637.c8
-rw-r--r--arch/arm/mach-at91/board-dt.c8
-rw-r--r--arch/arm/mach-at91/board-eb9200.c24
-rw-r--r--arch/arm/mach-at91/board-ecbat91.c20
-rw-r--r--arch/arm/mach-at91/board-eco920.c13
-rw-r--r--arch/arm/mach-at91/board-flexibity.c8
-rw-r--r--arch/arm/mach-at91/board-foxg20.c71
-rw-r--r--arch/arm/mach-at91/board-gsia18s.c63
-rw-r--r--arch/arm/mach-at91/board-kafa.c20
-rw-r--r--arch/arm/mach-at91/board-kb9202.c32
-rw-r--r--arch/arm/mach-at91/board-neocore926.c14
-rw-r--r--arch/arm/mach-at91/board-pcontrol-g20.c21
-rw-r--r--arch/arm/mach-at91/board-picotux200.c18
-rw-r--r--arch/arm/mach-at91/board-qil-a9260.c31
-rw-r--r--arch/arm/mach-at91/board-rm9200dk.c24
-rw-r--r--arch/arm/mach-at91/board-rm9200ek.c24
-rw-r--r--arch/arm/mach-at91/board-rsi-ews.c36
-rw-r--r--arch/arm/mach-at91/board-sam9-l9260.c30
-rw-r--r--arch/arm/mach-at91/board-sam9260ek.c24
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c14
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c14
-rw-r--r--arch/arm/mach-at91/board-sam9g20ek.c24
-rw-r--r--arch/arm/mach-at91/board-sam9m10g45ek.c16
-rw-r--r--arch/arm/mach-at91/board-sam9rlek.c14
-rw-r--r--arch/arm/mach-at91/board-snapper9260.c18
-rw-r--r--arch/arm/mach-at91/board-stamp9g20.c64
-rw-r--r--arch/arm/mach-at91/board-usb-a926x.c8
-rw-r--r--arch/arm/mach-at91/board-yl-9200.c36
-rw-r--r--arch/arm/mach-at91/cpuidle.c8
-rw-r--r--arch/arm/mach-at91/generic.h11
-rw-r--r--arch/arm/mach-at91/include/mach/at91rm9200.h5
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9260.h7
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9261.h4
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9263.h4
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9g45.h5
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9rl.h5
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9x5.h8
-rw-r--r--arch/arm/mach-at91/include/mach/board.h1
-rw-r--r--arch/arm/mach-at91/include/mach/cpu.h28
-rw-r--r--arch/arm/mach-at91/include/mach/hardware.h16
-rw-r--r--arch/arm/mach-at91/include/mach/uncompress.h178
-rw-r--r--arch/arm/mach-at91/pm.c12
-rw-r--r--arch/arm/mach-at91/pm.h15
-rw-r--r--arch/arm/mach-at91/pm_slowclock.S2
-rw-r--r--arch/arm/mach-at91/soc.h14
-rw-r--r--arch/arm/mach-clps711x/Kconfig21
-rw-r--r--arch/arm/mach-clps711x/common.c17
-rw-r--r--arch/arm/mach-clps711x/include/mach/clps711x.h (renamed from arch/arm/include/asm/hardware/clps7111.h)130
-rw-r--r--arch/arm/mach-clps711x/include/mach/debug-macro.S5
-rw-r--r--arch/arm/mach-clps711x/include/mach/entry-macro.S3
-rw-r--r--arch/arm/mach-clps711x/include/mach/hardware.h59
-rw-r--r--arch/arm/mach-clps711x/include/mach/irqs.h5
-rw-r--r--arch/arm/mach-clps711x/include/mach/time.h49
-rw-r--r--arch/arm/mach-clps711x/include/mach/uncompress.h21
-rw-r--r--arch/arm/mach-clps711x/p720t-leds.c3
-rw-r--r--arch/arm/mach-dove/common.c2
-rw-r--r--arch/arm/mach-dove/mpp.c8
-rw-r--r--arch/arm/mach-ep93xx/Kconfig5
-rw-r--r--arch/arm/mach-ep93xx/core.c110
-rw-r--r--arch/arm/mach-exynos/cpuidle.c53
-rw-r--r--arch/arm/mach-exynos/dev-ahci.c12
-rw-r--r--arch/arm/mach-exynos/dev-audio.c156
-rw-r--r--arch/arm/mach-exynos/mach-armlex4210.c16
-rw-r--r--arch/arm/mach-exynos/mach-nuri.c3
-rw-r--r--arch/arm/mach-exynos/mach-origen.c2
-rw-r--r--arch/arm/mach-exynos/mach-smdk4x12.c2
-rw-r--r--arch/arm/mach-exynos/mach-smdkv310.c17
-rw-r--r--arch/arm/mach-exynos/mach-universal_c210.c2
-rw-r--r--arch/arm/mach-imx/Kconfig2
-rw-r--r--arch/arm/mach-imx/eukrea_mbimx27-baseboard.c2
-rw-r--r--arch/arm/mach-imx/mach-cpuimx35.c2
-rw-r--r--arch/arm/mach-imx/mach-mx1ads.c2
-rw-r--r--arch/arm/mach-imx/mach-mx21ads.c3
-rw-r--r--arch/arm/mach-imx/mach-mx31lite.c2
-rw-r--r--arch/arm/mach-imx/mach-mx31moboard.c2
-rw-r--r--arch/arm/mach-imx/mach-mx35_3ds.c2
-rw-r--r--arch/arm/mach-imx/mach-mx51_efikamx.c3
-rw-r--r--arch/arm/mach-imx/mach-mx51_efikasb.c2
-rw-r--r--arch/arm/mach-imx/mach-pcm037.c2
-rw-r--r--arch/arm/mach-imx/mach-pcm043.c2
-rw-r--r--arch/arm/mach-imx/mach-vpr200.c2
-rw-r--r--arch/arm/mach-ixp2000/Kconfig72
-rw-r--r--arch/arm/mach-ixp2000/Makefile14
-rw-r--r--arch/arm/mach-ixp2000/Makefile.boot3
-rw-r--r--arch/arm/mach-ixp2000/core.c520
-rw-r--r--arch/arm/mach-ixp2000/enp2611.c258
-rw-r--r--arch/arm/mach-ixp2000/include/mach/debug-macro.S25
-rw-r--r--arch/arm/mach-ixp2000/include/mach/enp2611.h46
-rw-r--r--arch/arm/mach-ixp2000/include/mach/entry-macro.S54
-rw-r--r--arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h48
-rw-r--r--arch/arm/mach-ixp2000/include/mach/hardware.h36
-rw-r--r--arch/arm/mach-ixp2000/include/mach/io.h133
-rw-r--r--arch/arm/mach-ixp2000/include/mach/irqs.h207
-rw-r--r--arch/arm/mach-ixp2000/include/mach/ixdp2x00.h92
-rw-r--r--arch/arm/mach-ixp2000/include/mach/ixdp2x01.h57
-rw-r--r--arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h451
-rw-r--r--arch/arm/mach-ixp2000/include/mach/memory.h31
-rw-r--r--arch/arm/mach-ixp2000/include/mach/platform.h153
-rw-r--r--arch/arm/mach-ixp2000/include/mach/timex.h13
-rw-r--r--arch/arm/mach-ixp2000/include/mach/uncompress.h47
-rw-r--r--arch/arm/mach-ixp2000/ixdp2400.c180
-rw-r--r--arch/arm/mach-ixp2000/ixdp2800.c295
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x00.c306
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x01.c483
-rw-r--r--arch/arm/mach-ixp2000/pci.c246
-rw-r--r--arch/arm/mach-ixp23xx/Kconfig25
-rw-r--r--arch/arm/mach-ixp23xx/Makefile11
-rw-r--r--arch/arm/mach-ixp23xx/Makefile.boot2
-rw-r--r--arch/arm/mach-ixp23xx/core.c455
-rw-r--r--arch/arm/mach-ixp23xx/espresso.c93
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/debug-macro.S25
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/entry-macro.S31
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/hardware.h32
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/io.h22
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/irqs.h223
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/ixdp2351.h89
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/ixp23xx.h298
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/memory.h34
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/platform.h58
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/time.h3
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/timex.h7
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/uncompress.h40
-rw-r--r--arch/arm/mach-ixp23xx/ixdp2351.c347
-rw-r--r--arch/arm/mach-ixp23xx/pci.c288
-rw-r--r--arch/arm/mach-ixp23xx/roadrunner.c180
-rw-r--r--arch/arm/mach-msm/board-msm7x30.c1
-rw-r--r--arch/arm/mach-msm/board-qsd8x50.c1
-rw-r--r--arch/arm/mach-msm/include/mach/debug-macro.S3
-rw-r--r--arch/arm/mach-msm/scm.c3
-rw-r--r--arch/arm/mach-omap1/Makefile13
-rw-r--r--arch/arm/mach-omap1/ams-delta-fiq.c2
-rw-r--r--arch/arm/mach-omap1/board-fsample.c16
-rw-r--r--arch/arm/mach-omap1/board-h2.c17
-rw-r--r--arch/arm/mach-omap1/board-h3.c16
-rw-r--r--arch/arm/mach-omap1/board-nand.c37
-rw-r--r--arch/arm/mach-omap1/board-palmz71.c4
-rw-r--r--arch/arm/mach-omap1/board-perseus2.c16
-rw-r--r--arch/arm/mach-omap1/clock.c3
-rw-r--r--arch/arm/mach-omap1/common.h15
-rw-r--r--arch/arm/mach-omap1/fpga.c2
-rw-r--r--arch/arm/mach-omap1/id.c2
-rw-r--r--arch/arm/mach-omap1/io.c3
-rw-r--r--arch/arm/mach-omap1/irq.c2
-rw-r--r--arch/arm/mach-omap1/lcd_dma.c7
-rw-r--r--arch/arm/mach-omap1/ocpi.c (renamed from arch/arm/plat-omap/ocpi.c)7
-rw-r--r--arch/arm/mach-omap1/pm.c9
-rw-r--r--arch/arm/mach-omap1/reset.c2
-rw-r--r--arch/arm/mach-omap1/timer.c3
-rw-r--r--arch/arm/mach-omap1/usb.c3
-rw-r--r--arch/arm/mach-omap2/am35xx-emac.c37
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c38
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c37
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c25
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c30
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c30
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c32
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c37
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c37
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c29
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c46
-rw-r--r--arch/arm/mach-omap2/board-overo.c25
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c4
-rw-r--r--arch/arm/mach-omap2/board-rx51.c38
-rw-r--r--arch/arm/mach-omap2/board-zoom-display.c1
-rw-r--r--arch/arm/mach-omap2/common.h2
-rw-r--r--arch/arm/mach-omap2/cpuidle34xx.c298
-rw-r--r--arch/arm/mach-omap2/cpuidle44xx.c126
-rw-r--r--arch/arm/mach-omap2/devices.c7
-rw-r--r--arch/arm/mach-omap2/gpio.c2
-rw-r--r--arch/arm/mach-omap2/gpmc-onenand.c3
-rw-r--r--arch/arm/mach-omap2/gpmc.c3
-rw-r--r--arch/arm/mach-omap2/hwspinlock.c2
-rw-r--r--arch/arm/mach-omap2/io.c1
-rw-r--r--arch/arm/mach-omap2/irq.c3
-rw-r--r--arch/arm/mach-omap2/mux.c2
-rw-r--r--arch/arm/mach-omap2/omap-secure.c1
-rw-r--r--arch/arm/mach-omap2/omap-wakeupgen.c2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c1143
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2420_data.c1526
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2430_data.c1921
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c266
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c562
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c3001
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c4931
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_common_data.h71
-rw-r--r--arch/arm/mach-omap2/pm.h21
-rw-r--r--arch/arm/mach-omap2/pm24xx.c3
-rw-r--r--arch/arm/mach-omap2/pm34xx.c10
-rw-r--r--arch/arm/mach-omap2/prm_common.c4
-rw-r--r--arch/arm/mach-omap2/serial.c2
-rw-r--r--arch/arm/mach-omap2/timer.c15
-rw-r--r--arch/arm/mach-omap2/usb-tusb6010.c2
-rw-r--r--arch/arm/mach-orion5x/Kconfig1
-rw-r--r--arch/arm/mach-orion5x/addr-map.c2
-rw-r--r--arch/arm/mach-orion5x/common.c2
-rw-r--r--arch/arm/mach-orion5x/common.h1
-rw-r--r--arch/arm/mach-orion5x/ts78xx-fpga.h6
-rw-r--r--arch/arm/mach-orion5x/ts78xx-setup.c52
-rw-r--r--arch/arm/mach-s3c24xx/bast-ide.c36
-rw-r--r--arch/arm/mach-s3c24xx/mach-amlm5900.c9
-rw-r--r--arch/arm/mach-s3c24xx/mach-anubis.c62
-rw-r--r--arch/arm/mach-s3c24xx/mach-at2440evb.c19
-rw-r--r--arch/arm/mach-s3c24xx/mach-bast.c45
-rw-r--r--arch/arm/mach-s3c24xx/mach-gta02.c7
-rw-r--r--arch/arm/mach-s3c24xx/mach-h1940.c9
-rw-r--r--arch/arm/mach-s3c24xx/mach-mini2440.c19
-rw-r--r--arch/arm/mach-s3c24xx/mach-nexcoder.c6
-rw-r--r--arch/arm/mach-s3c24xx/mach-osiris.c12
-rw-r--r--arch/arm/mach-s3c24xx/mach-otom.c6
-rw-r--r--arch/arm/mach-s3c24xx/mach-qt2410.c12
-rw-r--r--arch/arm/mach-s3c24xx/mach-rx1950.c9
-rw-r--r--arch/arm/mach-s3c24xx/mach-tct_hammer.c7
-rw-r--r--arch/arm/mach-s3c24xx/mach-vr1000.c39
-rw-r--r--arch/arm/mach-s3c24xx/simtec-nor.c6
-rw-r--r--arch/arm/mach-s3c64xx/dev-audio.c120
-rw-r--r--arch/arm/mach-s3c64xx/dev-uart.c48
-rw-r--r--arch/arm/mach-s3c64xx/mach-anw6410.c19
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410.c26
-rw-r--r--arch/arm/mach-s3c64xx/mach-mini6410.c19
-rw-r--r--arch/arm/mach-s3c64xx/mach-real6410.c19
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6410.c13
-rw-r--r--arch/arm/mach-s5p64x0/dev-audio.c72
-rw-r--r--arch/arm/mach-s5pc100/dev-audio.c138
-rw-r--r--arch/arm/mach-s5pv210/dev-audio.c156
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkv210.c19
-rw-r--r--arch/arm/mach-tegra/board-dt-tegra20.c1
-rw-r--r--arch/arm/mach-tegra/include/mach/dma.h4
-rw-r--r--arch/arm/mach-ux500/Kconfig25
-rw-r--r--arch/arm/mach-ux500/Makefile5
-rw-r--r--arch/arm/mach-ux500/board-u5500-sdi.c74
-rw-r--r--arch/arm/mach-ux500/board-u5500.c162
-rw-r--r--arch/arm/mach-ux500/cache-l2x0.c4
-rw-r--r--arch/arm/mach-ux500/clock.c12
-rw-r--r--arch/arm/mach-ux500/cpu-db5500.c247
-rw-r--r--arch/arm/mach-ux500/cpu.c8
-rw-r--r--arch/arm/mach-ux500/devices-db5500.h99
-rw-r--r--arch/arm/mach-ux500/dma-db5500.c137
-rw-r--r--arch/arm/mach-ux500/include/mach/db5500-regs.h143
-rw-r--r--arch/arm/mach-ux500/include/mach/debug-macro.S4
-rw-r--r--arch/arm/mach-ux500/include/mach/devices.h1
-rw-r--r--arch/arm/mach-ux500/include/mach/hardware.h1
-rw-r--r--arch/arm/mach-ux500/include/mach/irqs-board-u5500.h21
-rw-r--r--arch/arm/mach-ux500/include/mach/irqs-db5500.h113
-rw-r--r--arch/arm/mach-ux500/include/mach/irqs.h5
-rw-r--r--arch/arm/mach-ux500/include/mach/mbox-db5500.h88
-rw-r--r--arch/arm/mach-ux500/include/mach/setup.h6
-rw-r--r--arch/arm/mach-ux500/include/mach/uncompress.h7
-rw-r--r--arch/arm/mach-ux500/mbox-db5500.c565
-rw-r--r--arch/arm/mach-ux500/modem-irq-db5500.c143
-rw-r--r--arch/arm/mach-ux500/pins-db5500.h620
-rw-r--r--arch/arm/mach-ux500/platsmp.c8
-rw-r--r--arch/arm/mach-ux500/ste-dma40-db5500.h135
-rw-r--r--arch/arm/mach-ux500/timer.c13
-rw-r--r--arch/arm/plat-mxc/include/mach/iomux-mx51.h48
-rw-r--r--arch/arm/plat-mxc/include/mach/iomux-mx53.h4
-rw-r--r--arch/arm/plat-omap/Makefile3
-rw-r--r--arch/arm/plat-omap/common.c1
-rw-r--r--arch/arm/plat-omap/dma.c13
-rw-r--r--arch/arm/plat-omap/dmtimer.c3
-rw-r--r--arch/arm/plat-omap/include/plat/board.h2
-rw-r--r--arch/arm/plat-omap/include/plat/common.h2
-rw-r--r--arch/arm/plat-omap/include/plat/dma.h1
-rw-r--r--arch/arm/plat-omap/include/plat/dmtimer.h4
-rw-r--r--arch/arm/plat-omap/include/plat/omap_hwmod.h40
-rw-r--r--arch/arm/plat-omap/omap_device.c2
-rw-r--r--arch/arm/plat-omap/sram.c4
-rw-r--r--arch/arm/plat-omap/usb.c8
-rw-r--r--arch/arm/plat-samsung/devs.c16
-rw-r--r--arch/arm/plat-samsung/include/plat/sdhci.h7
-rw-r--r--arch/arm/plat-samsung/platformdata.c2
304 files changed, 7401 insertions, 20497 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 002b1c8da225..11d9bb1bbbc5 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -336,8 +336,8 @@ config ARCH_AT91
336 select IRQ_DOMAIN 336 select IRQ_DOMAIN
337 select NEED_MACH_IO_H if PCCARD 337 select NEED_MACH_IO_H if PCCARD
338 help 338 help
339 This enables support for systems based on the Atmel AT91RM9200, 339 This enables support for systems based on Atmel
340 AT91SAM9 processors. 340 AT91RM9200 and AT91SAM9* processors.
341 341
342config ARCH_BCMRING 342config ARCH_BCMRING
343 bool "Broadcom BCMRING" 343 bool "Broadcom BCMRING"
@@ -369,12 +369,12 @@ config ARCH_HIGHBANK
369 Support for the Calxeda Highbank SoC based boards. 369 Support for the Calxeda Highbank SoC based boards.
370 370
371config ARCH_CLPS711X 371config ARCH_CLPS711X
372 bool "Cirrus Logic CLPS711x/EP721x-based" 372 bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
373 select CPU_ARM720T 373 select CPU_ARM720T
374 select ARCH_USES_GETTIMEOFFSET 374 select ARCH_USES_GETTIMEOFFSET
375 select NEED_MACH_MEMORY_H 375 select NEED_MACH_MEMORY_H
376 help 376 help
377 Support for Cirrus Logic 711x/721x based boards. 377 Support for Cirrus Logic 711x/721x/731x based boards.
378 378
379config ARCH_CNS3XXX 379config ARCH_CNS3XXX
380 bool "Cavium Networks CNS3XXX family" 380 bool "Cavium Networks CNS3XXX family"
@@ -524,28 +524,6 @@ config ARCH_IOP33X
524 help 524 help
525 Support for Intel's IOP33X (XScale) family of processors. 525 Support for Intel's IOP33X (XScale) family of processors.
526 526
527config ARCH_IXP23XX
528 bool "IXP23XX-based"
529 depends on MMU
530 select CPU_XSC3
531 select PCI
532 select ARCH_USES_GETTIMEOFFSET
533 select NEED_MACH_IO_H
534 select NEED_MACH_MEMORY_H
535 help
536 Support for Intel's IXP23xx (XScale) family of processors.
537
538config ARCH_IXP2000
539 bool "IXP2400/2800-based"
540 depends on MMU
541 select CPU_XSCALE
542 select PCI
543 select ARCH_USES_GETTIMEOFFSET
544 select NEED_MACH_IO_H
545 select NEED_MACH_MEMORY_H
546 help
547 Support for Intel's IXP2400/2800 (XScale) family of processors.
548
549config ARCH_IXP4XX 527config ARCH_IXP4XX
550 bool "IXP4xx-based" 528 bool "IXP4xx-based"
551 depends on MMU 529 depends on MMU
@@ -1039,10 +1017,6 @@ source "arch/arm/mach-iop13xx/Kconfig"
1039 1017
1040source "arch/arm/mach-ixp4xx/Kconfig" 1018source "arch/arm/mach-ixp4xx/Kconfig"
1041 1019
1042source "arch/arm/mach-ixp2000/Kconfig"
1043
1044source "arch/arm/mach-ixp23xx/Kconfig"
1045
1046source "arch/arm/mach-kirkwood/Kconfig" 1020source "arch/arm/mach-kirkwood/Kconfig"
1047 1021
1048source "arch/arm/mach-ks8695/Kconfig" 1022source "arch/arm/mach-ks8695/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 3b18ef7ad278..157900da8782 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -147,8 +147,6 @@ machine-$(CONFIG_ARCH_INTEGRATOR) := integrator
147machine-$(CONFIG_ARCH_IOP13XX) := iop13xx 147machine-$(CONFIG_ARCH_IOP13XX) := iop13xx
148machine-$(CONFIG_ARCH_IOP32X) := iop32x 148machine-$(CONFIG_ARCH_IOP32X) := iop32x
149machine-$(CONFIG_ARCH_IOP33X) := iop33x 149machine-$(CONFIG_ARCH_IOP33X) := iop33x
150machine-$(CONFIG_ARCH_IXP2000) := ixp2000
151machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx
152machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx 150machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx
153machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood 151machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood
154machine-$(CONFIG_ARCH_KS8695) := ks8695 152machine-$(CONFIG_ARCH_KS8695) := ks8695
diff --git a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S
index aa5ee49c5c5a..6ab0599c02dd 100644
--- a/arch/arm/boot/compressed/head-xscale.S
+++ b/arch/arm/boot/compressed/head-xscale.S
@@ -32,10 +32,3 @@ __XScale_start:
32 bic r0, r0, #0x1000 @ clear Icache 32 bic r0, r0, #0x1000 @ clear Icache
33 mcr p15, 0, r0, c1, c0, 0 33 mcr p15, 0, r0, c1, c0, 0
34 34
35#ifdef CONFIG_ARCH_IXP2000
36 mov r1, #-1
37 mov r0, #0xd6000000
38 str r1, [r0, #0x14]
39 str r1, [r0, #0x18]
40#endif
41
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile
index 215816f1775f..e8a4e58f1b82 100644
--- a/arch/arm/common/Makefile
+++ b/arch/arm/common/Makefile
@@ -11,7 +11,5 @@ obj-$(CONFIG_DMABOUNCE) += dmabounce.o
11obj-$(CONFIG_SHARP_LOCOMO) += locomo.o 11obj-$(CONFIG_SHARP_LOCOMO) += locomo.o
12obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o 12obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o
13obj-$(CONFIG_SHARP_SCOOP) += scoop.o 13obj-$(CONFIG_SHARP_SCOOP) += scoop.o
14obj-$(CONFIG_ARCH_IXP2000) += uengine.o
15obj-$(CONFIG_ARCH_IXP23XX) += uengine.o
16obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o 14obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o
17obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o 15obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o
diff --git a/arch/arm/common/uengine.c b/arch/arm/common/uengine.c
deleted file mode 100644
index bef408f3d76c..000000000000
--- a/arch/arm/common/uengine.c
+++ /dev/null
@@ -1,507 +0,0 @@
1/*
2 * Generic library functions for the microengines found on the Intel
3 * IXP2000 series of network processors.
4 *
5 * Copyright (C) 2004, 2005 Lennert Buytenhek <buytenh@wantstofly.org>
6 * Dedicated to Marija Kulikova.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as
10 * published by the Free Software Foundation; either version 2.1 of the
11 * License, or (at your option) any later version.
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/slab.h>
17#include <linux/module.h>
18#include <linux/string.h>
19#include <linux/io.h>
20#include <mach/hardware.h>
21#include <asm/hardware/uengine.h>
22
23#if defined(CONFIG_ARCH_IXP2000)
24#define IXP_UENGINE_CSR_VIRT_BASE IXP2000_UENGINE_CSR_VIRT_BASE
25#define IXP_PRODUCT_ID IXP2000_PRODUCT_ID
26#define IXP_MISC_CONTROL IXP2000_MISC_CONTROL
27#define IXP_RESET1 IXP2000_RESET1
28#else
29#if defined(CONFIG_ARCH_IXP23XX)
30#define IXP_UENGINE_CSR_VIRT_BASE IXP23XX_UENGINE_CSR_VIRT_BASE
31#define IXP_PRODUCT_ID IXP23XX_PRODUCT_ID
32#define IXP_MISC_CONTROL IXP23XX_MISC_CONTROL
33#define IXP_RESET1 IXP23XX_RESET1
34#else
35#error unknown platform
36#endif
37#endif
38
39#define USTORE_ADDRESS 0x000
40#define USTORE_DATA_LOWER 0x004
41#define USTORE_DATA_UPPER 0x008
42#define CTX_ENABLES 0x018
43#define CC_ENABLE 0x01c
44#define CSR_CTX_POINTER 0x020
45#define INDIRECT_CTX_STS 0x040
46#define ACTIVE_CTX_STS 0x044
47#define INDIRECT_CTX_SIG_EVENTS 0x048
48#define INDIRECT_CTX_WAKEUP_EVENTS 0x050
49#define NN_PUT 0x080
50#define NN_GET 0x084
51#define TIMESTAMP_LOW 0x0c0
52#define TIMESTAMP_HIGH 0x0c4
53#define T_INDEX_BYTE_INDEX 0x0f4
54#define LOCAL_CSR_STATUS 0x180
55
56u32 ixp2000_uengine_mask;
57
58static void *ixp2000_uengine_csr_area(int uengine)
59{
60 return ((void *)IXP_UENGINE_CSR_VIRT_BASE) + (uengine << 10);
61}
62
63/*
64 * LOCAL_CSR_STATUS=1 after a read or write to a microengine's CSR
65 * space means that the microengine we tried to access was also trying
66 * to access its own CSR space on the same clock cycle as we did. When
67 * this happens, we lose the arbitration process by default, and the
68 * read or write we tried to do was not actually performed, so we try
69 * again until it succeeds.
70 */
71u32 ixp2000_uengine_csr_read(int uengine, int offset)
72{
73 void *uebase;
74 u32 *local_csr_status;
75 u32 *reg;
76 u32 value;
77
78 uebase = ixp2000_uengine_csr_area(uengine);
79
80 local_csr_status = (u32 *)(uebase + LOCAL_CSR_STATUS);
81 reg = (u32 *)(uebase + offset);
82 do {
83 value = ixp2000_reg_read(reg);
84 } while (ixp2000_reg_read(local_csr_status) & 1);
85
86 return value;
87}
88EXPORT_SYMBOL(ixp2000_uengine_csr_read);
89
90void ixp2000_uengine_csr_write(int uengine, int offset, u32 value)
91{
92 void *uebase;
93 u32 *local_csr_status;
94 u32 *reg;
95
96 uebase = ixp2000_uengine_csr_area(uengine);
97
98 local_csr_status = (u32 *)(uebase + LOCAL_CSR_STATUS);
99 reg = (u32 *)(uebase + offset);
100 do {
101 ixp2000_reg_write(reg, value);
102 } while (ixp2000_reg_read(local_csr_status) & 1);
103}
104EXPORT_SYMBOL(ixp2000_uengine_csr_write);
105
106void ixp2000_uengine_reset(u32 uengine_mask)
107{
108 u32 value;
109
110 value = ixp2000_reg_read(IXP_RESET1) & ~ixp2000_uengine_mask;
111
112 uengine_mask &= ixp2000_uengine_mask;
113 ixp2000_reg_wrb(IXP_RESET1, value | uengine_mask);
114 ixp2000_reg_wrb(IXP_RESET1, value);
115}
116EXPORT_SYMBOL(ixp2000_uengine_reset);
117
118void ixp2000_uengine_set_mode(int uengine, u32 mode)
119{
120 /*
121 * CTL_STR_PAR_EN: unconditionally enable parity checking on
122 * control store.
123 */
124 mode |= 0x10000000;
125 ixp2000_uengine_csr_write(uengine, CTX_ENABLES, mode);
126
127 /*
128 * Enable updating of condition codes.
129 */
130 ixp2000_uengine_csr_write(uengine, CC_ENABLE, 0x00002000);
131
132 /*
133 * Initialise other per-microengine registers.
134 */
135 ixp2000_uengine_csr_write(uengine, NN_PUT, 0x00);
136 ixp2000_uengine_csr_write(uengine, NN_GET, 0x00);
137 ixp2000_uengine_csr_write(uengine, T_INDEX_BYTE_INDEX, 0);
138}
139EXPORT_SYMBOL(ixp2000_uengine_set_mode);
140
141static int make_even_parity(u32 x)
142{
143 return hweight32(x) & 1;
144}
145
146static void ustore_write(int uengine, u64 insn)
147{
148 /*
149 * Generate even parity for top and bottom 20 bits.
150 */
151 insn |= (u64)make_even_parity((insn >> 20) & 0x000fffff) << 41;
152 insn |= (u64)make_even_parity(insn & 0x000fffff) << 40;
153
154 /*
155 * Write to microstore. The second write auto-increments
156 * the USTORE_ADDRESS index register.
157 */
158 ixp2000_uengine_csr_write(uengine, USTORE_DATA_LOWER, (u32)insn);
159 ixp2000_uengine_csr_write(uengine, USTORE_DATA_UPPER, (u32)(insn >> 32));
160}
161
162void ixp2000_uengine_load_microcode(int uengine, u8 *ucode, int insns)
163{
164 int i;
165
166 /*
167 * Start writing to microstore at address 0.
168 */
169 ixp2000_uengine_csr_write(uengine, USTORE_ADDRESS, 0x80000000);
170 for (i = 0; i < insns; i++) {
171 u64 insn;
172
173 insn = (((u64)ucode[0]) << 32) |
174 (((u64)ucode[1]) << 24) |
175 (((u64)ucode[2]) << 16) |
176 (((u64)ucode[3]) << 8) |
177 ((u64)ucode[4]);
178 ucode += 5;
179
180 ustore_write(uengine, insn);
181 }
182
183 /*
184 * Pad with a few NOPs at the end (to avoid the microengine
185 * aborting as it prefetches beyond the last instruction), unless
186 * we run off the end of the instruction store first, at which
187 * point the address register will wrap back to zero.
188 */
189 for (i = 0; i < 4; i++) {
190 u32 addr;
191
192 addr = ixp2000_uengine_csr_read(uengine, USTORE_ADDRESS);
193 if (addr == 0x80000000)
194 break;
195 ustore_write(uengine, 0xf0000c0300ULL);
196 }
197
198 /*
199 * End programming.
200 */
201 ixp2000_uengine_csr_write(uengine, USTORE_ADDRESS, 0x00000000);
202}
203EXPORT_SYMBOL(ixp2000_uengine_load_microcode);
204
205void ixp2000_uengine_init_context(int uengine, int context, int pc)
206{
207 /*
208 * Select the right context for indirect access.
209 */
210 ixp2000_uengine_csr_write(uengine, CSR_CTX_POINTER, context);
211
212 /*
213 * Initialise signal masks to immediately go to Ready state.
214 */
215 ixp2000_uengine_csr_write(uengine, INDIRECT_CTX_SIG_EVENTS, 1);
216 ixp2000_uengine_csr_write(uengine, INDIRECT_CTX_WAKEUP_EVENTS, 1);
217
218 /*
219 * Set program counter.
220 */
221 ixp2000_uengine_csr_write(uengine, INDIRECT_CTX_STS, pc);
222}
223EXPORT_SYMBOL(ixp2000_uengine_init_context);
224
225void ixp2000_uengine_start_contexts(int uengine, u8 ctx_mask)
226{
227 u32 mask;
228
229 /*
230 * Enable the specified context to go to Executing state.
231 */
232 mask = ixp2000_uengine_csr_read(uengine, CTX_ENABLES);
233 mask |= ctx_mask << 8;
234 ixp2000_uengine_csr_write(uengine, CTX_ENABLES, mask);
235}
236EXPORT_SYMBOL(ixp2000_uengine_start_contexts);
237
238void ixp2000_uengine_stop_contexts(int uengine, u8 ctx_mask)
239{
240 u32 mask;
241
242 /*
243 * Disable the Ready->Executing transition. Note that this
244 * does not stop the context until it voluntarily yields.
245 */
246 mask = ixp2000_uengine_csr_read(uengine, CTX_ENABLES);
247 mask &= ~(ctx_mask << 8);
248 ixp2000_uengine_csr_write(uengine, CTX_ENABLES, mask);
249}
250EXPORT_SYMBOL(ixp2000_uengine_stop_contexts);
251
252static int check_ixp_type(struct ixp2000_uengine_code *c)
253{
254 u32 product_id;
255 u32 rev;
256
257 product_id = ixp2000_reg_read(IXP_PRODUCT_ID);
258 if (((product_id >> 16) & 0x1f) != 0)
259 return 0;
260
261 switch ((product_id >> 8) & 0xff) {
262#ifdef CONFIG_ARCH_IXP2000
263 case 0: /* IXP2800 */
264 if (!(c->cpu_model_bitmask & 4))
265 return 0;
266 break;
267
268 case 1: /* IXP2850 */
269 if (!(c->cpu_model_bitmask & 8))
270 return 0;
271 break;
272
273 case 2: /* IXP2400 */
274 if (!(c->cpu_model_bitmask & 2))
275 return 0;
276 break;
277#endif
278
279#ifdef CONFIG_ARCH_IXP23XX
280 case 4: /* IXP23xx */
281 if (!(c->cpu_model_bitmask & 0x3f0))
282 return 0;
283 break;
284#endif
285
286 default:
287 return 0;
288 }
289
290 rev = product_id & 0xff;
291 if (rev < c->cpu_min_revision || rev > c->cpu_max_revision)
292 return 0;
293
294 return 1;
295}
296
297static void generate_ucode(u8 *ucode, u32 *gpr_a, u32 *gpr_b)
298{
299 int offset;
300 int i;
301
302 offset = 0;
303
304 for (i = 0; i < 128; i++) {
305 u8 b3;
306 u8 b2;
307 u8 b1;
308 u8 b0;
309
310 b3 = (gpr_a[i] >> 24) & 0xff;
311 b2 = (gpr_a[i] >> 16) & 0xff;
312 b1 = (gpr_a[i] >> 8) & 0xff;
313 b0 = gpr_a[i] & 0xff;
314
315 /* immed[@ai, (b1 << 8) | b0] */
316 /* 11110000 0000VVVV VVVV11VV VVVVVV00 1IIIIIII */
317 ucode[offset++] = 0xf0;
318 ucode[offset++] = (b1 >> 4);
319 ucode[offset++] = (b1 << 4) | 0x0c | (b0 >> 6);
320 ucode[offset++] = (b0 << 2);
321 ucode[offset++] = 0x80 | i;
322
323 /* immed_w1[@ai, (b3 << 8) | b2] */
324 /* 11110100 0100VVVV VVVV11VV VVVVVV00 1IIIIIII */
325 ucode[offset++] = 0xf4;
326 ucode[offset++] = 0x40 | (b3 >> 4);
327 ucode[offset++] = (b3 << 4) | 0x0c | (b2 >> 6);
328 ucode[offset++] = (b2 << 2);
329 ucode[offset++] = 0x80 | i;
330 }
331
332 for (i = 0; i < 128; i++) {
333 u8 b3;
334 u8 b2;
335 u8 b1;
336 u8 b0;
337
338 b3 = (gpr_b[i] >> 24) & 0xff;
339 b2 = (gpr_b[i] >> 16) & 0xff;
340 b1 = (gpr_b[i] >> 8) & 0xff;
341 b0 = gpr_b[i] & 0xff;
342
343 /* immed[@bi, (b1 << 8) | b0] */
344 /* 11110000 0000VVVV VVVV001I IIIIII11 VVVVVVVV */
345 ucode[offset++] = 0xf0;
346 ucode[offset++] = (b1 >> 4);
347 ucode[offset++] = (b1 << 4) | 0x02 | (i >> 6);
348 ucode[offset++] = (i << 2) | 0x03;
349 ucode[offset++] = b0;
350
351 /* immed_w1[@bi, (b3 << 8) | b2] */
352 /* 11110100 0100VVVV VVVV001I IIIIII11 VVVVVVVV */
353 ucode[offset++] = 0xf4;
354 ucode[offset++] = 0x40 | (b3 >> 4);
355 ucode[offset++] = (b3 << 4) | 0x02 | (i >> 6);
356 ucode[offset++] = (i << 2) | 0x03;
357 ucode[offset++] = b2;
358 }
359
360 /* ctx_arb[kill] */
361 ucode[offset++] = 0xe0;
362 ucode[offset++] = 0x00;
363 ucode[offset++] = 0x01;
364 ucode[offset++] = 0x00;
365 ucode[offset++] = 0x00;
366}
367
368static int set_initial_registers(int uengine, struct ixp2000_uengine_code *c)
369{
370 int per_ctx_regs;
371 u32 *gpr_a;
372 u32 *gpr_b;
373 u8 *ucode;
374 int i;
375
376 gpr_a = kzalloc(128 * sizeof(u32), GFP_KERNEL);
377 gpr_b = kzalloc(128 * sizeof(u32), GFP_KERNEL);
378 ucode = kmalloc(513 * 5, GFP_KERNEL);
379 if (gpr_a == NULL || gpr_b == NULL || ucode == NULL) {
380 kfree(ucode);
381 kfree(gpr_b);
382 kfree(gpr_a);
383 return 1;
384 }
385
386 per_ctx_regs = 16;
387 if (c->uengine_parameters & IXP2000_UENGINE_4_CONTEXTS)
388 per_ctx_regs = 32;
389
390 for (i = 0; i < 256; i++) {
391 struct ixp2000_reg_value *r = c->initial_reg_values + i;
392 u32 *bank;
393 int inc;
394 int j;
395
396 if (r->reg == -1)
397 break;
398
399 bank = (r->reg & 0x400) ? gpr_b : gpr_a;
400 inc = (r->reg & 0x80) ? 128 : per_ctx_regs;
401
402 j = r->reg & 0x7f;
403 while (j < 128) {
404 bank[j] = r->value;
405 j += inc;
406 }
407 }
408
409 generate_ucode(ucode, gpr_a, gpr_b);
410 ixp2000_uengine_load_microcode(uengine, ucode, 513);
411 ixp2000_uengine_init_context(uengine, 0, 0);
412 ixp2000_uengine_start_contexts(uengine, 0x01);
413 for (i = 0; i < 100; i++) {
414 u32 status;
415
416 status = ixp2000_uengine_csr_read(uengine, ACTIVE_CTX_STS);
417 if (!(status & 0x80000000))
418 break;
419 }
420 ixp2000_uengine_stop_contexts(uengine, 0x01);
421
422 kfree(ucode);
423 kfree(gpr_b);
424 kfree(gpr_a);
425
426 return !!(i == 100);
427}
428
429int ixp2000_uengine_load(int uengine, struct ixp2000_uengine_code *c)
430{
431 int ctx;
432
433 if (!check_ixp_type(c))
434 return 1;
435
436 if (!(ixp2000_uengine_mask & (1 << uengine)))
437 return 1;
438
439 ixp2000_uengine_reset(1 << uengine);
440 ixp2000_uengine_set_mode(uengine, c->uengine_parameters);
441 if (set_initial_registers(uengine, c))
442 return 1;
443 ixp2000_uengine_load_microcode(uengine, c->insns, c->num_insns);
444
445 for (ctx = 0; ctx < 8; ctx++)
446 ixp2000_uengine_init_context(uengine, ctx, 0);
447
448 return 0;
449}
450EXPORT_SYMBOL(ixp2000_uengine_load);
451
452
453static int __init ixp2000_uengine_init(void)
454{
455 int uengine;
456 u32 value;
457
458 /*
459 * Determine number of microengines present.
460 */
461 switch ((ixp2000_reg_read(IXP_PRODUCT_ID) >> 8) & 0x1fff) {
462#ifdef CONFIG_ARCH_IXP2000
463 case 0: /* IXP2800 */
464 case 1: /* IXP2850 */
465 ixp2000_uengine_mask = 0x00ff00ff;
466 break;
467
468 case 2: /* IXP2400 */
469 ixp2000_uengine_mask = 0x000f000f;
470 break;
471#endif
472
473#ifdef CONFIG_ARCH_IXP23XX
474 case 4: /* IXP23xx */
475 ixp2000_uengine_mask = (*IXP23XX_EXP_CFG_FUSE >> 8) & 0xf;
476 break;
477#endif
478
479 default:
480 printk(KERN_INFO "Detected unknown IXP2000 model (%.8x)\n",
481 (unsigned int)ixp2000_reg_read(IXP_PRODUCT_ID));
482 ixp2000_uengine_mask = 0x00000000;
483 break;
484 }
485
486 /*
487 * Reset microengines.
488 */
489 ixp2000_uengine_reset(ixp2000_uengine_mask);
490
491 /*
492 * Synchronise timestamp counters across all microengines.
493 */
494 value = ixp2000_reg_read(IXP_MISC_CONTROL);
495 ixp2000_reg_wrb(IXP_MISC_CONTROL, value & ~0x80);
496 for (uengine = 0; uengine < 32; uengine++) {
497 if (ixp2000_uengine_mask & (1 << uengine)) {
498 ixp2000_uengine_csr_write(uengine, TIMESTAMP_LOW, 0);
499 ixp2000_uengine_csr_write(uengine, TIMESTAMP_HIGH, 0);
500 }
501 }
502 ixp2000_reg_wrb(IXP_MISC_CONTROL, value | 0x80);
503
504 return 0;
505}
506
507subsys_initcall(ixp2000_uengine_init);
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig
new file mode 100644
index 000000000000..67bc571ed0c3
--- /dev/null
+++ b/arch/arm/configs/at91_dt_defconfig
@@ -0,0 +1,196 @@
1CONFIG_EXPERIMENTAL=y
2# CONFIG_LOCALVERSION_AUTO is not set
3# CONFIG_SWAP is not set
4CONFIG_SYSVIPC=y
5CONFIG_LOG_BUF_SHIFT=14
6CONFIG_BLK_DEV_INITRD=y
7CONFIG_CC_OPTIMIZE_FOR_SIZE=y
8CONFIG_KALLSYMS_ALL=y
9CONFIG_EMBEDDED=y
10CONFIG_SLAB=y
11CONFIG_MODULES=y
12CONFIG_MODULE_UNLOAD=y
13# CONFIG_LBDAF is not set
14# CONFIG_BLK_DEV_BSG is not set
15# CONFIG_IOSCHED_DEADLINE is not set
16# CONFIG_IOSCHED_CFQ is not set
17CONFIG_ARCH_AT91=y
18CONFIG_SOC_AT91SAM9260=y
19CONFIG_SOC_AT91SAM9263=y
20CONFIG_SOC_AT91SAM9G45=y
21CONFIG_SOC_AT91SAM9X5=y
22CONFIG_MACH_AT91SAM_DT=y
23CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
24CONFIG_AT91_TIMER_HZ=128
25CONFIG_AEABI=y
26# CONFIG_OABI_COMPAT is not set
27CONFIG_LEDS=y
28CONFIG_LEDS_CPU=y
29CONFIG_UACCESS_WITH_MEMCPY=y
30CONFIG_ZBOOT_ROM_TEXT=0x0
31CONFIG_ZBOOT_ROM_BSS=0x0
32CONFIG_ARM_APPENDED_DTB=y
33CONFIG_ARM_ATAG_DTB_COMPAT=y
34CONFIG_CMDLINE="mem=128M console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw"
35CONFIG_KEXEC=y
36CONFIG_AUTO_ZRELADDR=y
37# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
38CONFIG_NET=y
39CONFIG_PACKET=y
40CONFIG_UNIX=y
41CONFIG_INET=y
42CONFIG_IP_MULTICAST=y
43CONFIG_IP_PNP=y
44# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
45# CONFIG_INET_XFRM_MODE_TUNNEL is not set
46# CONFIG_INET_XFRM_MODE_BEET is not set
47# CONFIG_INET_DIAG is not set
48CONFIG_IPV6=y
49# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
50# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
51# CONFIG_INET6_XFRM_MODE_BEET is not set
52CONFIG_IPV6_SIT_6RD=y
53# CONFIG_WIRELESS is not set
54CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
55CONFIG_DEVTMPFS=y
56CONFIG_DEVTMPFS_MOUNT=y
57# CONFIG_STANDALONE is not set
58# CONFIG_PREVENT_FIRMWARE_BUILD is not set
59CONFIG_MTD=y
60CONFIG_MTD_CMDLINE_PARTS=y
61CONFIG_MTD_CHAR=y
62CONFIG_MTD_BLOCK=y
63CONFIG_MTD_NAND=y
64CONFIG_MTD_NAND_ATMEL=y
65CONFIG_MTD_UBI=y
66CONFIG_MTD_UBI_GLUEBI=y
67CONFIG_PROC_DEVICETREE=y
68CONFIG_BLK_DEV_LOOP=y
69CONFIG_BLK_DEV_RAM=y
70CONFIG_BLK_DEV_RAM_COUNT=4
71CONFIG_BLK_DEV_RAM_SIZE=8192
72CONFIG_ATMEL_PWM=y
73CONFIG_ATMEL_TCLIB=y
74CONFIG_EEPROM_93CX6=m
75CONFIG_SCSI=y
76CONFIG_BLK_DEV_SD=y
77CONFIG_SCSI_MULTI_LUN=y
78# CONFIG_SCSI_LOWLEVEL is not set
79CONFIG_NETDEVICES=y
80CONFIG_MII=y
81CONFIG_MACB=y
82# CONFIG_NET_VENDOR_BROADCOM is not set
83# CONFIG_NET_VENDOR_CHELSIO is not set
84# CONFIG_NET_VENDOR_FARADAY is not set
85# CONFIG_NET_VENDOR_INTEL is not set
86# CONFIG_NET_VENDOR_MARVELL is not set
87# CONFIG_NET_VENDOR_MICREL is not set
88# CONFIG_NET_VENDOR_NATSEMI is not set
89# CONFIG_NET_VENDOR_SEEQ is not set
90# CONFIG_NET_VENDOR_SMSC is not set
91# CONFIG_NET_VENDOR_STMICRO is not set
92CONFIG_DAVICOM_PHY=y
93CONFIG_MICREL_PHY=y
94# CONFIG_WLAN is not set
95CONFIG_INPUT_POLLDEV=y
96# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
97CONFIG_INPUT_MOUSEDEV_SCREEN_X=480
98CONFIG_INPUT_MOUSEDEV_SCREEN_Y=272
99CONFIG_INPUT_JOYDEV=y
100CONFIG_INPUT_EVDEV=y
101# CONFIG_KEYBOARD_ATKBD is not set
102CONFIG_KEYBOARD_GPIO=y
103# CONFIG_INPUT_MOUSE is not set
104CONFIG_INPUT_TOUCHSCREEN=y
105# CONFIG_SERIO is not set
106CONFIG_LEGACY_PTY_COUNT=4
107CONFIG_SERIAL_ATMEL=y
108CONFIG_SERIAL_ATMEL_CONSOLE=y
109CONFIG_HW_RANDOM=y
110CONFIG_I2C=y
111CONFIG_I2C_GPIO=y
112CONFIG_SPI=y
113CONFIG_SPI_ATMEL=y
114# CONFIG_HWMON is not set
115CONFIG_WATCHDOG=y
116CONFIG_AT91SAM9X_WATCHDOG=y
117CONFIG_SSB=m
118CONFIG_FB=y
119CONFIG_FB_MODE_HELPERS=y
120CONFIG_FB_ATMEL=y
121CONFIG_BACKLIGHT_LCD_SUPPORT=y
122# CONFIG_LCD_CLASS_DEVICE is not set
123CONFIG_BACKLIGHT_CLASS_DEVICE=y
124CONFIG_BACKLIGHT_ATMEL_LCDC=y
125# CONFIG_BACKLIGHT_GENERIC is not set
126CONFIG_FRAMEBUFFER_CONSOLE=y
127CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
128CONFIG_FONTS=y
129CONFIG_FONT_8x8=y
130CONFIG_FONT_ACORN_8x8=y
131CONFIG_FONT_MINI_4x6=y
132CONFIG_LOGO=y
133# CONFIG_HID_SUPPORT is not set
134CONFIG_USB=y
135CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
136CONFIG_USB_DEVICEFS=y
137# CONFIG_USB_DEVICE_CLASS is not set
138CONFIG_USB_EHCI_HCD=y
139CONFIG_USB_OHCI_HCD=y
140CONFIG_USB_ACM=y
141CONFIG_USB_STORAGE=y
142CONFIG_USB_SERIAL=y
143CONFIG_USB_SERIAL_GENERIC=y
144CONFIG_USB_SERIAL_FTDI_SIO=y
145CONFIG_USB_SERIAL_PL2303=y
146CONFIG_USB_GADGET=y
147CONFIG_USB_AT91=m
148CONFIG_USB_ATMEL_USBA=m
149CONFIG_USB_ETH=m
150CONFIG_USB_GADGETFS=m
151CONFIG_USB_CDC_COMPOSITE=m
152CONFIG_USB_G_ACM_MS=m
153CONFIG_USB_G_MULTI=m
154CONFIG_USB_G_MULTI_CDC=y
155CONFIG_MMC=y
156CONFIG_MMC_ATMELMCI=y
157CONFIG_NEW_LEDS=y
158CONFIG_LEDS_CLASS=y
159CONFIG_LEDS_GPIO=y
160CONFIG_LEDS_TRIGGERS=y
161CONFIG_LEDS_TRIGGER_TIMER=y
162CONFIG_LEDS_TRIGGER_HEARTBEAT=y
163CONFIG_LEDS_TRIGGER_GPIO=y
164CONFIG_RTC_CLASS=y
165CONFIG_RTC_DRV_AT91RM9200=y
166CONFIG_RTC_DRV_AT91SAM9=y
167CONFIG_DMADEVICES=y
168# CONFIG_IOMMU_SUPPORT is not set
169CONFIG_EXT2_FS=y
170CONFIG_FANOTIFY=y
171CONFIG_VFAT_FS=y
172CONFIG_TMPFS=y
173CONFIG_NFS_FS=y
174CONFIG_NFS_V3=y
175CONFIG_ROOT_NFS=y
176CONFIG_NLS_CODEPAGE_437=y
177CONFIG_NLS_CODEPAGE_850=y
178CONFIG_NLS_ISO8859_1=y
179CONFIG_STRIP_ASM_SYMS=y
180CONFIG_DEBUG_FS=y
181# CONFIG_SCHED_DEBUG is not set
182# CONFIG_DEBUG_BUGVERBOSE is not set
183# CONFIG_FTRACE is not set
184CONFIG_DEBUG_USER=y
185CONFIG_CRYPTO=y
186CONFIG_CRYPTO_ECB=y
187CONFIG_CRYPTO_AES=y
188CONFIG_CRYPTO_ARC4=y
189# CONFIG_CRYPTO_ANSI_CPRNG is not set
190CONFIG_CRYPTO_USER_API_HASH=m
191CONFIG_CRYPTO_USER_API_SKCIPHER=m
192# CONFIG_CRYPTO_HW is not set
193CONFIG_CRC_CCITT=m
194CONFIG_CRC_ITU_T=m
195CONFIG_CRC7=m
196CONFIG_AVERAGE=y
diff --git a/arch/arm/configs/at91rm9200_defconfig b/arch/arm/configs/at91rm9200_defconfig
index bbe4e1a1f5d8..d54e2acd3ab1 100644
--- a/arch/arm/configs/at91rm9200_defconfig
+++ b/arch/arm/configs/at91rm9200_defconfig
@@ -14,6 +14,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y
14# CONFIG_BLK_DEV_BSG is not set 14# CONFIG_BLK_DEV_BSG is not set
15# CONFIG_IOSCHED_CFQ is not set 15# CONFIG_IOSCHED_CFQ is not set
16CONFIG_ARCH_AT91=y 16CONFIG_ARCH_AT91=y
17CONFIG_ARCH_AT91RM9200=y
17CONFIG_MACH_ONEARM=y 18CONFIG_MACH_ONEARM=y
18CONFIG_ARCH_AT91RM9200DK=y 19CONFIG_ARCH_AT91RM9200DK=y
19CONFIG_MACH_AT91RM9200EK=y 20CONFIG_MACH_AT91RM9200EK=y
diff --git a/arch/arm/configs/ixp2000_defconfig b/arch/arm/configs/ixp2000_defconfig
deleted file mode 100644
index 8405aded97a3..000000000000
--- a/arch/arm/configs/ixp2000_defconfig
+++ /dev/null
@@ -1,99 +0,0 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y
3CONFIG_BSD_PROCESS_ACCT=y
4CONFIG_LOG_BUF_SHIFT=14
5CONFIG_BLK_DEV_INITRD=y
6CONFIG_EXPERT=y
7# CONFIG_HOTPLUG is not set
8CONFIG_SLAB=y
9CONFIG_MODULES=y
10CONFIG_MODULE_UNLOAD=y
11CONFIG_ARCH_IXP2000=y
12CONFIG_ARCH_ENP2611=y
13CONFIG_ARCH_IXDP2400=y
14CONFIG_ARCH_IXDP2800=y
15CONFIG_ARCH_IXDP2401=y
16CONFIG_ARCH_IXDP2801=y
17# CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set
18# CONFIG_ARM_THUMB is not set
19CONFIG_CPU_BIG_ENDIAN=y
20CONFIG_ZBOOT_ROM_TEXT=0x0
21CONFIG_ZBOOT_ROM_BSS=0x0
22CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0"
23CONFIG_FPE_NWFPE=y
24CONFIG_FPE_NWFPE_XP=y
25CONFIG_NET=y
26CONFIG_PACKET=y
27CONFIG_UNIX=y
28CONFIG_INET=y
29CONFIG_IP_PNP=y
30CONFIG_IP_PNP_DHCP=y
31CONFIG_IP_PNP_BOOTP=y
32CONFIG_SYN_COOKIES=y
33CONFIG_IPV6=y
34# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
35# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
36# CONFIG_INET6_XFRM_MODE_BEET is not set
37# CONFIG_IPV6_SIT is not set
38# CONFIG_PREVENT_FIRMWARE_BUILD is not set
39CONFIG_MTD=y
40CONFIG_MTD_PARTITIONS=y
41CONFIG_MTD_REDBOOT_PARTS=y
42CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
43CONFIG_MTD_REDBOOT_PARTS_READONLY=y
44CONFIG_MTD_CHAR=y
45CONFIG_MTD_BLOCK=y
46CONFIG_MTD_CFI=y
47CONFIG_MTD_CFI_INTELEXT=y
48CONFIG_MTD_COMPLEX_MAPPINGS=y
49CONFIG_MTD_IXP2000=y
50CONFIG_BLK_DEV_LOOP=y
51CONFIG_BLK_DEV_NBD=y
52CONFIG_BLK_DEV_RAM=y
53CONFIG_BLK_DEV_RAM_SIZE=8192
54CONFIG_EEPROM_LEGACY=y
55CONFIG_NETDEVICES=y
56CONFIG_DUMMY=y
57CONFIG_NET_ETHERNET=y
58CONFIG_NET_PCI=y
59CONFIG_CS89x0=y
60CONFIG_E100=y
61CONFIG_ENP2611_MSF_NET=y
62CONFIG_WAN=y
63CONFIG_HDLC=y
64CONFIG_HDLC_RAW=y
65CONFIG_HDLC_CISCO=y
66CONFIG_HDLC_FR=y
67CONFIG_HDLC_PPP=y
68CONFIG_DLCI=y
69# CONFIG_INPUT_KEYBOARD is not set
70# CONFIG_INPUT_MOUSE is not set
71# CONFIG_SERIO is not set
72# CONFIG_VT is not set
73CONFIG_SERIAL_8250=y
74CONFIG_SERIAL_8250_CONSOLE=y
75CONFIG_SERIAL_8250_NR_UARTS=3
76# CONFIG_HW_RANDOM is not set
77CONFIG_I2C=y
78CONFIG_I2C_CHARDEV=y
79CONFIG_I2C_IXP2000=y
80CONFIG_WATCHDOG=y
81CONFIG_IXP2000_WATCHDOG=y
82CONFIG_EXT2_FS=y
83CONFIG_EXT2_FS_XATTR=y
84CONFIG_EXT2_FS_POSIX_ACL=y
85CONFIG_EXT3_FS=y
86CONFIG_EXT3_FS_POSIX_ACL=y
87CONFIG_INOTIFY=y
88CONFIG_TMPFS=y
89CONFIG_JFFS2_FS=y
90CONFIG_NFS_FS=y
91CONFIG_NFS_V3=y
92CONFIG_ROOT_NFS=y
93CONFIG_PARTITION_ADVANCED=y
94CONFIG_MAGIC_SYSRQ=y
95CONFIG_DEBUG_KERNEL=y
96CONFIG_DEBUG_MUTEXES=y
97CONFIG_DEBUG_USER=y
98CONFIG_DEBUG_ERRORS=y
99CONFIG_DEBUG_LL=y
diff --git a/arch/arm/configs/ixp23xx_defconfig b/arch/arm/configs/ixp23xx_defconfig
deleted file mode 100644
index 688717612e91..000000000000
--- a/arch/arm/configs/ixp23xx_defconfig
+++ /dev/null
@@ -1,105 +0,0 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y
3CONFIG_BSD_PROCESS_ACCT=y
4CONFIG_LOG_BUF_SHIFT=14
5CONFIG_BLK_DEV_INITRD=y
6CONFIG_EXPERT=y
7CONFIG_SLAB=y
8CONFIG_MODULES=y
9CONFIG_MODULE_UNLOAD=y
10CONFIG_ARCH_IXP23XX=y
11CONFIG_MACH_ESPRESSO=y
12CONFIG_MACH_IXDP2351=y
13CONFIG_MACH_ROADRUNNER=y
14# CONFIG_ARM_THUMB is not set
15CONFIG_CPU_BIG_ENDIAN=y
16CONFIG_ZBOOT_ROM_TEXT=0x0
17CONFIG_ZBOOT_ROM_BSS=0x0
18CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp"
19CONFIG_FPE_NWFPE=y
20CONFIG_FPE_NWFPE_XP=y
21CONFIG_NET=y
22CONFIG_PACKET=y
23CONFIG_UNIX=y
24CONFIG_INET=y
25CONFIG_IP_PNP=y
26CONFIG_IP_PNP_DHCP=y
27CONFIG_IP_PNP_BOOTP=y
28CONFIG_SYN_COOKIES=y
29CONFIG_IPV6=y
30# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
31# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
32# CONFIG_INET6_XFRM_MODE_BEET is not set
33# CONFIG_IPV6_SIT is not set
34# CONFIG_PREVENT_FIRMWARE_BUILD is not set
35# CONFIG_FW_LOADER is not set
36CONFIG_MTD=y
37CONFIG_MTD_PARTITIONS=y
38CONFIG_MTD_REDBOOT_PARTS=y
39CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
40CONFIG_MTD_REDBOOT_PARTS_READONLY=y
41CONFIG_MTD_CHAR=y
42CONFIG_MTD_BLOCK=y
43CONFIG_MTD_CFI=y
44CONFIG_MTD_CFI_INTELEXT=y
45CONFIG_MTD_COMPLEX_MAPPINGS=y
46CONFIG_MTD_PHYSMAP=y
47CONFIG_BLK_DEV_LOOP=y
48CONFIG_BLK_DEV_NBD=y
49CONFIG_BLK_DEV_RAM=y
50CONFIG_BLK_DEV_RAM_SIZE=8192
51CONFIG_EEPROM_LEGACY=y
52CONFIG_IDE=y
53CONFIG_BLK_DEV_SIIMAGE=y
54CONFIG_SCSI=y
55CONFIG_BLK_DEV_SD=y
56CONFIG_NETDEVICES=y
57CONFIG_DUMMY=y
58CONFIG_NET_ETHERNET=y
59CONFIG_NET_PCI=y
60CONFIG_E100=y
61CONFIG_E1000=y
62CONFIG_WAN=y
63CONFIG_HDLC=y
64CONFIG_HDLC_RAW=y
65CONFIG_HDLC_CISCO=y
66CONFIG_HDLC_FR=y
67CONFIG_HDLC_PPP=y
68CONFIG_DLCI=y
69# CONFIG_INPUT_KEYBOARD is not set
70# CONFIG_INPUT_MOUSE is not set
71# CONFIG_SERIO is not set
72# CONFIG_VT is not set
73CONFIG_SERIAL_8250=y
74CONFIG_SERIAL_8250_CONSOLE=y
75# CONFIG_HW_RANDOM is not set
76CONFIG_I2C=y
77CONFIG_I2C_CHARDEV=y
78CONFIG_WATCHDOG=y
79# CONFIG_USB_HID is not set
80CONFIG_USB=y
81CONFIG_USB_MON=y
82CONFIG_USB_EHCI_HCD=y
83CONFIG_USB_OHCI_HCD=y
84CONFIG_USB_UHCI_HCD=y
85CONFIG_USB_STORAGE=y
86CONFIG_EXT2_FS=y
87CONFIG_EXT2_FS_XATTR=y
88CONFIG_EXT2_FS_POSIX_ACL=y
89CONFIG_EXT3_FS=y
90CONFIG_EXT3_FS_POSIX_ACL=y
91CONFIG_INOTIFY=y
92CONFIG_MSDOS_FS=y
93CONFIG_TMPFS=y
94CONFIG_JFFS2_FS=y
95CONFIG_NFS_FS=y
96CONFIG_NFS_V3=y
97CONFIG_ROOT_NFS=y
98CONFIG_PARTITION_ADVANCED=y
99CONFIG_NLS_CODEPAGE_437=y
100CONFIG_MAGIC_SYSRQ=y
101CONFIG_DEBUG_KERNEL=y
102CONFIG_DEBUG_MUTEXES=y
103CONFIG_DEBUG_USER=y
104CONFIG_DEBUG_ERRORS=y
105CONFIG_DEBUG_LL=y
diff --git a/arch/arm/include/asm/hardware/cs89712.h b/arch/arm/include/asm/hardware/cs89712.h
deleted file mode 100644
index f75626933e94..000000000000
--- a/arch/arm/include/asm/hardware/cs89712.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * arch/arm/include/asm/hardware/cs89712.h
3 *
4 * This file contains the hardware definitions of the CS89712
5 * additional internal registers.
6 *
7 * Copyright (C) 2001 Thomas Gleixner autronix automation <gleixner@autronix.de>
8 *
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24#ifndef __ASM_HARDWARE_CS89712_H
25#define __ASM_HARDWARE_CS89712_H
26
27/*
28* CS89712 additional registers
29*/
30
31#define PCDR 0x0002 /* Port C Data register ---------------------------- */
32#define PCDDR 0x0042 /* Port C Data Direction register ------------------ */
33#define SDCONF 0x2300 /* SDRAM Configuration register ---------------------*/
34#define SDRFPR 0x2340 /* SDRAM Refresh period register --------------------*/
35
36#define SDCONF_ACTIVE (1 << 10)
37#define SDCONF_CLKCTL (1 << 9)
38#define SDCONF_WIDTH_4 (0 << 7)
39#define SDCONF_WIDTH_8 (1 << 7)
40#define SDCONF_WIDTH_16 (2 << 7)
41#define SDCONF_WIDTH_32 (3 << 7)
42#define SDCONF_SIZE_16 (0 << 5)
43#define SDCONF_SIZE_64 (1 << 5)
44#define SDCONF_SIZE_128 (2 << 5)
45#define SDCONF_SIZE_256 (3 << 5)
46#define SDCONF_CASLAT_2 (2)
47#define SDCONF_CASLAT_3 (3)
48
49#endif /* __ASM_HARDWARE_CS89712_H */
diff --git a/arch/arm/include/asm/hardware/ep7211.h b/arch/arm/include/asm/hardware/ep7211.h
deleted file mode 100644
index 654d5f625c49..000000000000
--- a/arch/arm/include/asm/hardware/ep7211.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * arch/arm/include/asm/hardware/ep7211.h
3 *
4 * This file contains the hardware definitions of the EP7211 internal
5 * registers.
6 *
7 * Copyright (C) 2001 Blue Mug, Inc. All Rights Reserved.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23#ifndef __ASM_HARDWARE_EP7211_H
24#define __ASM_HARDWARE_EP7211_H
25
26#include <asm/hardware/clps7111.h>
27
28/*
29 * define EP7211_BASE to be the base address of the region
30 * you want to access.
31 */
32
33#define EP7211_PHYS_BASE (0x80000000)
34
35/*
36 * XXX miket@bluemug.com: need to introduce EP7211 registers (those not
37 * present in 7212) here.
38 */
39
40#endif /* __ASM_HARDWARE_EP7211_H */
diff --git a/arch/arm/include/asm/hardware/ep7212.h b/arch/arm/include/asm/hardware/ep7212.h
deleted file mode 100644
index 3b43bbeaf1db..000000000000
--- a/arch/arm/include/asm/hardware/ep7212.h
+++ /dev/null
@@ -1,83 +0,0 @@
1/*
2 * arch/arm/include/asm/hardware/ep7212.h
3 *
4 * This file contains the hardware definitions of the EP7212 internal
5 * registers.
6 *
7 * Copyright (C) 2000 Deep Blue Solutions Ltd.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23#ifndef __ASM_HARDWARE_EP7212_H
24#define __ASM_HARDWARE_EP7212_H
25
26/*
27 * define EP7212_BASE to be the base address of the region
28 * you want to access.
29 */
30
31#define EP7212_PHYS_BASE (0x80000000)
32
33#ifndef __ASSEMBLY__
34#define ep_readl(off) __raw_readl(EP7212_BASE + (off))
35#define ep_writel(val,off) __raw_writel(val, EP7212_BASE + (off))
36#endif
37
38/*
39 * These registers are specific to the EP7212 only
40 */
41#define DAIR 0x2000
42#define DAIR0 0x2040
43#define DAIDR1 0x2080
44#define DAIDR2 0x20c0
45#define DAISR 0x2100
46#define SYSCON3 0x2200
47#define INTSR3 0x2240
48#define INTMR3 0x2280
49#define LEDFLSH 0x22c0
50
51#define DAIR_DAIEN (1 << 16)
52#define DAIR_ECS (1 << 17)
53#define DAIR_LCTM (1 << 19)
54#define DAIR_LCRM (1 << 20)
55#define DAIR_RCTM (1 << 21)
56#define DAIR_RCRM (1 << 22)
57#define DAIR_LBM (1 << 23)
58
59#define DAIDR2_FIFOEN (1 << 15)
60#define DAIDR2_FIFOLEFT (0x0d << 16)
61#define DAIDR2_FIFORIGHT (0x11 << 16)
62
63#define DAISR_RCTS (1 << 0)
64#define DAISR_RCRS (1 << 1)
65#define DAISR_LCTS (1 << 2)
66#define DAISR_LCRS (1 << 3)
67#define DAISR_RCTU (1 << 4)
68#define DAISR_RCRO (1 << 5)
69#define DAISR_LCTU (1 << 6)
70#define DAISR_LCRO (1 << 7)
71#define DAISR_RCNF (1 << 8)
72#define DAISR_RCNE (1 << 9)
73#define DAISR_LCNF (1 << 10)
74#define DAISR_LCNE (1 << 11)
75#define DAISR_FIFO (1 << 12)
76
77#define SYSCON3_ADCCON (1 << 0)
78#define SYSCON3_DAISEL (1 << 3)
79#define SYSCON3_ADCCKNSEN (1 << 4)
80#define SYSCON3_FASTWAKE (1 << 8)
81#define SYSCON3_DAIEN (1 << 9)
82
83#endif /* __ASM_HARDWARE_EP7212_H */
diff --git a/arch/arm/include/asm/hardware/uengine.h b/arch/arm/include/asm/hardware/uengine.h
deleted file mode 100644
index b442d65c6593..000000000000
--- a/arch/arm/include/asm/hardware/uengine.h
+++ /dev/null
@@ -1,62 +0,0 @@
1/*
2 * Generic library functions for the microengines found on the Intel
3 * IXP2000 series of network processors.
4 *
5 * Copyright (C) 2004, 2005 Lennert Buytenhek <buytenh@wantstofly.org>
6 * Dedicated to Marija Kulikova.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as
10 * published by the Free Software Foundation; either version 2.1 of the
11 * License, or (at your option) any later version.
12 */
13
14#ifndef __IXP2000_UENGINE_H
15#define __IXP2000_UENGINE_H
16
17extern u32 ixp2000_uengine_mask;
18
19struct ixp2000_uengine_code
20{
21 u32 cpu_model_bitmask;
22 u8 cpu_min_revision;
23 u8 cpu_max_revision;
24
25 u32 uengine_parameters;
26
27 struct ixp2000_reg_value {
28 int reg;
29 u32 value;
30 } *initial_reg_values;
31
32 int num_insns;
33 u8 *insns;
34};
35
36u32 ixp2000_uengine_csr_read(int uengine, int offset);
37void ixp2000_uengine_csr_write(int uengine, int offset, u32 value);
38void ixp2000_uengine_reset(u32 uengine_mask);
39void ixp2000_uengine_set_mode(int uengine, u32 mode);
40void ixp2000_uengine_load_microcode(int uengine, u8 *ucode, int insns);
41void ixp2000_uengine_init_context(int uengine, int context, int pc);
42void ixp2000_uengine_start_contexts(int uengine, u8 ctx_mask);
43void ixp2000_uengine_stop_contexts(int uengine, u8 ctx_mask);
44int ixp2000_uengine_load(int uengine, struct ixp2000_uengine_code *c);
45
46#define IXP2000_UENGINE_8_CONTEXTS 0x00000000
47#define IXP2000_UENGINE_4_CONTEXTS 0x80000000
48#define IXP2000_UENGINE_PRN_UPDATE_EVERY 0x40000000
49#define IXP2000_UENGINE_PRN_UPDATE_ON_ACCESS 0x00000000
50#define IXP2000_UENGINE_NN_FROM_SELF 0x00100000
51#define IXP2000_UENGINE_NN_FROM_PREVIOUS 0x00000000
52#define IXP2000_UENGINE_ASSERT_EMPTY_AT_3 0x000c0000
53#define IXP2000_UENGINE_ASSERT_EMPTY_AT_2 0x00080000
54#define IXP2000_UENGINE_ASSERT_EMPTY_AT_1 0x00040000
55#define IXP2000_UENGINE_ASSERT_EMPTY_AT_0 0x00000000
56#define IXP2000_UENGINE_LM_ADDR1_GLOBAL 0x00020000
57#define IXP2000_UENGINE_LM_ADDR1_PER_CONTEXT 0x00000000
58#define IXP2000_UENGINE_LM_ADDR0_GLOBAL 0x00010000
59#define IXP2000_UENGINE_LM_ADDR0_PER_CONTEXT 0x00000000
60
61
62#endif
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 45db05d8d94c..98a42f3472d5 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -9,15 +9,6 @@ config HAVE_AT91_DBGU0
9config HAVE_AT91_DBGU1 9config HAVE_AT91_DBGU1
10 bool 10 bool
11 11
12config HAVE_AT91_USART3
13 bool
14
15config HAVE_AT91_USART4
16 bool
17
18config HAVE_AT91_USART5
19 bool
20
21config AT91_SAM9_ALT_RESET 12config AT91_SAM9_ALT_RESET
22 bool 13 bool
23 default !ARCH_AT91X40 14 default !ARCH_AT91X40
@@ -26,87 +17,121 @@ config AT91_SAM9G45_RESET
26 bool 17 bool
27 default !ARCH_AT91X40 18 default !ARCH_AT91X40
28 19
20config SOC_AT91SAM9
21 bool
22 select GENERIC_CLOCKEVENTS
23 select CPU_ARM926T
24
29menu "Atmel AT91 System-on-Chip" 25menu "Atmel AT91 System-on-Chip"
30 26
31choice 27comment "Atmel AT91 Processor"
32 prompt "Atmel AT91 Processor"
33 28
34config ARCH_AT91RM9200 29config SOC_AT91SAM9
30 bool
31 select CPU_ARM926T
32 select AT91_SAM9_TIME
33 select AT91_SAM9_SMC
34
35config SOC_AT91RM9200
35 bool "AT91RM9200" 36 bool "AT91RM9200"
36 select CPU_ARM920T 37 select CPU_ARM920T
37 select GENERIC_CLOCKEVENTS 38 select GENERIC_CLOCKEVENTS
38 select HAVE_AT91_DBGU0 39 select HAVE_AT91_DBGU0
39 select HAVE_AT91_USART3
40 40
41config ARCH_AT91SAM9260 41config SOC_AT91SAM9260
42 bool "AT91SAM9260 or AT91SAM9XE" 42 bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20"
43 select CPU_ARM926T 43 select SOC_AT91SAM9
44 select GENERIC_CLOCKEVENTS
45 select HAVE_AT91_DBGU0 44 select HAVE_AT91_DBGU0
46 select HAVE_AT91_USART3
47 select HAVE_AT91_USART4
48 select HAVE_AT91_USART5
49 select HAVE_NET_MACB 45 select HAVE_NET_MACB
46 help
47 Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE
48 or AT91SAM9G20 SoC.
50 49
51config ARCH_AT91SAM9261 50config SOC_AT91SAM9261
52 bool "AT91SAM9261" 51 bool "AT91SAM9261 or AT91SAM9G10"
53 select CPU_ARM926T 52 select SOC_AT91SAM9
54 select GENERIC_CLOCKEVENTS 53 select HAVE_AT91_DBGU0
55 select HAVE_FB_ATMEL 54 select HAVE_FB_ATMEL
55 help
56 Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC.
57
58config SOC_AT91SAM9263
59 bool "AT91SAM9263"
60 select SOC_AT91SAM9
61 select HAVE_AT91_DBGU1
62 select HAVE_FB_ATMEL
63 select HAVE_NET_MACB
64
65config SOC_AT91SAM9RL
66 bool "AT91SAM9RL"
67 select SOC_AT91SAM9
56 select HAVE_AT91_DBGU0 68 select HAVE_AT91_DBGU0
69 select HAVE_FB_ATMEL
57 70
58config ARCH_AT91SAM9G10 71config SOC_AT91SAM9G45
59 bool "AT91SAM9G10" 72 bool "AT91SAM9G45 or AT91SAM9M10 families"
60 select CPU_ARM926T 73 select SOC_AT91SAM9
61 select GENERIC_CLOCKEVENTS 74 select HAVE_AT91_DBGU1
75 select HAVE_FB_ATMEL
76 select HAVE_NET_MACB
77 help
78 Select this if you are using one of Atmel's AT91SAM9G45 family SoC.
79 This support covers AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11.
80
81config SOC_AT91SAM9X5
82 bool "AT91SAM9x5 family"
83 select SOC_AT91SAM9
62 select HAVE_AT91_DBGU0 84 select HAVE_AT91_DBGU0
63 select HAVE_FB_ATMEL 85 select HAVE_FB_ATMEL
86 select HAVE_NET_MACB
87 help
88 Select this if you are using one of Atmel's AT91SAM9x5 family SoC.
89 This means that your SAM9 name finishes with a '5' (except if it is
90 AT91SAM9G45!).
91 This support covers AT91SAM9G15, AT91SAM9G25, AT91SAM9X25, AT91SAM9G35
92 and AT91SAM9X35.
93
94choice
95 prompt "Atmel AT91 Processor Devices for non DT boards"
96
97config ARCH_AT91_NONE
98 bool "None"
99
100config ARCH_AT91RM9200
101 bool "AT91RM9200"
102 select SOC_AT91RM9200
103
104config ARCH_AT91SAM9260
105 bool "AT91SAM9260 or AT91SAM9XE"
106 select SOC_AT91SAM9260
107
108config ARCH_AT91SAM9261
109 bool "AT91SAM9261"
110 select SOC_AT91SAM9261
111
112config ARCH_AT91SAM9G10
113 bool "AT91SAM9G10"
114 select SOC_AT91SAM9261
64 115
65config ARCH_AT91SAM9263 116config ARCH_AT91SAM9263
66 bool "AT91SAM9263" 117 bool "AT91SAM9263"
67 select CPU_ARM926T 118 select SOC_AT91SAM9263
68 select GENERIC_CLOCKEVENTS
69 select HAVE_FB_ATMEL
70 select HAVE_NET_MACB
71 select HAVE_AT91_DBGU1
72 119
73config ARCH_AT91SAM9RL 120config ARCH_AT91SAM9RL
74 bool "AT91SAM9RL" 121 bool "AT91SAM9RL"
75 select CPU_ARM926T 122 select SOC_AT91SAM9RL
76 select GENERIC_CLOCKEVENTS
77 select HAVE_AT91_USART3
78 select HAVE_FB_ATMEL
79 select HAVE_AT91_DBGU0
80 123
81config ARCH_AT91SAM9G20 124config ARCH_AT91SAM9G20
82 bool "AT91SAM9G20" 125 bool "AT91SAM9G20"
83 select CPU_ARM926T 126 select SOC_AT91SAM9260
84 select GENERIC_CLOCKEVENTS
85 select HAVE_AT91_DBGU0
86 select HAVE_AT91_USART3
87 select HAVE_AT91_USART4
88 select HAVE_AT91_USART5
89 select HAVE_NET_MACB
90 127
91config ARCH_AT91SAM9G45 128config ARCH_AT91SAM9G45
92 bool "AT91SAM9G45" 129 bool "AT91SAM9G45"
93 select CPU_ARM926T 130 select SOC_AT91SAM9G45
94 select GENERIC_CLOCKEVENTS
95 select HAVE_AT91_USART3
96 select HAVE_FB_ATMEL
97 select HAVE_NET_MACB
98 select HAVE_AT91_DBGU1
99
100config ARCH_AT91SAM9X5
101 bool "AT91SAM9x5 family"
102 select CPU_ARM926T
103 select GENERIC_CLOCKEVENTS
104 select HAVE_FB_ATMEL
105 select HAVE_NET_MACB
106 select HAVE_AT91_DBGU0
107 131
108config ARCH_AT91X40 132config ARCH_AT91X40
109 bool "AT91x40" 133 bool "AT91x40"
134 depends on !MMU
110 select ARCH_USES_GETTIMEOFFSET 135 select ARCH_USES_GETTIMEOFFSET
111 136
112endchoice 137endchoice
@@ -364,6 +389,7 @@ config MACH_AT91SAM9G20EK_2MMC
364 Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit 389 Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit
365 with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and 390 with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and
366 onwards. 391 onwards.
392 <http://www.atmel.com/tools/SAM9G20-EK.aspx>
367 393
368config MACH_CPU9G20 394config MACH_CPU9G20
369 bool "Eukrea CPU9G20 board" 395 bool "Eukrea CPU9G20 board"
@@ -433,9 +459,10 @@ comment "AT91SAM9G45 Board Type"
433config MACH_AT91SAM9M10G45EK 459config MACH_AT91SAM9M10G45EK
434 bool "Atmel AT91SAM9M10G45-EK Evaluation Kits" 460 bool "Atmel AT91SAM9M10G45-EK Evaluation Kits"
435 help 461 help
436 Select this if you are using Atmel's AT91SAM9G45-EKES Evaluation Kit. 462 Select this if you are using Atmel's AT91SAM9M10G45-EK Evaluation Kit.
437 "ES" at the end of the name means that this board is an 463 Those boards can be populated with any SoC of AT91SAM9G45 or AT91SAM9M10
438 Engineering Sample. 464 families: AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11.
465 <http://www.atmel.com/tools/SAM9M10-G45-EK.aspx>
439 466
440endif 467endif
441 468
@@ -515,41 +542,6 @@ config AT91_TIMER_HZ
515 system clock (of at least several MHz), rounding is less of a 542 system clock (of at least several MHz), rounding is less of a
516 problem so it can be safer to use a decimal values like 100. 543 problem so it can be safer to use a decimal values like 100.
517 544
518choice
519 prompt "Select a UART for early kernel messages"
520
521config AT91_EARLY_DBGU0
522 bool "DBGU on rm9200, 9260/9g20, 9261/9g10 and 9rl"
523 depends on HAVE_AT91_DBGU0
524
525config AT91_EARLY_DBGU1
526 bool "DBGU on 9263 and 9g45"
527 depends on HAVE_AT91_DBGU1
528
529config AT91_EARLY_USART0
530 bool "USART0"
531
532config AT91_EARLY_USART1
533 bool "USART1"
534
535config AT91_EARLY_USART2
536 bool "USART2"
537 depends on ! ARCH_AT91X40
538
539config AT91_EARLY_USART3
540 bool "USART3"
541 depends on HAVE_AT91_USART3
542
543config AT91_EARLY_USART4
544 bool "USART4"
545 depends on HAVE_AT91_USART4
546
547config AT91_EARLY_USART5
548 bool "USART5"
549 depends on HAVE_AT91_USART5
550
551endchoice
552
553endmenu 545endmenu
554 546
555endif 547endif
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index 8512e53bed93..79d0f60af0b2 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -10,17 +10,25 @@ obj- :=
10obj-$(CONFIG_AT91_PMC_UNIT) += clock.o 10obj-$(CONFIG_AT91_PMC_UNIT) += clock.o
11obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o 11obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o
12obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o 12obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o
13obj-$(CONFIG_SOC_AT91SAM9) += at91sam926x_time.o sam9_smc.o
13 14
14# CPU-specific support 15# CPU-specific support
15obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o 16obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o at91rm9200_time.o
16obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o 17obj-$(CONFIG_SOC_AT91SAM9260) += at91sam9260.o
17obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o 18obj-$(CONFIG_SOC_AT91SAM9261) += at91sam9261.o
18obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o 19obj-$(CONFIG_SOC_AT91SAM9263) += at91sam9263.o
19obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o sam9_smc.o 20obj-$(CONFIG_SOC_AT91SAM9G45) += at91sam9g45.o
20obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o 21obj-$(CONFIG_SOC_AT91SAM9X5) += at91sam9x5.o
21obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o 22obj-$(CONFIG_SOC_AT91SAM9RL) += at91sam9rl.o
22obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o 23
23obj-$(CONFIG_ARCH_AT91SAM9X5) += at91sam9x5.o at91sam926x_time.o sam9_smc.o 24obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200_devices.o
25obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260_devices.o
26obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261_devices.o
27obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261_devices.o
28obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263_devices.o
29obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl_devices.o
30obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260_devices.o
31obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45_devices.o
24obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o 32obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o
25 33
26# AT91RM9200 board-specific support 34# AT91RM9200 board-specific support
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index 89106792d067..26917687fc30 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -249,18 +249,6 @@ static void __init at91rm9200_register_clocks(void)
249 clk_register(&pck3); 249 clk_register(&pck3);
250} 250}
251 251
252static struct clk_lookup console_clock_lookup;
253
254void __init at91rm9200_set_console_clock(int id)
255{
256 if (id >= ARRAY_SIZE(usart_clocks_lookups))
257 return;
258
259 console_clock_lookup.con_id = "usart";
260 console_clock_lookup.clk = usart_clocks_lookups[id].clk;
261 clkdev_add(&console_clock_lookup);
262}
263
264/* -------------------------------------------------------------------- 252/* --------------------------------------------------------------------
265 * GPIO 253 * GPIO
266 * -------------------------------------------------------------------- */ 254 * -------------------------------------------------------------------- */
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index 60c472861e5e..e6b7d0533dd7 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -1152,14 +1152,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
1152 at91_uarts[portnr] = pdev; 1152 at91_uarts[portnr] = pdev;
1153} 1153}
1154 1154
1155void __init at91_set_serial_console(unsigned portnr)
1156{
1157 if (portnr < ATMEL_MAX_UART) {
1158 atmel_default_console_device = at91_uarts[portnr];
1159 at91rm9200_set_console_clock(at91_uarts[portnr]->id);
1160 }
1161}
1162
1163void __init at91_add_device_serial(void) 1155void __init at91_add_device_serial(void)
1164{ 1156{
1165 int i; 1157 int i;
@@ -1168,13 +1160,9 @@ void __init at91_add_device_serial(void)
1168 if (at91_uarts[i]) 1160 if (at91_uarts[i])
1169 platform_device_register(at91_uarts[i]); 1161 platform_device_register(at91_uarts[i]);
1170 } 1162 }
1171
1172 if (!atmel_default_console_device)
1173 printk(KERN_INFO "AT91: No default serial console defined.\n");
1174} 1163}
1175#else 1164#else
1176void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} 1165void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1177void __init at91_set_serial_console(unsigned portnr) {}
1178void __init at91_add_device_serial(void) {} 1166void __init at91_add_device_serial(void) {}
1179#endif 1167#endif
1180 1168
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index 46f774233298..a27bbec50ca3 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -268,18 +268,6 @@ static void __init at91sam9260_register_clocks(void)
268 clk_register(&pck1); 268 clk_register(&pck1);
269} 269}
270 270
271static struct clk_lookup console_clock_lookup;
272
273void __init at91sam9260_set_console_clock(int id)
274{
275 if (id >= ARRAY_SIZE(usart_clocks_lookups))
276 return;
277
278 console_clock_lookup.con_id = "usart";
279 console_clock_lookup.clk = usart_clocks_lookups[id].clk;
280 clkdev_add(&console_clock_lookup);
281}
282
283/* -------------------------------------------------------------------- 271/* --------------------------------------------------------------------
284 * GPIO 272 * GPIO
285 * -------------------------------------------------------------------- */ 273 * -------------------------------------------------------------------- */
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 5652dde4bbe2..ad00fe91d37d 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -1229,14 +1229,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
1229 at91_uarts[portnr] = pdev; 1229 at91_uarts[portnr] = pdev;
1230} 1230}
1231 1231
1232void __init at91_set_serial_console(unsigned portnr)
1233{
1234 if (portnr < ATMEL_MAX_UART) {
1235 atmel_default_console_device = at91_uarts[portnr];
1236 at91sam9260_set_console_clock(at91_uarts[portnr]->id);
1237 }
1238}
1239
1240void __init at91_add_device_serial(void) 1232void __init at91_add_device_serial(void)
1241{ 1233{
1242 int i; 1234 int i;
@@ -1245,13 +1237,9 @@ void __init at91_add_device_serial(void)
1245 if (at91_uarts[i]) 1237 if (at91_uarts[i])
1246 platform_device_register(at91_uarts[i]); 1238 platform_device_register(at91_uarts[i]);
1247 } 1239 }
1248
1249 if (!atmel_default_console_device)
1250 printk(KERN_INFO "AT91: No default serial console defined.\n");
1251} 1240}
1252#else 1241#else
1253void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} 1242void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1254void __init at91_set_serial_console(unsigned portnr) {}
1255void __init at91_add_device_serial(void) {} 1243void __init at91_add_device_serial(void) {}
1256#endif 1244#endif
1257 1245
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index 7de81e6222f1..c77d503d09d1 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -239,18 +239,6 @@ static void __init at91sam9261_register_clocks(void)
239 clk_register(&hck1); 239 clk_register(&hck1);
240} 240}
241 241
242static struct clk_lookup console_clock_lookup;
243
244void __init at91sam9261_set_console_clock(int id)
245{
246 if (id >= ARRAY_SIZE(usart_clocks_lookups))
247 return;
248
249 console_clock_lookup.con_id = "usart";
250 console_clock_lookup.clk = usart_clocks_lookups[id].clk;
251 clkdev_add(&console_clock_lookup);
252}
253
254/* -------------------------------------------------------------------- 242/* --------------------------------------------------------------------
255 * GPIO 243 * GPIO
256 * -------------------------------------------------------------------- */ 244 * -------------------------------------------------------------------- */
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 4db961a93085..9295e90b08ff 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -1051,14 +1051,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
1051 at91_uarts[portnr] = pdev; 1051 at91_uarts[portnr] = pdev;
1052} 1052}
1053 1053
1054void __init at91_set_serial_console(unsigned portnr)
1055{
1056 if (portnr < ATMEL_MAX_UART) {
1057 atmel_default_console_device = at91_uarts[portnr];
1058 at91sam9261_set_console_clock(at91_uarts[portnr]->id);
1059 }
1060}
1061
1062void __init at91_add_device_serial(void) 1054void __init at91_add_device_serial(void)
1063{ 1055{
1064 int i; 1056 int i;
@@ -1067,13 +1059,9 @@ void __init at91_add_device_serial(void)
1067 if (at91_uarts[i]) 1059 if (at91_uarts[i])
1068 platform_device_register(at91_uarts[i]); 1060 platform_device_register(at91_uarts[i]);
1069 } 1061 }
1070
1071 if (!atmel_default_console_device)
1072 printk(KERN_INFO "AT91: No default serial console defined.\n");
1073} 1062}
1074#else 1063#else
1075void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} 1064void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1076void __init at91_set_serial_console(unsigned portnr) {}
1077void __init at91_add_device_serial(void) {} 1065void __init at91_add_device_serial(void) {}
1078#endif 1066#endif
1079 1067
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index ef301be66575..7fae36502fbb 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -255,18 +255,6 @@ static void __init at91sam9263_register_clocks(void)
255 clk_register(&pck3); 255 clk_register(&pck3);
256} 256}
257 257
258static struct clk_lookup console_clock_lookup;
259
260void __init at91sam9263_set_console_clock(int id)
261{
262 if (id >= ARRAY_SIZE(usart_clocks_lookups))
263 return;
264
265 console_clock_lookup.con_id = "usart";
266 console_clock_lookup.clk = usart_clocks_lookups[id].clk;
267 clkdev_add(&console_clock_lookup);
268}
269
270/* -------------------------------------------------------------------- 258/* --------------------------------------------------------------------
271 * GPIO 259 * GPIO
272 * -------------------------------------------------------------------- */ 260 * -------------------------------------------------------------------- */
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index fe99206de880..dfe5bc006d5e 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -1461,14 +1461,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
1461 at91_uarts[portnr] = pdev; 1461 at91_uarts[portnr] = pdev;
1462} 1462}
1463 1463
1464void __init at91_set_serial_console(unsigned portnr)
1465{
1466 if (portnr < ATMEL_MAX_UART) {
1467 atmel_default_console_device = at91_uarts[portnr];
1468 at91sam9263_set_console_clock(at91_uarts[portnr]->id);
1469 }
1470}
1471
1472void __init at91_add_device_serial(void) 1464void __init at91_add_device_serial(void)
1473{ 1465{
1474 int i; 1466 int i;
@@ -1477,13 +1469,9 @@ void __init at91_add_device_serial(void)
1477 if (at91_uarts[i]) 1469 if (at91_uarts[i])
1478 platform_device_register(at91_uarts[i]); 1470 platform_device_register(at91_uarts[i]);
1479 } 1471 }
1480
1481 if (!atmel_default_console_device)
1482 printk(KERN_INFO "AT91: No default serial console defined.\n");
1483} 1472}
1484#else 1473#else
1485void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} 1474void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1486void __init at91_set_serial_console(unsigned portnr) {}
1487void __init at91_add_device_serial(void) {} 1475void __init at91_add_device_serial(void) {}
1488#endif 1476#endif
1489 1477
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index d222f8333dab..f2054495a655 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -288,18 +288,6 @@ static void __init at91sam9g45_register_clocks(void)
288 clk_register(&pck1); 288 clk_register(&pck1);
289} 289}
290 290
291static struct clk_lookup console_clock_lookup;
292
293void __init at91sam9g45_set_console_clock(int id)
294{
295 if (id >= ARRAY_SIZE(usart_clocks_lookups))
296 return;
297
298 console_clock_lookup.con_id = "usart";
299 console_clock_lookup.clk = usart_clocks_lookups[id].clk;
300 clkdev_add(&console_clock_lookup);
301}
302
303/* -------------------------------------------------------------------- 291/* --------------------------------------------------------------------
304 * GPIO 292 * GPIO
305 * -------------------------------------------------------------------- */ 293 * -------------------------------------------------------------------- */
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 6b008aee1dff..db2f88c246ff 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -1741,14 +1741,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
1741 at91_uarts[portnr] = pdev; 1741 at91_uarts[portnr] = pdev;
1742} 1742}
1743 1743
1744void __init at91_set_serial_console(unsigned portnr)
1745{
1746 if (portnr < ATMEL_MAX_UART) {
1747 atmel_default_console_device = at91_uarts[portnr];
1748 at91sam9g45_set_console_clock(at91_uarts[portnr]->id);
1749 }
1750}
1751
1752void __init at91_add_device_serial(void) 1744void __init at91_add_device_serial(void)
1753{ 1745{
1754 int i; 1746 int i;
@@ -1757,13 +1749,9 @@ void __init at91_add_device_serial(void)
1757 if (at91_uarts[i]) 1749 if (at91_uarts[i])
1758 platform_device_register(at91_uarts[i]); 1750 platform_device_register(at91_uarts[i]);
1759 } 1751 }
1760
1761 if (!atmel_default_console_device)
1762 printk(KERN_INFO "AT91: No default serial console defined.\n");
1763} 1752}
1764#else 1753#else
1765void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} 1754void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1766void __init at91_set_serial_console(unsigned portnr) {}
1767void __init at91_add_device_serial(void) {} 1755void __init at91_add_device_serial(void) {}
1768#endif 1756#endif
1769 1757
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
index d9f2774f385e..e420085a57ef 100644
--- a/arch/arm/mach-at91/at91sam9rl.c
+++ b/arch/arm/mach-at91/at91sam9rl.c
@@ -232,18 +232,6 @@ static void __init at91sam9rl_register_clocks(void)
232 clk_register(&pck1); 232 clk_register(&pck1);
233} 233}
234 234
235static struct clk_lookup console_clock_lookup;
236
237void __init at91sam9rl_set_console_clock(int id)
238{
239 if (id >= ARRAY_SIZE(usart_clocks_lookups))
240 return;
241
242 console_clock_lookup.con_id = "usart";
243 console_clock_lookup.clk = usart_clocks_lookups[id].clk;
244 clkdev_add(&console_clock_lookup);
245}
246
247/* -------------------------------------------------------------------- 235/* --------------------------------------------------------------------
248 * GPIO 236 * GPIO
249 * -------------------------------------------------------------------- */ 237 * -------------------------------------------------------------------- */
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index fe4ae22e8561..9c0b1481a9a7 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -1192,14 +1192,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
1192 at91_uarts[portnr] = pdev; 1192 at91_uarts[portnr] = pdev;
1193} 1193}
1194 1194
1195void __init at91_set_serial_console(unsigned portnr)
1196{
1197 if (portnr < ATMEL_MAX_UART) {
1198 atmel_default_console_device = at91_uarts[portnr];
1199 at91sam9rl_set_console_clock(at91_uarts[portnr]->id);
1200 }
1201}
1202
1203void __init at91_add_device_serial(void) 1195void __init at91_add_device_serial(void)
1204{ 1196{
1205 int i; 1197 int i;
@@ -1208,13 +1200,9 @@ void __init at91_add_device_serial(void)
1208 if (at91_uarts[i]) 1200 if (at91_uarts[i])
1209 platform_device_register(at91_uarts[i]); 1201 platform_device_register(at91_uarts[i]);
1210 } 1202 }
1211
1212 if (!atmel_default_console_device)
1213 printk(KERN_INFO "AT91: No default serial console defined.\n");
1214} 1203}
1215#else 1204#else
1216void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} 1205void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
1217void __init at91_set_serial_console(unsigned portnr) {}
1218void __init at91_add_device_serial(void) {} 1206void __init at91_add_device_serial(void) {}
1219#endif 1207#endif
1220 1208
diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c
index 2628384aaae1..271f994314a4 100644
--- a/arch/arm/mach-at91/board-1arm.c
+++ b/arch/arm/mach-at91/board-1arm.c
@@ -47,20 +47,6 @@ static void __init onearm_init_early(void)
47 47
48 /* Initialize processor: 18.432 MHz crystal */ 48 /* Initialize processor: 18.432 MHz crystal */
49 at91_initialize(18432000); 49 at91_initialize(18432000);
50
51 /* DBGU on ttyS0. (Rx & Tx only) */
52 at91_register_uart(0, 0, 0);
53
54 /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */
55 at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
56
57 /* USART1 on ttyS2 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
58 at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS
59 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
60 | ATMEL_UART_RI);
61
62 /* set serial console to ttyS0 (ie, DBGU) */
63 at91_set_serial_console(0);
64} 50}
65 51
66static struct macb_platform_data __initdata onearm_eth_data = { 52static struct macb_platform_data __initdata onearm_eth_data = {
@@ -82,6 +68,16 @@ static struct at91_udc_data __initdata onearm_udc_data = {
82static void __init onearm_board_init(void) 68static void __init onearm_board_init(void)
83{ 69{
84 /* Serial */ 70 /* Serial */
71 /* DBGU on ttyS0. (Rx & Tx only) */
72 at91_register_uart(0, 0, 0);
73
74 /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */
75 at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
76
77 /* USART1 on ttyS2 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
78 at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS
79 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
80 | ATMEL_UART_RI);
85 at91_add_device_serial(); 81 at91_add_device_serial();
86 /* Ethernet */ 82 /* Ethernet */
87 at91_add_device_eth(&onearm_eth_data); 83 at91_add_device_eth(&onearm_eth_data);
diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c
index 161efbaa1029..b7d8aa7b81e6 100644
--- a/arch/arm/mach-at91/board-afeb-9260v1.c
+++ b/arch/arm/mach-at91/board-afeb-9260v1.c
@@ -52,22 +52,6 @@ static void __init afeb9260_init_early(void)
52{ 52{
53 /* Initialize processor: 18.432 MHz crystal */ 53 /* Initialize processor: 18.432 MHz crystal */
54 at91_initialize(18432000); 54 at91_initialize(18432000);
55
56 /* DBGU on ttyS0. (Rx & Tx only) */
57 at91_register_uart(0, 0, 0);
58
59 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
60 at91_register_uart(AT91SAM9260_ID_US0, 1,
61 ATMEL_UART_CTS | ATMEL_UART_RTS
62 | ATMEL_UART_DTR | ATMEL_UART_DSR
63 | ATMEL_UART_DCD | ATMEL_UART_RI);
64
65 /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
66 at91_register_uart(AT91SAM9260_ID_US1, 2,
67 ATMEL_UART_CTS | ATMEL_UART_RTS);
68
69 /* set serial console to ttyS0 (ie, DBGU) */
70 at91_set_serial_console(0);
71} 55}
72 56
73/* 57/*
@@ -183,6 +167,18 @@ static struct at91_cf_data afeb9260_cf_data = {
183static void __init afeb9260_board_init(void) 167static void __init afeb9260_board_init(void)
184{ 168{
185 /* Serial */ 169 /* Serial */
170 /* DBGU on ttyS0. (Rx & Tx only) */
171 at91_register_uart(0, 0, 0);
172
173 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
174 at91_register_uart(AT91SAM9260_ID_US0, 1,
175 ATMEL_UART_CTS | ATMEL_UART_RTS
176 | ATMEL_UART_DTR | ATMEL_UART_DSR
177 | ATMEL_UART_DCD | ATMEL_UART_RI);
178
179 /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
180 at91_register_uart(AT91SAM9260_ID_US1, 2,
181 ATMEL_UART_CTS | ATMEL_UART_RTS);
186 at91_add_device_serial(); 182 at91_add_device_serial();
187 /* USB Host */ 183 /* USB Host */
188 at91_add_device_usbh(&afeb9260_usbh_data); 184 at91_add_device_usbh(&afeb9260_usbh_data);
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c
index c6d44ee0c77e..29d3ef0a50fb 100644
--- a/arch/arm/mach-at91/board-cam60.c
+++ b/arch/arm/mach-at91/board-cam60.c
@@ -49,12 +49,6 @@ static void __init cam60_init_early(void)
49{ 49{
50 /* Initialize processor: 10 MHz crystal */ 50 /* Initialize processor: 10 MHz crystal */
51 at91_initialize(10000000); 51 at91_initialize(10000000);
52
53 /* DBGU on ttyS0. (Rx & Tx only) */
54 at91_register_uart(0, 0, 0);
55
56 /* set serial console to ttyS0 (ie, DBGU) */
57 at91_set_serial_console(0);
58} 52}
59 53
60/* 54/*
@@ -175,6 +169,8 @@ static void __init cam60_add_device_nand(void)
175static void __init cam60_board_init(void) 169static void __init cam60_board_init(void)
176{ 170{
177 /* Serial */ 171 /* Serial */
172 /* DBGU on ttyS0. (Rx & Tx only) */
173 at91_register_uart(0, 0, 0);
178 at91_add_device_serial(); 174 at91_add_device_serial();
179 /* SPI */ 175 /* SPI */
180 at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices)); 176 at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices));
diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c
index 59d9cf997537..44328a6d4609 100644
--- a/arch/arm/mach-at91/board-carmeva.c
+++ b/arch/arm/mach-at91/board-carmeva.c
@@ -44,17 +44,6 @@ static void __init carmeva_init_early(void)
44{ 44{
45 /* Initialize processor: 20.000 MHz crystal */ 45 /* Initialize processor: 20.000 MHz crystal */
46 at91_initialize(20000000); 46 at91_initialize(20000000);
47
48 /* DBGU on ttyS0. (Rx & Tx only) */
49 at91_register_uart(0, 0, 0);
50
51 /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
52 at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
53 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
54 | ATMEL_UART_RI);
55
56 /* set serial console to ttyS0 (ie, DBGU) */
57 at91_set_serial_console(0);
58} 47}
59 48
60static struct macb_platform_data __initdata carmeva_eth_data = { 49static struct macb_platform_data __initdata carmeva_eth_data = {
@@ -139,6 +128,13 @@ static struct gpio_led carmeva_leds[] = {
139static void __init carmeva_board_init(void) 128static void __init carmeva_board_init(void)
140{ 129{
141 /* Serial */ 130 /* Serial */
131 /* DBGU on ttyS0. (Rx & Tx only) */
132 at91_register_uart(0, 0, 0);
133
134 /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
135 at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
136 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
137 | ATMEL_UART_RI);
142 at91_add_device_serial(); 138 at91_add_device_serial();
143 /* Ethernet */ 139 /* Ethernet */
144 at91_add_device_eth(&carmeva_eth_data); 140 at91_add_device_eth(&carmeva_eth_data);
diff --git a/arch/arm/mach-at91/board-cpu9krea.c b/arch/arm/mach-at91/board-cpu9krea.c
index 5f3680e7c883..69951ec7dbf3 100644
--- a/arch/arm/mach-at91/board-cpu9krea.c
+++ b/arch/arm/mach-at91/board-cpu9krea.c
@@ -52,34 +52,6 @@ static void __init cpu9krea_init_early(void)
52{ 52{
53 /* Initialize processor: 18.432 MHz crystal */ 53 /* Initialize processor: 18.432 MHz crystal */
54 at91_initialize(18432000); 54 at91_initialize(18432000);
55
56 /* DGBU on ttyS0. (Rx & Tx only) */
57 at91_register_uart(0, 0, 0);
58
59 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
60 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS |
61 ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR |
62 ATMEL_UART_DCD | ATMEL_UART_RI);
63
64 /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
65 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS |
66 ATMEL_UART_RTS);
67
68 /* USART2 on ttyS3. (Rx, Tx, RTS, CTS) */
69 at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS |
70 ATMEL_UART_RTS);
71
72 /* USART3 on ttyS4. (Rx, Tx) */
73 at91_register_uart(AT91SAM9260_ID_US3, 4, 0);
74
75 /* USART4 on ttyS5. (Rx, Tx) */
76 at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
77
78 /* USART5 on ttyS6. (Rx, Tx) */
79 at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
80
81 /* set serial console to ttyS0 (ie, DBGU) */
82 at91_set_serial_console(0);
83} 55}
84 56
85/* 57/*
@@ -352,6 +324,30 @@ static void __init cpu9krea_board_init(void)
352 /* NOR */ 324 /* NOR */
353 cpu9krea_add_device_nor(); 325 cpu9krea_add_device_nor();
354 /* Serial */ 326 /* Serial */
327 /* DGBU on ttyS0. (Rx & Tx only) */
328 at91_register_uart(0, 0, 0);
329
330 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
331 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS |
332 ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR |
333 ATMEL_UART_DCD | ATMEL_UART_RI);
334
335 /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
336 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS |
337 ATMEL_UART_RTS);
338
339 /* USART2 on ttyS3. (Rx, Tx, RTS, CTS) */
340 at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS |
341 ATMEL_UART_RTS);
342
343 /* USART3 on ttyS4. (Rx, Tx) */
344 at91_register_uart(AT91SAM9260_ID_US3, 4, 0);
345
346 /* USART4 on ttyS5. (Rx, Tx) */
347 at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
348
349 /* USART5 on ttyS6. (Rx, Tx) */
350 at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
355 at91_add_device_serial(); 351 at91_add_device_serial();
356 /* USB Host */ 352 /* USB Host */
357 at91_add_device_usbh(&cpu9krea_usbh_data); 353 at91_add_device_usbh(&cpu9krea_usbh_data);
diff --git a/arch/arm/mach-at91/board-cpuat91.c b/arch/arm/mach-at91/board-cpuat91.c
index e094cc81fe25..895cf2dba612 100644
--- a/arch/arm/mach-at91/board-cpuat91.c
+++ b/arch/arm/mach-at91/board-cpuat91.c
@@ -59,28 +59,6 @@ static void __init cpuat91_init_early(void)
59 59
60 /* Initialize processor: 18.432 MHz crystal */ 60 /* Initialize processor: 18.432 MHz crystal */
61 at91_initialize(18432000); 61 at91_initialize(18432000);
62
63 /* DBGU on ttyS0. (Rx & Tx only) */
64 at91_register_uart(0, 0, 0);
65
66 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
67 at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS |
68 ATMEL_UART_RTS);
69
70 /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
71 at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS |
72 ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR |
73 ATMEL_UART_DCD | ATMEL_UART_RI);
74
75 /* USART2 on ttyS3 (Rx, Tx) */
76 at91_register_uart(AT91RM9200_ID_US2, 3, 0);
77
78 /* USART3 on ttyS4 (Rx, Tx, CTS, RTS) */
79 at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_CTS |
80 ATMEL_UART_RTS);
81
82 /* set serial console to ttyS0 (ie, DBGU) */
83 at91_set_serial_console(0);
84} 62}
85 63
86static struct macb_platform_data __initdata cpuat91_eth_data = { 64static struct macb_platform_data __initdata cpuat91_eth_data = {
@@ -161,6 +139,24 @@ static struct platform_device *platform_devices[] __initdata = {
161static void __init cpuat91_board_init(void) 139static void __init cpuat91_board_init(void)
162{ 140{
163 /* Serial */ 141 /* Serial */
142 /* DBGU on ttyS0. (Rx & Tx only) */
143 at91_register_uart(0, 0, 0);
144
145 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
146 at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS |
147 ATMEL_UART_RTS);
148
149 /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
150 at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS |
151 ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR |
152 ATMEL_UART_DCD | ATMEL_UART_RI);
153
154 /* USART2 on ttyS3 (Rx, Tx) */
155 at91_register_uart(AT91RM9200_ID_US2, 3, 0);
156
157 /* USART3 on ttyS4 (Rx, Tx, CTS, RTS) */
158 at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_CTS |
159 ATMEL_UART_RTS);
164 at91_add_device_serial(); 160 at91_add_device_serial();
165 /* LEDs. */ 161 /* LEDs. */
166 at91_gpio_leds(cpuat91_leds, ARRAY_SIZE(cpuat91_leds)); 162 at91_gpio_leds(cpuat91_leds, ARRAY_SIZE(cpuat91_leds));
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c
index 1a1547b1ce4e..cd813361cd26 100644
--- a/arch/arm/mach-at91/board-csb337.c
+++ b/arch/arm/mach-at91/board-csb337.c
@@ -47,15 +47,6 @@ static void __init csb337_init_early(void)
47{ 47{
48 /* Initialize processor: 3.6864 MHz crystal */ 48 /* Initialize processor: 3.6864 MHz crystal */
49 at91_initialize(3686400); 49 at91_initialize(3686400);
50
51 /* Setup the LEDs */
52 at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
53
54 /* DBGU on ttyS0 */
55 at91_register_uart(0, 0, 0);
56
57 /* make console=ttyS0 the default */
58 at91_set_serial_console(0);
59} 50}
60 51
61static struct macb_platform_data __initdata csb337_eth_data = { 52static struct macb_platform_data __initdata csb337_eth_data = {
@@ -228,7 +219,11 @@ static struct gpio_led csb_leds[] = {
228 219
229static void __init csb337_board_init(void) 220static void __init csb337_board_init(void)
230{ 221{
222 /* Setup the LEDs */
223 at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
231 /* Serial */ 224 /* Serial */
225 /* DBGU on ttyS0 */
226 at91_register_uart(0, 0, 0);
232 at91_add_device_serial(); 227 at91_add_device_serial();
233 /* Ethernet */ 228 /* Ethernet */
234 at91_add_device_eth(&csb337_eth_data); 229 at91_add_device_eth(&csb337_eth_data);
diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c
index f650bf39455d..7c8b05a57d7f 100644
--- a/arch/arm/mach-at91/board-csb637.c
+++ b/arch/arm/mach-at91/board-csb637.c
@@ -44,12 +44,6 @@ static void __init csb637_init_early(void)
44{ 44{
45 /* Initialize processor: 3.6864 MHz crystal */ 45 /* Initialize processor: 3.6864 MHz crystal */
46 at91_initialize(3686400); 46 at91_initialize(3686400);
47
48 /* DBGU on ttyS0. (Rx & Tx only) */
49 at91_register_uart(0, 0, 0);
50
51 /* make console=ttyS0 (ie, DBGU) the default */
52 at91_set_serial_console(0);
53} 47}
54 48
55static struct macb_platform_data __initdata csb637_eth_data = { 49static struct macb_platform_data __initdata csb637_eth_data = {
@@ -118,6 +112,8 @@ static void __init csb637_board_init(void)
118 /* LED(s) */ 112 /* LED(s) */
119 at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds)); 113 at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds));
120 /* Serial */ 114 /* Serial */
115 /* DBGU on ttyS0. (Rx & Tx only) */
116 at91_register_uart(0, 0, 0);
121 at91_add_device_serial(); 117 at91_add_device_serial();
122 /* Ethernet */ 118 /* Ethernet */
123 at91_add_device_eth(&csb637_eth_data); 119 at91_add_device_eth(&csb637_eth_data);
diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c
index c18d4d307801..a1fce05aa7a5 100644
--- a/arch/arm/mach-at91/board-dt.c
+++ b/arch/arm/mach-at91/board-dt.c
@@ -1,10 +1,6 @@
1/* 1/*
2 * Setup code for AT91SAM Evaluation Kits with Device Tree support 2 * Setup code for AT91SAM Evaluation Kits with Device Tree support
3 * 3 *
4 * Covers: * AT91SAM9G45-EKES board
5 * * AT91SAM9M10-EKES board
6 * * AT91SAM9M10G45-EK board
7 *
8 * Copyright (C) 2011 Atmel, 4 * Copyright (C) 2011 Atmel,
9 * 2011 Nicolas Ferre <nicolas.ferre@atmel.com> 5 * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>
10 * 6 *
@@ -49,9 +45,7 @@ static void __init at91_dt_device_init(void)
49} 45}
50 46
51static const char *at91_dt_board_compat[] __initdata = { 47static const char *at91_dt_board_compat[] __initdata = {
52 "atmel,at91sam9m10g45ek", 48 "atmel,at91sam9",
53 "atmel,at91sam9x5ek",
54 "calao,usb-a9g20",
55 NULL 49 NULL
56}; 50};
57 51
diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c
index d302ca3eeb64..bd1017297989 100644
--- a/arch/arm/mach-at91/board-eb9200.c
+++ b/arch/arm/mach-at91/board-eb9200.c
@@ -44,20 +44,6 @@ static void __init eb9200_init_early(void)
44{ 44{
45 /* Initialize processor: 18.432 MHz crystal */ 45 /* Initialize processor: 18.432 MHz crystal */
46 at91_initialize(18432000); 46 at91_initialize(18432000);
47
48 /* DBGU on ttyS0. (Rx & Tx only) */
49 at91_register_uart(0, 0, 0);
50
51 /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
52 at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
53 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
54 | ATMEL_UART_RI);
55
56 /* USART2 on ttyS2. (Rx, Tx) - IRDA */
57 at91_register_uart(AT91RM9200_ID_US2, 2, 0);
58
59 /* set serial console to ttyS0 (ie, DBGU) */
60 at91_set_serial_console(0);
61} 47}
62 48
63static struct macb_platform_data __initdata eb9200_eth_data = { 49static struct macb_platform_data __initdata eb9200_eth_data = {
@@ -101,6 +87,16 @@ static struct i2c_board_info __initdata eb9200_i2c_devices[] = {
101static void __init eb9200_board_init(void) 87static void __init eb9200_board_init(void)
102{ 88{
103 /* Serial */ 89 /* Serial */
90 /* DBGU on ttyS0. (Rx & Tx only) */
91 at91_register_uart(0, 0, 0);
92
93 /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
94 at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
95 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
96 | ATMEL_UART_RI);
97
98 /* USART2 on ttyS2. (Rx, Tx) - IRDA */
99 at91_register_uart(AT91RM9200_ID_US2, 2, 0);
104 at91_add_device_serial(); 100 at91_add_device_serial();
105 /* Ethernet */ 101 /* Ethernet */
106 at91_add_device_eth(&eb9200_eth_data); 102 at91_add_device_eth(&eb9200_eth_data);
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c
index 69966ce4d776..89cc3726a9ce 100644
--- a/arch/arm/mach-at91/board-ecbat91.c
+++ b/arch/arm/mach-at91/board-ecbat91.c
@@ -50,18 +50,6 @@ static void __init ecb_at91init_early(void)
50 50
51 /* Initialize processor: 18.432 MHz crystal */ 51 /* Initialize processor: 18.432 MHz crystal */
52 at91_initialize(18432000); 52 at91_initialize(18432000);
53
54 /* Setup the LEDs */
55 at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7);
56
57 /* DBGU on ttyS0. (Rx & Tx only) */
58 at91_register_uart(0, 0, 0);
59
60 /* USART0 on ttyS1. (Rx & Tx only) */
61 at91_register_uart(AT91RM9200_ID_US0, 1, 0);
62
63 /* set serial console to ttyS0 (ie, DBGU) */
64 at91_set_serial_console(0);
65} 53}
66 54
67static struct macb_platform_data __initdata ecb_at91eth_data = { 55static struct macb_platform_data __initdata ecb_at91eth_data = {
@@ -151,7 +139,15 @@ static struct spi_board_info __initdata ecb_at91spi_devices[] = {
151 139
152static void __init ecb_at91board_init(void) 140static void __init ecb_at91board_init(void)
153{ 141{
142 /* Setup the LEDs */
143 at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7);
144
154 /* Serial */ 145 /* Serial */
146 /* DBGU on ttyS0. (Rx & Tx only) */
147 at91_register_uart(0, 0, 0);
148
149 /* USART0 on ttyS1. (Rx & Tx only) */
150 at91_register_uart(AT91RM9200_ID_US0, 1, 0);
155 at91_add_device_serial(); 151 at91_add_device_serial();
156 152
157 /* Ethernet */ 153 /* Ethernet */
diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c
index f23aabef8551..558546cf63f4 100644
--- a/arch/arm/mach-at91/board-eco920.c
+++ b/arch/arm/mach-at91/board-eco920.c
@@ -37,15 +37,6 @@ static void __init eco920_init_early(void)
37 at91rm9200_set_type(ARCH_REVISON_9200_PQFP); 37 at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
38 38
39 at91_initialize(18432000); 39 at91_initialize(18432000);
40
41 /* Setup the LEDs */
42 at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
43
44 /* DBGU on ttyS0. (Rx & Tx only */
45 at91_register_uart(0, 0, 0);
46
47 /* set serial console to ttyS0 (ie, DBGU) */
48 at91_set_serial_console(0);
49} 40}
50 41
51static struct macb_platform_data __initdata eco920_eth_data = { 42static struct macb_platform_data __initdata eco920_eth_data = {
@@ -103,6 +94,10 @@ static struct spi_board_info eco920_spi_devices[] = {
103 94
104static void __init eco920_board_init(void) 95static void __init eco920_board_init(void)
105{ 96{
97 /* Setup the LEDs */
98 at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
99 /* DBGU on ttyS0. (Rx & Tx only */
100 at91_register_uart(0, 0, 0);
106 at91_add_device_serial(); 101 at91_add_device_serial();
107 at91_add_device_eth(&eco920_eth_data); 102 at91_add_device_eth(&eco920_eth_data);
108 at91_add_device_usbh(&eco920_usbh_data); 103 at91_add_device_usbh(&eco920_usbh_data);
diff --git a/arch/arm/mach-at91/board-flexibity.c b/arch/arm/mach-at91/board-flexibity.c
index 1815152001f7..47658f78105d 100644
--- a/arch/arm/mach-at91/board-flexibity.c
+++ b/arch/arm/mach-at91/board-flexibity.c
@@ -41,12 +41,6 @@ static void __init flexibity_init_early(void)
41{ 41{
42 /* Initialize processor: 18.432 MHz crystal */ 42 /* Initialize processor: 18.432 MHz crystal */
43 at91_initialize(18432000); 43 at91_initialize(18432000);
44
45 /* DBGU on ttyS0. (Rx & Tx only) */
46 at91_register_uart(0, 0, 0);
47
48 /* set serial console to ttyS0 (ie, DBGU) */
49 at91_set_serial_console(0);
50} 44}
51 45
52/* USB Host port */ 46/* USB Host port */
@@ -143,6 +137,8 @@ static struct gpio_led flexibity_leds[] = {
143static void __init flexibity_board_init(void) 137static void __init flexibity_board_init(void)
144{ 138{
145 /* Serial */ 139 /* Serial */
140 /* DBGU on ttyS0. (Rx & Tx only) */
141 at91_register_uart(0, 0, 0);
146 at91_add_device_serial(); 142 at91_add_device_serial();
147 /* USB Host */ 143 /* USB Host */
148 at91_add_device_usbh(&flexibity_usbh_data); 144 at91_add_device_usbh(&flexibity_usbh_data);
diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c
index caf017f0f4ee..33411e6ecb1f 100644
--- a/arch/arm/mach-at91/board-foxg20.c
+++ b/arch/arm/mach-at91/board-foxg20.c
@@ -61,44 +61,6 @@ static void __init foxg20_init_early(void)
61{ 61{
62 /* Initialize processor: 18.432 MHz crystal */ 62 /* Initialize processor: 18.432 MHz crystal */
63 at91_initialize(18432000); 63 at91_initialize(18432000);
64
65 /* DBGU on ttyS0. (Rx & Tx only) */
66 at91_register_uart(0, 0, 0);
67
68 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
69 at91_register_uart(AT91SAM9260_ID_US0, 1,
70 ATMEL_UART_CTS
71 | ATMEL_UART_RTS
72 | ATMEL_UART_DTR
73 | ATMEL_UART_DSR
74 | ATMEL_UART_DCD
75 | ATMEL_UART_RI);
76
77 /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
78 at91_register_uart(AT91SAM9260_ID_US1, 2,
79 ATMEL_UART_CTS
80 | ATMEL_UART_RTS);
81
82 /* USART2 on ttyS3. (Rx & Tx only) */
83 at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
84
85 /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */
86 at91_register_uart(AT91SAM9260_ID_US3, 4,
87 ATMEL_UART_CTS
88 | ATMEL_UART_RTS);
89
90 /* USART4 on ttyS5. (Rx & Tx only) */
91 at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
92
93 /* USART5 on ttyS6. (Rx & Tx only) */
94 at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
95
96 /* set serial console to ttyS0 (ie, DBGU) */
97 at91_set_serial_console(0);
98
99 /* Set the internal pull-up resistor on DRXD */
100 at91_set_A_periph(AT91_PIN_PB14, 1);
101
102} 64}
103 65
104/* 66/*
@@ -241,6 +203,39 @@ static struct i2c_board_info __initdata foxg20_i2c_devices[] = {
241static void __init foxg20_board_init(void) 203static void __init foxg20_board_init(void)
242{ 204{
243 /* Serial */ 205 /* Serial */
206 /* DBGU on ttyS0. (Rx & Tx only) */
207 at91_register_uart(0, 0, 0);
208
209 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
210 at91_register_uart(AT91SAM9260_ID_US0, 1,
211 ATMEL_UART_CTS
212 | ATMEL_UART_RTS
213 | ATMEL_UART_DTR
214 | ATMEL_UART_DSR
215 | ATMEL_UART_DCD
216 | ATMEL_UART_RI);
217
218 /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
219 at91_register_uart(AT91SAM9260_ID_US1, 2,
220 ATMEL_UART_CTS
221 | ATMEL_UART_RTS);
222
223 /* USART2 on ttyS3. (Rx & Tx only) */
224 at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
225
226 /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */
227 at91_register_uart(AT91SAM9260_ID_US3, 4,
228 ATMEL_UART_CTS
229 | ATMEL_UART_RTS);
230
231 /* USART4 on ttyS5. (Rx & Tx only) */
232 at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
233
234 /* USART5 on ttyS6. (Rx & Tx only) */
235 at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
236
237 /* Set the internal pull-up resistor on DRXD */
238 at91_set_A_periph(AT91_PIN_PB14, 1);
244 at91_add_device_serial(); 239 at91_add_device_serial();
245 /* USB Host */ 240 /* USB Host */
246 at91_add_device_usbh(&foxg20_usbh_data); 241 at91_add_device_usbh(&foxg20_usbh_data);
diff --git a/arch/arm/mach-at91/board-gsia18s.c b/arch/arm/mach-at91/board-gsia18s.c
index 230e71969fb7..3e0dfa643a86 100644
--- a/arch/arm/mach-at91/board-gsia18s.c
+++ b/arch/arm/mach-at91/board-gsia18s.c
@@ -41,38 +41,6 @@
41static void __init gsia18s_init_early(void) 41static void __init gsia18s_init_early(void)
42{ 42{
43 stamp9g20_init_early(); 43 stamp9g20_init_early();
44
45 /*
46 * USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI).
47 * Used for Internal Analog Modem.
48 */
49 at91_register_uart(AT91SAM9260_ID_US0, 1,
50 ATMEL_UART_CTS | ATMEL_UART_RTS |
51 ATMEL_UART_DTR | ATMEL_UART_DSR |
52 ATMEL_UART_DCD | ATMEL_UART_RI);
53 /*
54 * USART1 on ttyS2 (Rx, Tx, CTS, RTS).
55 * Used for GPS or WiFi or Data stream.
56 */
57 at91_register_uart(AT91SAM9260_ID_US1, 2,
58 ATMEL_UART_CTS | ATMEL_UART_RTS);
59 /*
60 * USART2 on ttyS3 (Rx, Tx, CTS, RTS).
61 * Used for External Modem.
62 */
63 at91_register_uart(AT91SAM9260_ID_US2, 3,
64 ATMEL_UART_CTS | ATMEL_UART_RTS);
65 /*
66 * USART3 on ttyS4 (Rx, Tx, RTS).
67 * Used for RS-485.
68 */
69 at91_register_uart(AT91SAM9260_ID_US3, 4, ATMEL_UART_RTS);
70
71 /*
72 * USART4 on ttyS5 (Rx, Tx).
73 * Used for TRX433 Radio Module.
74 */
75 at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
76} 44}
77 45
78/* 46/*
@@ -558,6 +526,37 @@ static int __init gsia18s_power_off_init(void)
558 526
559static void __init gsia18s_board_init(void) 527static void __init gsia18s_board_init(void)
560{ 528{
529 /*
530 * USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI).
531 * Used for Internal Analog Modem.
532 */
533 at91_register_uart(AT91SAM9260_ID_US0, 1,
534 ATMEL_UART_CTS | ATMEL_UART_RTS |
535 ATMEL_UART_DTR | ATMEL_UART_DSR |
536 ATMEL_UART_DCD | ATMEL_UART_RI);
537 /*
538 * USART1 on ttyS2 (Rx, Tx, CTS, RTS).
539 * Used for GPS or WiFi or Data stream.
540 */
541 at91_register_uart(AT91SAM9260_ID_US1, 2,
542 ATMEL_UART_CTS | ATMEL_UART_RTS);
543 /*
544 * USART2 on ttyS3 (Rx, Tx, CTS, RTS).
545 * Used for External Modem.
546 */
547 at91_register_uart(AT91SAM9260_ID_US2, 3,
548 ATMEL_UART_CTS | ATMEL_UART_RTS);
549 /*
550 * USART3 on ttyS4 (Rx, Tx, RTS).
551 * Used for RS-485.
552 */
553 at91_register_uart(AT91SAM9260_ID_US3, 4, ATMEL_UART_RTS);
554
555 /*
556 * USART4 on ttyS5 (Rx, Tx).
557 * Used for TRX433 Radio Module.
558 */
559 at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
561 stamp9g20_board_init(); 560 stamp9g20_board_init();
562 at91_add_device_usbh(&usbh_data); 561 at91_add_device_usbh(&usbh_data);
563 at91_add_device_udc(&udc_data); 562 at91_add_device_udc(&udc_data);
diff --git a/arch/arm/mach-at91/board-kafa.c b/arch/arm/mach-at91/board-kafa.c
index efde1b2327c8..f260657f32bc 100644
--- a/arch/arm/mach-at91/board-kafa.c
+++ b/arch/arm/mach-at91/board-kafa.c
@@ -47,18 +47,6 @@ static void __init kafa_init_early(void)
47 47
48 /* Initialize processor: 18.432 MHz crystal */ 48 /* Initialize processor: 18.432 MHz crystal */
49 at91_initialize(18432000); 49 at91_initialize(18432000);
50
51 /* Set up the LEDs */
52 at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4);
53
54 /* DBGU on ttyS0. (Rx & Tx only) */
55 at91_register_uart(0, 0, 0);
56
57 /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */
58 at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
59
60 /* set serial console to ttyS0 (ie, DBGU) */
61 at91_set_serial_console(0);
62} 50}
63 51
64static struct macb_platform_data __initdata kafa_eth_data = { 52static struct macb_platform_data __initdata kafa_eth_data = {
@@ -79,7 +67,15 @@ static struct at91_udc_data __initdata kafa_udc_data = {
79 67
80static void __init kafa_board_init(void) 68static void __init kafa_board_init(void)
81{ 69{
70 /* Set up the LEDs */
71 at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4);
72
82 /* Serial */ 73 /* Serial */
74 /* DBGU on ttyS0. (Rx & Tx only) */
75 at91_register_uart(0, 0, 0);
76
77 /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */
78 at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
83 at91_add_device_serial(); 79 at91_add_device_serial();
84 /* Ethernet */ 80 /* Ethernet */
85 at91_add_device_eth(&kafa_eth_data); 81 at91_add_device_eth(&kafa_eth_data);
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c
index 59b92aab9bcf..ba39db5482b9 100644
--- a/arch/arm/mach-at91/board-kb9202.c
+++ b/arch/arm/mach-at91/board-kb9202.c
@@ -50,24 +50,6 @@ static void __init kb9202_init_early(void)
50 50
51 /* Initialize processor: 10 MHz crystal */ 51 /* Initialize processor: 10 MHz crystal */
52 at91_initialize(10000000); 52 at91_initialize(10000000);
53
54 /* Set up the LEDs */
55 at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18);
56
57 /* DBGU on ttyS0. (Rx & Tx only) */
58 at91_register_uart(0, 0, 0);
59
60 /* USART0 on ttyS1 (Rx & Tx only) */
61 at91_register_uart(AT91RM9200_ID_US0, 1, 0);
62
63 /* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */
64 at91_register_uart(AT91RM9200_ID_US1, 2, 0);
65
66 /* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */
67 at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
68
69 /* set serial console to ttyS0 (ie, DBGU) */
70 at91_set_serial_console(0);
71} 53}
72 54
73static struct macb_platform_data __initdata kb9202_eth_data = { 55static struct macb_platform_data __initdata kb9202_eth_data = {
@@ -115,7 +97,21 @@ static struct atmel_nand_data __initdata kb9202_nand_data = {
115 97
116static void __init kb9202_board_init(void) 98static void __init kb9202_board_init(void)
117{ 99{
100 /* Set up the LEDs */
101 at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18);
102
118 /* Serial */ 103 /* Serial */
104 /* DBGU on ttyS0. (Rx & Tx only) */
105 at91_register_uart(0, 0, 0);
106
107 /* USART0 on ttyS1 (Rx & Tx only) */
108 at91_register_uart(AT91RM9200_ID_US0, 1, 0);
109
110 /* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */
111 at91_register_uart(AT91RM9200_ID_US1, 2, 0);
112
113 /* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */
114 at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
119 at91_add_device_serial(); 115 at91_add_device_serial();
120 /* Ethernet */ 116 /* Ethernet */
121 at91_add_device_eth(&kb9202_eth_data); 117 at91_add_device_eth(&kb9202_eth_data);
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c
index 57d5f6a4726a..d2f4cc161766 100644
--- a/arch/arm/mach-at91/board-neocore926.c
+++ b/arch/arm/mach-at91/board-neocore926.c
@@ -55,15 +55,6 @@ static void __init neocore926_init_early(void)
55{ 55{
56 /* Initialize processor: 20 MHz crystal */ 56 /* Initialize processor: 20 MHz crystal */
57 at91_initialize(20000000); 57 at91_initialize(20000000);
58
59 /* DBGU on ttyS0. (Rx & Tx only) */
60 at91_register_uart(0, 0, 0);
61
62 /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
63 at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
64
65 /* set serial console to ttyS0 (ie, DBGU) */
66 at91_set_serial_console(0);
67} 58}
68 59
69/* 60/*
@@ -341,6 +332,11 @@ static struct ac97c_platform_data neocore926_ac97_data = {
341static void __init neocore926_board_init(void) 332static void __init neocore926_board_init(void)
342{ 333{
343 /* Serial */ 334 /* Serial */
335 /* DBGU on ttyS0. (Rx & Tx only) */
336 at91_register_uart(0, 0, 0);
337
338 /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
339 at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
344 at91_add_device_serial(); 340 at91_add_device_serial();
345 341
346 /* USB Host */ 342 /* USB Host */
diff --git a/arch/arm/mach-at91/board-pcontrol-g20.c b/arch/arm/mach-at91/board-pcontrol-g20.c
index b4a12fc184c8..7fe638342421 100644
--- a/arch/arm/mach-at91/board-pcontrol-g20.c
+++ b/arch/arm/mach-at91/board-pcontrol-g20.c
@@ -40,17 +40,6 @@
40static void __init pcontrol_g20_init_early(void) 40static void __init pcontrol_g20_init_early(void)
41{ 41{
42 stamp9g20_init_early(); 42 stamp9g20_init_early();
43
44 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback A2 */
45 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS
46 | ATMEL_UART_RTS);
47
48 /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) isolated RS485 X5 */
49 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS
50 | ATMEL_UART_RTS);
51
52 /* USART2 on ttyS3. (Rx, Tx) 9bit-Bus Multidrop-mode X4 */
53 at91_register_uart(AT91SAM9260_ID_US4, 3, 0);
54} 43}
55 44
56static struct sam9_smc_config __initdata pcontrol_smc_config[2] = { { 45static struct sam9_smc_config __initdata pcontrol_smc_config[2] = { {
@@ -199,6 +188,16 @@ static struct spi_board_info pcontrol_g20_spi_devices[] = {
199 188
200static void __init pcontrol_g20_board_init(void) 189static void __init pcontrol_g20_board_init(void)
201{ 190{
191 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback A2 */
192 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS
193 | ATMEL_UART_RTS);
194
195 /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) isolated RS485 X5 */
196 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS
197 | ATMEL_UART_RTS);
198
199 /* USART2 on ttyS3. (Rx, Tx) 9bit-Bus Multidrop-mode X4 */
200 at91_register_uart(AT91SAM9260_ID_US4, 3, 0);
202 stamp9g20_board_init(); 201 stamp9g20_board_init();
203 at91_add_device_usbh(&usbh_data); 202 at91_add_device_usbh(&usbh_data);
204 at91_add_device_eth(&macb_data); 203 at91_add_device_eth(&macb_data);
diff --git a/arch/arm/mach-at91/board-picotux200.c b/arch/arm/mach-at91/board-picotux200.c
index 59e35dd14863..b45c0a5d5ca7 100644
--- a/arch/arm/mach-at91/board-picotux200.c
+++ b/arch/arm/mach-at91/board-picotux200.c
@@ -48,17 +48,6 @@ static void __init picotux200_init_early(void)
48{ 48{
49 /* Initialize processor: 18.432 MHz crystal */ 49 /* Initialize processor: 18.432 MHz crystal */
50 at91_initialize(18432000); 50 at91_initialize(18432000);
51
52 /* DBGU on ttyS0. (Rx & Tx only) */
53 at91_register_uart(0, 0, 0);
54
55 /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
56 at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
57 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
58 | ATMEL_UART_RI);
59
60 /* set serial console to ttyS0 (ie, DBGU) */
61 at91_set_serial_console(0);
62} 51}
63 52
64static struct macb_platform_data __initdata picotux200_eth_data = { 53static struct macb_platform_data __initdata picotux200_eth_data = {
@@ -106,6 +95,13 @@ static struct platform_device picotux200_flash = {
106static void __init picotux200_board_init(void) 95static void __init picotux200_board_init(void)
107{ 96{
108 /* Serial */ 97 /* Serial */
98 /* DBGU on ttyS0. (Rx & Tx only) */
99 at91_register_uart(0, 0, 0);
100
101 /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
102 at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
103 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
104 | ATMEL_UART_RI);
109 at91_add_device_serial(); 105 at91_add_device_serial();
110 /* Ethernet */ 106 /* Ethernet */
111 at91_add_device_eth(&picotux200_eth_data); 107 at91_add_device_eth(&picotux200_eth_data);
diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c
index b6ed5ed7081a..0c61bf0d272c 100644
--- a/arch/arm/mach-at91/board-qil-a9260.c
+++ b/arch/arm/mach-at91/board-qil-a9260.c
@@ -52,24 +52,6 @@ static void __init ek_init_early(void)
52{ 52{
53 /* Initialize processor: 12.000 MHz crystal */ 53 /* Initialize processor: 12.000 MHz crystal */
54 at91_initialize(12000000); 54 at91_initialize(12000000);
55
56 /* DBGU on ttyS0. (Rx & Tx only) */
57 at91_register_uart(0, 0, 0);
58
59 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
60 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
61 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
62 | ATMEL_UART_RI);
63
64 /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
65 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
66
67 /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */
68 at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
69
70 /* set serial console to ttyS1 (ie, USART0) */
71 at91_set_serial_console(1);
72
73} 55}
74 56
75/* 57/*
@@ -235,6 +217,19 @@ static struct gpio_led ek_leds[] = {
235static void __init ek_board_init(void) 217static void __init ek_board_init(void)
236{ 218{
237 /* Serial */ 219 /* Serial */
220 /* DBGU on ttyS0. (Rx & Tx only) */
221 at91_register_uart(0, 0, 0);
222
223 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
224 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
225 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
226 | ATMEL_UART_RI);
227
228 /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
229 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
230
231 /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */
232 at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
238 at91_add_device_serial(); 233 at91_add_device_serial();
239 /* USB Host */ 234 /* USB Host */
240 at91_add_device_usbh(&ek_usbh_data); 235 at91_add_device_usbh(&ek_usbh_data);
diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c
index 01332aa538b2..afd7a4713766 100644
--- a/arch/arm/mach-at91/board-rm9200dk.c
+++ b/arch/arm/mach-at91/board-rm9200dk.c
@@ -50,20 +50,6 @@ static void __init dk_init_early(void)
50{ 50{
51 /* Initialize processor: 18.432 MHz crystal */ 51 /* Initialize processor: 18.432 MHz crystal */
52 at91_initialize(18432000); 52 at91_initialize(18432000);
53
54 /* Setup the LEDs */
55 at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
56
57 /* DBGU on ttyS0. (Rx & Tx only) */
58 at91_register_uart(0, 0, 0);
59
60 /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
61 at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
62 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
63 | ATMEL_UART_RI);
64
65 /* set serial console to ttyS0 (ie, DBGU) */
66 at91_set_serial_console(0);
67} 53}
68 54
69static struct macb_platform_data __initdata dk_eth_data = { 55static struct macb_platform_data __initdata dk_eth_data = {
@@ -190,7 +176,17 @@ static struct gpio_led dk_leds[] = {
190 176
191static void __init dk_board_init(void) 177static void __init dk_board_init(void)
192{ 178{
179 /* Setup the LEDs */
180 at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
181
193 /* Serial */ 182 /* Serial */
183 /* DBGU on ttyS0. (Rx & Tx only) */
184 at91_register_uart(0, 0, 0);
185
186 /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
187 at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
188 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
189 | ATMEL_UART_RI);
194 at91_add_device_serial(); 190 at91_add_device_serial();
195 /* Ethernet */ 191 /* Ethernet */
196 at91_add_device_eth(&dk_eth_data); 192 at91_add_device_eth(&dk_eth_data);
diff --git a/arch/arm/mach-at91/board-rm9200ek.c b/arch/arm/mach-at91/board-rm9200ek.c
index b2e4fe21f346..2b15b8adec4c 100644
--- a/arch/arm/mach-at91/board-rm9200ek.c
+++ b/arch/arm/mach-at91/board-rm9200ek.c
@@ -50,20 +50,6 @@ static void __init ek_init_early(void)
50{ 50{
51 /* Initialize processor: 18.432 MHz crystal */ 51 /* Initialize processor: 18.432 MHz crystal */
52 at91_initialize(18432000); 52 at91_initialize(18432000);
53
54 /* Setup the LEDs */
55 at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2);
56
57 /* DBGU on ttyS0. (Rx & Tx only) */
58 at91_register_uart(0, 0, 0);
59
60 /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
61 at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
62 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
63 | ATMEL_UART_RI);
64
65 /* set serial console to ttyS0 (ie, DBGU) */
66 at91_set_serial_console(0);
67} 53}
68 54
69static struct macb_platform_data __initdata ek_eth_data = { 55static struct macb_platform_data __initdata ek_eth_data = {
@@ -161,7 +147,17 @@ static struct gpio_led ek_leds[] = {
161 147
162static void __init ek_board_init(void) 148static void __init ek_board_init(void)
163{ 149{
150 /* Setup the LEDs */
151 at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2);
152
164 /* Serial */ 153 /* Serial */
154 /* DBGU on ttyS0. (Rx & Tx only) */
155 at91_register_uart(0, 0, 0);
156
157 /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
158 at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
159 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
160 | ATMEL_UART_RI);
165 at91_add_device_serial(); 161 at91_add_device_serial();
166 /* Ethernet */ 162 /* Ethernet */
167 at91_add_device_eth(&ek_eth_data); 163 at91_add_device_eth(&ek_eth_data);
diff --git a/arch/arm/mach-at91/board-rsi-ews.c b/arch/arm/mach-at91/board-rsi-ews.c
index af0750fafa29..24ab9be7510f 100644
--- a/arch/arm/mach-at91/board-rsi-ews.c
+++ b/arch/arm/mach-at91/board-rsi-ews.c
@@ -35,26 +35,6 @@ static void __init rsi_ews_init_early(void)
35{ 35{
36 /* Initialize processor: 18.432 MHz crystal */ 36 /* Initialize processor: 18.432 MHz crystal */
37 at91_initialize(18432000); 37 at91_initialize(18432000);
38
39 /* Setup the LEDs */
40 at91_init_leds(AT91_PIN_PB6, AT91_PIN_PB9);
41
42 /* DBGU on ttyS0. (Rx & Tx only) */
43 /* This one is for debugging */
44 at91_register_uart(0, 0, 0);
45
46 /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
47 /* Dialin/-out modem interface */
48 at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS
49 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
50 | ATMEL_UART_RI);
51
52 /* USART3 on ttyS4. (Rx, Tx, RTS) */
53 /* RS485 communication */
54 at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_RTS);
55
56 /* set serial console to ttyS0 (ie, DBGU) */
57 at91_set_serial_console(0);
58} 38}
59 39
60/* 40/*
@@ -204,7 +184,23 @@ static struct platform_device rsiews_nor_flash = {
204 */ 184 */
205static void __init rsi_ews_board_init(void) 185static void __init rsi_ews_board_init(void)
206{ 186{
187 /* Setup the LEDs */
188 at91_init_leds(AT91_PIN_PB6, AT91_PIN_PB9);
189
207 /* Serial */ 190 /* Serial */
191 /* DBGU on ttyS0. (Rx & Tx only) */
192 /* This one is for debugging */
193 at91_register_uart(0, 0, 0);
194
195 /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
196 /* Dialin/-out modem interface */
197 at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS
198 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
199 | ATMEL_UART_RI);
200
201 /* USART3 on ttyS4. (Rx, Tx, RTS) */
202 /* RS485 communication */
203 at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_RTS);
208 at91_add_device_serial(); 204 at91_add_device_serial();
209 at91_set_gpio_output(AT91_PIN_PA21, 0); 205 at91_set_gpio_output(AT91_PIN_PA21, 0);
210 /* Ethernet */ 206 /* Ethernet */
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c
index e8b116b6cba6..cdd21f2595d2 100644
--- a/arch/arm/mach-at91/board-sam9-l9260.c
+++ b/arch/arm/mach-at91/board-sam9-l9260.c
@@ -48,23 +48,6 @@ static void __init ek_init_early(void)
48{ 48{
49 /* Initialize processor: 18.432 MHz crystal */ 49 /* Initialize processor: 18.432 MHz crystal */
50 at91_initialize(18432000); 50 at91_initialize(18432000);
51
52 /* Setup the LEDs */
53 at91_init_leds(AT91_PIN_PA9, AT91_PIN_PA6);
54
55 /* DBGU on ttyS0. (Rx & Tx only) */
56 at91_register_uart(0, 0, 0);
57
58 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
59 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
60 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
61 | ATMEL_UART_RI);
62
63 /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
64 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
65
66 /* set serial console to ttyS0 (ie, DBGU) */
67 at91_set_serial_console(0);
68} 51}
69 52
70/* 53/*
@@ -184,7 +167,20 @@ static struct at91_mmc_data __initdata ek_mmc_data = {
184 167
185static void __init ek_board_init(void) 168static void __init ek_board_init(void)
186{ 169{
170 /* Setup the LEDs */
171 at91_init_leds(AT91_PIN_PA9, AT91_PIN_PA6);
172
187 /* Serial */ 173 /* Serial */
174 /* DBGU on ttyS0. (Rx & Tx only) */
175 at91_register_uart(0, 0, 0);
176
177 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
178 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
179 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
180 | ATMEL_UART_RI);
181
182 /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
183 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
188 at91_add_device_serial(); 184 at91_add_device_serial();
189 /* USB Host */ 185 /* USB Host */
190 at91_add_device_usbh(&ek_usbh_data); 186 at91_add_device_usbh(&ek_usbh_data);
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
index d5aec55b0eb4..7b3c3913551a 100644
--- a/arch/arm/mach-at91/board-sam9260ek.c
+++ b/arch/arm/mach-at91/board-sam9260ek.c
@@ -54,20 +54,6 @@ static void __init ek_init_early(void)
54{ 54{
55 /* Initialize processor: 18.432 MHz crystal */ 55 /* Initialize processor: 18.432 MHz crystal */
56 at91_initialize(18432000); 56 at91_initialize(18432000);
57
58 /* DBGU on ttyS0. (Rx & Tx only) */
59 at91_register_uart(0, 0, 0);
60
61 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
62 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
63 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
64 | ATMEL_UART_RI);
65
66 /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
67 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
68
69 /* set serial console to ttyS0 (ie, DBGU) */
70 at91_set_serial_console(0);
71} 57}
72 58
73/* 59/*
@@ -320,6 +306,16 @@ static void __init ek_add_device_buttons(void) {}
320static void __init ek_board_init(void) 306static void __init ek_board_init(void)
321{ 307{
322 /* Serial */ 308 /* Serial */
309 /* DBGU on ttyS0. (Rx & Tx only) */
310 at91_register_uart(0, 0, 0);
311
312 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
313 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
314 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
315 | ATMEL_UART_RI);
316
317 /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
318 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
323 at91_add_device_serial(); 319 at91_add_device_serial();
324 /* USB Host */ 320 /* USB Host */
325 at91_add_device_usbh(&ek_usbh_data); 321 at91_add_device_usbh(&ek_usbh_data);
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index 065fed342424..2736453821b0 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -58,15 +58,6 @@ static void __init ek_init_early(void)
58{ 58{
59 /* Initialize processor: 18.432 MHz crystal */ 59 /* Initialize processor: 18.432 MHz crystal */
60 at91_initialize(18432000); 60 at91_initialize(18432000);
61
62 /* Setup the LEDs */
63 at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14);
64
65 /* DBGU on ttyS0. (Rx & Tx only) */
66 at91_register_uart(0, 0, 0);
67
68 /* set serial console to ttyS0 (ie, DBGU) */
69 at91_set_serial_console(0);
70} 61}
71 62
72/* 63/*
@@ -577,7 +568,12 @@ static struct gpio_led ek_leds[] = {
577 568
578static void __init ek_board_init(void) 569static void __init ek_board_init(void)
579{ 570{
571 /* Setup the LEDs */
572 at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14);
573
580 /* Serial */ 574 /* Serial */
575 /* DBGU on ttyS0. (Rx & Tx only) */
576 at91_register_uart(0, 0, 0);
581 at91_add_device_serial(); 577 at91_add_device_serial();
582 /* USB Host */ 578 /* USB Host */
583 at91_add_device_usbh(&ek_usbh_data); 579 at91_add_device_usbh(&ek_usbh_data);
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 2ffe50f3a9e9..983cb98d2465 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -57,15 +57,6 @@ static void __init ek_init_early(void)
57{ 57{
58 /* Initialize processor: 16.367 MHz crystal */ 58 /* Initialize processor: 16.367 MHz crystal */
59 at91_initialize(16367660); 59 at91_initialize(16367660);
60
61 /* DBGU on ttyS0. (Rx & Tx only) */
62 at91_register_uart(0, 0, 0);
63
64 /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
65 at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
66
67 /* set serial console to ttyS0 (ie, DBGU) */
68 at91_set_serial_console(0);
69} 60}
70 61
71/* 62/*
@@ -412,6 +403,11 @@ static struct at91_can_data ek_can_data = {
412static void __init ek_board_init(void) 403static void __init ek_board_init(void)
413{ 404{
414 /* Serial */ 405 /* Serial */
406 /* DBGU on ttyS0. (Rx & Tx only) */
407 at91_register_uart(0, 0, 0);
408
409 /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
410 at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
415 at91_add_device_serial(); 411 at91_add_device_serial();
416 /* USB Host */ 412 /* USB Host */
417 at91_add_device_usbh(&ek_usbh_data); 413 at91_add_device_usbh(&ek_usbh_data);
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c
index 8923ec9f5831..3d615532ae5c 100644
--- a/arch/arm/mach-at91/board-sam9g20ek.c
+++ b/arch/arm/mach-at91/board-sam9g20ek.c
@@ -65,20 +65,6 @@ static void __init ek_init_early(void)
65{ 65{
66 /* Initialize processor: 18.432 MHz crystal */ 66 /* Initialize processor: 18.432 MHz crystal */
67 at91_initialize(18432000); 67 at91_initialize(18432000);
68
69 /* DBGU on ttyS0. (Rx & Tx only) */
70 at91_register_uart(0, 0, 0);
71
72 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
73 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
74 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
75 | ATMEL_UART_RI);
76
77 /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
78 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
79
80 /* set serial console to ttyS0 (ie, DBGU) */
81 at91_set_serial_console(0);
82} 68}
83 69
84/* 70/*
@@ -372,6 +358,16 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = {
372static void __init ek_board_init(void) 358static void __init ek_board_init(void)
373{ 359{
374 /* Serial */ 360 /* Serial */
361 /* DBGU on ttyS0. (Rx & Tx only) */
362 at91_register_uart(0, 0, 0);
363
364 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
365 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
366 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
367 | ATMEL_UART_RI);
368
369 /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
370 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
375 at91_add_device_serial(); 371 at91_add_device_serial();
376 /* USB Host */ 372 /* USB Host */
377 at91_add_device_usbh(&ek_usbh_data); 373 at91_add_device_usbh(&ek_usbh_data);
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
index c88e908ddd82..9a87f0b072f8 100644
--- a/arch/arm/mach-at91/board-sam9m10g45ek.c
+++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
@@ -53,16 +53,6 @@ static void __init ek_init_early(void)
53{ 53{
54 /* Initialize processor: 12.000 MHz crystal */ 54 /* Initialize processor: 12.000 MHz crystal */
55 at91_initialize(12000000); 55 at91_initialize(12000000);
56
57 /* DGBU on ttyS0. (Rx & Tx only) */
58 at91_register_uart(0, 0, 0);
59
60 /* USART0 not connected on the -EK board */
61 /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
62 at91_register_uart(AT91SAM9G45_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
63
64 /* set serial console to ttyS0 (ie, DBGU) */
65 at91_set_serial_console(0);
66} 56}
67 57
68/* 58/*
@@ -457,6 +447,12 @@ static struct platform_device *devices[] __initdata = {
457static void __init ek_board_init(void) 447static void __init ek_board_init(void)
458{ 448{
459 /* Serial */ 449 /* Serial */
450 /* DGBU on ttyS0. (Rx & Tx only) */
451 at91_register_uart(0, 0, 0);
452
453 /* USART0 not connected on the -EK board */
454 /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
455 at91_register_uart(AT91SAM9G45_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
460 at91_add_device_serial(); 456 at91_add_device_serial();
461 /* USB HS Host */ 457 /* USB HS Host */
462 at91_add_device_usbh_ohci(&ek_usbh_hs_data); 458 at91_add_device_usbh_ohci(&ek_usbh_hs_data);
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
index b109ce2ba864..be3239f13daa 100644
--- a/arch/arm/mach-at91/board-sam9rlek.c
+++ b/arch/arm/mach-at91/board-sam9rlek.c
@@ -42,15 +42,6 @@ static void __init ek_init_early(void)
42{ 42{
43 /* Initialize processor: 12.000 MHz crystal */ 43 /* Initialize processor: 12.000 MHz crystal */
44 at91_initialize(12000000); 44 at91_initialize(12000000);
45
46 /* DBGU on ttyS0. (Rx & Tx only) */
47 at91_register_uart(0, 0, 0);
48
49 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
50 at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
51
52 /* set serial console to ttyS0 (ie, DBGU) */
53 at91_set_serial_console(0);
54} 45}
55 46
56/* 47/*
@@ -296,6 +287,11 @@ static void __init ek_add_device_buttons(void) {}
296static void __init ek_board_init(void) 287static void __init ek_board_init(void)
297{ 288{
298 /* Serial */ 289 /* Serial */
290 /* DBGU on ttyS0. (Rx & Tx only) */
291 at91_register_uart(0, 0, 0);
292
293 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
294 at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
299 at91_add_device_serial(); 295 at91_add_device_serial();
300 /* USB HS */ 296 /* USB HS */
301 at91_add_device_usba(&ek_usba_udc_data); 297 at91_add_device_usba(&ek_usba_udc_data);
diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c
index ebc9d01ce742..9d446f1bb45f 100644
--- a/arch/arm/mach-at91/board-snapper9260.c
+++ b/arch/arm/mach-at91/board-snapper9260.c
@@ -43,16 +43,6 @@
43static void __init snapper9260_init_early(void) 43static void __init snapper9260_init_early(void)
44{ 44{
45 at91_initialize(18432000); 45 at91_initialize(18432000);
46
47 /* Debug on ttyS0 */
48 at91_register_uart(0, 0, 0);
49 at91_set_serial_console(0);
50
51 at91_register_uart(AT91SAM9260_ID_US0, 1,
52 ATMEL_UART_CTS | ATMEL_UART_RTS);
53 at91_register_uart(AT91SAM9260_ID_US1, 2,
54 ATMEL_UART_CTS | ATMEL_UART_RTS);
55 at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
56} 46}
57 47
58static struct at91_usbh_data __initdata snapper9260_usbh_data = { 48static struct at91_usbh_data __initdata snapper9260_usbh_data = {
@@ -168,6 +158,14 @@ static void __init snapper9260_board_init(void)
168 snapper9260_i2c_isl1208.irq = gpio_to_irq(AT91_PIN_PA31); 158 snapper9260_i2c_isl1208.irq = gpio_to_irq(AT91_PIN_PA31);
169 i2c_register_board_info(0, &snapper9260_i2c_isl1208, 1); 159 i2c_register_board_info(0, &snapper9260_i2c_isl1208, 1);
170 160
161 /* Debug on ttyS0 */
162 at91_register_uart(0, 0, 0);
163
164 at91_register_uart(AT91SAM9260_ID_US0, 1,
165 ATMEL_UART_CTS | ATMEL_UART_RTS);
166 at91_register_uart(AT91SAM9260_ID_US1, 2,
167 ATMEL_UART_CTS | ATMEL_UART_RTS);
168 at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
171 at91_add_device_serial(); 169 at91_add_device_serial();
172 at91_add_device_usbh(&snapper9260_usbh_data); 170 at91_add_device_usbh(&snapper9260_usbh_data);
173 at91_add_device_udc(&snapper9260_udc_data); 171 at91_add_device_udc(&snapper9260_udc_data);
diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c
index 7640049410a0..ee86f9d7ee72 100644
--- a/arch/arm/mach-at91/board-stamp9g20.c
+++ b/arch/arm/mach-at91/board-stamp9g20.c
@@ -36,44 +36,6 @@ void __init stamp9g20_init_early(void)
36{ 36{
37 /* Initialize processor: 18.432 MHz crystal */ 37 /* Initialize processor: 18.432 MHz crystal */
38 at91_initialize(18432000); 38 at91_initialize(18432000);
39
40 /* DGBU on ttyS0. (Rx & Tx only) */
41 at91_register_uart(0, 0, 0);
42
43 /* set serial console to ttyS0 (ie, DBGU) */
44 at91_set_serial_console(0);
45}
46
47static void __init stamp9g20evb_init_early(void)
48{
49 stamp9g20_init_early();
50
51 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
52 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
53 | ATMEL_UART_DTR | ATMEL_UART_DSR
54 | ATMEL_UART_DCD | ATMEL_UART_RI);
55}
56
57static void __init portuxg20_init_early(void)
58{
59 stamp9g20_init_early();
60
61 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
62 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
63 | ATMEL_UART_DTR | ATMEL_UART_DSR
64 | ATMEL_UART_DCD | ATMEL_UART_RI);
65
66 /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
67 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
68
69 /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */
70 at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
71
72 /* USART4 on ttyS5. (Rx, Tx only) */
73 at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
74
75 /* USART5 on ttyS6. (Rx, Tx only) */
76 at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
77} 39}
78 40
79/* 41/*
@@ -254,6 +216,8 @@ void add_w1(void)
254void __init stamp9g20_board_init(void) 216void __init stamp9g20_board_init(void)
255{ 217{
256 /* Serial */ 218 /* Serial */
219 /* DGBU on ttyS0. (Rx & Tx only) */
220 at91_register_uart(0, 0, 0);
257 at91_add_device_serial(); 221 at91_add_device_serial();
258 /* NAND */ 222 /* NAND */
259 add_device_nand(); 223 add_device_nand();
@@ -269,6 +233,22 @@ void __init stamp9g20_board_init(void)
269 233
270static void __init portuxg20_board_init(void) 234static void __init portuxg20_board_init(void)
271{ 235{
236 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
237 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
238 | ATMEL_UART_DTR | ATMEL_UART_DSR
239 | ATMEL_UART_DCD | ATMEL_UART_RI);
240
241 /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
242 at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
243
244 /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */
245 at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
246
247 /* USART4 on ttyS5. (Rx, Tx only) */
248 at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
249
250 /* USART5 on ttyS6. (Rx, Tx only) */
251 at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
272 stamp9g20_board_init(); 252 stamp9g20_board_init();
273 /* USB Host */ 253 /* USB Host */
274 at91_add_device_usbh(&usbh_data); 254 at91_add_device_usbh(&usbh_data);
@@ -286,6 +266,10 @@ static void __init portuxg20_board_init(void)
286 266
287static void __init stamp9g20evb_board_init(void) 267static void __init stamp9g20evb_board_init(void)
288{ 268{
269 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
270 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
271 | ATMEL_UART_DTR | ATMEL_UART_DSR
272 | ATMEL_UART_DCD | ATMEL_UART_RI);
289 stamp9g20_board_init(); 273 stamp9g20_board_init();
290 /* USB Host */ 274 /* USB Host */
291 at91_add_device_usbh(&usbh_data); 275 at91_add_device_usbh(&usbh_data);
@@ -303,7 +287,7 @@ MACHINE_START(PORTUXG20, "taskit PortuxG20")
303 /* Maintainer: taskit GmbH */ 287 /* Maintainer: taskit GmbH */
304 .timer = &at91sam926x_timer, 288 .timer = &at91sam926x_timer,
305 .map_io = at91_map_io, 289 .map_io = at91_map_io,
306 .init_early = portuxg20_init_early, 290 .init_early = stamp9g20_init_early,
307 .init_irq = at91_init_irq_default, 291 .init_irq = at91_init_irq_default,
308 .init_machine = portuxg20_board_init, 292 .init_machine = portuxg20_board_init,
309MACHINE_END 293MACHINE_END
@@ -312,7 +296,7 @@ MACHINE_START(STAMP9G20, "taskit Stamp9G20")
312 /* Maintainer: taskit GmbH */ 296 /* Maintainer: taskit GmbH */
313 .timer = &at91sam926x_timer, 297 .timer = &at91sam926x_timer,
314 .map_io = at91_map_io, 298 .map_io = at91_map_io,
315 .init_early = stamp9g20evb_init_early, 299 .init_early = stamp9g20_init_early,
316 .init_irq = at91_init_irq_default, 300 .init_irq = at91_init_irq_default,
317 .init_machine = stamp9g20evb_board_init, 301 .init_machine = stamp9g20evb_board_init,
318MACHINE_END 302MACHINE_END
diff --git a/arch/arm/mach-at91/board-usb-a926x.c b/arch/arm/mach-at91/board-usb-a926x.c
index b7483a3d0980..332ecd40bd02 100644
--- a/arch/arm/mach-at91/board-usb-a926x.c
+++ b/arch/arm/mach-at91/board-usb-a926x.c
@@ -53,12 +53,6 @@ static void __init ek_init_early(void)
53{ 53{
54 /* Initialize processor: 12.00 MHz crystal */ 54 /* Initialize processor: 12.00 MHz crystal */
55 at91_initialize(12000000); 55 at91_initialize(12000000);
56
57 /* DBGU on ttyS0. (Rx & Tx only) */
58 at91_register_uart(0, 0, 0);
59
60 /* set serial console to ttyS0 (ie, DBGU) */
61 at91_set_serial_console(0);
62} 56}
63 57
64/* 58/*
@@ -325,6 +319,8 @@ static void __init ek_add_device_leds(void)
325static void __init ek_board_init(void) 319static void __init ek_board_init(void)
326{ 320{
327 /* Serial */ 321 /* Serial */
322 /* DBGU on ttyS0. (Rx & Tx only) */
323 at91_register_uart(0, 0, 0);
328 at91_add_device_serial(); 324 at91_add_device_serial();
329 /* USB Host */ 325 /* USB Host */
330 at91_add_device_usbh(&ek_usbh_data); 326 at91_add_device_usbh(&ek_usbh_data);
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c
index 38dd279d30b2..d56665ea4b55 100644
--- a/arch/arm/mach-at91/board-yl-9200.c
+++ b/arch/arm/mach-at91/board-yl-9200.c
@@ -58,26 +58,6 @@ static void __init yl9200_init_early(void)
58 58
59 /* Initialize processor: 18.432 MHz crystal */ 59 /* Initialize processor: 18.432 MHz crystal */
60 at91_initialize(18432000); 60 at91_initialize(18432000);
61
62 /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */
63 at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17);
64
65 /* DBGU on ttyS0. (Rx & Tx only) */
66 at91_register_uart(0, 0, 0);
67
68 /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
69 at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
70 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
71 | ATMEL_UART_RI);
72
73 /* USART0 on ttyS2. (Rx & Tx only to JP3) */
74 at91_register_uart(AT91RM9200_ID_US0, 2, 0);
75
76 /* USART3 on ttyS3. (Rx, Tx, RTS - RS485 interface) */
77 at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_RTS);
78
79 /* set serial console to ttyS0 (ie, DBGU) */
80 at91_set_serial_console(0);
81} 61}
82 62
83/* 63/*
@@ -560,7 +540,23 @@ void __init yl9200_add_device_video(void) {}
560 540
561static void __init yl9200_board_init(void) 541static void __init yl9200_board_init(void)
562{ 542{
543 /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */
544 at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17);
545
563 /* Serial */ 546 /* Serial */
547 /* DBGU on ttyS0. (Rx & Tx only) */
548 at91_register_uart(0, 0, 0);
549
550 /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
551 at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
552 | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
553 | ATMEL_UART_RI);
554
555 /* USART0 on ttyS2. (Rx & Tx only to JP3) */
556 at91_register_uart(AT91RM9200_ID_US0, 2, 0);
557
558 /* USART3 on ttyS3. (Rx, Tx, RTS - RS485 interface) */
559 at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_RTS);
564 at91_add_device_serial(); 560 at91_add_device_serial();
565 /* Ethernet */ 561 /* Ethernet */
566 at91_add_device_eth(&yl9200_eth_data); 562 at91_add_device_eth(&yl9200_eth_data);
diff --git a/arch/arm/mach-at91/cpuidle.c b/arch/arm/mach-at91/cpuidle.c
index ece1f9aefb47..0c6381516a5a 100644
--- a/arch/arm/mach-at91/cpuidle.c
+++ b/arch/arm/mach-at91/cpuidle.c
@@ -21,6 +21,7 @@
21#include <linux/export.h> 21#include <linux/export.h>
22#include <asm/proc-fns.h> 22#include <asm/proc-fns.h>
23#include <asm/cpuidle.h> 23#include <asm/cpuidle.h>
24#include <mach/cpu.h>
24 25
25#include "pm.h" 26#include "pm.h"
26 27
@@ -33,7 +34,12 @@ static int at91_enter_idle(struct cpuidle_device *dev,
33 struct cpuidle_driver *drv, 34 struct cpuidle_driver *drv,
34 int index) 35 int index)
35{ 36{
36 at91_standby(); 37 if (cpu_is_at91rm9200())
38 at91rm9200_standby();
39 else if (cpu_is_at91sam9g45())
40 at91sam9g45_standby();
41 else
42 at91sam9_standby();
37 43
38 return index; 44 return index;
39} 45}
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h
index dd9b346c451d..0a60bf837037 100644
--- a/arch/arm/mach-at91/generic.h
+++ b/arch/arm/mach-at91/generic.h
@@ -40,17 +40,6 @@ extern struct sys_timer at91sam926x_timer;
40extern struct sys_timer at91x40_timer; 40extern struct sys_timer at91x40_timer;
41 41
42 /* Clocks */ 42 /* Clocks */
43/*
44 * function to specify the clock of the default console. As we do not
45 * use the device/driver bus, the dev_name is not intialize. So we need
46 * to link the clock to a specific con_id only "usart"
47 */
48extern void __init at91rm9200_set_console_clock(int id);
49extern void __init at91sam9260_set_console_clock(int id);
50extern void __init at91sam9261_set_console_clock(int id);
51extern void __init at91sam9263_set_console_clock(int id);
52extern void __init at91sam9rl_set_console_clock(int id);
53extern void __init at91sam9g45_set_console_clock(int id);
54#ifdef CONFIG_AT91_PMC_UNIT 43#ifdef CONFIG_AT91_PMC_UNIT
55extern int __init at91_clock_init(unsigned long main_clock); 44extern int __init at91_clock_init(unsigned long main_clock);
56extern int __init at91_dt_clock_init(void); 45extern int __init at91_dt_clock_init(void);
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200.h b/arch/arm/mach-at91/include/mach/at91rm9200.h
index 603e6aac2a4f..e67317c67761 100644
--- a/arch/arm/mach-at91/include/mach/at91rm9200.h
+++ b/arch/arm/mach-at91/include/mach/at91rm9200.h
@@ -88,11 +88,6 @@
88#define AT91RM9200_BASE_RTC 0xfffffe00 /* Real-Time Clock */ 88#define AT91RM9200_BASE_RTC 0xfffffe00 /* Real-Time Clock */
89#define AT91RM9200_BASE_MC 0xffffff00 /* Memory Controllers */ 89#define AT91RM9200_BASE_MC 0xffffff00 /* Memory Controllers */
90 90
91#define AT91_USART0 AT91RM9200_BASE_US0
92#define AT91_USART1 AT91RM9200_BASE_US1
93#define AT91_USART2 AT91RM9200_BASE_US2
94#define AT91_USART3 AT91RM9200_BASE_US3
95
96/* 91/*
97 * Internal Memory. 92 * Internal Memory.
98 */ 93 */
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/arch/arm/mach-at91/include/mach/at91sam9260.h
index 08ae9afd00fe..416c7b6c56d3 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9260.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9260.h
@@ -95,13 +95,6 @@
95#define AT91SAM9260_BASE_WDT 0xfffffd40 95#define AT91SAM9260_BASE_WDT 0xfffffd40
96#define AT91SAM9260_BASE_GPBR 0xfffffd50 96#define AT91SAM9260_BASE_GPBR 0xfffffd50
97 97
98#define AT91_USART0 AT91SAM9260_BASE_US0
99#define AT91_USART1 AT91SAM9260_BASE_US1
100#define AT91_USART2 AT91SAM9260_BASE_US2
101#define AT91_USART3 AT91SAM9260_BASE_US3
102#define AT91_USART4 AT91SAM9260_BASE_US4
103#define AT91_USART5 AT91SAM9260_BASE_US5
104
105 98
106/* 99/*
107 * Internal Memory. 100 * Internal Memory.
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261.h b/arch/arm/mach-at91/include/mach/at91sam9261.h
index 44fbdc12ee62..a041406d06ee 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9261.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9261.h
@@ -79,10 +79,6 @@
79#define AT91SAM9261_BASE_WDT 0xfffffd40 79#define AT91SAM9261_BASE_WDT 0xfffffd40
80#define AT91SAM9261_BASE_GPBR 0xfffffd50 80#define AT91SAM9261_BASE_GPBR 0xfffffd50
81 81
82#define AT91_USART0 AT91SAM9261_BASE_US0
83#define AT91_USART1 AT91SAM9261_BASE_US1
84#define AT91_USART2 AT91SAM9261_BASE_US2
85
86 82
87/* 83/*
88 * Internal Memory. 84 * Internal Memory.
diff --git a/arch/arm/mach-at91/include/mach/at91sam9263.h b/arch/arm/mach-at91/include/mach/at91sam9263.h
index d96cbb2e03c4..d201029d60b3 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9263.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9263.h
@@ -95,10 +95,6 @@
95#define AT91SAM9263_BASE_RTT1 0xfffffd50 95#define AT91SAM9263_BASE_RTT1 0xfffffd50
96#define AT91SAM9263_BASE_GPBR 0xfffffd60 96#define AT91SAM9263_BASE_GPBR 0xfffffd60
97 97
98#define AT91_USART0 AT91SAM9263_BASE_US0
99#define AT91_USART1 AT91SAM9263_BASE_US1
100#define AT91_USART2 AT91SAM9263_BASE_US2
101
102#define AT91_SMC AT91_SMC0 98#define AT91_SMC AT91_SMC0
103 99
104/* 100/*
diff --git a/arch/arm/mach-at91/include/mach/at91sam9g45.h b/arch/arm/mach-at91/include/mach/at91sam9g45.h
index d052abcff852..3a4da24d5911 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9g45.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9g45.h
@@ -106,11 +106,6 @@
106#define AT91SAM9G45_BASE_RTC 0xfffffdb0 106#define AT91SAM9G45_BASE_RTC 0xfffffdb0
107#define AT91SAM9G45_BASE_GPBR 0xfffffd60 107#define AT91SAM9G45_BASE_GPBR 0xfffffd60
108 108
109#define AT91_USART0 AT91SAM9G45_BASE_US0
110#define AT91_USART1 AT91SAM9G45_BASE_US1
111#define AT91_USART2 AT91SAM9G45_BASE_US2
112#define AT91_USART3 AT91SAM9G45_BASE_US3
113
114/* 109/*
115 * Internal Memory. 110 * Internal Memory.
116 */ 111 */
diff --git a/arch/arm/mach-at91/include/mach/at91sam9rl.h b/arch/arm/mach-at91/include/mach/at91sam9rl.h
index e0073eb10144..a15db56d33fa 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9rl.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9rl.h
@@ -89,11 +89,6 @@
89#define AT91SAM9RL_BASE_GPBR 0xfffffd60 89#define AT91SAM9RL_BASE_GPBR 0xfffffd60
90#define AT91SAM9RL_BASE_RTC 0xfffffe00 90#define AT91SAM9RL_BASE_RTC 0xfffffe00
91 91
92#define AT91_USART0 AT91SAM9RL_BASE_US0
93#define AT91_USART1 AT91SAM9RL_BASE_US1
94#define AT91_USART2 AT91SAM9RL_BASE_US2
95#define AT91_USART3 AT91SAM9RL_BASE_US3
96
97 92
98/* 93/*
99 * Internal Memory. 94 * Internal Memory.
diff --git a/arch/arm/mach-at91/include/mach/at91sam9x5.h b/arch/arm/mach-at91/include/mach/at91sam9x5.h
index 88e43d534cdf..c75ee19b58d3 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9x5.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9x5.h
@@ -55,14 +55,6 @@
55#define AT91SAM9X5_BASE_USART2 0xf8024000 55#define AT91SAM9X5_BASE_USART2 0xf8024000
56 56
57/* 57/*
58 * Base addresses for early serial code (uncompress.h)
59 */
60#define AT91_DBGU AT91_BASE_DBGU0
61#define AT91_USART0 AT91SAM9X5_BASE_USART0
62#define AT91_USART1 AT91SAM9X5_BASE_USART1
63#define AT91_USART2 AT91SAM9X5_BASE_USART2
64
65/*
66 * Internal Memory. 58 * Internal Memory.
67 */ 59 */
68#define AT91SAM9X5_SRAM_BASE 0x00300000 /* Internal SRAM base address */ 60#define AT91SAM9X5_SRAM_BASE 0x00300000 /* Internal SRAM base address */
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index 49a821192c65..369afc2ffc5b 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -121,7 +121,6 @@ extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_de
121#define ATMEL_UART_RI 0x20 121#define ATMEL_UART_RI 0x20
122 122
123extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins); 123extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins);
124extern void __init at91_set_serial_console(unsigned portnr);
125 124
126extern struct platform_device *atmel_default_console_device; 125extern struct platform_device *atmel_default_console_device;
127 126
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h
index 0118c3338552..73d2fd209ce4 100644
--- a/arch/arm/mach-at91/include/mach/cpu.h
+++ b/arch/arm/mach-at91/include/mach/cpu.h
@@ -54,6 +54,7 @@
54#define ARCH_REVISON_9200_BGA (0 << 0) 54#define ARCH_REVISON_9200_BGA (0 << 0)
55#define ARCH_REVISON_9200_PQFP (1 << 0) 55#define ARCH_REVISON_9200_PQFP (1 << 0)
56 56
57#ifndef __ASSEMBLY__
57enum at91_soc_type { 58enum at91_soc_type {
58 /* 920T */ 59 /* 920T */
59 AT91_SOC_RM9200, 60 AT91_SOC_RM9200,
@@ -106,7 +107,7 @@ static inline int at91_soc_is_detected(void)
106 return at91_soc_initdata.type != AT91_SOC_NONE; 107 return at91_soc_initdata.type != AT91_SOC_NONE;
107} 108}
108 109
109#ifdef CONFIG_ARCH_AT91RM9200 110#ifdef CONFIG_SOC_AT91RM9200
110#define cpu_is_at91rm9200() (at91_soc_initdata.type == AT91_SOC_RM9200) 111#define cpu_is_at91rm9200() (at91_soc_initdata.type == AT91_SOC_RM9200)
111#define cpu_is_at91rm9200_bga() (at91_soc_initdata.subtype == AT91_SOC_RM9200_BGA) 112#define cpu_is_at91rm9200_bga() (at91_soc_initdata.subtype == AT91_SOC_RM9200_BGA)
112#define cpu_is_at91rm9200_pqfp() (at91_soc_initdata.subtype == AT91_SOC_RM9200_PQFP) 113#define cpu_is_at91rm9200_pqfp() (at91_soc_initdata.subtype == AT91_SOC_RM9200_PQFP)
@@ -116,45 +117,37 @@ static inline int at91_soc_is_detected(void)
116#define cpu_is_at91rm9200_pqfp() (0) 117#define cpu_is_at91rm9200_pqfp() (0)
117#endif 118#endif
118 119
119#ifdef CONFIG_ARCH_AT91SAM9260 120#ifdef CONFIG_SOC_AT91SAM9260
120#define cpu_is_at91sam9xe() (at91_soc_initdata.subtype == AT91_SOC_SAM9XE) 121#define cpu_is_at91sam9xe() (at91_soc_initdata.subtype == AT91_SOC_SAM9XE)
121#define cpu_is_at91sam9260() (at91_soc_initdata.type == AT91_SOC_SAM9260) 122#define cpu_is_at91sam9260() (at91_soc_initdata.type == AT91_SOC_SAM9260)
123#define cpu_is_at91sam9g20() (at91_soc_initdata.type == AT91_SOC_SAM9G20)
122#else 124#else
123#define cpu_is_at91sam9xe() (0) 125#define cpu_is_at91sam9xe() (0)
124#define cpu_is_at91sam9260() (0) 126#define cpu_is_at91sam9260() (0)
125#endif
126
127#ifdef CONFIG_ARCH_AT91SAM9G20
128#define cpu_is_at91sam9g20() (at91_soc_initdata.type == AT91_SOC_SAM9G20)
129#else
130#define cpu_is_at91sam9g20() (0) 127#define cpu_is_at91sam9g20() (0)
131#endif 128#endif
132 129
133#ifdef CONFIG_ARCH_AT91SAM9261 130#ifdef CONFIG_SOC_AT91SAM9261
134#define cpu_is_at91sam9261() (at91_soc_initdata.type == AT91_SOC_SAM9261) 131#define cpu_is_at91sam9261() (at91_soc_initdata.type == AT91_SOC_SAM9261)
135#else
136#define cpu_is_at91sam9261() (0)
137#endif
138
139#ifdef CONFIG_ARCH_AT91SAM9G10
140#define cpu_is_at91sam9g10() (at91_soc_initdata.type == AT91_SOC_SAM9G10) 132#define cpu_is_at91sam9g10() (at91_soc_initdata.type == AT91_SOC_SAM9G10)
141#else 133#else
134#define cpu_is_at91sam9261() (0)
142#define cpu_is_at91sam9g10() (0) 135#define cpu_is_at91sam9g10() (0)
143#endif 136#endif
144 137
145#ifdef CONFIG_ARCH_AT91SAM9263 138#ifdef CONFIG_SOC_AT91SAM9263
146#define cpu_is_at91sam9263() (at91_soc_initdata.type == AT91_SOC_SAM9263) 139#define cpu_is_at91sam9263() (at91_soc_initdata.type == AT91_SOC_SAM9263)
147#else 140#else
148#define cpu_is_at91sam9263() (0) 141#define cpu_is_at91sam9263() (0)
149#endif 142#endif
150 143
151#ifdef CONFIG_ARCH_AT91SAM9RL 144#ifdef CONFIG_SOC_AT91SAM9RL
152#define cpu_is_at91sam9rl() (at91_soc_initdata.type == AT91_SOC_SAM9RL) 145#define cpu_is_at91sam9rl() (at91_soc_initdata.type == AT91_SOC_SAM9RL)
153#else 146#else
154#define cpu_is_at91sam9rl() (0) 147#define cpu_is_at91sam9rl() (0)
155#endif 148#endif
156 149
157#ifdef CONFIG_ARCH_AT91SAM9G45 150#ifdef CONFIG_SOC_AT91SAM9G45
158#define cpu_is_at91sam9g45() (at91_soc_initdata.type == AT91_SOC_SAM9G45) 151#define cpu_is_at91sam9g45() (at91_soc_initdata.type == AT91_SOC_SAM9G45)
159#define cpu_is_at91sam9g45es() (at91_soc_initdata.subtype == AT91_SOC_SAM9G45ES) 152#define cpu_is_at91sam9g45es() (at91_soc_initdata.subtype == AT91_SOC_SAM9G45ES)
160#define cpu_is_at91sam9m10() (at91_soc_initdata.subtype == AT91_SOC_SAM9M10) 153#define cpu_is_at91sam9m10() (at91_soc_initdata.subtype == AT91_SOC_SAM9M10)
@@ -168,7 +161,7 @@ static inline int at91_soc_is_detected(void)
168#define cpu_is_at91sam9m11() (0) 161#define cpu_is_at91sam9m11() (0)
169#endif 162#endif
170 163
171#ifdef CONFIG_ARCH_AT91SAM9X5 164#ifdef CONFIG_SOC_AT91SAM9X5
172#define cpu_is_at91sam9x5() (at91_soc_initdata.type == AT91_SOC_SAM9X5) 165#define cpu_is_at91sam9x5() (at91_soc_initdata.type == AT91_SOC_SAM9X5)
173#define cpu_is_at91sam9g15() (at91_soc_initdata.subtype == AT91_SOC_SAM9G15) 166#define cpu_is_at91sam9g15() (at91_soc_initdata.subtype == AT91_SOC_SAM9G15)
174#define cpu_is_at91sam9g35() (at91_soc_initdata.subtype == AT91_SOC_SAM9G35) 167#define cpu_is_at91sam9g35() (at91_soc_initdata.subtype == AT91_SOC_SAM9G35)
@@ -189,5 +182,6 @@ static inline int at91_soc_is_detected(void)
189 * definitions may reduce clutter in common drivers. 182 * definitions may reduce clutter in common drivers.
190 */ 183 */
191#define cpu_is_at32ap7000() (0) 184#define cpu_is_at32ap7000() (0)
185#endif /* __ASSEMBLY__ */
192 186
193#endif /* __MACH_CPU_H__ */ 187#endif /* __MACH_CPU_H__ */
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h
index 01db372be8e5..ef5786299c60 100644
--- a/arch/arm/mach-at91/include/mach/hardware.h
+++ b/arch/arm/mach-at91/include/mach/hardware.h
@@ -22,27 +22,17 @@
22/* 9263, 9g45 */ 22/* 9263, 9g45 */
23#define AT91_BASE_DBGU1 0xffffee00 23#define AT91_BASE_DBGU1 0xffffee00
24 24
25#if defined(CONFIG_ARCH_AT91RM9200) 25#if defined(CONFIG_ARCH_AT91X40)
26#include <mach/at91x40.h>
27#else
26#include <mach/at91rm9200.h> 28#include <mach/at91rm9200.h>
27#elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20)
28#include <mach/at91sam9260.h> 29#include <mach/at91sam9260.h>
29#elif defined(CONFIG_ARCH_AT91SAM9261) || defined(CONFIG_ARCH_AT91SAM9G10)
30#include <mach/at91sam9261.h> 30#include <mach/at91sam9261.h>
31#elif defined(CONFIG_ARCH_AT91SAM9263)
32#include <mach/at91sam9263.h> 31#include <mach/at91sam9263.h>
33#elif defined(CONFIG_ARCH_AT91SAM9RL)
34#include <mach/at91sam9rl.h> 32#include <mach/at91sam9rl.h>
35#elif defined(CONFIG_ARCH_AT91SAM9G45)
36#include <mach/at91sam9g45.h> 33#include <mach/at91sam9g45.h>
37#elif defined(CONFIG_ARCH_AT91SAM9X5)
38#include <mach/at91sam9x5.h> 34#include <mach/at91sam9x5.h>
39#elif defined(CONFIG_ARCH_AT91X40)
40#include <mach/at91x40.h>
41#else
42#error "Unsupported AT91 processor"
43#endif
44 35
45#if !defined(CONFIG_ARCH_AT91X40)
46/* 36/*
47 * On all at91 except rm9200 and x40 have the System Controller starts 37 * On all at91 except rm9200 and x40 have the System Controller starts
48 * at address 0xffffc000 and has a size of 16KiB. 38 * at address 0xffffc000 and has a size of 16KiB.
diff --git a/arch/arm/mach-at91/include/mach/uncompress.h b/arch/arm/mach-at91/include/mach/uncompress.h
index 4218647c1fcd..6f6118d1576a 100644
--- a/arch/arm/mach-at91/include/mach/uncompress.h
+++ b/arch/arm/mach-at91/include/mach/uncompress.h
@@ -1,7 +1,8 @@
1/* 1/*
2 * arch/arm/mach-at91/include/mach/uncompress.h 2 * arch/arm/mach-at91/include/mach/uncompress.h
3 * 3 *
4 * Copyright (C) 2003 SAN People 4 * Copyright (C) 2003 SAN People
5 * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -25,22 +26,147 @@
25#include <linux/atmel_serial.h> 26#include <linux/atmel_serial.h>
26#include <mach/hardware.h> 27#include <mach/hardware.h>
27 28
28#if defined(CONFIG_AT91_EARLY_DBGU0) 29#include <mach/at91_dbgu.h>
29#define UART_OFFSET AT91_BASE_DBGU0 30#include <mach/cpu.h>
30#elif defined(CONFIG_AT91_EARLY_DBGU1) 31
31#define UART_OFFSET AT91_BASE_DBGU1 32void __iomem *at91_uart;
32#elif defined(CONFIG_AT91_EARLY_USART0) 33
33#define UART_OFFSET AT91_USART0 34#if !defined(CONFIG_ARCH_AT91X40)
34#elif defined(CONFIG_AT91_EARLY_USART1) 35static const u32 uarts_rm9200[] = {
35#define UART_OFFSET AT91_USART1 36 AT91_BASE_DBGU0,
36#elif defined(CONFIG_AT91_EARLY_USART2) 37 AT91RM9200_BASE_US0,
37#define UART_OFFSET AT91_USART2 38 AT91RM9200_BASE_US1,
38#elif defined(CONFIG_AT91_EARLY_USART3) 39 AT91RM9200_BASE_US2,
39#define UART_OFFSET AT91_USART3 40 AT91RM9200_BASE_US3,
40#elif defined(CONFIG_AT91_EARLY_USART4) 41 0,
41#define UART_OFFSET AT91_USART4 42};
42#elif defined(CONFIG_AT91_EARLY_USART5) 43
43#define UART_OFFSET AT91_USART5 44static const u32 uarts_sam9260[] = {
45 AT91_BASE_DBGU0,
46 AT91SAM9260_BASE_US0,
47 AT91SAM9260_BASE_US1,
48 AT91SAM9260_BASE_US2,
49 AT91SAM9260_BASE_US3,
50 AT91SAM9260_BASE_US4,
51 AT91SAM9260_BASE_US5,
52 0,
53};
54
55static const u32 uarts_sam9261[] = {
56 AT91_BASE_DBGU0,
57 AT91SAM9261_BASE_US0,
58 AT91SAM9261_BASE_US1,
59 AT91SAM9261_BASE_US2,
60 0,
61};
62
63static const u32 uarts_sam9263[] = {
64 AT91_BASE_DBGU1,
65 AT91SAM9263_BASE_US0,
66 AT91SAM9263_BASE_US1,
67 AT91SAM9263_BASE_US2,
68 0,
69};
70
71static const u32 uarts_sam9g45[] = {
72 AT91_BASE_DBGU1,
73 AT91SAM9G45_BASE_US0,
74 AT91SAM9G45_BASE_US1,
75 AT91SAM9G45_BASE_US2,
76 AT91SAM9G45_BASE_US3,
77 0,
78};
79
80static const u32 uarts_sam9rl[] = {
81 AT91_BASE_DBGU0,
82 AT91SAM9RL_BASE_US0,
83 AT91SAM9RL_BASE_US1,
84 AT91SAM9RL_BASE_US2,
85 AT91SAM9RL_BASE_US3,
86 0,
87};
88
89static const u32 uarts_sam9x5[] = {
90 AT91_BASE_DBGU0,
91 AT91SAM9X5_BASE_USART0,
92 AT91SAM9X5_BASE_USART1,
93 AT91SAM9X5_BASE_USART2,
94 0,
95};
96
97static inline const u32* decomp_soc_detect(u32 dbgu_base)
98{
99 u32 cidr, socid;
100
101 cidr = __raw_readl(dbgu_base + AT91_DBGU_CIDR);
102 socid = cidr & ~AT91_CIDR_VERSION;
103
104 switch (socid) {
105 case ARCH_ID_AT91RM9200:
106 return uarts_rm9200;
107
108 case ARCH_ID_AT91SAM9G20:
109 case ARCH_ID_AT91SAM9260:
110 return uarts_sam9260;
111
112 case ARCH_ID_AT91SAM9261:
113 return uarts_sam9261;
114
115 case ARCH_ID_AT91SAM9263:
116 return uarts_sam9263;
117
118 case ARCH_ID_AT91SAM9G45:
119 return uarts_sam9g45;
120
121 case ARCH_ID_AT91SAM9RL64:
122 return uarts_sam9rl;
123
124 case ARCH_ID_AT91SAM9X5:
125 return uarts_sam9x5;
126 }
127
128 /* at91sam9g10 */
129 if ((cidr & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) {
130 return uarts_sam9261;
131 }
132 /* at91sam9xe */
133 else if ((cidr & AT91_CIDR_ARCH) == ARCH_FAMILY_AT91SAM9XE) {
134 return uarts_sam9260;
135 }
136
137 return NULL;
138}
139
140static inline void arch_decomp_setup(void)
141{
142 int i = 0;
143 const u32* usarts;
144
145 usarts = decomp_soc_detect(AT91_BASE_DBGU0);
146
147 if (!usarts)
148 usarts = decomp_soc_detect(AT91_BASE_DBGU1);
149 if (!usarts) {
150 at91_uart = NULL;
151 return;
152 }
153
154 do {
155 /* physical address */
156 at91_uart = (void __iomem *)usarts[i];
157
158 if (__raw_readl(at91_uart + ATMEL_US_BRGR))
159 return;
160 i++;
161 } while (usarts[i]);
162
163 at91_uart = NULL;
164}
165#else
166static inline void arch_decomp_setup(void)
167{
168 at91_uart = NULL;
169}
44#endif 170#endif
45 171
46/* 172/*
@@ -52,28 +178,24 @@
52 */ 178 */
53static void putc(int c) 179static void putc(int c)
54{ 180{
55#ifdef UART_OFFSET 181 if (!at91_uart)
56 void __iomem *sys = (void __iomem *) UART_OFFSET; /* physical address */ 182 return;
57 183
58 while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXRDY)) 184 while (!(__raw_readl(at91_uart + ATMEL_US_CSR) & ATMEL_US_TXRDY))
59 barrier(); 185 barrier();
60 __raw_writel(c, sys + ATMEL_US_THR); 186 __raw_writel(c, at91_uart + ATMEL_US_THR);
61#endif
62} 187}
63 188
64static inline void flush(void) 189static inline void flush(void)
65{ 190{
66#ifdef UART_OFFSET 191 if (!at91_uart)
67 void __iomem *sys = (void __iomem *) UART_OFFSET; /* physical address */ 192 return;
68 193
69 /* wait for transmission to complete */ 194 /* wait for transmission to complete */
70 while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXEMPTY)) 195 while (!(__raw_readl(at91_uart + ATMEL_US_CSR) & ATMEL_US_TXEMPTY))
71 barrier(); 196 barrier();
72#endif
73} 197}
74 198
75#define arch_decomp_setup()
76
77#define arch_decomp_wdog() 199#define arch_decomp_wdog()
78 200
79#endif 201#endif
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index f630250c6b87..1bfaad628731 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -261,7 +261,12 @@ static int at91_pm_enter(suspend_state_t state)
261 * For ARM 926 based chips, this requirement is weaker 261 * For ARM 926 based chips, this requirement is weaker
262 * as at91sam9 can access a RAM in self-refresh mode. 262 * as at91sam9 can access a RAM in self-refresh mode.
263 */ 263 */
264 at91_standby(); 264 if (cpu_is_at91rm9200())
265 at91rm9200_standby();
266 else if (cpu_is_at91sam9g45())
267 at91sam9g45_standby();
268 else
269 at91sam9_standby();
265 break; 270 break;
266 271
267 case PM_SUSPEND_ON: 272 case PM_SUSPEND_ON:
@@ -307,10 +312,9 @@ static int __init at91_pm_init(void)
307 312
308 pr_info("AT91: Power Management%s\n", (slow_clock ? " (with slow clock mode)" : "")); 313 pr_info("AT91: Power Management%s\n", (slow_clock ? " (with slow clock mode)" : ""));
309 314
310#ifdef CONFIG_ARCH_AT91RM9200
311 /* AT91RM9200 SDRAM low-power mode cannot be used with self-refresh. */ 315 /* AT91RM9200 SDRAM low-power mode cannot be used with self-refresh. */
312 at91_ramc_write(0, AT91RM9200_SDRAMC_LPR, 0); 316 if (cpu_is_at91rm9200())
313#endif 317 at91_ramc_write(0, AT91RM9200_SDRAMC_LPR, 0);
314 318
315 suspend_set_ops(&at91_pm_ops); 319 suspend_set_ops(&at91_pm_ops);
316 320
diff --git a/arch/arm/mach-at91/pm.h b/arch/arm/mach-at91/pm.h
index 89f56f3a802e..38f467c6b710 100644
--- a/arch/arm/mach-at91/pm.h
+++ b/arch/arm/mach-at91/pm.h
@@ -12,7 +12,6 @@
12#define __ARCH_ARM_MACH_AT91_PM 12#define __ARCH_ARM_MACH_AT91_PM
13 13
14#include <mach/at91_ramc.h> 14#include <mach/at91_ramc.h>
15#ifdef CONFIG_ARCH_AT91RM9200
16#include <mach/at91rm9200_sdramc.h> 15#include <mach/at91rm9200_sdramc.h>
17 16
18/* 17/*
@@ -43,10 +42,6 @@ static inline void at91rm9200_standby(void)
43 "r" (lpr)); 42 "r" (lpr));
44} 43}
45 44
46#define at91_standby at91rm9200_standby
47
48#elif defined(CONFIG_ARCH_AT91SAM9G45)
49
50/* We manage both DDRAM/SDRAM controllers, we need more than one value to 45/* We manage both DDRAM/SDRAM controllers, we need more than one value to
51 * remember. 46 * remember.
52 */ 47 */
@@ -75,11 +70,7 @@ static inline void at91sam9g45_standby(void)
75 at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1); 70 at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1);
76} 71}
77 72
78#define at91_standby at91sam9g45_standby 73#ifdef CONFIG_SOC_AT91SAM9263
79
80#else
81
82#ifdef CONFIG_ARCH_AT91SAM9263
83/* 74/*
84 * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use; 75 * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use;
85 * handle those cases both here and in the Suspend-To-RAM support. 76 * handle those cases both here and in the Suspend-To-RAM support.
@@ -102,8 +93,4 @@ static inline void at91sam9_standby(void)
102 at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr); 93 at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr);
103} 94}
104 95
105#define at91_standby at91sam9_standby
106
107#endif
108
109#endif 96#endif
diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S
index db5452123f17..098c28ddf025 100644
--- a/arch/arm/mach-at91/pm_slowclock.S
+++ b/arch/arm/mach-at91/pm_slowclock.S
@@ -18,7 +18,7 @@
18#include <mach/at91_ramc.h> 18#include <mach/at91_ramc.h>
19 19
20 20
21#ifdef CONFIG_ARCH_AT91SAM9263 21#ifdef CONFIG_SOC_AT91SAM9263
22/* 22/*
23 * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use; 23 * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use;
24 * handle those cases both here and in the Suspend-To-RAM support. 24 * handle those cases both here and in the Suspend-To-RAM support.
diff --git a/arch/arm/mach-at91/soc.h b/arch/arm/mach-at91/soc.h
index 5db4aa45404a..683dddfd8b13 100644
--- a/arch/arm/mach-at91/soc.h
+++ b/arch/arm/mach-at91/soc.h
@@ -26,30 +26,30 @@ static inline int at91_soc_is_enabled(void)
26 return at91_boot_soc.init != NULL; 26 return at91_boot_soc.init != NULL;
27} 27}
28 28
29#if !defined(CONFIG_ARCH_AT91RM9200) 29#if !defined(CONFIG_SOC_AT91RM9200)
30#define at91rm9200_soc at91_boot_soc 30#define at91rm9200_soc at91_boot_soc
31#endif 31#endif
32 32
33#if !(defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20)) 33#if !defined(CONFIG_SOC_AT91SAM9260)
34#define at91sam9260_soc at91_boot_soc 34#define at91sam9260_soc at91_boot_soc
35#endif 35#endif
36 36
37#if !(defined(CONFIG_ARCH_AT91SAM9261) || defined(CONFIG_ARCH_AT91SAM9G10)) 37#if !defined(CONFIG_SOC_AT91SAM9261)
38#define at91sam9261_soc at91_boot_soc 38#define at91sam9261_soc at91_boot_soc
39#endif 39#endif
40 40
41#if !defined(CONFIG_ARCH_AT91SAM9263) 41#if !defined(CONFIG_SOC_AT91SAM9263)
42#define at91sam9263_soc at91_boot_soc 42#define at91sam9263_soc at91_boot_soc
43#endif 43#endif
44 44
45#if !defined(CONFIG_ARCH_AT91SAM9G45) 45#if !defined(CONFIG_SOC_AT91SAM9G45)
46#define at91sam9g45_soc at91_boot_soc 46#define at91sam9g45_soc at91_boot_soc
47#endif 47#endif
48 48
49#if !defined(CONFIG_ARCH_AT91SAM9RL) 49#if !defined(CONFIG_SOC_AT91SAM9RL)
50#define at91sam9rl_soc at91_boot_soc 50#define at91sam9rl_soc at91_boot_soc
51#endif 51#endif
52 52
53#if !defined(CONFIG_ARCH_AT91SAM9X5) 53#if !defined(CONFIG_SOC_AT91SAM9X5)
54#define at91sam9x5_soc at91_boot_soc 54#define at91sam9x5_soc at91_boot_soc
55#endif 55#endif
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index eb34bd1251d4..ea036d621581 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -1,6 +1,6 @@
1if ARCH_CLPS711X 1if ARCH_CLPS711X
2 2
3menu "CLPS711X/EP721X Implementations" 3menu "CLPS711X/EP721X/EP731X Implementations"
4 4
5config ARCH_AUTCPU12 5config ARCH_AUTCPU12
6 bool "AUTCPU12" 6 bool "AUTCPU12"
@@ -45,26 +45,13 @@ config ARCH_P720T
45config ARCH_FORTUNET 45config ARCH_FORTUNET
46 bool "FORTUNET" 46 bool "FORTUNET"
47 47
48# XXX Maybe these should indicate register compatibility
49# instead of being mutually exclusive.
50config ARCH_EP7211
51 bool
52 depends on ARCH_EDB7211
53 default y
54
55config ARCH_EP7212
56 bool
57 depends on ARCH_P720T || ARCH_CEIVA
58 default y
59
60config EP72XX_ROM_BOOT 48config EP72XX_ROM_BOOT
61 bool "EP72xx ROM boot" 49 bool "EP721x/EP731x ROM boot"
62 depends on ARCH_EP7211 || ARCH_EP7212 50 help
63 ---help---
64 If you say Y here, your CLPS711x-based kernel will use the bootstrap 51 If you say Y here, your CLPS711x-based kernel will use the bootstrap
65 mode memory map instead of the normal memory map. 52 mode memory map instead of the normal memory map.
66 53
67 Processors derived from the Cirrus CLPS-711X core support two boot 54 Processors derived from the Cirrus CLPS711X core support two boot
68 modes. Normal mode boots from the external memory device at CS0. 55 modes. Normal mode boots from the external memory device at CS0.
69 Bootstrap mode rearranges parts of the memory map, placing an 56 Bootstrap mode rearranges parts of the memory map, placing an
70 internal 128 byte bootstrap ROM at CS0. This option performs the 57 internal 128 byte bootstrap ROM at CS0. This option performs the
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c
index 3c5b5bbf24e5..c965fd8eb31a 100644
--- a/arch/arm/mach-clps711x/common.c
+++ b/arch/arm/mach-clps711x/common.c
@@ -36,7 +36,6 @@
36#include <asm/page.h> 36#include <asm/page.h>
37#include <asm/mach/map.h> 37#include <asm/mach/map.h>
38#include <asm/mach/time.h> 38#include <asm/mach/time.h>
39#include <asm/hardware/clps7111.h>
40#include <asm/system_misc.h> 39#include <asm/system_misc.h>
41 40
42/* 41/*
@@ -44,8 +43,8 @@
44 */ 43 */
45static struct map_desc clps711x_io_desc[] __initdata = { 44static struct map_desc clps711x_io_desc[] __initdata = {
46 { 45 {
47 .virtual = CLPS7111_VIRT_BASE, 46 .virtual = (unsigned long)CLPS711X_VIRT_BASE,
48 .pfn = __phys_to_pfn(CLPS7111_PHYS_BASE), 47 .pfn = __phys_to_pfn(CLPS711X_PHYS_BASE),
49 .length = SZ_1M, 48 .length = SZ_1M,
50 .type = MT_DEVICE 49 .type = MT_DEVICE
51 } 50 }
@@ -67,12 +66,6 @@ static void int1_mask(struct irq_data *d)
67 66
68static void int1_ack(struct irq_data *d) 67static void int1_ack(struct irq_data *d)
69{ 68{
70 u32 intmr1;
71
72 intmr1 = clps_readl(INTMR1);
73 intmr1 &= ~(1 << d->irq);
74 clps_writel(intmr1, INTMR1);
75
76 switch (d->irq) { 69 switch (d->irq) {
77 case IRQ_CSINT: clps_writel(0, COEOI); break; 70 case IRQ_CSINT: clps_writel(0, COEOI); break;
78 case IRQ_TC1OI: clps_writel(0, TC1EOI); break; 71 case IRQ_TC1OI: clps_writel(0, TC1EOI); break;
@@ -109,12 +102,6 @@ static void int2_mask(struct irq_data *d)
109 102
110static void int2_ack(struct irq_data *d) 103static void int2_ack(struct irq_data *d)
111{ 104{
112 u32 intmr2;
113
114 intmr2 = clps_readl(INTMR2);
115 intmr2 &= ~(1 << (d->irq - 16));
116 clps_writel(intmr2, INTMR2);
117
118 switch (d->irq) { 105 switch (d->irq) {
119 case IRQ_KBDINT: clps_writel(0, KBDEOI); break; 106 case IRQ_KBDINT: clps_writel(0, KBDEOI); break;
120 } 107 }
diff --git a/arch/arm/include/asm/hardware/clps7111.h b/arch/arm/mach-clps711x/include/mach/clps711x.h
index 44477225aed6..1dd806f2847e 100644
--- a/arch/arm/include/asm/hardware/clps7111.h
+++ b/arch/arm/mach-clps711x/include/mach/clps711x.h
@@ -1,8 +1,6 @@
1/* 1/*
2 * arch/arm/include/asm/hardware/clps7111.h 2 * This file contains the hardware definitions of the Cirrus Logic
3 * 3 * ARM7 CLPS711X internal registers.
4 * This file contains the hardware definitions of the CLPS7111 internal
5 * registers.
6 * 4 *
7 * Copyright (C) 2000 Deep Blue Solutions Ltd. 5 * Copyright (C) 2000 Deep Blue Solutions Ltd.
8 * 6 *
@@ -20,25 +18,18 @@
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */ 20 */
23#ifndef __ASM_HARDWARE_CLPS7111_H 21#ifndef __MACH_CLPS711X_H
24#define __ASM_HARDWARE_CLPS7111_H 22#define __MACH_CLPS711X_H
25
26#define CLPS7111_PHYS_BASE (0x80000000)
27 23
28#ifndef __ASSEMBLY__ 24#define CLPS711X_PHYS_BASE (0x80000000)
29#define clps_readb(off) __raw_readb(CLPS7111_BASE + (off))
30#define clps_readw(off) __raw_readw(CLPS7111_BASE + (off))
31#define clps_readl(off) __raw_readl(CLPS7111_BASE + (off))
32#define clps_writeb(val,off) __raw_writeb(val, CLPS7111_BASE + (off))
33#define clps_writew(val,off) __raw_writew(val, CLPS7111_BASE + (off))
34#define clps_writel(val,off) __raw_writel(val, CLPS7111_BASE + (off))
35#endif
36 25
37#define PADR (0x0000) 26#define PADR (0x0000)
38#define PBDR (0x0001) 27#define PBDR (0x0001)
28#define PCDR (0x0002)
39#define PDDR (0x0003) 29#define PDDR (0x0003)
40#define PADDR (0x0040) 30#define PADDR (0x0040)
41#define PBDDR (0x0041) 31#define PBDDR (0x0041)
32#define PCDDR (0x0042)
42#define PDDDR (0x0043) 33#define PDDDR (0x0043)
43#define PEDR (0x0080) 34#define PEDR (0x0080)
44#define PEDDR (0x00c0) 35#define PEDDR (0x00c0)
@@ -50,7 +41,7 @@
50#define INTSR1 (0x0240) 41#define INTSR1 (0x0240)
51#define INTMR1 (0x0280) 42#define INTMR1 (0x0280)
52#define LCDCON (0x02c0) 43#define LCDCON (0x02c0)
53#define TC1D (0x0300) 44#define TC1D (0x0300)
54#define TC2D (0x0340) 45#define TC2D (0x0340)
55#define RTCDR (0x0380) 46#define RTCDR (0x0380)
56#define RTCMR (0x03c0) 47#define RTCMR (0x03c0)
@@ -85,6 +76,26 @@
85#define SS2POP (0x16c0) 76#define SS2POP (0x16c0)
86#define KBDEOI (0x1700) 77#define KBDEOI (0x1700)
87 78
79#define DAIR (0x2000)
80#define DAIR0 (0x2040)
81#define DAIDR1 (0x2080)
82#define DAIDR2 (0x20c0)
83#define DAISR (0x2100)
84#define SYSCON3 (0x2200)
85#define INTSR3 (0x2240)
86#define INTMR3 (0x2280)
87#define LEDFLSH (0x22c0)
88#define SDCONF (0x2300)
89#define SDRFPR (0x2340)
90#define UNIQID (0x2440)
91#define DAI64FS (0x2600)
92#define PLLW (0x2610)
93#define PLLR (0xa5a8)
94#define RANDID0 (0x2700)
95#define RANDID1 (0x2704)
96#define RANDID2 (0x2708)
97#define RANDID3 (0x270c)
98
88/* common bits: SYSCON1 / SYSCON2 */ 99/* common bits: SYSCON1 / SYSCON2 */
89#define SYSCON_UARTEN (1 << 8) 100#define SYSCON_UARTEN (1 << 8)
90 101
@@ -131,6 +142,8 @@
131#define SYSFLG1_CTXFF (1 << 25) 142#define SYSFLG1_CTXFF (1 << 25)
132#define SYSFLG1_SSIBUSY (1 << 26) 143#define SYSFLG1_SSIBUSY (1 << 26)
133#define SYSFLG1_ID (1 << 29) 144#define SYSFLG1_ID (1 << 29)
145#define SYSFLG1_VERID(x) (((x) >> 30) & 3)
146#define SYSFLG1_VERID_MASK (3 << 30)
134 147
135#define SYSFLG2_SSRXOF (1 << 0) 148#define SYSFLG2_SSRXOF (1 << 0)
136#define SYSFLG2_RESVAL (1 << 1) 149#define SYSFLG2_RESVAL (1 << 1)
@@ -178,7 +191,88 @@
178#define UBRLCR_WRDLEN8 (3 << 17) 191#define UBRLCR_WRDLEN8 (3 << 17)
179#define UBRLCR_WRDLEN_MASK (3 << 17) 192#define UBRLCR_WRDLEN_MASK (3 << 17)
180 193
194#define SYNCIO_FRMLEN(x) (((x) & 0x3f) << 7)
195#define SYNCIO_CFGLEN(x) ((x) & 0x7f)
181#define SYNCIO_SMCKEN (1 << 13) 196#define SYNCIO_SMCKEN (1 << 13)
182#define SYNCIO_TXFRMEN (1 << 14) 197#define SYNCIO_TXFRMEN (1 << 14)
183 198
184#endif /* __ASM_HARDWARE_CLPS7111_H */ 199#define DAIR_RESERVED (0x0404)
200#define DAIR_DAIEN (1 << 16)
201#define DAIR_ECS (1 << 17)
202#define DAIR_LCTM (1 << 19)
203#define DAIR_LCRM (1 << 20)
204#define DAIR_RCTM (1 << 21)
205#define DAIR_RCRM (1 << 22)
206#define DAIR_LBM (1 << 23)
207
208#define DAIDR2_FIFOEN (1 << 15)
209#define DAIDR2_FIFOLEFT (0x0d << 16)
210#define DAIDR2_FIFORIGHT (0x11 << 16)
211
212#define DAISR_RCTS (1 << 0)
213#define DAISR_RCRS (1 << 1)
214#define DAISR_LCTS (1 << 2)
215#define DAISR_LCRS (1 << 3)
216#define DAISR_RCTU (1 << 4)
217#define DAISR_RCRO (1 << 5)
218#define DAISR_LCTU (1 << 6)
219#define DAISR_LCRO (1 << 7)
220#define DAISR_RCNF (1 << 8)
221#define DAISR_RCNE (1 << 9)
222#define DAISR_LCNF (1 << 10)
223#define DAISR_LCNE (1 << 11)
224#define DAISR_FIFO (1 << 12)
225
226#define DAI64FS_I2SF64 (1 << 0)
227#define DAI64FS_AUDIOCLKEN (1 << 1)
228#define DAI64FS_AUDIOCLKSRC (1 << 2)
229#define DAI64FS_MCLK256EN (1 << 3)
230#define DAI64FS_LOOPBACK (1 << 5)
231
232#define SYSCON3_ADCCON (1 << 0)
233#define SYSCON3_CLKCTL0 (1 << 1)
234#define SYSCON3_CLKCTL1 (1 << 2)
235#define SYSCON3_DAISEL (1 << 3)
236#define SYSCON3_ADCCKNSEN (1 << 4)
237#define SYSCON3_VERSN(x) (((x) >> 5) & 7)
238#define SYSCON3_VERSN_MASK (7 << 5)
239#define SYSCON3_FASTWAKE (1 << 8)
240#define SYSCON3_DAIEN (1 << 9)
241#define SYSCON3_128FS SYSCON3_DAIEN
242#define SYSCON3_ENPD67 (1 << 10)
243
244#define SDCONF_ACTIVE (1 << 10)
245#define SDCONF_CLKCTL (1 << 9)
246#define SDCONF_WIDTH_4 (0 << 7)
247#define SDCONF_WIDTH_8 (1 << 7)
248#define SDCONF_WIDTH_16 (2 << 7)
249#define SDCONF_WIDTH_32 (3 << 7)
250#define SDCONF_SIZE_16 (0 << 5)
251#define SDCONF_SIZE_64 (1 << 5)
252#define SDCONF_SIZE_128 (2 << 5)
253#define SDCONF_SIZE_256 (3 << 5)
254#define SDCONF_CASLAT_2 (2)
255#define SDCONF_CASLAT_3 (3)
256
257#define MEMCFG_BUS_WIDTH_32 (1)
258#define MEMCFG_BUS_WIDTH_16 (0)
259#define MEMCFG_BUS_WIDTH_8 (3)
260
261#define MEMCFG_WAITSTATE_8_3 (0 << 2)
262#define MEMCFG_WAITSTATE_7_3 (1 << 2)
263#define MEMCFG_WAITSTATE_6_3 (2 << 2)
264#define MEMCFG_WAITSTATE_5_3 (3 << 2)
265#define MEMCFG_WAITSTATE_4_2 (4 << 2)
266#define MEMCFG_WAITSTATE_3_2 (5 << 2)
267#define MEMCFG_WAITSTATE_2_2 (6 << 2)
268#define MEMCFG_WAITSTATE_1_2 (7 << 2)
269#define MEMCFG_WAITSTATE_8_1 (8 << 2)
270#define MEMCFG_WAITSTATE_7_1 (9 << 2)
271#define MEMCFG_WAITSTATE_6_1 (10 << 2)
272#define MEMCFG_WAITSTATE_5_1 (11 << 2)
273#define MEMCFG_WAITSTATE_4_0 (12 << 2)
274#define MEMCFG_WAITSTATE_3_0 (13 << 2)
275#define MEMCFG_WAITSTATE_2_0 (14 << 2)
276#define MEMCFG_WAITSTATE_1_0 (15 << 2)
277
278#endif /* __MACH_CLPS711X_H */
diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S
index b802e8a51831..118b3d930573 100644
--- a/arch/arm/mach-clps711x/include/mach/debug-macro.S
+++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S
@@ -12,7 +12,6 @@
12*/ 12*/
13 13
14#include <mach/hardware.h> 14#include <mach/hardware.h>
15#include <asm/hardware/clps7111.h>
16 15
17 .macro addruart, rp, rv, tmp 16 .macro addruart, rp, rv, tmp
18#ifndef CONFIG_DEBUG_CLPS711X_UART2 17#ifndef CONFIG_DEBUG_CLPS711X_UART2
@@ -20,8 +19,8 @@
20#else 19#else
21 mov \rp, #0x1000 @ UART2 20 mov \rp, #0x1000 @ UART2
22#endif 21#endif
23 orr \rv, \rp, #CLPS7111_VIRT_BASE 22 orr \rv, \rp, #CLPS711X_VIRT_BASE
24 orr \rp, \rp, #CLPS7111_PHYS_BASE 23 orr \rp, \rp, #CLPS711X_PHYS_BASE
25 .endm 24 .endm
26 25
27 .macro senduart,rd,rx 26 .macro senduart,rd,rx
diff --git a/arch/arm/mach-clps711x/include/mach/entry-macro.S b/arch/arm/mach-clps711x/include/mach/entry-macro.S
index 125af59d7a29..56e5c2c23504 100644
--- a/arch/arm/mach-clps711x/include/mach/entry-macro.S
+++ b/arch/arm/mach-clps711x/include/mach/entry-macro.S
@@ -8,7 +8,6 @@
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10#include <mach/hardware.h> 10#include <mach/hardware.h>
11#include <asm/hardware/clps7111.h>
12 11
13 .macro get_irqnr_preamble, base, tmp 12 .macro get_irqnr_preamble, base, tmp
14 .endm 13 .endm
@@ -18,7 +17,7 @@
18#endif 17#endif
19 18
20 .macro get_irqnr_and_base, irqnr, stat, base, mask 19 .macro get_irqnr_and_base, irqnr, stat, base, mask
21 mov \base, #CLPS7111_BASE 20 mov \base, #CLPS711X_VIRT_BASE
22 ldr \stat, [\base, #INTSR1] 21 ldr \stat, [\base, #INTSR1]
23 ldr \mask, [\base, #INTMR1] 22 ldr \mask, [\base, #INTMR1]
24 mov \irqnr, #4 23 mov \irqnr, #4
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
index d0b7d870be9c..13a64fcd7dd1 100644
--- a/arch/arm/mach-clps711x/include/mach/hardware.h
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -19,12 +19,21 @@
19 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */ 21 */
22#ifndef __ASM_ARCH_HARDWARE_H 22#ifndef __MACH_HARDWARE_H
23#define __ASM_ARCH_HARDWARE_H 23#define __MACH_HARDWARE_H
24 24
25#include <mach/clps711x.h>
25 26
26#define CLPS7111_VIRT_BASE 0xff000000 27#define CLPS711X_VIRT_BASE IOMEM(0xff000000)
27#define CLPS7111_BASE CLPS7111_VIRT_BASE 28
29#ifndef __ASSEMBLY__
30#define clps_readb(off) readb(CLPS711X_VIRT_BASE + (off))
31#define clps_readw(off) readw(CLPS711X_VIRT_BASE + (off))
32#define clps_readl(off) readl(CLPS711X_VIRT_BASE + (off))
33#define clps_writeb(val,off) writeb(val, CLPS711X_VIRT_BASE + (off))
34#define clps_writew(val,off) writew(val, CLPS711X_VIRT_BASE + (off))
35#define clps_writel(val,off) writel(val, CLPS711X_VIRT_BASE + (off))
36#endif
28 37
29/* 38/*
30 * The physical addresses that the external chip select signals map to is 39 * The physical addresses that the external chip select signals map to is
@@ -52,46 +61,11 @@
52#define CS7_PHYS_BASE (0x00000000) 61#define CS7_PHYS_BASE (0x00000000)
53#endif 62#endif
54 63
55#if defined (CONFIG_ARCH_EP7211)
56
57#define EP7211_VIRT_BASE CLPS7111_VIRT_BASE
58#define EP7211_BASE CLPS7111_VIRT_BASE
59#include <asm/hardware/ep7211.h>
60
61#elif defined (CONFIG_ARCH_EP7212)
62
63#define EP7212_VIRT_BASE CLPS7111_VIRT_BASE
64#define EP7212_BASE CLPS7111_VIRT_BASE
65#include <asm/hardware/ep7212.h>
66
67#endif
68
69#define SYSPLD_VIRT_BASE 0xfe000000 64#define SYSPLD_VIRT_BASE 0xfe000000
70#define SYSPLD_BASE SYSPLD_VIRT_BASE 65#define SYSPLD_BASE SYSPLD_VIRT_BASE
71 66
72#if defined (CONFIG_ARCH_AUTCPU12)
73
74#define CS89712_VIRT_BASE CLPS7111_VIRT_BASE
75#define CS89712_BASE CLPS7111_VIRT_BASE
76
77#include <asm/hardware/clps7111.h>
78#include <asm/hardware/ep7212.h>
79#include <asm/hardware/cs89712.h>
80
81#endif
82
83
84#if defined (CONFIG_ARCH_CDB89712) 67#if defined (CONFIG_ARCH_CDB89712)
85 68
86#include <asm/hardware/clps7111.h>
87#include <asm/hardware/ep7212.h>
88#include <asm/hardware/cs89712.h>
89
90/* static cdb89712_map_io() areas */
91#define REGISTER_START 0x80000000
92#define REGISTER_SIZE 0x4000
93#define REGISTER_BASE 0xff000000
94
95#define ETHER_START 0x20000000 69#define ETHER_START 0x20000000
96#define ETHER_SIZE 0x1000 70#define ETHER_SIZE 0x1000
97#define ETHER_BASE 0xfe000000 71#define ETHER_BASE 0xfe000000
@@ -154,13 +128,6 @@
154 128
155#if defined (CONFIG_ARCH_CEIVA) 129#if defined (CONFIG_ARCH_CEIVA)
156 130
157#define CEIVA_VIRT_BASE CLPS7111_VIRT_BASE
158#define CEIVA_BASE CLPS7111_VIRT_BASE
159
160#include <asm/hardware/clps7111.h>
161#include <asm/hardware/ep7212.h>
162
163
164/* 131/*
165 * The two flash banks are wired to chip selects 0 and 1. This is the mapping 132 * The two flash banks are wired to chip selects 0 and 1. This is the mapping
166 * for them. 133 * for them.
diff --git a/arch/arm/mach-clps711x/include/mach/irqs.h b/arch/arm/mach-clps711x/include/mach/irqs.h
index 30b7e97285a4..14d215f8ca81 100644
--- a/arch/arm/mach-clps711x/include/mach/irqs.h
+++ b/arch/arm/mach-clps711x/include/mach/irqs.h
@@ -35,7 +35,6 @@
35#define IRQ_SSEOTI 15 35#define IRQ_SSEOTI 15
36 36
37#define INT1_IRQS (0x0000fff0) 37#define INT1_IRQS (0x0000fff0)
38#define INT1_ACK_IRQS (0x00004f10)
39 38
40/* 39/*
41 * Interrupts from INTSR2 40 * Interrupts from INTSR2
@@ -47,7 +46,5 @@
47#define IRQ_URXINT2 (16+13) /* bit 13 */ 46#define IRQ_URXINT2 (16+13) /* bit 13 */
48 47
49#define INT2_IRQS (0x30070000) 48#define INT2_IRQS (0x30070000)
50#define INT2_ACK_IRQS (0x00010000)
51
52#define NR_IRQS 30
53 49
50#define NR_IRQS 30
diff --git a/arch/arm/mach-clps711x/include/mach/time.h b/arch/arm/mach-clps711x/include/mach/time.h
deleted file mode 100644
index 61fef9129c6a..000000000000
--- a/arch/arm/mach-clps711x/include/mach/time.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * arch/arm/mach-clps711x/include/mach/time.h
3 *
4 * Copyright (C) 2000 Deep Blue Solutions Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#include <asm/leds.h>
21#include <asm/hardware/clps7111.h>
22
23extern void clps711x_setup_timer(void);
24
25/*
26 * IRQ handler for the timer
27 */
28static irqreturn_t
29p720t_timer_interrupt(int irq, void *dev_id)
30{
31 struct pt_regs *regs = get_irq_regs();
32 do_leds();
33 xtime_update(1);
34#ifndef CONFIG_SMP
35 update_process_times(user_mode(regs));
36#endif
37 do_profile(regs);
38 return IRQ_HANDLED;
39}
40
41/*
42 * Set up timer interrupt, and return the current time in seconds.
43 */
44void __init time_init(void)
45{
46 clps711x_setup_timer();
47 timer_irq.handler = p720t_timer_interrupt;
48 setup_irq(IRQ_TC2OI, &timer_irq);
49}
diff --git a/arch/arm/mach-clps711x/include/mach/uncompress.h b/arch/arm/mach-clps711x/include/mach/uncompress.h
index 35ed731b9f16..7b28d6a47690 100644
--- a/arch/arm/mach-clps711x/include/mach/uncompress.h
+++ b/arch/arm/mach-clps711x/include/mach/uncompress.h
@@ -17,14 +17,7 @@
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20#include <mach/hardware.h> 20#include <mach/clps711x.h>
21#include <asm/hardware/clps7111.h>
22
23#undef CLPS7111_BASE
24#define CLPS7111_BASE CLPS7111_PHYS_BASE
25
26#define __raw_readl(p) (*(unsigned long *)(p))
27#define __raw_writel(v,p) (*(unsigned long *)(p) = (v))
28 21
29#ifdef CONFIG_DEBUG_CLPS711X_UART2 22#ifdef CONFIG_DEBUG_CLPS711X_UART2
30#define SYSFLGx SYSFLG2 23#define SYSFLGx SYSFLG2
@@ -34,19 +27,25 @@
34#define UARTDRx UARTDR1 27#define UARTDRx UARTDR1
35#endif 28#endif
36 29
30#define phys_reg(x) (*(volatile u32 *)(CLPS711X_PHYS_BASE + (x)))
31
37/* 32/*
33 * The following code assumes the serial port has already been
34 * initialized by the bootloader. If you didn't setup a port in
35 * your bootloader then nothing will appear (which might be desired).
36 *
38 * This does not append a newline 37 * This does not append a newline
39 */ 38 */
40static inline void putc(int c) 39static inline void putc(int c)
41{ 40{
42 while (clps_readl(SYSFLGx) & SYSFLG_UTXFF) 41 while (phys_reg(SYSFLGx) & SYSFLG_UTXFF)
43 barrier(); 42 barrier();
44 clps_writel(c, UARTDRx); 43 phys_reg(UARTDRx) = c;
45} 44}
46 45
47static inline void flush(void) 46static inline void flush(void)
48{ 47{
49 while (clps_readl(SYSFLGx) & SYSFLG_UBUSY) 48 while (phys_reg(SYSFLGx) & SYSFLG_UBUSY)
50 barrier(); 49 barrier();
51} 50}
52 51
diff --git a/arch/arm/mach-clps711x/p720t-leds.c b/arch/arm/mach-clps711x/p720t-leds.c
index dd9a6cdbeb02..bbc449fbe14a 100644
--- a/arch/arm/mach-clps711x/p720t-leds.c
+++ b/arch/arm/mach-clps711x/p720t-leds.c
@@ -27,9 +27,6 @@
27#include <asm/leds.h> 27#include <asm/leds.h>
28#include <asm/mach-types.h> 28#include <asm/mach-types.h>
29 29
30#include <asm/hardware/clps7111.h>
31#include <asm/hardware/ep7212.h>
32
33static void p720t_leds_event(led_event_t ledevt) 30static void p720t_leds_event(led_event_t ledevt)
34{ 31{
35 unsigned long flags; 32 unsigned long flags;
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c
index bda7aca04ca0..42ab1e7c4ecc 100644
--- a/arch/arm/mach-dove/common.c
+++ b/arch/arm/mach-dove/common.c
@@ -181,7 +181,7 @@ static int get_tclk(void)
181 return 166666667; 181 return 166666667;
182} 182}
183 183
184static void dove_timer_init(void) 184static void __init dove_timer_init(void)
185{ 185{
186 orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, 186 orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
187 IRQ_DOVE_BRIDGE, get_tclk()); 187 IRQ_DOVE_BRIDGE, get_tclk());
diff --git a/arch/arm/mach-dove/mpp.c b/arch/arm/mach-dove/mpp.c
index 51e0e411c9cb..7f70afc26f91 100644
--- a/arch/arm/mach-dove/mpp.c
+++ b/arch/arm/mach-dove/mpp.c
@@ -56,7 +56,7 @@ static void dove_mpp_gpio_mode(int start, int end, int gpio_mode)
56 56
57/* Dump all the extra MPP registers. The platform code will dump the 57/* Dump all the extra MPP registers. The platform code will dump the
58 registers for pins 0-23. */ 58 registers for pins 0-23. */
59static void dove_mpp_dump_regs(void) 59static void __init dove_mpp_dump_regs(void)
60{ 60{
61 pr_debug("PMU_CTRL4_CTRL: %08x\n", 61 pr_debug("PMU_CTRL4_CTRL: %08x\n",
62 readl(DOVE_MPP_CTRL4_VIRT_BASE)); 62 readl(DOVE_MPP_CTRL4_VIRT_BASE));
@@ -67,7 +67,7 @@ static void dove_mpp_dump_regs(void)
67 pr_debug("MPP_GENERAL: %08x\n", readl(DOVE_MPP_GENERAL_VIRT_BASE)); 67 pr_debug("MPP_GENERAL: %08x\n", readl(DOVE_MPP_GENERAL_VIRT_BASE));
68} 68}
69 69
70static void dove_mpp_cfg_nfc(int sel) 70static void __init dove_mpp_cfg_nfc(int sel)
71{ 71{
72 u32 mpp_gen_cfg = readl(DOVE_MPP_GENERAL_VIRT_BASE); 72 u32 mpp_gen_cfg = readl(DOVE_MPP_GENERAL_VIRT_BASE);
73 73
@@ -78,7 +78,7 @@ static void dove_mpp_cfg_nfc(int sel)
78 dove_mpp_gpio_mode(64, 71, GPIO_OUTPUT_OK); 78 dove_mpp_gpio_mode(64, 71, GPIO_OUTPUT_OK);
79} 79}
80 80
81static void dove_mpp_cfg_au1(int sel) 81static void __init dove_mpp_cfg_au1(int sel)
82{ 82{
83 u32 mpp_ctrl4 = readl(DOVE_MPP_CTRL4_VIRT_BASE); 83 u32 mpp_ctrl4 = readl(DOVE_MPP_CTRL4_VIRT_BASE);
84 u32 ssp_ctrl1 = readl(DOVE_SSP_CTRL_STATUS_1); 84 u32 ssp_ctrl1 = readl(DOVE_SSP_CTRL_STATUS_1);
@@ -118,7 +118,7 @@ static void dove_mpp_cfg_au1(int sel)
118 118
119/* Configure the group registers, enabling GPIO if sel indicates the 119/* Configure the group registers, enabling GPIO if sel indicates the
120 pin is to be used for GPIO */ 120 pin is to be used for GPIO */
121static void dove_mpp_conf_grp(unsigned int *mpp_grp_list) 121static void __init dove_mpp_conf_grp(unsigned int *mpp_grp_list)
122{ 122{
123 u32 mpp_ctrl4 = readl(DOVE_MPP_CTRL4_VIRT_BASE); 123 u32 mpp_ctrl4 = readl(DOVE_MPP_CTRL4_VIRT_BASE);
124 int gpio_mode; 124 int gpio_mode;
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig
index 97a249395b5a..fe3c1fa5462b 100644
--- a/arch/arm/mach-ep93xx/Kconfig
+++ b/arch/arm/mach-ep93xx/Kconfig
@@ -2,6 +2,11 @@ if ARCH_EP93XX
2 2
3menu "Cirrus EP93xx Implementation Options" 3menu "Cirrus EP93xx Implementation Options"
4 4
5config EP93XX_SOC_COMMON
6 bool
7 default y
8 select LEDS_GPIO_REGISTER
9
5config CRUNCH 10config CRUNCH
6 bool "Support for MaverickCrunch" 11 bool "Support for MaverickCrunch"
7 help 12 help
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 8d2589588713..66b1494f23a6 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -241,11 +241,7 @@ unsigned int ep93xx_chip_revision(void)
241 * EP93xx GPIO 241 * EP93xx GPIO
242 *************************************************************************/ 242 *************************************************************************/
243static struct resource ep93xx_gpio_resource[] = { 243static struct resource ep93xx_gpio_resource[] = {
244 { 244 DEFINE_RES_MEM(EP93XX_GPIO_PHYS_BASE, 0xcc),
245 .start = EP93XX_GPIO_PHYS_BASE,
246 .end = EP93XX_GPIO_PHYS_BASE + 0xcc - 1,
247 .flags = IORESOURCE_MEM,
248 },
249}; 245};
250 246
251static struct platform_device ep93xx_gpio_device = { 247static struct platform_device ep93xx_gpio_device = {
@@ -288,11 +284,7 @@ static AMBA_APB_DEVICE(uart3, "apb:uart3", 0x00041010, EP93XX_UART3_PHYS_BASE,
288 { IRQ_EP93XX_UART3 }, &ep93xx_uart_data); 284 { IRQ_EP93XX_UART3 }, &ep93xx_uart_data);
289 285
290static struct resource ep93xx_rtc_resource[] = { 286static struct resource ep93xx_rtc_resource[] = {
291 { 287 DEFINE_RES_MEM(EP93XX_RTC_PHYS_BASE, 0x10c),
292 .start = EP93XX_RTC_PHYS_BASE,
293 .end = EP93XX_RTC_PHYS_BASE + 0x10c - 1,
294 .flags = IORESOURCE_MEM,
295 },
296}; 288};
297 289
298static struct platform_device ep93xx_rtc_device = { 290static struct platform_device ep93xx_rtc_device = {
@@ -304,16 +296,8 @@ static struct platform_device ep93xx_rtc_device = {
304 296
305 297
306static struct resource ep93xx_ohci_resources[] = { 298static struct resource ep93xx_ohci_resources[] = {
307 [0] = { 299 DEFINE_RES_MEM(EP93XX_USB_PHYS_BASE, 0x1000),
308 .start = EP93XX_USB_PHYS_BASE, 300 DEFINE_RES_IRQ(IRQ_EP93XX_USB),
309 .end = EP93XX_USB_PHYS_BASE + 0x0fff,
310 .flags = IORESOURCE_MEM,
311 },
312 [1] = {
313 .start = IRQ_EP93XX_USB,
314 .end = IRQ_EP93XX_USB,
315 .flags = IORESOURCE_IRQ,
316 },
317}; 301};
318 302
319 303
@@ -372,15 +356,8 @@ void __init ep93xx_register_flash(unsigned int width,
372static struct ep93xx_eth_data ep93xx_eth_data; 356static struct ep93xx_eth_data ep93xx_eth_data;
373 357
374static struct resource ep93xx_eth_resource[] = { 358static struct resource ep93xx_eth_resource[] = {
375 { 359 DEFINE_RES_MEM(EP93XX_ETHERNET_PHYS_BASE, 0x10000),
376 .start = EP93XX_ETHERNET_PHYS_BASE, 360 DEFINE_RES_IRQ(IRQ_EP93XX_ETHERNET),
377 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
378 .flags = IORESOURCE_MEM,
379 }, {
380 .start = IRQ_EP93XX_ETHERNET,
381 .end = IRQ_EP93XX_ETHERNET,
382 .flags = IORESOURCE_IRQ,
383 }
384}; 361};
385 362
386static u64 ep93xx_eth_dma_mask = DMA_BIT_MASK(32); 363static u64 ep93xx_eth_dma_mask = DMA_BIT_MASK(32);
@@ -461,16 +438,8 @@ void __init ep93xx_register_i2c(struct i2c_gpio_platform_data *data,
461static struct ep93xx_spi_info ep93xx_spi_master_data; 438static struct ep93xx_spi_info ep93xx_spi_master_data;
462 439
463static struct resource ep93xx_spi_resources[] = { 440static struct resource ep93xx_spi_resources[] = {
464 { 441 DEFINE_RES_MEM(EP93XX_SPI_PHYS_BASE, 0x18),
465 .start = EP93XX_SPI_PHYS_BASE, 442 DEFINE_RES_IRQ(IRQ_EP93XX_SSP),
466 .end = EP93XX_SPI_PHYS_BASE + 0x18 - 1,
467 .flags = IORESOURCE_MEM,
468 },
469 {
470 .start = IRQ_EP93XX_SSP,
471 .end = IRQ_EP93XX_SSP,
472 .flags = IORESOURCE_IRQ,
473 },
474}; 443};
475 444
476static u64 ep93xx_spi_dma_mask = DMA_BIT_MASK(32); 445static u64 ep93xx_spi_dma_mask = DMA_BIT_MASK(32);
@@ -513,7 +482,7 @@ void __init ep93xx_register_spi(struct ep93xx_spi_info *info,
513/************************************************************************* 482/*************************************************************************
514 * EP93xx LEDs 483 * EP93xx LEDs
515 *************************************************************************/ 484 *************************************************************************/
516static struct gpio_led ep93xx_led_pins[] = { 485static const struct gpio_led ep93xx_led_pins[] __initconst = {
517 { 486 {
518 .name = "platform:grled", 487 .name = "platform:grled",
519 .gpio = EP93XX_GPIO_LINE_GRLED, 488 .gpio = EP93XX_GPIO_LINE_GRLED,
@@ -523,29 +492,16 @@ static struct gpio_led ep93xx_led_pins[] = {
523 }, 492 },
524}; 493};
525 494
526static struct gpio_led_platform_data ep93xx_led_data = { 495static const struct gpio_led_platform_data ep93xx_led_data __initconst = {
527 .num_leds = ARRAY_SIZE(ep93xx_led_pins), 496 .num_leds = ARRAY_SIZE(ep93xx_led_pins),
528 .leds = ep93xx_led_pins, 497 .leds = ep93xx_led_pins,
529}; 498};
530 499
531static struct platform_device ep93xx_leds = {
532 .name = "leds-gpio",
533 .id = -1,
534 .dev = {
535 .platform_data = &ep93xx_led_data,
536 },
537};
538
539
540/************************************************************************* 500/*************************************************************************
541 * EP93xx pwm peripheral handling 501 * EP93xx pwm peripheral handling
542 *************************************************************************/ 502 *************************************************************************/
543static struct resource ep93xx_pwm0_resource[] = { 503static struct resource ep93xx_pwm0_resource[] = {
544 { 504 DEFINE_RES_MEM(EP93XX_PWM_PHYS_BASE, 0x10),
545 .start = EP93XX_PWM_PHYS_BASE,
546 .end = EP93XX_PWM_PHYS_BASE + 0x10 - 1,
547 .flags = IORESOURCE_MEM,
548 },
549}; 505};
550 506
551static struct platform_device ep93xx_pwm0_device = { 507static struct platform_device ep93xx_pwm0_device = {
@@ -556,11 +512,7 @@ static struct platform_device ep93xx_pwm0_device = {
556}; 512};
557 513
558static struct resource ep93xx_pwm1_resource[] = { 514static struct resource ep93xx_pwm1_resource[] = {
559 { 515 DEFINE_RES_MEM(EP93XX_PWM_PHYS_BASE + 0x20, 0x10),
560 .start = EP93XX_PWM_PHYS_BASE + 0x20,
561 .end = EP93XX_PWM_PHYS_BASE + 0x30 - 1,
562 .flags = IORESOURCE_MEM,
563 },
564}; 516};
565 517
566static struct platform_device ep93xx_pwm1_device = { 518static struct platform_device ep93xx_pwm1_device = {
@@ -628,11 +580,7 @@ EXPORT_SYMBOL(ep93xx_pwm_release_gpio);
628static struct ep93xxfb_mach_info ep93xxfb_data; 580static struct ep93xxfb_mach_info ep93xxfb_data;
629 581
630static struct resource ep93xx_fb_resource[] = { 582static struct resource ep93xx_fb_resource[] = {
631 { 583 DEFINE_RES_MEM(EP93XX_RASTER_PHYS_BASE, 0x800),
632 .start = EP93XX_RASTER_PHYS_BASE,
633 .end = EP93XX_RASTER_PHYS_BASE + 0x800 - 1,
634 .flags = IORESOURCE_MEM,
635 },
636}; 584};
637 585
638static struct platform_device ep93xx_fb_device = { 586static struct platform_device ep93xx_fb_device = {
@@ -680,15 +628,8 @@ void __init ep93xx_register_fb(struct ep93xxfb_mach_info *data)
680static struct ep93xx_keypad_platform_data ep93xx_keypad_data; 628static struct ep93xx_keypad_platform_data ep93xx_keypad_data;
681 629
682static struct resource ep93xx_keypad_resource[] = { 630static struct resource ep93xx_keypad_resource[] = {
683 { 631 DEFINE_RES_MEM(EP93XX_KEY_MATRIX_PHYS_BASE, 0x0c),
684 .start = EP93XX_KEY_MATRIX_PHYS_BASE, 632 DEFINE_RES_IRQ(IRQ_EP93XX_KEY),
685 .end = EP93XX_KEY_MATRIX_PHYS_BASE + 0x0c - 1,
686 .flags = IORESOURCE_MEM,
687 }, {
688 .start = IRQ_EP93XX_KEY,
689 .end = IRQ_EP93XX_KEY,
690 .flags = IORESOURCE_IRQ,
691 },
692}; 633};
693 634
694static struct platform_device ep93xx_keypad_device = { 635static struct platform_device ep93xx_keypad_device = {
@@ -761,11 +702,7 @@ EXPORT_SYMBOL(ep93xx_keypad_release_gpio);
761 * EP93xx I2S audio peripheral handling 702 * EP93xx I2S audio peripheral handling
762 *************************************************************************/ 703 *************************************************************************/
763static struct resource ep93xx_i2s_resource[] = { 704static struct resource ep93xx_i2s_resource[] = {
764 { 705 DEFINE_RES_MEM(EP93XX_I2S_PHYS_BASE, 0x100),
765 .start = EP93XX_I2S_PHYS_BASE,
766 .end = EP93XX_I2S_PHYS_BASE + 0x100 - 1,
767 .flags = IORESOURCE_MEM,
768 },
769}; 706};
770 707
771static struct platform_device ep93xx_i2s_device = { 708static struct platform_device ep93xx_i2s_device = {
@@ -824,16 +761,8 @@ EXPORT_SYMBOL(ep93xx_i2s_release);
824 * EP93xx AC97 audio peripheral handling 761 * EP93xx AC97 audio peripheral handling
825 *************************************************************************/ 762 *************************************************************************/
826static struct resource ep93xx_ac97_resources[] = { 763static struct resource ep93xx_ac97_resources[] = {
827 { 764 DEFINE_RES_MEM(EP93XX_AAC_PHYS_BASE, 0xac),
828 .start = EP93XX_AAC_PHYS_BASE, 765 DEFINE_RES_IRQ(IRQ_EP93XX_AACINTR),
829 .end = EP93XX_AAC_PHYS_BASE + 0xac - 1,
830 .flags = IORESOURCE_MEM,
831 },
832 {
833 .start = IRQ_EP93XX_AACINTR,
834 .end = IRQ_EP93XX_AACINTR,
835 .flags = IORESOURCE_IRQ,
836 },
837}; 766};
838 767
839static struct platform_device ep93xx_ac97_device = { 768static struct platform_device ep93xx_ac97_device = {
@@ -889,8 +818,9 @@ void __init ep93xx_init_devices(void)
889 818
890 platform_device_register(&ep93xx_rtc_device); 819 platform_device_register(&ep93xx_rtc_device);
891 platform_device_register(&ep93xx_ohci_device); 820 platform_device_register(&ep93xx_ohci_device);
892 platform_device_register(&ep93xx_leds);
893 platform_device_register(&ep93xx_wdt_device); 821 platform_device_register(&ep93xx_wdt_device);
822
823 gpio_led_register_device(-1, &ep93xx_led_data);
894} 824}
895 825
896void ep93xx_restart(char mode, const char *cmd) 826void ep93xx_restart(char mode, const char *cmd)
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index 33ab4e7558af..26dac2893b8e 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -20,6 +20,7 @@
20#include <asm/smp_scu.h> 20#include <asm/smp_scu.h>
21#include <asm/suspend.h> 21#include <asm/suspend.h>
22#include <asm/unified.h> 22#include <asm/unified.h>
23#include <asm/cpuidle.h>
23#include <mach/regs-pmu.h> 24#include <mach/regs-pmu.h>
24#include <mach/pmu.h> 25#include <mach/pmu.h>
25 26
@@ -34,22 +35,12 @@
34 35
35#define S5P_CHECK_AFTR 0xFCBA0D10 36#define S5P_CHECK_AFTR 0xFCBA0D10
36 37
37static int exynos4_enter_idle(struct cpuidle_device *dev,
38 struct cpuidle_driver *drv,
39 int index);
40static int exynos4_enter_lowpower(struct cpuidle_device *dev, 38static int exynos4_enter_lowpower(struct cpuidle_device *dev,
41 struct cpuidle_driver *drv, 39 struct cpuidle_driver *drv,
42 int index); 40 int index);
43 41
44static struct cpuidle_state exynos4_cpuidle_set[] __initdata = { 42static struct cpuidle_state exynos4_cpuidle_set[] __initdata = {
45 [0] = { 43 [0] = ARM_CPUIDLE_WFI_STATE,
46 .enter = exynos4_enter_idle,
47 .exit_latency = 1,
48 .target_residency = 100000,
49 .flags = CPUIDLE_FLAG_TIME_VALID,
50 .name = "C0",
51 .desc = "ARM clock gating(WFI)",
52 },
53 [1] = { 44 [1] = {
54 .enter = exynos4_enter_lowpower, 45 .enter = exynos4_enter_lowpower,
55 .exit_latency = 300, 46 .exit_latency = 300,
@@ -63,8 +54,9 @@ static struct cpuidle_state exynos4_cpuidle_set[] __initdata = {
63static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device); 54static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device);
64 55
65static struct cpuidle_driver exynos4_idle_driver = { 56static struct cpuidle_driver exynos4_idle_driver = {
66 .name = "exynos4_idle", 57 .name = "exynos4_idle",
67 .owner = THIS_MODULE, 58 .owner = THIS_MODULE,
59 .en_core_tk_irqen = 1,
68}; 60};
69 61
70/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */ 62/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */
@@ -103,13 +95,8 @@ static int exynos4_enter_core0_aftr(struct cpuidle_device *dev,
103 struct cpuidle_driver *drv, 95 struct cpuidle_driver *drv,
104 int index) 96 int index)
105{ 97{
106 struct timeval before, after;
107 int idle_time;
108 unsigned long tmp; 98 unsigned long tmp;
109 99
110 local_irq_disable();
111 do_gettimeofday(&before);
112
113 exynos4_set_wakeupmask(); 100 exynos4_set_wakeupmask();
114 101
115 /* Set value of power down register for aftr mode */ 102 /* Set value of power down register for aftr mode */
@@ -150,34 +137,6 @@ static int exynos4_enter_core0_aftr(struct cpuidle_device *dev,
150 /* Clear wakeup state register */ 137 /* Clear wakeup state register */
151 __raw_writel(0x0, S5P_WAKEUP_STAT); 138 __raw_writel(0x0, S5P_WAKEUP_STAT);
152 139
153 do_gettimeofday(&after);
154
155 local_irq_enable();
156 idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC +
157 (after.tv_usec - before.tv_usec);
158
159 dev->last_residency = idle_time;
160 return index;
161}
162
163static int exynos4_enter_idle(struct cpuidle_device *dev,
164 struct cpuidle_driver *drv,
165 int index)
166{
167 struct timeval before, after;
168 int idle_time;
169
170 local_irq_disable();
171 do_gettimeofday(&before);
172
173 cpu_do_idle();
174
175 do_gettimeofday(&after);
176 local_irq_enable();
177 idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC +
178 (after.tv_usec - before.tv_usec);
179
180 dev->last_residency = idle_time;
181 return index; 140 return index;
182} 141}
183 142
@@ -192,7 +151,7 @@ static int exynos4_enter_lowpower(struct cpuidle_device *dev,
192 new_index = drv->safe_state_index; 151 new_index = drv->safe_state_index;
193 152
194 if (new_index == 0) 153 if (new_index == 0)
195 return exynos4_enter_idle(dev, drv, new_index); 154 return arm_cpuidle_simple_enter(dev, drv, new_index);
196 else 155 else
197 return exynos4_enter_core0_aftr(dev, drv, new_index); 156 return exynos4_enter_core0_aftr(dev, drv, new_index);
198} 157}
diff --git a/arch/arm/mach-exynos/dev-ahci.c b/arch/arm/mach-exynos/dev-ahci.c
index 50ce5b0adcf1..ce1aad3eeeb9 100644
--- a/arch/arm/mach-exynos/dev-ahci.c
+++ b/arch/arm/mach-exynos/dev-ahci.c
@@ -236,16 +236,8 @@ static struct ahci_platform_data exynos4_ahci_pdata = {
236}; 236};
237 237
238static struct resource exynos4_ahci_resource[] = { 238static struct resource exynos4_ahci_resource[] = {
239 [0] = { 239 [0] = DEFINE_RES_MEM(EXYNOS4_PA_SATA, SZ_64K),
240 .start = EXYNOS4_PA_SATA, 240 [1] = DEFINE_RES_IRQ(EXYNOS4_IRQ_SATA),
241 .end = EXYNOS4_PA_SATA + SZ_64K - 1,
242 .flags = IORESOURCE_MEM,
243 },
244 [1] = {
245 .start = EXYNOS4_IRQ_SATA,
246 .end = EXYNOS4_IRQ_SATA,
247 .flags = IORESOURCE_IRQ,
248 },
249}; 241};
250 242
251static u64 exynos4_ahci_dmamask = DMA_BIT_MASK(32); 243static u64 exynos4_ahci_dmamask = DMA_BIT_MASK(32);
diff --git a/arch/arm/mach-exynos/dev-audio.c b/arch/arm/mach-exynos/dev-audio.c
index 7199e1ae79b4..b33a5b67b547 100644
--- a/arch/arm/mach-exynos/dev-audio.c
+++ b/arch/arm/mach-exynos/dev-audio.c
@@ -62,26 +62,10 @@ static struct s3c_audio_pdata i2sv5_pdata = {
62}; 62};
63 63
64static struct resource exynos4_i2s0_resource[] = { 64static struct resource exynos4_i2s0_resource[] = {
65 [0] = { 65 [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S0, SZ_256),
66 .start = EXYNOS4_PA_I2S0, 66 [1] = DEFINE_RES_DMA(DMACH_I2S0_TX),
67 .end = EXYNOS4_PA_I2S0 + 0x100 - 1, 67 [2] = DEFINE_RES_DMA(DMACH_I2S0_RX),
68 .flags = IORESOURCE_MEM, 68 [3] = DEFINE_RES_DMA(DMACH_I2S0S_TX),
69 },
70 [1] = {
71 .start = DMACH_I2S0_TX,
72 .end = DMACH_I2S0_TX,
73 .flags = IORESOURCE_DMA,
74 },
75 [2] = {
76 .start = DMACH_I2S0_RX,
77 .end = DMACH_I2S0_RX,
78 .flags = IORESOURCE_DMA,
79 },
80 [3] = {
81 .start = DMACH_I2S0S_TX,
82 .end = DMACH_I2S0S_TX,
83 .flags = IORESOURCE_DMA,
84 },
85}; 69};
86 70
87struct platform_device exynos4_device_i2s0 = { 71struct platform_device exynos4_device_i2s0 = {
@@ -110,21 +94,9 @@ static struct s3c_audio_pdata i2sv3_pdata = {
110}; 94};
111 95
112static struct resource exynos4_i2s1_resource[] = { 96static struct resource exynos4_i2s1_resource[] = {
113 [0] = { 97 [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S1, SZ_256),
114 .start = EXYNOS4_PA_I2S1, 98 [1] = DEFINE_RES_DMA(DMACH_I2S1_TX),
115 .end = EXYNOS4_PA_I2S1 + 0x100 - 1, 99 [2] = DEFINE_RES_DMA(DMACH_I2S1_RX),
116 .flags = IORESOURCE_MEM,
117 },
118 [1] = {
119 .start = DMACH_I2S1_TX,
120 .end = DMACH_I2S1_TX,
121 .flags = IORESOURCE_DMA,
122 },
123 [2] = {
124 .start = DMACH_I2S1_RX,
125 .end = DMACH_I2S1_RX,
126 .flags = IORESOURCE_DMA,
127 },
128}; 100};
129 101
130struct platform_device exynos4_device_i2s1 = { 102struct platform_device exynos4_device_i2s1 = {
@@ -138,21 +110,9 @@ struct platform_device exynos4_device_i2s1 = {
138}; 110};
139 111
140static struct resource exynos4_i2s2_resource[] = { 112static struct resource exynos4_i2s2_resource[] = {
141 [0] = { 113 [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S2, SZ_256),
142 .start = EXYNOS4_PA_I2S2, 114 [1] = DEFINE_RES_DMA(DMACH_I2S2_TX),
143 .end = EXYNOS4_PA_I2S2 + 0x100 - 1, 115 [2] = DEFINE_RES_DMA(DMACH_I2S2_RX),
144 .flags = IORESOURCE_MEM,
145 },
146 [1] = {
147 .start = DMACH_I2S2_TX,
148 .end = DMACH_I2S2_TX,
149 .flags = IORESOURCE_DMA,
150 },
151 [2] = {
152 .start = DMACH_I2S2_RX,
153 .end = DMACH_I2S2_RX,
154 .flags = IORESOURCE_DMA,
155 },
156}; 116};
157 117
158struct platform_device exynos4_device_i2s2 = { 118struct platform_device exynos4_device_i2s2 = {
@@ -192,21 +152,9 @@ static struct s3c_audio_pdata s3c_pcm_pdata = {
192}; 152};
193 153
194static struct resource exynos4_pcm0_resource[] = { 154static struct resource exynos4_pcm0_resource[] = {
195 [0] = { 155 [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM0, SZ_256),
196 .start = EXYNOS4_PA_PCM0, 156 [1] = DEFINE_RES_DMA(DMACH_PCM0_TX),
197 .end = EXYNOS4_PA_PCM0 + 0x100 - 1, 157 [2] = DEFINE_RES_DMA(DMACH_PCM0_RX),
198 .flags = IORESOURCE_MEM,
199 },
200 [1] = {
201 .start = DMACH_PCM0_TX,
202 .end = DMACH_PCM0_TX,
203 .flags = IORESOURCE_DMA,
204 },
205 [2] = {
206 .start = DMACH_PCM0_RX,
207 .end = DMACH_PCM0_RX,
208 .flags = IORESOURCE_DMA,
209 },
210}; 158};
211 159
212struct platform_device exynos4_device_pcm0 = { 160struct platform_device exynos4_device_pcm0 = {
@@ -220,21 +168,9 @@ struct platform_device exynos4_device_pcm0 = {
220}; 168};
221 169
222static struct resource exynos4_pcm1_resource[] = { 170static struct resource exynos4_pcm1_resource[] = {
223 [0] = { 171 [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM1, SZ_256),
224 .start = EXYNOS4_PA_PCM1, 172 [1] = DEFINE_RES_DMA(DMACH_PCM1_TX),
225 .end = EXYNOS4_PA_PCM1 + 0x100 - 1, 173 [2] = DEFINE_RES_DMA(DMACH_PCM1_RX),
226 .flags = IORESOURCE_MEM,
227 },
228 [1] = {
229 .start = DMACH_PCM1_TX,
230 .end = DMACH_PCM1_TX,
231 .flags = IORESOURCE_DMA,
232 },
233 [2] = {
234 .start = DMACH_PCM1_RX,
235 .end = DMACH_PCM1_RX,
236 .flags = IORESOURCE_DMA,
237 },
238}; 174};
239 175
240struct platform_device exynos4_device_pcm1 = { 176struct platform_device exynos4_device_pcm1 = {
@@ -248,21 +184,9 @@ struct platform_device exynos4_device_pcm1 = {
248}; 184};
249 185
250static struct resource exynos4_pcm2_resource[] = { 186static struct resource exynos4_pcm2_resource[] = {
251 [0] = { 187 [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM2, SZ_256),
252 .start = EXYNOS4_PA_PCM2, 188 [1] = DEFINE_RES_DMA(DMACH_PCM2_TX),
253 .end = EXYNOS4_PA_PCM2 + 0x100 - 1, 189 [2] = DEFINE_RES_DMA(DMACH_PCM2_RX),
254 .flags = IORESOURCE_MEM,
255 },
256 [1] = {
257 .start = DMACH_PCM2_TX,
258 .end = DMACH_PCM2_TX,
259 .flags = IORESOURCE_DMA,
260 },
261 [2] = {
262 .start = DMACH_PCM2_RX,
263 .end = DMACH_PCM2_RX,
264 .flags = IORESOURCE_DMA,
265 },
266}; 190};
267 191
268struct platform_device exynos4_device_pcm2 = { 192struct platform_device exynos4_device_pcm2 = {
@@ -283,31 +207,11 @@ static int exynos4_ac97_cfg_gpio(struct platform_device *pdev)
283} 207}
284 208
285static struct resource exynos4_ac97_resource[] = { 209static struct resource exynos4_ac97_resource[] = {
286 [0] = { 210 [0] = DEFINE_RES_MEM(EXYNOS4_PA_AC97, SZ_256),
287 .start = EXYNOS4_PA_AC97, 211 [1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT),
288 .end = EXYNOS4_PA_AC97 + 0x100 - 1, 212 [2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN),
289 .flags = IORESOURCE_MEM, 213 [3] = DEFINE_RES_DMA(DMACH_AC97_MICIN),
290 }, 214 [4] = DEFINE_RES_IRQ(EXYNOS4_IRQ_AC97),
291 [1] = {
292 .start = DMACH_AC97_PCMOUT,
293 .end = DMACH_AC97_PCMOUT,
294 .flags = IORESOURCE_DMA,
295 },
296 [2] = {
297 .start = DMACH_AC97_PCMIN,
298 .end = DMACH_AC97_PCMIN,
299 .flags = IORESOURCE_DMA,
300 },
301 [3] = {
302 .start = DMACH_AC97_MICIN,
303 .end = DMACH_AC97_MICIN,
304 .flags = IORESOURCE_DMA,
305 },
306 [4] = {
307 .start = EXYNOS4_IRQ_AC97,
308 .end = EXYNOS4_IRQ_AC97,
309 .flags = IORESOURCE_IRQ,
310 },
311}; 215};
312 216
313static struct s3c_audio_pdata s3c_ac97_pdata = { 217static struct s3c_audio_pdata s3c_ac97_pdata = {
@@ -338,16 +242,8 @@ static int exynos4_spdif_cfg_gpio(struct platform_device *pdev)
338} 242}
339 243
340static struct resource exynos4_spdif_resource[] = { 244static struct resource exynos4_spdif_resource[] = {
341 [0] = { 245 [0] = DEFINE_RES_MEM(EXYNOS4_PA_SPDIF, SZ_256),
342 .start = EXYNOS4_PA_SPDIF, 246 [1] = DEFINE_RES_DMA(DMACH_SPDIF),
343 .end = EXYNOS4_PA_SPDIF + 0x100 - 1,
344 .flags = IORESOURCE_MEM,
345 },
346 [1] = {
347 .start = DMACH_SPDIF,
348 .end = DMACH_SPDIF,
349 .flags = IORESOURCE_DMA,
350 },
351}; 247};
352 248
353static struct s3c_audio_pdata samsung_spdif_pdata = { 249static struct s3c_audio_pdata samsung_spdif_pdata = {
diff --git a/arch/arm/mach-exynos/mach-armlex4210.c b/arch/arm/mach-exynos/mach-armlex4210.c
index d726fcd3acf9..fed7116418eb 100644
--- a/arch/arm/mach-exynos/mach-armlex4210.c
+++ b/arch/arm/mach-exynos/mach-armlex4210.c
@@ -77,7 +77,6 @@ static struct s3c2410_uartcfg armlex4210_uartcfgs[] __initdata = {
77 77
78static struct s3c_sdhci_platdata armlex4210_hsmmc0_pdata __initdata = { 78static struct s3c_sdhci_platdata armlex4210_hsmmc0_pdata __initdata = {
79 .cd_type = S3C_SDHCI_CD_PERMANENT, 79 .cd_type = S3C_SDHCI_CD_PERMANENT,
80 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
81#ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT 80#ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT
82 .max_width = 8, 81 .max_width = 8,
83 .host_caps = MMC_CAP_8_BIT_DATA, 82 .host_caps = MMC_CAP_8_BIT_DATA,
@@ -88,13 +87,11 @@ static struct s3c_sdhci_platdata armlex4210_hsmmc2_pdata __initdata = {
88 .cd_type = S3C_SDHCI_CD_GPIO, 87 .cd_type = S3C_SDHCI_CD_GPIO,
89 .ext_cd_gpio = EXYNOS4_GPX2(5), 88 .ext_cd_gpio = EXYNOS4_GPX2(5),
90 .ext_cd_gpio_invert = 1, 89 .ext_cd_gpio_invert = 1,
91 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
92 .max_width = 4, 90 .max_width = 4,
93}; 91};
94 92
95static struct s3c_sdhci_platdata armlex4210_hsmmc3_pdata __initdata = { 93static struct s3c_sdhci_platdata armlex4210_hsmmc3_pdata __initdata = {
96 .cd_type = S3C_SDHCI_CD_PERMANENT, 94 .cd_type = S3C_SDHCI_CD_PERMANENT,
97 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
98 .max_width = 4, 95 .max_width = 4,
99}; 96};
100 97
@@ -121,16 +118,9 @@ static void __init armlex4210_wlan_init(void)
121} 118}
122 119
123static struct resource armlex4210_smsc911x_resources[] = { 120static struct resource armlex4210_smsc911x_resources[] = {
124 [0] = { 121 [0] = DEFINE_RES_MEM(EXYNOS4_PA_SROM_BANK(3), SZ_64K),
125 .start = EXYNOS4_PA_SROM_BANK(3), 122 [1] = DEFINE_RES_NAMED(IRQ_EINT(27), 1, NULL, IORESOURCE_IRQ \
126 .end = EXYNOS4_PA_SROM_BANK(3) + SZ_64K - 1, 123 | IRQF_TRIGGER_HIGH),
127 .flags = IORESOURCE_MEM,
128 },
129 [1] = {
130 .start = IRQ_EINT(27),
131 .end = IRQ_EINT(27),
132 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH,
133 },
134}; 124};
135 125
136static struct smsc911x_platform_config smsc9215_config = { 126static struct smsc911x_platform_config smsc9215_config = {
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index ed90aef404c3..021dc68e89b5 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -114,7 +114,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc0_data __initdata = {
114 MMC_CAP_ERASE), 114 MMC_CAP_ERASE),
115 .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE, 115 .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE,
116 .cd_type = S3C_SDHCI_CD_PERMANENT, 116 .cd_type = S3C_SDHCI_CD_PERMANENT,
117 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
118}; 117};
119 118
120static struct regulator_consumer_supply emmc_supplies[] = { 119static struct regulator_consumer_supply emmc_supplies[] = {
@@ -155,7 +154,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc2_data __initdata = {
155 .ext_cd_gpio = EXYNOS4_GPX3(3), /* XEINT_27 */ 154 .ext_cd_gpio = EXYNOS4_GPX3(3), /* XEINT_27 */
156 .ext_cd_gpio_invert = 1, 155 .ext_cd_gpio_invert = 1,
157 .cd_type = S3C_SDHCI_CD_GPIO, 156 .cd_type = S3C_SDHCI_CD_GPIO,
158 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
159}; 157};
160 158
161/* WLAN */ 159/* WLAN */
@@ -164,7 +162,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc3_data __initdata = {
164 .host_caps = MMC_CAP_4_BIT_DATA | 162 .host_caps = MMC_CAP_4_BIT_DATA |
165 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED, 163 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
166 .cd_type = S3C_SDHCI_CD_EXTERNAL, 164 .cd_type = S3C_SDHCI_CD_EXTERNAL,
167 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
168}; 165};
169 166
170static void __init nuri_sdhci_init(void) 167static void __init nuri_sdhci_init(void)
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index 878d4c99142d..827cb990c316 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -472,12 +472,10 @@ static struct i2c_board_info i2c0_devs[] __initdata = {
472 472
473static struct s3c_sdhci_platdata origen_hsmmc0_pdata __initdata = { 473static struct s3c_sdhci_platdata origen_hsmmc0_pdata __initdata = {
474 .cd_type = S3C_SDHCI_CD_INTERNAL, 474 .cd_type = S3C_SDHCI_CD_INTERNAL,
475 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
476}; 475};
477 476
478static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = { 477static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = {
479 .cd_type = S3C_SDHCI_CD_INTERNAL, 478 .cd_type = S3C_SDHCI_CD_INTERNAL,
480 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
481}; 479};
482 480
483/* USB EHCI */ 481/* USB EHCI */
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c
index d00e4f016a68..4be083acf994 100644
--- a/arch/arm/mach-exynos/mach-smdk4x12.c
+++ b/arch/arm/mach-exynos/mach-smdk4x12.c
@@ -85,7 +85,6 @@ static struct s3c2410_uartcfg smdk4x12_uartcfgs[] __initdata = {
85 85
86static struct s3c_sdhci_platdata smdk4x12_hsmmc2_pdata __initdata = { 86static struct s3c_sdhci_platdata smdk4x12_hsmmc2_pdata __initdata = {
87 .cd_type = S3C_SDHCI_CD_INTERNAL, 87 .cd_type = S3C_SDHCI_CD_INTERNAL,
88 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
89#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT 88#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
90 .max_width = 8, 89 .max_width = 8,
91 .host_caps = MMC_CAP_8_BIT_DATA, 90 .host_caps = MMC_CAP_8_BIT_DATA,
@@ -94,7 +93,6 @@ static struct s3c_sdhci_platdata smdk4x12_hsmmc2_pdata __initdata = {
94 93
95static struct s3c_sdhci_platdata smdk4x12_hsmmc3_pdata __initdata = { 94static struct s3c_sdhci_platdata smdk4x12_hsmmc3_pdata __initdata = {
96 .cd_type = S3C_SDHCI_CD_INTERNAL, 95 .cd_type = S3C_SDHCI_CD_INTERNAL,
97 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
98}; 96};
99 97
100static struct regulator_consumer_supply max8997_buck1 = 98static struct regulator_consumer_supply max8997_buck1 =
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
index 83b91fa777c1..ea39f614f2db 100644
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ b/arch/arm/mach-exynos/mach-smdkv310.c
@@ -93,7 +93,6 @@ static struct s3c2410_uartcfg smdkv310_uartcfgs[] __initdata = {
93 93
94static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = { 94static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = {
95 .cd_type = S3C_SDHCI_CD_INTERNAL, 95 .cd_type = S3C_SDHCI_CD_INTERNAL,
96 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
97#ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT 96#ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT
98 .max_width = 8, 97 .max_width = 8,
99 .host_caps = MMC_CAP_8_BIT_DATA, 98 .host_caps = MMC_CAP_8_BIT_DATA,
@@ -104,12 +103,10 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata __initdata = {
104 .cd_type = S3C_SDHCI_CD_GPIO, 103 .cd_type = S3C_SDHCI_CD_GPIO,
105 .ext_cd_gpio = EXYNOS4_GPK0(2), 104 .ext_cd_gpio = EXYNOS4_GPK0(2),
106 .ext_cd_gpio_invert = 1, 105 .ext_cd_gpio_invert = 1,
107 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
108}; 106};
109 107
110static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = { 108static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = {
111 .cd_type = S3C_SDHCI_CD_INTERNAL, 109 .cd_type = S3C_SDHCI_CD_INTERNAL,
112 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
113#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT 110#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
114 .max_width = 8, 111 .max_width = 8,
115 .host_caps = MMC_CAP_8_BIT_DATA, 112 .host_caps = MMC_CAP_8_BIT_DATA,
@@ -120,7 +117,6 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc3_pdata __initdata = {
120 .cd_type = S3C_SDHCI_CD_GPIO, 117 .cd_type = S3C_SDHCI_CD_GPIO,
121 .ext_cd_gpio = EXYNOS4_GPK2(2), 118 .ext_cd_gpio = EXYNOS4_GPK2(2),
122 .ext_cd_gpio_invert = 1, 119 .ext_cd_gpio_invert = 1,
123 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
124}; 120};
125 121
126static void lcd_lte480wv_set_power(struct plat_lcd_data *pd, 122static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,
@@ -183,16 +179,9 @@ static struct s3c_fb_platdata smdkv310_lcd0_pdata __initdata = {
183}; 179};
184 180
185static struct resource smdkv310_smsc911x_resources[] = { 181static struct resource smdkv310_smsc911x_resources[] = {
186 [0] = { 182 [0] = DEFINE_RES_MEM(EXYNOS4_PA_SROM_BANK(1), SZ_64K),
187 .start = EXYNOS4_PA_SROM_BANK(1), 183 [1] = DEFINE_RES_NAMED(IRQ_EINT(5), 1, NULL, IORESOURCE_IRQ \
188 .end = EXYNOS4_PA_SROM_BANK(1) + SZ_64K - 1, 184 | IRQF_TRIGGER_LOW),
189 .flags = IORESOURCE_MEM,
190 },
191 [1] = {
192 .start = IRQ_EINT(5),
193 .end = IRQ_EINT(5),
194 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
195 },
196}; 185};
197 186
198static struct smsc911x_platform_config smsc9215_config = { 187static struct smsc911x_platform_config smsc9215_config = {
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index a34036eb8ba2..57d524e03d63 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -750,7 +750,6 @@ static struct s3c_sdhci_platdata universal_hsmmc0_data __initdata = {
750 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), 750 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED),
751 .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE, 751 .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE,
752 .cd_type = S3C_SDHCI_CD_PERMANENT, 752 .cd_type = S3C_SDHCI_CD_PERMANENT,
753 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
754}; 753};
755 754
756static struct regulator_consumer_supply mmc0_supplies[] = { 755static struct regulator_consumer_supply mmc0_supplies[] = {
@@ -790,7 +789,6 @@ static struct s3c_sdhci_platdata universal_hsmmc2_data __initdata = {
790 .ext_cd_gpio = EXYNOS4_GPX3(4), /* XEINT_28 */ 789 .ext_cd_gpio = EXYNOS4_GPX3(4), /* XEINT_28 */
791 .ext_cd_gpio_invert = 1, 790 .ext_cd_gpio_invert = 1,
792 .cd_type = S3C_SDHCI_CD_GPIO, 791 .cd_type = S3C_SDHCI_CD_GPIO,
793 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
794}; 792};
795 793
796/* WiFi */ 794/* WiFi */
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 7561eca131b0..f72d399ff3d6 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -571,8 +571,10 @@ config MACH_MX35_3DS
571 select MXC_DEBUG_BOARD 571 select MXC_DEBUG_BOARD
572 select IMX_HAVE_PLATFORM_FSL_USB2_UDC 572 select IMX_HAVE_PLATFORM_FSL_USB2_UDC
573 select IMX_HAVE_PLATFORM_IMX2_WDT 573 select IMX_HAVE_PLATFORM_IMX2_WDT
574 select IMX_HAVE_PLATFORM_IMX_FB
574 select IMX_HAVE_PLATFORM_IMX_I2C 575 select IMX_HAVE_PLATFORM_IMX_I2C
575 select IMX_HAVE_PLATFORM_IMX_UART 576 select IMX_HAVE_PLATFORM_IMX_UART
577 select IMX_HAVE_PLATFORM_IPU_CORE
576 select IMX_HAVE_PLATFORM_MXC_EHCI 578 select IMX_HAVE_PLATFORM_MXC_EHCI
577 select IMX_HAVE_PLATFORM_MXC_NAND 579 select IMX_HAVE_PLATFORM_MXC_NAND
578 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX 580 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
index 5f2f91d1798b..b46cab0ced53 100644
--- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
@@ -243,7 +243,7 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
243static void __maybe_unused ads7846_dev_init(void) 243static void __maybe_unused ads7846_dev_init(void)
244{ 244{
245 if (gpio_request(ADS7846_PENDOWN, "ADS7846 pendown") < 0) { 245 if (gpio_request(ADS7846_PENDOWN, "ADS7846 pendown") < 0) {
246 printk(KERN_ERR "can't get ads746 pen down GPIO\n"); 246 printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
247 return; 247 return;
248 } 248 }
249 gpio_direction_input(ADS7846_PENDOWN); 249 gpio_direction_input(ADS7846_PENDOWN);
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c
index 8ecc872b2547..c515f8ede1a1 100644
--- a/arch/arm/mach-imx/mach-cpuimx35.c
+++ b/arch/arm/mach-imx/mach-cpuimx35.c
@@ -194,7 +194,7 @@ static void __init eukrea_cpuimx35_timer_init(void)
194 mx35_clocks_init(); 194 mx35_clocks_init();
195} 195}
196 196
197struct sys_timer eukrea_cpuimx35_timer = { 197static struct sys_timer eukrea_cpuimx35_timer = {
198 .init = eukrea_cpuimx35_timer_init, 198 .init = eukrea_cpuimx35_timer_init,
199}; 199};
200 200
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c
index 97046088ff1a..7274e7928136 100644
--- a/arch/arm/mach-imx/mach-mx1ads.c
+++ b/arch/arm/mach-imx/mach-mx1ads.c
@@ -134,7 +134,7 @@ static void __init mx1ads_timer_init(void)
134 mx1_clocks_init(32000); 134 mx1_clocks_init(32000);
135} 135}
136 136
137struct sys_timer mx1ads_timer = { 137static struct sys_timer mx1ads_timer = {
138 .init = mx1ads_timer_init, 138 .init = mx1ads_timer_init,
139}; 139};
140 140
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c
index e432d4acee1f..d14bbe949a4f 100644
--- a/arch/arm/mach-imx/mach-mx21ads.c
+++ b/arch/arm/mach-imx/mach-mx21ads.c
@@ -304,8 +304,7 @@ static void __init mx21ads_board_init(void)
304 imx21_add_mxc_nand(&mx21ads_nand_board_info); 304 imx21_add_mxc_nand(&mx21ads_nand_board_info);
305 305
306 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 306 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
307 platform_device_register_full( 307 platform_device_register_full(&mx21ads_cs8900_devinfo);
308 (struct platform_device_info *)&mx21ads_cs8900_devinfo);
309} 308}
310 309
311static void __init mx21ads_timer_init(void) 310static void __init mx21ads_timer_init(void)
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c
index 0abef5f13df5..686c60587980 100644
--- a/arch/arm/mach-imx/mach-mx31lite.c
+++ b/arch/arm/mach-imx/mach-mx31lite.c
@@ -283,7 +283,7 @@ static void __init mx31lite_timer_init(void)
283 mx31_clocks_init(26000000); 283 mx31_clocks_init(26000000);
284} 284}
285 285
286struct sys_timer mx31lite_timer = { 286static struct sys_timer mx31lite_timer = {
287 .init = mx31lite_timer_init, 287 .init = mx31lite_timer_init,
288}; 288};
289 289
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index f17a15f28316..1dfe3c7a7be1 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -580,7 +580,7 @@ static void __init mx31moboard_timer_init(void)
580 mx31_clocks_init(26000000); 580 mx31_clocks_init(26000000);
581} 581}
582 582
583struct sys_timer mx31moboard_timer = { 583static struct sys_timer mx31moboard_timer = {
584 .init = mx31moboard_timer_init, 584 .init = mx31moboard_timer_init,
585}; 585};
586 586
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
index 6ae51c6b95b7..c433187988a2 100644
--- a/arch/arm/mach-imx/mach-mx35_3ds.c
+++ b/arch/arm/mach-imx/mach-mx35_3ds.c
@@ -419,7 +419,7 @@ static void __init mx35pdk_timer_init(void)
419 mx35_clocks_init(); 419 mx35_clocks_init();
420} 420}
421 421
422struct sys_timer mx35pdk_timer = { 422static struct sys_timer mx35pdk_timer = {
423 .init = mx35pdk_timer_init, 423 .init = mx35pdk_timer_init,
424}; 424};
425 425
diff --git a/arch/arm/mach-imx/mach-mx51_efikamx.c b/arch/arm/mach-imx/mach-mx51_efikamx.c
index 586e9f822124..86e96ef11f9d 100644
--- a/arch/arm/mach-imx/mach-mx51_efikamx.c
+++ b/arch/arm/mach-imx/mach-mx51_efikamx.c
@@ -284,8 +284,7 @@ static struct sys_timer mx51_efikamx_timer = {
284 .init = mx51_efikamx_timer_init, 284 .init = mx51_efikamx_timer_init,
285}; 285};
286 286
287MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop") 287MACHINE_START(MX51_EFIKAMX, "Genesi Efika MX (Smarttop)")
288 /* Maintainer: Amit Kucheria <amit.kucheria@linaro.org> */
289 .atag_offset = 0x100, 288 .atag_offset = 0x100,
290 .map_io = mx51_map_io, 289 .map_io = mx51_map_io,
291 .init_early = imx51_init_early, 290 .init_early = imx51_init_early,
diff --git a/arch/arm/mach-imx/mach-mx51_efikasb.c b/arch/arm/mach-imx/mach-mx51_efikasb.c
index 24aded9e109f..88f837a6cc76 100644
--- a/arch/arm/mach-imx/mach-mx51_efikasb.c
+++ b/arch/arm/mach-imx/mach-mx51_efikasb.c
@@ -280,7 +280,7 @@ static struct sys_timer mx51_efikasb_timer = {
280 .init = mx51_efikasb_timer_init, 280 .init = mx51_efikasb_timer_init,
281}; 281};
282 282
283MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook") 283MACHINE_START(MX51_EFIKASB, "Genesi Efika MX (Smartbook)")
284 .atag_offset = 0x100, 284 .atag_offset = 0x100,
285 .map_io = mx51_map_io, 285 .map_io = mx51_map_io,
286 .init_early = imx51_init_early, 286 .init_early = imx51_init_early,
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c
index 5fddf94cc969..10c9795934a3 100644
--- a/arch/arm/mach-imx/mach-pcm037.c
+++ b/arch/arm/mach-imx/mach-pcm037.c
@@ -683,7 +683,7 @@ static void __init pcm037_timer_init(void)
683 mx31_clocks_init(26000000); 683 mx31_clocks_init(26000000);
684} 684}
685 685
686struct sys_timer pcm037_timer = { 686static struct sys_timer pcm037_timer = {
687 .init = pcm037_timer_init, 687 .init = pcm037_timer_init,
688}; 688};
689 689
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c
index 237474fcca23..73585f55cca0 100644
--- a/arch/arm/mach-imx/mach-pcm043.c
+++ b/arch/arm/mach-imx/mach-pcm043.c
@@ -399,7 +399,7 @@ static void __init pcm043_timer_init(void)
399 mx35_clocks_init(); 399 mx35_clocks_init();
400} 400}
401 401
402struct sys_timer pcm043_timer = { 402static struct sys_timer pcm043_timer = {
403 .init = pcm043_timer_init, 403 .init = pcm043_timer_init,
404}; 404};
405 405
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c
index 033257e553ef..add8c69c6c1a 100644
--- a/arch/arm/mach-imx/mach-vpr200.c
+++ b/arch/arm/mach-imx/mach-vpr200.c
@@ -310,7 +310,7 @@ static void __init vpr200_timer_init(void)
310 mx35_clocks_init(); 310 mx35_clocks_init();
311} 311}
312 312
313struct sys_timer vpr200_timer = { 313static struct sys_timer vpr200_timer = {
314 .init = vpr200_timer_init, 314 .init = vpr200_timer_init,
315}; 315};
316 316
diff --git a/arch/arm/mach-ixp2000/Kconfig b/arch/arm/mach-ixp2000/Kconfig
deleted file mode 100644
index 08d2707f6ca8..000000000000
--- a/arch/arm/mach-ixp2000/Kconfig
+++ /dev/null
@@ -1,72 +0,0 @@
1
2if ARCH_IXP2000
3
4config ARCH_SUPPORTS_BIG_ENDIAN
5 bool
6 default y
7
8menu "Intel IXP2400/2800 Implementation Options"
9
10comment "IXP2400/2800 Platforms"
11
12config ARCH_ENP2611
13 bool "Support Radisys ENP-2611"
14 help
15 Say 'Y' here if you want your kernel to support the Radisys
16 ENP2611 PCI network processing card. For more information on
17 this card, see <file:Documentation/arm/IXP2000>.
18
19config ARCH_IXDP2400
20 bool "Support Intel IXDP2400"
21 help
22 Say 'Y' here if you want your kernel to support the Intel
23 IXDP2400 reference platform. For more information on
24 this platform, see <file:Documentation/arm/IXP2000>.
25
26config ARCH_IXDP2800
27 bool "Support Intel IXDP2800"
28 help
29 Say 'Y' here if you want your kernel to support the Intel
30 IXDP2800 reference platform. For more information on
31 this platform, see <file:Documentation/arm/IXP2000>.
32
33config ARCH_IXDP2X00
34 bool
35 depends on ARCH_IXDP2400 || ARCH_IXDP2800
36 default y
37
38config ARCH_IXDP2401
39 bool "Support Intel IXDP2401"
40 help
41 Say 'Y' here if you want your kernel to support the Intel
42 IXDP2401 reference platform. For more information on
43 this platform, see <file:Documentation/arm/IXP2000>.
44
45config ARCH_IXDP2801
46 bool "Support Intel IXDP2801 and IXDP28x5"
47 help
48 Say 'Y' here if you want your kernel to support the Intel
49 IXDP2801/2805/2855 reference platforms. For more information on
50 this platform, see <file:Documentation/arm/IXP2000>.
51
52config MACH_IXDP28X5
53 bool
54 depends on ARCH_IXDP2801
55 default y
56
57config ARCH_IXDP2X01
58 bool
59 depends on ARCH_IXDP2401 || ARCH_IXDP2801
60 default y
61
62config IXP2000_SUPPORT_BROKEN_PCI_IO
63 bool "Support broken PCI I/O on older IXP2000s"
64 default y
65 help
66 Say 'N' here if you only intend to run your kernel on an
67 IXP2000 B0 or later model and do not need the PCI I/O
68 byteswap workaround. Say 'Y' otherwise.
69
70endmenu
71
72endif
diff --git a/arch/arm/mach-ixp2000/Makefile b/arch/arm/mach-ixp2000/Makefile
deleted file mode 100644
index 1e6139d42a92..000000000000
--- a/arch/arm/mach-ixp2000/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
1#
2# Makefile for the linux kernel.
3#
4obj-y := core.o pci.o
5obj-m :=
6obj-n :=
7obj- :=
8
9obj-$(CONFIG_ARCH_ENP2611) += enp2611.o
10obj-$(CONFIG_ARCH_IXDP2400) += ixdp2400.o
11obj-$(CONFIG_ARCH_IXDP2800) += ixdp2800.o
12obj-$(CONFIG_ARCH_IXDP2X00) += ixdp2x00.o
13obj-$(CONFIG_ARCH_IXDP2X01) += ixdp2x01.o
14
diff --git a/arch/arm/mach-ixp2000/Makefile.boot b/arch/arm/mach-ixp2000/Makefile.boot
deleted file mode 100644
index 9c7af91d93da..000000000000
--- a/arch/arm/mach-ixp2000/Makefile.boot
+++ /dev/null
@@ -1,3 +0,0 @@
1 zreladdr-y += 0x00008000
2params_phys-y := 0x00000100
3
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c
deleted file mode 100644
index f214cdff01cb..000000000000
--- a/arch/arm/mach-ixp2000/core.c
+++ /dev/null
@@ -1,520 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/core.c
3 *
4 * Common routines used by all IXP2400/2800 based platforms.
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2004 (C) MontaVista Software, Inc.
9 *
10 * Based on work Copyright (C) 2002-2003 Intel Corporation
11 *
12 * This file is licensed under the terms of the GNU General Public
13 * License version 2. This program is licensed "as is" without any
14 * warranty of any kind, whether express or implied.
15 */
16#include <linux/gpio.h>
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/spinlock.h>
20#include <linux/sched.h>
21#include <linux/interrupt.h>
22#include <linux/irq.h>
23#include <linux/serial.h>
24#include <linux/tty.h>
25#include <linux/bitops.h>
26#include <linux/serial_8250.h>
27#include <linux/mm.h>
28#include <linux/export.h>
29
30#include <asm/types.h>
31#include <asm/setup.h>
32#include <asm/memory.h>
33#include <mach/hardware.h>
34#include <asm/irq.h>
35#include <asm/tlbflush.h>
36#include <asm/pgtable.h>
37
38#include <asm/mach/map.h>
39#include <asm/mach/time.h>
40#include <asm/mach/irq.h>
41
42#include <mach/gpio-ixp2000.h>
43
44static DEFINE_SPINLOCK(ixp2000_slowport_lock);
45static unsigned long ixp2000_slowport_irq_flags;
46
47/*************************************************************************
48 * Slowport access routines
49 *************************************************************************/
50void ixp2000_acquire_slowport(struct slowport_cfg *new_cfg, struct slowport_cfg *old_cfg)
51{
52 spin_lock_irqsave(&ixp2000_slowport_lock, ixp2000_slowport_irq_flags);
53
54 old_cfg->CCR = *IXP2000_SLOWPORT_CCR;
55 old_cfg->WTC = *IXP2000_SLOWPORT_WTC2;
56 old_cfg->RTC = *IXP2000_SLOWPORT_RTC2;
57 old_cfg->PCR = *IXP2000_SLOWPORT_PCR;
58 old_cfg->ADC = *IXP2000_SLOWPORT_ADC;
59
60 ixp2000_reg_write(IXP2000_SLOWPORT_CCR, new_cfg->CCR);
61 ixp2000_reg_write(IXP2000_SLOWPORT_WTC2, new_cfg->WTC);
62 ixp2000_reg_write(IXP2000_SLOWPORT_RTC2, new_cfg->RTC);
63 ixp2000_reg_write(IXP2000_SLOWPORT_PCR, new_cfg->PCR);
64 ixp2000_reg_wrb(IXP2000_SLOWPORT_ADC, new_cfg->ADC);
65}
66
67void ixp2000_release_slowport(struct slowport_cfg *old_cfg)
68{
69 ixp2000_reg_write(IXP2000_SLOWPORT_CCR, old_cfg->CCR);
70 ixp2000_reg_write(IXP2000_SLOWPORT_WTC2, old_cfg->WTC);
71 ixp2000_reg_write(IXP2000_SLOWPORT_RTC2, old_cfg->RTC);
72 ixp2000_reg_write(IXP2000_SLOWPORT_PCR, old_cfg->PCR);
73 ixp2000_reg_wrb(IXP2000_SLOWPORT_ADC, old_cfg->ADC);
74
75 spin_unlock_irqrestore(&ixp2000_slowport_lock,
76 ixp2000_slowport_irq_flags);
77}
78
79/*************************************************************************
80 * Chip specific mappings shared by all IXP2000 systems
81 *************************************************************************/
82static struct map_desc ixp2000_io_desc[] __initdata = {
83 {
84 .virtual = IXP2000_CAP_VIRT_BASE,
85 .pfn = __phys_to_pfn(IXP2000_CAP_PHYS_BASE),
86 .length = IXP2000_CAP_SIZE,
87 .type = MT_DEVICE,
88 }, {
89 .virtual = IXP2000_INTCTL_VIRT_BASE,
90 .pfn = __phys_to_pfn(IXP2000_INTCTL_PHYS_BASE),
91 .length = IXP2000_INTCTL_SIZE,
92 .type = MT_DEVICE,
93 }, {
94 .virtual = IXP2000_PCI_CREG_VIRT_BASE,
95 .pfn = __phys_to_pfn(IXP2000_PCI_CREG_PHYS_BASE),
96 .length = IXP2000_PCI_CREG_SIZE,
97 .type = MT_DEVICE,
98 }, {
99 .virtual = IXP2000_PCI_CSR_VIRT_BASE,
100 .pfn = __phys_to_pfn(IXP2000_PCI_CSR_PHYS_BASE),
101 .length = IXP2000_PCI_CSR_SIZE,
102 .type = MT_DEVICE,
103 }, {
104 .virtual = IXP2000_MSF_VIRT_BASE,
105 .pfn = __phys_to_pfn(IXP2000_MSF_PHYS_BASE),
106 .length = IXP2000_MSF_SIZE,
107 .type = MT_DEVICE,
108 }, {
109 .virtual = IXP2000_SCRATCH_RING_VIRT_BASE,
110 .pfn = __phys_to_pfn(IXP2000_SCRATCH_RING_PHYS_BASE),
111 .length = IXP2000_SCRATCH_RING_SIZE,
112 .type = MT_DEVICE,
113 }, {
114 .virtual = IXP2000_SRAM0_VIRT_BASE,
115 .pfn = __phys_to_pfn(IXP2000_SRAM0_PHYS_BASE),
116 .length = IXP2000_SRAM0_SIZE,
117 .type = MT_DEVICE,
118 }, {
119 .virtual = IXP2000_PCI_IO_VIRT_BASE,
120 .pfn = __phys_to_pfn(IXP2000_PCI_IO_PHYS_BASE),
121 .length = IXP2000_PCI_IO_SIZE,
122 .type = MT_DEVICE,
123 }, {
124 .virtual = IXP2000_PCI_CFG0_VIRT_BASE,
125 .pfn = __phys_to_pfn(IXP2000_PCI_CFG0_PHYS_BASE),
126 .length = IXP2000_PCI_CFG0_SIZE,
127 .type = MT_DEVICE,
128 }, {
129 .virtual = IXP2000_PCI_CFG1_VIRT_BASE,
130 .pfn = __phys_to_pfn(IXP2000_PCI_CFG1_PHYS_BASE),
131 .length = IXP2000_PCI_CFG1_SIZE,
132 .type = MT_DEVICE,
133 }
134};
135
136void __init ixp2000_map_io(void)
137{
138 iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc));
139
140 /* Set slowport to 8-bit mode. */
141 ixp2000_reg_wrb(IXP2000_SLOWPORT_FRM, 1);
142}
143
144
145/*************************************************************************
146 * Serial port support for IXP2000
147 *************************************************************************/
148static struct plat_serial8250_port ixp2000_serial_port[] = {
149 {
150 .mapbase = IXP2000_UART_PHYS_BASE,
151 .membase = (char *)(IXP2000_UART_VIRT_BASE + 3),
152 .irq = IRQ_IXP2000_UART,
153 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
154 .iotype = UPIO_MEM,
155 .regshift = 2,
156 .uartclk = 50000000,
157 },
158 { },
159};
160
161static struct resource ixp2000_uart_resource = {
162 .start = IXP2000_UART_PHYS_BASE,
163 .end = IXP2000_UART_PHYS_BASE + 0x1f,
164 .flags = IORESOURCE_MEM,
165};
166
167static struct platform_device ixp2000_serial_device = {
168 .name = "serial8250",
169 .id = PLAT8250_DEV_PLATFORM,
170 .dev = {
171 .platform_data = ixp2000_serial_port,
172 },
173 .num_resources = 1,
174 .resource = &ixp2000_uart_resource,
175};
176
177void __init ixp2000_uart_init(void)
178{
179 platform_device_register(&ixp2000_serial_device);
180}
181
182
183/*************************************************************************
184 * Timer-tick functions for IXP2000
185 *************************************************************************/
186static unsigned ticks_per_jiffy;
187static unsigned ticks_per_usec;
188static unsigned next_jiffy_time;
189static volatile unsigned long *missing_jiffy_timer_csr;
190
191unsigned long ixp2000_gettimeoffset (void)
192{
193 unsigned long offset;
194
195 offset = next_jiffy_time - *missing_jiffy_timer_csr;
196
197 return offset / ticks_per_usec;
198}
199
200static irqreturn_t ixp2000_timer_interrupt(int irq, void *dev_id)
201{
202 /* clear timer 1 */
203 ixp2000_reg_wrb(IXP2000_T1_CLR, 1);
204
205 while ((signed long)(next_jiffy_time - *missing_jiffy_timer_csr)
206 >= ticks_per_jiffy) {
207 timer_tick();
208 next_jiffy_time -= ticks_per_jiffy;
209 }
210
211 return IRQ_HANDLED;
212}
213
214static struct irqaction ixp2000_timer_irq = {
215 .name = "IXP2000 Timer Tick",
216 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
217 .handler = ixp2000_timer_interrupt,
218};
219
220void __init ixp2000_init_time(unsigned long tick_rate)
221{
222 ticks_per_jiffy = (tick_rate + HZ/2) / HZ;
223 ticks_per_usec = tick_rate / 1000000;
224
225 /*
226 * We use timer 1 as our timer interrupt.
227 */
228 ixp2000_reg_write(IXP2000_T1_CLR, 0);
229 ixp2000_reg_write(IXP2000_T1_CLD, ticks_per_jiffy - 1);
230 ixp2000_reg_write(IXP2000_T1_CTL, (1 << 7));
231
232 /*
233 * We use a second timer as a monotonic counter for tracking
234 * missed jiffies. The IXP2000 has four timers, but if we're
235 * on an A-step IXP2800, timer 2 and 3 don't work, so on those
236 * chips we use timer 4. Timer 4 is the only timer that can
237 * be used for the watchdog, so we use timer 2 if we're on a
238 * non-buggy chip.
239 */
240 if ((*IXP2000_PRODUCT_ID & 0x001ffef0) == 0x00000000) {
241 printk(KERN_INFO "Enabling IXP2800 erratum #25 workaround\n");
242
243 ixp2000_reg_write(IXP2000_T4_CLR, 0);
244 ixp2000_reg_write(IXP2000_T4_CLD, -1);
245 ixp2000_reg_wrb(IXP2000_T4_CTL, (1 << 7));
246 missing_jiffy_timer_csr = IXP2000_T4_CSR;
247 } else {
248 ixp2000_reg_write(IXP2000_T2_CLR, 0);
249 ixp2000_reg_write(IXP2000_T2_CLD, -1);
250 ixp2000_reg_wrb(IXP2000_T2_CTL, (1 << 7));
251 missing_jiffy_timer_csr = IXP2000_T2_CSR;
252 }
253 next_jiffy_time = 0xffffffff;
254
255 /* register for interrupt */
256 setup_irq(IRQ_IXP2000_TIMER1, &ixp2000_timer_irq);
257}
258
259/*************************************************************************
260 * GPIO helpers
261 *************************************************************************/
262static unsigned long GPIO_IRQ_falling_edge;
263static unsigned long GPIO_IRQ_rising_edge;
264static unsigned long GPIO_IRQ_level_low;
265static unsigned long GPIO_IRQ_level_high;
266
267static void update_gpio_int_csrs(void)
268{
269 ixp2000_reg_write(IXP2000_GPIO_FEDR, GPIO_IRQ_falling_edge);
270 ixp2000_reg_write(IXP2000_GPIO_REDR, GPIO_IRQ_rising_edge);
271 ixp2000_reg_write(IXP2000_GPIO_LSLR, GPIO_IRQ_level_low);
272 ixp2000_reg_wrb(IXP2000_GPIO_LSHR, GPIO_IRQ_level_high);
273}
274
275void gpio_line_config(int line, int direction)
276{
277 unsigned long flags;
278
279 local_irq_save(flags);
280 if (direction == GPIO_OUT) {
281 /* if it's an output, it ain't an interrupt anymore */
282 GPIO_IRQ_falling_edge &= ~(1 << line);
283 GPIO_IRQ_rising_edge &= ~(1 << line);
284 GPIO_IRQ_level_low &= ~(1 << line);
285 GPIO_IRQ_level_high &= ~(1 << line);
286 update_gpio_int_csrs();
287
288 ixp2000_reg_wrb(IXP2000_GPIO_PDSR, 1 << line);
289 } else if (direction == GPIO_IN) {
290 ixp2000_reg_wrb(IXP2000_GPIO_PDCR, 1 << line);
291 }
292 local_irq_restore(flags);
293}
294EXPORT_SYMBOL(gpio_line_config);
295
296
297/*************************************************************************
298 * IRQ handling IXP2000
299 *************************************************************************/
300static void ixp2000_GPIO_irq_handler(unsigned int irq, struct irq_desc *desc)
301{
302 int i;
303 unsigned long status = *IXP2000_GPIO_INST;
304
305 for (i = 0; i <= 7; i++) {
306 if (status & (1<<i)) {
307 generic_handle_irq(i + IRQ_IXP2000_GPIO0);
308 }
309 }
310}
311
312static int ixp2000_GPIO_irq_type(struct irq_data *d, unsigned int type)
313{
314 int line = d->irq - IRQ_IXP2000_GPIO0;
315
316 /*
317 * First, configure this GPIO line as an input.
318 */
319 ixp2000_reg_write(IXP2000_GPIO_PDCR, 1 << line);
320
321 /*
322 * Then, set the proper trigger type.
323 */
324 if (type & IRQ_TYPE_EDGE_FALLING)
325 GPIO_IRQ_falling_edge |= 1 << line;
326 else
327 GPIO_IRQ_falling_edge &= ~(1 << line);
328 if (type & IRQ_TYPE_EDGE_RISING)
329 GPIO_IRQ_rising_edge |= 1 << line;
330 else
331 GPIO_IRQ_rising_edge &= ~(1 << line);
332 if (type & IRQ_TYPE_LEVEL_LOW)
333 GPIO_IRQ_level_low |= 1 << line;
334 else
335 GPIO_IRQ_level_low &= ~(1 << line);
336 if (type & IRQ_TYPE_LEVEL_HIGH)
337 GPIO_IRQ_level_high |= 1 << line;
338 else
339 GPIO_IRQ_level_high &= ~(1 << line);
340 update_gpio_int_csrs();
341
342 return 0;
343}
344
345static void ixp2000_GPIO_irq_mask_ack(struct irq_data *d)
346{
347 unsigned int irq = d->irq;
348
349 ixp2000_reg_write(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0)));
350
351 ixp2000_reg_write(IXP2000_GPIO_EDSR, (1 << (irq - IRQ_IXP2000_GPIO0)));
352 ixp2000_reg_write(IXP2000_GPIO_LDSR, (1 << (irq - IRQ_IXP2000_GPIO0)));
353 ixp2000_reg_wrb(IXP2000_GPIO_INST, (1 << (irq - IRQ_IXP2000_GPIO0)));
354}
355
356static void ixp2000_GPIO_irq_mask(struct irq_data *d)
357{
358 unsigned int irq = d->irq;
359
360 ixp2000_reg_wrb(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0)));
361}
362
363static void ixp2000_GPIO_irq_unmask(struct irq_data *d)
364{
365 unsigned int irq = d->irq;
366
367 ixp2000_reg_write(IXP2000_GPIO_INSR, (1 << (irq - IRQ_IXP2000_GPIO0)));
368}
369
370static struct irq_chip ixp2000_GPIO_irq_chip = {
371 .irq_ack = ixp2000_GPIO_irq_mask_ack,
372 .irq_mask = ixp2000_GPIO_irq_mask,
373 .irq_unmask = ixp2000_GPIO_irq_unmask,
374 .irq_set_type = ixp2000_GPIO_irq_type,
375};
376
377static void ixp2000_pci_irq_mask(struct irq_data *d)
378{
379 unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE;
380 if (d->irq == IRQ_IXP2000_PCIA)
381 ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, (temp & ~(1 << 26)));
382 else if (d->irq == IRQ_IXP2000_PCIB)
383 ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, (temp & ~(1 << 27)));
384}
385
386static void ixp2000_pci_irq_unmask(struct irq_data *d)
387{
388 unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE;
389 if (d->irq == IRQ_IXP2000_PCIA)
390 ixp2000_reg_write(IXP2000_PCI_XSCALE_INT_ENABLE, (temp | (1 << 26)));
391 else if (d->irq == IRQ_IXP2000_PCIB)
392 ixp2000_reg_write(IXP2000_PCI_XSCALE_INT_ENABLE, (temp | (1 << 27)));
393}
394
395/*
396 * Error interrupts. These are used extensively by the microengine drivers
397 */
398static void ixp2000_err_irq_handler(unsigned int irq, struct irq_desc *desc)
399{
400 int i;
401 unsigned long status = *IXP2000_IRQ_ERR_STATUS;
402
403 for(i = 31; i >= 0; i--) {
404 if(status & (1 << i)) {
405 generic_handle_irq(IRQ_IXP2000_DRAM0_MIN_ERR + i);
406 }
407 }
408}
409
410static void ixp2000_err_irq_mask(struct irq_data *d)
411{
412 ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_CLR,
413 (1 << (d->irq - IRQ_IXP2000_DRAM0_MIN_ERR)));
414}
415
416static void ixp2000_err_irq_unmask(struct irq_data *d)
417{
418 ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_SET,
419 (1 << (d->irq - IRQ_IXP2000_DRAM0_MIN_ERR)));
420}
421
422static struct irq_chip ixp2000_err_irq_chip = {
423 .irq_ack = ixp2000_err_irq_mask,
424 .irq_mask = ixp2000_err_irq_mask,
425 .irq_unmask = ixp2000_err_irq_unmask
426};
427
428static struct irq_chip ixp2000_pci_irq_chip = {
429 .irq_ack = ixp2000_pci_irq_mask,
430 .irq_mask = ixp2000_pci_irq_mask,
431 .irq_unmask = ixp2000_pci_irq_unmask
432};
433
434static void ixp2000_irq_mask(struct irq_data *d)
435{
436 ixp2000_reg_wrb(IXP2000_IRQ_ENABLE_CLR, (1 << d->irq));
437}
438
439static void ixp2000_irq_unmask(struct irq_data *d)
440{
441 ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << d->irq));
442}
443
444static struct irq_chip ixp2000_irq_chip = {
445 .irq_ack = ixp2000_irq_mask,
446 .irq_mask = ixp2000_irq_mask,
447 .irq_unmask = ixp2000_irq_unmask
448};
449
450void __init ixp2000_init_irq(void)
451{
452 int irq;
453
454 /*
455 * Mask all sources
456 */
457 ixp2000_reg_write(IXP2000_IRQ_ENABLE_CLR, 0xffffffff);
458 ixp2000_reg_write(IXP2000_FIQ_ENABLE_CLR, 0xffffffff);
459
460 /* clear all GPIO edge/level detects */
461 ixp2000_reg_write(IXP2000_GPIO_REDR, 0);
462 ixp2000_reg_write(IXP2000_GPIO_FEDR, 0);
463 ixp2000_reg_write(IXP2000_GPIO_LSHR, 0);
464 ixp2000_reg_write(IXP2000_GPIO_LSLR, 0);
465 ixp2000_reg_write(IXP2000_GPIO_INCR, -1);
466
467 /* clear PCI interrupt sources */
468 ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, 0);
469
470 /*
471 * Certain bits in the IRQ status register of the
472 * IXP2000 are reserved. Instead of trying to map
473 * things non 1:1 from bit position to IRQ number,
474 * we mark the reserved IRQs as invalid. This makes
475 * our mask/unmask code much simpler.
476 */
477 for (irq = IRQ_IXP2000_SOFT_INT; irq <= IRQ_IXP2000_THDB3; irq++) {
478 if ((1 << irq) & IXP2000_VALID_IRQ_MASK) {
479 irq_set_chip_and_handler(irq, &ixp2000_irq_chip,
480 handle_level_irq);
481 set_irq_flags(irq, IRQF_VALID);
482 } else set_irq_flags(irq, 0);
483 }
484
485 for (irq = IRQ_IXP2000_DRAM0_MIN_ERR; irq <= IRQ_IXP2000_SP_INT; irq++) {
486 if((1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR)) &
487 IXP2000_VALID_ERR_IRQ_MASK) {
488 irq_set_chip_and_handler(irq, &ixp2000_err_irq_chip,
489 handle_level_irq);
490 set_irq_flags(irq, IRQF_VALID);
491 }
492 else
493 set_irq_flags(irq, 0);
494 }
495 irq_set_chained_handler(IRQ_IXP2000_ERRSUM, ixp2000_err_irq_handler);
496
497 for (irq = IRQ_IXP2000_GPIO0; irq <= IRQ_IXP2000_GPIO7; irq++) {
498 irq_set_chip_and_handler(irq, &ixp2000_GPIO_irq_chip,
499 handle_level_irq);
500 set_irq_flags(irq, IRQF_VALID);
501 }
502 irq_set_chained_handler(IRQ_IXP2000_GPIO, ixp2000_GPIO_irq_handler);
503
504 /*
505 * Enable PCI irqs. The actual PCI[AB] decoding is done in
506 * entry-macro.S, so we don't need a chained handler for the
507 * PCI interrupt source.
508 */
509 ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << IRQ_IXP2000_PCI));
510 for (irq = IRQ_IXP2000_PCIA; irq <= IRQ_IXP2000_PCIB; irq++) {
511 irq_set_chip_and_handler(irq, &ixp2000_pci_irq_chip,
512 handle_level_irq);
513 set_irq_flags(irq, IRQF_VALID);
514 }
515}
516
517void ixp2000_restart(char mode, const char *cmd)
518{
519 ixp2000_reg_wrb(IXP2000_RESET0, RSTALL);
520}
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c
deleted file mode 100644
index 73df2f688813..000000000000
--- a/arch/arm/mach-ixp2000/enp2611.c
+++ /dev/null
@@ -1,258 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/enp2611.c
3 *
4 * Radisys ENP-2611 support.
5 *
6 * Created 2004 by Lennert Buytenhek from the ixdp2x01 code. The
7 * original version carries the following notices:
8 *
9 * Original Author: Andrzej Mialkowski <andrzej.mialkowski@intel.com>
10 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
11 *
12 * Copyright (C) 2002-2003 Intel Corp.
13 * Copyright (C) 2003-2004 MontaVista Software, Inc.
14 *
15 * This program is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version.
19 */
20
21#include <linux/kernel.h>
22#include <linux/init.h>
23#include <linux/mm.h>
24#include <linux/sched.h>
25#include <linux/interrupt.h>
26#include <linux/bitops.h>
27#include <linux/pci.h>
28#include <linux/ioport.h>
29#include <linux/delay.h>
30#include <linux/serial.h>
31#include <linux/tty.h>
32#include <linux/serial_core.h>
33#include <linux/platform_device.h>
34#include <linux/io.h>
35
36#include <asm/irq.h>
37#include <asm/pgtable.h>
38#include <asm/page.h>
39#include <mach/hardware.h>
40#include <asm/mach-types.h>
41
42#include <asm/mach/pci.h>
43#include <asm/mach/map.h>
44#include <asm/mach/irq.h>
45#include <asm/mach/time.h>
46#include <asm/mach/arch.h>
47#include <asm/mach/flash.h>
48
49/*************************************************************************
50 * ENP-2611 timer tick configuration
51 *************************************************************************/
52static void __init enp2611_timer_init(void)
53{
54 ixp2000_init_time(50 * 1000 * 1000);
55}
56
57static struct sys_timer enp2611_timer = {
58 .init = enp2611_timer_init,
59 .offset = ixp2000_gettimeoffset,
60};
61
62
63/*************************************************************************
64 * ENP-2611 I/O
65 *************************************************************************/
66static struct map_desc enp2611_io_desc[] __initdata = {
67 {
68 .virtual = ENP2611_CALEB_VIRT_BASE,
69 .pfn = __phys_to_pfn(ENP2611_CALEB_PHYS_BASE),
70 .length = ENP2611_CALEB_SIZE,
71 .type = MT_DEVICE,
72 }, {
73 .virtual = ENP2611_PM3386_0_VIRT_BASE,
74 .pfn = __phys_to_pfn(ENP2611_PM3386_0_PHYS_BASE),
75 .length = ENP2611_PM3386_0_SIZE,
76 .type = MT_DEVICE,
77 }, {
78 .virtual = ENP2611_PM3386_1_VIRT_BASE,
79 .pfn = __phys_to_pfn(ENP2611_PM3386_1_PHYS_BASE),
80 .length = ENP2611_PM3386_1_SIZE,
81 .type = MT_DEVICE,
82 }
83};
84
85void __init enp2611_map_io(void)
86{
87 ixp2000_map_io();
88 iotable_init(enp2611_io_desc, ARRAY_SIZE(enp2611_io_desc));
89}
90
91
92/*************************************************************************
93 * ENP-2611 PCI
94 *************************************************************************/
95static int enp2611_pci_setup(int nr, struct pci_sys_data *sys)
96{
97 sys->mem_offset = 0xe0000000;
98 ixp2000_pci_setup(nr, sys);
99 return 1;
100}
101
102static void __init enp2611_pci_preinit(void)
103{
104 ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00100000);
105 ixp2000_pci_preinit();
106 pcibios_setup("firmware");
107}
108
109static inline int enp2611_pci_valid_device(struct pci_bus *bus,
110 unsigned int devfn)
111{
112 /* The 82559 ethernet controller appears at both PCI:1:0:0 and
113 * PCI:1:2:0, so let's pretend the second one isn't there.
114 */
115 if (bus->number == 0x01 && devfn == 0x10)
116 return 0;
117
118 return 1;
119}
120
121static int enp2611_pci_read_config(struct pci_bus *bus, unsigned int devfn,
122 int where, int size, u32 *value)
123{
124 if (enp2611_pci_valid_device(bus, devfn))
125 return ixp2000_pci_read_config(bus, devfn, where, size, value);
126
127 return PCIBIOS_DEVICE_NOT_FOUND;
128}
129
130static int enp2611_pci_write_config(struct pci_bus *bus, unsigned int devfn,
131 int where, int size, u32 value)
132{
133 if (enp2611_pci_valid_device(bus, devfn))
134 return ixp2000_pci_write_config(bus, devfn, where, size, value);
135
136 return PCIBIOS_DEVICE_NOT_FOUND;
137}
138
139static struct pci_ops enp2611_pci_ops = {
140 .read = enp2611_pci_read_config,
141 .write = enp2611_pci_write_config
142};
143
144static int __init enp2611_pci_map_irq(const struct pci_dev *dev, u8 slot,
145 u8 pin)
146{
147 int irq;
148
149 if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 0) {
150 /* IXP2400. */
151 irq = IRQ_IXP2000_PCIA;
152 } else if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 1) {
153 /* 21555 non-transparent bridge. */
154 irq = IRQ_IXP2000_PCIB;
155 } else if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 4) {
156 /* PCI2050B transparent bridge. */
157 irq = -1;
158 } else if (dev->bus->number == 1 && PCI_SLOT(dev->devfn) == 0) {
159 /* 82559 ethernet. */
160 irq = IRQ_IXP2000_PCIA;
161 } else if (dev->bus->number == 1 && PCI_SLOT(dev->devfn) == 1) {
162 /* SPI-3 option board. */
163 irq = IRQ_IXP2000_PCIB;
164 } else {
165 printk(KERN_ERR "enp2611_pci_map_irq() called for unknown "
166 "device PCI:%d:%d:%d\n", dev->bus->number,
167 PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
168 irq = -1;
169 }
170
171 return irq;
172}
173
174struct hw_pci enp2611_pci __initdata = {
175 .nr_controllers = 1,
176 .ops = &enp2611_pci_ops,
177 .setup = enp2611_pci_setup,
178 .preinit = enp2611_pci_preinit,
179 .map_irq = enp2611_pci_map_irq,
180};
181
182int __init enp2611_pci_init(void)
183{
184 if (machine_is_enp2611())
185 pci_common_init(&enp2611_pci);
186
187 return 0;
188}
189
190subsys_initcall(enp2611_pci_init);
191
192
193/*************************************************************************
194 * ENP-2611 Machine Initialization
195 *************************************************************************/
196static struct flash_platform_data enp2611_flash_platform_data = {
197 .map_name = "cfi_probe",
198 .width = 1,
199};
200
201static struct ixp2000_flash_data enp2611_flash_data = {
202 .platform_data = &enp2611_flash_platform_data,
203 .nr_banks = 1
204};
205
206static struct resource enp2611_flash_resource = {
207 .start = 0xc4000000,
208 .end = 0xc4000000 + 0x00ffffff,
209 .flags = IORESOURCE_MEM,
210};
211
212static struct platform_device enp2611_flash = {
213 .name = "IXP2000-Flash",
214 .id = 0,
215 .dev = {
216 .platform_data = &enp2611_flash_data,
217 },
218 .num_resources = 1,
219 .resource = &enp2611_flash_resource,
220};
221
222static struct ixp2000_i2c_pins enp2611_i2c_gpio_pins = {
223 .sda_pin = ENP2611_GPIO_SDA,
224 .scl_pin = ENP2611_GPIO_SCL,
225};
226
227static struct platform_device enp2611_i2c_controller = {
228 .name = "IXP2000-I2C",
229 .id = 0,
230 .dev = {
231 .platform_data = &enp2611_i2c_gpio_pins
232 },
233 .num_resources = 0
234};
235
236static struct platform_device *enp2611_devices[] __initdata = {
237 &enp2611_flash,
238 &enp2611_i2c_controller
239};
240
241static void __init enp2611_init_machine(void)
242{
243 platform_add_devices(enp2611_devices, ARRAY_SIZE(enp2611_devices));
244 ixp2000_uart_init();
245}
246
247
248MACHINE_START(ENP2611, "Radisys ENP-2611 PCI network processor board")
249 /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
250 .atag_offset = 0x100,
251 .map_io = enp2611_map_io,
252 .init_irq = ixp2000_init_irq,
253 .timer = &enp2611_timer,
254 .init_machine = enp2611_init_machine,
255 .restart = ixp2000_restart,
256MACHINE_END
257
258
diff --git a/arch/arm/mach-ixp2000/include/mach/debug-macro.S b/arch/arm/mach-ixp2000/include/mach/debug-macro.S
deleted file mode 100644
index bdd3ccdc2890..000000000000
--- a/arch/arm/mach-ixp2000/include/mach/debug-macro.S
+++ /dev/null
@@ -1,25 +0,0 @@
1/* arch/arm/mach-ixp2000/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart, rp, rv, tmp
15 mov \rp, #0x00030000
16#ifdef __ARMEB__
17 orr \rp, \rp, #0x00000003
18#endif
19 orr \rv, \rp, #0xfe000000 @ virtual base
20 orr \rv, \rv, #0x00f00000
21 orr \rp, \rp, #0xc0000000 @ Physical base
22 .endm
23
24#define UART_SHIFT 2
25#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-ixp2000/include/mach/enp2611.h b/arch/arm/mach-ixp2000/include/mach/enp2611.h
deleted file mode 100644
index 9ce3690061d5..000000000000
--- a/arch/arm/mach-ixp2000/include/mach/enp2611.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/enp2611.h
3 *
4 * Register and other defines for Radisys ENP-2611
5 *
6 * Created 2004 by Lennert Buytenhek from the ixdp2x01 code. The
7 * original version carries the following notices:
8 *
9 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
10 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
11 *
12 * Copyright (C) 2002 Intel Corp.
13 * Copyright (C) 2003-2004 MontaVista Software, Inc.
14 *
15 * This program is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version.
19 */
20
21#ifndef __ENP2611_H
22#define __ENP2611_H
23
24#define ENP2611_CALEB_PHYS_BASE 0xc5000000
25#define ENP2611_CALEB_VIRT_BASE 0xfe000000
26#define ENP2611_CALEB_SIZE 0x00100000
27
28#define ENP2611_PM3386_0_PHYS_BASE 0xc6000000
29#define ENP2611_PM3386_0_VIRT_BASE 0xfe100000
30#define ENP2611_PM3386_0_SIZE 0x00100000
31
32#define ENP2611_PM3386_1_PHYS_BASE 0xc6400000
33#define ENP2611_PM3386_1_VIRT_BASE 0xfe200000
34#define ENP2611_PM3386_1_SIZE 0x00100000
35
36#define ENP2611_GPIO_SCL 7
37#define ENP2611_GPIO_SDA 6
38
39#define IRQ_ENP2611_THERMAL IRQ_IXP2000_GPIO4
40#define IRQ_ENP2611_OPTION_BOARD IRQ_IXP2000_GPIO3
41#define IRQ_ENP2611_CALEB IRQ_IXP2000_GPIO2
42#define IRQ_ENP2611_PM3386_1 IRQ_IXP2000_GPIO1
43#define IRQ_ENP2611_PM3386_0 IRQ_IXP2000_GPIO0
44
45
46#endif
diff --git a/arch/arm/mach-ixp2000/include/mach/entry-macro.S b/arch/arm/mach-ixp2000/include/mach/entry-macro.S
deleted file mode 100644
index c4444dff9202..000000000000
--- a/arch/arm/mach-ixp2000/include/mach/entry-macro.S
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for IXP2000-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <mach/irqs.h>
11
12 .macro get_irqnr_preamble, base, tmp
13 .endm
14
15 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
16
17 mov \irqnr, #0x0 @clear out irqnr as default
18 mov \base, #0xfe000000
19 orr \base, \base, #0x00e00000
20 orr \base, \base, #0x08
21 ldr \irqstat, [\base] @ get interrupts
22
23 cmp \irqstat, #0
24 beq 1001f
25
26 clz \irqnr, \irqstat
27 mov \base, #31
28 subs \irqnr, \base, \irqnr
29
30 /*
31 * We handle PCIA and PCIB here so we don't have an
32 * extra layer of code just to check these two bits.
33 */
34 cmp \irqnr, #IRQ_IXP2000_PCI
35 bne 1001f
36
37 mov \base, #0xfe000000
38 orr \base, \base, #0x00c00000
39 orr \base, \base, #0x00000100
40 orr \base, \base, #0x00000058
41 ldr \irqstat, [\base]
42
43 mov \tmp, #(1<<26)
44 tst \irqstat, \tmp
45 movne \irqnr, #IRQ_IXP2000_PCIA
46 bne 1001f
47
48 mov \tmp, #(1<<27)
49 tst \irqstat, \tmp
50 movne \irqnr, #IRQ_IXP2000_PCIB
51
521001:
53 .endm
54
diff --git a/arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h b/arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h
deleted file mode 100644
index af836c76c3f1..000000000000
--- a/arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/gpio.h
3 *
4 * Copyright (C) 2002 Intel Corporation.
5 *
6 * This program is free software, you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11/*
12 * IXP2000 GPIO in/out, edge/level detection for IRQs:
13 * IRQs are generated on Falling-edge, Rising-Edge, Level-low, Level-High
14 * or both Falling-edge and Rising-edge.
15 * This must be called *before* the corresponding IRQ is registerd.
16 * Use this instead of directly setting the GPIO registers.
17 * GPIOs may also be used as GPIOs (e.g. for emulating i2c/smb)
18 */
19#ifndef __ASM_ARCH_GPIO_H
20#define __ASM_ARCH_GPIO_H
21
22#ifndef __ASSEMBLY__
23
24#define GPIO_IN 0
25#define GPIO_OUT 1
26
27#define IXP2000_GPIO_LOW 0
28#define IXP2000_GPIO_HIGH 1
29
30extern void gpio_line_config(int line, int direction);
31
32static inline int gpio_line_get(int line)
33{
34 return (((*IXP2000_GPIO_PLR) >> line) & 1);
35}
36
37static inline void gpio_line_set(int line, int value)
38{
39 if (value == IXP2000_GPIO_HIGH) {
40 ixp2000_reg_write(IXP2000_GPIO_POSR, 1 << line);
41 } else if (value == IXP2000_GPIO_LOW) {
42 ixp2000_reg_write(IXP2000_GPIO_POCR, 1 << line);
43 }
44}
45
46#endif /* !__ASSEMBLY__ */
47
48#endif /* ASM_ARCH_IXP2000_GPIO_H_ */
diff --git a/arch/arm/mach-ixp2000/include/mach/hardware.h b/arch/arm/mach-ixp2000/include/mach/hardware.h
deleted file mode 100644
index cdaf1db84003..000000000000
--- a/arch/arm/mach-ixp2000/include/mach/hardware.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/hardware.h
3 *
4 * Hardware definitions for IXP2400/2800 based systems
5 *
6 * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com>
7 *
8 * Maintainer: Deepak Saxena <dsaxena@mvista.com>
9 *
10 * Copyright (C) 2001-2002 Intel Corp.
11 * Copyright (C) 2003-2004 MontaVista Software, Inc.
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 */
18
19#ifndef __ASM_ARCH_HARDWARE_H__
20#define __ASM_ARCH_HARDWARE_H__
21
22#include "ixp2000-regs.h" /* Chipset Registers */
23
24/*
25 * Platform helper functions
26 */
27#include "platform.h"
28
29/*
30 * Platform-specific bits
31 */
32#include "enp2611.h" /* ENP-2611 */
33#include "ixdp2x00.h" /* IXDP2400/2800 */
34#include "ixdp2x01.h" /* IXDP2401/2801 */
35
36#endif /* _ASM_ARCH_HARDWARE_H__ */
diff --git a/arch/arm/mach-ixp2000/include/mach/io.h b/arch/arm/mach-ixp2000/include/mach/io.h
deleted file mode 100644
index f6552d6f35ab..000000000000
--- a/arch/arm/mach-ixp2000/include/mach/io.h
+++ /dev/null
@@ -1,133 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/io.h
3 *
4 * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com>
5 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
6 *
7 * Copyright (C) 2002 Intel Corp.
8 * Copyrgiht (C) 2003-2004 MontaVista Software, Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __ASM_ARM_ARCH_IO_H
16#define __ASM_ARM_ARCH_IO_H
17
18#include <mach/hardware.h>
19
20#define IO_SPACE_LIMIT 0xffffffff
21
22/*
23 * The A? revisions of the IXP2000s assert byte lanes for PCI I/O
24 * transactions the other way round (MEM transactions don't have this
25 * issue), so if we want to support those models, we need to override
26 * the standard I/O functions.
27 *
28 * B0 and later have a bit that can be set to 1 to get the proper
29 * behavior for I/O transactions, which then allows us to use the
30 * standard I/O functions. This is what we do if the user does not
31 * explicitly ask for support for pre-B0.
32 */
33#ifdef CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO
34#define ___io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE))
35
36#define alignb(addr) (void __iomem *)((unsigned long)(addr) ^ 3)
37#define alignw(addr) (void __iomem *)((unsigned long)(addr) ^ 2)
38
39#define outb(v,p) __raw_writeb((v),alignb(___io(p)))
40#define outw(v,p) __raw_writew((v),alignw(___io(p)))
41#define outl(v,p) __raw_writel((v),___io(p))
42
43#define inb(p) ({ unsigned int __v = __raw_readb(alignb(___io(p))); __v; })
44#define inw(p) \
45 ({ unsigned int __v = (__raw_readw(alignw(___io(p)))); __v; })
46#define inl(p) \
47 ({ unsigned int __v = (__raw_readl(___io(p))); __v; })
48
49#define outsb(p,d,l) __raw_writesb(alignb(___io(p)),d,l)
50#define outsw(p,d,l) __raw_writesw(alignw(___io(p)),d,l)
51#define outsl(p,d,l) __raw_writesl(___io(p),d,l)
52
53#define insb(p,d,l) __raw_readsb(alignb(___io(p)),d,l)
54#define insw(p,d,l) __raw_readsw(alignw(___io(p)),d,l)
55#define insl(p,d,l) __raw_readsl(___io(p),d,l)
56
57#define __is_io_address(p) ((((unsigned long)(p)) & ~(IXP2000_PCI_IO_SIZE - 1)) == IXP2000_PCI_IO_VIRT_BASE)
58
59#define ioread8(p) \
60 ({ \
61 unsigned int __v; \
62 \
63 if (__is_io_address(p)) { \
64 __v = __raw_readb(alignb(p)); \
65 } else { \
66 __v = __raw_readb(p); \
67 } \
68 \
69 __v; \
70 }) \
71
72#define ioread16(p) \
73 ({ \
74 unsigned int __v; \
75 \
76 if (__is_io_address(p)) { \
77 __v = __raw_readw(alignw(p)); \
78 } else { \
79 __v = le16_to_cpu(__raw_readw(p)); \
80 } \
81 \
82 __v; \
83 })
84
85#define ioread32(p) \
86 ({ \
87 unsigned int __v; \
88 \
89 if (__is_io_address(p)) { \
90 __v = __raw_readl(p); \
91 } else { \
92 __v = le32_to_cpu(__raw_readl(p)); \
93 } \
94 \
95 __v; \
96 })
97
98#define iowrite8(v,p) \
99 ({ \
100 if (__is_io_address(p)) { \
101 __raw_writeb((v), alignb(p)); \
102 } else { \
103 __raw_writeb((v), p); \
104 } \
105 })
106
107#define iowrite16(v,p) \
108 ({ \
109 if (__is_io_address(p)) { \
110 __raw_writew((v), alignw(p)); \
111 } else { \
112 __raw_writew(cpu_to_le16(v), p); \
113 } \
114 })
115
116#define iowrite32(v,p) \
117 ({ \
118 if (__is_io_address(p)) { \
119 __raw_writel((v), p); \
120 } else { \
121 __raw_writel(cpu_to_le32(v), p); \
122 } \
123 })
124
125#define ioport_map(port, nr) ___io(port)
126
127#define ioport_unmap(addr)
128#else
129#define __io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE))
130#endif
131
132
133#endif
diff --git a/arch/arm/mach-ixp2000/include/mach/irqs.h b/arch/arm/mach-ixp2000/include/mach/irqs.h
deleted file mode 100644
index bee96bcafdca..000000000000
--- a/arch/arm/mach-ixp2000/include/mach/irqs.h
+++ /dev/null
@@ -1,207 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/irqs.h
3 *
4 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
5 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
6 *
7 * Copyright (C) 2002 Intel Corp.
8 * Copyright (C) 2003-2004 MontaVista Software, Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef _IRQS_H
16#define _IRQS_H
17
18/*
19 * Do NOT add #ifdef MACHINE_FOO in here.
20 * Simpy add your machine IRQs here and increase NR_IRQS if needed to
21 * hold your machine's IRQ table.
22 */
23
24/*
25 * Some interrupt numbers go unused b/c the IRQ mask/ummask/status
26 * register has those bit reserved. We just mark those interrupts
27 * as invalid and this allows us to do mask/unmask with a single
28 * shift operation instead of having to map the IRQ number to
29 * a HW IRQ number.
30 */
31#define IRQ_IXP2000_SOFT_INT 0 /* soft interrupt */
32#define IRQ_IXP2000_ERRSUM 1 /* OR of all bits in ErrorStatus reg*/
33#define IRQ_IXP2000_UART 2
34#define IRQ_IXP2000_GPIO 3
35#define IRQ_IXP2000_TIMER1 4
36#define IRQ_IXP2000_TIMER2 5
37#define IRQ_IXP2000_TIMER3 6
38#define IRQ_IXP2000_TIMER4 7
39#define IRQ_IXP2000_PMU 8
40#define IRQ_IXP2000_SPF 9 /* Slow port framer IRQ */
41#define IRQ_IXP2000_DMA1 10
42#define IRQ_IXP2000_DMA2 11
43#define IRQ_IXP2000_DMA3 12
44#define IRQ_IXP2000_PCI_DOORBELL 13
45#define IRQ_IXP2000_ME_ATTN 14
46#define IRQ_IXP2000_PCI 15 /* PCI INTA or INTB */
47#define IRQ_IXP2000_THDA0 16 /* thread 0-31A */
48#define IRQ_IXP2000_THDA1 17 /* thread 32-63A, IXP2800 only */
49#define IRQ_IXP2000_THDA2 18 /* thread 64-95A */
50#define IRQ_IXP2000_THDA3 19 /* thread 96-127A, IXP2800 only */
51#define IRQ_IXP2000_THDB0 24 /* thread 0-31B */
52#define IRQ_IXP2000_THDB1 25 /* thread 32-63B, IXP2800 only */
53#define IRQ_IXP2000_THDB2 26 /* thread 64-95B */
54#define IRQ_IXP2000_THDB3 27 /* thread 96-127B, IXP2800 only */
55
56/* define generic GPIOs */
57#define IRQ_IXP2000_GPIO0 32
58#define IRQ_IXP2000_GPIO1 33
59#define IRQ_IXP2000_GPIO2 34
60#define IRQ_IXP2000_GPIO3 35
61#define IRQ_IXP2000_GPIO4 36
62#define IRQ_IXP2000_GPIO5 37
63#define IRQ_IXP2000_GPIO6 38
64#define IRQ_IXP2000_GPIO7 39
65
66/* split off the 2 PCI sources */
67#define IRQ_IXP2000_PCIA 40
68#define IRQ_IXP2000_PCIB 41
69
70/* Int sources from IRQ_ERROR_STATUS */
71#define IRQ_IXP2000_DRAM0_MIN_ERR 42
72#define IRQ_IXP2000_DRAM0_MAJ_ERR 43
73#define IRQ_IXP2000_DRAM1_MIN_ERR 44
74#define IRQ_IXP2000_DRAM1_MAJ_ERR 45
75#define IRQ_IXP2000_DRAM2_MIN_ERR 46
76#define IRQ_IXP2000_DRAM2_MAJ_ERR 47
77/* 48-57 reserved */
78#define IRQ_IXP2000_SRAM0_ERR 58
79#define IRQ_IXP2000_SRAM1_ERR 59
80#define IRQ_IXP2000_SRAM2_ERR 60
81#define IRQ_IXP2000_SRAM3_ERR 61
82/* 62-65 reserved */
83#define IRQ_IXP2000_MEDIA_ERR 66
84#define IRQ_IXP2000_PCI_ERR 67
85#define IRQ_IXP2000_SP_INT 68
86
87#define NR_IXP2000_IRQS 69
88
89#define IXP2000_BOARD_IRQ(x) (NR_IXP2000_IRQS + (x))
90
91#define IXP2000_BOARD_IRQ_MASK(irq) (1 << (irq - NR_IXP2000_IRQS))
92
93#define IXP2000_ERR_IRQ_MASK(irq) ( 1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR))
94#define IXP2000_VALID_ERR_IRQ_MASK (\
95 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM0_MIN_ERR) | \
96 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM0_MAJ_ERR) | \
97 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM1_MIN_ERR) | \
98 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM1_MAJ_ERR) | \
99 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM2_MIN_ERR) | \
100 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM2_MAJ_ERR) | \
101 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM0_ERR) | \
102 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM1_ERR) | \
103 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM2_ERR) | \
104 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM3_ERR) | \
105 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_MEDIA_ERR) | \
106 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_PCI_ERR) | \
107 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SP_INT) )
108
109/*
110 * This allows for all the on-chip sources plus up to 32 CPLD based
111 * IRQs. Should be more than enough.
112 */
113#define IXP2000_BOARD_IRQS 32
114#define NR_IRQS (NR_IXP2000_IRQS + IXP2000_BOARD_IRQS)
115
116
117/*
118 * IXDP2400 specific IRQs
119 */
120#define IRQ_IXDP2400_INGRESS_NPU IXP2000_BOARD_IRQ(0)
121#define IRQ_IXDP2400_ENET IXP2000_BOARD_IRQ(1)
122#define IRQ_IXDP2400_MEDIA_PCI IXP2000_BOARD_IRQ(2)
123#define IRQ_IXDP2400_MEDIA_SP IXP2000_BOARD_IRQ(3)
124#define IRQ_IXDP2400_SF_PCI IXP2000_BOARD_IRQ(4)
125#define IRQ_IXDP2400_SF_SP IXP2000_BOARD_IRQ(5)
126#define IRQ_IXDP2400_PMC IXP2000_BOARD_IRQ(6)
127#define IRQ_IXDP2400_TVM IXP2000_BOARD_IRQ(7)
128
129#define NR_IXDP2400_IRQS ((IRQ_IXDP2400_TVM)+1)
130#define IXDP2400_NR_IRQS NR_IXDP2400_IRQS - NR_IXP2000_IRQS
131
132/* IXDP2800 specific IRQs */
133#define IRQ_IXDP2800_EGRESS_ENET IXP2000_BOARD_IRQ(0)
134#define IRQ_IXDP2800_INGRESS_NPU IXP2000_BOARD_IRQ(1)
135#define IRQ_IXDP2800_PMC IXP2000_BOARD_IRQ(2)
136#define IRQ_IXDP2800_FABRIC_PCI IXP2000_BOARD_IRQ(3)
137#define IRQ_IXDP2800_FABRIC IXP2000_BOARD_IRQ(4)
138#define IRQ_IXDP2800_MEDIA IXP2000_BOARD_IRQ(5)
139
140#define NR_IXDP2800_IRQS ((IRQ_IXDP2800_MEDIA)+1)
141#define IXDP2800_NR_IRQS NR_IXDP2800_IRQS - NR_IXP2000_IRQS
142
143/*
144 * IRQs on both IXDP2x01 boards
145 */
146#define IRQ_IXDP2X01_SPCI_DB_0 IXP2000_BOARD_IRQ(2)
147#define IRQ_IXDP2X01_SPCI_DB_1 IXP2000_BOARD_IRQ(3)
148#define IRQ_IXDP2X01_SPCI_PMC_INTA IXP2000_BOARD_IRQ(4)
149#define IRQ_IXDP2X01_SPCI_PMC_INTB IXP2000_BOARD_IRQ(5)
150#define IRQ_IXDP2X01_SPCI_PMC_INTC IXP2000_BOARD_IRQ(6)
151#define IRQ_IXDP2X01_SPCI_PMC_INTD IXP2000_BOARD_IRQ(7)
152#define IRQ_IXDP2X01_SPCI_FIC_INT IXP2000_BOARD_IRQ(8)
153#define IRQ_IXDP2X01_IPMI_FROM IXP2000_BOARD_IRQ(16)
154#define IRQ_IXDP2X01_125US IXP2000_BOARD_IRQ(17)
155#define IRQ_IXDP2X01_DB_0_ADD IXP2000_BOARD_IRQ(18)
156#define IRQ_IXDP2X01_DB_1_ADD IXP2000_BOARD_IRQ(19)
157#define IRQ_IXDP2X01_UART1 IXP2000_BOARD_IRQ(21)
158#define IRQ_IXDP2X01_UART2 IXP2000_BOARD_IRQ(22)
159#define IRQ_IXDP2X01_FIC_ADD_INT IXP2000_BOARD_IRQ(24)
160#define IRQ_IXDP2X01_CS8900 IXP2000_BOARD_IRQ(25)
161#define IRQ_IXDP2X01_BBSRAM IXP2000_BOARD_IRQ(26)
162
163#define IXDP2X01_VALID_IRQ_MASK ( \
164 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_DB_0) | \
165 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_DB_1) | \
166 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTA) | \
167 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTB) | \
168 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTC) | \
169 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTD) | \
170 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_FIC_INT) | \
171 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_IPMI_FROM) | \
172 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_125US) | \
173 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_DB_0_ADD) | \
174 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_DB_1_ADD) | \
175 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_UART1) | \
176 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_UART2) | \
177 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_FIC_ADD_INT) | \
178 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_CS8900) | \
179 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_BBSRAM) )
180
181/*
182 * IXDP2401 specific IRQs
183 */
184#define IRQ_IXDP2401_INTA_82546 IXP2000_BOARD_IRQ(0)
185#define IRQ_IXDP2401_INTB_82546 IXP2000_BOARD_IRQ(1)
186
187#define IXDP2401_VALID_IRQ_MASK ( \
188 IXDP2X01_VALID_IRQ_MASK | \
189 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2401_INTA_82546) |\
190 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2401_INTB_82546))
191
192/*
193 * IXDP2801-specific IRQs
194 */
195#define IRQ_IXDP2801_RIV IXP2000_BOARD_IRQ(0)
196#define IRQ_IXDP2801_CNFG_MEDIA IXP2000_BOARD_IRQ(27)
197#define IRQ_IXDP2801_CLOCK_REF IXP2000_BOARD_IRQ(28)
198
199#define IXDP2801_VALID_IRQ_MASK ( \
200 IXDP2X01_VALID_IRQ_MASK | \
201 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_RIV) |\
202 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_CNFG_MEDIA) |\
203 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_CLOCK_REF))
204
205#define NR_IXDP2X01_IRQS ((IRQ_IXDP2801_CLOCK_REF) + 1)
206
207#endif /*_IRQS_H*/
diff --git a/arch/arm/mach-ixp2000/include/mach/ixdp2x00.h b/arch/arm/mach-ixp2000/include/mach/ixdp2x00.h
deleted file mode 100644
index 5df8479d9481..000000000000
--- a/arch/arm/mach-ixp2000/include/mach/ixdp2x00.h
+++ /dev/null
@@ -1,92 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/ixdp2x00.h
3 *
4 * Register and other defines for IXDP2[48]00 platforms
5 *
6 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
7 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
8 *
9 * Copyright (C) 2002 Intel Corp.
10 * Copyright (C) 2003-2004 MontaVista Software, Inc.
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 */
17#ifndef _IXDP2X00_H_
18#define _IXDP2X00_H_
19
20/*
21 * On board CPLD memory map
22 */
23#define IXDP2X00_PHYS_CPLD_BASE 0xc7000000
24#define IXDP2X00_VIRT_CPLD_BASE 0xfe000000
25#define IXDP2X00_CPLD_SIZE 0x00100000
26
27
28#define IXDP2X00_CPLD_REG(x) \
29 (volatile unsigned long *)(IXDP2X00_VIRT_CPLD_BASE | x)
30
31/*
32 * IXDP2400 CPLD registers
33 */
34#define IXDP2400_CPLD_SYSLED IXDP2X00_CPLD_REG(0x0)
35#define IXDP2400_CPLD_DISP_DATA IXDP2X00_CPLD_REG(0x4)
36#define IXDP2400_CPLD_CLOCK_SPEED IXDP2X00_CPLD_REG(0x8)
37#define IXDP2400_CPLD_INT_STAT IXDP2X00_CPLD_REG(0xc)
38#define IXDP2400_CPLD_REV IXDP2X00_CPLD_REG(0x10)
39#define IXDP2400_CPLD_SYS_CLK_M IXDP2X00_CPLD_REG(0x14)
40#define IXDP2400_CPLD_SYS_CLK_N IXDP2X00_CPLD_REG(0x18)
41#define IXDP2400_CPLD_INT_MASK IXDP2X00_CPLD_REG(0x48)
42
43/*
44 * IXDP2800 CPLD registers
45 */
46#define IXDP2800_CPLD_INT_STAT IXDP2X00_CPLD_REG(0x0)
47#define IXDP2800_CPLD_INT_MASK IXDP2X00_CPLD_REG(0x140)
48
49
50#define IXDP2X00_GPIO_I2C_ENABLE 0x02
51#define IXDP2X00_GPIO_SCL 0x07
52#define IXDP2X00_GPIO_SDA 0x06
53
54/*
55 * PCI devfns for on-board devices. We need these to be able to
56 * properly translate IRQs and for device removal.
57 */
58#define IXDP2400_SLAVE_ENET_DEVFN 0x18 /* Bus 1 */
59#define IXDP2400_MASTER_ENET_DEVFN 0x20 /* Bus 1 */
60#define IXDP2400_MEDIA_DEVFN 0x28 /* Bus 1 */
61#define IXDP2400_SWITCH_FABRIC_DEVFN 0x30 /* Bus 1 */
62
63#define IXDP2800_SLAVE_ENET_DEVFN 0x20 /* Bus 1 */
64#define IXDP2800_MASTER_ENET_DEVFN 0x18 /* Bus 1 */
65#define IXDP2800_SWITCH_FABRIC_DEVFN 0x30 /* Bus 1 */
66
67#define IXDP2X00_P2P_DEVFN 0x20 /* Bus 0 */
68#define IXDP2X00_21555_DEVFN 0x30 /* Bus 0 */
69#define IXDP2X00_SLAVE_NPU_DEVFN 0x28 /* Bus 1 */
70#define IXDP2X00_PMC_DEVFN 0x38 /* Bus 1 */
71#define IXDP2X00_MASTER_NPU_DEVFN 0x38 /* Bus 1 */
72
73#ifndef __ASSEMBLY__
74/*
75 * The master NPU is always PCI master.
76 */
77static inline unsigned int ixdp2x00_master_npu(void)
78{
79 return !!ixp2000_is_pcimaster();
80}
81
82/*
83 * Helper functions used by ixdp2400 and ixdp2800 specific code
84 */
85void ixdp2x00_init_irq(volatile unsigned long*, volatile unsigned long *, unsigned long);
86void ixdp2x00_slave_pci_postinit(void);
87void ixdp2x00_init_machine(void);
88void ixdp2x00_map_io(void);
89
90#endif
91
92#endif /*_IXDP2X00_H_ */
diff --git a/arch/arm/mach-ixp2000/include/mach/ixdp2x01.h b/arch/arm/mach-ixp2000/include/mach/ixdp2x01.h
deleted file mode 100644
index 4c1f04083e54..000000000000
--- a/arch/arm/mach-ixp2000/include/mach/ixdp2x01.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/ixdp2x01.h
3 *
4 * Platform definitions for IXDP2X01 && IXDP2801 systems
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2004 (c) MontaVista Software, Inc.
9 *
10 * Based on original code Copyright (c) 2002-2003 Intel Corporation
11 *
12 * This file is licensed under the terms of the GNU General Public
13 * License version 2. This program is licensed "as is" without any
14 * warranty of any kind, whether express or implied.
15 */
16
17#ifndef __IXDP2X01_H__
18#define __IXDP2X01_H__
19
20#define IXDP2X01_PHYS_CPLD_BASE 0xc6024000
21#define IXDP2X01_VIRT_CPLD_BASE 0xfe000000
22#define IXDP2X01_CPLD_REGION_SIZE 0x00100000
23
24#define IXDP2X01_CPLD_VIRT_REG(reg) (volatile unsigned long*)(IXDP2X01_VIRT_CPLD_BASE | reg)
25#define IXDP2X01_CPLD_PHYS_REG(reg) (IXDP2X01_PHYS_CPLD_BASE | reg)
26
27#define IXDP2X01_UART1_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x40)
28#define IXDP2X01_UART1_PHYS_BASE IXDP2X01_CPLD_PHYS_REG(0x40)
29
30#define IXDP2X01_UART2_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x60)
31#define IXDP2X01_UART2_PHYS_BASE IXDP2X01_CPLD_PHYS_REG(0x60)
32
33#define IXDP2X01_CS8900_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x80)
34#define IXDP2X01_CS8900_VIRT_END (IXDP2X01_CS8900_VIRT_BASE + 16)
35
36#define IXDP2X01_CPLD_RESET_REG IXDP2X01_CPLD_VIRT_REG(0x00)
37#define IXDP2X01_INT_MASK_SET_REG IXDP2X01_CPLD_VIRT_REG(0x08)
38#define IXDP2X01_INT_STAT_REG IXDP2X01_CPLD_VIRT_REG(0x0C)
39#define IXDP2X01_INT_RAW_REG IXDP2X01_CPLD_VIRT_REG(0x10)
40#define IXDP2X01_INT_MASK_CLR_REG IXDP2X01_INT_RAW_REG
41#define IXDP2X01_INT_SIM_REG IXDP2X01_CPLD_VIRT_REG(0x14)
42
43#define IXDP2X01_CPLD_FLASH_REG IXDP2X01_CPLD_VIRT_REG(0x20)
44
45#define IXDP2X01_CPLD_FLASH_INTERN 0x8000
46#define IXDP2X01_CPLD_FLASH_BANK_MASK 0xF
47#define IXDP2X01_FLASH_WINDOW_BITS 25
48#define IXDP2X01_FLASH_WINDOW_SIZE (1 << IXDP2X01_FLASH_WINDOW_BITS)
49#define IXDP2X01_FLASH_WINDOW_MASK (IXDP2X01_FLASH_WINDOW_SIZE - 1)
50
51#define IXDP2X01_UART_CLK 1843200
52
53#define IXDP2X01_GPIO_I2C_ENABLE 0x02
54#define IXDP2X01_GPIO_SCL 0x07
55#define IXDP2X01_GPIO_SDA 0x06
56
57#endif /* __IXDP2x01_H__ */
diff --git a/arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h b/arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h
deleted file mode 100644
index 822f63f2f4a2..000000000000
--- a/arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h
+++ /dev/null
@@ -1,451 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h
3 *
4 * Chipset register definitions for IXP2400/2800 based systems.
5 *
6 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
7 *
8 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
9 *
10 * Copyright (C) 2002 Intel Corp.
11 * Copyright (C) 2003-2004 MontaVista Software, Inc.
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 */
18#ifndef _IXP2000_REGS_H_
19#define _IXP2000_REGS_H_
20
21/*
22 * IXP2000 linux memory map:
23 *
24 * virt phys size
25 * fb000000 db000000 16M PCI CFG1
26 * fc000000 da000000 16M PCI CFG0
27 * fd000000 d8000000 16M PCI I/O
28 * fe[0-7]00000 8M per-platform mappings
29 * fe900000 80000000 1M SRAM #0 (first MB)
30 * fea00000 cb400000 1M SCRATCH ring get/put
31 * feb00000 c8000000 1M MSF
32 * fec00000 df000000 1M PCI CSRs
33 * fed00000 de000000 1M PCI CREG
34 * fee00000 d6000000 1M INTCTL
35 * fef00000 c0000000 1M CAP
36 */
37
38/*
39 * Static I/O regions.
40 *
41 * Most of the registers are clumped in 4K regions spread throughout
42 * the 0xc0000000 -> 0xc0100000 address range, but we just map in
43 * the whole range using a single 1 MB section instead of small
44 * 4K pages.
45 *
46 * CAP stands for CSR Access Proxy.
47 *
48 * If you change the virtual address of this mapping, please propagate
49 * the change to arch/arm/kernel/debug.S, which hardcodes the virtual
50 * address of the UART located in this region.
51 */
52
53#define IXP2000_CAP_PHYS_BASE 0xc0000000
54#define IXP2000_CAP_VIRT_BASE 0xfef00000
55#define IXP2000_CAP_SIZE 0x00100000
56
57/*
58 * Addresses for specific on-chip peripherals.
59 */
60#define IXP2000_SLOWPORT_CSR_VIRT_BASE 0xfef80000
61#define IXP2000_GLOBAL_REG_VIRT_BASE 0xfef04000
62#define IXP2000_UART_PHYS_BASE 0xc0030000
63#define IXP2000_UART_VIRT_BASE 0xfef30000
64#define IXP2000_TIMER_VIRT_BASE 0xfef20000
65#define IXP2000_UENGINE_CSR_VIRT_BASE 0xfef18000
66#define IXP2000_GPIO_VIRT_BASE 0xfef10000
67
68/*
69 * Devices outside of the 0xc0000000 -> 0xc0100000 range. The virtual
70 * addresses of the INTCTL and PCI_CSR mappings are hardcoded in
71 * entry-macro.S, so if you ever change these please propagate
72 * the change.
73 */
74#define IXP2000_INTCTL_PHYS_BASE 0xd6000000
75#define IXP2000_INTCTL_VIRT_BASE 0xfee00000
76#define IXP2000_INTCTL_SIZE 0x00100000
77
78#define IXP2000_PCI_CREG_PHYS_BASE 0xde000000
79#define IXP2000_PCI_CREG_VIRT_BASE 0xfed00000
80#define IXP2000_PCI_CREG_SIZE 0x00100000
81
82#define IXP2000_PCI_CSR_PHYS_BASE 0xdf000000
83#define IXP2000_PCI_CSR_VIRT_BASE 0xfec00000
84#define IXP2000_PCI_CSR_SIZE 0x00100000
85
86#define IXP2000_MSF_PHYS_BASE 0xc8000000
87#define IXP2000_MSF_VIRT_BASE 0xfeb00000
88#define IXP2000_MSF_SIZE 0x00100000
89
90#define IXP2000_SCRATCH_RING_PHYS_BASE 0xcb400000
91#define IXP2000_SCRATCH_RING_VIRT_BASE 0xfea00000
92#define IXP2000_SCRATCH_RING_SIZE 0x00100000
93
94#define IXP2000_SRAM0_PHYS_BASE 0x80000000
95#define IXP2000_SRAM0_VIRT_BASE 0xfe900000
96#define IXP2000_SRAM0_SIZE 0x00100000
97
98#define IXP2000_PCI_IO_PHYS_BASE 0xd8000000
99#define IXP2000_PCI_IO_VIRT_BASE 0xfd000000
100#define IXP2000_PCI_IO_SIZE 0x01000000
101
102#define IXP2000_PCI_CFG0_PHYS_BASE 0xda000000
103#define IXP2000_PCI_CFG0_VIRT_BASE 0xfc000000
104#define IXP2000_PCI_CFG0_SIZE 0x01000000
105
106#define IXP2000_PCI_CFG1_PHYS_BASE 0xdb000000
107#define IXP2000_PCI_CFG1_VIRT_BASE 0xfb000000
108#define IXP2000_PCI_CFG1_SIZE 0x01000000
109
110/*
111 * Timers
112 */
113#define IXP2000_TIMER_REG(x) ((volatile unsigned long*)(IXP2000_TIMER_VIRT_BASE | (x)))
114/* Timer control */
115#define IXP2000_T1_CTL IXP2000_TIMER_REG(0x00)
116#define IXP2000_T2_CTL IXP2000_TIMER_REG(0x04)
117#define IXP2000_T3_CTL IXP2000_TIMER_REG(0x08)
118#define IXP2000_T4_CTL IXP2000_TIMER_REG(0x0c)
119/* Store initial value */
120#define IXP2000_T1_CLD IXP2000_TIMER_REG(0x10)
121#define IXP2000_T2_CLD IXP2000_TIMER_REG(0x14)
122#define IXP2000_T3_CLD IXP2000_TIMER_REG(0x18)
123#define IXP2000_T4_CLD IXP2000_TIMER_REG(0x1c)
124/* Read current value */
125#define IXP2000_T1_CSR IXP2000_TIMER_REG(0x20)
126#define IXP2000_T2_CSR IXP2000_TIMER_REG(0x24)
127#define IXP2000_T3_CSR IXP2000_TIMER_REG(0x28)
128#define IXP2000_T4_CSR IXP2000_TIMER_REG(0x2c)
129/* Clear associated timer interrupt */
130#define IXP2000_T1_CLR IXP2000_TIMER_REG(0x30)
131#define IXP2000_T2_CLR IXP2000_TIMER_REG(0x34)
132#define IXP2000_T3_CLR IXP2000_TIMER_REG(0x38)
133#define IXP2000_T4_CLR IXP2000_TIMER_REG(0x3c)
134/* Timer watchdog enable for T4 */
135#define IXP2000_TWDE IXP2000_TIMER_REG(0x40)
136
137#define WDT_ENABLE 0x00000001
138#define TIMER_DIVIDER_256 0x00000008
139#define TIMER_ENABLE 0x00000080
140#define IRQ_MASK_TIMER1 (1 << 4)
141
142/*
143 * Interrupt controller registers
144 */
145#define IXP2000_INTCTL_REG(x) (volatile unsigned long*)(IXP2000_INTCTL_VIRT_BASE | (x))
146#define IXP2000_IRQ_STATUS IXP2000_INTCTL_REG(0x08)
147#define IXP2000_IRQ_ENABLE IXP2000_INTCTL_REG(0x10)
148#define IXP2000_IRQ_ENABLE_SET IXP2000_INTCTL_REG(0x10)
149#define IXP2000_IRQ_ENABLE_CLR IXP2000_INTCTL_REG(0x18)
150#define IXP2000_FIQ_ENABLE_CLR IXP2000_INTCTL_REG(0x14)
151#define IXP2000_IRQ_ERR_STATUS IXP2000_INTCTL_REG(0x24)
152#define IXP2000_IRQ_ERR_ENABLE_SET IXP2000_INTCTL_REG(0x2c)
153#define IXP2000_FIQ_ERR_ENABLE_CLR IXP2000_INTCTL_REG(0x30)
154#define IXP2000_IRQ_ERR_ENABLE_CLR IXP2000_INTCTL_REG(0x34)
155#define IXP2000_IRQ_THD_RAW_STATUS_A_0 IXP2000_INTCTL_REG(0x60)
156#define IXP2000_IRQ_THD_RAW_STATUS_A_1 IXP2000_INTCTL_REG(0x64)
157#define IXP2000_IRQ_THD_RAW_STATUS_A_2 IXP2000_INTCTL_REG(0x68)
158#define IXP2000_IRQ_THD_RAW_STATUS_A_3 IXP2000_INTCTL_REG(0x6c)
159#define IXP2000_IRQ_THD_RAW_STATUS_B_0 IXP2000_INTCTL_REG(0x80)
160#define IXP2000_IRQ_THD_RAW_STATUS_B_1 IXP2000_INTCTL_REG(0x84)
161#define IXP2000_IRQ_THD_RAW_STATUS_B_2 IXP2000_INTCTL_REG(0x88)
162#define IXP2000_IRQ_THD_RAW_STATUS_B_3 IXP2000_INTCTL_REG(0x8c)
163#define IXP2000_IRQ_THD_STATUS_A_0 IXP2000_INTCTL_REG(0xe0)
164#define IXP2000_IRQ_THD_STATUS_A_1 IXP2000_INTCTL_REG(0xe4)
165#define IXP2000_IRQ_THD_STATUS_A_2 IXP2000_INTCTL_REG(0xe8)
166#define IXP2000_IRQ_THD_STATUS_A_3 IXP2000_INTCTL_REG(0xec)
167#define IXP2000_IRQ_THD_STATUS_B_0 IXP2000_INTCTL_REG(0x100)
168#define IXP2000_IRQ_THD_STATUS_B_1 IXP2000_INTCTL_REG(0x104)
169#define IXP2000_IRQ_THD_STATUS_B_2 IXP2000_INTCTL_REG(0x108)
170#define IXP2000_IRQ_THD_STATUS_B_3 IXP2000_INTCTL_REG(0x10c)
171#define IXP2000_IRQ_THD_ENABLE_SET_A_0 IXP2000_INTCTL_REG(0x160)
172#define IXP2000_IRQ_THD_ENABLE_SET_A_1 IXP2000_INTCTL_REG(0x164)
173#define IXP2000_IRQ_THD_ENABLE_SET_A_2 IXP2000_INTCTL_REG(0x168)
174#define IXP2000_IRQ_THD_ENABLE_SET_A_3 IXP2000_INTCTL_REG(0x16c)
175#define IXP2000_IRQ_THD_ENABLE_SET_B_0 IXP2000_INTCTL_REG(0x180)
176#define IXP2000_IRQ_THD_ENABLE_SET_B_1 IXP2000_INTCTL_REG(0x184)
177#define IXP2000_IRQ_THD_ENABLE_SET_B_2 IXP2000_INTCTL_REG(0x188)
178#define IXP2000_IRQ_THD_ENABLE_SET_B_3 IXP2000_INTCTL_REG(0x18c)
179#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_0 IXP2000_INTCTL_REG(0x1e0)
180#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_1 IXP2000_INTCTL_REG(0x1e4)
181#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_2 IXP2000_INTCTL_REG(0x1e8)
182#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_3 IXP2000_INTCTL_REG(0x1ec)
183#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_0 IXP2000_INTCTL_REG(0x200)
184#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_1 IXP2000_INTCTL_REG(0x204)
185#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_2 IXP2000_INTCTL_REG(0x208)
186#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_3 IXP2000_INTCTL_REG(0x20c)
187
188/*
189 * Mask of valid IRQs in the 32-bit IRQ register. We use
190 * this to mark certain IRQs as being invalid.
191 */
192#define IXP2000_VALID_IRQ_MASK 0x0f0fffff
193
194/*
195 * PCI config register access from core
196 */
197#define IXP2000_PCI_CREG(x) (volatile unsigned long*)(IXP2000_PCI_CREG_VIRT_BASE | (x))
198#define IXP2000_PCI_CMDSTAT IXP2000_PCI_CREG(0x04)
199#define IXP2000_PCI_CSR_BAR IXP2000_PCI_CREG(0x10)
200#define IXP2000_PCI_SRAM_BAR IXP2000_PCI_CREG(0x14)
201#define IXP2000_PCI_SDRAM_BAR IXP2000_PCI_CREG(0x18)
202
203/*
204 * PCI CSRs
205 */
206#define IXP2000_PCI_CSR(x) (volatile unsigned long*)(IXP2000_PCI_CSR_VIRT_BASE | (x))
207
208/*
209 * PCI outbound interrupts
210 */
211#define IXP2000_PCI_OUT_INT_STATUS IXP2000_PCI_CSR(0x30)
212#define IXP2000_PCI_OUT_INT_MASK IXP2000_PCI_CSR(0x34)
213/*
214 * PCI communications
215 */
216#define IXP2000_PCI_MAILBOX0 IXP2000_PCI_CSR(0x50)
217#define IXP2000_PCI_MAILBOX1 IXP2000_PCI_CSR(0x54)
218#define IXP2000_PCI_MAILBOX2 IXP2000_PCI_CSR(0x58)
219#define IXP2000_PCI_MAILBOX3 IXP2000_PCI_CSR(0x5C)
220#define IXP2000_XSCALE_DOORBELL IXP2000_PCI_CSR(0x60)
221#define IXP2000_XSCALE_DOORBELL_SETUP IXP2000_PCI_CSR(0x64)
222#define IXP2000_PCI_DOORBELL IXP2000_PCI_CSR(0x70)
223#define IXP2000_PCI_DOORBELL_SETUP IXP2000_PCI_CSR(0x74)
224
225/*
226 * DMA engines
227 */
228#define IXP2000_PCI_CH1_BYTE_CNT IXP2000_PCI_CSR(0x80)
229#define IXP2000_PCI_CH1_ADDR IXP2000_PCI_CSR(0x84)
230#define IXP2000_PCI_CH1_DRAM_ADDR IXP2000_PCI_CSR(0x88)
231#define IXP2000_PCI_CH1_DESC_PTR IXP2000_PCI_CSR(0x8C)
232#define IXP2000_PCI_CH1_CNTRL IXP2000_PCI_CSR(0x90)
233#define IXP2000_PCI_CH1_ME_PARAM IXP2000_PCI_CSR(0x94)
234#define IXP2000_PCI_CH2_BYTE_CNT IXP2000_PCI_CSR(0xA0)
235#define IXP2000_PCI_CH2_ADDR IXP2000_PCI_CSR(0xA4)
236#define IXP2000_PCI_CH2_DRAM_ADDR IXP2000_PCI_CSR(0xA8)
237#define IXP2000_PCI_CH2_DESC_PTR IXP2000_PCI_CSR(0xAC)
238#define IXP2000_PCI_CH2_CNTRL IXP2000_PCI_CSR(0xB0)
239#define IXP2000_PCI_CH2_ME_PARAM IXP2000_PCI_CSR(0xB4)
240#define IXP2000_PCI_CH3_BYTE_CNT IXP2000_PCI_CSR(0xC0)
241#define IXP2000_PCI_CH3_ADDR IXP2000_PCI_CSR(0xC4)
242#define IXP2000_PCI_CH3_DRAM_ADDR IXP2000_PCI_CSR(0xC8)
243#define IXP2000_PCI_CH3_DESC_PTR IXP2000_PCI_CSR(0xCC)
244#define IXP2000_PCI_CH3_CNTRL IXP2000_PCI_CSR(0xD0)
245#define IXP2000_PCI_CH3_ME_PARAM IXP2000_PCI_CSR(0xD4)
246#define IXP2000_DMA_INF_MODE IXP2000_PCI_CSR(0xE0)
247/*
248 * Size masks for BARs
249 */
250#define IXP2000_PCI_SRAM_BASE_ADDR_MASK IXP2000_PCI_CSR(0xFC)
251#define IXP2000_PCI_DRAM_BASE_ADDR_MASK IXP2000_PCI_CSR(0x100)
252/*
253 * Control and uEngine related
254 */
255#define IXP2000_PCI_CONTROL IXP2000_PCI_CSR(0x13C)
256#define IXP2000_PCI_ADDR_EXT IXP2000_PCI_CSR(0x140)
257#define IXP2000_PCI_ME_PUSH_STATUS IXP2000_PCI_CSR(0x148)
258#define IXP2000_PCI_ME_PUSH_EN IXP2000_PCI_CSR(0x14C)
259#define IXP2000_PCI_ERR_STATUS IXP2000_PCI_CSR(0x150)
260#define IXP2000_PCI_ERR_ENABLE IXP2000_PCI_CSR(0x154)
261/*
262 * Inbound PCI interrupt control
263 */
264#define IXP2000_PCI_XSCALE_INT_STATUS IXP2000_PCI_CSR(0x158)
265#define IXP2000_PCI_XSCALE_INT_ENABLE IXP2000_PCI_CSR(0x15C)
266
267#define IXP2000_PCICNTL_PNR (1<<17) /* PCI not Reset bit of PCI_CONTROL */
268#define IXP2000_PCICNTL_PCF (1<<28) /* PCI Central function bit */
269#define IXP2000_XSCALE_INT (1<<1) /* Interrupt from XScale to PCI */
270
271/* These are from the IRQ register in the PCI ISR register */
272#define PCI_CONTROL_BE_DEO (1 << 22) /* Big Endian Data Enable Out */
273#define PCI_CONTROL_BE_DEI (1 << 21) /* Big Endian Data Enable In */
274#define PCI_CONTROL_BE_BEO (1 << 20) /* Big Endian Byte Enable Out */
275#define PCI_CONTROL_BE_BEI (1 << 19) /* Big Endian Byte Enable In */
276#define PCI_CONTROL_IEE (1 << 17) /* I/O cycle Endian swap Enable */
277
278#define IXP2000_PCI_RST_REL (1 << 2)
279#define CFG_RST_DIR (*IXP2000_PCI_CONTROL & IXP2000_PCICNTL_PCF)
280#define CFG_PCI_BOOT_HOST (1 << 2)
281#define CFG_BOOT_PROM (1 << 1)
282
283/*
284 * SlowPort CSRs
285 *
286 * The slowport is used to access things like flash, SONET framer control
287 * ports, slave microprocessors, CPLDs, and others of chip memory mapped
288 * peripherals.
289 */
290#define SLOWPORT_CSR(x) (volatile unsigned long*)(IXP2000_SLOWPORT_CSR_VIRT_BASE | (x))
291
292#define IXP2000_SLOWPORT_CCR SLOWPORT_CSR(0x00)
293#define IXP2000_SLOWPORT_WTC1 SLOWPORT_CSR(0x04)
294#define IXP2000_SLOWPORT_WTC2 SLOWPORT_CSR(0x08)
295#define IXP2000_SLOWPORT_RTC1 SLOWPORT_CSR(0x0c)
296#define IXP2000_SLOWPORT_RTC2 SLOWPORT_CSR(0x10)
297#define IXP2000_SLOWPORT_FSR SLOWPORT_CSR(0x14)
298#define IXP2000_SLOWPORT_PCR SLOWPORT_CSR(0x18)
299#define IXP2000_SLOWPORT_ADC SLOWPORT_CSR(0x1C)
300#define IXP2000_SLOWPORT_FAC SLOWPORT_CSR(0x20)
301#define IXP2000_SLOWPORT_FRM SLOWPORT_CSR(0x24)
302#define IXP2000_SLOWPORT_FIN SLOWPORT_CSR(0x28)
303
304/*
305 * CCR values.
306 * The CCR configures the clock division for the slowport interface.
307 */
308#define SLOWPORT_CCR_DIV_1 0x00
309#define SLOWPORT_CCR_DIV_2 0x01
310#define SLOWPORT_CCR_DIV_4 0x02
311#define SLOWPORT_CCR_DIV_6 0x03
312#define SLOWPORT_CCR_DIV_8 0x04
313#define SLOWPORT_CCR_DIV_10 0x05
314#define SLOWPORT_CCR_DIV_12 0x06
315#define SLOWPORT_CCR_DIV_14 0x07
316#define SLOWPORT_CCR_DIV_16 0x08
317#define SLOWPORT_CCR_DIV_18 0x09
318#define SLOWPORT_CCR_DIV_20 0x0a
319#define SLOWPORT_CCR_DIV_22 0x0b
320#define SLOWPORT_CCR_DIV_24 0x0c
321#define SLOWPORT_CCR_DIV_26 0x0d
322#define SLOWPORT_CCR_DIV_28 0x0e
323#define SLOWPORT_CCR_DIV_30 0x0f
324
325/*
326 * PCR values. PCR configure the mode of the interface.
327 */
328#define SLOWPORT_MODE_FLASH 0x00
329#define SLOWPORT_MODE_LUCENT 0x01
330#define SLOWPORT_MODE_PMC_SIERRA 0x02
331#define SLOWPORT_MODE_INTEL_UP 0x03
332#define SLOWPORT_MODE_MOTOROLA_UP 0x04
333
334/*
335 * ADC values. Defines data and address bus widths.
336 */
337#define SLOWPORT_ADDR_WIDTH_8 0x00
338#define SLOWPORT_ADDR_WIDTH_16 0x01
339#define SLOWPORT_ADDR_WIDTH_24 0x02
340#define SLOWPORT_ADDR_WIDTH_32 0x03
341#define SLOWPORT_DATA_WIDTH_8 0x00
342#define SLOWPORT_DATA_WIDTH_16 0x10
343#define SLOWPORT_DATA_WIDTH_24 0x20
344#define SLOWPORT_DATA_WIDTH_32 0x30
345
346/*
347 * Masks and shifts for various fields in the WTC and RTC registers.
348 */
349#define SLOWPORT_WRTC_MASK_HD 0x0003
350#define SLOWPORT_WRTC_MASK_PW 0x003c
351#define SLOWPORT_WRTC_MASK_SU 0x03c0
352
353#define SLOWPORT_WRTC_SHIFT_HD 0x00
354#define SLOWPORT_WRTC_SHIFT_SU 0x02
355#define SLOWPORT_WRTC_SHFIT_PW 0x06
356
357
358/*
359 * GPIO registers & GPIO interface.
360 */
361#define IXP2000_GPIO_REG(x) ((volatile unsigned long*)(IXP2000_GPIO_VIRT_BASE+(x)))
362#define IXP2000_GPIO_PLR IXP2000_GPIO_REG(0x00)
363#define IXP2000_GPIO_PDPR IXP2000_GPIO_REG(0x04)
364#define IXP2000_GPIO_PDSR IXP2000_GPIO_REG(0x08)
365#define IXP2000_GPIO_PDCR IXP2000_GPIO_REG(0x0c)
366#define IXP2000_GPIO_POPR IXP2000_GPIO_REG(0x10)
367#define IXP2000_GPIO_POSR IXP2000_GPIO_REG(0x14)
368#define IXP2000_GPIO_POCR IXP2000_GPIO_REG(0x18)
369#define IXP2000_GPIO_REDR IXP2000_GPIO_REG(0x1c)
370#define IXP2000_GPIO_FEDR IXP2000_GPIO_REG(0x20)
371#define IXP2000_GPIO_EDSR IXP2000_GPIO_REG(0x24)
372#define IXP2000_GPIO_LSHR IXP2000_GPIO_REG(0x28)
373#define IXP2000_GPIO_LSLR IXP2000_GPIO_REG(0x2c)
374#define IXP2000_GPIO_LDSR IXP2000_GPIO_REG(0x30)
375#define IXP2000_GPIO_INER IXP2000_GPIO_REG(0x34)
376#define IXP2000_GPIO_INSR IXP2000_GPIO_REG(0x38)
377#define IXP2000_GPIO_INCR IXP2000_GPIO_REG(0x3c)
378#define IXP2000_GPIO_INST IXP2000_GPIO_REG(0x40)
379
380/*
381 * "Global" registers...whatever that's supposed to mean.
382 */
383#define GLOBAL_REG_BASE (IXP2000_GLOBAL_REG_VIRT_BASE + 0x0a00)
384#define GLOBAL_REG(x) (volatile unsigned long*)(GLOBAL_REG_BASE | (x))
385
386#define IXP2000_MAJ_PROD_TYPE_MASK 0x001F0000
387#define IXP2000_MAJ_PROD_TYPE_IXP2000 0x00000000
388#define IXP2000_MIN_PROD_TYPE_MASK 0x0000FF00
389#define IXP2000_MIN_PROD_TYPE_IXP2400 0x00000200
390#define IXP2000_MIN_PROD_TYPE_IXP2850 0x00000100
391#define IXP2000_MIN_PROD_TYPE_IXP2800 0x00000000
392#define IXP2000_MAJ_REV_MASK 0x000000F0
393#define IXP2000_MIN_REV_MASK 0x0000000F
394#define IXP2000_PROD_ID_MASK 0xFFFFFFFF
395
396#define IXP2000_PRODUCT_ID GLOBAL_REG(0x00)
397#define IXP2000_MISC_CONTROL GLOBAL_REG(0x04)
398#define IXP2000_MSF_CLK_CNTRL GLOBAL_REG(0x08)
399#define IXP2000_RESET0 GLOBAL_REG(0x0c)
400#define IXP2000_RESET1 GLOBAL_REG(0x10)
401#define IXP2000_CCR GLOBAL_REG(0x14)
402#define IXP2000_STRAP_OPTIONS GLOBAL_REG(0x18)
403
404#define RSTALL (1 << 16)
405#define WDT_RESET_ENABLE 0x01000000
406
407
408/*
409 * MSF registers. The IXP2400 and IXP2800 have somewhat different MSF
410 * units, but the registers that differ between the two don't overlap,
411 * so we can have one register list for both.
412 */
413#define IXP2000_MSF_REG(x) ((volatile unsigned long*)(IXP2000_MSF_VIRT_BASE + (x)))
414#define IXP2000_MSF_RX_CONTROL IXP2000_MSF_REG(0x0000)
415#define IXP2000_MSF_TX_CONTROL IXP2000_MSF_REG(0x0004)
416#define IXP2000_MSF_INTERRUPT_STATUS IXP2000_MSF_REG(0x0008)
417#define IXP2000_MSF_INTERRUPT_ENABLE IXP2000_MSF_REG(0x000c)
418#define IXP2000_MSF_CSIX_TYPE_MAP IXP2000_MSF_REG(0x0010)
419#define IXP2000_MSF_FC_EGRESS_STATUS IXP2000_MSF_REG(0x0014)
420#define IXP2000_MSF_FC_INGRESS_STATUS IXP2000_MSF_REG(0x0018)
421#define IXP2000_MSF_HWM_CONTROL IXP2000_MSF_REG(0x0024)
422#define IXP2000_MSF_FC_STATUS_OVERRIDE IXP2000_MSF_REG(0x0028)
423#define IXP2000_MSF_CLOCK_CONTROL IXP2000_MSF_REG(0x002c)
424#define IXP2000_MSF_RX_PORT_MAP IXP2000_MSF_REG(0x0040)
425#define IXP2000_MSF_RBUF_ELEMENT_DONE IXP2000_MSF_REG(0x0044)
426#define IXP2000_MSF_RX_MPHY_POLL_LIMIT IXP2000_MSF_REG(0x0048)
427#define IXP2000_MSF_RX_CALENDAR_LENGTH IXP2000_MSF_REG(0x0048)
428#define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_0 IXP2000_MSF_REG(0x0050)
429#define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_1 IXP2000_MSF_REG(0x0054)
430#define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_2 IXP2000_MSF_REG(0x0058)
431#define IXP2000_MSF_TX_SEQUENCE_0 IXP2000_MSF_REG(0x0060)
432#define IXP2000_MSF_TX_SEQUENCE_1 IXP2000_MSF_REG(0x0064)
433#define IXP2000_MSF_TX_SEQUENCE_2 IXP2000_MSF_REG(0x0068)
434#define IXP2000_MSF_TX_MPHY_POLL_LIMIT IXP2000_MSF_REG(0x0070)
435#define IXP2000_MSF_TX_CALENDAR_LENGTH IXP2000_MSF_REG(0x0070)
436#define IXP2000_MSF_RX_UP_CONTROL_0 IXP2000_MSF_REG(0x0080)
437#define IXP2000_MSF_RX_UP_CONTROL_1 IXP2000_MSF_REG(0x0084)
438#define IXP2000_MSF_RX_UP_CONTROL_2 IXP2000_MSF_REG(0x0088)
439#define IXP2000_MSF_RX_UP_CONTROL_3 IXP2000_MSF_REG(0x008c)
440#define IXP2000_MSF_TX_UP_CONTROL_0 IXP2000_MSF_REG(0x0090)
441#define IXP2000_MSF_TX_UP_CONTROL_1 IXP2000_MSF_REG(0x0094)
442#define IXP2000_MSF_TX_UP_CONTROL_2 IXP2000_MSF_REG(0x0098)
443#define IXP2000_MSF_TX_UP_CONTROL_3 IXP2000_MSF_REG(0x009c)
444#define IXP2000_MSF_TRAIN_DATA IXP2000_MSF_REG(0x00a0)
445#define IXP2000_MSF_TRAIN_CALENDAR IXP2000_MSF_REG(0x00a4)
446#define IXP2000_MSF_TRAIN_FLOW_CONTROL IXP2000_MSF_REG(0x00a8)
447#define IXP2000_MSF_TX_CALENDAR_0 IXP2000_MSF_REG(0x1000)
448#define IXP2000_MSF_RX_PORT_CALENDAR_STATUS IXP2000_MSF_REG(0x1400)
449
450
451#endif /* _IXP2000_H_ */
diff --git a/arch/arm/mach-ixp2000/include/mach/memory.h b/arch/arm/mach-ixp2000/include/mach/memory.h
deleted file mode 100644
index 5f0c4fd4076a..000000000000
--- a/arch/arm/mach-ixp2000/include/mach/memory.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/memory.h
3 *
4 * Copyright (c) 2002 Intel Corp.
5 * Copyright (c) 2003-2004 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#ifndef __ASM_ARCH_MEMORY_H
14#define __ASM_ARCH_MEMORY_H
15
16#define PLAT_PHYS_OFFSET UL(0x00000000)
17
18#include <mach/ixp2000-regs.h>
19
20#define IXP2000_PCI_SDRAM_OFFSET (*IXP2000_PCI_SDRAM_BAR & 0xfffffff0)
21
22#define __phys_to_bus(x) ((x) + (IXP2000_PCI_SDRAM_OFFSET - PHYS_OFFSET))
23#define __bus_to_phys(x) ((x) - (IXP2000_PCI_SDRAM_OFFSET - PHYS_OFFSET))
24
25#define __virt_to_bus(v) __phys_to_bus(__virt_to_phys(v))
26#define __bus_to_virt(b) __phys_to_virt(__bus_to_phys(b))
27#define __pfn_to_bus(p) __phys_to_bus(__pfn_to_phys(p))
28#define __bus_to_pfn(b) __phys_to_pfn(__bus_to_phys(b))
29
30#endif
31
diff --git a/arch/arm/mach-ixp2000/include/mach/platform.h b/arch/arm/mach-ixp2000/include/mach/platform.h
deleted file mode 100644
index 6b500c0858be..000000000000
--- a/arch/arm/mach-ixp2000/include/mach/platform.h
+++ /dev/null
@@ -1,153 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/platform.h
3 *
4 * Various bits of code used by platform-level code.
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2004 (c) MontaVista Software, Inc.
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15
16#ifndef __ASSEMBLY__
17
18static inline unsigned long ixp2000_reg_read(volatile void *reg)
19{
20 return *((volatile unsigned long *)reg);
21}
22
23static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
24{
25 *((volatile unsigned long *)reg) = val;
26}
27
28/*
29 * On the IXP2400, we can't use XCB=000 due to chip bugs. We use
30 * XCB=101 instead, but that makes all I/O accesses bufferable. This
31 * is not a problem in general, but we do have to be slightly more
32 * careful because I/O writes are no longer automatically flushed out
33 * of the write buffer.
34 *
35 * In cases where we want to make sure that a write has been flushed
36 * out of the write buffer before we proceed, for example when masking
37 * a device interrupt before re-enabling IRQs in CPSR, we can use this
38 * function, ixp2000_reg_wrb, which performs a write, a readback, and
39 * issues a dummy instruction dependent on the value of the readback
40 * (mov rX, rX) to make sure that the readback has completed before we
41 * continue.
42 */
43static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val)
44{
45 unsigned long dummy;
46
47 *((volatile unsigned long *)reg) = val;
48
49 dummy = *((volatile unsigned long *)reg);
50 __asm__ __volatile__("mov %0, %0" : "+r" (dummy));
51}
52
53/*
54 * Boards may multiplex different devices on the 2nd channel of
55 * the slowport interface that each need different configuration
56 * settings. For example, the IXDP2400 uses channel 2 on the interface
57 * to access the CPLD, the switch fabric card, and the media card. Each
58 * one needs a different mode so drivers must save/restore the mode
59 * before and after each operation.
60 *
61 * acquire_slowport(&your_config);
62 * ...
63 * do slowport operations
64 * ...
65 * release_slowport();
66 *
67 * Note that while you have the slowport, you are holding a spinlock,
68 * so your code should be written as if you explicitly acquired a lock.
69 *
70 * The configuration only affects device 2 on the slowport, so the
71 * MTD map driver does not acquire/release the slowport.
72 */
73struct slowport_cfg {
74 unsigned long CCR; /* Clock divide */
75 unsigned long WTC; /* Write Timing Control */
76 unsigned long RTC; /* Read Timing Control */
77 unsigned long PCR; /* Protocol Control Register */
78 unsigned long ADC; /* Address/Data Width Control */
79};
80
81
82void ixp2000_acquire_slowport(struct slowport_cfg *, struct slowport_cfg *);
83void ixp2000_release_slowport(struct slowport_cfg *);
84
85/*
86 * IXP2400 A0/A1 and IXP2800 A0/A1/A2 have broken slowport that requires
87 * tweaking of addresses in the MTD driver.
88 */
89static inline unsigned ixp2000_has_broken_slowport(void)
90{
91 unsigned long id = *IXP2000_PRODUCT_ID;
92 unsigned long id_prod = id & (IXP2000_MAJ_PROD_TYPE_MASK |
93 IXP2000_MIN_PROD_TYPE_MASK);
94 return (((id_prod ==
95 /* fixed in IXP2400-B0 */
96 (IXP2000_MAJ_PROD_TYPE_IXP2000 |
97 IXP2000_MIN_PROD_TYPE_IXP2400)) &&
98 ((id & IXP2000_MAJ_REV_MASK) == 0)) ||
99 ((id_prod ==
100 /* fixed in IXP2800-B0 */
101 (IXP2000_MAJ_PROD_TYPE_IXP2000 |
102 IXP2000_MIN_PROD_TYPE_IXP2800)) &&
103 ((id & IXP2000_MAJ_REV_MASK) == 0)) ||
104 ((id_prod ==
105 /* fixed in IXP2850-B0 */
106 (IXP2000_MAJ_PROD_TYPE_IXP2000 |
107 IXP2000_MIN_PROD_TYPE_IXP2850)) &&
108 ((id & IXP2000_MAJ_REV_MASK) == 0)));
109}
110
111static inline unsigned int ixp2000_has_flash(void)
112{
113 return ((*IXP2000_STRAP_OPTIONS) & (CFG_BOOT_PROM));
114}
115
116static inline unsigned int ixp2000_is_pcimaster(void)
117{
118 return ((*IXP2000_STRAP_OPTIONS) & (CFG_PCI_BOOT_HOST));
119}
120
121void ixp2000_map_io(void);
122void ixp2000_uart_init(void);
123void ixp2000_init_irq(void);
124void ixp2000_init_time(unsigned long);
125void ixp2000_restart(char, const char *);
126unsigned long ixp2000_gettimeoffset(void);
127
128struct pci_sys_data;
129
130extern struct pci_ops ixp2000_pci_ops;
131u32 *ixp2000_pci_config_addr(unsigned int bus, unsigned int devfn, int where);
132void ixp2000_pci_preinit(void);
133int ixp2000_pci_setup(int, struct pci_sys_data*);
134int ixp2000_pci_read_config(struct pci_bus*, unsigned int, int, int, u32 *);
135int ixp2000_pci_write_config(struct pci_bus*, unsigned int, int, int, u32);
136
137/*
138 * Several of the IXP2000 systems have banked flash so we need to extend the
139 * flash_platform_data structure with some private pointers
140 */
141struct ixp2000_flash_data {
142 struct flash_platform_data *platform_data;
143 int nr_banks;
144 unsigned long (*bank_setup)(unsigned long);
145};
146
147struct ixp2000_i2c_pins {
148 unsigned long sda_pin;
149 unsigned long scl_pin;
150};
151
152
153#endif /* !__ASSEMBLY__ */
diff --git a/arch/arm/mach-ixp2000/include/mach/timex.h b/arch/arm/mach-ixp2000/include/mach/timex.h
deleted file mode 100644
index 835e659f93d4..000000000000
--- a/arch/arm/mach-ixp2000/include/mach/timex.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/timex.h
3 *
4 * IXP2000 architecture timex specifications
5 */
6
7
8/*
9 * Default clock is 50MHz APB, but platform code can override this
10 */
11#define CLOCK_TICK_RATE 50000000
12
13
diff --git a/arch/arm/mach-ixp2000/include/mach/uncompress.h b/arch/arm/mach-ixp2000/include/mach/uncompress.h
deleted file mode 100644
index ce363087df78..000000000000
--- a/arch/arm/mach-ixp2000/include/mach/uncompress.h
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/uncompress.h
3 *
4 *
5 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
6 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2002 Intel Corp.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 */
16
17#include <linux/serial_reg.h>
18
19#define UART_BASE 0xc0030000
20
21#define PHYS(x) ((volatile unsigned long *)(UART_BASE + x))
22
23#define UARTDR PHYS(0x00) /* Transmit reg dlab=0 */
24#define UARTDLL PHYS(0x00) /* Divisor Latch reg dlab=1*/
25#define UARTDLM PHYS(0x04) /* Divisor Latch reg dlab=1*/
26#define UARTIER PHYS(0x04) /* Interrupt enable reg */
27#define UARTFCR PHYS(0x08) /* FIFO control reg dlab =0*/
28#define UARTLCR PHYS(0x0c) /* Control reg */
29#define UARTSR PHYS(0x14) /* Status reg */
30
31
32static inline void putc(int c)
33{
34 int j = 0x1000;
35
36 while (--j && !(*UARTSR & UART_LSR_THRE))
37 barrier();
38
39 *UARTDR = c;
40}
41
42static inline void flush(void)
43{
44}
45
46#define arch_decomp_setup()
47#define arch_decomp_wdog()
diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c
deleted file mode 100644
index 4ec44801d303..000000000000
--- a/arch/arm/mach-ixp2000/ixdp2400.c
+++ /dev/null
@@ -1,180 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/ixdp2400.c
3 *
4 * IXDP2400 platform support
5 *
6 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
7 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
8 *
9 * Copyright (C) 2002 Intel Corp.
10 * Copyright (C) 2003-2004 MontaVista Software, Inc.
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 */
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/mm.h>
20#include <linux/sched.h>
21#include <linux/interrupt.h>
22#include <linux/device.h>
23#include <linux/bitops.h>
24#include <linux/pci.h>
25#include <linux/ioport.h>
26#include <linux/delay.h>
27#include <linux/io.h>
28
29#include <asm/irq.h>
30#include <asm/pgtable.h>
31#include <asm/page.h>
32#include <mach/hardware.h>
33#include <asm/mach-types.h>
34
35#include <asm/mach/pci.h>
36#include <asm/mach/map.h>
37#include <asm/mach/irq.h>
38#include <asm/mach/time.h>
39#include <asm/mach/flash.h>
40#include <asm/mach/arch.h>
41
42/*************************************************************************
43 * IXDP2400 timer tick
44 *************************************************************************/
45static void __init ixdp2400_timer_init(void)
46{
47 int numerator, denominator;
48 int denom_array[] = {2, 4, 8, 16, 1, 2, 4, 8};
49
50 numerator = (*(IXDP2400_CPLD_SYS_CLK_M) & 0xFF) *2;
51 denominator = denom_array[(*(IXDP2400_CPLD_SYS_CLK_N) & 0x7)];
52
53 ixp2000_init_time(((3125000 * numerator) / (denominator)) / 2);
54}
55
56static struct sys_timer ixdp2400_timer = {
57 .init = ixdp2400_timer_init,
58 .offset = ixp2000_gettimeoffset,
59};
60
61/*************************************************************************
62 * IXDP2400 PCI
63 *************************************************************************/
64void __init ixdp2400_pci_preinit(void)
65{
66 ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00100000);
67 ixp2000_pci_preinit();
68 pcibios_setup("firmware");
69}
70
71int ixdp2400_pci_setup(int nr, struct pci_sys_data *sys)
72{
73 sys->mem_offset = 0xe0000000;
74
75 ixp2000_pci_setup(nr, sys);
76
77 return 1;
78}
79
80static int __init ixdp2400_pci_map_irq(const struct pci_dev *dev, u8 slot,
81 u8 pin)
82{
83 if (ixdp2x00_master_npu()) {
84
85 /*
86 * Root bus devices. Slave NPU is only one with interrupt.
87 * Everything else, we just return -1 b/c nothing else
88 * on the root bus has interrupts.
89 */
90 if(!dev->bus->self) {
91 if(dev->devfn == IXDP2X00_SLAVE_NPU_DEVFN )
92 return IRQ_IXDP2400_INGRESS_NPU;
93
94 return -1;
95 }
96
97 /*
98 * Bridge behind the PMC slot.
99 * NOTE: Only INTA from the PMC slot is routed. VERY BAD.
100 */
101 if(dev->bus->self->devfn == IXDP2X00_PMC_DEVFN &&
102 dev->bus->parent->self->devfn == IXDP2X00_P2P_DEVFN &&
103 !dev->bus->parent->self->bus->parent)
104 return IRQ_IXDP2400_PMC;
105
106 /*
107 * Device behind the first bridge
108 */
109 if(dev->bus->self->devfn == IXDP2X00_P2P_DEVFN) {
110 switch(dev->devfn) {
111 case IXDP2400_MASTER_ENET_DEVFN:
112 return IRQ_IXDP2400_ENET;
113
114 case IXDP2400_MEDIA_DEVFN:
115 return IRQ_IXDP2400_MEDIA_PCI;
116
117 case IXDP2400_SWITCH_FABRIC_DEVFN:
118 return IRQ_IXDP2400_SF_PCI;
119
120 case IXDP2X00_PMC_DEVFN:
121 return IRQ_IXDP2400_PMC;
122 }
123 }
124
125 return -1;
126 } else return IRQ_IXP2000_PCIB; /* Slave NIC interrupt */
127}
128
129
130static void ixdp2400_pci_postinit(void)
131{
132 struct pci_dev *dev;
133
134 if (ixdp2x00_master_npu()) {
135 dev = pci_get_bus_and_slot(1, IXDP2400_SLAVE_ENET_DEVFN);
136 pci_stop_and_remove_bus_device(dev);
137 pci_dev_put(dev);
138 } else {
139 dev = pci_get_bus_and_slot(1, IXDP2400_MASTER_ENET_DEVFN);
140 pci_stop_and_remove_bus_device(dev);
141 pci_dev_put(dev);
142
143 ixdp2x00_slave_pci_postinit();
144 }
145}
146
147static struct hw_pci ixdp2400_pci __initdata = {
148 .nr_controllers = 1,
149 .ops = &ixp2000_pci_ops,
150 .setup = ixdp2400_pci_setup,
151 .preinit = ixdp2400_pci_preinit,
152 .postinit = ixdp2400_pci_postinit,
153 .map_irq = ixdp2400_pci_map_irq,
154};
155
156int __init ixdp2400_pci_init(void)
157{
158 if (machine_is_ixdp2400())
159 pci_common_init(&ixdp2400_pci);
160
161 return 0;
162}
163
164subsys_initcall(ixdp2400_pci_init);
165
166void __init ixdp2400_init_irq(void)
167{
168 ixdp2x00_init_irq(IXDP2400_CPLD_INT_STAT, IXDP2400_CPLD_INT_MASK, IXDP2400_NR_IRQS);
169}
170
171MACHINE_START(IXDP2400, "Intel IXDP2400 Development Platform")
172 /* Maintainer: MontaVista Software, Inc. */
173 .atag_offset = 0x100,
174 .map_io = ixdp2x00_map_io,
175 .init_irq = ixdp2400_init_irq,
176 .timer = &ixdp2400_timer,
177 .init_machine = ixdp2x00_init_machine,
178 .restart = ixp2000_restart,
179MACHINE_END
180
diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c
deleted file mode 100644
index 44378c31d177..000000000000
--- a/arch/arm/mach-ixp2000/ixdp2800.c
+++ /dev/null
@@ -1,295 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/ixdp2800.c
3 *
4 * IXDP2800 platform support
5 *
6 * Original Author: Jeffrey Daly <jeffrey.daly@intel.com>
7 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
8 *
9 * Copyright (C) 2002 Intel Corp.
10 * Copyright (C) 2003-2004 MontaVista Software, Inc.
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 */
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/mm.h>
20#include <linux/sched.h>
21#include <linux/interrupt.h>
22#include <linux/device.h>
23#include <linux/bitops.h>
24#include <linux/pci.h>
25#include <linux/ioport.h>
26#include <linux/delay.h>
27#include <linux/io.h>
28
29#include <asm/irq.h>
30#include <asm/pgtable.h>
31#include <asm/page.h>
32#include <mach/hardware.h>
33#include <asm/mach-types.h>
34
35#include <asm/mach/pci.h>
36#include <asm/mach/map.h>
37#include <asm/mach/irq.h>
38#include <asm/mach/time.h>
39#include <asm/mach/flash.h>
40#include <asm/mach/arch.h>
41
42/*************************************************************************
43 * IXDP2800 timer tick
44 *************************************************************************/
45
46static void __init ixdp2800_timer_init(void)
47{
48 ixp2000_init_time(50000000);
49}
50
51static struct sys_timer ixdp2800_timer = {
52 .init = ixdp2800_timer_init,
53 .offset = ixp2000_gettimeoffset,
54};
55
56/*************************************************************************
57 * IXDP2800 PCI
58 *************************************************************************/
59static void __init ixdp2800_slave_disable_pci_master(void)
60{
61 *IXP2000_PCI_CMDSTAT &= ~(PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
62}
63
64static void __init ixdp2800_master_wait_for_slave(void)
65{
66 volatile u32 *addr;
67
68 printk(KERN_INFO "IXDP2800: waiting for slave NPU to configure "
69 "its BAR sizes\n");
70
71 addr = ixp2000_pci_config_addr(0, IXDP2X00_SLAVE_NPU_DEVFN,
72 PCI_BASE_ADDRESS_1);
73 do {
74 *addr = 0xffffffff;
75 cpu_relax();
76 } while (*addr != 0xfe000008);
77
78 addr = ixp2000_pci_config_addr(0, IXDP2X00_SLAVE_NPU_DEVFN,
79 PCI_BASE_ADDRESS_2);
80 do {
81 *addr = 0xffffffff;
82 cpu_relax();
83 } while (*addr != 0xc0000008);
84
85 /*
86 * Configure the slave's SDRAM BAR by hand.
87 */
88 *addr = 0x40000008;
89}
90
91static void __init ixdp2800_slave_wait_for_master_enable(void)
92{
93 printk(KERN_INFO "IXDP2800: waiting for master NPU to enable us\n");
94
95 while ((*IXP2000_PCI_CMDSTAT & PCI_COMMAND_MASTER) == 0)
96 cpu_relax();
97}
98
99void __init ixdp2800_pci_preinit(void)
100{
101 printk("ixdp2x00_pci_preinit called\n");
102
103 *IXP2000_PCI_ADDR_EXT = 0x0001e000;
104
105 if (!ixdp2x00_master_npu())
106 ixdp2800_slave_disable_pci_master();
107
108 *IXP2000_PCI_SRAM_BASE_ADDR_MASK = (0x2000000 - 1) & ~0x3ffff;
109 *IXP2000_PCI_DRAM_BASE_ADDR_MASK = (0x40000000 - 1) & ~0xfffff;
110
111 ixp2000_pci_preinit();
112
113 if (ixdp2x00_master_npu()) {
114 /*
115 * Wait until the slave set its SRAM/SDRAM BAR sizes
116 * correctly before we proceed to scan and enumerate
117 * the bus.
118 */
119 ixdp2800_master_wait_for_slave();
120
121 /*
122 * We configure the SDRAM BARs by hand because they
123 * are 1G and fall outside of the regular allocated
124 * PCI address space.
125 */
126 *IXP2000_PCI_SDRAM_BAR = 0x00000008;
127 } else {
128 /*
129 * Wait for the master to complete scanning the bus
130 * and assigning resources before we proceed to scan
131 * the bus ourselves. Set pci=firmware to honor the
132 * master's resource assignment.
133 */
134 ixdp2800_slave_wait_for_master_enable();
135 pcibios_setup("firmware");
136 }
137}
138
139/*
140 * We assign the SDRAM BARs for the two IXP2800 CPUs by hand, outside
141 * of the regular PCI window, because there's only 512M of outbound PCI
142 * memory window on each IXP, while we need 1G for each of the BARs.
143 */
144static void __devinit ixp2800_pci_fixup(struct pci_dev *dev)
145{
146 if (machine_is_ixdp2800()) {
147 dev->resource[2].start = 0;
148 dev->resource[2].end = 0;
149 dev->resource[2].flags = 0;
150 }
151}
152DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IXP2800, ixp2800_pci_fixup);
153
154static int __init ixdp2800_pci_setup(int nr, struct pci_sys_data *sys)
155{
156 sys->mem_offset = 0x00000000;
157
158 ixp2000_pci_setup(nr, sys);
159
160 return 1;
161}
162
163static int __init ixdp2800_pci_map_irq(const struct pci_dev *dev, u8 slot,
164 u8 pin)
165{
166 if (ixdp2x00_master_npu()) {
167
168 /*
169 * Root bus devices. Slave NPU is only one with interrupt.
170 * Everything else, we just return -1 which is invalid.
171 */
172 if(!dev->bus->self) {
173 if(dev->devfn == IXDP2X00_SLAVE_NPU_DEVFN )
174 return IRQ_IXDP2800_INGRESS_NPU;
175
176 return -1;
177 }
178
179 /*
180 * Bridge behind the PMC slot.
181 */
182 if(dev->bus->self->devfn == IXDP2X00_PMC_DEVFN &&
183 dev->bus->parent->self->devfn == IXDP2X00_P2P_DEVFN &&
184 !dev->bus->parent->self->bus->parent)
185 return IRQ_IXDP2800_PMC;
186
187 /*
188 * Device behind the first bridge
189 */
190 if(dev->bus->self->devfn == IXDP2X00_P2P_DEVFN) {
191 switch(dev->devfn) {
192 case IXDP2X00_PMC_DEVFN:
193 return IRQ_IXDP2800_PMC;
194
195 case IXDP2800_MASTER_ENET_DEVFN:
196 return IRQ_IXDP2800_EGRESS_ENET;
197
198 case IXDP2800_SWITCH_FABRIC_DEVFN:
199 return IRQ_IXDP2800_FABRIC;
200 }
201 }
202
203 return -1;
204 } else return IRQ_IXP2000_PCIB; /* Slave NIC interrupt */
205}
206
207static void __init ixdp2800_master_enable_slave(void)
208{
209 volatile u32 *addr;
210
211 printk(KERN_INFO "IXDP2800: enabling slave NPU\n");
212
213 addr = (volatile u32 *)ixp2000_pci_config_addr(0,
214 IXDP2X00_SLAVE_NPU_DEVFN,
215 PCI_COMMAND);
216
217 *addr |= PCI_COMMAND_MASTER;
218}
219
220static void __init ixdp2800_master_wait_for_slave_bus_scan(void)
221{
222 volatile u32 *addr;
223
224 printk(KERN_INFO "IXDP2800: waiting for slave to finish bus scan\n");
225
226 addr = (volatile u32 *)ixp2000_pci_config_addr(0,
227 IXDP2X00_SLAVE_NPU_DEVFN,
228 PCI_COMMAND);
229 while ((*addr & PCI_COMMAND_MEMORY) == 0)
230 cpu_relax();
231}
232
233static void __init ixdp2800_slave_signal_bus_scan_completion(void)
234{
235 printk(KERN_INFO "IXDP2800: bus scan done, signaling master\n");
236 *IXP2000_PCI_CMDSTAT |= PCI_COMMAND_MEMORY;
237}
238
239static void __init ixdp2800_pci_postinit(void)
240{
241 if (!ixdp2x00_master_npu()) {
242 ixdp2x00_slave_pci_postinit();
243 ixdp2800_slave_signal_bus_scan_completion();
244 }
245}
246
247struct __initdata hw_pci ixdp2800_pci __initdata = {
248 .nr_controllers = 1,
249 .ops = &ixp2000_pci_ops,
250 .setup = ixdp2800_pci_setup,
251 .preinit = ixdp2800_pci_preinit,
252 .postinit = ixdp2800_pci_postinit,
253 .map_irq = ixdp2800_pci_map_irq,
254};
255
256int __init ixdp2800_pci_init(void)
257{
258 if (machine_is_ixdp2800()) {
259 struct pci_dev *dev;
260
261 pci_common_init(&ixdp2800_pci);
262 if (ixdp2x00_master_npu()) {
263 dev = pci_get_bus_and_slot(1, IXDP2800_SLAVE_ENET_DEVFN);
264 pci_stop_and_remove_bus_device(dev);
265 pci_dev_put(dev);
266
267 ixdp2800_master_enable_slave();
268 ixdp2800_master_wait_for_slave_bus_scan();
269 } else {
270 dev = pci_get_bus_and_slot(1, IXDP2800_MASTER_ENET_DEVFN);
271 pci_stop_and_remove_bus_device(dev);
272 pci_dev_put(dev);
273 }
274 }
275
276 return 0;
277}
278
279subsys_initcall(ixdp2800_pci_init);
280
281void __init ixdp2800_init_irq(void)
282{
283 ixdp2x00_init_irq(IXDP2800_CPLD_INT_STAT, IXDP2800_CPLD_INT_MASK, IXDP2800_NR_IRQS);
284}
285
286MACHINE_START(IXDP2800, "Intel IXDP2800 Development Platform")
287 /* Maintainer: MontaVista Software, Inc. */
288 .atag_offset = 0x100,
289 .map_io = ixdp2x00_map_io,
290 .init_irq = ixdp2800_init_irq,
291 .timer = &ixdp2800_timer,
292 .init_machine = ixdp2x00_init_machine,
293 .restart = ixp2000_restart,
294MACHINE_END
295
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c
deleted file mode 100644
index 421e38dc0fac..000000000000
--- a/arch/arm/mach-ixp2000/ixdp2x00.c
+++ /dev/null
@@ -1,306 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/ixdp2x00.c
3 *
4 * Code common to IXDP2400 and IXDP2800 platforms.
5 *
6 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
7 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
8 *
9 * Copyright (C) 2002 Intel Corp.
10 * Copyright (C) 2003-2004 MontaVista Software, Inc.
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 */
17#include <linux/gpio.h>
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/mm.h>
21#include <linux/sched.h>
22#include <linux/interrupt.h>
23#include <linux/platform_device.h>
24#include <linux/bitops.h>
25#include <linux/pci.h>
26#include <linux/ioport.h>
27#include <linux/delay.h>
28#include <linux/io.h>
29
30#include <asm/irq.h>
31#include <asm/pgtable.h>
32#include <asm/page.h>
33#include <mach/hardware.h>
34#include <asm/mach-types.h>
35
36#include <asm/mach/pci.h>
37#include <asm/mach/map.h>
38#include <asm/mach/irq.h>
39#include <asm/mach/time.h>
40#include <asm/mach/flash.h>
41#include <asm/mach/arch.h>
42
43#include <mach/gpio-ixp2000.h>
44
45/*************************************************************************
46 * IXDP2x00 IRQ Initialization
47 *************************************************************************/
48static volatile unsigned long *board_irq_mask;
49static volatile unsigned long *board_irq_stat;
50static unsigned long board_irq_count;
51
52#ifdef CONFIG_ARCH_IXDP2400
53/*
54 * Slowport configuration for accessing CPLD registers on IXDP2x00
55 */
56static struct slowport_cfg slowport_cpld_cfg = {
57 .CCR = SLOWPORT_CCR_DIV_2,
58 .WTC = 0x00000070,
59 .RTC = 0x00000070,
60 .PCR = SLOWPORT_MODE_FLASH,
61 .ADC = SLOWPORT_ADDR_WIDTH_24 | SLOWPORT_DATA_WIDTH_8
62};
63#endif
64
65static void ixdp2x00_irq_mask(struct irq_data *d)
66{
67 unsigned long dummy;
68 static struct slowport_cfg old_cfg;
69
70 /*
71 * This is ugly in common code but really don't know
72 * of a better way to handle it. :(
73 */
74#ifdef CONFIG_ARCH_IXDP2400
75 if (machine_is_ixdp2400())
76 ixp2000_acquire_slowport(&slowport_cpld_cfg, &old_cfg);
77#endif
78
79 dummy = *board_irq_mask;
80 dummy |= IXP2000_BOARD_IRQ_MASK(d->irq);
81 ixp2000_reg_wrb(board_irq_mask, dummy);
82
83#ifdef CONFIG_ARCH_IXDP2400
84 if (machine_is_ixdp2400())
85 ixp2000_release_slowport(&old_cfg);
86#endif
87}
88
89static void ixdp2x00_irq_unmask(struct irq_data *d)
90{
91 unsigned long dummy;
92 static struct slowport_cfg old_cfg;
93
94#ifdef CONFIG_ARCH_IXDP2400
95 if (machine_is_ixdp2400())
96 ixp2000_acquire_slowport(&slowport_cpld_cfg, &old_cfg);
97#endif
98
99 dummy = *board_irq_mask;
100 dummy &= ~IXP2000_BOARD_IRQ_MASK(d->irq);
101 ixp2000_reg_wrb(board_irq_mask, dummy);
102
103 if (machine_is_ixdp2400())
104 ixp2000_release_slowport(&old_cfg);
105}
106
107static void ixdp2x00_irq_handler(unsigned int irq, struct irq_desc *desc)
108{
109 volatile u32 ex_interrupt = 0;
110 static struct slowport_cfg old_cfg;
111 int i;
112
113 desc->irq_data.chip->irq_mask(&desc->irq_data);
114
115#ifdef CONFIG_ARCH_IXDP2400
116 if (machine_is_ixdp2400())
117 ixp2000_acquire_slowport(&slowport_cpld_cfg, &old_cfg);
118#endif
119 ex_interrupt = *board_irq_stat & 0xff;
120 if (machine_is_ixdp2400())
121 ixp2000_release_slowport(&old_cfg);
122
123 if(!ex_interrupt) {
124 printk(KERN_ERR "Spurious IXDP2x00 CPLD interrupt!\n");
125 return;
126 }
127
128 for(i = 0; i < board_irq_count; i++) {
129 if(ex_interrupt & (1 << i)) {
130 int cpld_irq = IXP2000_BOARD_IRQ(0) + i;
131 generic_handle_irq(cpld_irq);
132 }
133 }
134
135 desc->irq_data.chip->irq_unmask(&desc->irq_data);
136}
137
138static struct irq_chip ixdp2x00_cpld_irq_chip = {
139 .irq_ack = ixdp2x00_irq_mask,
140 .irq_mask = ixdp2x00_irq_mask,
141 .irq_unmask = ixdp2x00_irq_unmask
142};
143
144void __init ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long *mask_reg, unsigned long nr_of_irqs)
145{
146 unsigned int irq;
147
148 ixp2000_init_irq();
149
150 if (!ixdp2x00_master_npu())
151 return;
152
153 board_irq_stat = stat_reg;
154 board_irq_mask = mask_reg;
155 board_irq_count = nr_of_irqs;
156
157 *board_irq_mask = 0xffffffff;
158
159 for(irq = IXP2000_BOARD_IRQ(0); irq < IXP2000_BOARD_IRQ(board_irq_count); irq++) {
160 irq_set_chip_and_handler(irq, &ixdp2x00_cpld_irq_chip,
161 handle_level_irq);
162 set_irq_flags(irq, IRQF_VALID);
163 }
164
165 /* Hook into PCI interrupt */
166 irq_set_chained_handler(IRQ_IXP2000_PCIB, ixdp2x00_irq_handler);
167}
168
169/*************************************************************************
170 * IXDP2x00 memory map
171 *************************************************************************/
172static struct map_desc ixdp2x00_io_desc __initdata = {
173 .virtual = IXDP2X00_VIRT_CPLD_BASE,
174 .pfn = __phys_to_pfn(IXDP2X00_PHYS_CPLD_BASE),
175 .length = IXDP2X00_CPLD_SIZE,
176 .type = MT_DEVICE
177};
178
179void __init ixdp2x00_map_io(void)
180{
181 ixp2000_map_io();
182
183 iotable_init(&ixdp2x00_io_desc, 1);
184}
185
186/*************************************************************************
187 * IXDP2x00-common PCI init
188 *
189 * The IXDP2[48]00 has a horrid PCI bus layout. Basically the board
190 * contains two NPUs (ingress and egress) connected over PCI, both running
191 * instances of the kernel. So far so good. Peers on the PCI bus running
192 * Linux is a common design in telecom systems. The problem is that instead
193 * of all the devices being controlled by a single host, different
194 * devices are controlled by different NPUs on the same bus, leading to
195 * multiple hosts on the bus. The exact bus layout looks like:
196 *
197 * Bus 0
198 * Master NPU <-------------------+-------------------> Slave NPU
199 * |
200 * |
201 * P2P
202 * |
203 *
204 * Bus 1 |
205 * <--+------+---------+---------+------+-->
206 * | | | | |
207 * | | | | |
208 * ... Dev PMC Media Eth0 Eth1 ...
209 *
210 * The master controls all but Eth1, which is controlled by the
211 * slave. What this means is that the both the master and the slave
212 * have to scan the bus, but only one of them can enumerate the bus.
213 * In addition, after the bus is scanned, each kernel must remove
214 * the device(s) it does not control from the PCI dev list otherwise
215 * a driver on each NPU will try to manage it and we will have horrible
216 * conflicts. Oh..and the slave NPU needs to see the master NPU
217 * for Intel's drivers to work properly. Closed source drivers...
218 *
219 * The way we deal with this is fairly simple but ugly:
220 *
221 * 1) Let master scan and enumerate the bus completely.
222 * 2) Master deletes Eth1 from device list.
223 * 3) Slave scans bus and then deletes all but Eth1 (Eth0 on slave)
224 * from device list.
225 * 4) Find HW designers and LART them.
226 *
227 * The boards also do not do normal PCI IRQ routing, or any sort of
228 * sensical swizzling, so we just need to check where on the bus a
229 * device sits and figure out to which CPLD pin the interrupt is routed.
230 * See ixdp2[48]00.c files.
231 *
232 *************************************************************************/
233void ixdp2x00_slave_pci_postinit(void)
234{
235 struct pci_dev *dev;
236
237 /*
238 * Remove PMC device is there is one
239 */
240 if((dev = pci_get_bus_and_slot(1, IXDP2X00_PMC_DEVFN))) {
241 pci_stop_and_remove_bus_device(dev);
242 pci_dev_put(dev);
243 }
244
245 dev = pci_get_bus_and_slot(0, IXDP2X00_21555_DEVFN);
246 pci_stop_and_remove_bus_device(dev);
247 pci_dev_put(dev);
248}
249
250/**************************************************************************
251 * IXDP2x00 Machine Setup
252 *************************************************************************/
253static struct flash_platform_data ixdp2x00_platform_data = {
254 .map_name = "cfi_probe",
255 .width = 1,
256};
257
258static struct ixp2000_flash_data ixdp2x00_flash_data = {
259 .platform_data = &ixdp2x00_platform_data,
260 .nr_banks = 1
261};
262
263static struct resource ixdp2x00_flash_resource = {
264 .start = 0xc4000000,
265 .end = 0xc4000000 + 0x00ffffff,
266 .flags = IORESOURCE_MEM,
267};
268
269static struct platform_device ixdp2x00_flash = {
270 .name = "IXP2000-Flash",
271 .id = 0,
272 .dev = {
273 .platform_data = &ixdp2x00_flash_data,
274 },
275 .num_resources = 1,
276 .resource = &ixdp2x00_flash_resource,
277};
278
279static struct ixp2000_i2c_pins ixdp2x00_i2c_gpio_pins = {
280 .sda_pin = IXDP2X00_GPIO_SDA,
281 .scl_pin = IXDP2X00_GPIO_SCL,
282};
283
284static struct platform_device ixdp2x00_i2c_controller = {
285 .name = "IXP2000-I2C",
286 .id = 0,
287 .dev = {
288 .platform_data = &ixdp2x00_i2c_gpio_pins,
289 },
290 .num_resources = 0
291};
292
293static struct platform_device *ixdp2x00_devices[] __initdata = {
294 &ixdp2x00_flash,
295 &ixdp2x00_i2c_controller
296};
297
298void __init ixdp2x00_init_machine(void)
299{
300 gpio_line_set(IXDP2X00_GPIO_I2C_ENABLE, 1);
301 gpio_line_config(IXDP2X00_GPIO_I2C_ENABLE, GPIO_OUT);
302
303 platform_add_devices(ixdp2x00_devices, ARRAY_SIZE(ixdp2x00_devices));
304 ixp2000_uart_init();
305}
306
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c
deleted file mode 100644
index af8b801d7d59..000000000000
--- a/arch/arm/mach-ixp2000/ixdp2x01.c
+++ /dev/null
@@ -1,483 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/ixdp2x01.c
3 *
4 * Code common to Intel IXDP2401 and IXDP2801 platforms
5 *
6 * Original Author: Andrzej Mialkowski <andrzej.mialkowski@intel.com>
7 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
8 *
9 * Copyright (C) 2002-2003 Intel Corp.
10 * Copyright (C) 2003-2004 MontaVista Software, Inc.
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 */
17
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/mm.h>
21#include <linux/sched.h>
22#include <linux/interrupt.h>
23#include <linux/bitops.h>
24#include <linux/pci.h>
25#include <linux/ioport.h>
26#include <linux/delay.h>
27#include <linux/serial.h>
28#include <linux/tty.h>
29#include <linux/serial_core.h>
30#include <linux/platform_device.h>
31#include <linux/serial_8250.h>
32#include <linux/io.h>
33
34#include <asm/irq.h>
35#include <asm/pgtable.h>
36#include <asm/page.h>
37#include <mach/hardware.h>
38#include <asm/mach-types.h>
39
40#include <asm/mach/pci.h>
41#include <asm/mach/map.h>
42#include <asm/mach/irq.h>
43#include <asm/mach/time.h>
44#include <asm/mach/arch.h>
45#include <asm/mach/flash.h>
46
47/*************************************************************************
48 * IXDP2x01 IRQ Handling
49 *************************************************************************/
50static void ixdp2x01_irq_mask(struct irq_data *d)
51{
52 ixp2000_reg_wrb(IXDP2X01_INT_MASK_SET_REG,
53 IXP2000_BOARD_IRQ_MASK(d->irq));
54}
55
56static void ixdp2x01_irq_unmask(struct irq_data *d)
57{
58 ixp2000_reg_write(IXDP2X01_INT_MASK_CLR_REG,
59 IXP2000_BOARD_IRQ_MASK(d->irq));
60}
61
62static u32 valid_irq_mask;
63
64static void ixdp2x01_irq_handler(unsigned int irq, struct irq_desc *desc)
65{
66 u32 ex_interrupt;
67 int i;
68
69 desc->irq_data.chip->irq_mask(&desc->irq_data);
70
71 ex_interrupt = *IXDP2X01_INT_STAT_REG & valid_irq_mask;
72
73 if (!ex_interrupt) {
74 printk(KERN_ERR "Spurious IXDP2X01 CPLD interrupt!\n");
75 return;
76 }
77
78 for (i = 0; i < IXP2000_BOARD_IRQS; i++) {
79 if (ex_interrupt & (1 << i)) {
80 int cpld_irq = IXP2000_BOARD_IRQ(0) + i;
81 generic_handle_irq(cpld_irq);
82 }
83 }
84
85 desc->irq_data.chip->irq_unmask(&desc->irq_data);
86}
87
88static struct irq_chip ixdp2x01_irq_chip = {
89 .irq_mask = ixdp2x01_irq_mask,
90 .irq_ack = ixdp2x01_irq_mask,
91 .irq_unmask = ixdp2x01_irq_unmask
92};
93
94/*
95 * We only do anything if we are the master NPU on the board.
96 * The slave NPU only has the ethernet chip going directly to
97 * the PCIB interrupt input.
98 */
99void __init ixdp2x01_init_irq(void)
100{
101 int irq = 0;
102
103 /* initialize chip specific interrupts */
104 ixp2000_init_irq();
105
106 if (machine_is_ixdp2401())
107 valid_irq_mask = IXDP2401_VALID_IRQ_MASK;
108 else
109 valid_irq_mask = IXDP2801_VALID_IRQ_MASK;
110
111 /* Mask all interrupts from CPLD, disable simulation */
112 ixp2000_reg_write(IXDP2X01_INT_MASK_SET_REG, 0xffffffff);
113 ixp2000_reg_wrb(IXDP2X01_INT_SIM_REG, 0);
114
115 for (irq = NR_IXP2000_IRQS; irq < NR_IXDP2X01_IRQS; irq++) {
116 if (irq & valid_irq_mask) {
117 irq_set_chip_and_handler(irq, &ixdp2x01_irq_chip,
118 handle_level_irq);
119 set_irq_flags(irq, IRQF_VALID);
120 } else {
121 set_irq_flags(irq, 0);
122 }
123 }
124
125 /* Hook into PCI interrupts */
126 irq_set_chained_handler(IRQ_IXP2000_PCIB, ixdp2x01_irq_handler);
127}
128
129
130/*************************************************************************
131 * IXDP2x01 memory map
132 *************************************************************************/
133static struct map_desc ixdp2x01_io_desc __initdata = {
134 .virtual = IXDP2X01_VIRT_CPLD_BASE,
135 .pfn = __phys_to_pfn(IXDP2X01_PHYS_CPLD_BASE),
136 .length = IXDP2X01_CPLD_REGION_SIZE,
137 .type = MT_DEVICE
138};
139
140static void __init ixdp2x01_map_io(void)
141{
142 ixp2000_map_io();
143 iotable_init(&ixdp2x01_io_desc, 1);
144}
145
146
147/*************************************************************************
148 * IXDP2x01 serial ports
149 *************************************************************************/
150static struct plat_serial8250_port ixdp2x01_serial_port1[] = {
151 {
152 .mapbase = (unsigned long)IXDP2X01_UART1_PHYS_BASE,
153 .membase = (char *)IXDP2X01_UART1_VIRT_BASE,
154 .irq = IRQ_IXDP2X01_UART1,
155 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
156 .iotype = UPIO_MEM32,
157 .regshift = 2,
158 .uartclk = IXDP2X01_UART_CLK,
159 },
160 { }
161};
162
163static struct resource ixdp2x01_uart_resource1 = {
164 .start = IXDP2X01_UART1_PHYS_BASE,
165 .end = IXDP2X01_UART1_PHYS_BASE + 0xffff,
166 .flags = IORESOURCE_MEM,
167};
168
169static struct platform_device ixdp2x01_serial_device1 = {
170 .name = "serial8250",
171 .id = PLAT8250_DEV_PLATFORM1,
172 .dev = {
173 .platform_data = ixdp2x01_serial_port1,
174 },
175 .num_resources = 1,
176 .resource = &ixdp2x01_uart_resource1,
177};
178
179static struct plat_serial8250_port ixdp2x01_serial_port2[] = {
180 {
181 .mapbase = (unsigned long)IXDP2X01_UART2_PHYS_BASE,
182 .membase = (char *)IXDP2X01_UART2_VIRT_BASE,
183 .irq = IRQ_IXDP2X01_UART2,
184 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
185 .iotype = UPIO_MEM32,
186 .regshift = 2,
187 .uartclk = IXDP2X01_UART_CLK,
188 },
189 { }
190};
191
192static struct resource ixdp2x01_uart_resource2 = {
193 .start = IXDP2X01_UART2_PHYS_BASE,
194 .end = IXDP2X01_UART2_PHYS_BASE + 0xffff,
195 .flags = IORESOURCE_MEM,
196};
197
198static struct platform_device ixdp2x01_serial_device2 = {
199 .name = "serial8250",
200 .id = PLAT8250_DEV_PLATFORM2,
201 .dev = {
202 .platform_data = ixdp2x01_serial_port2,
203 },
204 .num_resources = 1,
205 .resource = &ixdp2x01_uart_resource2,
206};
207
208static void ixdp2x01_uart_init(void)
209{
210 platform_device_register(&ixdp2x01_serial_device1);
211 platform_device_register(&ixdp2x01_serial_device2);
212}
213
214
215/*************************************************************************
216 * IXDP2x01 timer tick configuration
217 *************************************************************************/
218static unsigned int ixdp2x01_clock;
219
220static int __init ixdp2x01_clock_setup(char *str)
221{
222 ixdp2x01_clock = simple_strtoul(str, NULL, 10);
223
224 return 1;
225}
226
227__setup("ixdp2x01_clock=", ixdp2x01_clock_setup);
228
229static void __init ixdp2x01_timer_init(void)
230{
231 if (!ixdp2x01_clock)
232 ixdp2x01_clock = 50000000;
233
234 ixp2000_init_time(ixdp2x01_clock);
235}
236
237static struct sys_timer ixdp2x01_timer = {
238 .init = ixdp2x01_timer_init,
239 .offset = ixp2000_gettimeoffset,
240};
241
242/*************************************************************************
243 * IXDP2x01 PCI
244 *************************************************************************/
245void __init ixdp2x01_pci_preinit(void)
246{
247 ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00000000);
248 ixp2000_pci_preinit();
249 pcibios_setup("firmware");
250}
251
252#define DEVPIN(dev, pin) ((pin) | ((dev) << 3))
253
254static int __init ixdp2x01_pci_map_irq(const struct pci_dev *dev, u8 slot,
255 u8 pin)
256{
257 u8 bus = dev->bus->number;
258 u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin);
259 struct pci_bus *tmp_bus = dev->bus;
260
261 /* Primary bus, no interrupts here */
262 if (bus == 0) {
263 return -1;
264 }
265
266 /* Lookup first leaf in bus tree */
267 while ((tmp_bus->parent != NULL) && (tmp_bus->parent->parent != NULL)) {
268 tmp_bus = tmp_bus->parent;
269 }
270
271 /* Select between known bridges */
272 switch (tmp_bus->self->devfn | (tmp_bus->self->bus->number << 8)) {
273 /* Device is located after first MB bridge */
274 case 0x0008:
275 if (tmp_bus == dev->bus) {
276 /* Device is located directly after first MB bridge */
277 switch (devpin) {
278 case DEVPIN(1, 1): /* Onboard 82546 ch 0 */
279 if (machine_is_ixdp2401())
280 return IRQ_IXDP2401_INTA_82546;
281 return -1;
282 case DEVPIN(1, 2): /* Onboard 82546 ch 1 */
283 if (machine_is_ixdp2401())
284 return IRQ_IXDP2401_INTB_82546;
285 return -1;
286 case DEVPIN(0, 1): /* PMC INTA# */
287 return IRQ_IXDP2X01_SPCI_PMC_INTA;
288 case DEVPIN(0, 2): /* PMC INTB# */
289 return IRQ_IXDP2X01_SPCI_PMC_INTB;
290 case DEVPIN(0, 3): /* PMC INTC# */
291 return IRQ_IXDP2X01_SPCI_PMC_INTC;
292 case DEVPIN(0, 4): /* PMC INTD# */
293 return IRQ_IXDP2X01_SPCI_PMC_INTD;
294 }
295 }
296 break;
297 case 0x0010:
298 if (tmp_bus == dev->bus) {
299 /* Device is located directly after second MB bridge */
300 /* Secondary bus of second bridge */
301 switch (devpin) {
302 case DEVPIN(0, 1): /* DB#0 */
303 return IRQ_IXDP2X01_SPCI_DB_0;
304 case DEVPIN(1, 1): /* DB#1 */
305 return IRQ_IXDP2X01_SPCI_DB_1;
306 }
307 } else {
308 /* Device is located indirectly after second MB bridge */
309 /* Not supported now */
310 }
311 break;
312 }
313
314 return -1;
315}
316
317
318static int ixdp2x01_pci_setup(int nr, struct pci_sys_data *sys)
319{
320 sys->mem_offset = 0xe0000000;
321
322 if (machine_is_ixdp2801() || machine_is_ixdp28x5())
323 sys->mem_offset -= ((*IXP2000_PCI_ADDR_EXT & 0xE000) << 16);
324
325 return ixp2000_pci_setup(nr, sys);
326}
327
328struct hw_pci ixdp2x01_pci __initdata = {
329 .nr_controllers = 1,
330 .ops = &ixp2000_pci_ops,
331 .setup = ixdp2x01_pci_setup,
332 .preinit = ixdp2x01_pci_preinit,
333 .map_irq = ixdp2x01_pci_map_irq,
334};
335
336int __init ixdp2x01_pci_init(void)
337{
338 if (machine_is_ixdp2401() || machine_is_ixdp2801() ||\
339 machine_is_ixdp28x5())
340 pci_common_init(&ixdp2x01_pci);
341
342 return 0;
343}
344
345subsys_initcall(ixdp2x01_pci_init);
346
347/*************************************************************************
348 * IXDP2x01 Machine Initialization
349 *************************************************************************/
350static struct flash_platform_data ixdp2x01_flash_platform_data = {
351 .map_name = "cfi_probe",
352 .width = 1,
353};
354
355static unsigned long ixdp2x01_flash_bank_setup(unsigned long ofs)
356{
357 ixp2000_reg_wrb(IXDP2X01_CPLD_FLASH_REG,
358 ((ofs >> IXDP2X01_FLASH_WINDOW_BITS) | IXDP2X01_CPLD_FLASH_INTERN));
359 return (ofs & IXDP2X01_FLASH_WINDOW_MASK);
360}
361
362static struct ixp2000_flash_data ixdp2x01_flash_data = {
363 .platform_data = &ixdp2x01_flash_platform_data,
364 .bank_setup = ixdp2x01_flash_bank_setup
365};
366
367static struct resource ixdp2x01_flash_resource = {
368 .start = 0xc4000000,
369 .end = 0xc4000000 + 0x01ffffff,
370 .flags = IORESOURCE_MEM,
371};
372
373static struct platform_device ixdp2x01_flash = {
374 .name = "IXP2000-Flash",
375 .id = 0,
376 .dev = {
377 .platform_data = &ixdp2x01_flash_data,
378 },
379 .num_resources = 1,
380 .resource = &ixdp2x01_flash_resource,
381};
382
383static struct ixp2000_i2c_pins ixdp2x01_i2c_gpio_pins = {
384 .sda_pin = IXDP2X01_GPIO_SDA,
385 .scl_pin = IXDP2X01_GPIO_SCL,
386};
387
388static struct platform_device ixdp2x01_i2c_controller = {
389 .name = "IXP2000-I2C",
390 .id = 0,
391 .dev = {
392 .platform_data = &ixdp2x01_i2c_gpio_pins,
393 },
394 .num_resources = 0
395};
396
397static struct platform_device *ixdp2x01_devices[] __initdata = {
398 &ixdp2x01_flash,
399 &ixdp2x01_i2c_controller
400};
401
402static void __init ixdp2x01_init_machine(void)
403{
404 ixp2000_reg_wrb(IXDP2X01_CPLD_FLASH_REG,
405 (IXDP2X01_CPLD_FLASH_BANK_MASK | IXDP2X01_CPLD_FLASH_INTERN));
406
407 ixdp2x01_flash_data.nr_banks =
408 ((*IXDP2X01_CPLD_FLASH_REG & IXDP2X01_CPLD_FLASH_BANK_MASK) + 1);
409
410 platform_add_devices(ixdp2x01_devices, ARRAY_SIZE(ixdp2x01_devices));
411 ixp2000_uart_init();
412 ixdp2x01_uart_init();
413}
414
415static void ixdp2401_restart(char mode, const char *cmd)
416{
417 /*
418 * Reset flash banking register so that we are pointing at
419 * RedBoot bank.
420 */
421 ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG,
422 ((0 >> IXDP2X01_FLASH_WINDOW_BITS)
423 | IXDP2X01_CPLD_FLASH_INTERN));
424 ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0xffffffff);
425
426 ixp2000_restart(mode, cmd);
427}
428
429static void ixdp280x_restart(char mode, const char *cmd)
430{
431 /*
432 * On IXDP2801 we need to write this magic sequence to the CPLD
433 * to cause a complete reset of the CPU and all external devices
434 * and move the flash bank register back to 0.
435 */
436 unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG;
437
438 reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF);
439 ixp2000_reg_write(IXDP2X01_CPLD_RESET_REG, reset_reg);
440 ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0x80000000);
441
442 ixp2000_restart(mode, cmd);
443}
444
445#ifdef CONFIG_ARCH_IXDP2401
446MACHINE_START(IXDP2401, "Intel IXDP2401 Development Platform")
447 /* Maintainer: MontaVista Software, Inc. */
448 .atag_offset = 0x100,
449 .map_io = ixdp2x01_map_io,
450 .init_irq = ixdp2x01_init_irq,
451 .timer = &ixdp2x01_timer,
452 .init_machine = ixdp2x01_init_machine,
453 .restart = ixdp2401_restart,
454MACHINE_END
455#endif
456
457#ifdef CONFIG_ARCH_IXDP2801
458MACHINE_START(IXDP2801, "Intel IXDP2801 Development Platform")
459 /* Maintainer: MontaVista Software, Inc. */
460 .atag_offset = 0x100,
461 .map_io = ixdp2x01_map_io,
462 .init_irq = ixdp2x01_init_irq,
463 .timer = &ixdp2x01_timer,
464 .init_machine = ixdp2x01_init_machine,
465 .restart = ixdp280x_restart,
466MACHINE_END
467
468/*
469 * IXDP28x5 is basically an IXDP2801 with a different CPU but Intel
470 * changed the machine ID in the bootloader
471 */
472MACHINE_START(IXDP28X5, "Intel IXDP2805/2855 Development Platform")
473 /* Maintainer: MontaVista Software, Inc. */
474 .atag_offset = 0x100,
475 .map_io = ixdp2x01_map_io,
476 .init_irq = ixdp2x01_init_irq,
477 .timer = &ixdp2x01_timer,
478 .init_machine = ixdp2x01_init_machine,
479 .restart = ixdp280x_restart,
480MACHINE_END
481#endif
482
483
diff --git a/arch/arm/mach-ixp2000/pci.c b/arch/arm/mach-ixp2000/pci.c
deleted file mode 100644
index d706838db023..000000000000
--- a/arch/arm/mach-ixp2000/pci.c
+++ /dev/null
@@ -1,246 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/pci.c
3 *
4 * PCI routines for IXDP2400/IXDP2800 boards
5 *
6 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
7 * Maintained by: Deepak Saxena <dsaxena@plexity.net>
8 *
9 * Copyright 2002 Intel Corp.
10 * Copyright (C) 2003-2004 MontaVista Software, Inc.
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 */
17
18#include <linux/sched.h>
19#include <linux/kernel.h>
20#include <linux/pci.h>
21#include <linux/interrupt.h>
22#include <linux/mm.h>
23#include <linux/init.h>
24#include <linux/ioport.h>
25#include <linux/delay.h>
26#include <linux/io.h>
27
28#include <asm/irq.h>
29#include <mach/hardware.h>
30
31#include <asm/mach/pci.h>
32
33static volatile int pci_master_aborts = 0;
34
35static int clear_master_aborts(void);
36
37u32 *
38ixp2000_pci_config_addr(unsigned int bus_nr, unsigned int devfn, int where)
39{
40 u32 *paddress;
41
42 if (PCI_SLOT(devfn) > 7)
43 return 0;
44
45 /* Must be dword aligned */
46 where &= ~3;
47
48 /*
49 * For top bus, generate type 0, else type 1
50 */
51 if (!bus_nr) {
52 /* only bits[23:16] are used for IDSEL */
53 paddress = (u32 *) (IXP2000_PCI_CFG0_VIRT_BASE
54 | (1 << (PCI_SLOT(devfn) + 16))
55 | (PCI_FUNC(devfn) << 8) | where);
56 } else {
57 paddress = (u32 *) (IXP2000_PCI_CFG1_VIRT_BASE
58 | (bus_nr << 16)
59 | (PCI_SLOT(devfn) << 11)
60 | (PCI_FUNC(devfn) << 8) | where);
61 }
62
63 return paddress;
64}
65
66/*
67 * Mask table, bits to mask for quantity of size 1, 2 or 4 bytes.
68 * 0 and 3 are not valid indexes...
69 */
70static u32 bytemask[] = {
71 /*0*/ 0,
72 /*1*/ 0xff,
73 /*2*/ 0xffff,
74 /*3*/ 0,
75 /*4*/ 0xffffffff,
76};
77
78
79int ixp2000_pci_read_config(struct pci_bus *bus, unsigned int devfn, int where,
80 int size, u32 *value)
81{
82 u32 n;
83 u32 *addr;
84
85 n = where % 4;
86
87 addr = ixp2000_pci_config_addr(bus->number, devfn, where);
88 if (!addr)
89 return PCIBIOS_DEVICE_NOT_FOUND;
90
91 pci_master_aborts = 0;
92 *value = (*addr >> (8*n)) & bytemask[size];
93 if (pci_master_aborts) {
94 pci_master_aborts = 0;
95 *value = 0xffffffff;
96 return PCIBIOS_DEVICE_NOT_FOUND;
97 }
98
99 return PCIBIOS_SUCCESSFUL;
100}
101
102/*
103 * We don't do error checks by calling clear_master_aborts() b/c the
104 * assumption is that the caller did a read first to make sure a device
105 * exists.
106 */
107int ixp2000_pci_write_config(struct pci_bus *bus, unsigned int devfn, int where,
108 int size, u32 value)
109{
110 u32 mask;
111 u32 *addr;
112 u32 temp;
113
114 mask = ~(bytemask[size] << ((where % 0x4) * 8));
115 addr = ixp2000_pci_config_addr(bus->number, devfn, where);
116 if (!addr)
117 return PCIBIOS_DEVICE_NOT_FOUND;
118 temp = (u32) (value) << ((where % 0x4) * 8);
119 *addr = (*addr & mask) | temp;
120
121 clear_master_aborts();
122
123 return PCIBIOS_SUCCESSFUL;
124}
125
126
127struct pci_ops ixp2000_pci_ops = {
128 .read = ixp2000_pci_read_config,
129 .write = ixp2000_pci_write_config
130};
131
132
133int ixp2000_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
134{
135
136 volatile u32 temp;
137 unsigned long flags;
138
139 pci_master_aborts = 1;
140
141 local_irq_save(flags);
142 temp = *(IXP2000_PCI_CONTROL);
143 if (temp & ((1 << 8) | (1 << 5))) {
144 ixp2000_reg_wrb(IXP2000_PCI_CONTROL, temp);
145 }
146
147 temp = *(IXP2000_PCI_CMDSTAT);
148 if (temp & (1 << 29)) {
149 while (temp & (1 << 29)) {
150 ixp2000_reg_write(IXP2000_PCI_CMDSTAT, temp);
151 temp = *(IXP2000_PCI_CMDSTAT);
152 }
153 }
154 local_irq_restore(flags);
155
156 /*
157 * If it was an imprecise abort, then we need to correct the
158 * return address to be _after_ the instruction.
159 */
160 if (fsr & (1 << 10))
161 regs->ARM_pc += 4;
162
163 return 0;
164}
165
166int
167clear_master_aborts(void)
168{
169 volatile u32 temp;
170 unsigned long flags;
171
172 local_irq_save(flags);
173 temp = *(IXP2000_PCI_CONTROL);
174 if (temp & ((1 << 8) | (1 << 5))) {
175 ixp2000_reg_wrb(IXP2000_PCI_CONTROL, temp);
176 }
177
178 temp = *(IXP2000_PCI_CMDSTAT);
179 if (temp & (1 << 29)) {
180 while (temp & (1 << 29)) {
181 ixp2000_reg_write(IXP2000_PCI_CMDSTAT, temp);
182 temp = *(IXP2000_PCI_CMDSTAT);
183 }
184 }
185 local_irq_restore(flags);
186
187 return 0;
188}
189
190void __init
191ixp2000_pci_preinit(void)
192{
193 pci_set_flags(0);
194
195 pcibios_min_io = 0;
196 pcibios_min_mem = 0;
197
198#ifndef CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO
199 /*
200 * Configure the PCI unit to properly byteswap I/O transactions,
201 * and verify that it worked.
202 */
203 ixp2000_reg_write(IXP2000_PCI_CONTROL,
204 (*IXP2000_PCI_CONTROL | PCI_CONTROL_IEE));
205
206 if ((*IXP2000_PCI_CONTROL & PCI_CONTROL_IEE) == 0)
207 panic("IXP2000: PCI I/O is broken on this ixp model, and "
208 "the needed workaround has not been configured in");
209#endif
210
211 hook_fault_code(16+6, ixp2000_pci_abort_handler, SIGBUS, 0,
212 "PCI config cycle to non-existent device");
213}
214
215
216/*
217 * IXP2000 systems often have large resource requirements, so we just
218 * use our own resource space.
219 */
220static struct resource ixp2000_pci_mem_space = {
221 .start = 0xe0000000,
222 .end = 0xffffffff,
223 .flags = IORESOURCE_MEM,
224 .name = "PCI Mem Space"
225};
226
227static struct resource ixp2000_pci_io_space = {
228 .start = 0x00010000,
229 .end = 0x0001ffff,
230 .flags = IORESOURCE_IO,
231 .name = "PCI I/O Space"
232};
233
234int ixp2000_pci_setup(int nr, struct pci_sys_data *sys)
235{
236 if (nr >= 1)
237 return 0;
238
239 pci_add_resource_offset(&sys->resources,
240 &ixp2000_pci_io_space, sys->io_offset);
241 pci_add_resource_offset(&sys->resources,
242 &ixp2000_pci_mem_space, sys->mem_offset);
243
244 return 1;
245}
246
diff --git a/arch/arm/mach-ixp23xx/Kconfig b/arch/arm/mach-ixp23xx/Kconfig
deleted file mode 100644
index 982670ec3866..000000000000
--- a/arch/arm/mach-ixp23xx/Kconfig
+++ /dev/null
@@ -1,25 +0,0 @@
1if ARCH_IXP23XX
2
3config ARCH_SUPPORTS_BIG_ENDIAN
4 bool
5 default y
6
7menu "Intel IXP23xx Implementation Options"
8
9comment "IXP23xx Platforms"
10
11config MACH_ESPRESSO
12 bool "Support IP Fabrics Double Espresso platform"
13 help
14
15config MACH_IXDP2351
16 bool "Support Intel IXDP2351 platform"
17 help
18
19config MACH_ROADRUNNER
20 bool "Support ADI RoadRunner platform"
21 help
22
23endmenu
24
25endif
diff --git a/arch/arm/mach-ixp23xx/Makefile b/arch/arm/mach-ixp23xx/Makefile
deleted file mode 100644
index 288b371b6d03..000000000000
--- a/arch/arm/mach-ixp23xx/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
1#
2# Makefile for the linux kernel.
3#
4obj-y := core.o pci.o
5obj-m :=
6obj-n :=
7obj- :=
8
9obj-$(CONFIG_MACH_ESPRESSO) += espresso.o
10obj-$(CONFIG_MACH_IXDP2351) += ixdp2351.o
11obj-$(CONFIG_MACH_ROADRUNNER) += roadrunner.o
diff --git a/arch/arm/mach-ixp23xx/Makefile.boot b/arch/arm/mach-ixp23xx/Makefile.boot
deleted file mode 100644
index 44fb4a717c3f..000000000000
--- a/arch/arm/mach-ixp23xx/Makefile.boot
+++ /dev/null
@@ -1,2 +0,0 @@
1 zreladdr-y += 0x00008000
2params_phys-y := 0x00000100
diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c
deleted file mode 100644
index d34542425990..000000000000
--- a/arch/arm/mach-ixp23xx/core.c
+++ /dev/null
@@ -1,455 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/core.c
3 *
4 * Core routines for IXP23xx chips
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2005 (c) MontaVista Software, Inc.
9 *
10 * Based on 2.4 code Copyright 2004 (c) Intel Corporation
11 *
12 * This file is licensed under the terms of the GNU General Public
13 * License version 2. This program is licensed "as is" without any
14 * warranty of any kind, whether express or implied.
15 */
16
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/spinlock.h>
20#include <linux/sched.h>
21#include <linux/interrupt.h>
22#include <linux/serial.h>
23#include <linux/tty.h>
24#include <linux/bitops.h>
25#include <linux/serial_8250.h>
26#include <linux/serial_core.h>
27#include <linux/device.h>
28#include <linux/mm.h>
29#include <linux/time.h>
30#include <linux/timex.h>
31
32#include <asm/types.h>
33#include <asm/setup.h>
34#include <asm/memory.h>
35#include <mach/hardware.h>
36#include <asm/irq.h>
37#include <asm/tlbflush.h>
38#include <asm/pgtable.h>
39#include <asm/system_misc.h>
40
41#include <asm/mach/map.h>
42#include <asm/mach/time.h>
43#include <asm/mach/irq.h>
44#include <asm/mach/arch.h>
45
46
47/*************************************************************************
48 * Chip specific mappings shared by all IXP23xx systems
49 *************************************************************************/
50static struct map_desc ixp23xx_io_desc[] __initdata = {
51 { /* XSI-CPP CSRs */
52 .virtual = IXP23XX_XSI2CPP_CSR_VIRT,
53 .pfn = __phys_to_pfn(IXP23XX_XSI2CPP_CSR_PHYS),
54 .length = IXP23XX_XSI2CPP_CSR_SIZE,
55 .type = MT_DEVICE,
56 }, { /* Expansion Bus Config */
57 .virtual = IXP23XX_EXP_CFG_VIRT,
58 .pfn = __phys_to_pfn(IXP23XX_EXP_CFG_PHYS),
59 .length = IXP23XX_EXP_CFG_SIZE,
60 .type = MT_DEVICE,
61 }, { /* UART, Interrupt ctrl, GPIO, timers, NPEs, MACS,.... */
62 .virtual = IXP23XX_PERIPHERAL_VIRT,
63 .pfn = __phys_to_pfn(IXP23XX_PERIPHERAL_PHYS),
64 .length = IXP23XX_PERIPHERAL_SIZE,
65 .type = MT_DEVICE,
66 }, { /* CAP CSRs */
67 .virtual = IXP23XX_CAP_CSR_VIRT,
68 .pfn = __phys_to_pfn(IXP23XX_CAP_CSR_PHYS),
69 .length = IXP23XX_CAP_CSR_SIZE,
70 .type = MT_DEVICE,
71 }, { /* MSF CSRs */
72 .virtual = IXP23XX_MSF_CSR_VIRT,
73 .pfn = __phys_to_pfn(IXP23XX_MSF_CSR_PHYS),
74 .length = IXP23XX_MSF_CSR_SIZE,
75 .type = MT_DEVICE,
76 }, { /* PCI I/O Space */
77 .virtual = IXP23XX_PCI_IO_VIRT,
78 .pfn = __phys_to_pfn(IXP23XX_PCI_IO_PHYS),
79 .length = IXP23XX_PCI_IO_SIZE,
80 .type = MT_DEVICE,
81 }, { /* PCI Config Space */
82 .virtual = IXP23XX_PCI_CFG_VIRT,
83 .pfn = __phys_to_pfn(IXP23XX_PCI_CFG_PHYS),
84 .length = IXP23XX_PCI_CFG_SIZE,
85 .type = MT_DEVICE,
86 }, { /* PCI local CFG CSRs */
87 .virtual = IXP23XX_PCI_CREG_VIRT,
88 .pfn = __phys_to_pfn(IXP23XX_PCI_CREG_PHYS),
89 .length = IXP23XX_PCI_CREG_SIZE,
90 .type = MT_DEVICE,
91 }, { /* PCI MEM Space */
92 .virtual = IXP23XX_PCI_MEM_VIRT,
93 .pfn = __phys_to_pfn(IXP23XX_PCI_MEM_PHYS),
94 .length = IXP23XX_PCI_MEM_SIZE,
95 .type = MT_DEVICE,
96 }
97};
98
99void __init ixp23xx_map_io(void)
100{
101 iotable_init(ixp23xx_io_desc, ARRAY_SIZE(ixp23xx_io_desc));
102}
103
104
105/***************************************************************************
106 * IXP23xx Interrupt Handling
107 ***************************************************************************/
108enum ixp23xx_irq_type {
109 IXP23XX_IRQ_LEVEL, IXP23XX_IRQ_EDGE
110};
111
112static void ixp23xx_config_irq(unsigned int, enum ixp23xx_irq_type);
113
114static int ixp23xx_irq_set_type(struct irq_data *d, unsigned int type)
115{
116 int line = d->irq - IRQ_IXP23XX_GPIO6 + 6;
117 u32 int_style;
118 enum ixp23xx_irq_type irq_type;
119 volatile u32 *int_reg;
120
121 /*
122 * Only GPIOs 6-15 are wired to interrupts on IXP23xx
123 */
124 if (line < 6 || line > 15)
125 return -EINVAL;
126
127 switch (type) {
128 case IRQ_TYPE_EDGE_BOTH:
129 int_style = IXP23XX_GPIO_STYLE_TRANSITIONAL;
130 irq_type = IXP23XX_IRQ_EDGE;
131 break;
132 case IRQ_TYPE_EDGE_RISING:
133 int_style = IXP23XX_GPIO_STYLE_RISING_EDGE;
134 irq_type = IXP23XX_IRQ_EDGE;
135 break;
136 case IRQ_TYPE_EDGE_FALLING:
137 int_style = IXP23XX_GPIO_STYLE_FALLING_EDGE;
138 irq_type = IXP23XX_IRQ_EDGE;
139 break;
140 case IRQ_TYPE_LEVEL_HIGH:
141 int_style = IXP23XX_GPIO_STYLE_ACTIVE_HIGH;
142 irq_type = IXP23XX_IRQ_LEVEL;
143 break;
144 case IRQ_TYPE_LEVEL_LOW:
145 int_style = IXP23XX_GPIO_STYLE_ACTIVE_LOW;
146 irq_type = IXP23XX_IRQ_LEVEL;
147 break;
148 default:
149 return -EINVAL;
150 }
151
152 ixp23xx_config_irq(d->irq, irq_type);
153
154 if (line >= 8) { /* pins 8-15 */
155 line -= 8;
156 int_reg = (volatile u32 *)IXP23XX_GPIO_GPIT2R;
157 } else { /* pins 0-7 */
158 int_reg = (volatile u32 *)IXP23XX_GPIO_GPIT1R;
159 }
160
161 /*
162 * Clear pending interrupts
163 */
164 *IXP23XX_GPIO_GPISR = (1 << line);
165
166 /* Clear the style for the appropriate pin */
167 *int_reg &= ~(IXP23XX_GPIO_STYLE_MASK <<
168 (line * IXP23XX_GPIO_STYLE_SIZE));
169
170 /* Set the new style */
171 *int_reg |= (int_style << (line * IXP23XX_GPIO_STYLE_SIZE));
172
173 return 0;
174}
175
176static void ixp23xx_irq_mask(struct irq_data *d)
177{
178 volatile unsigned long *intr_reg;
179 unsigned int irq = d->irq;
180
181 if (irq >= 56)
182 irq += 8;
183
184 intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
185 *intr_reg &= ~(1 << (irq % 32));
186}
187
188static void ixp23xx_irq_ack(struct irq_data *d)
189{
190 int line = d->irq - IRQ_IXP23XX_GPIO6 + 6;
191
192 if ((line < 6) || (line > 15))
193 return;
194
195 *IXP23XX_GPIO_GPISR = (1 << line);
196}
197
198/*
199 * Level triggered interrupts on GPIO lines can only be cleared when the
200 * interrupt condition disappears.
201 */
202static void ixp23xx_irq_level_unmask(struct irq_data *d)
203{
204 volatile unsigned long *intr_reg;
205 unsigned int irq = d->irq;
206
207 ixp23xx_irq_ack(d);
208
209 if (irq >= 56)
210 irq += 8;
211
212 intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
213 *intr_reg |= (1 << (irq % 32));
214}
215
216static void ixp23xx_irq_edge_unmask(struct irq_data *d)
217{
218 volatile unsigned long *intr_reg;
219 unsigned int irq = d->irq;
220
221 if (irq >= 56)
222 irq += 8;
223
224 intr_reg = IXP23XX_INTR_EN1 + (irq / 32);
225 *intr_reg |= (1 << (irq % 32));
226}
227
228static struct irq_chip ixp23xx_irq_level_chip = {
229 .irq_ack = ixp23xx_irq_mask,
230 .irq_mask = ixp23xx_irq_mask,
231 .irq_unmask = ixp23xx_irq_level_unmask,
232 .irq_set_type = ixp23xx_irq_set_type
233};
234
235static struct irq_chip ixp23xx_irq_edge_chip = {
236 .irq_ack = ixp23xx_irq_ack,
237 .irq_mask = ixp23xx_irq_mask,
238 .irq_unmask = ixp23xx_irq_edge_unmask,
239 .irq_set_type = ixp23xx_irq_set_type
240};
241
242static void ixp23xx_pci_irq_mask(struct irq_data *d)
243{
244 unsigned int irq = d->irq;
245
246 *IXP23XX_PCI_XSCALE_INT_ENABLE &= ~(1 << (IRQ_IXP23XX_INTA + 27 - irq));
247}
248
249static void ixp23xx_pci_irq_unmask(struct irq_data *d)
250{
251 unsigned int irq = d->irq;
252
253 *IXP23XX_PCI_XSCALE_INT_ENABLE |= (1 << (IRQ_IXP23XX_INTA + 27 - irq));
254}
255
256/*
257 * TODO: Should this just be done at ASM level?
258 */
259static void pci_handler(unsigned int irq, struct irq_desc *desc)
260{
261 u32 pci_interrupt;
262 unsigned int irqno;
263
264 pci_interrupt = *IXP23XX_PCI_XSCALE_INT_STATUS;
265
266 desc->irq_data.chip->irq_ack(&desc->irq_data);
267
268 /* See which PCI_INTA, or PCI_INTB interrupted */
269 if (pci_interrupt & (1 << 26)) {
270 irqno = IRQ_IXP23XX_INTB;
271 } else if (pci_interrupt & (1 << 27)) {
272 irqno = IRQ_IXP23XX_INTA;
273 } else {
274 BUG();
275 }
276
277 generic_handle_irq(irqno);
278
279 desc->irq_data.chip->irq_unmask(&desc->irq_data);
280}
281
282static struct irq_chip ixp23xx_pci_irq_chip = {
283 .irq_ack = ixp23xx_pci_irq_mask,
284 .irq_mask = ixp23xx_pci_irq_mask,
285 .irq_unmask = ixp23xx_pci_irq_unmask
286};
287
288static void ixp23xx_config_irq(unsigned int irq, enum ixp23xx_irq_type type)
289{
290 switch (type) {
291 case IXP23XX_IRQ_LEVEL:
292 irq_set_chip_and_handler(irq, &ixp23xx_irq_level_chip,
293 handle_level_irq);
294 break;
295 case IXP23XX_IRQ_EDGE:
296 irq_set_chip_and_handler(irq, &ixp23xx_irq_edge_chip,
297 handle_edge_irq);
298 break;
299 }
300 set_irq_flags(irq, IRQF_VALID);
301}
302
303void __init ixp23xx_init_irq(void)
304{
305 int irq;
306
307 /* Route everything to IRQ */
308 *IXP23XX_INTR_SEL1 = 0x0;
309 *IXP23XX_INTR_SEL2 = 0x0;
310 *IXP23XX_INTR_SEL3 = 0x0;
311 *IXP23XX_INTR_SEL4 = 0x0;
312
313 /* Mask all sources */
314 *IXP23XX_INTR_EN1 = 0x0;
315 *IXP23XX_INTR_EN2 = 0x0;
316 *IXP23XX_INTR_EN3 = 0x0;
317 *IXP23XX_INTR_EN4 = 0x0;
318
319 /*
320 * Configure all IRQs for level-sensitive operation
321 */
322 for (irq = 0; irq <= NUM_IXP23XX_RAW_IRQS; irq++) {
323 ixp23xx_config_irq(irq, IXP23XX_IRQ_LEVEL);
324 }
325
326 for (irq = IRQ_IXP23XX_INTA; irq <= IRQ_IXP23XX_INTB; irq++) {
327 irq_set_chip_and_handler(irq, &ixp23xx_pci_irq_chip,
328 handle_level_irq);
329 set_irq_flags(irq, IRQF_VALID);
330 }
331
332 irq_set_chained_handler(IRQ_IXP23XX_PCI_INT_RPH, pci_handler);
333}
334
335
336/*************************************************************************
337 * Timer-tick functions for IXP23xx
338 *************************************************************************/
339#define CLOCK_TICKS_PER_USEC (CLOCK_TICK_RATE / USEC_PER_SEC)
340
341static unsigned long next_jiffy_time;
342
343static unsigned long
344ixp23xx_gettimeoffset(void)
345{
346 unsigned long elapsed;
347
348 elapsed = *IXP23XX_TIMER_CONT - (next_jiffy_time - LATCH);
349
350 return elapsed / CLOCK_TICKS_PER_USEC;
351}
352
353static irqreturn_t
354ixp23xx_timer_interrupt(int irq, void *dev_id)
355{
356 /* Clear Pending Interrupt by writing '1' to it */
357 *IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND;
358 while ((signed long)(*IXP23XX_TIMER_CONT - next_jiffy_time) >= LATCH) {
359 timer_tick();
360 next_jiffy_time += LATCH;
361 }
362
363 return IRQ_HANDLED;
364}
365
366static struct irqaction ixp23xx_timer_irq = {
367 .name = "IXP23xx Timer Tick",
368 .handler = ixp23xx_timer_interrupt,
369 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
370};
371
372void __init ixp23xx_init_timer(void)
373{
374 /* Clear Pending Interrupt by writing '1' to it */
375 *IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND;
376
377 /* Setup the Timer counter value */
378 *IXP23XX_TIMER1_RELOAD =
379 (LATCH & ~IXP23XX_TIMER_RELOAD_MASK) | IXP23XX_TIMER_ENABLE;
380
381 *IXP23XX_TIMER_CONT = 0;
382 next_jiffy_time = LATCH;
383
384 /* Connect the interrupt handler and enable the interrupt */
385 setup_irq(IRQ_IXP23XX_TIMER1, &ixp23xx_timer_irq);
386}
387
388struct sys_timer ixp23xx_timer = {
389 .init = ixp23xx_init_timer,
390 .offset = ixp23xx_gettimeoffset,
391};
392
393
394/*************************************************************************
395 * IXP23xx Platform Initialization
396 *************************************************************************/
397static struct resource ixp23xx_uart_resources[] = {
398 {
399 .start = IXP23XX_UART1_PHYS,
400 .end = IXP23XX_UART1_PHYS + 0x0fff,
401 .flags = IORESOURCE_MEM
402 }, {
403 .start = IXP23XX_UART2_PHYS,
404 .end = IXP23XX_UART2_PHYS + 0x0fff,
405 .flags = IORESOURCE_MEM
406 }
407};
408
409static struct plat_serial8250_port ixp23xx_uart_data[] = {
410 {
411 .mapbase = IXP23XX_UART1_PHYS,
412 .membase = (char *)(IXP23XX_UART1_VIRT + 3),
413 .irq = IRQ_IXP23XX_UART1,
414 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
415 .iotype = UPIO_MEM,
416 .regshift = 2,
417 .uartclk = IXP23XX_UART_XTAL,
418 }, {
419 .mapbase = IXP23XX_UART2_PHYS,
420 .membase = (char *)(IXP23XX_UART2_VIRT + 3),
421 .irq = IRQ_IXP23XX_UART2,
422 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
423 .iotype = UPIO_MEM,
424 .regshift = 2,
425 .uartclk = IXP23XX_UART_XTAL,
426 },
427 { },
428};
429
430static struct platform_device ixp23xx_uart = {
431 .name = "serial8250",
432 .id = 0,
433 .dev.platform_data = ixp23xx_uart_data,
434 .num_resources = 2,
435 .resource = ixp23xx_uart_resources,
436};
437
438static struct platform_device *ixp23xx_devices[] __initdata = {
439 &ixp23xx_uart,
440};
441
442void __init ixp23xx_sys_init(void)
443{
444 /* by default, the idle code is disabled */
445 disable_hlt();
446
447 *IXP23XX_EXP_UNIT_FUSE |= 0xf;
448 platform_add_devices(ixp23xx_devices, ARRAY_SIZE(ixp23xx_devices));
449}
450
451void ixp23xx_restart(char mode, const char *cmd)
452{
453 /* Use on-chip reset capability */
454 *IXP23XX_RESET0 |= IXP23XX_RST_ALL;
455}
diff --git a/arch/arm/mach-ixp23xx/espresso.c b/arch/arm/mach-ixp23xx/espresso.c
deleted file mode 100644
index d142d45dea12..000000000000
--- a/arch/arm/mach-ixp23xx/espresso.c
+++ /dev/null
@@ -1,93 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/espresso.c
3 *
4 * Double Espresso-specific routines
5 *
6 * Author: Lennert Buytenhek <buytenh@wantstofly.org>
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/spinlock.h>
16#include <linux/sched.h>
17#include <linux/interrupt.h>
18#include <linux/serial.h>
19#include <linux/tty.h>
20#include <linux/bitops.h>
21#include <linux/ioport.h>
22#include <linux/serial_8250.h>
23#include <linux/serial_core.h>
24#include <linux/device.h>
25#include <linux/mm.h>
26#include <linux/pci.h>
27#include <linux/mtd/physmap.h>
28
29#include <asm/types.h>
30#include <asm/setup.h>
31#include <asm/memory.h>
32#include <mach/hardware.h>
33#include <asm/mach-types.h>
34#include <asm/irq.h>
35#include <asm/tlbflush.h>
36#include <asm/pgtable.h>
37
38#include <asm/mach/map.h>
39#include <asm/mach/irq.h>
40#include <asm/mach/arch.h>
41#include <asm/mach/pci.h>
42
43static int __init espresso_pci_init(void)
44{
45 if (machine_is_espresso())
46 ixp23xx_pci_slave_init();
47
48 return 0;
49};
50subsys_initcall(espresso_pci_init);
51
52static struct physmap_flash_data espresso_flash_data = {
53 .width = 2,
54};
55
56static struct resource espresso_flash_resource = {
57 .start = 0x90000000,
58 .end = 0x91ffffff,
59 .flags = IORESOURCE_MEM,
60};
61
62static struct platform_device espresso_flash = {
63 .name = "physmap-flash",
64 .id = 0,
65 .dev = {
66 .platform_data = &espresso_flash_data,
67 },
68 .num_resources = 1,
69 .resource = &espresso_flash_resource,
70};
71
72static void __init espresso_init(void)
73{
74 platform_device_register(&espresso_flash);
75
76 /*
77 * Mark flash as writeable.
78 */
79 IXP23XX_EXP_CS0[0] |= IXP23XX_FLASH_WRITABLE;
80 IXP23XX_EXP_CS0[1] |= IXP23XX_FLASH_WRITABLE;
81
82 ixp23xx_sys_init();
83}
84
85MACHINE_START(ESPRESSO, "IP Fabrics Double Espresso")
86 /* Maintainer: Lennert Buytenhek */
87 .map_io = ixp23xx_map_io,
88 .init_irq = ixp23xx_init_irq,
89 .timer = &ixp23xx_timer,
90 .atag_offset = 0x100,
91 .init_machine = espresso_init,
92 .restart = ixp23xx_restart,
93MACHINE_END
diff --git a/arch/arm/mach-ixp23xx/include/mach/debug-macro.S b/arch/arm/mach-ixp23xx/include/mach/debug-macro.S
deleted file mode 100644
index 5ff524c13744..000000000000
--- a/arch/arm/mach-ixp23xx/include/mach/debug-macro.S
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/debug-macro.S
3 *
4 * Debugging macro include header
5 *
6 * Copyright (C) 1994-1999 Russell King
7 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13#include <mach/ixp23xx.h>
14
15 .macro addruart, rp, rv, tmp
16 ldr \rp, =IXP23XX_PERIPHERAL_PHYS @ physical
17 ldr \rv, =IXP23XX_PERIPHERAL_VIRT @ virtual
18#ifdef __ARMEB__
19 orr \rp, \rp, #0x00000003
20 orr \rv, \rv, #0x00000003
21#endif
22 .endm
23
24#define UART_SHIFT 2
25#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-ixp23xx/include/mach/entry-macro.S b/arch/arm/mach-ixp23xx/include/mach/entry-macro.S
deleted file mode 100644
index 3fd2cb984e42..000000000000
--- a/arch/arm/mach-ixp23xx/include/mach/entry-macro.S
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/entry-macro.S
3 */
4
5 .macro get_irqnr_preamble, base, tmp
6 .endm
7
8 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
9 ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET)
10 ldr \irqnr, [\irqnr] @ get interrupt number
11 cmp \irqnr, #0x0 @ spurious interrupt ?
12 movne \irqnr, \irqnr, lsr #2 @ skip unwanted low order bits
13 subne \irqnr, \irqnr, #1 @ convert to 0 based
14
15#if 0
16 cmp \irqnr, #IRQ_IXP23XX_PCI_INT_RPH
17 bne 1001f
18 mov \irqnr, #IRQ_IXP23XX_INTA
19
20 ldr \irqnr, =0xf5000030
21
22 mov \tmp, #(1<<26)
23 tst \irqnr, \tmp
24 movne \irqnr, #IRQ_IXP23XX_INTB
25
26 mov \tmp, #(1<<27)
27 tst \irqnr, \tmp
28 movne \irqnr, #IRQ_IXP23XX_INTA
291001:
30#endif
31 .endm
diff --git a/arch/arm/mach-ixp23xx/include/mach/hardware.h b/arch/arm/mach-ixp23xx/include/mach/hardware.h
deleted file mode 100644
index 60e55fa10238..000000000000
--- a/arch/arm/mach-ixp23xx/include/mach/hardware.h
+++ /dev/null
@@ -1,32 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/hardware.h
3 *
4 * Copyright (C) 2002-2004 Intel Corporation.
5 * Copyricht (C) 2005 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * Hardware definitions for IXP23XX based systems
12 */
13
14#ifndef __ASM_ARCH_HARDWARE_H
15#define __ASM_ARCH_HARDWARE_H
16
17/* PCI IO info */
18
19#include "ixp23xx.h"
20
21/*
22 * Platform helper functions
23 */
24#include "platform.h"
25
26/*
27 * Platform-specific headers
28 */
29#include "ixdp2351.h"
30
31
32#endif
diff --git a/arch/arm/mach-ixp23xx/include/mach/io.h b/arch/arm/mach-ixp23xx/include/mach/io.h
deleted file mode 100644
index a7aceb55c130..000000000000
--- a/arch/arm/mach-ixp23xx/include/mach/io.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/io.h
3 *
4 * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com>
5 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
6 *
7 * Copyright (C) 2003-2005 Intel Corp.
8 * Copyright (C) 2005 MontaVista Software, Inc
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __ASM_ARCH_IO_H
16#define __ASM_ARCH_IO_H
17
18#define IO_SPACE_LIMIT 0xffffffff
19
20#define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT))
21
22#endif
diff --git a/arch/arm/mach-ixp23xx/include/mach/irqs.h b/arch/arm/mach-ixp23xx/include/mach/irqs.h
deleted file mode 100644
index 3af33a04b8a2..000000000000
--- a/arch/arm/mach-ixp23xx/include/mach/irqs.h
+++ /dev/null
@@ -1,223 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/irqs.h
3 *
4 * IRQ definitions for IXP23XX based systems
5 *
6 * Author: Naeem Afzal <naeem.m.afzal@intel.com>
7 *
8 * Copyright (C) 2003-2004 Intel Corporation.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __ASM_ARCH_IRQS_H
16#define __ASM_ARCH_IRQS_H
17
18#define NR_IXP23XX_IRQS IRQ_IXP23XX_INTB+1
19#define IRQ_IXP23XX_EXTIRQS NR_IXP23XX_IRQS
20
21
22#define IRQ_IXP23XX_DBG0 0 /* Debug/Execution/MBox */
23#define IRQ_IXP23XX_DBG1 1 /* Debug/Execution/MBox */
24#define IRQ_IXP23XX_NPE_TRG 2 /* npe_trigger */
25#define IRQ_IXP23XX_TIMER1 3 /* Timer[0] */
26#define IRQ_IXP23XX_TIMER2 4 /* Timer[1] */
27#define IRQ_IXP23XX_TIMESTAMP 5 /* Timer[2], Time-stamp */
28#define IRQ_IXP23XX_WDOG 6 /* Time[3], Watchdog Timer */
29#define IRQ_IXP23XX_PCI_DBELL 7 /* PCI Doorbell */
30#define IRQ_IXP23XX_PCI_DMA1 8 /* PCI DMA Channel 1 */
31#define IRQ_IXP23XX_PCI_DMA2 9 /* PCI DMA Channel 2 */
32#define IRQ_IXP23XX_PCI_DMA3 10 /* PCI DMA Channel 3 */
33#define IRQ_IXP23XX_PCI_INT_RPH 11 /* pcxg_pci_int_rph */
34#define IRQ_IXP23XX_CPP_PMU 12 /* xpxg_pm_int_rpl */
35#define IRQ_IXP23XX_SWINT0 13 /* S/W Interrupt0 */
36#define IRQ_IXP23XX_SWINT1 14 /* S/W Interrupt1 */
37#define IRQ_IXP23XX_UART2 15 /* UART1 Interrupt */
38#define IRQ_IXP23XX_UART1 16 /* UART0 Interrupt */
39#define IRQ_IXP23XX_XSI_PMU_ROLLOVER 17 /* AHB Performance M. Unit counter rollover */
40#define IRQ_IXP23XX_XSI_AHB_PM0 18 /* intr_pm_o */
41#define IRQ_IXP23XX_XSI_AHB_ECE0 19 /* intr_ece_o */
42#define IRQ_IXP23XX_XSI_AHB_GASKET 20 /* gas_intr_o */
43#define IRQ_IXP23XX_XSI_CPP 21 /* xsi2cpp_int */
44#define IRQ_IXP23XX_CPP_XSI 22 /* cpp2xsi_int */
45#define IRQ_IXP23XX_ME_ATTN0 23 /* ME_ATTN */
46#define IRQ_IXP23XX_ME_ATTN1 24 /* ME_ATTN */
47#define IRQ_IXP23XX_ME_ATTN2 25 /* ME_ATTN */
48#define IRQ_IXP23XX_ME_ATTN3 26 /* ME_ATTN */
49#define IRQ_IXP23XX_PCI_ERR_RPH 27 /* PCXG_PCI_ERR_RPH */
50#define IRQ_IXP23XX_D0XG_ECC_CORR 28 /* D0XG_DRAM_ECC_CORR */
51#define IRQ_IXP23XX_D0XG_ECC_UNCORR 29 /* D0XG_DRAM_ECC_UNCORR */
52#define IRQ_IXP23XX_SRAM_ERR1 30 /* SRAM1_ERR */
53#define IRQ_IXP23XX_SRAM_ERR0 31 /* SRAM0_ERR */
54#define IRQ_IXP23XX_MEDIA_ERR 32 /* MEDIA_ERR */
55#define IRQ_IXP23XX_STH_DRAM_ECC_MAJ 33 /* STH_DRAM0_ECC_MAJ */
56#define IRQ_IXP23XX_GPIO6 34 /* GPIO0 interrupts */
57#define IRQ_IXP23XX_GPIO7 35 /* GPIO1 interrupts */
58#define IRQ_IXP23XX_GPIO8 36 /* GPIO2 interrupts */
59#define IRQ_IXP23XX_GPIO9 37 /* GPIO3 interrupts */
60#define IRQ_IXP23XX_GPIO10 38 /* GPIO4 interrupts */
61#define IRQ_IXP23XX_GPIO11 39 /* GPIO5 interrupts */
62#define IRQ_IXP23XX_GPIO12 40 /* GPIO6 interrupts */
63#define IRQ_IXP23XX_GPIO13 41 /* GPIO7 interrupts */
64#define IRQ_IXP23XX_GPIO14 42 /* GPIO8 interrupts */
65#define IRQ_IXP23XX_GPIO15 43 /* GPIO9 interrupts */
66#define IRQ_IXP23XX_SHAC_RING0 44 /* SHAC Ring Full */
67#define IRQ_IXP23XX_SHAC_RING1 45 /* SHAC Ring Full */
68#define IRQ_IXP23XX_SHAC_RING2 46 /* SHAC Ring Full */
69#define IRQ_IXP23XX_SHAC_RING3 47 /* SHAC Ring Full */
70#define IRQ_IXP23XX_SHAC_RING4 48 /* SHAC Ring Full */
71#define IRQ_IXP23XX_SHAC_RING5 49 /* SHAC Ring Full */
72#define IRQ_IXP23XX_SHAC_RING6 50 /* SHAC RING Full */
73#define IRQ_IXP23XX_SHAC_RING7 51 /* SHAC Ring Full */
74#define IRQ_IXP23XX_SHAC_RING8 52 /* SHAC Ring Full */
75#define IRQ_IXP23XX_SHAC_RING9 53 /* SHAC Ring Full */
76#define IRQ_IXP23XX_SHAC_RING10 54 /* SHAC Ring Full */
77#define IRQ_IXP23XX_SHAC_RING11 55 /* SHAC Ring Full */
78#define IRQ_IXP23XX_ME_THREAD_A0_ME0 56 /* ME_THREAD_A */
79#define IRQ_IXP23XX_ME_THREAD_A1_ME0 57 /* ME_THREAD_A */
80#define IRQ_IXP23XX_ME_THREAD_A2_ME0 58 /* ME_THREAD_A */
81#define IRQ_IXP23XX_ME_THREAD_A3_ME0 59 /* ME_THREAD_A */
82#define IRQ_IXP23XX_ME_THREAD_A4_ME0 60 /* ME_THREAD_A */
83#define IRQ_IXP23XX_ME_THREAD_A5_ME0 61 /* ME_THREAD_A */
84#define IRQ_IXP23XX_ME_THREAD_A6_ME0 62 /* ME_THREAD_A */
85#define IRQ_IXP23XX_ME_THREAD_A7_ME0 63 /* ME_THREAD_A */
86#define IRQ_IXP23XX_ME_THREAD_A8_ME1 64 /* ME_THREAD_A */
87#define IRQ_IXP23XX_ME_THREAD_A9_ME1 65 /* ME_THREAD_A */
88#define IRQ_IXP23XX_ME_THREAD_A10_ME1 66 /* ME_THREAD_A */
89#define IRQ_IXP23XX_ME_THREAD_A11_ME1 67 /* ME_THREAD_A */
90#define IRQ_IXP23XX_ME_THREAD_A12_ME1 68 /* ME_THREAD_A */
91#define IRQ_IXP23XX_ME_THREAD_A13_ME1 69 /* ME_THREAD_A */
92#define IRQ_IXP23XX_ME_THREAD_A14_ME1 70 /* ME_THREAD_A */
93#define IRQ_IXP23XX_ME_THREAD_A15_ME1 71 /* ME_THREAD_A */
94#define IRQ_IXP23XX_ME_THREAD_A16_ME2 72 /* ME_THREAD_A */
95#define IRQ_IXP23XX_ME_THREAD_A17_ME2 73 /* ME_THREAD_A */
96#define IRQ_IXP23XX_ME_THREAD_A18_ME2 74 /* ME_THREAD_A */
97#define IRQ_IXP23XX_ME_THREAD_A19_ME2 75 /* ME_THREAD_A */
98#define IRQ_IXP23XX_ME_THREAD_A20_ME2 76 /* ME_THREAD_A */
99#define IRQ_IXP23XX_ME_THREAD_A21_ME2 77 /* ME_THREAD_A */
100#define IRQ_IXP23XX_ME_THREAD_A22_ME2 78 /* ME_THREAD_A */
101#define IRQ_IXP23XX_ME_THREAD_A23_ME2 79 /* ME_THREAD_A */
102#define IRQ_IXP23XX_ME_THREAD_A24_ME3 80 /* ME_THREAD_A */
103#define IRQ_IXP23XX_ME_THREAD_A25_ME3 81 /* ME_THREAD_A */
104#define IRQ_IXP23XX_ME_THREAD_A26_ME3 82 /* ME_THREAD_A */
105#define IRQ_IXP23XX_ME_THREAD_A27_ME3 83 /* ME_THREAD_A */
106#define IRQ_IXP23XX_ME_THREAD_A28_ME3 84 /* ME_THREAD_A */
107#define IRQ_IXP23XX_ME_THREAD_A29_ME3 85 /* ME_THREAD_A */
108#define IRQ_IXP23XX_ME_THREAD_A30_ME3 86 /* ME_THREAD_A */
109#define IRQ_IXP23XX_ME_THREAD_A31_ME3 87 /* ME_THREAD_A */
110#define IRQ_IXP23XX_ME_THREAD_B0_ME0 88 /* ME_THREAD_B */
111#define IRQ_IXP23XX_ME_THREAD_B1_ME0 89 /* ME_THREAD_B */
112#define IRQ_IXP23XX_ME_THREAD_B2_ME0 90 /* ME_THREAD_B */
113#define IRQ_IXP23XX_ME_THREAD_B3_ME0 91 /* ME_THREAD_B */
114#define IRQ_IXP23XX_ME_THREAD_B4_ME0 92 /* ME_THREAD_B */
115#define IRQ_IXP23XX_ME_THREAD_B5_ME0 93 /* ME_THREAD_B */
116#define IRQ_IXP23XX_ME_THREAD_B6_ME0 94 /* ME_THREAD_B */
117#define IRQ_IXP23XX_ME_THREAD_B7_ME0 95 /* ME_THREAD_B */
118#define IRQ_IXP23XX_ME_THREAD_B8_ME1 96 /* ME_THREAD_B */
119#define IRQ_IXP23XX_ME_THREAD_B9_ME1 97 /* ME_THREAD_B */
120#define IRQ_IXP23XX_ME_THREAD_B10_ME1 98 /* ME_THREAD_B */
121#define IRQ_IXP23XX_ME_THREAD_B11_ME1 99 /* ME_THREAD_B */
122#define IRQ_IXP23XX_ME_THREAD_B12_ME1 100 /* ME_THREAD_B */
123#define IRQ_IXP23XX_ME_THREAD_B13_ME1 101 /* ME_THREAD_B */
124#define IRQ_IXP23XX_ME_THREAD_B14_ME1 102 /* ME_THREAD_B */
125#define IRQ_IXP23XX_ME_THREAD_B15_ME1 103 /* ME_THREAD_B */
126#define IRQ_IXP23XX_ME_THREAD_B16_ME2 104 /* ME_THREAD_B */
127#define IRQ_IXP23XX_ME_THREAD_B17_ME2 105 /* ME_THREAD_B */
128#define IRQ_IXP23XX_ME_THREAD_B18_ME2 106 /* ME_THREAD_B */
129#define IRQ_IXP23XX_ME_THREAD_B19_ME2 107 /* ME_THREAD_B */
130#define IRQ_IXP23XX_ME_THREAD_B20_ME2 108 /* ME_THREAD_B */
131#define IRQ_IXP23XX_ME_THREAD_B21_ME2 109 /* ME_THREAD_B */
132#define IRQ_IXP23XX_ME_THREAD_B22_ME2 110 /* ME_THREAD_B */
133#define IRQ_IXP23XX_ME_THREAD_B23_ME2 111 /* ME_THREAD_B */
134#define IRQ_IXP23XX_ME_THREAD_B24_ME3 112 /* ME_THREAD_B */
135#define IRQ_IXP23XX_ME_THREAD_B25_ME3 113 /* ME_THREAD_B */
136#define IRQ_IXP23XX_ME_THREAD_B26_ME3 114 /* ME_THREAD_B */
137#define IRQ_IXP23XX_ME_THREAD_B27_ME3 115 /* ME_THREAD_B */
138#define IRQ_IXP23XX_ME_THREAD_B28_ME3 116 /* ME_THREAD_B */
139#define IRQ_IXP23XX_ME_THREAD_B29_ME3 117 /* ME_THREAD_B */
140#define IRQ_IXP23XX_ME_THREAD_B30_ME3 118 /* ME_THREAD_B */
141#define IRQ_IXP23XX_ME_THREAD_B31_ME3 119 /* ME_THREAD_B */
142
143#define NUM_IXP23XX_RAW_IRQS 120
144
145#define IRQ_IXP23XX_INTA 120 /* Indirect pcxg_pci_int_rph */
146#define IRQ_IXP23XX_INTB 121 /* Indirect pcxg_pci_int_rph */
147
148#define NR_IXP23XX_IRQ (IRQ_IXP23XX_INTB + 1)
149
150/*
151 * We default to 32 per-board IRQs. Increase this number if you need
152 * more, but keep it realistic.
153 */
154#define NR_IXP23XX_MACH_IRQS 32
155
156#define NR_IRQS (NR_IXP23XX_IRQS + NR_IXP23XX_MACH_IRQS)
157
158#define IXP23XX_MACH_IRQ(irq) (NR_IXP23XX_IRQ + (irq))
159
160
161/*
162 * IXDP2351-specific interrupts
163 */
164
165/*
166 * External PCI interrupts signaled through INTB
167 *
168 */
169#define IXDP2351_INTB_IRQ_BASE 0
170#define IRQ_IXDP2351_INTA_82546 IXP23XX_MACH_IRQ(0)
171#define IRQ_IXDP2351_INTB_82546 IXP23XX_MACH_IRQ(1)
172#define IRQ_IXDP2351_SPCI_DB_0 IXP23XX_MACH_IRQ(2)
173#define IRQ_IXDP2351_SPCI_DB_1 IXP23XX_MACH_IRQ(3)
174#define IRQ_IXDP2351_SPCI_PMC_INTA IXP23XX_MACH_IRQ(4)
175#define IRQ_IXDP2351_SPCI_PMC_INTB IXP23XX_MACH_IRQ(5)
176#define IRQ_IXDP2351_SPCI_PMC_INTC IXP23XX_MACH_IRQ(6)
177#define IRQ_IXDP2351_SPCI_PMC_INTD IXP23XX_MACH_IRQ(7)
178#define IRQ_IXDP2351_SPCI_FIC IXP23XX_MACH_IRQ(8)
179
180#define IXDP2351_INTB_IRQ_BIT(irq) (irq - IXP23XX_MACH_IRQ(0))
181#define IXDP2351_INTB_IRQ_MASK(irq) (1 << IXDP2351_INTB_IRQ_BIT(irq))
182#define IXDP2351_INTB_IRQ_VALID 0x01FF
183#define IXDP2351_INTB_IRQ_NUM 16
184
185/*
186 * Other external interrupts signaled through INTA
187 */
188#define IXDP2351_INTA_IRQ_BASE 16
189#define IRQ_IXDP2351_IPMI_FROM IXP23XX_MACH_IRQ(16)
190#define IRQ_IXDP2351_125US IXP23XX_MACH_IRQ(17)
191#define IRQ_IXDP2351_DB_0_ADD IXP23XX_MACH_IRQ(18)
192#define IRQ_IXDP2351_DB_1_ADD IXP23XX_MACH_IRQ(19)
193#define IRQ_IXDP2351_DEBUG1 IXP23XX_MACH_IRQ(20)
194#define IRQ_IXDP2351_ADD_UART IXP23XX_MACH_IRQ(21)
195#define IRQ_IXDP2351_FIC_ADD IXP23XX_MACH_IRQ(24)
196#define IRQ_IXDP2351_CS8900 IXP23XX_MACH_IRQ(25)
197#define IRQ_IXDP2351_BBSRAM IXP23XX_MACH_IRQ(26)
198#define IRQ_IXDP2351_CONFIG_MEDIA IXP23XX_MACH_IRQ(27)
199#define IRQ_IXDP2351_CLOCK_REF IXP23XX_MACH_IRQ(28)
200#define IRQ_IXDP2351_A10_NP IXP23XX_MACH_IRQ(29)
201#define IRQ_IXDP2351_A11_NP IXP23XX_MACH_IRQ(30)
202#define IRQ_IXDP2351_DEBUG_NP IXP23XX_MACH_IRQ(31)
203
204#define IXDP2351_INTA_IRQ_BIT(irq) (irq - IXP23XX_MACH_IRQ(16))
205#define IXDP2351_INTA_IRQ_MASK(irq) (1 << IXDP2351_INTA_IRQ_BIT(irq))
206#define IXDP2351_INTA_IRQ_VALID 0xFF3F
207#define IXDP2351_INTA_IRQ_NUM 16
208
209
210/*
211 * ADI RoadRunner IRQs
212 */
213#define IRQ_ROADRUNNER_PCI_INTA IRQ_IXP23XX_INTA
214#define IRQ_ROADRUNNER_PCI_INTB IRQ_IXP23XX_INTB
215#define IRQ_ROADRUNNER_PCI_INTC IRQ_IXP23XX_GPIO11
216#define IRQ_ROADRUNNER_PCI_INTD IRQ_IXP23XX_GPIO12
217
218/*
219 * Put new board definitions here
220 */
221
222
223#endif
diff --git a/arch/arm/mach-ixp23xx/include/mach/ixdp2351.h b/arch/arm/mach-ixp23xx/include/mach/ixdp2351.h
deleted file mode 100644
index 663951027de5..000000000000
--- a/arch/arm/mach-ixp23xx/include/mach/ixdp2351.h
+++ /dev/null
@@ -1,89 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/ixdp2351.h
3 *
4 * Register and other defines for IXDP2351
5 *
6 * Copyright (c) 2002-2004 Intel Corp.
7 * Copytight (c) 2005 MontaVista Software, Inc.
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 */
14
15#ifndef __ASM_ARCH_IXDP2351_H
16#define __ASM_ARCH_IXDP2351_H
17
18/*
19 * NP module memory map
20 */
21#define IXDP2351_NP_PHYS_BASE (IXP23XX_EXP_BUS_CS4_BASE)
22#define IXDP2351_NP_PHYS_SIZE 0x00100000
23#define IXDP2351_NP_VIRT_BASE 0xeff00000
24
25#define IXDP2351_VIRT_CS8900_BASE (IXDP2351_NP_VIRT_BASE)
26#define IXDP2351_VIRT_CS8900_END (IXDP2351_VIRT_CS8900_BASE + 16)
27
28#define IXDP2351_VIRT_NP_CPLD_BASE (IXP23XX_EXP_BUS_CS4_BASE_VIRT + 0x00010000)
29
30#define IXDP2351_NP_CPLD_REG(reg) ((volatile u16 *)(IXDP2351_VIRT_NP_CPLD_BASE + reg))
31
32#define IXDP2351_NP_CPLD_RESET1_REG IXDP2351_NP_CPLD_REG(0x00)
33#define IXDP2351_NP_CPLD_LED_REG IXDP2351_NP_CPLD_REG(0x02)
34#define IXDP2351_NP_CPLD_VERSION_REG IXDP2351_NP_CPLD_REG(0x04)
35
36/*
37 * Base board module memory map
38 */
39
40#define IXDP2351_BB_BASE_PHYS (IXP23XX_EXP_BUS_CS5_BASE)
41#define IXDP2351_BB_SIZE 0x01000000
42#define IXDP2351_BB_BASE_VIRT (0xee000000)
43
44#define IXDP2351_BB_AREA_BASE(offset) (IXDP2351_BB_BASE_VIRT + offset)
45
46#define IXDP2351_VIRT_NVRAM_BASE IXDP2351_BB_AREA_BASE(0x0)
47#define IXDP2351_NVRAM_SIZE (0x20000)
48
49#define IXDP2351_VIRT_MB_IXF1104_BASE IXDP2351_BB_AREA_BASE(0x00020000)
50#define IXDP2351_VIRT_ADD_UART_BASE IXDP2351_BB_AREA_BASE(0x000240C0)
51#define IXDP2351_VIRT_FIC_BASE IXDP2351_BB_AREA_BASE(0x00200000)
52#define IXDP2351_VIRT_DB0_BASE IXDP2351_BB_AREA_BASE(0x00400000)
53#define IXDP2351_VIRT_DB1_BASE IXDP2351_BB_AREA_BASE(0x00600000)
54#define IXDP2351_VIRT_CPLD_BASE IXDP2351_BB_AREA_BASE(0x00024000)
55
56/*
57 * On board CPLD registers
58 */
59#define IXDP2351_CPLD_BB_REG(reg) ((volatile u16 *)(IXDP2351_VIRT_CPLD_BASE + reg))
60
61#define IXDP2351_CPLD_RESET0_REG IXDP2351_CPLD_BB_REG(0x00)
62#define IXDP2351_CPLD_RESET1_REG IXDP2351_CPLD_BB_REG(0x04)
63
64#define IXDP2351_CPLD_RESET1_MAGIC 0x55AA
65#define IXDP2351_CPLD_RESET1_ENABLE 0x8000
66
67#define IXDP2351_CPLD_FPGA_CONFIG_REG IXDP2351_CPLD_BB_REG(0x08)
68#define IXDP2351_CPLD_INTB_MASK_SET_REG IXDP2351_CPLD_BB_REG(0x10)
69#define IXDP2351_CPLD_INTA_MASK_SET_REG IXDP2351_CPLD_BB_REG(0x14)
70#define IXDP2351_CPLD_INTB_STAT_REG IXDP2351_CPLD_BB_REG(0x18)
71#define IXDP2351_CPLD_INTA_STAT_REG IXDP2351_CPLD_BB_REG(0x1C)
72#define IXDP2351_CPLD_INTB_RAW_REG IXDP2351_CPLD_BB_REG(0x20) /* read */
73#define IXDP2351_CPLD_INTA_RAW_REG IXDP2351_CPLD_BB_REG(0x24) /* read */
74#define IXDP2351_CPLD_INTB_MASK_CLR_REG IXDP2351_CPLD_INTB_RAW_REG /* write */
75#define IXDP2351_CPLD_INTA_MASK_CLR_REG IXDP2351_CPLD_INTA_RAW_REG /* write */
76#define IXDP2351_CPLD_INTB_SIM_REG IXDP2351_CPLD_BB_REG(0x28)
77#define IXDP2351_CPLD_INTA_SIM_REG IXDP2351_CPLD_BB_REG(0x2C)
78 /* Interrupt bits are defined in irqs.h */
79#define IXDP2351_CPLD_BB_GBE0_REG IXDP2351_CPLD_BB_REG(0x30)
80#define IXDP2351_CPLD_BB_GBE1_REG IXDP2351_CPLD_BB_REG(0x34)
81
82/* #define IXDP2351_CPLD_BB_MISC_REG IXDP2351_CPLD_REG(0x1C) */
83/* #define IXDP2351_CPLD_BB_MISC_REV_MASK 0xFF */
84/* #define IXDP2351_CPLD_BB_GDXCS0_REG IXDP2351_CPLD_REG(0x24) */
85/* #define IXDP2351_CPLD_BB_GDXCS1_REG IXDP2351_CPLD_REG(0x28) */
86/* #define IXDP2351_CPLD_BB_CLOCK_REG IXDP2351_CPLD_REG(0x04) */
87
88
89#endif
diff --git a/arch/arm/mach-ixp23xx/include/mach/ixp23xx.h b/arch/arm/mach-ixp23xx/include/mach/ixp23xx.h
deleted file mode 100644
index 6d02481b1d6d..000000000000
--- a/arch/arm/mach-ixp23xx/include/mach/ixp23xx.h
+++ /dev/null
@@ -1,298 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/ixp23xx.h
3 *
4 * Register definitions for IXP23XX
5 *
6 * Copyright (C) 2003-2005 Intel Corporation.
7 * Copyright (C) 2005 MontaVista Software, Inc.
8 *
9 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#ifndef __ASM_ARCH_IXP23XX_H
17#define __ASM_ARCH_IXP23XX_H
18
19/*
20 * IXP2300 linux memory map:
21 *
22 * virt phys size
23 * fffd0000 a0000000 64K XSI2CPP_CSR
24 * fffc0000 c4000000 4K EXP_CFG
25 * fff00000 c8000000 64K PERIPHERAL
26 * fe000000 1c0000000 16M CAP_CSR
27 * fd000000 1c8000000 16M MSF_CSR
28 * fb000000 16M ---
29 * fa000000 1d8000000 32M PCI_IO
30 * f8000000 1da000000 32M PCI_CFG
31 * f6000000 1de000000 32M PCI_CREG
32 * f4000000 32M ---
33 * f0000000 1e0000000 64M PCI_MEM
34 * e[c-f]000000 per-platform mappings
35 */
36
37
38/****************************************************************************
39 * Static mappings.
40 ****************************************************************************/
41#define IXP23XX_XSI2CPP_CSR_PHYS 0xa0000000
42#define IXP23XX_XSI2CPP_CSR_VIRT 0xfffd0000
43#define IXP23XX_XSI2CPP_CSR_SIZE 0x00010000
44
45#define IXP23XX_EXP_CFG_PHYS 0xc4000000
46#define IXP23XX_EXP_CFG_VIRT 0xfffc0000
47#define IXP23XX_EXP_CFG_SIZE 0x00001000
48
49#define IXP23XX_PERIPHERAL_PHYS 0xc8000000
50#define IXP23XX_PERIPHERAL_VIRT 0xfff00000
51#define IXP23XX_PERIPHERAL_SIZE 0x00010000
52
53#define IXP23XX_CAP_CSR_PHYS 0x1c0000000ULL
54#define IXP23XX_CAP_CSR_VIRT 0xfe000000
55#define IXP23XX_CAP_CSR_SIZE 0x01000000
56
57#define IXP23XX_MSF_CSR_PHYS 0x1c8000000ULL
58#define IXP23XX_MSF_CSR_VIRT 0xfd000000
59#define IXP23XX_MSF_CSR_SIZE 0x01000000
60
61#define IXP23XX_PCI_IO_PHYS 0x1d8000000ULL
62#define IXP23XX_PCI_IO_VIRT 0xfa000000
63#define IXP23XX_PCI_IO_SIZE 0x02000000
64
65#define IXP23XX_PCI_CFG_PHYS 0x1da000000ULL
66#define IXP23XX_PCI_CFG_VIRT 0xf8000000
67#define IXP23XX_PCI_CFG_SIZE 0x02000000
68#define IXP23XX_PCI_CFG0_VIRT IXP23XX_PCI_CFG_VIRT
69#define IXP23XX_PCI_CFG1_VIRT (IXP23XX_PCI_CFG_VIRT + 0x01000000)
70
71#define IXP23XX_PCI_CREG_PHYS 0x1de000000ULL
72#define IXP23XX_PCI_CREG_VIRT 0xf6000000
73#define IXP23XX_PCI_CREG_SIZE 0x02000000
74#define IXP23XX_PCI_CSR_VIRT (IXP23XX_PCI_CREG_VIRT + 0x01000000)
75
76#define IXP23XX_PCI_MEM_START 0xe0000000
77#define IXP23XX_PCI_MEM_PHYS 0x1e0000000ULL
78#define IXP23XX_PCI_MEM_VIRT 0xf0000000
79#define IXP23XX_PCI_MEM_SIZE 0x04000000
80
81
82/****************************************************************************
83 * XSI2CPP CSRs.
84 ****************************************************************************/
85#define IXP23XX_XSI2CPP_REG(x) ((volatile unsigned long *)(IXP23XX_XSI2CPP_CSR_VIRT + (x)))
86#define IXP23XX_CPP2XSI_CURR_XFER_REG3 IXP23XX_XSI2CPP_REG(0xf8)
87#define IXP23XX_CPP2XSI_ADDR_31 (1 << 19)
88#define IXP23XX_CPP2XSI_PSH_OFF (1 << 20)
89#define IXP23XX_CPP2XSI_COH_OFF (1 << 21)
90
91
92/****************************************************************************
93 * Expansion Bus Config.
94 ****************************************************************************/
95#define IXP23XX_EXP_CFG_REG(x) ((volatile unsigned long *)(IXP23XX_EXP_CFG_VIRT + (x)))
96#define IXP23XX_EXP_CS0 IXP23XX_EXP_CFG_REG(0x00)
97#define IXP23XX_EXP_CS1 IXP23XX_EXP_CFG_REG(0x04)
98#define IXP23XX_EXP_CS2 IXP23XX_EXP_CFG_REG(0x08)
99#define IXP23XX_EXP_CS3 IXP23XX_EXP_CFG_REG(0x0c)
100#define IXP23XX_EXP_CS4 IXP23XX_EXP_CFG_REG(0x10)
101#define IXP23XX_EXP_CS5 IXP23XX_EXP_CFG_REG(0x14)
102#define IXP23XX_EXP_CS6 IXP23XX_EXP_CFG_REG(0x18)
103#define IXP23XX_EXP_CS7 IXP23XX_EXP_CFG_REG(0x1c)
104#define IXP23XX_FLASH_WRITABLE (0x2)
105#define IXP23XX_FLASH_BUS8 (0x1)
106
107#define IXP23XX_EXP_CFG0 IXP23XX_EXP_CFG_REG(0x20)
108#define IXP23XX_EXP_CFG1 IXP23XX_EXP_CFG_REG(0x24)
109#define IXP23XX_EXP_CFG0_MEM_MAP (1 << 31)
110#define IXP23XX_EXP_CFG0_XSCALE_SPEED_SEL (3 << 22)
111#define IXP23XX_EXP_CFG0_XSCALE_SPEED_EN (1 << 21)
112#define IXP23XX_EXP_CFG0_CPP_SPEED_SEL (3 << 19)
113#define IXP23XX_EXP_CFG0_CPP_SPEED_EN (1 << 18)
114#define IXP23XX_EXP_CFG0_PCI_SWIN (3 << 16)
115#define IXP23XX_EXP_CFG0_PCI_DWIN (3 << 14)
116#define IXP23XX_EXP_CFG0_PCI33_MODE (1 << 13)
117#define IXP23XX_EXP_CFG0_QDR_SPEED_SEL (1 << 12)
118#define IXP23XX_EXP_CFG0_CPP_DIV_SEL (1 << 5)
119#define IXP23XX_EXP_CFG0_XSI_NOT_PRES (1 << 4)
120#define IXP23XX_EXP_CFG0_PROM_BOOT (1 << 3)
121#define IXP23XX_EXP_CFG0_PCI_ARB (1 << 2)
122#define IXP23XX_EXP_CFG0_PCI_HOST (1 << 1)
123#define IXP23XX_EXP_CFG0_FLASH_WIDTH (1 << 0)
124
125#define IXP23XX_EXP_UNIT_FUSE IXP23XX_EXP_CFG_REG(0x28)
126#define IXP23XX_EXP_MSF_MUX IXP23XX_EXP_CFG_REG(0x30)
127#define IXP23XX_EXP_CFG_FUSE IXP23XX_EXP_CFG_REG(0x34)
128
129#define IXP23XX_EXP_BUS_PHYS 0x90000000
130#define IXP23XX_EXP_BUS_WINDOW_SIZE 0x01000000
131
132#define IXP23XX_EXP_BUS_CS0_BASE (IXP23XX_EXP_BUS_PHYS + 0x00000000)
133#define IXP23XX_EXP_BUS_CS1_BASE (IXP23XX_EXP_BUS_PHYS + 0x01000000)
134#define IXP23XX_EXP_BUS_CS2_BASE (IXP23XX_EXP_BUS_PHYS + 0x02000000)
135#define IXP23XX_EXP_BUS_CS3_BASE (IXP23XX_EXP_BUS_PHYS + 0x03000000)
136#define IXP23XX_EXP_BUS_CS4_BASE (IXP23XX_EXP_BUS_PHYS + 0x04000000)
137#define IXP23XX_EXP_BUS_CS5_BASE (IXP23XX_EXP_BUS_PHYS + 0x05000000)
138#define IXP23XX_EXP_BUS_CS6_BASE (IXP23XX_EXP_BUS_PHYS + 0x06000000)
139#define IXP23XX_EXP_BUS_CS7_BASE (IXP23XX_EXP_BUS_PHYS + 0x07000000)
140
141
142/****************************************************************************
143 * Peripherals.
144 ****************************************************************************/
145#define IXP23XX_UART1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x0000)
146#define IXP23XX_UART2_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x1000)
147#define IXP23XX_PMU_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x2000)
148#define IXP23XX_INTC_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x3000)
149#define IXP23XX_GPIO_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x4000)
150#define IXP23XX_TIMER_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x5000)
151#define IXP23XX_NPE0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x6000)
152#define IXP23XX_DSR_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x7000)
153#define IXP23XX_NPE1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x8000)
154#define IXP23XX_ETH0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x9000)
155#define IXP23XX_ETH1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xA000)
156#define IXP23XX_GIG0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xB000)
157#define IXP23XX_GIG1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xC000)
158#define IXP23XX_DDRS_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xD000)
159
160#define IXP23XX_UART1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x0000)
161#define IXP23XX_UART2_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x1000)
162#define IXP23XX_PMU_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x2000)
163#define IXP23XX_INTC_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x3000)
164#define IXP23XX_GPIO_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x4000)
165#define IXP23XX_TIMER_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x5000)
166#define IXP23XX_NPE0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x6000)
167#define IXP23XX_DSR_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x7000)
168#define IXP23XX_NPE1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x8000)
169#define IXP23XX_ETH0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x9000)
170#define IXP23XX_ETH1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xA000)
171#define IXP23XX_GIG0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xB000)
172#define IXP23XX_GIG1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xC000)
173#define IXP23XX_DDRS_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xD000)
174
175
176/****************************************************************************
177 * Interrupt controller.
178 ****************************************************************************/
179#define IXP23XX_INTC_REG(x) ((volatile unsigned long *)(IXP23XX_INTC_VIRT + (x)))
180#define IXP23XX_INTR_ST1 IXP23XX_INTC_REG(0x00)
181#define IXP23XX_INTR_ST2 IXP23XX_INTC_REG(0x04)
182#define IXP23XX_INTR_ST3 IXP23XX_INTC_REG(0x08)
183#define IXP23XX_INTR_ST4 IXP23XX_INTC_REG(0x0c)
184#define IXP23XX_INTR_EN1 IXP23XX_INTC_REG(0x10)
185#define IXP23XX_INTR_EN2 IXP23XX_INTC_REG(0x14)
186#define IXP23XX_INTR_EN3 IXP23XX_INTC_REG(0x18)
187#define IXP23XX_INTR_EN4 IXP23XX_INTC_REG(0x1c)
188#define IXP23XX_INTR_SEL1 IXP23XX_INTC_REG(0x20)
189#define IXP23XX_INTR_SEL2 IXP23XX_INTC_REG(0x24)
190#define IXP23XX_INTR_SEL3 IXP23XX_INTC_REG(0x28)
191#define IXP23XX_INTR_SEL4 IXP23XX_INTC_REG(0x2c)
192#define IXP23XX_INTR_IRQ_ST1 IXP23XX_INTC_REG(0x30)
193#define IXP23XX_INTR_IRQ_ST2 IXP23XX_INTC_REG(0x34)
194#define IXP23XX_INTR_IRQ_ST3 IXP23XX_INTC_REG(0x38)
195#define IXP23XX_INTR_IRQ_ST4 IXP23XX_INTC_REG(0x3c)
196#define IXP23XX_INTR_IRQ_ENC_ST_OFFSET 0x54
197
198
199/****************************************************************************
200 * GPIO.
201 ****************************************************************************/
202#define IXP23XX_GPIO_REG(x) ((volatile unsigned long *)(IXP23XX_GPIO_VIRT + (x)))
203#define IXP23XX_GPIO_GPOUTR IXP23XX_GPIO_REG(0x00)
204#define IXP23XX_GPIO_GPOER IXP23XX_GPIO_REG(0x04)
205#define IXP23XX_GPIO_GPINR IXP23XX_GPIO_REG(0x08)
206#define IXP23XX_GPIO_GPISR IXP23XX_GPIO_REG(0x0c)
207#define IXP23XX_GPIO_GPIT1R IXP23XX_GPIO_REG(0x10)
208#define IXP23XX_GPIO_GPIT2R IXP23XX_GPIO_REG(0x14)
209#define IXP23XX_GPIO_GPCLKR IXP23XX_GPIO_REG(0x18)
210#define IXP23XX_GPIO_GPDBSELR IXP23XX_GPIO_REG(0x1c)
211
212#define IXP23XX_GPIO_STYLE_MASK 0x7
213#define IXP23XX_GPIO_STYLE_ACTIVE_HIGH 0x0
214#define IXP23XX_GPIO_STYLE_ACTIVE_LOW 0x1
215#define IXP23XX_GPIO_STYLE_RISING_EDGE 0x2
216#define IXP23XX_GPIO_STYLE_FALLING_EDGE 0x3
217#define IXP23XX_GPIO_STYLE_TRANSITIONAL 0x4
218
219#define IXP23XX_GPIO_STYLE_SIZE 3
220
221
222/****************************************************************************
223 * Timer.
224 ****************************************************************************/
225#define IXP23XX_TIMER_REG(x) ((volatile unsigned long *)(IXP23XX_TIMER_VIRT + (x)))
226#define IXP23XX_TIMER_CONT IXP23XX_TIMER_REG(0x00)
227#define IXP23XX_TIMER1_TIMESTAMP IXP23XX_TIMER_REG(0x04)
228#define IXP23XX_TIMER1_RELOAD IXP23XX_TIMER_REG(0x08)
229#define IXP23XX_TIMER2_TIMESTAMP IXP23XX_TIMER_REG(0x0c)
230#define IXP23XX_TIMER2_RELOAD IXP23XX_TIMER_REG(0x10)
231#define IXP23XX_TIMER_WDOG IXP23XX_TIMER_REG(0x14)
232#define IXP23XX_TIMER_WDOG_EN IXP23XX_TIMER_REG(0x18)
233#define IXP23XX_TIMER_WDOG_KEY IXP23XX_TIMER_REG(0x1c)
234#define IXP23XX_TIMER_WDOG_KEY_MAGIC 0x482e
235#define IXP23XX_TIMER_STATUS IXP23XX_TIMER_REG(0x20)
236#define IXP23XX_TIMER_SOFT_RESET IXP23XX_TIMER_REG(0x24)
237#define IXP23XX_TIMER_SOFT_RESET_EN IXP23XX_TIMER_REG(0x28)
238
239#define IXP23XX_TIMER_ENABLE (1 << 0)
240#define IXP23XX_TIMER_ONE_SHOT (1 << 1)
241/* Low order bits of reload value ignored */
242#define IXP23XX_TIMER_RELOAD_MASK (0x3)
243#define IXP23XX_TIMER_DISABLED (0x0)
244#define IXP23XX_TIMER1_INT_PEND (1 << 0)
245#define IXP23XX_TIMER2_INT_PEND (1 << 1)
246#define IXP23XX_TIMER_STATUS_TS_PEND (1 << 2)
247#define IXP23XX_TIMER_STATUS_WDOG_PEND (1 << 3)
248#define IXP23XX_TIMER_STATUS_WARM_RESET (1 << 4)
249
250
251/****************************************************************************
252 * CAP CSRs.
253 ****************************************************************************/
254#define IXP23XX_GLOBAL_REG(x) ((volatile unsigned long *)(IXP23XX_CAP_CSR_VIRT + 0x4a00 + (x)))
255#define IXP23XX_PRODUCT_ID IXP23XX_GLOBAL_REG(0x00)
256#define IXP23XX_MISC_CONTROL IXP23XX_GLOBAL_REG(0x04)
257#define IXP23XX_MSF_CLK_CNTRL IXP23XX_GLOBAL_REG(0x08)
258#define IXP23XX_RESET0 IXP23XX_GLOBAL_REG(0x0c)
259#define IXP23XX_RESET1 IXP23XX_GLOBAL_REG(0x10)
260#define IXP23XX_STRAP_OPTIONS IXP23XX_GLOBAL_REG(0x18)
261
262#define IXP23XX_ENABLE_WATCHDOG (1 << 24)
263#define IXP23XX_SHPC_INIT_COMP (1 << 21)
264#define IXP23XX_RST_ALL (1 << 16)
265#define IXP23XX_RESET_PCI (1 << 2)
266#define IXP23XX_PCI_UNIT_RESET (1 << 1)
267#define IXP23XX_XSCALE_RESET (1 << 0)
268
269#define IXP23XX_UENGINE_CSR_VIRT_BASE (IXP23XX_CAP_CSR_VIRT + 0x18000)
270
271
272/****************************************************************************
273 * PCI CSRs.
274 ****************************************************************************/
275#define IXP23XX_PCI_CREG(x) ((volatile unsigned long *)(IXP23XX_PCI_CREG_VIRT + (x)))
276#define IXP23XX_PCI_CMDSTAT IXP23XX_PCI_CREG(0x04)
277#define IXP23XX_PCI_SRAM_BAR IXP23XX_PCI_CREG(0x14)
278#define IXP23XX_PCI_SDRAM_BAR IXP23XX_PCI_CREG(0x18)
279
280
281#define IXP23XX_PCI_CSR(x) ((volatile unsigned long *)(IXP23XX_PCI_CREG_VIRT + 0x01000000 + (x)))
282#define IXP23XX_PCI_OUT_INT_STATUS IXP23XX_PCI_CSR(0x0030)
283#define IXP23XX_PCI_OUT_INT_MASK IXP23XX_PCI_CSR(0x0034)
284#define IXP23XX_PCI_SRAM_BASE_ADDR_MASK IXP23XX_PCI_CSR(0x00fc)
285#define IXP23XX_PCI_DRAM_BASE_ADDR_MASK IXP23XX_PCI_CSR(0x0100)
286#define IXP23XX_PCI_CONTROL IXP23XX_PCI_CSR(0x013c)
287#define IXP23XX_PCI_ADDR_EXT IXP23XX_PCI_CSR(0x0140)
288#define IXP23XX_PCI_ME_PUSH_STATUS IXP23XX_PCI_CSR(0x0148)
289#define IXP23XX_PCI_ME_PUSH_EN IXP23XX_PCI_CSR(0x014c)
290#define IXP23XX_PCI_ERR_STATUS IXP23XX_PCI_CSR(0x0150)
291#define IXP23XX_PCI_ERROR_STATUS IXP23XX_PCI_CSR(0x0150)
292#define IXP23XX_PCI_ERR_ENABLE IXP23XX_PCI_CSR(0x0154)
293#define IXP23XX_PCI_XSCALE_INT_STATUS IXP23XX_PCI_CSR(0x0158)
294#define IXP23XX_PCI_XSCALE_INT_ENABLE IXP23XX_PCI_CSR(0x015c)
295#define IXP23XX_PCI_CPP_ADDR_BITS IXP23XX_PCI_CSR(0x0160)
296
297
298#endif
diff --git a/arch/arm/mach-ixp23xx/include/mach/memory.h b/arch/arm/mach-ixp23xx/include/mach/memory.h
deleted file mode 100644
index 6cf0704e946a..000000000000
--- a/arch/arm/mach-ixp23xx/include/mach/memory.h
+++ /dev/null
@@ -1,34 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/memory.h
3 *
4 * Copyright (c) 2003-2004 Intel Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12#ifndef __ASM_ARCH_MEMORY_H
13#define __ASM_ARCH_MEMORY_H
14
15#include <mach/hardware.h>
16
17/*
18 * Physical DRAM offset.
19 */
20#define PLAT_PHYS_OFFSET (0x00000000)
21
22#define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)
23
24#define __phys_to_bus(x) ((x) + (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET))
25#define __bus_to_phys(x) ((x) - (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET))
26
27#define __virt_to_bus(v) __phys_to_bus(__virt_to_phys(v))
28#define __bus_to_virt(b) __phys_to_virt(__bus_to_phys(b))
29#define __pfn_to_bus(p) __phys_to_bus(__pfn_to_phys(p))
30#define __bus_to_pfn(b) __phys_to_pfn(__bus_to_phys(b))
31
32#define arch_is_coherent() 1
33
34#endif
diff --git a/arch/arm/mach-ixp23xx/include/mach/platform.h b/arch/arm/mach-ixp23xx/include/mach/platform.h
deleted file mode 100644
index 798d8b42ab4a..000000000000
--- a/arch/arm/mach-ixp23xx/include/mach/platform.h
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/platform.h
3 *
4 * Various bits of code used by platform-level code.
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2005 (c) MontaVista Software, Inc.
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#ifndef __ASSEMBLY__
16
17static inline unsigned long ixp2000_reg_read(volatile void *reg)
18{
19 return *((volatile unsigned long *)reg);
20}
21
22static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
23{
24 *((volatile unsigned long *)reg) = val;
25}
26
27static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val)
28{
29 *((volatile unsigned long *)reg) = val;
30}
31
32struct pci_sys_data;
33
34void ixp23xx_map_io(void);
35void ixp23xx_init_irq(void);
36void ixp23xx_sys_init(void);
37void ixp23xx_restart(char, const char *);
38int ixp23xx_pci_setup(int, struct pci_sys_data *);
39void ixp23xx_pci_preinit(void);
40extern struct pci_ops ixp23xx_pci_ops;
41void ixp23xx_pci_slave_init(void);
42
43extern struct sys_timer ixp23xx_timer;
44
45#define IXP23XX_UART_XTAL 14745600
46
47#ifndef __ASSEMBLY__
48/*
49 * Is system memory on the XSI or CPP bus?
50 */
51static inline unsigned ixp23xx_cpp_boot(void)
52{
53 return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES);
54}
55#endif
56
57
58#endif
diff --git a/arch/arm/mach-ixp23xx/include/mach/time.h b/arch/arm/mach-ixp23xx/include/mach/time.h
deleted file mode 100644
index b61dafc884ac..000000000000
--- a/arch/arm/mach-ixp23xx/include/mach/time.h
+++ /dev/null
@@ -1,3 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/time.h
3 */
diff --git a/arch/arm/mach-ixp23xx/include/mach/timex.h b/arch/arm/mach-ixp23xx/include/mach/timex.h
deleted file mode 100644
index e341e9cf9c37..000000000000
--- a/arch/arm/mach-ixp23xx/include/mach/timex.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/timex.h
3 *
4 * XScale architecture timex specifications
5 */
6
7#define CLOCK_TICK_RATE 75000000
diff --git a/arch/arm/mach-ixp23xx/include/mach/uncompress.h b/arch/arm/mach-ixp23xx/include/mach/uncompress.h
deleted file mode 100644
index 8b4c358d2c04..000000000000
--- a/arch/arm/mach-ixp23xx/include/mach/uncompress.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/uncompress.h
3 *
4 * Copyright (C) 2002-2004 Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_UNCOMPRESS_H
12#define __ASM_ARCH_UNCOMPRESS_H
13
14#include <mach/ixp23xx.h>
15#include <linux/serial_reg.h>
16
17#define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS)
18
19static inline void putc(char c)
20{
21 int j;
22
23 for (j = 0; j < 0x1000; j++) {
24 if (UART_BASE[UART_LSR] & UART_LSR_THRE)
25 break;
26 barrier();
27 }
28
29 UART_BASE[UART_TX] = c;
30}
31
32static inline void flush(void)
33{
34}
35
36#define arch_decomp_setup()
37#define arch_decomp_wdog()
38
39
40#endif
diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c
deleted file mode 100644
index 8b48e32a8a62..000000000000
--- a/arch/arm/mach-ixp23xx/ixdp2351.c
+++ /dev/null
@@ -1,347 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/ixdp2351.c
3 *
4 * IXDP2351 board-specific routines
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2005 (c) MontaVista Software, Inc.
9 *
10 * Based on 2.4 code Copyright 2004 (c) Intel Corporation
11 *
12 * This file is licensed under the terms of the GNU General Public
13 * License version 2. This program is licensed "as is" without any
14 * warranty of any kind, whether express or implied.
15 */
16
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/spinlock.h>
20#include <linux/sched.h>
21#include <linux/interrupt.h>
22#include <linux/irq.h>
23#include <linux/serial.h>
24#include <linux/tty.h>
25#include <linux/bitops.h>
26#include <linux/ioport.h>
27#include <linux/serial_8250.h>
28#include <linux/serial_core.h>
29#include <linux/device.h>
30#include <linux/mm.h>
31#include <linux/pci.h>
32#include <linux/mtd/physmap.h>
33
34#include <asm/types.h>
35#include <asm/setup.h>
36#include <asm/memory.h>
37#include <mach/hardware.h>
38#include <asm/mach-types.h>
39#include <asm/tlbflush.h>
40#include <asm/pgtable.h>
41
42#include <asm/mach/map.h>
43#include <asm/mach/irq.h>
44#include <asm/mach/arch.h>
45#include <asm/mach/pci.h>
46
47/*
48 * IXDP2351 Interrupt Handling
49 */
50static void ixdp2351_inta_mask(struct irq_data *d)
51{
52 *IXDP2351_CPLD_INTA_MASK_SET_REG = IXDP2351_INTA_IRQ_MASK(d->irq);
53}
54
55static void ixdp2351_inta_unmask(struct irq_data *d)
56{
57 *IXDP2351_CPLD_INTA_MASK_CLR_REG = IXDP2351_INTA_IRQ_MASK(d->irq);
58}
59
60static void ixdp2351_inta_handler(unsigned int irq, struct irq_desc *desc)
61{
62 u16 ex_interrupt =
63 *IXDP2351_CPLD_INTA_STAT_REG & IXDP2351_INTA_IRQ_VALID;
64 int i;
65
66 desc->irq_data.chip->irq_mask(&desc->irq_data);
67
68 for (i = 0; i < IXDP2351_INTA_IRQ_NUM; i++) {
69 if (ex_interrupt & (1 << i)) {
70 int cpld_irq =
71 IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + i);
72 generic_handle_irq(cpld_irq);
73 }
74 }
75
76 desc->irq_data.chip->irq_unmask(&desc->irq_data);
77}
78
79static struct irq_chip ixdp2351_inta_chip = {
80 .irq_ack = ixdp2351_inta_mask,
81 .irq_mask = ixdp2351_inta_mask,
82 .irq_unmask = ixdp2351_inta_unmask
83};
84
85static void ixdp2351_intb_mask(struct irq_data *d)
86{
87 *IXDP2351_CPLD_INTB_MASK_SET_REG = IXDP2351_INTB_IRQ_MASK(d->irq);
88}
89
90static void ixdp2351_intb_unmask(struct irq_data *d)
91{
92 *IXDP2351_CPLD_INTB_MASK_CLR_REG = IXDP2351_INTB_IRQ_MASK(d->irq);
93}
94
95static void ixdp2351_intb_handler(unsigned int irq, struct irq_desc *desc)
96{
97 u16 ex_interrupt =
98 *IXDP2351_CPLD_INTB_STAT_REG & IXDP2351_INTB_IRQ_VALID;
99 int i;
100
101 desc->irq_data.chip->irq_ack(&desc->irq_data);
102
103 for (i = 0; i < IXDP2351_INTB_IRQ_NUM; i++) {
104 if (ex_interrupt & (1 << i)) {
105 int cpld_irq =
106 IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + i);
107 generic_handle_irq(cpld_irq);
108 }
109 }
110
111 desc->irq_data.chip->irq_unmask(&desc->irq_data);
112}
113
114static struct irq_chip ixdp2351_intb_chip = {
115 .irq_ack = ixdp2351_intb_mask,
116 .irq_mask = ixdp2351_intb_mask,
117 .irq_unmask = ixdp2351_intb_unmask
118};
119
120void __init ixdp2351_init_irq(void)
121{
122 int irq;
123
124 /* Mask all interrupts from CPLD, disable simulation */
125 *IXDP2351_CPLD_INTA_MASK_SET_REG = (u16) -1;
126 *IXDP2351_CPLD_INTB_MASK_SET_REG = (u16) -1;
127 *IXDP2351_CPLD_INTA_SIM_REG = 0;
128 *IXDP2351_CPLD_INTB_SIM_REG = 0;
129
130 ixp23xx_init_irq();
131
132 for (irq = IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE);
133 irq <
134 IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + IXDP2351_INTA_IRQ_NUM);
135 irq++) {
136 if (IXDP2351_INTA_IRQ_MASK(irq) & IXDP2351_INTA_IRQ_VALID) {
137 set_irq_flags(irq, IRQF_VALID);
138 irq_set_chip_and_handler(irq, &ixdp2351_inta_chip,
139 handle_level_irq);
140 }
141 }
142
143 for (irq = IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE);
144 irq <
145 IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + IXDP2351_INTB_IRQ_NUM);
146 irq++) {
147 if (IXDP2351_INTB_IRQ_MASK(irq) & IXDP2351_INTB_IRQ_VALID) {
148 set_irq_flags(irq, IRQF_VALID);
149 irq_set_chip_and_handler(irq, &ixdp2351_intb_chip,
150 handle_level_irq);
151 }
152 }
153
154 irq_set_chained_handler(IRQ_IXP23XX_INTA, ixdp2351_inta_handler);
155 irq_set_chained_handler(IRQ_IXP23XX_INTB, ixdp2351_intb_handler);
156}
157
158/*
159 * IXDP2351 PCI
160 */
161
162/*
163 * This board does not do normal PCI IRQ routing, or any
164 * sort of swizzling, so we just need to check where on the
165 * bus the device is and figure out what CPLD pin it is
166 * being routed to.
167 */
168#define DEVPIN(dev, pin) ((pin) | ((dev) << 3))
169
170static int __init ixdp2351_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
171{
172 u8 bus = dev->bus->number;
173 u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin);
174 struct pci_bus *tmp_bus = dev->bus;
175
176 /* Primary bus, no interrupts here */
177 if (!bus)
178 return -1;
179
180 /* Lookup first leaf in bus tree */
181 while ((tmp_bus->parent != NULL) && (tmp_bus->parent->parent != NULL))
182 tmp_bus = tmp_bus->parent;
183
184 /* Select between known bridges */
185 switch (tmp_bus->self->devfn | (tmp_bus->self->bus->number << 8)) {
186 /* Device is located after first bridge */
187 case 0x0008:
188 if (tmp_bus == dev->bus) {
189 /* Device is located directy after first bridge */
190 switch (devpin) {
191 /* Onboard 82546 */
192 case DEVPIN(1, 1): /* Onboard 82546 ch 0 */
193 return IRQ_IXDP2351_INTA_82546;
194 case DEVPIN(1, 2): /* Onboard 82546 ch 1 */
195 return IRQ_IXDP2351_INTB_82546;
196 /* PMC SLOT */
197 case DEVPIN(0, 1): /* PMCP INTA# */
198 case DEVPIN(2, 4): /* PMCS INTD# */
199 return IRQ_IXDP2351_SPCI_PMC_INTA;
200 case DEVPIN(0, 2): /* PMCP INTB# */
201 case DEVPIN(2, 1): /* PMCS INTA# */
202 return IRQ_IXDP2351_SPCI_PMC_INTB;
203 case DEVPIN(0, 3): /* PMCP INTC# */
204 case DEVPIN(2, 2): /* PMCS INTB# */
205 return IRQ_IXDP2351_SPCI_PMC_INTC;
206 case DEVPIN(0, 4): /* PMCP INTD# */
207 case DEVPIN(2, 3): /* PMCS INTC# */
208 return IRQ_IXDP2351_SPCI_PMC_INTD;
209 }
210 } else {
211 /* Device is located indirectly after first bridge */
212 /* Not supported now */
213 return -1;
214 }
215 break;
216 case 0x0010:
217 if (tmp_bus == dev->bus) {
218 /* Device is located directy after second bridge */
219 /* Secondary bus of second bridge */
220 switch (devpin) {
221 case DEVPIN(0, 1): /* DB#0 */
222 case DEVPIN(0, 2):
223 case DEVPIN(0, 3):
224 case DEVPIN(0, 4):
225 return IRQ_IXDP2351_SPCI_DB_0;
226 case DEVPIN(1, 1): /* DB#1 */
227 case DEVPIN(1, 2):
228 case DEVPIN(1, 3):
229 case DEVPIN(1, 4):
230 return IRQ_IXDP2351_SPCI_DB_1;
231 case DEVPIN(2, 1): /* FIC1 */
232 case DEVPIN(2, 2):
233 case DEVPIN(2, 3):
234 case DEVPIN(2, 4):
235 case DEVPIN(3, 1): /* FIC2 */
236 case DEVPIN(3, 2):
237 case DEVPIN(3, 3):
238 case DEVPIN(3, 4):
239 return IRQ_IXDP2351_SPCI_FIC;
240 }
241 } else {
242 /* Device is located indirectly after second bridge */
243 /* Not supported now */
244 return -1;
245 }
246 break;
247 }
248
249 return -1;
250}
251
252struct hw_pci ixdp2351_pci __initdata = {
253 .nr_controllers = 1,
254 .ops = &ixp23xx_pci_ops,
255 .preinit = ixp23xx_pci_preinit,
256 .setup = ixp23xx_pci_setup,
257 .map_irq = ixdp2351_map_irq,
258};
259
260int __init ixdp2351_pci_init(void)
261{
262 if (machine_is_ixdp2351())
263 pci_common_init(&ixdp2351_pci);
264
265 return 0;
266}
267
268subsys_initcall(ixdp2351_pci_init);
269
270/*
271 * IXDP2351 Static Mapped I/O
272 */
273static struct map_desc ixdp2351_io_desc[] __initdata = {
274 {
275 .virtual = IXDP2351_NP_VIRT_BASE,
276 .pfn = __phys_to_pfn((u64)IXDP2351_NP_PHYS_BASE),
277 .length = IXDP2351_NP_PHYS_SIZE,
278 .type = MT_DEVICE
279 }, {
280 .virtual = IXDP2351_BB_BASE_VIRT,
281 .pfn = __phys_to_pfn((u64)IXDP2351_BB_BASE_PHYS),
282 .length = IXDP2351_BB_SIZE,
283 .type = MT_DEVICE
284 }
285};
286
287static void __init ixdp2351_map_io(void)
288{
289 ixp23xx_map_io();
290 iotable_init(ixdp2351_io_desc, ARRAY_SIZE(ixdp2351_io_desc));
291}
292
293static struct physmap_flash_data ixdp2351_flash_data = {
294 .width = 1,
295};
296
297static struct resource ixdp2351_flash_resource = {
298 .start = 0x90000000,
299 .end = 0x93ffffff,
300 .flags = IORESOURCE_MEM,
301};
302
303static struct platform_device ixdp2351_flash = {
304 .name = "physmap-flash",
305 .id = 0,
306 .dev = {
307 .platform_data = &ixdp2351_flash_data,
308 },
309 .num_resources = 1,
310 .resource = &ixdp2351_flash_resource,
311};
312
313static void __init ixdp2351_init(void)
314{
315 platform_device_register(&ixdp2351_flash);
316
317 /*
318 * Mark flash as writeable
319 */
320 IXP23XX_EXP_CS0[0] |= IXP23XX_FLASH_WRITABLE;
321 IXP23XX_EXP_CS0[1] |= IXP23XX_FLASH_WRITABLE;
322 IXP23XX_EXP_CS0[2] |= IXP23XX_FLASH_WRITABLE;
323 IXP23XX_EXP_CS0[3] |= IXP23XX_FLASH_WRITABLE;
324
325 ixp23xx_sys_init();
326}
327
328static void ixdp2351_restart(char mode, const char *cmd)
329{
330 /* First try machine specific support */
331
332 *IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_MAGIC;
333 (void) *IXDP2351_CPLD_RESET1_REG;
334 *IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_ENABLE;
335
336 ixp23xx_restart(mode, cmd);
337}
338
339MACHINE_START(IXDP2351, "Intel IXDP2351 Development Platform")
340 /* Maintainer: MontaVista Software, Inc. */
341 .map_io = ixdp2351_map_io,
342 .init_irq = ixdp2351_init_irq,
343 .timer = &ixp23xx_timer,
344 .atag_offset = 0x100,
345 .init_machine = ixdp2351_init,
346 .restart = ixdp2351_restart,
347MACHINE_END
diff --git a/arch/arm/mach-ixp23xx/pci.c b/arch/arm/mach-ixp23xx/pci.c
deleted file mode 100644
index 9211506ef556..000000000000
--- a/arch/arm/mach-ixp23xx/pci.c
+++ /dev/null
@@ -1,288 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/pci.c
3 *
4 * PCI routines for IXP23XX based systems
5 *
6 * Copyright (c) 2005 MontaVista Software, Inc.
7 *
8 * based on original code:
9 *
10 * Author: Naeem Afzal <naeem.m.afzal@intel.com>
11 * Copyright 2002-2005 Intel Corp.
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 */
18
19#include <linux/sched.h>
20#include <linux/kernel.h>
21#include <linux/pci.h>
22#include <linux/interrupt.h>
23#include <linux/mm.h>
24#include <linux/init.h>
25#include <linux/ioport.h>
26#include <linux/delay.h>
27#include <linux/io.h>
28
29#include <asm/irq.h>
30#include <asm/sizes.h>
31#include <asm/mach/pci.h>
32#include <mach/hardware.h>
33
34extern int (*external_fault) (unsigned long, struct pt_regs *);
35
36static volatile int pci_master_aborts = 0;
37
38#ifdef DEBUG
39#define DBG(x...) printk(x)
40#else
41#define DBG(x...)
42#endif
43
44int clear_master_aborts(void);
45
46static u32
47*ixp23xx_pci_config_addr(unsigned int bus_nr, unsigned int devfn, int where)
48{
49 u32 *paddress;
50
51 /*
52 * Must be dword aligned
53 */
54 where &= ~3;
55
56 /*
57 * For top bus, generate type 0, else type 1
58 */
59 if (!bus_nr) {
60 if (PCI_SLOT(devfn) >= 8)
61 return 0;
62
63 paddress = (u32 *) (IXP23XX_PCI_CFG0_VIRT
64 | (1 << (PCI_SLOT(devfn) + 16))
65 | (PCI_FUNC(devfn) << 8) | where);
66 } else {
67 paddress = (u32 *) (IXP23XX_PCI_CFG1_VIRT
68 | (bus_nr << 16)
69 | (PCI_SLOT(devfn) << 11)
70 | (PCI_FUNC(devfn) << 8) | where);
71 }
72
73 return paddress;
74}
75
76/*
77 * Mask table, bits to mask for quantity of size 1, 2 or 4 bytes.
78 * 0 and 3 are not valid indexes...
79 */
80static u32 bytemask[] = {
81 /*0*/ 0,
82 /*1*/ 0xff,
83 /*2*/ 0xffff,
84 /*3*/ 0,
85 /*4*/ 0xffffffff,
86};
87
88static int ixp23xx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
89 int where, int size, u32 *value)
90{
91 u32 n;
92 u32 *addr;
93
94 n = where % 4;
95
96 DBG("In config_read(%d) %d from dev %d:%d:%d\n", size, where,
97 bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn));
98
99 addr = ixp23xx_pci_config_addr(bus->number, devfn, where);
100 if (!addr)
101 return PCIBIOS_DEVICE_NOT_FOUND;
102
103 pci_master_aborts = 0;
104 *value = (*addr >> (8*n)) & bytemask[size];
105 if (pci_master_aborts) {
106 pci_master_aborts = 0;
107 *value = 0xffffffff;
108 return PCIBIOS_DEVICE_NOT_FOUND;
109 }
110
111 return PCIBIOS_SUCCESSFUL;
112}
113
114/*
115 * We don't do error checking on the address for writes.
116 * It's assumed that the user checked for the device existing first
117 * by doing a read first.
118 */
119static int ixp23xx_pci_write_config(struct pci_bus *bus, unsigned int devfn,
120 int where, int size, u32 value)
121{
122 u32 mask;
123 u32 *addr;
124 u32 temp;
125
126 mask = ~(bytemask[size] << ((where % 0x4) * 8));
127 addr = ixp23xx_pci_config_addr(bus->number, devfn, where);
128 if (!addr)
129 return PCIBIOS_DEVICE_NOT_FOUND;
130 temp = (u32) (value) << ((where % 0x4) * 8);
131 *addr = (*addr & mask) | temp;
132
133 clear_master_aborts();
134
135 return PCIBIOS_SUCCESSFUL;
136}
137
138struct pci_ops ixp23xx_pci_ops = {
139 .read = ixp23xx_pci_read_config,
140 .write = ixp23xx_pci_write_config,
141};
142
143int ixp23xx_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
144{
145 volatile unsigned long temp;
146 unsigned long flags;
147
148 pci_master_aborts = 1;
149
150 local_irq_save(flags);
151 temp = *IXP23XX_PCI_CONTROL;
152
153 /*
154 * master abort and cmd tgt err
155 */
156 if (temp & ((1 << 8) | (1 << 5)))
157 *IXP23XX_PCI_CONTROL = temp;
158
159 temp = *IXP23XX_PCI_CMDSTAT;
160
161 if (temp & (1 << 29))
162 *IXP23XX_PCI_CMDSTAT = temp;
163 local_irq_restore(flags);
164
165 /*
166 * If it was an imprecise abort, then we need to correct the
167 * return address to be _after_ the instruction.
168 */
169 if (fsr & (1 << 10))
170 regs->ARM_pc += 4;
171
172 return 0;
173}
174
175int clear_master_aborts(void)
176{
177 volatile u32 temp;
178
179 temp = *IXP23XX_PCI_CONTROL;
180
181 /*
182 * master abort and cmd tgt err
183 */
184 if (temp & ((1 << 8) | (1 << 5)))
185 *IXP23XX_PCI_CONTROL = temp;
186
187 temp = *IXP23XX_PCI_CMDSTAT;
188
189 if (temp & (1 << 29))
190 *IXP23XX_PCI_CMDSTAT = temp;
191
192 return 0;
193}
194
195static void __init ixp23xx_pci_common_init(void)
196{
197#ifdef __ARMEB__
198 *IXP23XX_PCI_CONTROL |= 0x20000; /* set I/O swapping */
199#endif
200 /*
201 * ADDR_31 needs to be clear for PCI memory access to CPP memory
202 */
203 *IXP23XX_CPP2XSI_CURR_XFER_REG3 &= ~IXP23XX_CPP2XSI_ADDR_31;
204 *IXP23XX_CPP2XSI_CURR_XFER_REG3 |= IXP23XX_CPP2XSI_PSH_OFF;
205
206 /*
207 * Select correct memory for PCI inbound transactions
208 */
209 if (ixp23xx_cpp_boot()) {
210 *IXP23XX_PCI_CPP_ADDR_BITS &= ~(1 << 1);
211 } else {
212 *IXP23XX_PCI_CPP_ADDR_BITS |= (1 << 1);
213
214 /*
215 * Enable coherency on A2 silicon.
216 */
217 if (arch_is_coherent())
218 *IXP23XX_CPP2XSI_CURR_XFER_REG3 &= ~IXP23XX_CPP2XSI_COH_OFF;
219 }
220}
221
222void __init ixp23xx_pci_preinit(void)
223{
224 pcibios_min_io = 0;
225 pcibios_min_mem = 0xe0000000;
226
227 pci_set_flags(0);
228
229 ixp23xx_pci_common_init();
230
231 hook_fault_code(16+6, ixp23xx_pci_abort_handler, SIGBUS, 0,
232 "PCI config cycle to non-existent device");
233
234 *IXP23XX_PCI_ADDR_EXT = 0x0000e000;
235}
236
237/*
238 * Prevent PCI layer from seeing the inbound host-bridge resources
239 */
240static void __devinit pci_fixup_ixp23xx(struct pci_dev *dev)
241{
242 int i;
243
244 dev->class &= 0xff;
245 dev->class |= PCI_CLASS_BRIDGE_HOST << 8;
246 for (i = 0; i < PCI_NUM_RESOURCES; i++) {
247 dev->resource[i].start = 0;
248 dev->resource[i].end = 0;
249 dev->resource[i].flags = 0;
250 }
251}
252DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9002, pci_fixup_ixp23xx);
253
254/*
255 * IXP2300 systems often have large resource requirements, so we just
256 * use our own resource space.
257 */
258static struct resource ixp23xx_pci_mem_space = {
259 .start = IXP23XX_PCI_MEM_START,
260 .end = IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE - 1,
261 .flags = IORESOURCE_MEM,
262 .name = "PCI Mem Space"
263};
264
265static struct resource ixp23xx_pci_io_space = {
266 .start = 0x00000100,
267 .end = 0x01ffffff,
268 .flags = IORESOURCE_IO,
269 .name = "PCI I/O Space"
270};
271
272int ixp23xx_pci_setup(int nr, struct pci_sys_data *sys)
273{
274 if (nr >= 1)
275 return 0;
276
277 pci_add_resource_offset(&sys->resources,
278 &ixp23xx_pci_io_space, sys->io_offset);
279 pci_add_resource_offset(&sys->resources,
280 &ixp23xx_pci_mem_space, sys->mem_offset);
281
282 return 1;
283}
284
285void __init ixp23xx_pci_slave_init(void)
286{
287 ixp23xx_pci_common_init();
288}
diff --git a/arch/arm/mach-ixp23xx/roadrunner.c b/arch/arm/mach-ixp23xx/roadrunner.c
deleted file mode 100644
index 8c0e5de3c609..000000000000
--- a/arch/arm/mach-ixp23xx/roadrunner.c
+++ /dev/null
@@ -1,180 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/roadrunner.c
3 *
4 * RoadRunner board-specific routines
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2005 (c) MontaVista Software, Inc.
9 *
10 * Based on 2.4 code Copyright 2005 (c) ADI Engineering Corporation
11 *
12 * This file is licensed under the terms of the GNU General Public
13 * License version 2. This program is licensed "as is" without any
14 * warranty of any kind, whether express or implied.
15 */
16
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/spinlock.h>
20#include <linux/sched.h>
21#include <linux/interrupt.h>
22#include <linux/serial.h>
23#include <linux/tty.h>
24#include <linux/bitops.h>
25#include <linux/ioport.h>
26#include <linux/serial_8250.h>
27#include <linux/serial_core.h>
28#include <linux/device.h>
29#include <linux/mm.h>
30#include <linux/pci.h>
31#include <linux/mtd/physmap.h>
32
33#include <asm/types.h>
34#include <asm/setup.h>
35#include <asm/memory.h>
36#include <mach/hardware.h>
37#include <asm/mach-types.h>
38#include <asm/irq.h>
39#include <asm/tlbflush.h>
40#include <asm/pgtable.h>
41
42#include <asm/mach/map.h>
43#include <asm/mach/irq.h>
44#include <asm/mach/arch.h>
45#include <asm/mach/pci.h>
46
47/*
48 * Interrupt mapping
49 */
50#define INTA IRQ_ROADRUNNER_PCI_INTA
51#define INTB IRQ_ROADRUNNER_PCI_INTB
52#define INTC IRQ_ROADRUNNER_PCI_INTC
53#define INTD IRQ_ROADRUNNER_PCI_INTD
54
55#define INTC_PIN IXP23XX_GPIO_PIN_11
56#define INTD_PIN IXP23XX_GPIO_PIN_12
57
58static int __init roadrunner_map_irq(const struct pci_dev *dev, u8 idsel,
59 u8 pin)
60{
61 static int pci_card_slot_irq[] = {INTB, INTC, INTD, INTA};
62 static int pmc_card_slot_irq[] = {INTA, INTB, INTC, INTD};
63 static int usb_irq[] = {INTB, INTC, INTD, -1};
64 static int mini_pci_1_irq[] = {INTB, INTC, -1, -1};
65 static int mini_pci_2_irq[] = {INTC, INTD, -1, -1};
66
67 switch(dev->bus->number) {
68 case 0:
69 switch(dev->devfn) {
70 case 0x0: // PCI-PCI bridge
71 break;
72 case 0x8: // PCI Card Slot
73 return pci_card_slot_irq[pin - 1];
74 case 0x10: // PMC Slot
75 return pmc_card_slot_irq[pin - 1];
76 case 0x18: // PMC Slot Secondary Agent
77 break;
78 case 0x20: // IXP Processor
79 break;
80 default:
81 return NO_IRQ;
82 }
83 break;
84
85 case 1:
86 switch(dev->devfn) {
87 case 0x0: // IDE Controller
88 return (pin == 1) ? INTC : -1;
89 case 0x8: // USB fun 0
90 case 0x9: // USB fun 1
91 case 0xa: // USB fun 2
92 return usb_irq[pin - 1];
93 case 0x10: // Mini PCI 1
94 return mini_pci_1_irq[pin-1];
95 case 0x18: // Mini PCI 2
96 return mini_pci_2_irq[pin-1];
97 case 0x20: // MEM slot
98 return (pin == 1) ? INTA : -1;
99 default:
100 return NO_IRQ;
101 }
102 break;
103
104 default:
105 return NO_IRQ;
106 }
107
108 return NO_IRQ;
109}
110
111static void __init roadrunner_pci_preinit(void)
112{
113 irq_set_irq_type(IRQ_ROADRUNNER_PCI_INTC, IRQ_TYPE_LEVEL_LOW);
114 irq_set_irq_type(IRQ_ROADRUNNER_PCI_INTD, IRQ_TYPE_LEVEL_LOW);
115
116 ixp23xx_pci_preinit();
117}
118
119static struct hw_pci roadrunner_pci __initdata = {
120 .nr_controllers = 1,
121 .ops = &ixp23xx_pci_ops,
122 .preinit = roadrunner_pci_preinit,
123 .setup = ixp23xx_pci_setup,
124 .map_irq = roadrunner_map_irq,
125};
126
127static int __init roadrunner_pci_init(void)
128{
129 if (machine_is_roadrunner())
130 pci_common_init(&roadrunner_pci);
131
132 return 0;
133};
134
135subsys_initcall(roadrunner_pci_init);
136
137static struct physmap_flash_data roadrunner_flash_data = {
138 .width = 2,
139};
140
141static struct resource roadrunner_flash_resource = {
142 .start = 0x90000000,
143 .end = 0x93ffffff,
144 .flags = IORESOURCE_MEM,
145};
146
147static struct platform_device roadrunner_flash = {
148 .name = "physmap-flash",
149 .id = 0,
150 .dev = {
151 .platform_data = &roadrunner_flash_data,
152 },
153 .num_resources = 1,
154 .resource = &roadrunner_flash_resource,
155};
156
157static void __init roadrunner_init(void)
158{
159 platform_device_register(&roadrunner_flash);
160
161 /*
162 * Mark flash as writeable
163 */
164 IXP23XX_EXP_CS0[0] |= IXP23XX_FLASH_WRITABLE;
165 IXP23XX_EXP_CS0[1] |= IXP23XX_FLASH_WRITABLE;
166 IXP23XX_EXP_CS0[2] |= IXP23XX_FLASH_WRITABLE;
167 IXP23XX_EXP_CS0[3] |= IXP23XX_FLASH_WRITABLE;
168
169 ixp23xx_sys_init();
170}
171
172MACHINE_START(ROADRUNNER, "ADI Engineering RoadRunner Development Platform")
173 /* Maintainer: Deepak Saxena */
174 .map_io = ixp23xx_map_io,
175 .init_irq = ixp23xx_init_irq,
176 .timer = &ixp23xx_timer,
177 .atag_offset = 0x100,
178 .init_machine = roadrunner_init,
179 .restart = ixp23xx_restart,
180MACHINE_END
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index db81ed531031..75b3cfcada6d 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -17,7 +17,6 @@
17#include <linux/gpio.h> 17#include <linux/gpio.h>
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/irq.h> 19#include <linux/irq.h>
20#include <linux/gpio.h>
21#include <linux/platform_device.h> 20#include <linux/platform_device.h>
22#include <linux/delay.h> 21#include <linux/delay.h>
23#include <linux/io.h> 22#include <linux/io.h>
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index 7e8909c978c3..fbaa4ed95a3c 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -17,7 +17,6 @@
17#include <linux/gpio.h> 17#include <linux/gpio.h>
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/irq.h> 19#include <linux/irq.h>
20#include <linux/gpio.h>
21#include <linux/platform_device.h> 20#include <linux/platform_device.h>
22#include <linux/delay.h> 21#include <linux/delay.h>
23#include <linux/usb/msm_hsusb.h> 22#include <linux/usb/msm_hsusb.h>
diff --git a/arch/arm/mach-msm/include/mach/debug-macro.S b/arch/arm/mach-msm/include/mach/debug-macro.S
index 3ffd8668c9a5..0e05f88abcd5 100644
--- a/arch/arm/mach-msm/include/mach/debug-macro.S
+++ b/arch/arm/mach-msm/include/mach/debug-macro.S
@@ -30,8 +30,7 @@
30 @ Write the 1 character to UARTDM_TF 30 @ Write the 1 character to UARTDM_TF
31 str \rd, [\rx, #0x70] 31 str \rd, [\rx, #0x70]
32#else 32#else
33 teq \rx, #0 33 str \rd, [\rx, #0x0C]
34 strne \rd, [\rx, #0x0C]
35#endif 34#endif
36 .endm 35 .endm
37 36
diff --git a/arch/arm/mach-msm/scm.c b/arch/arm/mach-msm/scm.c
index bafabb502580..c536fd6bf827 100644
--- a/arch/arm/mach-msm/scm.c
+++ b/arch/arm/mach-msm/scm.c
@@ -282,6 +282,9 @@ u32 scm_get_version(void)
282 __asmeq("%1", "r1") 282 __asmeq("%1", "r1")
283 __asmeq("%2", "r0") 283 __asmeq("%2", "r0")
284 __asmeq("%3", "r1") 284 __asmeq("%3", "r1")
285#ifdef REQUIRES_SEC
286 ".arch_extension sec\n"
287#endif
285 "smc #0 @ switch to secure world\n" 288 "smc #0 @ switch to secure world\n"
286 : "=r" (r0), "=r" (r1) 289 : "=r" (r0), "=r" (r1)
287 : "r" (r0), "r" (r1) 290 : "r" (r0), "r" (r1)
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index 9923f92b5450..398e9e53e189 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -12,6 +12,9 @@ endif
12 12
13obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o 13obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o
14 14
15# OCPI interconnect support for 1710, 1610 and 5912
16obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
17
15# Power Management 18# Power Management
16obj-$(CONFIG_PM) += pm.o sleep.o 19obj-$(CONFIG_PM) += pm.o sleep.o
17 20
@@ -28,13 +31,15 @@ usb-fs-$(CONFIG_USB) := usb.o
28obj-y += $(usb-fs-m) $(usb-fs-y) 31obj-y += $(usb-fs-m) $(usb-fs-y)
29 32
30# Specific board support 33# Specific board support
31obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o board-h2-mmc.o 34obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o board-h2-mmc.o \
35 board-nand.o
32obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o 36obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o
33obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o 37obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
34obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o 38obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o board-nand.o
35obj-$(CONFIG_MACH_OMAP_FSAMPLE) += board-fsample.o 39obj-$(CONFIG_MACH_OMAP_FSAMPLE) += board-fsample.o board-nand.o
36obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o 40obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o
37obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o board-h3-mmc.o 41obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o board-h3-mmc.o \
42 board-nand.o
38obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o 43obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o
39obj-$(CONFIG_MACH_OMAP_PALMTE) += board-palmte.o 44obj-$(CONFIG_MACH_OMAP_PALMTE) += board-palmte.o
40obj-$(CONFIG_MACH_OMAP_PALMZ71) += board-palmz71.o 45obj-$(CONFIG_MACH_OMAP_PALMZ71) += board-palmz71.o
diff --git a/arch/arm/mach-omap1/ams-delta-fiq.c b/arch/arm/mach-omap1/ams-delta-fiq.c
index cfd98b186fcc..68e8e5654c0a 100644
--- a/arch/arm/mach-omap1/ams-delta-fiq.c
+++ b/arch/arm/mach-omap1/ams-delta-fiq.c
@@ -102,7 +102,7 @@ void __init ams_delta_init_fiq(void)
102 } 102 }
103 103
104 retval = request_irq(INT_DEFERRED_FIQ, deferred_fiq, 104 retval = request_irq(INT_DEFERRED_FIQ, deferred_fiq,
105 IRQ_TYPE_EDGE_RISING, "deferred_fiq", 0); 105 IRQ_TYPE_EDGE_RISING, "deferred_fiq", NULL);
106 if (retval < 0) { 106 if (retval < 0) {
107 pr_err("Failed to get deferred_fiq IRQ, ret=%d\n", retval); 107 pr_err("Failed to get deferred_fiq IRQ, ret=%d\n", retval);
108 release_fiq(&fh); 108 release_fiq(&fh);
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
index 80bd43c7f4ec..4a4afb371022 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -185,20 +185,6 @@ static struct platform_device nor_device = {
185 .resource = &nor_resource, 185 .resource = &nor_resource,
186}; 186};
187 187
188static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
189{
190 struct nand_chip *this = mtd->priv;
191 unsigned long mask;
192
193 if (cmd == NAND_CMD_NONE)
194 return;
195
196 mask = (ctrl & NAND_CLE) ? 0x02 : 0;
197 if (ctrl & NAND_ALE)
198 mask |= 0x04;
199 writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
200}
201
202#define FSAMPLE_NAND_RB_GPIO_PIN 62 188#define FSAMPLE_NAND_RB_GPIO_PIN 62
203 189
204static int nand_dev_ready(struct mtd_info *mtd) 190static int nand_dev_ready(struct mtd_info *mtd)
@@ -216,7 +202,7 @@ static struct platform_nand_data nand_data = {
216 .part_probe_types = part_probes, 202 .part_probe_types = part_probes,
217 }, 203 },
218 .ctrl = { 204 .ctrl = {
219 .cmd_ctrl = nand_cmd_ctl, 205 .cmd_ctrl = omap1_nand_cmd_ctl,
220 .dev_ready = nand_dev_ready, 206 .dev_ready = nand_dev_ready,
221 }, 207 },
222}; 208};
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 553a2e535764..057ec13f0649 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -179,20 +179,6 @@ static struct mtd_partition h2_nand_partitions[] = {
179 }, 179 },
180}; 180};
181 181
182static void h2_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
183{
184 struct nand_chip *this = mtd->priv;
185 unsigned long mask;
186
187 if (cmd == NAND_CMD_NONE)
188 return;
189
190 mask = (ctrl & NAND_CLE) ? 0x02 : 0;
191 if (ctrl & NAND_ALE)
192 mask |= 0x04;
193 writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
194}
195
196#define H2_NAND_RB_GPIO_PIN 62 182#define H2_NAND_RB_GPIO_PIN 62
197 183
198static int h2_nand_dev_ready(struct mtd_info *mtd) 184static int h2_nand_dev_ready(struct mtd_info *mtd)
@@ -212,9 +198,8 @@ static struct platform_nand_data h2_nand_platdata = {
212 .part_probe_types = h2_part_probes, 198 .part_probe_types = h2_part_probes,
213 }, 199 },
214 .ctrl = { 200 .ctrl = {
215 .cmd_ctrl = h2_nand_cmd_ctl, 201 .cmd_ctrl = omap1_nand_cmd_ctl,
216 .dev_ready = h2_nand_dev_ready, 202 .dev_ready = h2_nand_dev_ready,
217
218 }, 203 },
219}; 204};
220 205
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 4c19f4c06851..f6ddf8759657 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -181,20 +181,6 @@ static struct mtd_partition nand_partitions[] = {
181 }, 181 },
182}; 182};
183 183
184static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
185{
186 struct nand_chip *this = mtd->priv;
187 unsigned long mask;
188
189 if (cmd == NAND_CMD_NONE)
190 return;
191
192 mask = (ctrl & NAND_CLE) ? 0x02 : 0;
193 if (ctrl & NAND_ALE)
194 mask |= 0x04;
195 writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
196}
197
198#define H3_NAND_RB_GPIO_PIN 10 184#define H3_NAND_RB_GPIO_PIN 10
199 185
200static int nand_dev_ready(struct mtd_info *mtd) 186static int nand_dev_ready(struct mtd_info *mtd)
@@ -214,7 +200,7 @@ static struct platform_nand_data nand_platdata = {
214 .part_probe_types = part_probes, 200 .part_probe_types = part_probes,
215 }, 201 },
216 .ctrl = { 202 .ctrl = {
217 .cmd_ctrl = nand_cmd_ctl, 203 .cmd_ctrl = omap1_nand_cmd_ctl,
218 .dev_ready = nand_dev_ready, 204 .dev_ready = nand_dev_ready,
219 205
220 }, 206 },
diff --git a/arch/arm/mach-omap1/board-nand.c b/arch/arm/mach-omap1/board-nand.c
new file mode 100644
index 000000000000..4d0835327d20
--- /dev/null
+++ b/arch/arm/mach-omap1/board-nand.c
@@ -0,0 +1,37 @@
1/*
2 * linux/arch/arm/mach-omap1/board-nand.c
3 *
4 * Common OMAP1 board NAND code
5 *
6 * Copyright (C) 2004, 2012 Texas Instruments, Inc.
7 * Copyright (C) 2002 MontaVista Software, Inc.
8 * Copyright (C) 2001 RidgeRun, Inc.
9 * Author: RidgeRun, Inc.
10 * Greg Lonnon (glonnon@ridgerun.com) or info@ridgerun.com
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16#include <linux/kernel.h>
17#include <linux/io.h>
18#include <linux/mtd/mtd.h>
19#include <linux/mtd/nand.h>
20
21#include "common.h"
22
23void omap1_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
24{
25 struct nand_chip *this = mtd->priv;
26 unsigned long mask;
27
28 if (cmd == NAND_CMD_NONE)
29 return;
30
31 mask = (ctrl & NAND_CLE) ? 0x02 : 0;
32 if (ctrl & NAND_ALE)
33 mask |= 0x04;
34
35 writeb(cmd, this->IO_ADDR_W + mask);
36}
37
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index a2c5abcd7c84..61ed4f0247ce 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -289,10 +289,10 @@ palmz71_gpio_setup(int early)
289 gpio_direction_input(PALMZ71_USBDETECT_GPIO); 289 gpio_direction_input(PALMZ71_USBDETECT_GPIO);
290 if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO), 290 if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO),
291 palmz71_powercable, IRQF_SAMPLE_RANDOM, 291 palmz71_powercable, IRQF_SAMPLE_RANDOM,
292 "palmz71-cable", 0)) 292 "palmz71-cable", NULL))
293 printk(KERN_ERR 293 printk(KERN_ERR
294 "IRQ request for power cable failed!\n"); 294 "IRQ request for power cable failed!\n");
295 palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), 0); 295 palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), NULL);
296 } 296 }
297} 297}
298 298
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index 76d4ee05a814..a2c88890e767 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -143,20 +143,6 @@ static struct platform_device nor_device = {
143 .resource = &nor_resource, 143 .resource = &nor_resource,
144}; 144};
145 145
146static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
147{
148 struct nand_chip *this = mtd->priv;
149 unsigned long mask;
150
151 if (cmd == NAND_CMD_NONE)
152 return;
153
154 mask = (ctrl & NAND_CLE) ? 0x02 : 0;
155 if (ctrl & NAND_ALE)
156 mask |= 0x04;
157 writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
158}
159
160#define P2_NAND_RB_GPIO_PIN 62 146#define P2_NAND_RB_GPIO_PIN 62
161 147
162static int nand_dev_ready(struct mtd_info *mtd) 148static int nand_dev_ready(struct mtd_info *mtd)
@@ -174,7 +160,7 @@ static struct platform_nand_data nand_data = {
174 .part_probe_types = part_probes, 160 .part_probe_types = part_probes,
175 }, 161 },
176 .ctrl = { 162 .ctrl = {
177 .cmd_ctrl = nand_cmd_ctl, 163 .cmd_ctrl = omap1_nand_cmd_ctl,
178 .dev_ready = nand_dev_ready, 164 .dev_ready = nand_dev_ready,
179 }, 165 },
180}; 166};
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index 67382ddd8c83..a9ee06b6cb42 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -194,9 +194,8 @@ int omap1_select_table_rate(struct clk *clk, unsigned long rate)
194{ 194{
195 /* Find the highest supported frequency <= rate and switch to it */ 195 /* Find the highest supported frequency <= rate and switch to it */
196 struct mpu_rate * ptr; 196 struct mpu_rate * ptr;
197 unsigned long dpll1_rate, ref_rate; 197 unsigned long ref_rate;
198 198
199 dpll1_rate = ck_dpll1_p->rate;
200 ref_rate = ck_ref_p->rate; 199 ref_rate = ck_ref_p->rate;
201 200
202 for (ptr = omap1_rate_table; ptr->rate; ptr++) { 201 for (ptr = omap1_rate_table; ptr->rate; ptr++) {
diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h
index af658ad338ec..bb7779b57795 100644
--- a/arch/arm/mach-omap1/common.h
+++ b/arch/arm/mach-omap1/common.h
@@ -27,6 +27,7 @@
27#define __ARCH_ARM_MACH_OMAP1_COMMON_H 27#define __ARCH_ARM_MACH_OMAP1_COMMON_H
28 28
29#include <plat/common.h> 29#include <plat/common.h>
30#include <linux/mtd/mtd.h>
30 31
31#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) 32#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
32void omap7xx_map_io(void); 33void omap7xx_map_io(void);
@@ -56,8 +57,20 @@ void omap1_init_early(void);
56void omap1_init_irq(void); 57void omap1_init_irq(void);
57void omap1_restart(char, const char *); 58void omap1_restart(char, const char *);
58 59
60extern void __init omap_check_revision(void);
61
62extern void omap1_nand_cmd_ctl(struct mtd_info *mtd, int cmd,
63 unsigned int ctrl);
64
59extern struct sys_timer omap1_timer; 65extern struct sys_timer omap1_timer;
60extern bool omap_32k_timer_init(void); 66extern bool omap_32k_timer_init(void);
61extern void __init omap_init_consistent_dma_size(void); 67
68extern u32 omap_irq_flags;
69
70#ifdef CONFIG_ARCH_OMAP16XX
71extern int ocpi_enable(void);
72#else
73static inline int ocpi_enable(void) { return 0; }
74#endif
62 75
63#endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */ 76#endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c
index 76c67b3f9f61..29ec50fc688d 100644
--- a/arch/arm/mach-omap1/fpga.c
+++ b/arch/arm/mach-omap1/fpga.c
@@ -87,7 +87,7 @@ static void fpga_mask_ack_irq(struct irq_data *d)
87 fpga_ack_irq(d); 87 fpga_ack_irq(d);
88} 88}
89 89
90void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc) 90static void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc)
91{ 91{
92 u32 stat; 92 u32 stat;
93 int fpga_irq; 93 int fpga_irq;
diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
index 2b28e1da14b0..a1b846aacdaf 100644
--- a/arch/arm/mach-omap1/id.c
+++ b/arch/arm/mach-omap1/id.c
@@ -21,6 +21,8 @@
21 21
22#include <mach/hardware.h> 22#include <mach/hardware.h>
23 23
24#include "common.h"
25
24#define OMAP_DIE_ID_0 0xfffe1800 26#define OMAP_DIE_ID_0 0xfffe1800
25#define OMAP_DIE_ID_1 0xfffe1804 27#define OMAP_DIE_ID_1 0xfffe1804
26#define OMAP_PRODUCTION_ID_0 0xfffe2000 28#define OMAP_PRODUCTION_ID_0 0xfffe2000
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index d969a7203d14..71ce017bf5d8 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -18,13 +18,12 @@
18 18
19#include <plat/mux.h> 19#include <plat/mux.h>
20#include <plat/tc.h> 20#include <plat/tc.h>
21#include <plat/dma.h>
21 22
22#include "iomap.h" 23#include "iomap.h"
23#include "common.h" 24#include "common.h"
24#include "clock.h" 25#include "clock.h"
25 26
26extern void omap_check_revision(void);
27
28/* 27/*
29 * The machine specific code may provide the extra mapping besides the 28 * The machine specific code may provide the extra mapping besides the
30 * default mapping provided here. 29 * default mapping provided here.
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c
index 4448114fab72..6995fb6a3345 100644
--- a/arch/arm/mach-omap1/irq.c
+++ b/arch/arm/mach-omap1/irq.c
@@ -49,6 +49,8 @@
49 49
50#include <mach/hardware.h> 50#include <mach/hardware.h>
51 51
52#include "common.h"
53
52#define IRQ_BANK(irq) ((irq) >> 5) 54#define IRQ_BANK(irq) ((irq) >> 5)
53#define IRQ_BIT(irq) ((irq) & 0x1f) 55#define IRQ_BIT(irq) ((irq) & 0x1f)
54 56
diff --git a/arch/arm/mach-omap1/lcd_dma.c b/arch/arm/mach-omap1/lcd_dma.c
index 86ace9aaa663..5769c71815b2 100644
--- a/arch/arm/mach-omap1/lcd_dma.c
+++ b/arch/arm/mach-omap1/lcd_dma.c
@@ -57,7 +57,7 @@ static struct lcd_dma_info {
57 void *cb_data; 57 void *cb_data;
58 58
59 int active; 59 int active;
60 unsigned long addr, size; 60 unsigned long addr;
61 int rotate, data_type, xres, yres; 61 int rotate, data_type, xres, yres;
62 int vxres; 62 int vxres;
63 int mirror; 63 int mirror;
@@ -77,11 +77,6 @@ void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres,
77} 77}
78EXPORT_SYMBOL(omap_set_lcd_dma_b1); 78EXPORT_SYMBOL(omap_set_lcd_dma_b1);
79 79
80void omap_set_lcd_dma_src_port(int port)
81{
82 lcd_dma.src_port = port;
83}
84
85void omap_set_lcd_dma_ext_controller(int external) 80void omap_set_lcd_dma_ext_controller(int external)
86{ 81{
87 lcd_dma.ext_ctrl = external; 82 lcd_dma.ext_ctrl = external;
diff --git a/arch/arm/plat-omap/ocpi.c b/arch/arm/mach-omap1/ocpi.c
index ebe0c73c8901..238170cab5b7 100644
--- a/arch/arm/plat-omap/ocpi.c
+++ b/arch/arm/mach-omap1/ocpi.c
@@ -4,6 +4,7 @@
4 * Minimal OCP bus support for omap16xx 4 * Minimal OCP bus support for omap16xx
5 * 5 *
6 * Copyright (C) 2003 - 2005 Nokia Corporation 6 * Copyright (C) 2003 - 2005 Nokia Corporation
7 * Copyright (C) 2012 Texas Instruments, Inc.
7 * Written by Tony Lindgren <tony@atomide.com> 8 * Written by Tony Lindgren <tony@atomide.com>
8 * 9 *
9 * Modified for clock framework by Paul Mundt <paul.mundt@nokia.com>. 10 * Modified for clock framework by Paul Mundt <paul.mundt@nokia.com>.
@@ -35,6 +36,8 @@
35 36
36#include <mach/hardware.h> 37#include <mach/hardware.h>
37 38
39#include "common.h"
40
38#define OCPI_BASE 0xfffec320 41#define OCPI_BASE 0xfffec320
39#define OCPI_FAULT (OCPI_BASE + 0x00) 42#define OCPI_FAULT (OCPI_BASE + 0x00)
40#define OCPI_CMD_FAULT (OCPI_BASE + 0x04) 43#define OCPI_CMD_FAULT (OCPI_BASE + 0x04)
@@ -64,7 +67,7 @@ int ocpi_enable(void)
64 /* Enable access for OHCI in OCPI */ 67 /* Enable access for OHCI in OCPI */
65 val = omap_readl(OCPI_PROT); 68 val = omap_readl(OCPI_PROT);
66 val &= ~0xff; 69 val &= ~0xff;
67 //val &= (1 << 0); /* Allow access only to EMIFS */ 70 /* val &= (1 << 0); Allow access only to EMIFS */
68 omap_writel(val, OCPI_PROT); 71 omap_writel(val, OCPI_PROT);
69 72
70 val = omap_readl(OCPI_SEC); 73 val = omap_readl(OCPI_SEC);
@@ -86,7 +89,7 @@ static int __init omap_ocpi_init(void)
86 89
87 clk_enable(ocpi_ck); 90 clk_enable(ocpi_ck);
88 ocpi_enable(); 91 ocpi_enable();
89 printk("OMAP OCPI interconnect driver loaded\n"); 92 pr_info("OMAP OCPI interconnect driver loaded\n");
90 93
91 return 0; 94 return 0;
92} 95}
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index f66c32912b22..b2560d32b3a0 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -569,11 +569,10 @@ static int omap_pm_read_proc(
569 569
570static void omap_pm_init_proc(void) 570static void omap_pm_init_proc(void)
571{ 571{
572 struct proc_dir_entry *entry; 572 /* XXX Appears to leak memory */
573 573 create_proc_read_entry("driver/omap_pm",
574 entry = create_proc_read_entry("driver/omap_pm", 574 S_IWUSR | S_IRUGO, NULL,
575 S_IWUSR | S_IRUGO, NULL, 575 omap_pm_read_proc, NULL);
576 omap_pm_read_proc, NULL);
577} 576}
578 577
579#endif /* DEBUG && CONFIG_PROC_FS */ 578#endif /* DEBUG && CONFIG_PROC_FS */
diff --git a/arch/arm/mach-omap1/reset.c b/arch/arm/mach-omap1/reset.c
index f255b153b863..b17709103866 100644
--- a/arch/arm/mach-omap1/reset.c
+++ b/arch/arm/mach-omap1/reset.c
@@ -8,6 +8,8 @@
8 8
9#include <mach/hardware.h> 9#include <mach/hardware.h>
10 10
11#include "common.h"
12
11void omap1_restart(char mode, const char *cmd) 13void omap1_restart(char mode, const char *cmd)
12{ 14{
13 /* 15 /*
diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c
index fb202af01d0d..64c65bcb2d67 100644
--- a/arch/arm/mach-omap1/timer.c
+++ b/arch/arm/mach-omap1/timer.c
@@ -54,8 +54,7 @@ static int omap1_dm_timer_set_src(struct platform_device *pdev,
54 return 0; 54 return 0;
55} 55}
56 56
57 57static int __init omap1_dm_timer_init(void)
58int __init omap1_dm_timer_init(void)
59{ 58{
60 int i; 59 int i;
61 int ret; 60 int ret;
diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c
index 19de03b074e3..e61afd922766 100644
--- a/arch/arm/mach-omap1/usb.c
+++ b/arch/arm/mach-omap1/usb.c
@@ -29,6 +29,8 @@
29#include <plat/mux.h> 29#include <plat/mux.h>
30#include <plat/usb.h> 30#include <plat/usb.h>
31 31
32#include "common.h"
33
32/* These routines should handle the standard chip-specific modes 34/* These routines should handle the standard chip-specific modes
33 * for usb0/1/2 ports, covering basic mux and transceiver setup. 35 * for usb0/1/2 ports, covering basic mux and transceiver setup.
34 * 36 *
@@ -138,6 +140,7 @@ static inline void ohci_device_init(struct omap_usb_config *pdata)
138 if (cpu_is_omap7xx()) 140 if (cpu_is_omap7xx())
139 ohci_resources[1].start = INT_7XX_USB_HHC_1; 141 ohci_resources[1].start = INT_7XX_USB_HHC_1;
140 pdata->ohci_device = &ohci_device; 142 pdata->ohci_device = &ohci_device;
143 pdata->ocpi_enable = &ocpi_enable;
141} 144}
142 145
143#else 146#else
diff --git a/arch/arm/mach-omap2/am35xx-emac.c b/arch/arm/mach-omap2/am35xx-emac.c
index 1f97e7475206..447682c4e11c 100644
--- a/arch/arm/mach-omap2/am35xx-emac.c
+++ b/arch/arm/mach-omap2/am35xx-emac.c
@@ -39,26 +39,23 @@ static struct platform_device am35xx_emac_mdio_device = {
39 39
40static void am35xx_enable_emac_int(void) 40static void am35xx_enable_emac_int(void)
41{ 41{
42 u32 regval; 42 u32 v;
43 43
44 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); 44 v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
45 regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR | 45 v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR |
46 AM35XX_CPGMAC_C0_TX_PULSE_CLR | 46 AM35XX_CPGMAC_C0_MISC_PULSE_CLR | AM35XX_CPGMAC_C0_RX_THRESH_CLR);
47 AM35XX_CPGMAC_C0_MISC_PULSE_CLR | 47 omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR);
48 AM35XX_CPGMAC_C0_RX_THRESH_CLR); 48 omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); /* OCP barrier */
49 omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
50 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
51} 49}
52 50
53static void am35xx_disable_emac_int(void) 51static void am35xx_disable_emac_int(void)
54{ 52{
55 u32 regval; 53 u32 v;
56 54
57 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); 55 v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
58 regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR | 56 v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR);
59 AM35XX_CPGMAC_C0_TX_PULSE_CLR); 57 omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR);
60 omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR); 58 omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); /* OCP barrier */
61 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
62} 59}
63 60
64static struct emac_platform_data am35xx_emac_pdata = { 61static struct emac_platform_data am35xx_emac_pdata = {
@@ -92,7 +89,7 @@ static struct platform_device am35xx_emac_device = {
92 89
93void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en) 90void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en)
94{ 91{
95 unsigned int regval; 92 u32 v;
96 int err; 93 int err;
97 94
98 am35xx_emac_pdata.rmii_en = rmii_en; 95 am35xx_emac_pdata.rmii_en = rmii_en;
@@ -110,8 +107,8 @@ void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en)
110 return; 107 return;
111 } 108 }
112 109
113 regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); 110 v = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
114 regval = regval & (~(AM35XX_CPGMACSS_SW_RST)); 111 v &= ~AM35XX_CPGMACSS_SW_RST;
115 omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET); 112 omap_ctrl_writel(v, AM35XX_CONTROL_IP_SW_RESET);
116 regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); 113 omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); /* OCP barrier */
117} 114}
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index da75f239873e..37abb0d49b51 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -37,7 +37,7 @@
37#include <plat/dma.h> 37#include <plat/dma.h>
38#include <plat/gpmc.h> 38#include <plat/gpmc.h>
39#include <video/omapdss.h> 39#include <video/omapdss.h>
40#include <video/omap-panel-dvi.h> 40#include <video/omap-panel-tfp410.h>
41 41
42#include <plat/gpmc-smc91x.h> 42#include <plat/gpmc-smc91x.h>
43 43
@@ -113,9 +113,6 @@ static struct gpio sdp3430_dss_gpios[] __initdata = {
113 {SDP3430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD Backlight"}, 113 {SDP3430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD Backlight"},
114}; 114};
115 115
116static int lcd_enabled;
117static int dvi_enabled;
118
119static void __init sdp3430_display_init(void) 116static void __init sdp3430_display_init(void)
120{ 117{
121 int r; 118 int r;
@@ -129,44 +126,18 @@ static void __init sdp3430_display_init(void)
129 126
130static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev) 127static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev)
131{ 128{
132 if (dvi_enabled) {
133 printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
134 return -EINVAL;
135 }
136
137 gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 1); 129 gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 1);
138 gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 1); 130 gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 1);
139 131
140 lcd_enabled = 1;
141
142 return 0; 132 return 0;
143} 133}
144 134
145static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev) 135static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev)
146{ 136{
147 lcd_enabled = 0;
148
149 gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 0); 137 gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 0);
150 gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 0); 138 gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 0);
151} 139}
152 140
153static int sdp3430_panel_enable_dvi(struct omap_dss_device *dssdev)
154{
155 if (lcd_enabled) {
156 printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
157 return -EINVAL;
158 }
159
160 dvi_enabled = 1;
161
162 return 0;
163}
164
165static void sdp3430_panel_disable_dvi(struct omap_dss_device *dssdev)
166{
167 dvi_enabled = 0;
168}
169
170static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev) 141static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev)
171{ 142{
172 return 0; 143 return 0;
@@ -186,15 +157,14 @@ static struct omap_dss_device sdp3430_lcd_device = {
186 .platform_disable = sdp3430_panel_disable_lcd, 157 .platform_disable = sdp3430_panel_disable_lcd,
187}; 158};
188 159
189static struct panel_dvi_platform_data dvi_panel = { 160static struct tfp410_platform_data dvi_panel = {
190 .platform_enable = sdp3430_panel_enable_dvi, 161 .power_down_gpio = -1,
191 .platform_disable = sdp3430_panel_disable_dvi,
192}; 162};
193 163
194static struct omap_dss_device sdp3430_dvi_device = { 164static struct omap_dss_device sdp3430_dvi_device = {
195 .name = "dvi", 165 .name = "dvi",
196 .type = OMAP_DISPLAY_TYPE_DPI, 166 .type = OMAP_DISPLAY_TYPE_DPI,
197 .driver_name = "dvi", 167 .driver_name = "tfp410",
198 .data = &dvi_panel, 168 .data = &dvi_panel,
199 .phy.dpi.data_lines = 24, 169 .phy.dpi.data_lines = 24,
200}; 170};
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 130ab00c09a2..b4ad706c145a 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -666,6 +666,10 @@ static struct nokia_dsi_panel_data dsi1_panel = {
666 .use_ext_te = false, 666 .use_ext_te = false,
667 .ext_te_gpio = 101, 667 .ext_te_gpio = 101,
668 .esd_interval = 0, 668 .esd_interval = 0,
669 .pin_config = {
670 .num_pins = 6,
671 .pins = { 0, 1, 2, 3, 4, 5 },
672 },
669}; 673};
670 674
671static struct omap_dss_device sdp4430_lcd_device = { 675static struct omap_dss_device sdp4430_lcd_device = {
@@ -674,13 +678,6 @@ static struct omap_dss_device sdp4430_lcd_device = {
674 .type = OMAP_DISPLAY_TYPE_DSI, 678 .type = OMAP_DISPLAY_TYPE_DSI,
675 .data = &dsi1_panel, 679 .data = &dsi1_panel,
676 .phy.dsi = { 680 .phy.dsi = {
677 .clk_lane = 1,
678 .clk_pol = 0,
679 .data1_lane = 2,
680 .data1_pol = 0,
681 .data2_lane = 3,
682 .data2_pol = 0,
683
684 .module = 0, 681 .module = 0,
685 }, 682 },
686 683
@@ -715,6 +712,10 @@ static struct nokia_dsi_panel_data dsi2_panel = {
715 .use_ext_te = false, 712 .use_ext_te = false,
716 .ext_te_gpio = 103, 713 .ext_te_gpio = 103,
717 .esd_interval = 0, 714 .esd_interval = 0,
715 .pin_config = {
716 .num_pins = 6,
717 .pins = { 0, 1, 2, 3, 4, 5 },
718 },
718}; 719};
719 720
720static struct omap_dss_device sdp4430_lcd2_device = { 721static struct omap_dss_device sdp4430_lcd2_device = {
@@ -723,12 +724,6 @@ static struct omap_dss_device sdp4430_lcd2_device = {
723 .type = OMAP_DISPLAY_TYPE_DSI, 724 .type = OMAP_DISPLAY_TYPE_DSI,
724 .data = &dsi2_panel, 725 .data = &dsi2_panel,
725 .phy.dsi = { 726 .phy.dsi = {
726 .clk_lane = 1,
727 .clk_pol = 0,
728 .data1_lane = 2,
729 .data1_pol = 0,
730 .data2_lane = 3,
731 .data2_pol = 0,
732 727
733 .module = 1, 728 .module = 1,
734 }, 729 },
@@ -758,21 +753,6 @@ static struct omap_dss_device sdp4430_lcd2_device = {
758 .channel = OMAP_DSS_CHANNEL_LCD2, 753 .channel = OMAP_DSS_CHANNEL_LCD2,
759}; 754};
760 755
761static void sdp4430_lcd_init(void)
762{
763 int r;
764
765 r = gpio_request_one(dsi1_panel.reset_gpio, GPIOF_DIR_OUT,
766 "lcd1_reset_gpio");
767 if (r)
768 pr_err("%s: Could not get lcd1_reset_gpio\n", __func__);
769
770 r = gpio_request_one(dsi2_panel.reset_gpio, GPIOF_DIR_OUT,
771 "lcd2_reset_gpio");
772 if (r)
773 pr_err("%s: Could not get lcd2_reset_gpio\n", __func__);
774}
775
776static struct omap_dss_hdmi_data sdp4430_hdmi_data = { 756static struct omap_dss_hdmi_data sdp4430_hdmi_data = {
777 .hpd_gpio = HDMI_GPIO_HPD, 757 .hpd_gpio = HDMI_GPIO_HPD,
778}; 758};
@@ -858,7 +838,6 @@ static void __init omap_4430sdp_display_init(void)
858 if (r) 838 if (r)
859 pr_err("%s: Could not get display_sel GPIO\n", __func__); 839 pr_err("%s: Could not get display_sel GPIO\n", __func__);
860 840
861 sdp4430_lcd_init();
862 sdp4430_picodlp_init(); 841 sdp4430_picodlp_init();
863 omap_display_init(&sdp4430_dss_data); 842 omap_display_init(&sdp4430_dss_data);
864 /* 843 /*
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 3645285a3e2b..99790eb646e8 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -37,7 +37,7 @@
37#include <plat/usb.h> 37#include <plat/usb.h>
38#include <video/omapdss.h> 38#include <video/omapdss.h>
39#include <video/omap-panel-generic-dpi.h> 39#include <video/omap-panel-generic-dpi.h>
40#include <video/omap-panel-dvi.h> 40#include <video/omap-panel-tfp410.h>
41 41
42#include "am35xx-emac.h" 42#include "am35xx-emac.h"
43#include "mux.h" 43#include "mux.h"
@@ -207,31 +207,14 @@ static struct omap_dss_device am3517_evm_tv_device = {
207 .platform_disable = am3517_evm_panel_disable_tv, 207 .platform_disable = am3517_evm_panel_disable_tv,
208}; 208};
209 209
210static int am3517_evm_panel_enable_dvi(struct omap_dss_device *dssdev) 210static struct tfp410_platform_data dvi_panel = {
211{ 211 .power_down_gpio = -1,
212 if (lcd_enabled) {
213 printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
214 return -EINVAL;
215 }
216 dvi_enabled = 1;
217
218 return 0;
219}
220
221static void am3517_evm_panel_disable_dvi(struct omap_dss_device *dssdev)
222{
223 dvi_enabled = 0;
224}
225
226static struct panel_dvi_platform_data dvi_panel = {
227 .platform_enable = am3517_evm_panel_enable_dvi,
228 .platform_disable = am3517_evm_panel_disable_dvi,
229}; 212};
230 213
231static struct omap_dss_device am3517_evm_dvi_device = { 214static struct omap_dss_device am3517_evm_dvi_device = {
232 .type = OMAP_DISPLAY_TYPE_DPI, 215 .type = OMAP_DISPLAY_TYPE_DPI,
233 .name = "dvi", 216 .name = "dvi",
234 .driver_name = "dvi", 217 .driver_name = "tfp410",
235 .data = &dvi_panel, 218 .data = &dvi_panel,
236 .phy.dpi.data_lines = 24, 219 .phy.dpi.data_lines = 24,
237}; 220};
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 909a8b91b564..45746cb56c68 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -44,7 +44,7 @@
44#include <plat/usb.h> 44#include <plat/usb.h>
45#include <video/omapdss.h> 45#include <video/omapdss.h>
46#include <video/omap-panel-generic-dpi.h> 46#include <video/omap-panel-generic-dpi.h>
47#include <video/omap-panel-dvi.h> 47#include <video/omap-panel-tfp410.h>
48#include <plat/mcspi.h> 48#include <plat/mcspi.h>
49 49
50#include <mach/hardware.h> 50#include <mach/hardware.h>
@@ -218,25 +218,6 @@ static void cm_t35_panel_disable_lcd(struct omap_dss_device *dssdev)
218 gpio_set_value(CM_T35_LCD_EN_GPIO, 0); 218 gpio_set_value(CM_T35_LCD_EN_GPIO, 0);
219} 219}
220 220
221static int cm_t35_panel_enable_dvi(struct omap_dss_device *dssdev)
222{
223 if (lcd_enabled) {
224 printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
225 return -EINVAL;
226 }
227
228 gpio_set_value(CM_T35_DVI_EN_GPIO, 0);
229 dvi_enabled = 1;
230
231 return 0;
232}
233
234static void cm_t35_panel_disable_dvi(struct omap_dss_device *dssdev)
235{
236 gpio_set_value(CM_T35_DVI_EN_GPIO, 1);
237 dvi_enabled = 0;
238}
239
240static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev) 221static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev)
241{ 222{
242 return 0; 223 return 0;
@@ -260,15 +241,14 @@ static struct omap_dss_device cm_t35_lcd_device = {
260 .phy.dpi.data_lines = 18, 241 .phy.dpi.data_lines = 18,
261}; 242};
262 243
263static struct panel_dvi_platform_data dvi_panel = { 244static struct tfp410_platform_data dvi_panel = {
264 .platform_enable = cm_t35_panel_enable_dvi, 245 .power_down_gpio = CM_T35_DVI_EN_GPIO,
265 .platform_disable = cm_t35_panel_disable_dvi,
266}; 246};
267 247
268static struct omap_dss_device cm_t35_dvi_device = { 248static struct omap_dss_device cm_t35_dvi_device = {
269 .name = "dvi", 249 .name = "dvi",
270 .type = OMAP_DISPLAY_TYPE_DPI, 250 .type = OMAP_DISPLAY_TYPE_DPI,
271 .driver_name = "dvi", 251 .driver_name = "tfp410",
272 .data = &dvi_panel, 252 .data = &dvi_panel,
273 .phy.dpi.data_lines = 24, 253 .phy.dpi.data_lines = 24,
274}; 254};
@@ -316,7 +296,6 @@ static struct spi_board_info cm_t35_lcd_spi_board_info[] __initdata = {
316static struct gpio cm_t35_dss_gpios[] __initdata = { 296static struct gpio cm_t35_dss_gpios[] __initdata = {
317 { CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable" }, 297 { CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable" },
318 { CM_T35_LCD_BL_GPIO, GPIOF_OUT_INIT_LOW, "lcd bl enable" }, 298 { CM_T35_LCD_BL_GPIO, GPIOF_OUT_INIT_LOW, "lcd bl enable" },
319 { CM_T35_DVI_EN_GPIO, GPIOF_OUT_INIT_HIGH, "dvi enable" },
320}; 299};
321 300
322static void __init cm_t35_init_display(void) 301static void __init cm_t35_init_display(void)
@@ -335,7 +314,6 @@ static void __init cm_t35_init_display(void)
335 314
336 gpio_export(CM_T35_LCD_EN_GPIO, 0); 315 gpio_export(CM_T35_LCD_EN_GPIO, 0);
337 gpio_export(CM_T35_LCD_BL_GPIO, 0); 316 gpio_export(CM_T35_LCD_BL_GPIO, 0);
338 gpio_export(CM_T35_DVI_EN_GPIO, 0);
339 317
340 msleep(50); 318 msleep(50);
341 gpio_set_value(CM_T35_LCD_EN_GPIO, 1); 319 gpio_set_value(CM_T35_LCD_EN_GPIO, 1);
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index a2010f07de31..b063f0d2faa6 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -47,7 +47,7 @@
47#include <plat/usb.h> 47#include <plat/usb.h>
48#include <video/omapdss.h> 48#include <video/omapdss.h>
49#include <video/omap-panel-generic-dpi.h> 49#include <video/omap-panel-generic-dpi.h>
50#include <video/omap-panel-dvi.h> 50#include <video/omap-panel-tfp410.h>
51 51
52#include <plat/mcspi.h> 52#include <plat/mcspi.h>
53#include <linux/input/matrix_keypad.h> 53#include <linux/input/matrix_keypad.h>
@@ -118,19 +118,6 @@ static void devkit8000_panel_disable_lcd(struct omap_dss_device *dssdev)
118 gpio_set_value_cansleep(dssdev->reset_gpio, 0); 118 gpio_set_value_cansleep(dssdev->reset_gpio, 0);
119} 119}
120 120
121static int devkit8000_panel_enable_dvi(struct omap_dss_device *dssdev)
122{
123 if (gpio_is_valid(dssdev->reset_gpio))
124 gpio_set_value_cansleep(dssdev->reset_gpio, 1);
125 return 0;
126}
127
128static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev)
129{
130 if (gpio_is_valid(dssdev->reset_gpio))
131 gpio_set_value_cansleep(dssdev->reset_gpio, 0);
132}
133
134static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = { 121static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = {
135 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), 122 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
136}; 123};
@@ -154,15 +141,14 @@ static struct omap_dss_device devkit8000_lcd_device = {
154 .phy.dpi.data_lines = 24, 141 .phy.dpi.data_lines = 24,
155}; 142};
156 143
157static struct panel_dvi_platform_data dvi_panel = { 144static struct tfp410_platform_data dvi_panel = {
158 .platform_enable = devkit8000_panel_enable_dvi, 145 .power_down_gpio = -1,
159 .platform_disable = devkit8000_panel_disable_dvi,
160}; 146};
161 147
162static struct omap_dss_device devkit8000_dvi_device = { 148static struct omap_dss_device devkit8000_dvi_device = {
163 .name = "dvi", 149 .name = "dvi",
164 .type = OMAP_DISPLAY_TYPE_DPI, 150 .type = OMAP_DISPLAY_TYPE_DPI,
165 .driver_name = "dvi", 151 .driver_name = "tfp410",
166 .data = &dvi_panel, 152 .data = &dvi_panel,
167 .phy.dpi.data_lines = 24, 153 .phy.dpi.data_lines = 24,
168}; 154};
@@ -244,13 +230,7 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
244 } 230 }
245 231
246 /* gpio + 7 is "DVI_PD" (out, active low) */ 232 /* gpio + 7 is "DVI_PD" (out, active low) */
247 devkit8000_dvi_device.reset_gpio = gpio + 7; 233 dvi_panel.power_down_gpio = gpio + 7;
248 ret = gpio_request_one(devkit8000_dvi_device.reset_gpio,
249 GPIOF_OUT_INIT_LOW, "DVI PowerDown");
250 if (ret < 0) {
251 devkit8000_dvi_device.reset_gpio = -EINVAL;
252 printk(KERN_ERR "Failed to request GPIO for DVI PowerDown\n");
253 }
254 234
255 return 0; 235 return 0;
256} 236}
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 740cee9369ba..accbbb173198 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -32,7 +32,7 @@
32#include <plat/gpmc.h> 32#include <plat/gpmc.h>
33#include <plat/usb.h> 33#include <plat/usb.h>
34#include <video/omapdss.h> 34#include <video/omapdss.h>
35#include <video/omap-panel-dvi.h> 35#include <video/omap-panel-tfp410.h>
36#include <plat/onenand.h> 36#include <plat/onenand.h>
37 37
38#include "mux.h" 38#include "mux.h"
@@ -444,28 +444,15 @@ static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = {
444 .setup = igep_twl_gpio_setup, 444 .setup = igep_twl_gpio_setup,
445}; 445};
446 446
447static int igep2_enable_dvi(struct omap_dss_device *dssdev) 447static struct tfp410_platform_data dvi_panel = {
448{ 448 .i2c_bus_num = 3,
449 gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1); 449 .power_down_gpio = IGEP2_GPIO_DVI_PUP,
450
451 return 0;
452}
453
454static void igep2_disable_dvi(struct omap_dss_device *dssdev)
455{
456 gpio_direction_output(IGEP2_GPIO_DVI_PUP, 0);
457}
458
459static struct panel_dvi_platform_data dvi_panel = {
460 .platform_enable = igep2_enable_dvi,
461 .platform_disable = igep2_disable_dvi,
462 .i2c_bus_num = 3,
463}; 450};
464 451
465static struct omap_dss_device igep2_dvi_device = { 452static struct omap_dss_device igep2_dvi_device = {
466 .type = OMAP_DISPLAY_TYPE_DPI, 453 .type = OMAP_DISPLAY_TYPE_DPI,
467 .name = "dvi", 454 .name = "dvi",
468 .driver_name = "dvi", 455 .driver_name = "tfp410",
469 .data = &dvi_panel, 456 .data = &dvi_panel,
470 .phy.dpi.data_lines = 24, 457 .phy.dpi.data_lines = 24,
471}; 458};
@@ -480,14 +467,6 @@ static struct omap_dss_board_info igep2_dss_data = {
480 .default_device = &igep2_dvi_device, 467 .default_device = &igep2_dvi_device,
481}; 468};
482 469
483static void __init igep2_display_init(void)
484{
485 int err = gpio_request_one(IGEP2_GPIO_DVI_PUP, GPIOF_OUT_INIT_HIGH,
486 "GPIO_DVI_PUP");
487 if (err)
488 pr_err("IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n");
489}
490
491static struct platform_device *igep_devices[] __initdata = { 470static struct platform_device *igep_devices[] __initdata = {
492 &igep_vwlan_device, 471 &igep_vwlan_device,
493}; 472};
@@ -668,7 +647,6 @@ static void __init igep_init(void)
668 647
669 if (machine_is_igep0020()) { 648 if (machine_is_igep0020()) {
670 omap_display_init(&igep2_dss_data); 649 omap_display_init(&igep2_dss_data);
671 igep2_display_init();
672 igep2_init_smsc911x(); 650 igep2_init_smsc911x();
673 usbhs_init(&igep2_usbhs_bdata); 651 usbhs_init(&igep2_usbhs_bdata);
674 } else { 652 } else {
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 7be8d659d91d..8ede8d20d7b2 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -42,7 +42,7 @@
42#include <plat/board.h> 42#include <plat/board.h>
43#include "common.h" 43#include "common.h"
44#include <video/omapdss.h> 44#include <video/omapdss.h>
45#include <video/omap-panel-dvi.h> 45#include <video/omap-panel-tfp410.h>
46#include <plat/gpmc.h> 46#include <plat/gpmc.h>
47#include <plat/nand.h> 47#include <plat/nand.h>
48#include <plat/usb.h> 48#include <plat/usb.h>
@@ -189,33 +189,17 @@ static struct mtd_partition omap3beagle_nand_partitions[] = {
189 189
190/* DSS */ 190/* DSS */
191 191
192static int beagle_enable_dvi(struct omap_dss_device *dssdev) 192static struct tfp410_platform_data dvi_panel = {
193{
194 if (gpio_is_valid(dssdev->reset_gpio))
195 gpio_set_value(dssdev->reset_gpio, 1);
196
197 return 0;
198}
199
200static void beagle_disable_dvi(struct omap_dss_device *dssdev)
201{
202 if (gpio_is_valid(dssdev->reset_gpio))
203 gpio_set_value(dssdev->reset_gpio, 0);
204}
205
206static struct panel_dvi_platform_data dvi_panel = {
207 .platform_enable = beagle_enable_dvi,
208 .platform_disable = beagle_disable_dvi,
209 .i2c_bus_num = 3, 193 .i2c_bus_num = 3,
194 .power_down_gpio = -1,
210}; 195};
211 196
212static struct omap_dss_device beagle_dvi_device = { 197static struct omap_dss_device beagle_dvi_device = {
213 .type = OMAP_DISPLAY_TYPE_DPI, 198 .type = OMAP_DISPLAY_TYPE_DPI,
214 .name = "dvi", 199 .name = "dvi",
215 .driver_name = "dvi", 200 .driver_name = "tfp410",
216 .data = &dvi_panel, 201 .data = &dvi_panel,
217 .phy.dpi.data_lines = 24, 202 .phy.dpi.data_lines = 24,
218 .reset_gpio = -EINVAL,
219}; 203};
220 204
221static struct omap_dss_device beagle_tv_device = { 205static struct omap_dss_device beagle_tv_device = {
@@ -236,16 +220,6 @@ static struct omap_dss_board_info beagle_dss_data = {
236 .default_device = &beagle_dvi_device, 220 .default_device = &beagle_dvi_device,
237}; 221};
238 222
239static void __init beagle_display_init(void)
240{
241 int r;
242
243 r = gpio_request_one(beagle_dvi_device.reset_gpio, GPIOF_OUT_INIT_LOW,
244 "DVI reset");
245 if (r < 0)
246 printk(KERN_ERR "Unable to get DVI reset GPIO\n");
247}
248
249#include "sdram-micron-mt46h32m32lf-6.h" 223#include "sdram-micron-mt46h32m32lf-6.h"
250 224
251static struct omap2_hsmmc_info mmc[] = { 225static struct omap2_hsmmc_info mmc[] = {
@@ -309,7 +283,7 @@ static int beagle_twl_gpio_setup(struct device *dev,
309 if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC")) 283 if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC"))
310 pr_err("%s: unable to configure EHCI_nOC\n", __func__); 284 pr_err("%s: unable to configure EHCI_nOC\n", __func__);
311 } 285 }
312 beagle_dvi_device.reset_gpio = beagle_config.reset_gpio; 286 dvi_panel.power_down_gpio = beagle_config.reset_gpio;
313 287
314 gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level, 288 gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,
315 "nEN_USB_PWR"); 289 "nEN_USB_PWR");
@@ -552,7 +526,6 @@ static void __init omap3_beagle_init(void)
552 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); 526 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
553 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); 527 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
554 528
555 beagle_display_init();
556 beagle_opp_init(); 529 beagle_opp_init();
557} 530}
558 531
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 49df12735b41..ace3c675e9c2 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -46,7 +46,7 @@
46#include "common.h" 46#include "common.h"
47#include <plat/mcspi.h> 47#include <plat/mcspi.h>
48#include <video/omapdss.h> 48#include <video/omapdss.h>
49#include <video/omap-panel-dvi.h> 49#include <video/omap-panel-tfp410.h>
50 50
51#include "mux.h" 51#include "mux.h"
52#include "sdram-micron-mt46h32m32lf-6.h" 52#include "sdram-micron-mt46h32m32lf-6.h"
@@ -219,35 +219,14 @@ static struct omap_dss_device omap3_evm_tv_device = {
219 .platform_disable = omap3_evm_disable_tv, 219 .platform_disable = omap3_evm_disable_tv,
220}; 220};
221 221
222static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev) 222static struct tfp410_platform_data dvi_panel = {
223{ 223 .power_down_gpio = OMAP3EVM_DVI_PANEL_EN_GPIO,
224 if (lcd_enabled) {
225 printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
226 return -EINVAL;
227 }
228
229 gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 1);
230
231 dvi_enabled = 1;
232 return 0;
233}
234
235static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev)
236{
237 gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 0);
238
239 dvi_enabled = 0;
240}
241
242static struct panel_dvi_platform_data dvi_panel = {
243 .platform_enable = omap3_evm_enable_dvi,
244 .platform_disable = omap3_evm_disable_dvi,
245}; 224};
246 225
247static struct omap_dss_device omap3_evm_dvi_device = { 226static struct omap_dss_device omap3_evm_dvi_device = {
248 .name = "dvi", 227 .name = "dvi",
249 .type = OMAP_DISPLAY_TYPE_DPI, 228 .type = OMAP_DISPLAY_TYPE_DPI,
250 .driver_name = "dvi", 229 .driver_name = "tfp410",
251 .data = &dvi_panel, 230 .data = &dvi_panel,
252 .phy.dpi.data_lines = 24, 231 .phy.dpi.data_lines = 24,
253}; 232};
@@ -630,13 +609,13 @@ static struct regulator_consumer_supply dummy_supplies[] = {
630 609
631static void __init omap3_evm_init(void) 610static void __init omap3_evm_init(void)
632{ 611{
612 struct omap_board_mux *obm;
613
633 omap3_evm_get_revision(); 614 omap3_evm_get_revision();
634 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); 615 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
635 616
636 if (cpu_is_omap3630()) 617 obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux;
637 omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB); 618 omap3_mux_init(obm, OMAP_PACKAGE_CBB);
638 else
639 omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB);
640 619
641 omap_board_config = omap3_evm_config; 620 omap_board_config = omap3_evm_config;
642 omap_board_config_size = ARRAY_SIZE(omap3_evm_config); 621 omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 4dffc95bddd2..4396bae91677 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -42,7 +42,7 @@
42#include <plat/usb.h> 42#include <plat/usb.h>
43#include <video/omapdss.h> 43#include <video/omapdss.h>
44#include <video/omap-panel-generic-dpi.h> 44#include <video/omap-panel-generic-dpi.h>
45#include <video/omap-panel-dvi.h> 45#include <video/omap-panel-tfp410.h>
46 46
47#include <plat/mcspi.h> 47#include <plat/mcspi.h>
48#include <linux/input/matrix_keypad.h> 48#include <linux/input/matrix_keypad.h>
@@ -92,9 +92,6 @@ static inline void __init omap3stalker_init_eth(void)
92#define LCD_PANEL_BKLIGHT_GPIO 210 92#define LCD_PANEL_BKLIGHT_GPIO 210
93#define ENABLE_VPLL2_DEV_GRP 0xE0 93#define ENABLE_VPLL2_DEV_GRP 0xE0
94 94
95static int lcd_enabled;
96static int dvi_enabled;
97
98static void __init omap3_stalker_display_init(void) 95static void __init omap3_stalker_display_init(void)
99{ 96{
100 return; 97 return;
@@ -122,32 +119,14 @@ static struct omap_dss_device omap3_stalker_tv_device = {
122 .platform_disable = omap3_stalker_disable_tv, 119 .platform_disable = omap3_stalker_disable_tv,
123}; 120};
124 121
125static int omap3_stalker_enable_dvi(struct omap_dss_device *dssdev) 122static struct tfp410_platform_data dvi_panel = {
126{ 123 .power_down_gpio = DSS_ENABLE_GPIO,
127 if (lcd_enabled) {
128 printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
129 return -EINVAL;
130 }
131 gpio_set_value(DSS_ENABLE_GPIO, 1);
132 dvi_enabled = 1;
133 return 0;
134}
135
136static void omap3_stalker_disable_dvi(struct omap_dss_device *dssdev)
137{
138 gpio_set_value(DSS_ENABLE_GPIO, 0);
139 dvi_enabled = 0;
140}
141
142static struct panel_dvi_platform_data dvi_panel = {
143 .platform_enable = omap3_stalker_enable_dvi,
144 .platform_disable = omap3_stalker_disable_dvi,
145}; 124};
146 125
147static struct omap_dss_device omap3_stalker_dvi_device = { 126static struct omap_dss_device omap3_stalker_dvi_device = {
148 .name = "dvi", 127 .name = "dvi",
149 .type = OMAP_DISPLAY_TYPE_DPI, 128 .type = OMAP_DISPLAY_TYPE_DPI,
150 .driver_name = "dvi", 129 .driver_name = "tfp410",
151 .data = &dvi_panel, 130 .data = &dvi_panel,
152 .phy.dpi.data_lines = 24, 131 .phy.dpi.data_lines = 24,
153}; 132};
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 1b782ba53433..59dd8b7f5b4f 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -42,7 +42,7 @@
42#include "common.h" 42#include "common.h"
43#include <plat/usb.h> 43#include <plat/usb.h>
44#include <plat/mmc.h> 44#include <plat/mmc.h>
45#include <video/omap-panel-dvi.h> 45#include <video/omap-panel-tfp410.h>
46 46
47#include "hsmmc.h" 47#include "hsmmc.h"
48#include "control.h" 48#include "control.h"
@@ -231,7 +231,7 @@ static struct platform_device omap_vwlan_device = {
231 }, 231 },
232}; 232};
233 233
234struct wl12xx_platform_data omap_panda_wlan_data __initdata = { 234static struct wl12xx_platform_data omap_panda_wlan_data __initdata = {
235 /* PANDA ref clock is 38.4 MHz */ 235 /* PANDA ref clock is 38.4 MHz */
236 .board_ref_clock = 2, 236 .board_ref_clock = 2,
237}; 237};
@@ -420,47 +420,22 @@ static struct omap_board_mux board_mux[] __initdata = {
420/* Display DVI */ 420/* Display DVI */
421#define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0 421#define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0
422 422
423static int omap4_panda_enable_dvi(struct omap_dss_device *dssdev)
424{
425 gpio_set_value(dssdev->reset_gpio, 1);
426 return 0;
427}
428
429static void omap4_panda_disable_dvi(struct omap_dss_device *dssdev)
430{
431 gpio_set_value(dssdev->reset_gpio, 0);
432}
433
434/* Using generic display panel */ 423/* Using generic display panel */
435static struct panel_dvi_platform_data omap4_dvi_panel = { 424static struct tfp410_platform_data omap4_dvi_panel = {
436 .platform_enable = omap4_panda_enable_dvi, 425 .i2c_bus_num = 3,
437 .platform_disable = omap4_panda_disable_dvi, 426 .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
438 .i2c_bus_num = 3,
439}; 427};
440 428
441struct omap_dss_device omap4_panda_dvi_device = { 429static struct omap_dss_device omap4_panda_dvi_device = {
442 .type = OMAP_DISPLAY_TYPE_DPI, 430 .type = OMAP_DISPLAY_TYPE_DPI,
443 .name = "dvi", 431 .name = "dvi",
444 .driver_name = "dvi", 432 .driver_name = "tfp410",
445 .data = &omap4_dvi_panel, 433 .data = &omap4_dvi_panel,
446 .phy.dpi.data_lines = 24, 434 .phy.dpi.data_lines = 24,
447 .reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, 435 .reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
448 .channel = OMAP_DSS_CHANNEL_LCD2, 436 .channel = OMAP_DSS_CHANNEL_LCD2,
449}; 437};
450 438
451int __init omap4_panda_dvi_init(void)
452{
453 int r;
454
455 /* Requesting TFP410 DVI GPIO and disabling it, at bootup */
456 r = gpio_request_one(omap4_panda_dvi_device.reset_gpio,
457 GPIOF_OUT_INIT_LOW, "DVI PD");
458 if (r)
459 pr_err("Failed to get DVI powerdown GPIO\n");
460
461 return r;
462}
463
464static struct gpio panda_hdmi_gpios[] = { 439static struct gpio panda_hdmi_gpios[] = {
465 { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" }, 440 { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" },
466 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, 441 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" },
@@ -509,13 +484,8 @@ static struct omap_dss_board_info omap4_panda_dss_data = {
509 .default_device = &omap4_panda_dvi_device, 484 .default_device = &omap4_panda_dvi_device,
510}; 485};
511 486
512void __init omap4_panda_display_init(void) 487static void __init omap4_panda_display_init(void)
513{ 488{
514 int r;
515
516 r = omap4_panda_dvi_init();
517 if (r)
518 pr_err("error initializing panda DVI\n");
519 489
520 omap_display_init(&omap4_panda_dss_data); 490 omap_display_init(&omap4_panda_dss_data);
521 491
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 33aa3910b09e..5527c1979a16 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -46,7 +46,7 @@
46#include "common.h" 46#include "common.h"
47#include <video/omapdss.h> 47#include <video/omapdss.h>
48#include <video/omap-panel-generic-dpi.h> 48#include <video/omap-panel-generic-dpi.h>
49#include <video/omap-panel-dvi.h> 49#include <video/omap-panel-tfp410.h>
50#include <plat/gpmc.h> 50#include <plat/gpmc.h>
51#include <mach/hardware.h> 51#include <mach/hardware.h>
52#include <plat/nand.h> 52#include <plat/nand.h>
@@ -167,32 +167,15 @@ static void __init overo_display_init(void)
167 gpio_export(OVERO_GPIO_LCD_BL, 0); 167 gpio_export(OVERO_GPIO_LCD_BL, 0);
168} 168}
169 169
170static int overo_panel_enable_dvi(struct omap_dss_device *dssdev) 170static struct tfp410_platform_data dvi_panel = {
171{
172 if (lcd_enabled) {
173 printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
174 return -EINVAL;
175 }
176 dvi_enabled = 1;
177
178 return 0;
179}
180
181static void overo_panel_disable_dvi(struct omap_dss_device *dssdev)
182{
183 dvi_enabled = 0;
184}
185
186static struct panel_dvi_platform_data dvi_panel = {
187 .platform_enable = overo_panel_enable_dvi,
188 .platform_disable = overo_panel_disable_dvi,
189 .i2c_bus_num = 3, 171 .i2c_bus_num = 3,
172 .power_down_gpio = -1,
190}; 173};
191 174
192static struct omap_dss_device overo_dvi_device = { 175static struct omap_dss_device overo_dvi_device = {
193 .name = "dvi", 176 .name = "dvi",
194 .type = OMAP_DISPLAY_TYPE_DPI, 177 .type = OMAP_DISPLAY_TYPE_DPI,
195 .driver_name = "dvi", 178 .driver_name = "tfp410",
196 .data = &dvi_panel, 179 .data = &dvi_panel,
197 .phy.dpi.data_lines = 24, 180 .phy.dpi.data_lines = 24,
198}; 181};
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index d87ee0612098..ae957c92081b 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -872,11 +872,11 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = {
872 .resource_config = twl4030_rconfig, 872 .resource_config = twl4030_rconfig,
873}; 873};
874 874
875struct twl4030_vibra_data rx51_vibra_data __initdata = { 875static struct twl4030_vibra_data rx51_vibra_data __initdata = {
876 .coexist = 0, 876 .coexist = 0,
877}; 877};
878 878
879struct twl4030_audio_data rx51_audio_data __initdata = { 879static struct twl4030_audio_data rx51_audio_data __initdata = {
880 .audio_mclk = 26000000, 880 .audio_mclk = 26000000,
881 .vibra = &rx51_vibra_data, 881 .vibra = &rx51_vibra_data,
882}; 882};
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 27f01f051dff..2da92a6ba40a 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -59,25 +59,24 @@ static struct platform_device leds_gpio = {
59}; 59};
60 60
61/* 61/*
62 * cpuidle C-states definition override from the default values. 62 * cpuidle C-states definition for rx51.
63 * The 'exit_latency' field is the sum of sleep and wake-up latencies. 63 *
64 */ 64 * The 'exit_latency' field is the sum of sleep
65static struct cpuidle_params rx51_cpuidle_params[] = { 65 * and wake-up latencies.
66 /* C1 */ 66
67 {110 + 162, 5 , 1}, 67 ---------------------------------------------
68 /* C2 */ 68 | state | exit_latency | target_residency |
69 {106 + 180, 309, 1}, 69 ---------------------------------------------
70 /* C3 */ 70 | C1 | 110 + 162 | 5 |
71 {107 + 410, 46057, 0}, 71 | C2 | 106 + 180 | 309 |
72 /* C4 */ 72 | C3 | 107 + 410 | 46057 |
73 {121 + 3374, 46057, 0}, 73 | C4 | 121 + 3374 | 46057 |
74 /* C5 */ 74 | C5 | 855 + 1146 | 46057 |
75 {855 + 1146, 46057, 1}, 75 | C6 | 7580 + 4134 | 484329 |
76 /* C6 */ 76 | C7 | 7505 + 15274 | 484329 |
77 {7580 + 4134, 484329, 0}, 77 ---------------------------------------------
78 /* C7 */ 78
79 {7505 + 15274, 484329, 1}, 79*/
80};
81 80
82extern void __init rx51_peripherals_init(void); 81extern void __init rx51_peripherals_init(void);
83 82
@@ -98,7 +97,6 @@ static void __init rx51_init(void)
98 struct omap_sdrc_params *sdrc_params; 97 struct omap_sdrc_params *sdrc_params;
99 98
100 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 99 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
101 omap3_pm_init_cpuidle(rx51_cpuidle_params);
102 omap_serial_init(); 100 omap_serial_init();
103 101
104 sdrc_params = nokia_get_sdram_timings(); 102 sdrc_params = nokia_get_sdram_timings();
diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c
index a43a765dd092..28187f134fff 100644
--- a/arch/arm/mach-omap2/board-zoom-display.c
+++ b/arch/arm/mach-omap2/board-zoom-display.c
@@ -16,6 +16,7 @@
16#include <linux/spi/spi.h> 16#include <linux/spi/spi.h>
17#include <plat/mcspi.h> 17#include <plat/mcspi.h>
18#include <video/omapdss.h> 18#include <video/omapdss.h>
19#include <mach/board-zoom.h>
19 20
20#define LCD_PANEL_RESET_GPIO_PROD 96 21#define LCD_PANEL_RESET_GPIO_PROD 96
21#define LCD_PANEL_RESET_GPIO_PILOT 55 22#define LCD_PANEL_RESET_GPIO_PILOT 55
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 57da7f406e28..0e95efccd2d7 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -134,8 +134,6 @@ void omap4_map_io(void);
134void ti81xx_map_io(void); 134void ti81xx_map_io(void);
135void omap_barriers_init(void); 135void omap_barriers_init(void);
136 136
137extern void __init omap_init_consistent_dma_size(void);
138
139/** 137/**
140 * omap_test_timeout - busy-loop, testing a condition 138 * omap_test_timeout - busy-loop, testing a condition
141 * @cond: condition to test until it evaluates to true 139 * @cond: condition to test until it evaluates to true
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index 535866489ce3..207bc1c7759f 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -38,40 +38,44 @@
38 38
39#ifdef CONFIG_CPU_IDLE 39#ifdef CONFIG_CPU_IDLE
40 40
41/*
42 * The latencies/thresholds for various C states have
43 * to be configured from the respective board files.
44 * These are some default values (which might not provide
45 * the best power savings) used on boards which do not
46 * pass these details from the board file.
47 */
48static struct cpuidle_params cpuidle_params_table[] = {
49 /* C1 */
50 {2 + 2, 5, 1},
51 /* C2 */
52 {10 + 10, 30, 1},
53 /* C3 */
54 {50 + 50, 300, 1},
55 /* C4 */
56 {1500 + 1800, 4000, 1},
57 /* C5 */
58 {2500 + 7500, 12000, 1},
59 /* C6 */
60 {3000 + 8500, 15000, 1},
61 /* C7 */
62 {10000 + 30000, 300000, 1},
63};
64#define OMAP3_NUM_STATES ARRAY_SIZE(cpuidle_params_table)
65
66/* Mach specific information to be recorded in the C-state driver_data */ 41/* Mach specific information to be recorded in the C-state driver_data */
67struct omap3_idle_statedata { 42struct omap3_idle_statedata {
68 u32 mpu_state; 43 u32 mpu_state;
69 u32 core_state; 44 u32 core_state;
70 u8 valid;
71}; 45};
72struct omap3_idle_statedata omap3_idle_data[OMAP3_NUM_STATES];
73 46
74struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd; 47static struct omap3_idle_statedata omap3_idle_data[] = {
48 {
49 .mpu_state = PWRDM_POWER_ON,
50 .core_state = PWRDM_POWER_ON,
51 },
52 {
53 .mpu_state = PWRDM_POWER_ON,
54 .core_state = PWRDM_POWER_ON,
55 },
56 {
57 .mpu_state = PWRDM_POWER_RET,
58 .core_state = PWRDM_POWER_ON,
59 },
60 {
61 .mpu_state = PWRDM_POWER_OFF,
62 .core_state = PWRDM_POWER_ON,
63 },
64 {
65 .mpu_state = PWRDM_POWER_RET,
66 .core_state = PWRDM_POWER_RET,
67 },
68 {
69 .mpu_state = PWRDM_POWER_OFF,
70 .core_state = PWRDM_POWER_RET,
71 },
72 {
73 .mpu_state = PWRDM_POWER_OFF,
74 .core_state = PWRDM_POWER_OFF,
75 },
76};
77
78static struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd;
75 79
76static int _cpuidle_allow_idle(struct powerdomain *pwrdm, 80static int _cpuidle_allow_idle(struct powerdomain *pwrdm,
77 struct clockdomain *clkdm) 81 struct clockdomain *clkdm)
@@ -91,8 +95,7 @@ static int __omap3_enter_idle(struct cpuidle_device *dev,
91 struct cpuidle_driver *drv, 95 struct cpuidle_driver *drv,
92 int index) 96 int index)
93{ 97{
94 struct omap3_idle_statedata *cx = 98 struct omap3_idle_statedata *cx = &omap3_idle_data[index];
95 cpuidle_get_statedata(&dev->states_usage[index]);
96 u32 mpu_state = cx->mpu_state, core_state = cx->core_state; 99 u32 mpu_state = cx->mpu_state, core_state = cx->core_state;
97 100
98 local_fiq_disable(); 101 local_fiq_disable();
@@ -169,14 +172,12 @@ static inline int omap3_enter_idle(struct cpuidle_device *dev,
169 * if it satisfies the enable_off_mode condition. 172 * if it satisfies the enable_off_mode condition.
170 */ 173 */
171static int next_valid_state(struct cpuidle_device *dev, 174static int next_valid_state(struct cpuidle_device *dev,
172 struct cpuidle_driver *drv, 175 struct cpuidle_driver *drv, int index)
173 int index)
174{ 176{
175 struct cpuidle_state_usage *curr_usage = &dev->states_usage[index]; 177 struct omap3_idle_statedata *cx = &omap3_idle_data[index];
176 struct cpuidle_state *curr = &drv->states[index];
177 struct omap3_idle_statedata *cx = cpuidle_get_statedata(curr_usage);
178 u32 mpu_deepest_state = PWRDM_POWER_RET; 178 u32 mpu_deepest_state = PWRDM_POWER_RET;
179 u32 core_deepest_state = PWRDM_POWER_RET; 179 u32 core_deepest_state = PWRDM_POWER_RET;
180 int idx;
180 int next_index = -1; 181 int next_index = -1;
181 182
182 if (enable_off_mode) { 183 if (enable_off_mode) {
@@ -191,45 +192,29 @@ static int next_valid_state(struct cpuidle_device *dev,
191 } 192 }
192 193
193 /* Check if current state is valid */ 194 /* Check if current state is valid */
194 if ((cx->valid) && 195 if ((cx->mpu_state >= mpu_deepest_state) &&
195 (cx->mpu_state >= mpu_deepest_state) && 196 (cx->core_state >= core_deepest_state))
196 (cx->core_state >= core_deepest_state)) {
197 return index; 197 return index;
198 } else {
199 int idx = OMAP3_NUM_STATES - 1;
200
201 /* Reach the current state starting at highest C-state */
202 for (; idx >= 0; idx--) {
203 if (&drv->states[idx] == curr) {
204 next_index = idx;
205 break;
206 }
207 }
208
209 /* Should never hit this condition */
210 WARN_ON(next_index == -1);
211 198
212 /* 199 /*
213 * Drop to next valid state. 200 * Drop to next valid state.
214 * Start search from the next (lower) state. 201 * Start search from the next (lower) state.
215 */ 202 */
216 idx--; 203 for (idx = index - 1; idx >= 0; idx--) {
217 for (; idx >= 0; idx--) { 204 cx = &omap3_idle_data[idx];
218 cx = cpuidle_get_statedata(&dev->states_usage[idx]); 205 if ((cx->mpu_state >= mpu_deepest_state) &&
219 if ((cx->valid) && 206 (cx->core_state >= core_deepest_state)) {
220 (cx->mpu_state >= mpu_deepest_state) && 207 next_index = idx;
221 (cx->core_state >= core_deepest_state)) { 208 break;
222 next_index = idx;
223 break;
224 }
225 } 209 }
226 /*
227 * C1 is always valid.
228 * So, no need to check for 'next_index == -1' outside
229 * this loop.
230 */
231 } 210 }
232 211
212 /*
213 * C1 is always valid.
214 * So, no need to check for 'next_index == -1' outside
215 * this loop.
216 */
217
233 return next_index; 218 return next_index;
234} 219}
235 220
@@ -273,7 +258,7 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev,
273 * Prevent PER off if CORE is not in retention or off as this 258 * Prevent PER off if CORE is not in retention or off as this
274 * would disable PER wakeups completely. 259 * would disable PER wakeups completely.
275 */ 260 */
276 cx = cpuidle_get_statedata(&dev->states_usage[index]); 261 cx = &omap3_idle_data[index];
277 core_next_state = cx->core_state; 262 core_next_state = cx->core_state;
278 per_next_state = per_saved_state = pwrdm_read_next_pwrst(per_pd); 263 per_next_state = per_saved_state = pwrdm_read_next_pwrst(per_pd);
279 if ((per_next_state == PWRDM_POWER_OFF) && 264 if ((per_next_state == PWRDM_POWER_OFF) &&
@@ -298,57 +283,71 @@ select_state:
298 283
299DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev); 284DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
300 285
301void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params)
302{
303 int i;
304
305 if (!cpuidle_board_params)
306 return;
307
308 for (i = 0; i < OMAP3_NUM_STATES; i++) {
309 cpuidle_params_table[i].valid = cpuidle_board_params[i].valid;
310 cpuidle_params_table[i].exit_latency =
311 cpuidle_board_params[i].exit_latency;
312 cpuidle_params_table[i].target_residency =
313 cpuidle_board_params[i].target_residency;
314 }
315 return;
316}
317
318struct cpuidle_driver omap3_idle_driver = { 286struct cpuidle_driver omap3_idle_driver = {
319 .name = "omap3_idle", 287 .name = "omap3_idle",
320 .owner = THIS_MODULE, 288 .owner = THIS_MODULE,
289 .states = {
290 {
291 .enter = omap3_enter_idle,
292 .exit_latency = 2 + 2,
293 .target_residency = 5,
294 .flags = CPUIDLE_FLAG_TIME_VALID,
295 .name = "C1",
296 .desc = "MPU ON + CORE ON",
297 },
298 {
299 .enter = omap3_enter_idle_bm,
300 .exit_latency = 10 + 10,
301 .target_residency = 30,
302 .flags = CPUIDLE_FLAG_TIME_VALID,
303 .name = "C2",
304 .desc = "MPU ON + CORE ON",
305 },
306 {
307 .enter = omap3_enter_idle_bm,
308 .exit_latency = 50 + 50,
309 .target_residency = 300,
310 .flags = CPUIDLE_FLAG_TIME_VALID,
311 .name = "C3",
312 .desc = "MPU RET + CORE ON",
313 },
314 {
315 .enter = omap3_enter_idle_bm,
316 .exit_latency = 1500 + 1800,
317 .target_residency = 4000,
318 .flags = CPUIDLE_FLAG_TIME_VALID,
319 .name = "C4",
320 .desc = "MPU OFF + CORE ON",
321 },
322 {
323 .enter = omap3_enter_idle_bm,
324 .exit_latency = 2500 + 7500,
325 .target_residency = 12000,
326 .flags = CPUIDLE_FLAG_TIME_VALID,
327 .name = "C5",
328 .desc = "MPU RET + CORE RET",
329 },
330 {
331 .enter = omap3_enter_idle_bm,
332 .exit_latency = 3000 + 8500,
333 .target_residency = 15000,
334 .flags = CPUIDLE_FLAG_TIME_VALID,
335 .name = "C6",
336 .desc = "MPU OFF + CORE RET",
337 },
338 {
339 .enter = omap3_enter_idle_bm,
340 .exit_latency = 10000 + 30000,
341 .target_residency = 30000,
342 .flags = CPUIDLE_FLAG_TIME_VALID,
343 .name = "C7",
344 .desc = "MPU OFF + CORE OFF",
345 },
346 },
347 .state_count = ARRAY_SIZE(omap3_idle_data),
348 .safe_state_index = 0,
321}; 349};
322 350
323/* Helper to fill the C-state common data*/
324static inline void _fill_cstate(struct cpuidle_driver *drv,
325 int idx, const char *descr)
326{
327 struct cpuidle_state *state = &drv->states[idx];
328
329 state->exit_latency = cpuidle_params_table[idx].exit_latency;
330 state->target_residency = cpuidle_params_table[idx].target_residency;
331 state->flags = CPUIDLE_FLAG_TIME_VALID;
332 state->enter = omap3_enter_idle_bm;
333 sprintf(state->name, "C%d", idx + 1);
334 strncpy(state->desc, descr, CPUIDLE_DESC_LEN);
335
336}
337
338/* Helper to register the driver_data */
339static inline struct omap3_idle_statedata *_fill_cstate_usage(
340 struct cpuidle_device *dev,
341 int idx)
342{
343 struct omap3_idle_statedata *cx = &omap3_idle_data[idx];
344 struct cpuidle_state_usage *state_usage = &dev->states_usage[idx];
345
346 cx->valid = cpuidle_params_table[idx].valid;
347 cpuidle_set_statedata(state_usage, cx);
348
349 return cx;
350}
351
352/** 351/**
353 * omap3_idle_init - Init routine for OMAP3 idle 352 * omap3_idle_init - Init routine for OMAP3 idle
354 * 353 *
@@ -358,77 +357,20 @@ static inline struct omap3_idle_statedata *_fill_cstate_usage(
358int __init omap3_idle_init(void) 357int __init omap3_idle_init(void)
359{ 358{
360 struct cpuidle_device *dev; 359 struct cpuidle_device *dev;
361 struct cpuidle_driver *drv = &omap3_idle_driver;
362 struct omap3_idle_statedata *cx;
363 360
364 mpu_pd = pwrdm_lookup("mpu_pwrdm"); 361 mpu_pd = pwrdm_lookup("mpu_pwrdm");
365 core_pd = pwrdm_lookup("core_pwrdm"); 362 core_pd = pwrdm_lookup("core_pwrdm");
366 per_pd = pwrdm_lookup("per_pwrdm"); 363 per_pd = pwrdm_lookup("per_pwrdm");
367 cam_pd = pwrdm_lookup("cam_pwrdm"); 364 cam_pd = pwrdm_lookup("cam_pwrdm");
368 365
366 if (!mpu_pd || !core_pd || !per_pd || !cam_pd)
367 return -ENODEV;
369 368
370 drv->safe_state_index = -1;
371 dev = &per_cpu(omap3_idle_dev, smp_processor_id());
372
373 /* C1 . MPU WFI + Core active */
374 _fill_cstate(drv, 0, "MPU ON + CORE ON");
375 (&drv->states[0])->enter = omap3_enter_idle;
376 drv->safe_state_index = 0;
377 cx = _fill_cstate_usage(dev, 0);
378 cx->valid = 1; /* C1 is always valid */
379 cx->mpu_state = PWRDM_POWER_ON;
380 cx->core_state = PWRDM_POWER_ON;
381
382 /* C2 . MPU WFI + Core inactive */
383 _fill_cstate(drv, 1, "MPU ON + CORE ON");
384 cx = _fill_cstate_usage(dev, 1);
385 cx->mpu_state = PWRDM_POWER_ON;
386 cx->core_state = PWRDM_POWER_ON;
387
388 /* C3 . MPU CSWR + Core inactive */
389 _fill_cstate(drv, 2, "MPU RET + CORE ON");
390 cx = _fill_cstate_usage(dev, 2);
391 cx->mpu_state = PWRDM_POWER_RET;
392 cx->core_state = PWRDM_POWER_ON;
393
394 /* C4 . MPU OFF + Core inactive */
395 _fill_cstate(drv, 3, "MPU OFF + CORE ON");
396 cx = _fill_cstate_usage(dev, 3);
397 cx->mpu_state = PWRDM_POWER_OFF;
398 cx->core_state = PWRDM_POWER_ON;
399
400 /* C5 . MPU RET + Core RET */
401 _fill_cstate(drv, 4, "MPU RET + CORE RET");
402 cx = _fill_cstate_usage(dev, 4);
403 cx->mpu_state = PWRDM_POWER_RET;
404 cx->core_state = PWRDM_POWER_RET;
405
406 /* C6 . MPU OFF + Core RET */
407 _fill_cstate(drv, 5, "MPU OFF + CORE RET");
408 cx = _fill_cstate_usage(dev, 5);
409 cx->mpu_state = PWRDM_POWER_OFF;
410 cx->core_state = PWRDM_POWER_RET;
411
412 /* C7 . MPU OFF + Core OFF */
413 _fill_cstate(drv, 6, "MPU OFF + CORE OFF");
414 cx = _fill_cstate_usage(dev, 6);
415 /*
416 * Erratum i583: implementation for ES rev < Es1.2 on 3630. We cannot
417 * enable OFF mode in a stable form for previous revisions.
418 * We disable C7 state as a result.
419 */
420 if (IS_PM34XX_ERRATUM(PM_SDRC_WAKEUP_ERRATUM_i583)) {
421 cx->valid = 0;
422 pr_warn("%s: core off state C7 disabled due to i583\n",
423 __func__);
424 }
425 cx->mpu_state = PWRDM_POWER_OFF;
426 cx->core_state = PWRDM_POWER_OFF;
427
428 drv->state_count = OMAP3_NUM_STATES;
429 cpuidle_register_driver(&omap3_idle_driver); 369 cpuidle_register_driver(&omap3_idle_driver);
430 370
431 dev->state_count = OMAP3_NUM_STATES; 371 dev = &per_cpu(omap3_idle_dev, smp_processor_id());
372 dev->cpu = 0;
373
432 if (cpuidle_register_device(dev)) { 374 if (cpuidle_register_device(dev)) {
433 printk(KERN_ERR "%s: CPUidle register device failed\n", 375 printk(KERN_ERR "%s: CPUidle register device failed\n",
434 __func__); 376 __func__);
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
index f386cbe9c889..be1617ca84bd 100644
--- a/arch/arm/mach-omap2/cpuidle44xx.c
+++ b/arch/arm/mach-omap2/cpuidle44xx.c
@@ -24,26 +24,31 @@
24 24
25#ifdef CONFIG_CPU_IDLE 25#ifdef CONFIG_CPU_IDLE
26 26
27/* Machine specific information to be recorded in the C-state driver_data */ 27/* Machine specific information */
28struct omap4_idle_statedata { 28struct omap4_idle_statedata {
29 u32 cpu_state; 29 u32 cpu_state;
30 u32 mpu_logic_state; 30 u32 mpu_logic_state;
31 u32 mpu_state; 31 u32 mpu_state;
32 u8 valid;
33}; 32};
34 33
35static struct cpuidle_params cpuidle_params_table[] = { 34static struct omap4_idle_statedata omap4_idle_data[] = {
36 /* C1 - CPU0 ON + CPU1 ON + MPU ON */ 35 {
37 {.exit_latency = 2 + 2 , .target_residency = 5, .valid = 1}, 36 .cpu_state = PWRDM_POWER_ON,
38 /* C2- CPU0 OFF + CPU1 OFF + MPU CSWR */ 37 .mpu_state = PWRDM_POWER_ON,
39 {.exit_latency = 328 + 440 , .target_residency = 960, .valid = 1}, 38 .mpu_logic_state = PWRDM_POWER_RET,
40 /* C3 - CPU0 OFF + CPU1 OFF + MPU OSWR */ 39 },
41 {.exit_latency = 460 + 518 , .target_residency = 1100, .valid = 1}, 40 {
41 .cpu_state = PWRDM_POWER_OFF,
42 .mpu_state = PWRDM_POWER_RET,
43 .mpu_logic_state = PWRDM_POWER_RET,
44 },
45 {
46 .cpu_state = PWRDM_POWER_OFF,
47 .mpu_state = PWRDM_POWER_RET,
48 .mpu_logic_state = PWRDM_POWER_OFF,
49 },
42}; 50};
43 51
44#define OMAP4_NUM_STATES ARRAY_SIZE(cpuidle_params_table)
45
46struct omap4_idle_statedata omap4_idle_data[OMAP4_NUM_STATES];
47static struct powerdomain *mpu_pd, *cpu0_pd, *cpu1_pd; 52static struct powerdomain *mpu_pd, *cpu0_pd, *cpu1_pd;
48 53
49/** 54/**
@@ -60,8 +65,7 @@ static int omap4_enter_idle(struct cpuidle_device *dev,
60 struct cpuidle_driver *drv, 65 struct cpuidle_driver *drv,
61 int index) 66 int index)
62{ 67{
63 struct omap4_idle_statedata *cx = 68 struct omap4_idle_statedata *cx = &omap4_idle_data[index];
64 cpuidle_get_statedata(&dev->states_usage[index]);
65 u32 cpu1_state; 69 u32 cpu1_state;
66 int cpu_id = smp_processor_id(); 70 int cpu_id = smp_processor_id();
67 71
@@ -78,7 +82,7 @@ static int omap4_enter_idle(struct cpuidle_device *dev,
78 cpu1_state = pwrdm_read_pwrst(cpu1_pd); 82 cpu1_state = pwrdm_read_pwrst(cpu1_pd);
79 if (cpu1_state != PWRDM_POWER_OFF) { 83 if (cpu1_state != PWRDM_POWER_OFF) {
80 index = drv->safe_state_index; 84 index = drv->safe_state_index;
81 cx = cpuidle_get_statedata(&dev->states_usage[index]); 85 cx = &omap4_idle_data[index];
82 } 86 }
83 87
84 if (index > 0) 88 if (index > 0)
@@ -133,36 +137,39 @@ struct cpuidle_driver omap4_idle_driver = {
133 .name = "omap4_idle", 137 .name = "omap4_idle",
134 .owner = THIS_MODULE, 138 .owner = THIS_MODULE,
135 .en_core_tk_irqen = 1, 139 .en_core_tk_irqen = 1,
140 .states = {
141 {
142 /* C1 - CPU0 ON + CPU1 ON + MPU ON */
143 .exit_latency = 2 + 2,
144 .target_residency = 5,
145 .flags = CPUIDLE_FLAG_TIME_VALID,
146 .enter = omap4_enter_idle,
147 .name = "C1",
148 .desc = "MPUSS ON"
149 },
150 {
151 /* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */
152 .exit_latency = 328 + 440,
153 .target_residency = 960,
154 .flags = CPUIDLE_FLAG_TIME_VALID,
155 .enter = omap4_enter_idle,
156 .name = "C2",
157 .desc = "MPUSS CSWR",
158 },
159 {
160 /* C3 - CPU0 OFF + CPU1 OFF + MPU OSWR */
161 .exit_latency = 460 + 518,
162 .target_residency = 1100,
163 .flags = CPUIDLE_FLAG_TIME_VALID,
164 .enter = omap4_enter_idle,
165 .name = "C3",
166 .desc = "MPUSS OSWR",
167 },
168 },
169 .state_count = ARRAY_SIZE(omap4_idle_data),
170 .safe_state_index = 0,
136}; 171};
137 172
138static inline void _fill_cstate(struct cpuidle_driver *drv,
139 int idx, const char *descr)
140{
141 struct cpuidle_state *state = &drv->states[idx];
142
143 state->exit_latency = cpuidle_params_table[idx].exit_latency;
144 state->target_residency = cpuidle_params_table[idx].target_residency;
145 state->flags = CPUIDLE_FLAG_TIME_VALID;
146 state->enter = omap4_enter_idle;
147 sprintf(state->name, "C%d", idx + 1);
148 strncpy(state->desc, descr, CPUIDLE_DESC_LEN);
149}
150
151static inline struct omap4_idle_statedata *_fill_cstate_usage(
152 struct cpuidle_device *dev,
153 int idx)
154{
155 struct omap4_idle_statedata *cx = &omap4_idle_data[idx];
156 struct cpuidle_state_usage *state_usage = &dev->states_usage[idx];
157
158 cx->valid = cpuidle_params_table[idx].valid;
159 cpuidle_set_statedata(state_usage, cx);
160
161 return cx;
162}
163
164
165
166/** 173/**
167 * omap4_idle_init - Init routine for OMAP4 idle 174 * omap4_idle_init - Init routine for OMAP4 idle
168 * 175 *
@@ -171,9 +178,7 @@ static inline struct omap4_idle_statedata *_fill_cstate_usage(
171 */ 178 */
172int __init omap4_idle_init(void) 179int __init omap4_idle_init(void)
173{ 180{
174 struct omap4_idle_statedata *cx;
175 struct cpuidle_device *dev; 181 struct cpuidle_device *dev;
176 struct cpuidle_driver *drv = &omap4_idle_driver;
177 unsigned int cpu_id = 0; 182 unsigned int cpu_id = 0;
178 183
179 mpu_pd = pwrdm_lookup("mpu_pwrdm"); 184 mpu_pd = pwrdm_lookup("mpu_pwrdm");
@@ -182,42 +187,15 @@ int __init omap4_idle_init(void)
182 if ((!mpu_pd) || (!cpu0_pd) || (!cpu1_pd)) 187 if ((!mpu_pd) || (!cpu0_pd) || (!cpu1_pd))
183 return -ENODEV; 188 return -ENODEV;
184 189
185
186 drv->safe_state_index = -1;
187 dev = &per_cpu(omap4_idle_dev, cpu_id); 190 dev = &per_cpu(omap4_idle_dev, cpu_id);
188 dev->cpu = cpu_id; 191 dev->cpu = cpu_id;
189 192
190 /* C1 - CPU0 ON + CPU1 ON + MPU ON */
191 _fill_cstate(drv, 0, "MPUSS ON");
192 drv->safe_state_index = 0;
193 cx = _fill_cstate_usage(dev, 0);
194 cx->valid = 1; /* C1 is always valid */
195 cx->cpu_state = PWRDM_POWER_ON;
196 cx->mpu_state = PWRDM_POWER_ON;
197 cx->mpu_logic_state = PWRDM_POWER_RET;
198
199 /* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */
200 _fill_cstate(drv, 1, "MPUSS CSWR");
201 cx = _fill_cstate_usage(dev, 1);
202 cx->cpu_state = PWRDM_POWER_OFF;
203 cx->mpu_state = PWRDM_POWER_RET;
204 cx->mpu_logic_state = PWRDM_POWER_RET;
205
206 /* C3 - CPU0 OFF + CPU1 OFF + MPU OSWR */
207 _fill_cstate(drv, 2, "MPUSS OSWR");
208 cx = _fill_cstate_usage(dev, 2);
209 cx->cpu_state = PWRDM_POWER_OFF;
210 cx->mpu_state = PWRDM_POWER_RET;
211 cx->mpu_logic_state = PWRDM_POWER_OFF;
212
213 drv->state_count = OMAP4_NUM_STATES;
214 cpuidle_register_driver(&omap4_idle_driver); 193 cpuidle_register_driver(&omap4_idle_driver);
215 194
216 dev->state_count = OMAP4_NUM_STATES;
217 if (cpuidle_register_device(dev)) { 195 if (cpuidle_register_device(dev)) {
218 pr_err("%s: CPUidle register device failed\n", __func__); 196 pr_err("%s: CPUidle register device failed\n", __func__);
219 return -EIO; 197 return -EIO;
220 } 198 }
221 199
222 return 0; 200 return 0;
223} 201}
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index e4336035c0ea..f3953a499286 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -42,7 +42,6 @@
42 42
43static int __init omap3_l3_init(void) 43static int __init omap3_l3_init(void)
44{ 44{
45 int l;
46 struct omap_hwmod *oh; 45 struct omap_hwmod *oh;
47 struct platform_device *pdev; 46 struct platform_device *pdev;
48 char oh_name[L3_MODULES_MAX_LEN]; 47 char oh_name[L3_MODULES_MAX_LEN];
@@ -54,7 +53,7 @@ static int __init omap3_l3_init(void)
54 if (!(cpu_is_omap34xx())) 53 if (!(cpu_is_omap34xx()))
55 return -ENODEV; 54 return -ENODEV;
56 55
57 l = snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main"); 56 snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main");
58 57
59 oh = omap_hwmod_lookup(oh_name); 58 oh = omap_hwmod_lookup(oh_name);
60 59
@@ -72,7 +71,7 @@ postcore_initcall(omap3_l3_init);
72 71
73static int __init omap4_l3_init(void) 72static int __init omap4_l3_init(void)
74{ 73{
75 int l, i; 74 int i;
76 struct omap_hwmod *oh[3]; 75 struct omap_hwmod *oh[3];
77 struct platform_device *pdev; 76 struct platform_device *pdev;
78 char oh_name[L3_MODULES_MAX_LEN]; 77 char oh_name[L3_MODULES_MAX_LEN];
@@ -89,7 +88,7 @@ static int __init omap4_l3_init(void)
89 return -ENODEV; 88 return -ENODEV;
90 89
91 for (i = 0; i < L3_MODULES; i++) { 90 for (i = 0; i < L3_MODULES; i++) {
92 l = snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main_%d", i+1); 91 snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main_%d", i+1);
93 92
94 oh[i] = omap_hwmod_lookup(oh_name); 93 oh[i] = omap_hwmod_lookup(oh_name);
95 if (!(oh[i])) 94 if (!(oh[i]))
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c
index 2f994e5194e8..064cab03d2bd 100644
--- a/arch/arm/mach-omap2/gpio.c
+++ b/arch/arm/mach-omap2/gpio.c
@@ -58,7 +58,7 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
58 pdata->virtual_irq_start = IH_GPIO_BASE + 32 * (id - 1); 58 pdata->virtual_irq_start = IH_GPIO_BASE + 32 * (id - 1);
59 pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count; 59 pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count;
60 pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL); 60 pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL);
61 if (!pdata) { 61 if (!pdata->regs) {
62 pr_err("gpio%d: Memory allocation failed\n", id); 62 pr_err("gpio%d: Memory allocation failed\n", id);
63 return -ENOMEM; 63 return -ENOMEM;
64 } 64 }
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c
index 385b3e02c4a6..a0fa9bb2bda5 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -176,7 +176,7 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg,
176 const int t_wpl = 40; 176 const int t_wpl = 40;
177 const int t_wph = 30; 177 const int t_wph = 30;
178 int min_gpmc_clk_period, t_ces, t_avds, t_avdh, t_ach, t_aavdh, t_rdyo; 178 int min_gpmc_clk_period, t_ces, t_avds, t_avdh, t_ach, t_aavdh, t_rdyo;
179 int tick_ns, div, fclk_offset_ns, fclk_offset, gpmc_clk_ns, latency; 179 int div, fclk_offset_ns, fclk_offset, gpmc_clk_ns, latency;
180 int first_time = 0, hf = 0, vhf = 0, sync_read = 0, sync_write = 0; 180 int first_time = 0, hf = 0, vhf = 0, sync_read = 0, sync_write = 0;
181 int err, ticks_cez; 181 int err, ticks_cez;
182 int cs = cfg->cs, freq = *freq_ptr; 182 int cs = cfg->cs, freq = *freq_ptr;
@@ -240,7 +240,6 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg,
240 break; 240 break;
241 } 241 }
242 242
243 tick_ns = gpmc_ticks_to_ns(1);
244 div = gpmc_cs_calc_divider(cs, min_gpmc_clk_period); 243 div = gpmc_cs_calc_divider(cs, min_gpmc_clk_period);
245 gpmc_clk_ns = gpmc_ticks_to_ns(div); 244 gpmc_clk_ns = gpmc_ticks_to_ns(div);
246 if (gpmc_clk_ns < 15) /* >66Mhz */ 245 if (gpmc_clk_ns < 15) /* >66Mhz */
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 00d510858e28..580e684e8825 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -755,8 +755,7 @@ static int __init gpmc_init(void)
755 irq++; 755 irq++;
756 } 756 }
757 757
758 ret = request_irq(gpmc_irq, 758 ret = request_irq(gpmc_irq, gpmc_handle_irq, IRQF_SHARED, "gpmc", NULL);
759 gpmc_handle_irq, IRQF_SHARED, "gpmc", gpmc_base);
760 if (ret) 759 if (ret)
761 pr_err("gpmc: irq-%d could not claim: err %d\n", 760 pr_err("gpmc: irq-%d could not claim: err %d\n",
762 gpmc_irq, ret); 761 gpmc_irq, ret);
diff --git a/arch/arm/mach-omap2/hwspinlock.c b/arch/arm/mach-omap2/hwspinlock.c
index 454dfce125ca..8763c8520dc2 100644
--- a/arch/arm/mach-omap2/hwspinlock.c
+++ b/arch/arm/mach-omap2/hwspinlock.c
@@ -28,7 +28,7 @@ static struct hwspinlock_pdata omap_hwspinlock_pdata __initdata = {
28 .base_id = 0, 28 .base_id = 0,
29}; 29};
30 30
31int __init hwspinlocks_init(void) 31static int __init hwspinlocks_init(void)
32{ 32{
33 int retval = 0; 33 int retval = 0;
34 struct omap_hwmod *oh; 34 struct omap_hwmod *oh;
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 065bd768987c..2d5a57669a79 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -31,6 +31,7 @@
31#include <plat/omap-pm.h> 31#include <plat/omap-pm.h>
32#include <plat/omap_hwmod.h> 32#include <plat/omap_hwmod.h>
33#include <plat/multi.h> 33#include <plat/multi.h>
34#include <plat/dma.h>
34 35
35#include "iomap.h" 36#include "iomap.h"
36#include "voltage.h" 37#include "voltage.h"
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 65f0d2571c9a..80f3ced0bd1a 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -25,6 +25,7 @@
25#include <mach/hardware.h> 25#include <mach/hardware.h>
26 26
27#include "iomap.h" 27#include "iomap.h"
28#include "common.h"
28 29
29/* selected INTC register offsets */ 30/* selected INTC register offsets */
30 31
@@ -334,7 +335,7 @@ void omap_intc_restore_context(void)
334void omap3_intc_suspend(void) 335void omap3_intc_suspend(void)
335{ 336{
336 /* A pending interrupt would prevent OMAP from entering suspend */ 337 /* A pending interrupt would prevent OMAP from entering suspend */
337 omap_ack_irq(0); 338 omap_ack_irq(NULL);
338} 339}
339 340
340void omap3_intc_prepare_idle(void) 341void omap3_intc_prepare_idle(void)
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 65c33911341f..3268ee24eada 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -247,7 +247,7 @@ int __init omap_mux_init_signal(const char *muxname, int val)
247 int mux_mode; 247 int mux_mode;
248 248
249 mux_mode = omap_mux_get_by_name(muxname, &partition, &mux); 249 mux_mode = omap_mux_get_by_name(muxname, &partition, &mux);
250 if (mux_mode < 0) 250 if (mux_mode < 0 || !mux)
251 return mux_mode; 251 return mux_mode;
252 252
253 old_mode = omap_mux_read(partition, mux->reg_offset); 253 old_mode = omap_mux_read(partition, mux->reg_offset);
diff --git a/arch/arm/mach-omap2/omap-secure.c b/arch/arm/mach-omap2/omap-secure.c
index d8f8ef40290f..d9ae4a53d818 100644
--- a/arch/arm/mach-omap2/omap-secure.c
+++ b/arch/arm/mach-omap2/omap-secure.c
@@ -18,6 +18,7 @@
18#include <asm/cacheflush.h> 18#include <asm/cacheflush.h>
19#include <asm/memblock.h> 19#include <asm/memblock.h>
20 20
21#include <plat/omap-secure.h>
21#include <mach/omap-secure.h> 22#include <mach/omap-secure.h>
22 23
23static phys_addr_t omap_secure_memblock_base; 24static phys_addr_t omap_secure_memblock_base;
diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c
index 42cd7fb52414..d811c7790350 100644
--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -259,7 +259,7 @@ static void irq_save_context(void)
259/* 259/*
260 * Clear WakeupGen SAR backup status. 260 * Clear WakeupGen SAR backup status.
261 */ 261 */
262void irq_sar_clear(void) 262static void irq_sar_clear(void)
263{ 263{
264 u32 val; 264 u32 val;
265 val = __raw_readl(sar_base + SAR_BACKUP_STATUS_OFFSET); 265 val = __raw_readl(sar_base + SAR_BACKUP_STATUS_OFFSET);
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 7144ae651d3d..bf86f7e8f91f 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2,7 +2,7 @@
2 * omap_hwmod implementation for OMAP2/3/4 2 * omap_hwmod implementation for OMAP2/3/4
3 * 3 *
4 * Copyright (C) 2009-2011 Nokia Corporation 4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2011 Texas Instruments, Inc. 5 * Copyright (C) 2011-2012 Texas Instruments, Inc.
6 * 6 *
7 * Paul Walmsley, Benoît Cousson, Kevin Hilman 7 * Paul Walmsley, Benoît Cousson, Kevin Hilman
8 * 8 *
@@ -137,6 +137,7 @@
137#include <linux/mutex.h> 137#include <linux/mutex.h>
138#include <linux/spinlock.h> 138#include <linux/spinlock.h>
139#include <linux/slab.h> 139#include <linux/slab.h>
140#include <linux/bootmem.h>
140 141
141#include "common.h" 142#include "common.h"
142#include <plat/cpu.h> 143#include <plat/cpu.h>
@@ -159,16 +160,58 @@
159/* Name of the OMAP hwmod for the MPU */ 160/* Name of the OMAP hwmod for the MPU */
160#define MPU_INITIATOR_NAME "mpu" 161#define MPU_INITIATOR_NAME "mpu"
161 162
163/*
164 * Number of struct omap_hwmod_link records per struct
165 * omap_hwmod_ocp_if record (master->slave and slave->master)
166 */
167#define LINKS_PER_OCP_IF 2
168
162/* omap_hwmod_list contains all registered struct omap_hwmods */ 169/* omap_hwmod_list contains all registered struct omap_hwmods */
163static LIST_HEAD(omap_hwmod_list); 170static LIST_HEAD(omap_hwmod_list);
164 171
165/* mpu_oh: used to add/remove MPU initiator from sleepdep list */ 172/* mpu_oh: used to add/remove MPU initiator from sleepdep list */
166static struct omap_hwmod *mpu_oh; 173static struct omap_hwmod *mpu_oh;
167 174
175/*
176 * linkspace: ptr to a buffer that struct omap_hwmod_link records are
177 * allocated from - used to reduce the number of small memory
178 * allocations, which has a significant impact on performance
179 */
180static struct omap_hwmod_link *linkspace;
181
182/*
183 * free_ls, max_ls: array indexes into linkspace; representing the
184 * next free struct omap_hwmod_link index, and the maximum number of
185 * struct omap_hwmod_link records allocated (respectively)
186 */
187static unsigned short free_ls, max_ls, ls_supp;
168 188
169/* Private functions */ 189/* Private functions */
170 190
171/** 191/**
192 * _fetch_next_ocp_if - return the next OCP interface in a list
193 * @p: ptr to a ptr to the list_head inside the ocp_if to return
194 * @i: pointer to the index of the element pointed to by @p in the list
195 *
196 * Return a pointer to the struct omap_hwmod_ocp_if record
197 * containing the struct list_head pointed to by @p, and increment
198 * @p such that a future call to this routine will return the next
199 * record.
200 */
201static struct omap_hwmod_ocp_if *_fetch_next_ocp_if(struct list_head **p,
202 int *i)
203{
204 struct omap_hwmod_ocp_if *oi;
205
206 oi = list_entry(*p, struct omap_hwmod_link, node)->ocp_if;
207 *p = (*p)->next;
208
209 *i = *i + 1;
210
211 return oi;
212}
213
214/**
172 * _update_sysc_cache - return the module OCP_SYSCONFIG register, keep copy 215 * _update_sysc_cache - return the module OCP_SYSCONFIG register, keep copy
173 * @oh: struct omap_hwmod * 216 * @oh: struct omap_hwmod *
174 * 217 *
@@ -582,16 +625,16 @@ static int _init_main_clk(struct omap_hwmod *oh)
582 */ 625 */
583static int _init_interface_clks(struct omap_hwmod *oh) 626static int _init_interface_clks(struct omap_hwmod *oh)
584{ 627{
628 struct omap_hwmod_ocp_if *os;
629 struct list_head *p;
585 struct clk *c; 630 struct clk *c;
586 int i; 631 int i = 0;
587 int ret = 0; 632 int ret = 0;
588 633
589 if (oh->slaves_cnt == 0) 634 p = oh->slave_ports.next;
590 return 0;
591
592 for (i = 0; i < oh->slaves_cnt; i++) {
593 struct omap_hwmod_ocp_if *os = oh->slaves[i];
594 635
636 while (i < oh->slaves_cnt) {
637 os = _fetch_next_ocp_if(&p, &i);
595 if (!os->clk) 638 if (!os->clk)
596 continue; 639 continue;
597 640
@@ -643,21 +686,22 @@ static int _init_opt_clks(struct omap_hwmod *oh)
643 */ 686 */
644static int _enable_clocks(struct omap_hwmod *oh) 687static int _enable_clocks(struct omap_hwmod *oh)
645{ 688{
646 int i; 689 struct omap_hwmod_ocp_if *os;
690 struct list_head *p;
691 int i = 0;
647 692
648 pr_debug("omap_hwmod: %s: enabling clocks\n", oh->name); 693 pr_debug("omap_hwmod: %s: enabling clocks\n", oh->name);
649 694
650 if (oh->_clk) 695 if (oh->_clk)
651 clk_enable(oh->_clk); 696 clk_enable(oh->_clk);
652 697
653 if (oh->slaves_cnt > 0) { 698 p = oh->slave_ports.next;
654 for (i = 0; i < oh->slaves_cnt; i++) {
655 struct omap_hwmod_ocp_if *os = oh->slaves[i];
656 struct clk *c = os->_clk;
657 699
658 if (c && (os->flags & OCPIF_SWSUP_IDLE)) 700 while (i < oh->slaves_cnt) {
659 clk_enable(c); 701 os = _fetch_next_ocp_if(&p, &i);
660 } 702
703 if (os->_clk && (os->flags & OCPIF_SWSUP_IDLE))
704 clk_enable(os->_clk);
661 } 705 }
662 706
663 /* The opt clocks are controlled by the device driver. */ 707 /* The opt clocks are controlled by the device driver. */
@@ -673,21 +717,22 @@ static int _enable_clocks(struct omap_hwmod *oh)
673 */ 717 */
674static int _disable_clocks(struct omap_hwmod *oh) 718static int _disable_clocks(struct omap_hwmod *oh)
675{ 719{
676 int i; 720 struct omap_hwmod_ocp_if *os;
721 struct list_head *p;
722 int i = 0;
677 723
678 pr_debug("omap_hwmod: %s: disabling clocks\n", oh->name); 724 pr_debug("omap_hwmod: %s: disabling clocks\n", oh->name);
679 725
680 if (oh->_clk) 726 if (oh->_clk)
681 clk_disable(oh->_clk); 727 clk_disable(oh->_clk);
682 728
683 if (oh->slaves_cnt > 0) { 729 p = oh->slave_ports.next;
684 for (i = 0; i < oh->slaves_cnt; i++) {
685 struct omap_hwmod_ocp_if *os = oh->slaves[i];
686 struct clk *c = os->_clk;
687 730
688 if (c && (os->flags & OCPIF_SWSUP_IDLE)) 731 while (i < oh->slaves_cnt) {
689 clk_disable(c); 732 os = _fetch_next_ocp_if(&p, &i);
690 } 733
734 if (os->_clk && (os->flags & OCPIF_SWSUP_IDLE))
735 clk_disable(os->_clk);
691 } 736 }
692 737
693 /* The opt clocks are controlled by the device driver. */ 738 /* The opt clocks are controlled by the device driver. */
@@ -781,39 +826,6 @@ static int _omap4_wait_target_disable(struct omap_hwmod *oh)
781} 826}
782 827
783/** 828/**
784 * _omap4_disable_module - enable CLKCTRL modulemode on OMAP4
785 * @oh: struct omap_hwmod *
786 *
787 * Disable the PRCM module mode related to the hwmod @oh.
788 * Return EINVAL if the modulemode is not supported and 0 in case of success.
789 */
790static int _omap4_disable_module(struct omap_hwmod *oh)
791{
792 int v;
793
794 /* The module mode does not exist prior OMAP4 */
795 if (!cpu_is_omap44xx())
796 return -EINVAL;
797
798 if (!oh->clkdm || !oh->prcm.omap4.modulemode)
799 return -EINVAL;
800
801 pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
802
803 omap4_cminst_module_disable(oh->clkdm->prcm_partition,
804 oh->clkdm->cm_inst,
805 oh->clkdm->clkdm_offs,
806 oh->prcm.omap4.clkctrl_offs);
807
808 v = _omap4_wait_target_disable(oh);
809 if (v)
810 pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
811 oh->name);
812
813 return 0;
814}
815
816/**
817 * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh 829 * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh
818 * @oh: struct omap_hwmod *oh 830 * @oh: struct omap_hwmod *oh
819 * 831 *
@@ -883,59 +895,220 @@ static int _count_ocp_if_addr_spaces(struct omap_hwmod_ocp_if *os)
883} 895}
884 896
885/** 897/**
886 * _find_mpu_port_index - find hwmod OCP slave port ID intended for MPU use 898 * _get_mpu_irq_by_name - fetch MPU interrupt line number by name
887 * @oh: struct omap_hwmod * 899 * @oh: struct omap_hwmod * to operate on
900 * @name: pointer to the name of the MPU interrupt number to fetch (optional)
901 * @irq: pointer to an unsigned int to store the MPU IRQ number to
888 * 902 *
889 * Returns the array index of the OCP slave port that the MPU 903 * Retrieve a MPU hardware IRQ line number named by @name associated
890 * addresses the device on, or -EINVAL upon error or not found. 904 * with the IP block pointed to by @oh. The IRQ number will be filled
905 * into the address pointed to by @dma. When @name is non-null, the
906 * IRQ line number associated with the named entry will be returned.
907 * If @name is null, the first matching entry will be returned. Data
908 * order is not meaningful in hwmod data, so callers are strongly
909 * encouraged to use a non-null @name whenever possible to avoid
910 * unpredictable effects if hwmod data is later added that causes data
911 * ordering to change. Returns 0 upon success or a negative error
912 * code upon error.
891 */ 913 */
892static int __init _find_mpu_port_index(struct omap_hwmod *oh) 914static int _get_mpu_irq_by_name(struct omap_hwmod *oh, const char *name,
915 unsigned int *irq)
893{ 916{
894 int i; 917 int i;
895 int found = 0; 918 bool found = false;
896 919
897 if (!oh || oh->slaves_cnt == 0) 920 if (!oh->mpu_irqs)
898 return -EINVAL; 921 return -ENOENT;
899 922
900 for (i = 0; i < oh->slaves_cnt; i++) { 923 i = 0;
901 struct omap_hwmod_ocp_if *os = oh->slaves[i]; 924 while (oh->mpu_irqs[i].irq != -1) {
925 if (name == oh->mpu_irqs[i].name ||
926 !strcmp(name, oh->mpu_irqs[i].name)) {
927 found = true;
928 break;
929 }
930 i++;
931 }
902 932
903 if (os->user & OCP_USER_MPU) { 933 if (!found)
904 found = 1; 934 return -ENOENT;
935
936 *irq = oh->mpu_irqs[i].irq;
937
938 return 0;
939}
940
941/**
942 * _get_sdma_req_by_name - fetch SDMA request line ID by name
943 * @oh: struct omap_hwmod * to operate on
944 * @name: pointer to the name of the SDMA request line to fetch (optional)
945 * @dma: pointer to an unsigned int to store the request line ID to
946 *
947 * Retrieve an SDMA request line ID named by @name on the IP block
948 * pointed to by @oh. The ID will be filled into the address pointed
949 * to by @dma. When @name is non-null, the request line ID associated
950 * with the named entry will be returned. If @name is null, the first
951 * matching entry will be returned. Data order is not meaningful in
952 * hwmod data, so callers are strongly encouraged to use a non-null
953 * @name whenever possible to avoid unpredictable effects if hwmod
954 * data is later added that causes data ordering to change. Returns 0
955 * upon success or a negative error code upon error.
956 */
957static int _get_sdma_req_by_name(struct omap_hwmod *oh, const char *name,
958 unsigned int *dma)
959{
960 int i;
961 bool found = false;
962
963 if (!oh->sdma_reqs)
964 return -ENOENT;
965
966 i = 0;
967 while (oh->sdma_reqs[i].dma_req != -1) {
968 if (name == oh->sdma_reqs[i].name ||
969 !strcmp(name, oh->sdma_reqs[i].name)) {
970 found = true;
905 break; 971 break;
906 } 972 }
973 i++;
907 } 974 }
908 975
909 if (found) 976 if (!found)
910 pr_debug("omap_hwmod: %s: MPU OCP slave port ID %d\n", 977 return -ENOENT;
911 oh->name, i); 978
912 else 979 *dma = oh->sdma_reqs[i].dma_req;
913 pr_debug("omap_hwmod: %s: no MPU OCP slave port found\n",
914 oh->name);
915 980
916 return (found) ? i : -EINVAL; 981 return 0;
917} 982}
918 983
919/** 984/**
920 * _find_mpu_rt_base - find hwmod register target base addr accessible by MPU 985 * _get_addr_space_by_name - fetch address space start & end by name
921 * @oh: struct omap_hwmod * 986 * @oh: struct omap_hwmod * to operate on
987 * @name: pointer to the name of the address space to fetch (optional)
988 * @pa_start: pointer to a u32 to store the starting address to
989 * @pa_end: pointer to a u32 to store the ending address to
922 * 990 *
923 * Return the virtual address of the base of the register target of 991 * Retrieve address space start and end addresses for the IP block
924 * device @oh, or NULL on error. 992 * pointed to by @oh. The data will be filled into the addresses
993 * pointed to by @pa_start and @pa_end. When @name is non-null, the
994 * address space data associated with the named entry will be
995 * returned. If @name is null, the first matching entry will be
996 * returned. Data order is not meaningful in hwmod data, so callers
997 * are strongly encouraged to use a non-null @name whenever possible
998 * to avoid unpredictable effects if hwmod data is later added that
999 * causes data ordering to change. Returns 0 upon success or a
1000 * negative error code upon error.
925 */ 1001 */
926static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index) 1002static int _get_addr_space_by_name(struct omap_hwmod *oh, const char *name,
1003 u32 *pa_start, u32 *pa_end)
927{ 1004{
1005 int i, j;
928 struct omap_hwmod_ocp_if *os; 1006 struct omap_hwmod_ocp_if *os;
929 struct omap_hwmod_addr_space *mem; 1007 struct list_head *p = NULL;
930 int i = 0, found = 0; 1008 bool found = false;
931 void __iomem *va_start; 1009
1010 p = oh->slave_ports.next;
1011
1012 i = 0;
1013 while (i < oh->slaves_cnt) {
1014 os = _fetch_next_ocp_if(&p, &i);
1015
1016 if (!os->addr)
1017 return -ENOENT;
1018
1019 j = 0;
1020 while (os->addr[j].pa_start != os->addr[j].pa_end) {
1021 if (name == os->addr[j].name ||
1022 !strcmp(name, os->addr[j].name)) {
1023 found = true;
1024 break;
1025 }
1026 j++;
1027 }
1028
1029 if (found)
1030 break;
1031 }
1032
1033 if (!found)
1034 return -ENOENT;
1035
1036 *pa_start = os->addr[j].pa_start;
1037 *pa_end = os->addr[j].pa_end;
1038
1039 return 0;
1040}
1041
1042/**
1043 * _save_mpu_port_index - find and save the index to @oh's MPU port
1044 * @oh: struct omap_hwmod *
1045 *
1046 * Determines the array index of the OCP slave port that the MPU uses
1047 * to address the device, and saves it into the struct omap_hwmod.
1048 * Intended to be called during hwmod registration only. No return
1049 * value.
1050 */
1051static void __init _save_mpu_port_index(struct omap_hwmod *oh)
1052{
1053 struct omap_hwmod_ocp_if *os = NULL;
1054 struct list_head *p;
1055 int i = 0;
1056
1057 if (!oh)
1058 return;
932 1059
933 if (!oh || oh->slaves_cnt == 0) 1060 oh->_int_flags |= _HWMOD_NO_MPU_PORT;
1061
1062 p = oh->slave_ports.next;
1063
1064 while (i < oh->slaves_cnt) {
1065 os = _fetch_next_ocp_if(&p, &i);
1066 if (os->user & OCP_USER_MPU) {
1067 oh->_mpu_port = os;
1068 oh->_int_flags &= ~_HWMOD_NO_MPU_PORT;
1069 break;
1070 }
1071 }
1072
1073 return;
1074}
1075
1076/**
1077 * _find_mpu_rt_port - return omap_hwmod_ocp_if accessible by the MPU
1078 * @oh: struct omap_hwmod *
1079 *
1080 * Given a pointer to a struct omap_hwmod record @oh, return a pointer
1081 * to the struct omap_hwmod_ocp_if record that is used by the MPU to
1082 * communicate with the IP block. This interface need not be directly
1083 * connected to the MPU (and almost certainly is not), but is directly
1084 * connected to the IP block represented by @oh. Returns a pointer
1085 * to the struct omap_hwmod_ocp_if * upon success, or returns NULL upon
1086 * error or if there does not appear to be a path from the MPU to this
1087 * IP block.
1088 */
1089static struct omap_hwmod_ocp_if *_find_mpu_rt_port(struct omap_hwmod *oh)
1090{
1091 if (!oh || oh->_int_flags & _HWMOD_NO_MPU_PORT || oh->slaves_cnt == 0)
934 return NULL; 1092 return NULL;
935 1093
936 os = oh->slaves[index]; 1094 return oh->_mpu_port;
1095};
1096
1097/**
1098 * _find_mpu_rt_addr_space - return MPU register target address space for @oh
1099 * @oh: struct omap_hwmod *
1100 *
1101 * Returns a pointer to the struct omap_hwmod_addr_space record representing
1102 * the register target MPU address space; or returns NULL upon error.
1103 */
1104static struct omap_hwmod_addr_space * __init _find_mpu_rt_addr_space(struct omap_hwmod *oh)
1105{
1106 struct omap_hwmod_ocp_if *os;
1107 struct omap_hwmod_addr_space *mem;
1108 int found = 0, i = 0;
937 1109
938 if (!os->addr) 1110 os = _find_mpu_rt_port(oh);
1111 if (!os || !os->addr)
939 return NULL; 1112 return NULL;
940 1113
941 do { 1114 do {
@@ -944,20 +1117,7 @@ static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index)
944 found = 1; 1117 found = 1;
945 } while (!found && mem->pa_start != mem->pa_end); 1118 } while (!found && mem->pa_start != mem->pa_end);
946 1119
947 if (found) { 1120 return (found) ? mem : NULL;
948 va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start);
949 if (!va_start) {
950 pr_err("omap_hwmod: %s: Could not ioremap\n", oh->name);
951 return NULL;
952 }
953 pr_debug("omap_hwmod: %s: MPU register target at va %p\n",
954 oh->name, va_start);
955 } else {
956 pr_debug("omap_hwmod: %s: no MPU register target found\n",
957 oh->name);
958 }
959
960 return (found) ? va_start : NULL;
961} 1121}
962 1122
963/** 1123/**
@@ -1205,12 +1365,11 @@ static int _wait_target_ready(struct omap_hwmod *oh)
1205 if (!oh) 1365 if (!oh)
1206 return -EINVAL; 1366 return -EINVAL;
1207 1367
1208 if (oh->_int_flags & _HWMOD_NO_MPU_PORT) 1368 if (oh->flags & HWMOD_NO_IDLEST)
1209 return 0; 1369 return 0;
1210 1370
1211 os = oh->slaves[oh->_mpu_port_index]; 1371 os = _find_mpu_rt_port(oh);
1212 1372 if (!os)
1213 if (oh->flags & HWMOD_NO_IDLEST)
1214 return 0; 1373 return 0;
1215 1374
1216 /* XXX check module SIDLEMODE */ 1375 /* XXX check module SIDLEMODE */
@@ -1378,13 +1537,73 @@ static int _read_hardreset(struct omap_hwmod *oh, const char *name)
1378} 1537}
1379 1538
1380/** 1539/**
1540 * _are_any_hardreset_lines_asserted - return true if part of @oh is hard-reset
1541 * @oh: struct omap_hwmod *
1542 *
1543 * If any hardreset line associated with @oh is asserted, then return true.
1544 * Otherwise, if @oh has no hardreset lines associated with it, or if
1545 * no hardreset lines associated with @oh are asserted, then return false.
1546 * This function is used to avoid executing some parts of the IP block
1547 * enable/disable sequence if a hardreset line is set.
1548 */
1549static bool _are_any_hardreset_lines_asserted(struct omap_hwmod *oh)
1550{
1551 int i;
1552
1553 if (oh->rst_lines_cnt == 0)
1554 return false;
1555
1556 for (i = 0; i < oh->rst_lines_cnt; i++)
1557 if (_read_hardreset(oh, oh->rst_lines[i].name) > 0)
1558 return true;
1559
1560 return false;
1561}
1562
1563/**
1564 * _omap4_disable_module - enable CLKCTRL modulemode on OMAP4
1565 * @oh: struct omap_hwmod *
1566 *
1567 * Disable the PRCM module mode related to the hwmod @oh.
1568 * Return EINVAL if the modulemode is not supported and 0 in case of success.
1569 */
1570static int _omap4_disable_module(struct omap_hwmod *oh)
1571{
1572 int v;
1573
1574 /* The module mode does not exist prior OMAP4 */
1575 if (!cpu_is_omap44xx())
1576 return -EINVAL;
1577
1578 if (!oh->clkdm || !oh->prcm.omap4.modulemode)
1579 return -EINVAL;
1580
1581 pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
1582
1583 omap4_cminst_module_disable(oh->clkdm->prcm_partition,
1584 oh->clkdm->cm_inst,
1585 oh->clkdm->clkdm_offs,
1586 oh->prcm.omap4.clkctrl_offs);
1587
1588 if (_are_any_hardreset_lines_asserted(oh))
1589 return 0;
1590
1591 v = _omap4_wait_target_disable(oh);
1592 if (v)
1593 pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
1594 oh->name);
1595
1596 return 0;
1597}
1598
1599/**
1381 * _ocp_softreset - reset an omap_hwmod via the OCP_SYSCONFIG bit 1600 * _ocp_softreset - reset an omap_hwmod via the OCP_SYSCONFIG bit
1382 * @oh: struct omap_hwmod * 1601 * @oh: struct omap_hwmod *
1383 * 1602 *
1384 * Resets an omap_hwmod @oh via the OCP_SYSCONFIG bit. hwmod must be 1603 * Resets an omap_hwmod @oh via the OCP_SYSCONFIG bit. hwmod must be
1385 * enabled for this to work. Returns -EINVAL if the hwmod cannot be 1604 * enabled for this to work. Returns -ENOENT if the hwmod cannot be
1386 * reset this way or if the hwmod is in the wrong state, -ETIMEDOUT if 1605 * reset this way, -EINVAL if the hwmod is in the wrong state,
1387 * the module did not reset in time, or 0 upon success. 1606 * -ETIMEDOUT if the module did not reset in time, or 0 upon success.
1388 * 1607 *
1389 * In OMAP3 a specific SYSSTATUS register is used to get the reset status. 1608 * In OMAP3 a specific SYSSTATUS register is used to get the reset status.
1390 * Starting in OMAP4, some IPs do not have SYSSTATUS registers and instead 1609 * Starting in OMAP4, some IPs do not have SYSSTATUS registers and instead
@@ -1401,7 +1620,7 @@ static int _ocp_softreset(struct omap_hwmod *oh)
1401 1620
1402 if (!oh->class->sysc || 1621 if (!oh->class->sysc ||
1403 !(oh->class->sysc->sysc_flags & SYSC_HAS_SOFTRESET)) 1622 !(oh->class->sysc->sysc_flags & SYSC_HAS_SOFTRESET))
1404 return -EINVAL; 1623 return -ENOENT;
1405 1624
1406 /* clocks must be on for this operation */ 1625 /* clocks must be on for this operation */
1407 if (oh->_state != _HWMOD_STATE_ENABLED) { 1626 if (oh->_state != _HWMOD_STATE_ENABLED) {
@@ -1462,32 +1681,60 @@ dis_opt_clks:
1462 * _reset - reset an omap_hwmod 1681 * _reset - reset an omap_hwmod
1463 * @oh: struct omap_hwmod * 1682 * @oh: struct omap_hwmod *
1464 * 1683 *
1465 * Resets an omap_hwmod @oh. The default software reset mechanism for 1684 * Resets an omap_hwmod @oh. If the module has a custom reset
1466 * most OMAP IP blocks is triggered via the OCP_SYSCONFIG.SOFTRESET 1685 * function pointer defined, then call it to reset the IP block, and
1467 * bit. However, some hwmods cannot be reset via this method: some 1686 * pass along its return value to the caller. Otherwise, if the IP
1468 * are not targets and therefore have no OCP header registers to 1687 * block has an OCP_SYSCONFIG register with a SOFTRESET bitfield
1469 * access; others (like the IVA) have idiosyncratic reset sequences. 1688 * associated with it, call a function to reset the IP block via that
1470 * So for these relatively rare cases, custom reset code can be 1689 * method, and pass along the return value to the caller. Finally, if
1471 * supplied in the struct omap_hwmod_class .reset function pointer. 1690 * the IP block has some hardreset lines associated with it, assert
1472 * Passes along the return value from either _reset() or the custom 1691 * all of those, but do _not_ deassert them. (This is because driver
1473 * reset function - these must return -EINVAL if the hwmod cannot be 1692 * authors have expressed an apparent requirement to control the
1474 * reset this way or if the hwmod is in the wrong state, -ETIMEDOUT if 1693 * deassertion of the hardreset lines themselves.)
1475 * the module did not reset in time, or 0 upon success. 1694 *
1695 * The default software reset mechanism for most OMAP IP blocks is
1696 * triggered via the OCP_SYSCONFIG.SOFTRESET bit. However, some
1697 * hwmods cannot be reset via this method. Some are not targets and
1698 * therefore have no OCP header registers to access. Others (like the
1699 * IVA) have idiosyncratic reset sequences. So for these relatively
1700 * rare cases, custom reset code can be supplied in the struct
1701 * omap_hwmod_class .reset function pointer. Passes along the return
1702 * value from either _ocp_softreset() or the custom reset function -
1703 * these must return -EINVAL if the hwmod cannot be reset this way or
1704 * if the hwmod is in the wrong state, -ETIMEDOUT if the module did
1705 * not reset in time, or 0 upon success.
1476 */ 1706 */
1477static int _reset(struct omap_hwmod *oh) 1707static int _reset(struct omap_hwmod *oh)
1478{ 1708{
1479 int ret; 1709 int i, r;
1480 1710
1481 pr_debug("omap_hwmod: %s: resetting\n", oh->name); 1711 pr_debug("omap_hwmod: %s: resetting\n", oh->name);
1482 1712
1483 ret = (oh->class->reset) ? oh->class->reset(oh) : _ocp_softreset(oh); 1713 if (oh->class->reset) {
1714 r = oh->class->reset(oh);
1715 } else {
1716 if (oh->rst_lines_cnt > 0) {
1717 for (i = 0; i < oh->rst_lines_cnt; i++)
1718 _assert_hardreset(oh, oh->rst_lines[i].name);
1719 return 0;
1720 } else {
1721 r = _ocp_softreset(oh);
1722 if (r == -ENOENT)
1723 r = 0;
1724 }
1725 }
1484 1726
1727 /*
1728 * OCP_SYSCONFIG bits need to be reprogrammed after a
1729 * softreset. The _enable() function should be split to avoid
1730 * the rewrite of the OCP_SYSCONFIG register.
1731 */
1485 if (oh->class->sysc) { 1732 if (oh->class->sysc) {
1486 _update_sysc_cache(oh); 1733 _update_sysc_cache(oh);
1487 _enable_sysc(oh); 1734 _enable_sysc(oh);
1488 } 1735 }
1489 1736
1490 return ret; 1737 return r;
1491} 1738}
1492 1739
1493/** 1740/**
@@ -1506,10 +1753,9 @@ static int _enable(struct omap_hwmod *oh)
1506 pr_debug("omap_hwmod: %s: enabling\n", oh->name); 1753 pr_debug("omap_hwmod: %s: enabling\n", oh->name);
1507 1754
1508 /* 1755 /*
1509 * hwmods with HWMOD_INIT_NO_IDLE flag set are left 1756 * hwmods with HWMOD_INIT_NO_IDLE flag set are left in enabled
1510 * in enabled state at init. 1757 * state at init. Now that someone is really trying to enable
1511 * Now that someone is really trying to enable them, 1758 * them, just ensure that the hwmod mux is set.
1512 * just ensure that the hwmod mux is set.
1513 */ 1759 */
1514 if (oh->_int_flags & _HWMOD_SKIP_ENABLE) { 1760 if (oh->_int_flags & _HWMOD_SKIP_ENABLE) {
1515 /* 1761 /*
@@ -1532,15 +1778,17 @@ static int _enable(struct omap_hwmod *oh)
1532 return -EINVAL; 1778 return -EINVAL;
1533 } 1779 }
1534 1780
1535
1536 /* 1781 /*
1537 * If an IP contains only one HW reset line, then de-assert it in order 1782 * If an IP block contains HW reset lines and any of them are
1538 * to allow the module state transition. Otherwise the PRCM will return 1783 * asserted, we let integration code associated with that
1539 * Intransition status, and the init will failed. 1784 * block handle the enable. We've received very little
1785 * information on what those driver authors need, and until
1786 * detailed information is provided and the driver code is
1787 * posted to the public lists, this is probably the best we
1788 * can do.
1540 */ 1789 */
1541 if ((oh->_state == _HWMOD_STATE_INITIALIZED || 1790 if (_are_any_hardreset_lines_asserted(oh))
1542 oh->_state == _HWMOD_STATE_DISABLED) && oh->rst_lines_cnt == 1) 1791 return 0;
1543 _deassert_hardreset(oh, oh->rst_lines[0].name);
1544 1792
1545 /* Mux pins for device runtime if populated */ 1793 /* Mux pins for device runtime if populated */
1546 if (oh->mux && (!oh->mux->enabled || 1794 if (oh->mux && (!oh->mux->enabled ||
@@ -1615,6 +1863,9 @@ static int _idle(struct omap_hwmod *oh)
1615 return -EINVAL; 1863 return -EINVAL;
1616 } 1864 }
1617 1865
1866 if (_are_any_hardreset_lines_asserted(oh))
1867 return 0;
1868
1618 if (oh->class->sysc) 1869 if (oh->class->sysc)
1619 _idle_sysc(oh); 1870 _idle_sysc(oh);
1620 _del_initiator_dep(oh, mpu_oh); 1871 _del_initiator_dep(oh, mpu_oh);
@@ -1687,7 +1938,7 @@ int omap_hwmod_set_ocp_autoidle(struct omap_hwmod *oh, u8 autoidle)
1687 */ 1938 */
1688static int _shutdown(struct omap_hwmod *oh) 1939static int _shutdown(struct omap_hwmod *oh)
1689{ 1940{
1690 int ret; 1941 int ret, i;
1691 u8 prev_state; 1942 u8 prev_state;
1692 1943
1693 if (oh->_state != _HWMOD_STATE_IDLE && 1944 if (oh->_state != _HWMOD_STATE_IDLE &&
@@ -1697,6 +1948,9 @@ static int _shutdown(struct omap_hwmod *oh)
1697 return -EINVAL; 1948 return -EINVAL;
1698 } 1949 }
1699 1950
1951 if (_are_any_hardreset_lines_asserted(oh))
1952 return 0;
1953
1700 pr_debug("omap_hwmod: %s: disabling\n", oh->name); 1954 pr_debug("omap_hwmod: %s: disabling\n", oh->name);
1701 1955
1702 if (oh->class->pre_shutdown) { 1956 if (oh->class->pre_shutdown) {
@@ -1728,12 +1982,8 @@ static int _shutdown(struct omap_hwmod *oh)
1728 } 1982 }
1729 /* XXX Should this code also force-disable the optional clocks? */ 1983 /* XXX Should this code also force-disable the optional clocks? */
1730 1984
1731 /* 1985 for (i = 0; i < oh->rst_lines_cnt; i++)
1732 * If an IP contains only one HW reset line, then assert it 1986 _assert_hardreset(oh, oh->rst_lines[i].name);
1733 * after disabling the clocks and before shutting down the IP.
1734 */
1735 if (oh->rst_lines_cnt == 1)
1736 _assert_hardreset(oh, oh->rst_lines[0].name);
1737 1987
1738 /* Mux pins to safe mode or use populated off mode values */ 1988 /* Mux pins to safe mode or use populated off mode values */
1739 if (oh->mux) 1989 if (oh->mux)
@@ -1745,59 +1995,186 @@ static int _shutdown(struct omap_hwmod *oh)
1745} 1995}
1746 1996
1747/** 1997/**
1748 * _setup - do initial configuration of omap_hwmod 1998 * _init_mpu_rt_base - populate the virtual address for a hwmod
1749 * @oh: struct omap_hwmod * 1999 * @oh: struct omap_hwmod * to locate the virtual address
1750 * 2000 *
1751 * Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh 2001 * Cache the virtual address used by the MPU to access this IP block's
1752 * OCP_SYSCONFIG register. Returns 0. 2002 * registers. This address is needed early so the OCP registers that
2003 * are part of the device's address space can be ioremapped properly.
2004 * No return value.
1753 */ 2005 */
1754static int _setup(struct omap_hwmod *oh, void *data) 2006static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
1755{ 2007{
1756 int i, r; 2008 struct omap_hwmod_addr_space *mem;
1757 u8 postsetup_state; 2009 void __iomem *va_start;
2010
2011 if (!oh)
2012 return;
2013
2014 _save_mpu_port_index(oh);
1758 2015
1759 if (oh->_state != _HWMOD_STATE_CLKS_INITED) 2016 if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
2017 return;
2018
2019 mem = _find_mpu_rt_addr_space(oh);
2020 if (!mem) {
2021 pr_debug("omap_hwmod: %s: no MPU register target found\n",
2022 oh->name);
2023 return;
2024 }
2025
2026 va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start);
2027 if (!va_start) {
2028 pr_err("omap_hwmod: %s: Could not ioremap\n", oh->name);
2029 return;
2030 }
2031
2032 pr_debug("omap_hwmod: %s: MPU register target at va %p\n",
2033 oh->name, va_start);
2034
2035 oh->_mpu_rt_va = va_start;
2036}
2037
2038/**
2039 * _init - initialize internal data for the hwmod @oh
2040 * @oh: struct omap_hwmod *
2041 * @n: (unused)
2042 *
2043 * Look up the clocks and the address space used by the MPU to access
2044 * registers belonging to the hwmod @oh. @oh must already be
2045 * registered at this point. This is the first of two phases for
2046 * hwmod initialization. Code called here does not touch any hardware
2047 * registers, it simply prepares internal data structures. Returns 0
2048 * upon success or if the hwmod isn't registered, or -EINVAL upon
2049 * failure.
2050 */
2051static int __init _init(struct omap_hwmod *oh, void *data)
2052{
2053 int r;
2054
2055 if (oh->_state != _HWMOD_STATE_REGISTERED)
1760 return 0; 2056 return 0;
1761 2057
1762 /* Set iclk autoidle mode */ 2058 _init_mpu_rt_base(oh, NULL);
1763 if (oh->slaves_cnt > 0) {
1764 for (i = 0; i < oh->slaves_cnt; i++) {
1765 struct omap_hwmod_ocp_if *os = oh->slaves[i];
1766 struct clk *c = os->_clk;
1767 2059
1768 if (!c) 2060 r = _init_clocks(oh, NULL);
1769 continue; 2061 if (IS_ERR_VALUE(r)) {
2062 WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh->name);
2063 return -EINVAL;
2064 }
1770 2065
1771 if (os->flags & OCPIF_SWSUP_IDLE) { 2066 oh->_state = _HWMOD_STATE_INITIALIZED;
1772 /* XXX omap_iclk_deny_idle(c); */ 2067
1773 } else { 2068 return 0;
1774 /* XXX omap_iclk_allow_idle(c); */ 2069}
1775 clk_enable(c); 2070
1776 } 2071/**
2072 * _setup_iclk_autoidle - configure an IP block's interface clocks
2073 * @oh: struct omap_hwmod *
2074 *
2075 * Set up the module's interface clocks. XXX This function is still mostly
2076 * a stub; implementing this properly requires iclk autoidle usecounting in
2077 * the clock code. No return value.
2078 */
2079static void __init _setup_iclk_autoidle(struct omap_hwmod *oh)
2080{
2081 struct omap_hwmod_ocp_if *os;
2082 struct list_head *p;
2083 int i = 0;
2084 if (oh->_state != _HWMOD_STATE_INITIALIZED)
2085 return;
2086
2087 p = oh->slave_ports.next;
2088
2089 while (i < oh->slaves_cnt) {
2090 os = _fetch_next_ocp_if(&p, &i);
2091 if (!os->_clk)
2092 continue;
2093
2094 if (os->flags & OCPIF_SWSUP_IDLE) {
2095 /* XXX omap_iclk_deny_idle(c); */
2096 } else {
2097 /* XXX omap_iclk_allow_idle(c); */
2098 clk_enable(os->_clk);
1777 } 2099 }
1778 } 2100 }
1779 2101
1780 oh->_state = _HWMOD_STATE_INITIALIZED; 2102 return;
2103}
1781 2104
1782 /* 2105/**
1783 * In the case of hwmod with hardreset that should not be 2106 * _setup_reset - reset an IP block during the setup process
1784 * de-assert at boot time, we have to keep the module 2107 * @oh: struct omap_hwmod *
1785 * initialized, because we cannot enable it properly with the 2108 *
1786 * reset asserted. Exit without warning because that behavior is 2109 * Reset the IP block corresponding to the hwmod @oh during the setup
1787 * expected. 2110 * process. The IP block is first enabled so it can be successfully
1788 */ 2111 * reset. Returns 0 upon success or a negative error code upon
1789 if ((oh->flags & HWMOD_INIT_NO_RESET) && oh->rst_lines_cnt == 1) 2112 * failure.
1790 return 0; 2113 */
2114static int __init _setup_reset(struct omap_hwmod *oh)
2115{
2116 int r;
1791 2117
1792 r = _enable(oh); 2118 if (oh->_state != _HWMOD_STATE_INITIALIZED)
1793 if (r) { 2119 return -EINVAL;
1794 pr_warning("omap_hwmod: %s: cannot be enabled (%d)\n", 2120
1795 oh->name, oh->_state); 2121 if (oh->rst_lines_cnt == 0) {
1796 return 0; 2122 r = _enable(oh);
2123 if (r) {
2124 pr_warning("omap_hwmod: %s: cannot be enabled for reset (%d)\n",
2125 oh->name, oh->_state);
2126 return -EINVAL;
2127 }
1797 } 2128 }
1798 2129
1799 if (!(oh->flags & HWMOD_INIT_NO_RESET)) 2130 if (!(oh->flags & HWMOD_INIT_NO_RESET))
1800 _reset(oh); 2131 r = _reset(oh);
2132
2133 return r;
2134}
2135
2136/**
2137 * _setup_postsetup - transition to the appropriate state after _setup
2138 * @oh: struct omap_hwmod *
2139 *
2140 * Place an IP block represented by @oh into a "post-setup" state --
2141 * either IDLE, ENABLED, or DISABLED. ("post-setup" simply means that
2142 * this function is called at the end of _setup().) The postsetup
2143 * state for an IP block can be changed by calling
2144 * omap_hwmod_enter_postsetup_state() early in the boot process,
2145 * before one of the omap_hwmod_setup*() functions are called for the
2146 * IP block.
2147 *
2148 * The IP block stays in this state until a PM runtime-based driver is
2149 * loaded for that IP block. A post-setup state of IDLE is
2150 * appropriate for almost all IP blocks with runtime PM-enabled
2151 * drivers, since those drivers are able to enable the IP block. A
2152 * post-setup state of ENABLED is appropriate for kernels with PM
2153 * runtime disabled. The DISABLED state is appropriate for unusual IP
2154 * blocks such as the MPU WDTIMER on kernels without WDTIMER drivers
2155 * included, since the WDTIMER starts running on reset and will reset
2156 * the MPU if left active.
2157 *
2158 * This post-setup mechanism is deprecated. Once all of the OMAP
2159 * drivers have been converted to use PM runtime, and all of the IP
2160 * block data and interconnect data is available to the hwmod code, it
2161 * should be possible to replace this mechanism with a "lazy reset"
2162 * arrangement. In a "lazy reset" setup, each IP block is enabled
2163 * when the driver first probes, then all remaining IP blocks without
2164 * drivers are either shut down or enabled after the drivers have
2165 * loaded. However, this cannot take place until the above
2166 * preconditions have been met, since otherwise the late reset code
2167 * has no way of knowing which IP blocks are in use by drivers, and
2168 * which ones are unused.
2169 *
2170 * No return value.
2171 */
2172static void __init _setup_postsetup(struct omap_hwmod *oh)
2173{
2174 u8 postsetup_state;
2175
2176 if (oh->rst_lines_cnt > 0)
2177 return;
1801 2178
1802 postsetup_state = oh->_postsetup_state; 2179 postsetup_state = oh->_postsetup_state;
1803 if (postsetup_state == _HWMOD_STATE_UNKNOWN) 2180 if (postsetup_state == _HWMOD_STATE_UNKNOWN)
@@ -1821,6 +2198,35 @@ static int _setup(struct omap_hwmod *oh, void *data)
1821 WARN(1, "hwmod: %s: unknown postsetup state %d! defaulting to enabled\n", 2198 WARN(1, "hwmod: %s: unknown postsetup state %d! defaulting to enabled\n",
1822 oh->name, postsetup_state); 2199 oh->name, postsetup_state);
1823 2200
2201 return;
2202}
2203
2204/**
2205 * _setup - prepare IP block hardware for use
2206 * @oh: struct omap_hwmod *
2207 * @n: (unused, pass NULL)
2208 *
2209 * Configure the IP block represented by @oh. This may include
2210 * enabling the IP block, resetting it, and placing it into a
2211 * post-setup state, depending on the type of IP block and applicable
2212 * flags. IP blocks are reset to prevent any previous configuration
2213 * by the bootloader or previous operating system from interfering
2214 * with power management or other parts of the system. The reset can
2215 * be avoided; see omap_hwmod_no_setup_reset(). This is the second of
2216 * two phases for hwmod initialization. Code called here generally
2217 * affects the IP block hardware, or system integration hardware
2218 * associated with the IP block. Returns 0.
2219 */
2220static int __init _setup(struct omap_hwmod *oh, void *data)
2221{
2222 if (oh->_state != _HWMOD_STATE_INITIALIZED)
2223 return 0;
2224
2225 _setup_iclk_autoidle(oh);
2226
2227 if (!_setup_reset(oh))
2228 _setup_postsetup(oh);
2229
1824 return 0; 2230 return 0;
1825} 2231}
1826 2232
@@ -1843,8 +2249,6 @@ static int _setup(struct omap_hwmod *oh, void *data)
1843 */ 2249 */
1844static int __init _register(struct omap_hwmod *oh) 2250static int __init _register(struct omap_hwmod *oh)
1845{ 2251{
1846 int ms_id;
1847
1848 if (!oh || !oh->name || !oh->class || !oh->class->name || 2252 if (!oh || !oh->name || !oh->class || !oh->class->name ||
1849 (oh->_state != _HWMOD_STATE_UNKNOWN)) 2253 (oh->_state != _HWMOD_STATE_UNKNOWN))
1850 return -EINVAL; 2254 return -EINVAL;
@@ -1854,14 +2258,10 @@ static int __init _register(struct omap_hwmod *oh)
1854 if (_lookup(oh->name)) 2258 if (_lookup(oh->name))
1855 return -EEXIST; 2259 return -EEXIST;
1856 2260
1857 ms_id = _find_mpu_port_index(oh);
1858 if (!IS_ERR_VALUE(ms_id))
1859 oh->_mpu_port_index = ms_id;
1860 else
1861 oh->_int_flags |= _HWMOD_NO_MPU_PORT;
1862
1863 list_add_tail(&oh->node, &omap_hwmod_list); 2261 list_add_tail(&oh->node, &omap_hwmod_list);
1864 2262
2263 INIT_LIST_HEAD(&oh->master_ports);
2264 INIT_LIST_HEAD(&oh->slave_ports);
1865 spin_lock_init(&oh->_lock); 2265 spin_lock_init(&oh->_lock);
1866 2266
1867 oh->_state = _HWMOD_STATE_REGISTERED; 2267 oh->_state = _HWMOD_STATE_REGISTERED;
@@ -1876,6 +2276,160 @@ static int __init _register(struct omap_hwmod *oh)
1876 return 0; 2276 return 0;
1877} 2277}
1878 2278
2279/**
2280 * _alloc_links - return allocated memory for hwmod links
2281 * @ml: pointer to a struct omap_hwmod_link * for the master link
2282 * @sl: pointer to a struct omap_hwmod_link * for the slave link
2283 *
2284 * Return pointers to two struct omap_hwmod_link records, via the
2285 * addresses pointed to by @ml and @sl. Will first attempt to return
2286 * memory allocated as part of a large initial block, but if that has
2287 * been exhausted, will allocate memory itself. Since ideally this
2288 * second allocation path will never occur, the number of these
2289 * 'supplemental' allocations will be logged when debugging is
2290 * enabled. Returns 0.
2291 */
2292static int __init _alloc_links(struct omap_hwmod_link **ml,
2293 struct omap_hwmod_link **sl)
2294{
2295 unsigned int sz;
2296
2297 if ((free_ls + LINKS_PER_OCP_IF) <= max_ls) {
2298 *ml = &linkspace[free_ls++];
2299 *sl = &linkspace[free_ls++];
2300 return 0;
2301 }
2302
2303 sz = sizeof(struct omap_hwmod_link) * LINKS_PER_OCP_IF;
2304
2305 *sl = NULL;
2306 *ml = alloc_bootmem(sz);
2307
2308 memset(*ml, 0, sz);
2309
2310 *sl = (void *)(*ml) + sizeof(struct omap_hwmod_link);
2311
2312 ls_supp++;
2313 pr_debug("omap_hwmod: supplemental link allocations needed: %d\n",
2314 ls_supp * LINKS_PER_OCP_IF);
2315
2316 return 0;
2317};
2318
2319/**
2320 * _add_link - add an interconnect between two IP blocks
2321 * @oi: pointer to a struct omap_hwmod_ocp_if record
2322 *
2323 * Add struct omap_hwmod_link records connecting the master IP block
2324 * specified in @oi->master to @oi, and connecting the slave IP block
2325 * specified in @oi->slave to @oi. This code is assumed to run before
2326 * preemption or SMP has been enabled, thus avoiding the need for
2327 * locking in this code. Changes to this assumption will require
2328 * additional locking. Returns 0.
2329 */
2330static int __init _add_link(struct omap_hwmod_ocp_if *oi)
2331{
2332 struct omap_hwmod_link *ml, *sl;
2333
2334 pr_debug("omap_hwmod: %s -> %s: adding link\n", oi->master->name,
2335 oi->slave->name);
2336
2337 _alloc_links(&ml, &sl);
2338
2339 ml->ocp_if = oi;
2340 INIT_LIST_HEAD(&ml->node);
2341 list_add(&ml->node, &oi->master->master_ports);
2342 oi->master->masters_cnt++;
2343
2344 sl->ocp_if = oi;
2345 INIT_LIST_HEAD(&sl->node);
2346 list_add(&sl->node, &oi->slave->slave_ports);
2347 oi->slave->slaves_cnt++;
2348
2349 return 0;
2350}
2351
2352/**
2353 * _register_link - register a struct omap_hwmod_ocp_if
2354 * @oi: struct omap_hwmod_ocp_if *
2355 *
2356 * Registers the omap_hwmod_ocp_if record @oi. Returns -EEXIST if it
2357 * has already been registered; -EINVAL if @oi is NULL or if the
2358 * record pointed to by @oi is missing required fields; or 0 upon
2359 * success.
2360 *
2361 * XXX The data should be copied into bootmem, so the original data
2362 * should be marked __initdata and freed after init. This would allow
2363 * unneeded omap_hwmods to be freed on multi-OMAP configurations.
2364 */
2365static int __init _register_link(struct omap_hwmod_ocp_if *oi)
2366{
2367 if (!oi || !oi->master || !oi->slave || !oi->user)
2368 return -EINVAL;
2369
2370 if (oi->_int_flags & _OCPIF_INT_FLAGS_REGISTERED)
2371 return -EEXIST;
2372
2373 pr_debug("omap_hwmod: registering link from %s to %s\n",
2374 oi->master->name, oi->slave->name);
2375
2376 /*
2377 * Register the connected hwmods, if they haven't been
2378 * registered already
2379 */
2380 if (oi->master->_state != _HWMOD_STATE_REGISTERED)
2381 _register(oi->master);
2382
2383 if (oi->slave->_state != _HWMOD_STATE_REGISTERED)
2384 _register(oi->slave);
2385
2386 _add_link(oi);
2387
2388 oi->_int_flags |= _OCPIF_INT_FLAGS_REGISTERED;
2389
2390 return 0;
2391}
2392
2393/**
2394 * _alloc_linkspace - allocate large block of hwmod links
2395 * @ois: pointer to an array of struct omap_hwmod_ocp_if records to count
2396 *
2397 * Allocate a large block of struct omap_hwmod_link records. This
2398 * improves boot time significantly by avoiding the need to allocate
2399 * individual records one by one. If the number of records to
2400 * allocate in the block hasn't been manually specified, this function
2401 * will count the number of struct omap_hwmod_ocp_if records in @ois
2402 * and use that to determine the allocation size. For SoC families
2403 * that require multiple list registrations, such as OMAP3xxx, this
2404 * estimation process isn't optimal, so manual estimation is advised
2405 * in those cases. Returns -EEXIST if the allocation has already occurred
2406 * or 0 upon success.
2407 */
2408static int __init _alloc_linkspace(struct omap_hwmod_ocp_if **ois)
2409{
2410 unsigned int i = 0;
2411 unsigned int sz;
2412
2413 if (linkspace) {
2414 WARN(1, "linkspace already allocated\n");
2415 return -EEXIST;
2416 }
2417
2418 if (max_ls == 0)
2419 while (ois[i++])
2420 max_ls += LINKS_PER_OCP_IF;
2421
2422 sz = sizeof(struct omap_hwmod_link) * max_ls;
2423
2424 pr_debug("omap_hwmod: %s: allocating %d byte linkspace (%d links)\n",
2425 __func__, sz, max_ls);
2426
2427 linkspace = alloc_bootmem(sz);
2428
2429 memset(linkspace, 0, sz);
2430
2431 return 0;
2432}
1879 2433
1880/* Public functions */ 2434/* Public functions */
1881 2435
@@ -2004,120 +2558,101 @@ int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data),
2004} 2558}
2005 2559
2006/** 2560/**
2007 * omap_hwmod_register - register an array of hwmods 2561 * omap_hwmod_register_links - register an array of hwmod links
2008 * @ohs: pointer to an array of omap_hwmods to register 2562 * @ois: pointer to an array of omap_hwmod_ocp_if to register
2009 * 2563 *
2010 * Intended to be called early in boot before the clock framework is 2564 * Intended to be called early in boot before the clock framework is
2011 * initialized. If @ohs is not null, will register all omap_hwmods 2565 * initialized. If @ois is not null, will register all omap_hwmods
2012 * listed in @ohs that are valid for this chip. Returns 0. 2566 * listed in @ois that are valid for this chip. Returns 0.
2013 */ 2567 */
2014int __init omap_hwmod_register(struct omap_hwmod **ohs) 2568int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
2015{ 2569{
2016 int r, i; 2570 int r, i;
2017 2571
2018 if (!ohs) 2572 if (!ois)
2019 return 0; 2573 return 0;
2020 2574
2575 if (!linkspace) {
2576 if (_alloc_linkspace(ois)) {
2577 pr_err("omap_hwmod: could not allocate link space\n");
2578 return -ENOMEM;
2579 }
2580 }
2581
2021 i = 0; 2582 i = 0;
2022 do { 2583 do {
2023 r = _register(ohs[i]); 2584 r = _register_link(ois[i]);
2024 WARN(r, "omap_hwmod: %s: _register returned %d\n", ohs[i]->name, 2585 WARN(r && r != -EEXIST,
2025 r); 2586 "omap_hwmod: _register_link(%s -> %s) returned %d\n",
2026 } while (ohs[++i]); 2587 ois[i]->master->name, ois[i]->slave->name, r);
2588 } while (ois[++i]);
2027 2589
2028 return 0; 2590 return 0;
2029} 2591}
2030 2592
2031/* 2593/**
2032 * _populate_mpu_rt_base - populate the virtual address for a hwmod 2594 * _ensure_mpu_hwmod_is_setup - ensure the MPU SS hwmod is init'ed and set up
2595 * @oh: pointer to the hwmod currently being set up (usually not the MPU)
2033 * 2596 *
2034 * Must be called only from omap_hwmod_setup_*() so ioremap works properly. 2597 * If the hwmod data corresponding to the MPU subsystem IP block
2035 * Assumes the caller takes care of locking if needed. 2598 * hasn't been initialized and set up yet, do so now. This must be
2599 * done first since sleep dependencies may be added from other hwmods
2600 * to the MPU. Intended to be called only by omap_hwmod_setup*(). No
2601 * return value.
2036 */ 2602 */
2037static int __init _populate_mpu_rt_base(struct omap_hwmod *oh, void *data) 2603static void __init _ensure_mpu_hwmod_is_setup(struct omap_hwmod *oh)
2038{ 2604{
2039 if (oh->_state != _HWMOD_STATE_REGISTERED) 2605 if (!mpu_oh || mpu_oh->_state == _HWMOD_STATE_UNKNOWN)
2040 return 0; 2606 pr_err("omap_hwmod: %s: MPU initiator hwmod %s not yet registered\n",
2041 2607 __func__, MPU_INITIATOR_NAME);
2042 if (oh->_int_flags & _HWMOD_NO_MPU_PORT) 2608 else if (mpu_oh->_state == _HWMOD_STATE_REGISTERED && oh != mpu_oh)
2043 return 0; 2609 omap_hwmod_setup_one(MPU_INITIATOR_NAME);
2044
2045 oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index);
2046
2047 return 0;
2048} 2610}
2049 2611
2050/** 2612/**
2051 * omap_hwmod_setup_one - set up a single hwmod 2613 * omap_hwmod_setup_one - set up a single hwmod
2052 * @oh_name: const char * name of the already-registered hwmod to set up 2614 * @oh_name: const char * name of the already-registered hwmod to set up
2053 * 2615 *
2054 * Must be called after omap2_clk_init(). Resolves the struct clk 2616 * Initialize and set up a single hwmod. Intended to be used for a
2055 * names to struct clk pointers for each registered omap_hwmod. Also 2617 * small number of early devices, such as the timer IP blocks used for
2056 * calls _setup() on each hwmod. Returns -EINVAL upon error or 0 upon 2618 * the scheduler clock. Must be called after omap2_clk_init().
2057 * success. 2619 * Resolves the struct clk names to struct clk pointers for each
2620 * registered omap_hwmod. Also calls _setup() on each hwmod. Returns
2621 * -EINVAL upon error or 0 upon success.
2058 */ 2622 */
2059int __init omap_hwmod_setup_one(const char *oh_name) 2623int __init omap_hwmod_setup_one(const char *oh_name)
2060{ 2624{
2061 struct omap_hwmod *oh; 2625 struct omap_hwmod *oh;
2062 int r;
2063 2626
2064 pr_debug("omap_hwmod: %s: %s\n", oh_name, __func__); 2627 pr_debug("omap_hwmod: %s: %s\n", oh_name, __func__);
2065 2628
2066 if (!mpu_oh) {
2067 pr_err("omap_hwmod: %s: cannot setup_one: MPU initiator hwmod %s not yet registered\n",
2068 oh_name, MPU_INITIATOR_NAME);
2069 return -EINVAL;
2070 }
2071
2072 oh = _lookup(oh_name); 2629 oh = _lookup(oh_name);
2073 if (!oh) { 2630 if (!oh) {
2074 WARN(1, "omap_hwmod: %s: hwmod not yet registered\n", oh_name); 2631 WARN(1, "omap_hwmod: %s: hwmod not yet registered\n", oh_name);
2075 return -EINVAL; 2632 return -EINVAL;
2076 } 2633 }
2077 2634
2078 if (mpu_oh->_state == _HWMOD_STATE_REGISTERED && oh != mpu_oh) 2635 _ensure_mpu_hwmod_is_setup(oh);
2079 omap_hwmod_setup_one(MPU_INITIATOR_NAME);
2080
2081 r = _populate_mpu_rt_base(oh, NULL);
2082 if (IS_ERR_VALUE(r)) {
2083 WARN(1, "omap_hwmod: %s: couldn't set mpu_rt_base\n", oh_name);
2084 return -EINVAL;
2085 }
2086
2087 r = _init_clocks(oh, NULL);
2088 if (IS_ERR_VALUE(r)) {
2089 WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh_name);
2090 return -EINVAL;
2091 }
2092 2636
2637 _init(oh, NULL);
2093 _setup(oh, NULL); 2638 _setup(oh, NULL);
2094 2639
2095 return 0; 2640 return 0;
2096} 2641}
2097 2642
2098/** 2643/**
2099 * omap_hwmod_setup - do some post-clock framework initialization 2644 * omap_hwmod_setup_all - set up all registered IP blocks
2100 * 2645 *
2101 * Must be called after omap2_clk_init(). Resolves the struct clk names 2646 * Initialize and set up all IP blocks registered with the hwmod code.
2102 * to struct clk pointers for each registered omap_hwmod. Also calls 2647 * Must be called after omap2_clk_init(). Resolves the struct clk
2103 * _setup() on each hwmod. Returns 0 upon success. 2648 * names to struct clk pointers for each registered omap_hwmod. Also
2649 * calls _setup() on each hwmod. Returns 0 upon success.
2104 */ 2650 */
2105static int __init omap_hwmod_setup_all(void) 2651static int __init omap_hwmod_setup_all(void)
2106{ 2652{
2107 int r; 2653 _ensure_mpu_hwmod_is_setup(NULL);
2108
2109 if (!mpu_oh) {
2110 pr_err("omap_hwmod: %s: MPU initiator hwmod %s not yet registered\n",
2111 __func__, MPU_INITIATOR_NAME);
2112 return -EINVAL;
2113 }
2114
2115 r = omap_hwmod_for_each(_populate_mpu_rt_base, NULL);
2116
2117 r = omap_hwmod_for_each(_init_clocks, NULL);
2118 WARN(IS_ERR_VALUE(r),
2119 "omap_hwmod: %s: _init_clocks failed\n", __func__);
2120 2654
2655 omap_hwmod_for_each(_init, NULL);
2121 omap_hwmod_for_each(_setup, NULL); 2656 omap_hwmod_for_each(_setup, NULL);
2122 2657
2123 return 0; 2658 return 0;
@@ -2274,6 +2809,10 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
2274 return r; 2809 return r;
2275} 2810}
2276 2811
2812/*
2813 * IP block data retrieval functions
2814 */
2815
2277/** 2816/**
2278 * omap_hwmod_count_resources - count number of struct resources needed by hwmod 2817 * omap_hwmod_count_resources - count number of struct resources needed by hwmod
2279 * @oh: struct omap_hwmod * 2818 * @oh: struct omap_hwmod *
@@ -2292,12 +2831,19 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
2292 */ 2831 */
2293int omap_hwmod_count_resources(struct omap_hwmod *oh) 2832int omap_hwmod_count_resources(struct omap_hwmod *oh)
2294{ 2833{
2295 int ret, i; 2834 struct omap_hwmod_ocp_if *os;
2835 struct list_head *p;
2836 int ret;
2837 int i = 0;
2296 2838
2297 ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh); 2839 ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh);
2298 2840
2299 for (i = 0; i < oh->slaves_cnt; i++) 2841 p = oh->slave_ports.next;
2300 ret += _count_ocp_if_addr_spaces(oh->slaves[i]); 2842
2843 while (i < oh->slaves_cnt) {
2844 os = _fetch_next_ocp_if(&p, &i);
2845 ret += _count_ocp_if_addr_spaces(os);
2846 }
2301 2847
2302 return ret; 2848 return ret;
2303} 2849}
@@ -2314,7 +2860,9 @@ int omap_hwmod_count_resources(struct omap_hwmod *oh)
2314 */ 2860 */
2315int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) 2861int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
2316{ 2862{
2317 int i, j, mpu_irqs_cnt, sdma_reqs_cnt; 2863 struct omap_hwmod_ocp_if *os;
2864 struct list_head *p;
2865 int i, j, mpu_irqs_cnt, sdma_reqs_cnt, addr_cnt;
2318 int r = 0; 2866 int r = 0;
2319 2867
2320 /* For each IRQ, DMA, memory area, fill in array.*/ 2868 /* For each IRQ, DMA, memory area, fill in array.*/
@@ -2337,11 +2885,11 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
2337 r++; 2885 r++;
2338 } 2886 }
2339 2887
2340 for (i = 0; i < oh->slaves_cnt; i++) { 2888 p = oh->slave_ports.next;
2341 struct omap_hwmod_ocp_if *os;
2342 int addr_cnt;
2343 2889
2344 os = oh->slaves[i]; 2890 i = 0;
2891 while (i < oh->slaves_cnt) {
2892 os = _fetch_next_ocp_if(&p, &i);
2345 addr_cnt = _count_ocp_if_addr_spaces(os); 2893 addr_cnt = _count_ocp_if_addr_spaces(os);
2346 2894
2347 for (j = 0; j < addr_cnt; j++) { 2895 for (j = 0; j < addr_cnt; j++) {
@@ -2357,6 +2905,69 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
2357} 2905}
2358 2906
2359/** 2907/**
2908 * omap_hwmod_get_resource_byname - fetch IP block integration data by name
2909 * @oh: struct omap_hwmod * to operate on
2910 * @type: one of the IORESOURCE_* constants from include/linux/ioport.h
2911 * @name: pointer to the name of the data to fetch (optional)
2912 * @rsrc: pointer to a struct resource, allocated by the caller
2913 *
2914 * Retrieve MPU IRQ, SDMA request line, or address space start/end
2915 * data for the IP block pointed to by @oh. The data will be filled
2916 * into a struct resource record pointed to by @rsrc. The struct
2917 * resource must be allocated by the caller. When @name is non-null,
2918 * the data associated with the matching entry in the IRQ/SDMA/address
2919 * space hwmod data arrays will be returned. If @name is null, the
2920 * first array entry will be returned. Data order is not meaningful
2921 * in hwmod data, so callers are strongly encouraged to use a non-null
2922 * @name whenever possible to avoid unpredictable effects if hwmod
2923 * data is later added that causes data ordering to change. This
2924 * function is only intended for use by OMAP core code. Device
2925 * drivers should not call this function - the appropriate bus-related
2926 * data accessor functions should be used instead. Returns 0 upon
2927 * success or a negative error code upon error.
2928 */
2929int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
2930 const char *name, struct resource *rsrc)
2931{
2932 int r;
2933 unsigned int irq, dma;
2934 u32 pa_start, pa_end;
2935
2936 if (!oh || !rsrc)
2937 return -EINVAL;
2938
2939 if (type == IORESOURCE_IRQ) {
2940 r = _get_mpu_irq_by_name(oh, name, &irq);
2941 if (r)
2942 return r;
2943
2944 rsrc->start = irq;
2945 rsrc->end = irq;
2946 } else if (type == IORESOURCE_DMA) {
2947 r = _get_sdma_req_by_name(oh, name, &dma);
2948 if (r)
2949 return r;
2950
2951 rsrc->start = dma;
2952 rsrc->end = dma;
2953 } else if (type == IORESOURCE_MEM) {
2954 r = _get_addr_space_by_name(oh, name, &pa_start, &pa_end);
2955 if (r)
2956 return r;
2957
2958 rsrc->start = pa_start;
2959 rsrc->end = pa_end;
2960 } else {
2961 return -EINVAL;
2962 }
2963
2964 rsrc->flags = type;
2965 rsrc->name = name;
2966
2967 return 0;
2968}
2969
2970/**
2360 * omap_hwmod_get_pwrdm - return pointer to this module's main powerdomain 2971 * omap_hwmod_get_pwrdm - return pointer to this module's main powerdomain
2361 * @oh: struct omap_hwmod * 2972 * @oh: struct omap_hwmod *
2362 * 2973 *
@@ -2370,6 +2981,7 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
2370struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh) 2981struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh)
2371{ 2982{
2372 struct clk *c; 2983 struct clk *c;
2984 struct omap_hwmod_ocp_if *oi;
2373 2985
2374 if (!oh) 2986 if (!oh)
2375 return NULL; 2987 return NULL;
@@ -2377,9 +2989,10 @@ struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh)
2377 if (oh->_clk) { 2989 if (oh->_clk) {
2378 c = oh->_clk; 2990 c = oh->_clk;
2379 } else { 2991 } else {
2380 if (oh->_int_flags & _HWMOD_NO_MPU_PORT) 2992 oi = _find_mpu_rt_port(oh);
2993 if (!oi)
2381 return NULL; 2994 return NULL;
2382 c = oh->slaves[oh->_mpu_port_index]->_clk; 2995 c = oi->_clk;
2383 } 2996 }
2384 2997
2385 if (!c->clkdm) 2998 if (!c->clkdm)
@@ -2653,10 +3266,10 @@ int omap_hwmod_for_each_by_class(const char *classname,
2653 * @state: state that _setup() should leave the hwmod in 3266 * @state: state that _setup() should leave the hwmod in
2654 * 3267 *
2655 * Sets the hwmod state that @oh will enter at the end of _setup() 3268 * Sets the hwmod state that @oh will enter at the end of _setup()
2656 * (called by omap_hwmod_setup_*()). Only valid to call between 3269 * (called by omap_hwmod_setup_*()). See also the documentation
2657 * calling omap_hwmod_register() and omap_hwmod_setup_*(). Returns 3270 * for _setup_postsetup(), above. Returns 0 upon success or
2658 * 0 upon success or -EINVAL if there is a problem with the arguments 3271 * -EINVAL if there is a problem with the arguments or if the hwmod is
2659 * or if the hwmod is in the wrong state. 3272 * in the wrong state.
2660 */ 3273 */
2661int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state) 3274int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state)
2662{ 3275{
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index a6bde34e443a..2c087ffc6a92 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -2,6 +2,7 @@
2 * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips 2 * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips
3 * 3 *
4 * Copyright (C) 2009-2011 Nokia Corporation 4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2012 Texas Instruments, Inc.
5 * Paul Walmsley 6 * Paul Walmsley
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
@@ -32,707 +33,268 @@
32/* 33/*
33 * OMAP2420 hardware module integration data 34 * OMAP2420 hardware module integration data
34 * 35 *
35 * ALl of the data in this section should be autogeneratable from the 36 * All of the data in this section should be autogeneratable from the
36 * TI hardware database or other technical documentation. Data that 37 * TI hardware database or other technical documentation. Data that
37 * is driver-specific or driver-kernel integration-specific belongs 38 * is driver-specific or driver-kernel integration-specific belongs
38 * elsewhere. 39 * elsewhere.
39 */ 40 */
40 41
41static struct omap_hwmod omap2420_mpu_hwmod;
42static struct omap_hwmod omap2420_iva_hwmod;
43static struct omap_hwmod omap2420_l3_main_hwmod;
44static struct omap_hwmod omap2420_l4_core_hwmod;
45static struct omap_hwmod omap2420_dss_core_hwmod;
46static struct omap_hwmod omap2420_dss_dispc_hwmod;
47static struct omap_hwmod omap2420_dss_rfbi_hwmod;
48static struct omap_hwmod omap2420_dss_venc_hwmod;
49static struct omap_hwmod omap2420_wd_timer2_hwmod;
50static struct omap_hwmod omap2420_gpio1_hwmod;
51static struct omap_hwmod omap2420_gpio2_hwmod;
52static struct omap_hwmod omap2420_gpio3_hwmod;
53static struct omap_hwmod omap2420_gpio4_hwmod;
54static struct omap_hwmod omap2420_dma_system_hwmod;
55static struct omap_hwmod omap2420_mcspi1_hwmod;
56static struct omap_hwmod omap2420_mcspi2_hwmod;
57
58/* L3 -> L4_CORE interface */
59static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = {
60 .master = &omap2420_l3_main_hwmod,
61 .slave = &omap2420_l4_core_hwmod,
62 .user = OCP_USER_MPU | OCP_USER_SDMA,
63};
64
65/* MPU -> L3 interface */
66static struct omap_hwmod_ocp_if omap2420_mpu__l3_main = {
67 .master = &omap2420_mpu_hwmod,
68 .slave = &omap2420_l3_main_hwmod,
69 .user = OCP_USER_MPU,
70};
71
72/* Slave interfaces on the L3 interconnect */
73static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = {
74 &omap2420_mpu__l3_main,
75};
76
77/* DSS -> l3 */
78static struct omap_hwmod_ocp_if omap2420_dss__l3 = {
79 .master = &omap2420_dss_core_hwmod,
80 .slave = &omap2420_l3_main_hwmod,
81 .fw = {
82 .omap2 = {
83 .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
84 .flags = OMAP_FIREWALL_L3,
85 }
86 },
87 .user = OCP_USER_MPU | OCP_USER_SDMA,
88};
89
90/* Master interfaces on the L3 interconnect */
91static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = {
92 &omap2420_l3_main__l4_core,
93};
94
95/* L3 */
96static struct omap_hwmod omap2420_l3_main_hwmod = {
97 .name = "l3_main",
98 .class = &l3_hwmod_class,
99 .masters = omap2420_l3_main_masters,
100 .masters_cnt = ARRAY_SIZE(omap2420_l3_main_masters),
101 .slaves = omap2420_l3_main_slaves,
102 .slaves_cnt = ARRAY_SIZE(omap2420_l3_main_slaves),
103 .flags = HWMOD_NO_IDLEST,
104};
105
106static struct omap_hwmod omap2420_l4_wkup_hwmod;
107static struct omap_hwmod omap2420_uart1_hwmod;
108static struct omap_hwmod omap2420_uart2_hwmod;
109static struct omap_hwmod omap2420_uart3_hwmod;
110static struct omap_hwmod omap2420_i2c1_hwmod;
111static struct omap_hwmod omap2420_i2c2_hwmod;
112static struct omap_hwmod omap2420_mcbsp1_hwmod;
113static struct omap_hwmod omap2420_mcbsp2_hwmod;
114
115/* l4 core -> mcspi1 interface */
116static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = {
117 .master = &omap2420_l4_core_hwmod,
118 .slave = &omap2420_mcspi1_hwmod,
119 .clk = "mcspi1_ick",
120 .addr = omap2_mcspi1_addr_space,
121 .user = OCP_USER_MPU | OCP_USER_SDMA,
122};
123
124/* l4 core -> mcspi2 interface */
125static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = {
126 .master = &omap2420_l4_core_hwmod,
127 .slave = &omap2420_mcspi2_hwmod,
128 .clk = "mcspi2_ick",
129 .addr = omap2_mcspi2_addr_space,
130 .user = OCP_USER_MPU | OCP_USER_SDMA,
131};
132
133/* L4_CORE -> L4_WKUP interface */
134static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
135 .master = &omap2420_l4_core_hwmod,
136 .slave = &omap2420_l4_wkup_hwmod,
137 .user = OCP_USER_MPU | OCP_USER_SDMA,
138};
139
140/* L4 CORE -> UART1 interface */
141static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
142 .master = &omap2420_l4_core_hwmod,
143 .slave = &omap2420_uart1_hwmod,
144 .clk = "uart1_ick",
145 .addr = omap2xxx_uart1_addr_space,
146 .user = OCP_USER_MPU | OCP_USER_SDMA,
147};
148
149/* L4 CORE -> UART2 interface */
150static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
151 .master = &omap2420_l4_core_hwmod,
152 .slave = &omap2420_uart2_hwmod,
153 .clk = "uart2_ick",
154 .addr = omap2xxx_uart2_addr_space,
155 .user = OCP_USER_MPU | OCP_USER_SDMA,
156};
157
158/* L4 PER -> UART3 interface */
159static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
160 .master = &omap2420_l4_core_hwmod,
161 .slave = &omap2420_uart3_hwmod,
162 .clk = "uart3_ick",
163 .addr = omap2xxx_uart3_addr_space,
164 .user = OCP_USER_MPU | OCP_USER_SDMA,
165};
166
167/* L4 CORE -> I2C1 interface */
168static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
169 .master = &omap2420_l4_core_hwmod,
170 .slave = &omap2420_i2c1_hwmod,
171 .clk = "i2c1_ick",
172 .addr = omap2_i2c1_addr_space,
173 .user = OCP_USER_MPU | OCP_USER_SDMA,
174};
175
176/* L4 CORE -> I2C2 interface */
177static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
178 .master = &omap2420_l4_core_hwmod,
179 .slave = &omap2420_i2c2_hwmod,
180 .clk = "i2c2_ick",
181 .addr = omap2_i2c2_addr_space,
182 .user = OCP_USER_MPU | OCP_USER_SDMA,
183};
184
185/* Slave interfaces on the L4_CORE interconnect */
186static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = {
187 &omap2420_l3_main__l4_core,
188};
189
190/* Master interfaces on the L4_CORE interconnect */
191static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = {
192 &omap2420_l4_core__l4_wkup,
193 &omap2_l4_core__uart1,
194 &omap2_l4_core__uart2,
195 &omap2_l4_core__uart3,
196 &omap2420_l4_core__i2c1,
197 &omap2420_l4_core__i2c2
198};
199
200/* L4 CORE */
201static struct omap_hwmod omap2420_l4_core_hwmod = {
202 .name = "l4_core",
203 .class = &l4_hwmod_class,
204 .masters = omap2420_l4_core_masters,
205 .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters),
206 .slaves = omap2420_l4_core_slaves,
207 .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves),
208 .flags = HWMOD_NO_IDLEST,
209};
210
211/* Slave interfaces on the L4_WKUP interconnect */
212static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = {
213 &omap2420_l4_core__l4_wkup,
214};
215
216/* Master interfaces on the L4_WKUP interconnect */
217static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = {
218};
219
220/* L4 WKUP */
221static struct omap_hwmod omap2420_l4_wkup_hwmod = {
222 .name = "l4_wkup",
223 .class = &l4_hwmod_class,
224 .masters = omap2420_l4_wkup_masters,
225 .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters),
226 .slaves = omap2420_l4_wkup_slaves,
227 .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves),
228 .flags = HWMOD_NO_IDLEST,
229};
230
231/* Master interfaces on the MPU device */
232static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
233 &omap2420_mpu__l3_main,
234};
235
236/* MPU */
237static struct omap_hwmod omap2420_mpu_hwmod = {
238 .name = "mpu",
239 .class = &mpu_hwmod_class,
240 .main_clk = "mpu_ck",
241 .masters = omap2420_mpu_masters,
242 .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters),
243};
244
245/* 42/*
246 * IVA1 interface data 43 * IP blocks
247 */ 44 */
248 45
249/* IVA <- L3 interface */ 46/* IVA1 (IVA1) */
250static struct omap_hwmod_ocp_if omap2420_l3__iva = { 47static struct omap_hwmod_class iva1_hwmod_class = {
251 .master = &omap2420_l3_main_hwmod, 48 .name = "iva1",
252 .slave = &omap2420_iva_hwmod,
253 .clk = "iva1_ifck",
254 .user = OCP_USER_MPU | OCP_USER_SDMA,
255}; 49};
256 50
257static struct omap_hwmod_ocp_if *omap2420_iva_masters[] = { 51static struct omap_hwmod_rst_info omap2420_iva_resets[] = {
258 &omap2420_l3__iva, 52 { .name = "iva", .rst_shift = 8 },
259}; 53};
260 54
261/*
262 * IVA2 (IVA2)
263 */
264
265static struct omap_hwmod omap2420_iva_hwmod = { 55static struct omap_hwmod omap2420_iva_hwmod = {
266 .name = "iva", 56 .name = "iva",
267 .class = &iva_hwmod_class, 57 .class = &iva1_hwmod_class,
268 .masters = omap2420_iva_masters, 58 .clkdm_name = "iva1_clkdm",
269 .masters_cnt = ARRAY_SIZE(omap2420_iva_masters), 59 .rst_lines = omap2420_iva_resets,
60 .rst_lines_cnt = ARRAY_SIZE(omap2420_iva_resets),
61 .main_clk = "iva1_ifck",
270}; 62};
271 63
272/* always-on timers dev attribute */ 64/* DSP */
273static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = { 65static struct omap_hwmod_class dsp_hwmod_class = {
274 .timer_capability = OMAP_TIMER_ALWON, 66 .name = "dsp",
275};
276
277/* pwm timers dev attribute */
278static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
279 .timer_capability = OMAP_TIMER_HAS_PWM,
280};
281
282/* timer1 */
283static struct omap_hwmod omap2420_timer1_hwmod;
284
285static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
286 {
287 .pa_start = 0x48028000,
288 .pa_end = 0x48028000 + SZ_1K - 1,
289 .flags = ADDR_TYPE_RT
290 },
291 { }
292}; 67};
293 68
294/* l4_wkup -> timer1 */ 69static struct omap_hwmod_rst_info omap2420_dsp_resets[] = {
295static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = { 70 { .name = "logic", .rst_shift = 0 },
296 .master = &omap2420_l4_wkup_hwmod, 71 { .name = "mmu", .rst_shift = 1 },
297 .slave = &omap2420_timer1_hwmod,
298 .clk = "gpt1_ick",
299 .addr = omap2420_timer1_addrs,
300 .user = OCP_USER_MPU | OCP_USER_SDMA,
301}; 72};
302 73
303/* timer1 slave port */ 74static struct omap_hwmod omap2420_dsp_hwmod = {
304static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = { 75 .name = "dsp",
305 &omap2420_l4_wkup__timer1, 76 .class = &dsp_hwmod_class,
77 .clkdm_name = "dsp_clkdm",
78 .rst_lines = omap2420_dsp_resets,
79 .rst_lines_cnt = ARRAY_SIZE(omap2420_dsp_resets),
80 .main_clk = "dsp_fck",
306}; 81};
307 82
308/* timer1 hwmod */ 83/* I2C common */
309static struct omap_hwmod omap2420_timer1_hwmod = { 84static struct omap_hwmod_class_sysconfig i2c_sysc = {
310 .name = "timer1", 85 .rev_offs = 0x00,
311 .mpu_irqs = omap2_timer1_mpu_irqs, 86 .sysc_offs = 0x20,
312 .main_clk = "gpt1_fck", 87 .syss_offs = 0x10,
313 .prcm = { 88 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
314 .omap2 = { 89 .sysc_fields = &omap_hwmod_sysc_type1,
315 .prcm_reg_id = 1,
316 .module_bit = OMAP24XX_EN_GPT1_SHIFT,
317 .module_offs = WKUP_MOD,
318 .idlest_reg_id = 1,
319 .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
320 },
321 },
322 .dev_attr = &capability_alwon_dev_attr,
323 .slaves = omap2420_timer1_slaves,
324 .slaves_cnt = ARRAY_SIZE(omap2420_timer1_slaves),
325 .class = &omap2xxx_timer_hwmod_class,
326}; 90};
327 91
328/* timer2 */ 92static struct omap_hwmod_class i2c_class = {
329static struct omap_hwmod omap2420_timer2_hwmod; 93 .name = "i2c",
330 94 .sysc = &i2c_sysc,
331/* l4_core -> timer2 */ 95 .rev = OMAP_I2C_IP_VERSION_1,
332static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = { 96 .reset = &omap_i2c_reset,
333 .master = &omap2420_l4_core_hwmod,
334 .slave = &omap2420_timer2_hwmod,
335 .clk = "gpt2_ick",
336 .addr = omap2xxx_timer2_addrs,
337 .user = OCP_USER_MPU | OCP_USER_SDMA,
338}; 97};
339 98
340/* timer2 slave port */ 99static struct omap_i2c_dev_attr i2c_dev_attr = {
341static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = { 100 .flags = OMAP_I2C_FLAG_NO_FIFO |
342 &omap2420_l4_core__timer2, 101 OMAP_I2C_FLAG_SIMPLE_CLOCK |
102 OMAP_I2C_FLAG_16BIT_DATA_REG |
103 OMAP_I2C_FLAG_BUS_SHIFT_2,
343}; 104};
344 105
345/* timer2 hwmod */ 106/* I2C1 */
346static struct omap_hwmod omap2420_timer2_hwmod = { 107static struct omap_hwmod omap2420_i2c1_hwmod = {
347 .name = "timer2", 108 .name = "i2c1",
348 .mpu_irqs = omap2_timer2_mpu_irqs, 109 .mpu_irqs = omap2_i2c1_mpu_irqs,
349 .main_clk = "gpt2_fck", 110 .sdma_reqs = omap2_i2c1_sdma_reqs,
111 .main_clk = "i2c1_fck",
350 .prcm = { 112 .prcm = {
351 .omap2 = { 113 .omap2 = {
352 .prcm_reg_id = 1,
353 .module_bit = OMAP24XX_EN_GPT2_SHIFT,
354 .module_offs = CORE_MOD, 114 .module_offs = CORE_MOD,
355 .idlest_reg_id = 1,
356 .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
357 },
358 },
359 .dev_attr = &capability_alwon_dev_attr,
360 .slaves = omap2420_timer2_slaves,
361 .slaves_cnt = ARRAY_SIZE(omap2420_timer2_slaves),
362 .class = &omap2xxx_timer_hwmod_class,
363};
364
365/* timer3 */
366static struct omap_hwmod omap2420_timer3_hwmod;
367
368/* l4_core -> timer3 */
369static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = {
370 .master = &omap2420_l4_core_hwmod,
371 .slave = &omap2420_timer3_hwmod,
372 .clk = "gpt3_ick",
373 .addr = omap2xxx_timer3_addrs,
374 .user = OCP_USER_MPU | OCP_USER_SDMA,
375};
376
377/* timer3 slave port */
378static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = {
379 &omap2420_l4_core__timer3,
380};
381
382/* timer3 hwmod */
383static struct omap_hwmod omap2420_timer3_hwmod = {
384 .name = "timer3",
385 .mpu_irqs = omap2_timer3_mpu_irqs,
386 .main_clk = "gpt3_fck",
387 .prcm = {
388 .omap2 = {
389 .prcm_reg_id = 1, 115 .prcm_reg_id = 1,
390 .module_bit = OMAP24XX_EN_GPT3_SHIFT, 116 .module_bit = OMAP2420_EN_I2C1_SHIFT,
391 .module_offs = CORE_MOD,
392 .idlest_reg_id = 1, 117 .idlest_reg_id = 1,
393 .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT, 118 .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
394 }, 119 },
395 }, 120 },
396 .dev_attr = &capability_alwon_dev_attr, 121 .class = &i2c_class,
397 .slaves = omap2420_timer3_slaves, 122 .dev_attr = &i2c_dev_attr,
398 .slaves_cnt = ARRAY_SIZE(omap2420_timer3_slaves), 123 .flags = HWMOD_16BIT_REG,
399 .class = &omap2xxx_timer_hwmod_class,
400};
401
402/* timer4 */
403static struct omap_hwmod omap2420_timer4_hwmod;
404
405/* l4_core -> timer4 */
406static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = {
407 .master = &omap2420_l4_core_hwmod,
408 .slave = &omap2420_timer4_hwmod,
409 .clk = "gpt4_ick",
410 .addr = omap2xxx_timer4_addrs,
411 .user = OCP_USER_MPU | OCP_USER_SDMA,
412};
413
414/* timer4 slave port */
415static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = {
416 &omap2420_l4_core__timer4,
417}; 124};
418 125
419/* timer4 hwmod */ 126/* I2C2 */
420static struct omap_hwmod omap2420_timer4_hwmod = { 127static struct omap_hwmod omap2420_i2c2_hwmod = {
421 .name = "timer4", 128 .name = "i2c2",
422 .mpu_irqs = omap2_timer4_mpu_irqs, 129 .mpu_irqs = omap2_i2c2_mpu_irqs,
423 .main_clk = "gpt4_fck", 130 .sdma_reqs = omap2_i2c2_sdma_reqs,
131 .main_clk = "i2c2_fck",
424 .prcm = { 132 .prcm = {
425 .omap2 = { 133 .omap2 = {
426 .prcm_reg_id = 1,
427 .module_bit = OMAP24XX_EN_GPT4_SHIFT,
428 .module_offs = CORE_MOD, 134 .module_offs = CORE_MOD,
429 .idlest_reg_id = 1,
430 .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
431 },
432 },
433 .dev_attr = &capability_alwon_dev_attr,
434 .slaves = omap2420_timer4_slaves,
435 .slaves_cnt = ARRAY_SIZE(omap2420_timer4_slaves),
436 .class = &omap2xxx_timer_hwmod_class,
437};
438
439/* timer5 */
440static struct omap_hwmod omap2420_timer5_hwmod;
441
442/* l4_core -> timer5 */
443static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = {
444 .master = &omap2420_l4_core_hwmod,
445 .slave = &omap2420_timer5_hwmod,
446 .clk = "gpt5_ick",
447 .addr = omap2xxx_timer5_addrs,
448 .user = OCP_USER_MPU | OCP_USER_SDMA,
449};
450
451/* timer5 slave port */
452static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = {
453 &omap2420_l4_core__timer5,
454};
455
456/* timer5 hwmod */
457static struct omap_hwmod omap2420_timer5_hwmod = {
458 .name = "timer5",
459 .mpu_irqs = omap2_timer5_mpu_irqs,
460 .main_clk = "gpt5_fck",
461 .prcm = {
462 .omap2 = {
463 .prcm_reg_id = 1, 135 .prcm_reg_id = 1,
464 .module_bit = OMAP24XX_EN_GPT5_SHIFT, 136 .module_bit = OMAP2420_EN_I2C2_SHIFT,
465 .module_offs = CORE_MOD,
466 .idlest_reg_id = 1, 137 .idlest_reg_id = 1,
467 .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT, 138 .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
468 }, 139 },
469 }, 140 },
470 .dev_attr = &capability_alwon_dev_attr, 141 .class = &i2c_class,
471 .slaves = omap2420_timer5_slaves, 142 .dev_attr = &i2c_dev_attr,
472 .slaves_cnt = ARRAY_SIZE(omap2420_timer5_slaves), 143 .flags = HWMOD_16BIT_REG,
473 .class = &omap2xxx_timer_hwmod_class,
474};
475
476
477/* timer6 */
478static struct omap_hwmod omap2420_timer6_hwmod;
479
480/* l4_core -> timer6 */
481static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = {
482 .master = &omap2420_l4_core_hwmod,
483 .slave = &omap2420_timer6_hwmod,
484 .clk = "gpt6_ick",
485 .addr = omap2xxx_timer6_addrs,
486 .user = OCP_USER_MPU | OCP_USER_SDMA,
487};
488
489/* timer6 slave port */
490static struct omap_hwmod_ocp_if *omap2420_timer6_slaves[] = {
491 &omap2420_l4_core__timer6,
492}; 144};
493 145
494/* timer6 hwmod */ 146/* dma attributes */
495static struct omap_hwmod omap2420_timer6_hwmod = { 147static struct omap_dma_dev_attr dma_dev_attr = {
496 .name = "timer6", 148 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
497 .mpu_irqs = omap2_timer6_mpu_irqs, 149 IS_CSSA_32 | IS_CDSA_32,
498 .main_clk = "gpt6_fck", 150 .lch_count = 32,
499 .prcm = {
500 .omap2 = {
501 .prcm_reg_id = 1,
502 .module_bit = OMAP24XX_EN_GPT6_SHIFT,
503 .module_offs = CORE_MOD,
504 .idlest_reg_id = 1,
505 .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
506 },
507 },
508 .dev_attr = &capability_alwon_dev_attr,
509 .slaves = omap2420_timer6_slaves,
510 .slaves_cnt = ARRAY_SIZE(omap2420_timer6_slaves),
511 .class = &omap2xxx_timer_hwmod_class,
512}; 151};
513 152
514/* timer7 */ 153static struct omap_hwmod omap2420_dma_system_hwmod = {
515static struct omap_hwmod omap2420_timer7_hwmod; 154 .name = "dma",
516 155 .class = &omap2xxx_dma_hwmod_class,
517/* l4_core -> timer7 */ 156 .mpu_irqs = omap2_dma_system_irqs,
518static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = { 157 .main_clk = "core_l3_ck",
519 .master = &omap2420_l4_core_hwmod, 158 .dev_attr = &dma_dev_attr,
520 .slave = &omap2420_timer7_hwmod, 159 .flags = HWMOD_NO_IDLEST,
521 .clk = "gpt7_ick",
522 .addr = omap2xxx_timer7_addrs,
523 .user = OCP_USER_MPU | OCP_USER_SDMA,
524}; 160};
525 161
526/* timer7 slave port */ 162/* mailbox */
527static struct omap_hwmod_ocp_if *omap2420_timer7_slaves[] = { 163static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
528 &omap2420_l4_core__timer7, 164 { .name = "dsp", .irq = 26 },
165 { .name = "iva", .irq = 34 },
166 { .irq = -1 }
529}; 167};
530 168
531/* timer7 hwmod */ 169static struct omap_hwmod omap2420_mailbox_hwmod = {
532static struct omap_hwmod omap2420_timer7_hwmod = { 170 .name = "mailbox",
533 .name = "timer7", 171 .class = &omap2xxx_mailbox_hwmod_class,
534 .mpu_irqs = omap2_timer7_mpu_irqs, 172 .mpu_irqs = omap2420_mailbox_irqs,
535 .main_clk = "gpt7_fck", 173 .main_clk = "mailboxes_ick",
536 .prcm = { 174 .prcm = {
537 .omap2 = { 175 .omap2 = {
538 .prcm_reg_id = 1, 176 .prcm_reg_id = 1,
539 .module_bit = OMAP24XX_EN_GPT7_SHIFT, 177 .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
540 .module_offs = CORE_MOD, 178 .module_offs = CORE_MOD,
541 .idlest_reg_id = 1, 179 .idlest_reg_id = 1,
542 .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT, 180 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
543 }, 181 },
544 }, 182 },
545 .dev_attr = &capability_alwon_dev_attr,
546 .slaves = omap2420_timer7_slaves,
547 .slaves_cnt = ARRAY_SIZE(omap2420_timer7_slaves),
548 .class = &omap2xxx_timer_hwmod_class,
549}; 183};
550 184
551/* timer8 */ 185/*
552static struct omap_hwmod omap2420_timer8_hwmod; 186 * 'mcbsp' class
187 * multi channel buffered serial port controller
188 */
553 189
554/* l4_core -> timer8 */ 190static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
555static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = { 191 .name = "mcbsp",
556 .master = &omap2420_l4_core_hwmod,
557 .slave = &omap2420_timer8_hwmod,
558 .clk = "gpt8_ick",
559 .addr = omap2xxx_timer8_addrs,
560 .user = OCP_USER_MPU | OCP_USER_SDMA,
561}; 192};
562 193
563/* timer8 slave port */ 194/* mcbsp1 */
564static struct omap_hwmod_ocp_if *omap2420_timer8_slaves[] = { 195static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
565 &omap2420_l4_core__timer8, 196 { .name = "tx", .irq = 59 },
197 { .name = "rx", .irq = 60 },
198 { .irq = -1 }
566}; 199};
567 200
568/* timer8 hwmod */ 201static struct omap_hwmod omap2420_mcbsp1_hwmod = {
569static struct omap_hwmod omap2420_timer8_hwmod = { 202 .name = "mcbsp1",
570 .name = "timer8", 203 .class = &omap2420_mcbsp_hwmod_class,
571 .mpu_irqs = omap2_timer8_mpu_irqs, 204 .mpu_irqs = omap2420_mcbsp1_irqs,
572 .main_clk = "gpt8_fck", 205 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
206 .main_clk = "mcbsp1_fck",
573 .prcm = { 207 .prcm = {
574 .omap2 = { 208 .omap2 = {
575 .prcm_reg_id = 1, 209 .prcm_reg_id = 1,
576 .module_bit = OMAP24XX_EN_GPT8_SHIFT, 210 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
577 .module_offs = CORE_MOD, 211 .module_offs = CORE_MOD,
578 .idlest_reg_id = 1, 212 .idlest_reg_id = 1,
579 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT, 213 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
580 }, 214 },
581 }, 215 },
582 .dev_attr = &capability_alwon_dev_attr,
583 .slaves = omap2420_timer8_slaves,
584 .slaves_cnt = ARRAY_SIZE(omap2420_timer8_slaves),
585 .class = &omap2xxx_timer_hwmod_class,
586};
587
588/* timer9 */
589static struct omap_hwmod omap2420_timer9_hwmod;
590
591/* l4_core -> timer9 */
592static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = {
593 .master = &omap2420_l4_core_hwmod,
594 .slave = &omap2420_timer9_hwmod,
595 .clk = "gpt9_ick",
596 .addr = omap2xxx_timer9_addrs,
597 .user = OCP_USER_MPU | OCP_USER_SDMA,
598}; 216};
599 217
600/* timer9 slave port */ 218/* mcbsp2 */
601static struct omap_hwmod_ocp_if *omap2420_timer9_slaves[] = { 219static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
602 &omap2420_l4_core__timer9, 220 { .name = "tx", .irq = 62 },
221 { .name = "rx", .irq = 63 },
222 { .irq = -1 }
603}; 223};
604 224
605/* timer9 hwmod */ 225static struct omap_hwmod omap2420_mcbsp2_hwmod = {
606static struct omap_hwmod omap2420_timer9_hwmod = { 226 .name = "mcbsp2",
607 .name = "timer9", 227 .class = &omap2420_mcbsp_hwmod_class,
608 .mpu_irqs = omap2_timer9_mpu_irqs, 228 .mpu_irqs = omap2420_mcbsp2_irqs,
609 .main_clk = "gpt9_fck", 229 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
230 .main_clk = "mcbsp2_fck",
610 .prcm = { 231 .prcm = {
611 .omap2 = { 232 .omap2 = {
612 .prcm_reg_id = 1, 233 .prcm_reg_id = 1,
613 .module_bit = OMAP24XX_EN_GPT9_SHIFT, 234 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
614 .module_offs = CORE_MOD, 235 .module_offs = CORE_MOD,
615 .idlest_reg_id = 1, 236 .idlest_reg_id = 1,
616 .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT, 237 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
617 }, 238 },
618 }, 239 },
619 .dev_attr = &capability_pwm_dev_attr,
620 .slaves = omap2420_timer9_slaves,
621 .slaves_cnt = ARRAY_SIZE(omap2420_timer9_slaves),
622 .class = &omap2xxx_timer_hwmod_class,
623}; 240};
624 241
625/* timer10 */ 242/*
626static struct omap_hwmod omap2420_timer10_hwmod; 243 * interfaces
244 */
627 245
628/* l4_core -> timer10 */ 246/* L4 CORE -> I2C1 interface */
629static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = { 247static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
630 .master = &omap2420_l4_core_hwmod, 248 .master = &omap2xxx_l4_core_hwmod,
631 .slave = &omap2420_timer10_hwmod, 249 .slave = &omap2420_i2c1_hwmod,
632 .clk = "gpt10_ick", 250 .clk = "i2c1_ick",
633 .addr = omap2_timer10_addrs, 251 .addr = omap2_i2c1_addr_space,
634 .user = OCP_USER_MPU | OCP_USER_SDMA, 252 .user = OCP_USER_MPU | OCP_USER_SDMA,
635}; 253};
636 254
637/* timer10 slave port */ 255/* L4 CORE -> I2C2 interface */
638static struct omap_hwmod_ocp_if *omap2420_timer10_slaves[] = { 256static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
639 &omap2420_l4_core__timer10, 257 .master = &omap2xxx_l4_core_hwmod,
640}; 258 .slave = &omap2420_i2c2_hwmod,
641 259 .clk = "i2c2_ick",
642/* timer10 hwmod */ 260 .addr = omap2_i2c2_addr_space,
643static struct omap_hwmod omap2420_timer10_hwmod = { 261 .user = OCP_USER_MPU | OCP_USER_SDMA,
644 .name = "timer10",
645 .mpu_irqs = omap2_timer10_mpu_irqs,
646 .main_clk = "gpt10_fck",
647 .prcm = {
648 .omap2 = {
649 .prcm_reg_id = 1,
650 .module_bit = OMAP24XX_EN_GPT10_SHIFT,
651 .module_offs = CORE_MOD,
652 .idlest_reg_id = 1,
653 .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
654 },
655 },
656 .dev_attr = &capability_pwm_dev_attr,
657 .slaves = omap2420_timer10_slaves,
658 .slaves_cnt = ARRAY_SIZE(omap2420_timer10_slaves),
659 .class = &omap2xxx_timer_hwmod_class,
660}; 262};
661 263
662/* timer11 */ 264/* IVA <- L3 interface */
663static struct omap_hwmod omap2420_timer11_hwmod; 265static struct omap_hwmod_ocp_if omap2420_l3__iva = {
664 266 .master = &omap2xxx_l3_main_hwmod,
665/* l4_core -> timer11 */ 267 .slave = &omap2420_iva_hwmod,
666static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = { 268 .clk = "core_l3_ck",
667 .master = &omap2420_l4_core_hwmod,
668 .slave = &omap2420_timer11_hwmod,
669 .clk = "gpt11_ick",
670 .addr = omap2_timer11_addrs,
671 .user = OCP_USER_MPU | OCP_USER_SDMA, 269 .user = OCP_USER_MPU | OCP_USER_SDMA,
672}; 270};
673 271
674/* timer11 slave port */ 272/* DSP <- L3 interface */
675static struct omap_hwmod_ocp_if *omap2420_timer11_slaves[] = { 273static struct omap_hwmod_ocp_if omap2420_l3__dsp = {
676 &omap2420_l4_core__timer11, 274 .master = &omap2xxx_l3_main_hwmod,
275 .slave = &omap2420_dsp_hwmod,
276 .clk = "dsp_ick",
277 .user = OCP_USER_MPU | OCP_USER_SDMA,
677}; 278};
678 279
679/* timer11 hwmod */ 280static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
680static struct omap_hwmod omap2420_timer11_hwmod = { 281 {
681 .name = "timer11", 282 .pa_start = 0x48028000,
682 .mpu_irqs = omap2_timer11_mpu_irqs, 283 .pa_end = 0x48028000 + SZ_1K - 1,
683 .main_clk = "gpt11_fck", 284 .flags = ADDR_TYPE_RT
684 .prcm = {
685 .omap2 = {
686 .prcm_reg_id = 1,
687 .module_bit = OMAP24XX_EN_GPT11_SHIFT,
688 .module_offs = CORE_MOD,
689 .idlest_reg_id = 1,
690 .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
691 },
692 }, 285 },
693 .dev_attr = &capability_pwm_dev_attr, 286 { }
694 .slaves = omap2420_timer11_slaves,
695 .slaves_cnt = ARRAY_SIZE(omap2420_timer11_slaves),
696 .class = &omap2xxx_timer_hwmod_class,
697}; 287};
698 288
699/* timer12 */ 289/* l4_wkup -> timer1 */
700static struct omap_hwmod omap2420_timer12_hwmod; 290static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {
701 291 .master = &omap2xxx_l4_wkup_hwmod,
702/* l4_core -> timer12 */ 292 .slave = &omap2xxx_timer1_hwmod,
703static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = { 293 .clk = "gpt1_ick",
704 .master = &omap2420_l4_core_hwmod, 294 .addr = omap2420_timer1_addrs,
705 .slave = &omap2420_timer12_hwmod,
706 .clk = "gpt12_ick",
707 .addr = omap2xxx_timer12_addrs,
708 .user = OCP_USER_MPU | OCP_USER_SDMA, 295 .user = OCP_USER_MPU | OCP_USER_SDMA,
709}; 296};
710 297
711/* timer12 slave port */
712static struct omap_hwmod_ocp_if *omap2420_timer12_slaves[] = {
713 &omap2420_l4_core__timer12,
714};
715
716/* timer12 hwmod */
717static struct omap_hwmod omap2420_timer12_hwmod = {
718 .name = "timer12",
719 .mpu_irqs = omap2xxx_timer12_mpu_irqs,
720 .main_clk = "gpt12_fck",
721 .prcm = {
722 .omap2 = {
723 .prcm_reg_id = 1,
724 .module_bit = OMAP24XX_EN_GPT12_SHIFT,
725 .module_offs = CORE_MOD,
726 .idlest_reg_id = 1,
727 .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
728 },
729 },
730 .dev_attr = &capability_pwm_dev_attr,
731 .slaves = omap2420_timer12_slaves,
732 .slaves_cnt = ARRAY_SIZE(omap2420_timer12_slaves),
733 .class = &omap2xxx_timer_hwmod_class,
734};
735
736/* l4_wkup -> wd_timer2 */ 298/* l4_wkup -> wd_timer2 */
737static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = { 299static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
738 { 300 {
@@ -744,363 +306,13 @@ static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
744}; 306};
745 307
746static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = { 308static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
747 .master = &omap2420_l4_wkup_hwmod, 309 .master = &omap2xxx_l4_wkup_hwmod,
748 .slave = &omap2420_wd_timer2_hwmod, 310 .slave = &omap2xxx_wd_timer2_hwmod,
749 .clk = "mpu_wdt_ick", 311 .clk = "mpu_wdt_ick",
750 .addr = omap2420_wd_timer2_addrs, 312 .addr = omap2420_wd_timer2_addrs,
751 .user = OCP_USER_MPU | OCP_USER_SDMA, 313 .user = OCP_USER_MPU | OCP_USER_SDMA,
752}; 314};
753 315
754/* wd_timer2 */
755static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
756 &omap2420_l4_wkup__wd_timer2,
757};
758
759static struct omap_hwmod omap2420_wd_timer2_hwmod = {
760 .name = "wd_timer2",
761 .class = &omap2xxx_wd_timer_hwmod_class,
762 .main_clk = "mpu_wdt_fck",
763 .prcm = {
764 .omap2 = {
765 .prcm_reg_id = 1,
766 .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
767 .module_offs = WKUP_MOD,
768 .idlest_reg_id = 1,
769 .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
770 },
771 },
772 .slaves = omap2420_wd_timer2_slaves,
773 .slaves_cnt = ARRAY_SIZE(omap2420_wd_timer2_slaves),
774};
775
776/* UART1 */
777
778static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = {
779 &omap2_l4_core__uart1,
780};
781
782static struct omap_hwmod omap2420_uart1_hwmod = {
783 .name = "uart1",
784 .mpu_irqs = omap2_uart1_mpu_irqs,
785 .sdma_reqs = omap2_uart1_sdma_reqs,
786 .main_clk = "uart1_fck",
787 .prcm = {
788 .omap2 = {
789 .module_offs = CORE_MOD,
790 .prcm_reg_id = 1,
791 .module_bit = OMAP24XX_EN_UART1_SHIFT,
792 .idlest_reg_id = 1,
793 .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
794 },
795 },
796 .slaves = omap2420_uart1_slaves,
797 .slaves_cnt = ARRAY_SIZE(omap2420_uart1_slaves),
798 .class = &omap2_uart_class,
799};
800
801/* UART2 */
802
803static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = {
804 &omap2_l4_core__uart2,
805};
806
807static struct omap_hwmod omap2420_uart2_hwmod = {
808 .name = "uart2",
809 .mpu_irqs = omap2_uart2_mpu_irqs,
810 .sdma_reqs = omap2_uart2_sdma_reqs,
811 .main_clk = "uart2_fck",
812 .prcm = {
813 .omap2 = {
814 .module_offs = CORE_MOD,
815 .prcm_reg_id = 1,
816 .module_bit = OMAP24XX_EN_UART2_SHIFT,
817 .idlest_reg_id = 1,
818 .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
819 },
820 },
821 .slaves = omap2420_uart2_slaves,
822 .slaves_cnt = ARRAY_SIZE(omap2420_uart2_slaves),
823 .class = &omap2_uart_class,
824};
825
826/* UART3 */
827
828static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = {
829 &omap2_l4_core__uart3,
830};
831
832static struct omap_hwmod omap2420_uart3_hwmod = {
833 .name = "uart3",
834 .mpu_irqs = omap2_uart3_mpu_irqs,
835 .sdma_reqs = omap2_uart3_sdma_reqs,
836 .main_clk = "uart3_fck",
837 .prcm = {
838 .omap2 = {
839 .module_offs = CORE_MOD,
840 .prcm_reg_id = 2,
841 .module_bit = OMAP24XX_EN_UART3_SHIFT,
842 .idlest_reg_id = 2,
843 .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
844 },
845 },
846 .slaves = omap2420_uart3_slaves,
847 .slaves_cnt = ARRAY_SIZE(omap2420_uart3_slaves),
848 .class = &omap2_uart_class,
849};
850
851/* dss */
852/* dss master ports */
853static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = {
854 &omap2420_dss__l3,
855};
856
857/* l4_core -> dss */
858static struct omap_hwmod_ocp_if omap2420_l4_core__dss = {
859 .master = &omap2420_l4_core_hwmod,
860 .slave = &omap2420_dss_core_hwmod,
861 .clk = "dss_ick",
862 .addr = omap2_dss_addrs,
863 .fw = {
864 .omap2 = {
865 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
866 .flags = OMAP_FIREWALL_L4,
867 }
868 },
869 .user = OCP_USER_MPU | OCP_USER_SDMA,
870};
871
872/* dss slave ports */
873static struct omap_hwmod_ocp_if *omap2420_dss_slaves[] = {
874 &omap2420_l4_core__dss,
875};
876
877static struct omap_hwmod_opt_clk dss_opt_clks[] = {
878 /*
879 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
880 * driver does not use these clocks.
881 */
882 { .role = "tv_clk", .clk = "dss_54m_fck" },
883 { .role = "sys_clk", .clk = "dss2_fck" },
884};
885
886static struct omap_hwmod omap2420_dss_core_hwmod = {
887 .name = "dss_core",
888 .class = &omap2_dss_hwmod_class,
889 .main_clk = "dss1_fck", /* instead of dss_fck */
890 .sdma_reqs = omap2xxx_dss_sdma_chs,
891 .prcm = {
892 .omap2 = {
893 .prcm_reg_id = 1,
894 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
895 .module_offs = CORE_MOD,
896 .idlest_reg_id = 1,
897 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
898 },
899 },
900 .opt_clks = dss_opt_clks,
901 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
902 .slaves = omap2420_dss_slaves,
903 .slaves_cnt = ARRAY_SIZE(omap2420_dss_slaves),
904 .masters = omap2420_dss_masters,
905 .masters_cnt = ARRAY_SIZE(omap2420_dss_masters),
906 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
907};
908
909/* l4_core -> dss_dispc */
910static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = {
911 .master = &omap2420_l4_core_hwmod,
912 .slave = &omap2420_dss_dispc_hwmod,
913 .clk = "dss_ick",
914 .addr = omap2_dss_dispc_addrs,
915 .fw = {
916 .omap2 = {
917 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION,
918 .flags = OMAP_FIREWALL_L4,
919 }
920 },
921 .user = OCP_USER_MPU | OCP_USER_SDMA,
922};
923
924/* dss_dispc slave ports */
925static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = {
926 &omap2420_l4_core__dss_dispc,
927};
928
929static struct omap_hwmod omap2420_dss_dispc_hwmod = {
930 .name = "dss_dispc",
931 .class = &omap2_dispc_hwmod_class,
932 .mpu_irqs = omap2_dispc_irqs,
933 .main_clk = "dss1_fck",
934 .prcm = {
935 .omap2 = {
936 .prcm_reg_id = 1,
937 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
938 .module_offs = CORE_MOD,
939 .idlest_reg_id = 1,
940 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
941 },
942 },
943 .slaves = omap2420_dss_dispc_slaves,
944 .slaves_cnt = ARRAY_SIZE(omap2420_dss_dispc_slaves),
945 .flags = HWMOD_NO_IDLEST,
946 .dev_attr = &omap2_3_dss_dispc_dev_attr
947};
948
949/* l4_core -> dss_rfbi */
950static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = {
951 .master = &omap2420_l4_core_hwmod,
952 .slave = &omap2420_dss_rfbi_hwmod,
953 .clk = "dss_ick",
954 .addr = omap2_dss_rfbi_addrs,
955 .fw = {
956 .omap2 = {
957 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
958 .flags = OMAP_FIREWALL_L4,
959 }
960 },
961 .user = OCP_USER_MPU | OCP_USER_SDMA,
962};
963
964/* dss_rfbi slave ports */
965static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = {
966 &omap2420_l4_core__dss_rfbi,
967};
968
969static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
970 { .role = "ick", .clk = "dss_ick" },
971};
972
973static struct omap_hwmod omap2420_dss_rfbi_hwmod = {
974 .name = "dss_rfbi",
975 .class = &omap2_rfbi_hwmod_class,
976 .main_clk = "dss1_fck",
977 .prcm = {
978 .omap2 = {
979 .prcm_reg_id = 1,
980 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
981 .module_offs = CORE_MOD,
982 },
983 },
984 .opt_clks = dss_rfbi_opt_clks,
985 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
986 .slaves = omap2420_dss_rfbi_slaves,
987 .slaves_cnt = ARRAY_SIZE(omap2420_dss_rfbi_slaves),
988 .flags = HWMOD_NO_IDLEST,
989};
990
991/* l4_core -> dss_venc */
992static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = {
993 .master = &omap2420_l4_core_hwmod,
994 .slave = &omap2420_dss_venc_hwmod,
995 .clk = "dss_ick",
996 .addr = omap2_dss_venc_addrs,
997 .fw = {
998 .omap2 = {
999 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION,
1000 .flags = OMAP_FIREWALL_L4,
1001 }
1002 },
1003 .user = OCP_USER_MPU | OCP_USER_SDMA,
1004};
1005
1006/* dss_venc slave ports */
1007static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = {
1008 &omap2420_l4_core__dss_venc,
1009};
1010
1011static struct omap_hwmod omap2420_dss_venc_hwmod = {
1012 .name = "dss_venc",
1013 .class = &omap2_venc_hwmod_class,
1014 .main_clk = "dss_54m_fck",
1015 .prcm = {
1016 .omap2 = {
1017 .prcm_reg_id = 1,
1018 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1019 .module_offs = CORE_MOD,
1020 },
1021 },
1022 .slaves = omap2420_dss_venc_slaves,
1023 .slaves_cnt = ARRAY_SIZE(omap2420_dss_venc_slaves),
1024 .flags = HWMOD_NO_IDLEST,
1025};
1026
1027/* I2C common */
1028static struct omap_hwmod_class_sysconfig i2c_sysc = {
1029 .rev_offs = 0x00,
1030 .sysc_offs = 0x20,
1031 .syss_offs = 0x10,
1032 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1033 .sysc_fields = &omap_hwmod_sysc_type1,
1034};
1035
1036static struct omap_hwmod_class i2c_class = {
1037 .name = "i2c",
1038 .sysc = &i2c_sysc,
1039 .rev = OMAP_I2C_IP_VERSION_1,
1040 .reset = &omap_i2c_reset,
1041};
1042
1043static struct omap_i2c_dev_attr i2c_dev_attr = {
1044 .flags = OMAP_I2C_FLAG_NO_FIFO |
1045 OMAP_I2C_FLAG_SIMPLE_CLOCK |
1046 OMAP_I2C_FLAG_16BIT_DATA_REG |
1047 OMAP_I2C_FLAG_BUS_SHIFT_2,
1048};
1049
1050/* I2C1 */
1051
1052static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = {
1053 &omap2420_l4_core__i2c1,
1054};
1055
1056static struct omap_hwmod omap2420_i2c1_hwmod = {
1057 .name = "i2c1",
1058 .mpu_irqs = omap2_i2c1_mpu_irqs,
1059 .sdma_reqs = omap2_i2c1_sdma_reqs,
1060 .main_clk = "i2c1_fck",
1061 .prcm = {
1062 .omap2 = {
1063 .module_offs = CORE_MOD,
1064 .prcm_reg_id = 1,
1065 .module_bit = OMAP2420_EN_I2C1_SHIFT,
1066 .idlest_reg_id = 1,
1067 .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
1068 },
1069 },
1070 .slaves = omap2420_i2c1_slaves,
1071 .slaves_cnt = ARRAY_SIZE(omap2420_i2c1_slaves),
1072 .class = &i2c_class,
1073 .dev_attr = &i2c_dev_attr,
1074 .flags = HWMOD_16BIT_REG,
1075};
1076
1077/* I2C2 */
1078
1079static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = {
1080 &omap2420_l4_core__i2c2,
1081};
1082
1083static struct omap_hwmod omap2420_i2c2_hwmod = {
1084 .name = "i2c2",
1085 .mpu_irqs = omap2_i2c2_mpu_irqs,
1086 .sdma_reqs = omap2_i2c2_sdma_reqs,
1087 .main_clk = "i2c2_fck",
1088 .prcm = {
1089 .omap2 = {
1090 .module_offs = CORE_MOD,
1091 .prcm_reg_id = 1,
1092 .module_bit = OMAP2420_EN_I2C2_SHIFT,
1093 .idlest_reg_id = 1,
1094 .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
1095 },
1096 },
1097 .slaves = omap2420_i2c2_slaves,
1098 .slaves_cnt = ARRAY_SIZE(omap2420_i2c2_slaves),
1099 .class = &i2c_class,
1100 .dev_attr = &i2c_dev_attr,
1101 .flags = HWMOD_16BIT_REG,
1102};
1103
1104/* l4_wkup -> gpio1 */ 316/* l4_wkup -> gpio1 */
1105static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = { 317static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = {
1106 { 318 {
@@ -1112,8 +324,8 @@ static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = {
1112}; 324};
1113 325
1114static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = { 326static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
1115 .master = &omap2420_l4_wkup_hwmod, 327 .master = &omap2xxx_l4_wkup_hwmod,
1116 .slave = &omap2420_gpio1_hwmod, 328 .slave = &omap2xxx_gpio1_hwmod,
1117 .clk = "gpios_ick", 329 .clk = "gpios_ick",
1118 .addr = omap2420_gpio1_addr_space, 330 .addr = omap2420_gpio1_addr_space,
1119 .user = OCP_USER_MPU | OCP_USER_SDMA, 331 .user = OCP_USER_MPU | OCP_USER_SDMA,
@@ -1130,8 +342,8 @@ static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = {
1130}; 342};
1131 343
1132static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = { 344static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
1133 .master = &omap2420_l4_wkup_hwmod, 345 .master = &omap2xxx_l4_wkup_hwmod,
1134 .slave = &omap2420_gpio2_hwmod, 346 .slave = &omap2xxx_gpio2_hwmod,
1135 .clk = "gpios_ick", 347 .clk = "gpios_ick",
1136 .addr = omap2420_gpio2_addr_space, 348 .addr = omap2420_gpio2_addr_space,
1137 .user = OCP_USER_MPU | OCP_USER_SDMA, 349 .user = OCP_USER_MPU | OCP_USER_SDMA,
@@ -1148,8 +360,8 @@ static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = {
1148}; 360};
1149 361
1150static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = { 362static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
1151 .master = &omap2420_l4_wkup_hwmod, 363 .master = &omap2xxx_l4_wkup_hwmod,
1152 .slave = &omap2420_gpio3_hwmod, 364 .slave = &omap2xxx_gpio3_hwmod,
1153 .clk = "gpios_ick", 365 .clk = "gpios_ick",
1154 .addr = omap2420_gpio3_addr_space, 366 .addr = omap2420_gpio3_addr_space,
1155 .user = OCP_USER_MPU | OCP_USER_SDMA, 367 .user = OCP_USER_MPU | OCP_USER_SDMA,
@@ -1166,408 +378,100 @@ static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = {
1166}; 378};
1167 379
1168static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = { 380static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
1169 .master = &omap2420_l4_wkup_hwmod, 381 .master = &omap2xxx_l4_wkup_hwmod,
1170 .slave = &omap2420_gpio4_hwmod, 382 .slave = &omap2xxx_gpio4_hwmod,
1171 .clk = "gpios_ick", 383 .clk = "gpios_ick",
1172 .addr = omap2420_gpio4_addr_space, 384 .addr = omap2420_gpio4_addr_space,
1173 .user = OCP_USER_MPU | OCP_USER_SDMA, 385 .user = OCP_USER_MPU | OCP_USER_SDMA,
1174}; 386};
1175 387
1176/* gpio dev_attr */
1177static struct omap_gpio_dev_attr gpio_dev_attr = {
1178 .bank_width = 32,
1179 .dbck_flag = false,
1180};
1181
1182/* gpio1 */
1183static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = {
1184 &omap2420_l4_wkup__gpio1,
1185};
1186
1187static struct omap_hwmod omap2420_gpio1_hwmod = {
1188 .name = "gpio1",
1189 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1190 .mpu_irqs = omap2_gpio1_irqs,
1191 .main_clk = "gpios_fck",
1192 .prcm = {
1193 .omap2 = {
1194 .prcm_reg_id = 1,
1195 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1196 .module_offs = WKUP_MOD,
1197 .idlest_reg_id = 1,
1198 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1199 },
1200 },
1201 .slaves = omap2420_gpio1_slaves,
1202 .slaves_cnt = ARRAY_SIZE(omap2420_gpio1_slaves),
1203 .class = &omap2xxx_gpio_hwmod_class,
1204 .dev_attr = &gpio_dev_attr,
1205};
1206
1207/* gpio2 */
1208static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = {
1209 &omap2420_l4_wkup__gpio2,
1210};
1211
1212static struct omap_hwmod omap2420_gpio2_hwmod = {
1213 .name = "gpio2",
1214 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1215 .mpu_irqs = omap2_gpio2_irqs,
1216 .main_clk = "gpios_fck",
1217 .prcm = {
1218 .omap2 = {
1219 .prcm_reg_id = 1,
1220 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1221 .module_offs = WKUP_MOD,
1222 .idlest_reg_id = 1,
1223 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1224 },
1225 },
1226 .slaves = omap2420_gpio2_slaves,
1227 .slaves_cnt = ARRAY_SIZE(omap2420_gpio2_slaves),
1228 .class = &omap2xxx_gpio_hwmod_class,
1229 .dev_attr = &gpio_dev_attr,
1230};
1231
1232/* gpio3 */
1233static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = {
1234 &omap2420_l4_wkup__gpio3,
1235};
1236
1237static struct omap_hwmod omap2420_gpio3_hwmod = {
1238 .name = "gpio3",
1239 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1240 .mpu_irqs = omap2_gpio3_irqs,
1241 .main_clk = "gpios_fck",
1242 .prcm = {
1243 .omap2 = {
1244 .prcm_reg_id = 1,
1245 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1246 .module_offs = WKUP_MOD,
1247 .idlest_reg_id = 1,
1248 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1249 },
1250 },
1251 .slaves = omap2420_gpio3_slaves,
1252 .slaves_cnt = ARRAY_SIZE(omap2420_gpio3_slaves),
1253 .class = &omap2xxx_gpio_hwmod_class,
1254 .dev_attr = &gpio_dev_attr,
1255};
1256
1257/* gpio4 */
1258static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = {
1259 &omap2420_l4_wkup__gpio4,
1260};
1261
1262static struct omap_hwmod omap2420_gpio4_hwmod = {
1263 .name = "gpio4",
1264 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1265 .mpu_irqs = omap2_gpio4_irqs,
1266 .main_clk = "gpios_fck",
1267 .prcm = {
1268 .omap2 = {
1269 .prcm_reg_id = 1,
1270 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1271 .module_offs = WKUP_MOD,
1272 .idlest_reg_id = 1,
1273 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1274 },
1275 },
1276 .slaves = omap2420_gpio4_slaves,
1277 .slaves_cnt = ARRAY_SIZE(omap2420_gpio4_slaves),
1278 .class = &omap2xxx_gpio_hwmod_class,
1279 .dev_attr = &gpio_dev_attr,
1280};
1281
1282/* dma attributes */
1283static struct omap_dma_dev_attr dma_dev_attr = {
1284 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1285 IS_CSSA_32 | IS_CDSA_32,
1286 .lch_count = 32,
1287};
1288
1289/* dma_system -> L3 */ 388/* dma_system -> L3 */
1290static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = { 389static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {
1291 .master = &omap2420_dma_system_hwmod, 390 .master = &omap2420_dma_system_hwmod,
1292 .slave = &omap2420_l3_main_hwmod, 391 .slave = &omap2xxx_l3_main_hwmod,
1293 .clk = "core_l3_ck", 392 .clk = "core_l3_ck",
1294 .user = OCP_USER_MPU | OCP_USER_SDMA, 393 .user = OCP_USER_MPU | OCP_USER_SDMA,
1295}; 394};
1296 395
1297/* dma_system master ports */
1298static struct omap_hwmod_ocp_if *omap2420_dma_system_masters[] = {
1299 &omap2420_dma_system__l3,
1300};
1301
1302/* l4_core -> dma_system */ 396/* l4_core -> dma_system */
1303static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = { 397static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {
1304 .master = &omap2420_l4_core_hwmod, 398 .master = &omap2xxx_l4_core_hwmod,
1305 .slave = &omap2420_dma_system_hwmod, 399 .slave = &omap2420_dma_system_hwmod,
1306 .clk = "sdma_ick", 400 .clk = "sdma_ick",
1307 .addr = omap2_dma_system_addrs, 401 .addr = omap2_dma_system_addrs,
1308 .user = OCP_USER_MPU | OCP_USER_SDMA, 402 .user = OCP_USER_MPU | OCP_USER_SDMA,
1309}; 403};
1310 404
1311/* dma_system slave ports */
1312static struct omap_hwmod_ocp_if *omap2420_dma_system_slaves[] = {
1313 &omap2420_l4_core__dma_system,
1314};
1315
1316static struct omap_hwmod omap2420_dma_system_hwmod = {
1317 .name = "dma",
1318 .class = &omap2xxx_dma_hwmod_class,
1319 .mpu_irqs = omap2_dma_system_irqs,
1320 .main_clk = "core_l3_ck",
1321 .slaves = omap2420_dma_system_slaves,
1322 .slaves_cnt = ARRAY_SIZE(omap2420_dma_system_slaves),
1323 .masters = omap2420_dma_system_masters,
1324 .masters_cnt = ARRAY_SIZE(omap2420_dma_system_masters),
1325 .dev_attr = &dma_dev_attr,
1326 .flags = HWMOD_NO_IDLEST,
1327};
1328
1329/* mailbox */
1330static struct omap_hwmod omap2420_mailbox_hwmod;
1331static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
1332 { .name = "dsp", .irq = 26 },
1333 { .name = "iva", .irq = 34 },
1334 { .irq = -1 }
1335};
1336
1337/* l4_core -> mailbox */ 405/* l4_core -> mailbox */
1338static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = { 406static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
1339 .master = &omap2420_l4_core_hwmod, 407 .master = &omap2xxx_l4_core_hwmod,
1340 .slave = &omap2420_mailbox_hwmod, 408 .slave = &omap2420_mailbox_hwmod,
1341 .addr = omap2_mailbox_addrs, 409 .addr = omap2_mailbox_addrs,
1342 .user = OCP_USER_MPU | OCP_USER_SDMA, 410 .user = OCP_USER_MPU | OCP_USER_SDMA,
1343}; 411};
1344 412
1345/* mailbox slave ports */
1346static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = {
1347 &omap2420_l4_core__mailbox,
1348};
1349
1350static struct omap_hwmod omap2420_mailbox_hwmod = {
1351 .name = "mailbox",
1352 .class = &omap2xxx_mailbox_hwmod_class,
1353 .mpu_irqs = omap2420_mailbox_irqs,
1354 .main_clk = "mailboxes_ick",
1355 .prcm = {
1356 .omap2 = {
1357 .prcm_reg_id = 1,
1358 .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
1359 .module_offs = CORE_MOD,
1360 .idlest_reg_id = 1,
1361 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
1362 },
1363 },
1364 .slaves = omap2420_mailbox_slaves,
1365 .slaves_cnt = ARRAY_SIZE(omap2420_mailbox_slaves),
1366};
1367
1368/* mcspi1 */
1369static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = {
1370 &omap2420_l4_core__mcspi1,
1371};
1372
1373static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1374 .num_chipselect = 4,
1375};
1376
1377static struct omap_hwmod omap2420_mcspi1_hwmod = {
1378 .name = "mcspi1_hwmod",
1379 .mpu_irqs = omap2_mcspi1_mpu_irqs,
1380 .sdma_reqs = omap2_mcspi1_sdma_reqs,
1381 .main_clk = "mcspi1_fck",
1382 .prcm = {
1383 .omap2 = {
1384 .module_offs = CORE_MOD,
1385 .prcm_reg_id = 1,
1386 .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1387 .idlest_reg_id = 1,
1388 .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
1389 },
1390 },
1391 .slaves = omap2420_mcspi1_slaves,
1392 .slaves_cnt = ARRAY_SIZE(omap2420_mcspi1_slaves),
1393 .class = &omap2xxx_mcspi_class,
1394 .dev_attr = &omap_mcspi1_dev_attr,
1395};
1396
1397/* mcspi2 */
1398static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = {
1399 &omap2420_l4_core__mcspi2,
1400};
1401
1402static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1403 .num_chipselect = 2,
1404};
1405
1406static struct omap_hwmod omap2420_mcspi2_hwmod = {
1407 .name = "mcspi2_hwmod",
1408 .mpu_irqs = omap2_mcspi2_mpu_irqs,
1409 .sdma_reqs = omap2_mcspi2_sdma_reqs,
1410 .main_clk = "mcspi2_fck",
1411 .prcm = {
1412 .omap2 = {
1413 .module_offs = CORE_MOD,
1414 .prcm_reg_id = 1,
1415 .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1416 .idlest_reg_id = 1,
1417 .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
1418 },
1419 },
1420 .slaves = omap2420_mcspi2_slaves,
1421 .slaves_cnt = ARRAY_SIZE(omap2420_mcspi2_slaves),
1422 .class = &omap2xxx_mcspi_class,
1423 .dev_attr = &omap_mcspi2_dev_attr,
1424};
1425
1426/*
1427 * 'mcbsp' class
1428 * multi channel buffered serial port controller
1429 */
1430
1431static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
1432 .name = "mcbsp",
1433};
1434
1435/* mcbsp1 */
1436static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
1437 { .name = "tx", .irq = 59 },
1438 { .name = "rx", .irq = 60 },
1439 { .irq = -1 }
1440};
1441
1442/* l4_core -> mcbsp1 */ 413/* l4_core -> mcbsp1 */
1443static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = { 414static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
1444 .master = &omap2420_l4_core_hwmod, 415 .master = &omap2xxx_l4_core_hwmod,
1445 .slave = &omap2420_mcbsp1_hwmod, 416 .slave = &omap2420_mcbsp1_hwmod,
1446 .clk = "mcbsp1_ick", 417 .clk = "mcbsp1_ick",
1447 .addr = omap2_mcbsp1_addrs, 418 .addr = omap2_mcbsp1_addrs,
1448 .user = OCP_USER_MPU | OCP_USER_SDMA, 419 .user = OCP_USER_MPU | OCP_USER_SDMA,
1449}; 420};
1450 421
1451/* mcbsp1 slave ports */
1452static struct omap_hwmod_ocp_if *omap2420_mcbsp1_slaves[] = {
1453 &omap2420_l4_core__mcbsp1,
1454};
1455
1456static struct omap_hwmod omap2420_mcbsp1_hwmod = {
1457 .name = "mcbsp1",
1458 .class = &omap2420_mcbsp_hwmod_class,
1459 .mpu_irqs = omap2420_mcbsp1_irqs,
1460 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
1461 .main_clk = "mcbsp1_fck",
1462 .prcm = {
1463 .omap2 = {
1464 .prcm_reg_id = 1,
1465 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1466 .module_offs = CORE_MOD,
1467 .idlest_reg_id = 1,
1468 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
1469 },
1470 },
1471 .slaves = omap2420_mcbsp1_slaves,
1472 .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp1_slaves),
1473};
1474
1475/* mcbsp2 */
1476static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
1477 { .name = "tx", .irq = 62 },
1478 { .name = "rx", .irq = 63 },
1479 { .irq = -1 }
1480};
1481
1482/* l4_core -> mcbsp2 */ 422/* l4_core -> mcbsp2 */
1483static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = { 423static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
1484 .master = &omap2420_l4_core_hwmod, 424 .master = &omap2xxx_l4_core_hwmod,
1485 .slave = &omap2420_mcbsp2_hwmod, 425 .slave = &omap2420_mcbsp2_hwmod,
1486 .clk = "mcbsp2_ick", 426 .clk = "mcbsp2_ick",
1487 .addr = omap2xxx_mcbsp2_addrs, 427 .addr = omap2xxx_mcbsp2_addrs,
1488 .user = OCP_USER_MPU | OCP_USER_SDMA, 428 .user = OCP_USER_MPU | OCP_USER_SDMA,
1489}; 429};
1490 430
1491/* mcbsp2 slave ports */ 431static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = {
1492static struct omap_hwmod_ocp_if *omap2420_mcbsp2_slaves[] = { 432 &omap2xxx_l3_main__l4_core,
433 &omap2xxx_mpu__l3_main,
434 &omap2xxx_dss__l3,
435 &omap2xxx_l4_core__mcspi1,
436 &omap2xxx_l4_core__mcspi2,
437 &omap2xxx_l4_core__l4_wkup,
438 &omap2_l4_core__uart1,
439 &omap2_l4_core__uart2,
440 &omap2_l4_core__uart3,
441 &omap2420_l4_core__i2c1,
442 &omap2420_l4_core__i2c2,
443 &omap2420_l3__iva,
444 &omap2420_l3__dsp,
445 &omap2420_l4_wkup__timer1,
446 &omap2xxx_l4_core__timer2,
447 &omap2xxx_l4_core__timer3,
448 &omap2xxx_l4_core__timer4,
449 &omap2xxx_l4_core__timer5,
450 &omap2xxx_l4_core__timer6,
451 &omap2xxx_l4_core__timer7,
452 &omap2xxx_l4_core__timer8,
453 &omap2xxx_l4_core__timer9,
454 &omap2xxx_l4_core__timer10,
455 &omap2xxx_l4_core__timer11,
456 &omap2xxx_l4_core__timer12,
457 &omap2420_l4_wkup__wd_timer2,
458 &omap2xxx_l4_core__dss,
459 &omap2xxx_l4_core__dss_dispc,
460 &omap2xxx_l4_core__dss_rfbi,
461 &omap2xxx_l4_core__dss_venc,
462 &omap2420_l4_wkup__gpio1,
463 &omap2420_l4_wkup__gpio2,
464 &omap2420_l4_wkup__gpio3,
465 &omap2420_l4_wkup__gpio4,
466 &omap2420_dma_system__l3,
467 &omap2420_l4_core__dma_system,
468 &omap2420_l4_core__mailbox,
469 &omap2420_l4_core__mcbsp1,
1493 &omap2420_l4_core__mcbsp2, 470 &omap2420_l4_core__mcbsp2,
1494};
1495
1496static struct omap_hwmod omap2420_mcbsp2_hwmod = {
1497 .name = "mcbsp2",
1498 .class = &omap2420_mcbsp_hwmod_class,
1499 .mpu_irqs = omap2420_mcbsp2_irqs,
1500 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
1501 .main_clk = "mcbsp2_fck",
1502 .prcm = {
1503 .omap2 = {
1504 .prcm_reg_id = 1,
1505 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1506 .module_offs = CORE_MOD,
1507 .idlest_reg_id = 1,
1508 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
1509 },
1510 },
1511 .slaves = omap2420_mcbsp2_slaves,
1512 .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp2_slaves),
1513};
1514
1515static __initdata struct omap_hwmod *omap2420_hwmods[] = {
1516 &omap2420_l3_main_hwmod,
1517 &omap2420_l4_core_hwmod,
1518 &omap2420_l4_wkup_hwmod,
1519 &omap2420_mpu_hwmod,
1520 &omap2420_iva_hwmod,
1521
1522 &omap2420_timer1_hwmod,
1523 &omap2420_timer2_hwmod,
1524 &omap2420_timer3_hwmod,
1525 &omap2420_timer4_hwmod,
1526 &omap2420_timer5_hwmod,
1527 &omap2420_timer6_hwmod,
1528 &omap2420_timer7_hwmod,
1529 &omap2420_timer8_hwmod,
1530 &omap2420_timer9_hwmod,
1531 &omap2420_timer10_hwmod,
1532 &omap2420_timer11_hwmod,
1533 &omap2420_timer12_hwmod,
1534
1535 &omap2420_wd_timer2_hwmod,
1536 &omap2420_uart1_hwmod,
1537 &omap2420_uart2_hwmod,
1538 &omap2420_uart3_hwmod,
1539 /* dss class */
1540 &omap2420_dss_core_hwmod,
1541 &omap2420_dss_dispc_hwmod,
1542 &omap2420_dss_rfbi_hwmod,
1543 &omap2420_dss_venc_hwmod,
1544 /* i2c class */
1545 &omap2420_i2c1_hwmod,
1546 &omap2420_i2c2_hwmod,
1547
1548 /* gpio class */
1549 &omap2420_gpio1_hwmod,
1550 &omap2420_gpio2_hwmod,
1551 &omap2420_gpio3_hwmod,
1552 &omap2420_gpio4_hwmod,
1553
1554 /* dma_system class*/
1555 &omap2420_dma_system_hwmod,
1556
1557 /* mailbox class */
1558 &omap2420_mailbox_hwmod,
1559
1560 /* mcbsp class */
1561 &omap2420_mcbsp1_hwmod,
1562 &omap2420_mcbsp2_hwmod,
1563
1564 /* mcspi class */
1565 &omap2420_mcspi1_hwmod,
1566 &omap2420_mcspi2_hwmod,
1567 NULL, 471 NULL,
1568}; 472};
1569 473
1570int __init omap2420_hwmod_init(void) 474int __init omap2420_hwmod_init(void)
1571{ 475{
1572 return omap_hwmod_register(omap2420_hwmods); 476 return omap_hwmod_register_links(omap2420_hwmod_ocp_ifs);
1573} 477}
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 04a3885f4475..71d9f8824f9d 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -2,6 +2,7 @@
2 * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips 2 * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
3 * 3 *
4 * Copyright (C) 2009-2011 Nokia Corporation 4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2012 Texas Instruments, Inc.
5 * Paul Walmsley 6 * Paul Walmsley
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
@@ -33,1044 +34,29 @@
33/* 34/*
34 * OMAP2430 hardware module integration data 35 * OMAP2430 hardware module integration data
35 * 36 *
36 * ALl of the data in this section should be autogeneratable from the 37 * All of the data in this section should be autogeneratable from the
37 * TI hardware database or other technical documentation. Data that 38 * TI hardware database or other technical documentation. Data that
38 * is driver-specific or driver-kernel integration-specific belongs 39 * is driver-specific or driver-kernel integration-specific belongs
39 * elsewhere. 40 * elsewhere.
40 */ 41 */
41 42
42static struct omap_hwmod omap2430_mpu_hwmod;
43static struct omap_hwmod omap2430_iva_hwmod;
44static struct omap_hwmod omap2430_l3_main_hwmod;
45static struct omap_hwmod omap2430_l4_core_hwmod;
46static struct omap_hwmod omap2430_dss_core_hwmod;
47static struct omap_hwmod omap2430_dss_dispc_hwmod;
48static struct omap_hwmod omap2430_dss_rfbi_hwmod;
49static struct omap_hwmod omap2430_dss_venc_hwmod;
50static struct omap_hwmod omap2430_wd_timer2_hwmod;
51static struct omap_hwmod omap2430_gpio1_hwmod;
52static struct omap_hwmod omap2430_gpio2_hwmod;
53static struct omap_hwmod omap2430_gpio3_hwmod;
54static struct omap_hwmod omap2430_gpio4_hwmod;
55static struct omap_hwmod omap2430_gpio5_hwmod;
56static struct omap_hwmod omap2430_dma_system_hwmod;
57static struct omap_hwmod omap2430_mcbsp1_hwmod;
58static struct omap_hwmod omap2430_mcbsp2_hwmod;
59static struct omap_hwmod omap2430_mcbsp3_hwmod;
60static struct omap_hwmod omap2430_mcbsp4_hwmod;
61static struct omap_hwmod omap2430_mcbsp5_hwmod;
62static struct omap_hwmod omap2430_mcspi1_hwmod;
63static struct omap_hwmod omap2430_mcspi2_hwmod;
64static struct omap_hwmod omap2430_mcspi3_hwmod;
65static struct omap_hwmod omap2430_mmc1_hwmod;
66static struct omap_hwmod omap2430_mmc2_hwmod;
67
68/* L3 -> L4_CORE interface */
69static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
70 .master = &omap2430_l3_main_hwmod,
71 .slave = &omap2430_l4_core_hwmod,
72 .user = OCP_USER_MPU | OCP_USER_SDMA,
73};
74
75/* MPU -> L3 interface */
76static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
77 .master = &omap2430_mpu_hwmod,
78 .slave = &omap2430_l3_main_hwmod,
79 .user = OCP_USER_MPU,
80};
81
82/* Slave interfaces on the L3 interconnect */
83static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
84 &omap2430_mpu__l3_main,
85};
86
87/* DSS -> l3 */
88static struct omap_hwmod_ocp_if omap2430_dss__l3 = {
89 .master = &omap2430_dss_core_hwmod,
90 .slave = &omap2430_l3_main_hwmod,
91 .fw = {
92 .omap2 = {
93 .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
94 .flags = OMAP_FIREWALL_L3,
95 }
96 },
97 .user = OCP_USER_MPU | OCP_USER_SDMA,
98};
99
100/* Master interfaces on the L3 interconnect */
101static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
102 &omap2430_l3_main__l4_core,
103};
104
105/* L3 */
106static struct omap_hwmod omap2430_l3_main_hwmod = {
107 .name = "l3_main",
108 .class = &l3_hwmod_class,
109 .masters = omap2430_l3_main_masters,
110 .masters_cnt = ARRAY_SIZE(omap2430_l3_main_masters),
111 .slaves = omap2430_l3_main_slaves,
112 .slaves_cnt = ARRAY_SIZE(omap2430_l3_main_slaves),
113 .flags = HWMOD_NO_IDLEST,
114};
115
116static struct omap_hwmod omap2430_l4_wkup_hwmod;
117static struct omap_hwmod omap2430_uart1_hwmod;
118static struct omap_hwmod omap2430_uart2_hwmod;
119static struct omap_hwmod omap2430_uart3_hwmod;
120static struct omap_hwmod omap2430_i2c1_hwmod;
121static struct omap_hwmod omap2430_i2c2_hwmod;
122
123static struct omap_hwmod omap2430_usbhsotg_hwmod;
124
125/* l3_core -> usbhsotg interface */
126static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
127 .master = &omap2430_usbhsotg_hwmod,
128 .slave = &omap2430_l3_main_hwmod,
129 .clk = "core_l3_ck",
130 .user = OCP_USER_MPU,
131};
132
133/* L4 CORE -> I2C1 interface */
134static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
135 .master = &omap2430_l4_core_hwmod,
136 .slave = &omap2430_i2c1_hwmod,
137 .clk = "i2c1_ick",
138 .addr = omap2_i2c1_addr_space,
139 .user = OCP_USER_MPU | OCP_USER_SDMA,
140};
141
142/* L4 CORE -> I2C2 interface */
143static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
144 .master = &omap2430_l4_core_hwmod,
145 .slave = &omap2430_i2c2_hwmod,
146 .clk = "i2c2_ick",
147 .addr = omap2_i2c2_addr_space,
148 .user = OCP_USER_MPU | OCP_USER_SDMA,
149};
150
151/* L4_CORE -> L4_WKUP interface */
152static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
153 .master = &omap2430_l4_core_hwmod,
154 .slave = &omap2430_l4_wkup_hwmod,
155 .user = OCP_USER_MPU | OCP_USER_SDMA,
156};
157
158/* L4 CORE -> UART1 interface */
159static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
160 .master = &omap2430_l4_core_hwmod,
161 .slave = &omap2430_uart1_hwmod,
162 .clk = "uart1_ick",
163 .addr = omap2xxx_uart1_addr_space,
164 .user = OCP_USER_MPU | OCP_USER_SDMA,
165};
166
167/* L4 CORE -> UART2 interface */
168static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
169 .master = &omap2430_l4_core_hwmod,
170 .slave = &omap2430_uart2_hwmod,
171 .clk = "uart2_ick",
172 .addr = omap2xxx_uart2_addr_space,
173 .user = OCP_USER_MPU | OCP_USER_SDMA,
174};
175
176/* L4 PER -> UART3 interface */
177static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
178 .master = &omap2430_l4_core_hwmod,
179 .slave = &omap2430_uart3_hwmod,
180 .clk = "uart3_ick",
181 .addr = omap2xxx_uart3_addr_space,
182 .user = OCP_USER_MPU | OCP_USER_SDMA,
183};
184
185/* 43/*
186* usbhsotg interface data 44 * IP blocks
187*/
188static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
189 {
190 .pa_start = OMAP243X_HS_BASE,
191 .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
192 .flags = ADDR_TYPE_RT
193 },
194 { }
195};
196
197/* l4_core ->usbhsotg interface */
198static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
199 .master = &omap2430_l4_core_hwmod,
200 .slave = &omap2430_usbhsotg_hwmod,
201 .clk = "usb_l4_ick",
202 .addr = omap2430_usbhsotg_addrs,
203 .user = OCP_USER_MPU,
204};
205
206static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = {
207 &omap2430_usbhsotg__l3,
208};
209
210static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
211 &omap2430_l4_core__usbhsotg,
212};
213
214/* L4 CORE -> MMC1 interface */
215static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
216 .master = &omap2430_l4_core_hwmod,
217 .slave = &omap2430_mmc1_hwmod,
218 .clk = "mmchs1_ick",
219 .addr = omap2430_mmc1_addr_space,
220 .user = OCP_USER_MPU | OCP_USER_SDMA,
221};
222
223/* L4 CORE -> MMC2 interface */
224static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
225 .master = &omap2430_l4_core_hwmod,
226 .slave = &omap2430_mmc2_hwmod,
227 .clk = "mmchs2_ick",
228 .addr = omap2430_mmc2_addr_space,
229 .user = OCP_USER_MPU | OCP_USER_SDMA,
230};
231
232/* Slave interfaces on the L4_CORE interconnect */
233static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
234 &omap2430_l3_main__l4_core,
235};
236
237/* Master interfaces on the L4_CORE interconnect */
238static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
239 &omap2430_l4_core__l4_wkup,
240 &omap2430_l4_core__mmc1,
241 &omap2430_l4_core__mmc2,
242};
243
244/* L4 CORE */
245static struct omap_hwmod omap2430_l4_core_hwmod = {
246 .name = "l4_core",
247 .class = &l4_hwmod_class,
248 .masters = omap2430_l4_core_masters,
249 .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
250 .slaves = omap2430_l4_core_slaves,
251 .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
252 .flags = HWMOD_NO_IDLEST,
253};
254
255/* Slave interfaces on the L4_WKUP interconnect */
256static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
257 &omap2430_l4_core__l4_wkup,
258 &omap2_l4_core__uart1,
259 &omap2_l4_core__uart2,
260 &omap2_l4_core__uart3,
261};
262
263/* Master interfaces on the L4_WKUP interconnect */
264static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
265};
266
267/* l4 core -> mcspi1 interface */
268static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {
269 .master = &omap2430_l4_core_hwmod,
270 .slave = &omap2430_mcspi1_hwmod,
271 .clk = "mcspi1_ick",
272 .addr = omap2_mcspi1_addr_space,
273 .user = OCP_USER_MPU | OCP_USER_SDMA,
274};
275
276/* l4 core -> mcspi2 interface */
277static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {
278 .master = &omap2430_l4_core_hwmod,
279 .slave = &omap2430_mcspi2_hwmod,
280 .clk = "mcspi2_ick",
281 .addr = omap2_mcspi2_addr_space,
282 .user = OCP_USER_MPU | OCP_USER_SDMA,
283};
284
285/* l4 core -> mcspi3 interface */
286static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
287 .master = &omap2430_l4_core_hwmod,
288 .slave = &omap2430_mcspi3_hwmod,
289 .clk = "mcspi3_ick",
290 .addr = omap2430_mcspi3_addr_space,
291 .user = OCP_USER_MPU | OCP_USER_SDMA,
292};
293
294/* L4 WKUP */
295static struct omap_hwmod omap2430_l4_wkup_hwmod = {
296 .name = "l4_wkup",
297 .class = &l4_hwmod_class,
298 .masters = omap2430_l4_wkup_masters,
299 .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
300 .slaves = omap2430_l4_wkup_slaves,
301 .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
302 .flags = HWMOD_NO_IDLEST,
303};
304
305/* Master interfaces on the MPU device */
306static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
307 &omap2430_mpu__l3_main,
308};
309
310/* MPU */
311static struct omap_hwmod omap2430_mpu_hwmod = {
312 .name = "mpu",
313 .class = &mpu_hwmod_class,
314 .main_clk = "mpu_ck",
315 .masters = omap2430_mpu_masters,
316 .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
317};
318
319/*
320 * IVA2_1 interface data
321 */ 45 */
322 46
323/* IVA2 <- L3 interface */ 47/* IVA2 (IVA2) */
324static struct omap_hwmod_ocp_if omap2430_l3__iva = { 48static struct omap_hwmod_rst_info omap2430_iva_resets[] = {
325 .master = &omap2430_l3_main_hwmod, 49 { .name = "logic", .rst_shift = 0 },
326 .slave = &omap2430_iva_hwmod, 50 { .name = "mmu", .rst_shift = 1 },
327 .clk = "dsp_fck",
328 .user = OCP_USER_MPU | OCP_USER_SDMA,
329};
330
331static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
332 &omap2430_l3__iva,
333}; 51};
334 52
335/*
336 * IVA2 (IVA2)
337 */
338
339static struct omap_hwmod omap2430_iva_hwmod = { 53static struct omap_hwmod omap2430_iva_hwmod = {
340 .name = "iva", 54 .name = "iva",
341 .class = &iva_hwmod_class, 55 .class = &iva_hwmod_class,
342 .masters = omap2430_iva_masters, 56 .clkdm_name = "dsp_clkdm",
343 .masters_cnt = ARRAY_SIZE(omap2430_iva_masters), 57 .rst_lines = omap2430_iva_resets,
344}; 58 .rst_lines_cnt = ARRAY_SIZE(omap2430_iva_resets),
345 59 .main_clk = "dsp_fck",
346/* always-on timers dev attribute */
347static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
348 .timer_capability = OMAP_TIMER_ALWON,
349};
350
351/* pwm timers dev attribute */
352static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
353 .timer_capability = OMAP_TIMER_HAS_PWM,
354};
355
356/* timer1 */
357static struct omap_hwmod omap2430_timer1_hwmod;
358
359static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
360 {
361 .pa_start = 0x49018000,
362 .pa_end = 0x49018000 + SZ_1K - 1,
363 .flags = ADDR_TYPE_RT
364 },
365 { }
366};
367
368/* l4_wkup -> timer1 */
369static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
370 .master = &omap2430_l4_wkup_hwmod,
371 .slave = &omap2430_timer1_hwmod,
372 .clk = "gpt1_ick",
373 .addr = omap2430_timer1_addrs,
374 .user = OCP_USER_MPU | OCP_USER_SDMA,
375};
376
377/* timer1 slave port */
378static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = {
379 &omap2430_l4_wkup__timer1,
380};
381
382/* timer1 hwmod */
383static struct omap_hwmod omap2430_timer1_hwmod = {
384 .name = "timer1",
385 .mpu_irqs = omap2_timer1_mpu_irqs,
386 .main_clk = "gpt1_fck",
387 .prcm = {
388 .omap2 = {
389 .prcm_reg_id = 1,
390 .module_bit = OMAP24XX_EN_GPT1_SHIFT,
391 .module_offs = WKUP_MOD,
392 .idlest_reg_id = 1,
393 .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
394 },
395 },
396 .dev_attr = &capability_alwon_dev_attr,
397 .slaves = omap2430_timer1_slaves,
398 .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves),
399 .class = &omap2xxx_timer_hwmod_class,
400};
401
402/* timer2 */
403static struct omap_hwmod omap2430_timer2_hwmod;
404
405/* l4_core -> timer2 */
406static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = {
407 .master = &omap2430_l4_core_hwmod,
408 .slave = &omap2430_timer2_hwmod,
409 .clk = "gpt2_ick",
410 .addr = omap2xxx_timer2_addrs,
411 .user = OCP_USER_MPU | OCP_USER_SDMA,
412};
413
414/* timer2 slave port */
415static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = {
416 &omap2430_l4_core__timer2,
417};
418
419/* timer2 hwmod */
420static struct omap_hwmod omap2430_timer2_hwmod = {
421 .name = "timer2",
422 .mpu_irqs = omap2_timer2_mpu_irqs,
423 .main_clk = "gpt2_fck",
424 .prcm = {
425 .omap2 = {
426 .prcm_reg_id = 1,
427 .module_bit = OMAP24XX_EN_GPT2_SHIFT,
428 .module_offs = CORE_MOD,
429 .idlest_reg_id = 1,
430 .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
431 },
432 },
433 .dev_attr = &capability_alwon_dev_attr,
434 .slaves = omap2430_timer2_slaves,
435 .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves),
436 .class = &omap2xxx_timer_hwmod_class,
437};
438
439/* timer3 */
440static struct omap_hwmod omap2430_timer3_hwmod;
441
442/* l4_core -> timer3 */
443static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = {
444 .master = &omap2430_l4_core_hwmod,
445 .slave = &omap2430_timer3_hwmod,
446 .clk = "gpt3_ick",
447 .addr = omap2xxx_timer3_addrs,
448 .user = OCP_USER_MPU | OCP_USER_SDMA,
449};
450
451/* timer3 slave port */
452static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = {
453 &omap2430_l4_core__timer3,
454};
455
456/* timer3 hwmod */
457static struct omap_hwmod omap2430_timer3_hwmod = {
458 .name = "timer3",
459 .mpu_irqs = omap2_timer3_mpu_irqs,
460 .main_clk = "gpt3_fck",
461 .prcm = {
462 .omap2 = {
463 .prcm_reg_id = 1,
464 .module_bit = OMAP24XX_EN_GPT3_SHIFT,
465 .module_offs = CORE_MOD,
466 .idlest_reg_id = 1,
467 .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
468 },
469 },
470 .dev_attr = &capability_alwon_dev_attr,
471 .slaves = omap2430_timer3_slaves,
472 .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves),
473 .class = &omap2xxx_timer_hwmod_class,
474};
475
476/* timer4 */
477static struct omap_hwmod omap2430_timer4_hwmod;
478
479/* l4_core -> timer4 */
480static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = {
481 .master = &omap2430_l4_core_hwmod,
482 .slave = &omap2430_timer4_hwmod,
483 .clk = "gpt4_ick",
484 .addr = omap2xxx_timer4_addrs,
485 .user = OCP_USER_MPU | OCP_USER_SDMA,
486};
487
488/* timer4 slave port */
489static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = {
490 &omap2430_l4_core__timer4,
491};
492
493/* timer4 hwmod */
494static struct omap_hwmod omap2430_timer4_hwmod = {
495 .name = "timer4",
496 .mpu_irqs = omap2_timer4_mpu_irqs,
497 .main_clk = "gpt4_fck",
498 .prcm = {
499 .omap2 = {
500 .prcm_reg_id = 1,
501 .module_bit = OMAP24XX_EN_GPT4_SHIFT,
502 .module_offs = CORE_MOD,
503 .idlest_reg_id = 1,
504 .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
505 },
506 },
507 .dev_attr = &capability_alwon_dev_attr,
508 .slaves = omap2430_timer4_slaves,
509 .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves),
510 .class = &omap2xxx_timer_hwmod_class,
511};
512
513/* timer5 */
514static struct omap_hwmod omap2430_timer5_hwmod;
515
516/* l4_core -> timer5 */
517static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = {
518 .master = &omap2430_l4_core_hwmod,
519 .slave = &omap2430_timer5_hwmod,
520 .clk = "gpt5_ick",
521 .addr = omap2xxx_timer5_addrs,
522 .user = OCP_USER_MPU | OCP_USER_SDMA,
523};
524
525/* timer5 slave port */
526static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = {
527 &omap2430_l4_core__timer5,
528};
529
530/* timer5 hwmod */
531static struct omap_hwmod omap2430_timer5_hwmod = {
532 .name = "timer5",
533 .mpu_irqs = omap2_timer5_mpu_irqs,
534 .main_clk = "gpt5_fck",
535 .prcm = {
536 .omap2 = {
537 .prcm_reg_id = 1,
538 .module_bit = OMAP24XX_EN_GPT5_SHIFT,
539 .module_offs = CORE_MOD,
540 .idlest_reg_id = 1,
541 .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
542 },
543 },
544 .dev_attr = &capability_alwon_dev_attr,
545 .slaves = omap2430_timer5_slaves,
546 .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves),
547 .class = &omap2xxx_timer_hwmod_class,
548};
549
550/* timer6 */
551static struct omap_hwmod omap2430_timer6_hwmod;
552
553/* l4_core -> timer6 */
554static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = {
555 .master = &omap2430_l4_core_hwmod,
556 .slave = &omap2430_timer6_hwmod,
557 .clk = "gpt6_ick",
558 .addr = omap2xxx_timer6_addrs,
559 .user = OCP_USER_MPU | OCP_USER_SDMA,
560};
561
562/* timer6 slave port */
563static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = {
564 &omap2430_l4_core__timer6,
565};
566
567/* timer6 hwmod */
568static struct omap_hwmod omap2430_timer6_hwmod = {
569 .name = "timer6",
570 .mpu_irqs = omap2_timer6_mpu_irqs,
571 .main_clk = "gpt6_fck",
572 .prcm = {
573 .omap2 = {
574 .prcm_reg_id = 1,
575 .module_bit = OMAP24XX_EN_GPT6_SHIFT,
576 .module_offs = CORE_MOD,
577 .idlest_reg_id = 1,
578 .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
579 },
580 },
581 .dev_attr = &capability_alwon_dev_attr,
582 .slaves = omap2430_timer6_slaves,
583 .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves),
584 .class = &omap2xxx_timer_hwmod_class,
585};
586
587/* timer7 */
588static struct omap_hwmod omap2430_timer7_hwmod;
589
590/* l4_core -> timer7 */
591static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = {
592 .master = &omap2430_l4_core_hwmod,
593 .slave = &omap2430_timer7_hwmod,
594 .clk = "gpt7_ick",
595 .addr = omap2xxx_timer7_addrs,
596 .user = OCP_USER_MPU | OCP_USER_SDMA,
597};
598
599/* timer7 slave port */
600static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = {
601 &omap2430_l4_core__timer7,
602};
603
604/* timer7 hwmod */
605static struct omap_hwmod omap2430_timer7_hwmod = {
606 .name = "timer7",
607 .mpu_irqs = omap2_timer7_mpu_irqs,
608 .main_clk = "gpt7_fck",
609 .prcm = {
610 .omap2 = {
611 .prcm_reg_id = 1,
612 .module_bit = OMAP24XX_EN_GPT7_SHIFT,
613 .module_offs = CORE_MOD,
614 .idlest_reg_id = 1,
615 .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
616 },
617 },
618 .dev_attr = &capability_alwon_dev_attr,
619 .slaves = omap2430_timer7_slaves,
620 .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves),
621 .class = &omap2xxx_timer_hwmod_class,
622};
623
624/* timer8 */
625static struct omap_hwmod omap2430_timer8_hwmod;
626
627/* l4_core -> timer8 */
628static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = {
629 .master = &omap2430_l4_core_hwmod,
630 .slave = &omap2430_timer8_hwmod,
631 .clk = "gpt8_ick",
632 .addr = omap2xxx_timer8_addrs,
633 .user = OCP_USER_MPU | OCP_USER_SDMA,
634};
635
636/* timer8 slave port */
637static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = {
638 &omap2430_l4_core__timer8,
639};
640
641/* timer8 hwmod */
642static struct omap_hwmod omap2430_timer8_hwmod = {
643 .name = "timer8",
644 .mpu_irqs = omap2_timer8_mpu_irqs,
645 .main_clk = "gpt8_fck",
646 .prcm = {
647 .omap2 = {
648 .prcm_reg_id = 1,
649 .module_bit = OMAP24XX_EN_GPT8_SHIFT,
650 .module_offs = CORE_MOD,
651 .idlest_reg_id = 1,
652 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
653 },
654 },
655 .dev_attr = &capability_alwon_dev_attr,
656 .slaves = omap2430_timer8_slaves,
657 .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves),
658 .class = &omap2xxx_timer_hwmod_class,
659};
660
661/* timer9 */
662static struct omap_hwmod omap2430_timer9_hwmod;
663
664/* l4_core -> timer9 */
665static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = {
666 .master = &omap2430_l4_core_hwmod,
667 .slave = &omap2430_timer9_hwmod,
668 .clk = "gpt9_ick",
669 .addr = omap2xxx_timer9_addrs,
670 .user = OCP_USER_MPU | OCP_USER_SDMA,
671};
672
673/* timer9 slave port */
674static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = {
675 &omap2430_l4_core__timer9,
676};
677
678/* timer9 hwmod */
679static struct omap_hwmod omap2430_timer9_hwmod = {
680 .name = "timer9",
681 .mpu_irqs = omap2_timer9_mpu_irqs,
682 .main_clk = "gpt9_fck",
683 .prcm = {
684 .omap2 = {
685 .prcm_reg_id = 1,
686 .module_bit = OMAP24XX_EN_GPT9_SHIFT,
687 .module_offs = CORE_MOD,
688 .idlest_reg_id = 1,
689 .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
690 },
691 },
692 .dev_attr = &capability_pwm_dev_attr,
693 .slaves = omap2430_timer9_slaves,
694 .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves),
695 .class = &omap2xxx_timer_hwmod_class,
696};
697
698/* timer10 */
699static struct omap_hwmod omap2430_timer10_hwmod;
700
701/* l4_core -> timer10 */
702static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = {
703 .master = &omap2430_l4_core_hwmod,
704 .slave = &omap2430_timer10_hwmod,
705 .clk = "gpt10_ick",
706 .addr = omap2_timer10_addrs,
707 .user = OCP_USER_MPU | OCP_USER_SDMA,
708};
709
710/* timer10 slave port */
711static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = {
712 &omap2430_l4_core__timer10,
713};
714
715/* timer10 hwmod */
716static struct omap_hwmod omap2430_timer10_hwmod = {
717 .name = "timer10",
718 .mpu_irqs = omap2_timer10_mpu_irqs,
719 .main_clk = "gpt10_fck",
720 .prcm = {
721 .omap2 = {
722 .prcm_reg_id = 1,
723 .module_bit = OMAP24XX_EN_GPT10_SHIFT,
724 .module_offs = CORE_MOD,
725 .idlest_reg_id = 1,
726 .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
727 },
728 },
729 .dev_attr = &capability_pwm_dev_attr,
730 .slaves = omap2430_timer10_slaves,
731 .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves),
732 .class = &omap2xxx_timer_hwmod_class,
733};
734
735/* timer11 */
736static struct omap_hwmod omap2430_timer11_hwmod;
737
738/* l4_core -> timer11 */
739static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = {
740 .master = &omap2430_l4_core_hwmod,
741 .slave = &omap2430_timer11_hwmod,
742 .clk = "gpt11_ick",
743 .addr = omap2_timer11_addrs,
744 .user = OCP_USER_MPU | OCP_USER_SDMA,
745};
746
747/* timer11 slave port */
748static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = {
749 &omap2430_l4_core__timer11,
750};
751
752/* timer11 hwmod */
753static struct omap_hwmod omap2430_timer11_hwmod = {
754 .name = "timer11",
755 .mpu_irqs = omap2_timer11_mpu_irqs,
756 .main_clk = "gpt11_fck",
757 .prcm = {
758 .omap2 = {
759 .prcm_reg_id = 1,
760 .module_bit = OMAP24XX_EN_GPT11_SHIFT,
761 .module_offs = CORE_MOD,
762 .idlest_reg_id = 1,
763 .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
764 },
765 },
766 .dev_attr = &capability_pwm_dev_attr,
767 .slaves = omap2430_timer11_slaves,
768 .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves),
769 .class = &omap2xxx_timer_hwmod_class,
770};
771
772/* timer12 */
773static struct omap_hwmod omap2430_timer12_hwmod;
774
775/* l4_core -> timer12 */
776static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = {
777 .master = &omap2430_l4_core_hwmod,
778 .slave = &omap2430_timer12_hwmod,
779 .clk = "gpt12_ick",
780 .addr = omap2xxx_timer12_addrs,
781 .user = OCP_USER_MPU | OCP_USER_SDMA,
782};
783
784/* timer12 slave port */
785static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = {
786 &omap2430_l4_core__timer12,
787};
788
789/* timer12 hwmod */
790static struct omap_hwmod omap2430_timer12_hwmod = {
791 .name = "timer12",
792 .mpu_irqs = omap2xxx_timer12_mpu_irqs,
793 .main_clk = "gpt12_fck",
794 .prcm = {
795 .omap2 = {
796 .prcm_reg_id = 1,
797 .module_bit = OMAP24XX_EN_GPT12_SHIFT,
798 .module_offs = CORE_MOD,
799 .idlest_reg_id = 1,
800 .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
801 },
802 },
803 .dev_attr = &capability_pwm_dev_attr,
804 .slaves = omap2430_timer12_slaves,
805 .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves),
806 .class = &omap2xxx_timer_hwmod_class,
807};
808
809/* l4_wkup -> wd_timer2 */
810static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
811 {
812 .pa_start = 0x49016000,
813 .pa_end = 0x4901607f,
814 .flags = ADDR_TYPE_RT
815 },
816 { }
817};
818
819static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
820 .master = &omap2430_l4_wkup_hwmod,
821 .slave = &omap2430_wd_timer2_hwmod,
822 .clk = "mpu_wdt_ick",
823 .addr = omap2430_wd_timer2_addrs,
824 .user = OCP_USER_MPU | OCP_USER_SDMA,
825};
826
827/* wd_timer2 */
828static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
829 &omap2430_l4_wkup__wd_timer2,
830};
831
832static struct omap_hwmod omap2430_wd_timer2_hwmod = {
833 .name = "wd_timer2",
834 .class = &omap2xxx_wd_timer_hwmod_class,
835 .main_clk = "mpu_wdt_fck",
836 .prcm = {
837 .omap2 = {
838 .prcm_reg_id = 1,
839 .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
840 .module_offs = WKUP_MOD,
841 .idlest_reg_id = 1,
842 .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
843 },
844 },
845 .slaves = omap2430_wd_timer2_slaves,
846 .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves),
847};
848
849/* UART1 */
850
851static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
852 &omap2_l4_core__uart1,
853};
854
855static struct omap_hwmod omap2430_uart1_hwmod = {
856 .name = "uart1",
857 .mpu_irqs = omap2_uart1_mpu_irqs,
858 .sdma_reqs = omap2_uart1_sdma_reqs,
859 .main_clk = "uart1_fck",
860 .prcm = {
861 .omap2 = {
862 .module_offs = CORE_MOD,
863 .prcm_reg_id = 1,
864 .module_bit = OMAP24XX_EN_UART1_SHIFT,
865 .idlest_reg_id = 1,
866 .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
867 },
868 },
869 .slaves = omap2430_uart1_slaves,
870 .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
871 .class = &omap2_uart_class,
872};
873
874/* UART2 */
875
876static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
877 &omap2_l4_core__uart2,
878};
879
880static struct omap_hwmod omap2430_uart2_hwmod = {
881 .name = "uart2",
882 .mpu_irqs = omap2_uart2_mpu_irqs,
883 .sdma_reqs = omap2_uart2_sdma_reqs,
884 .main_clk = "uart2_fck",
885 .prcm = {
886 .omap2 = {
887 .module_offs = CORE_MOD,
888 .prcm_reg_id = 1,
889 .module_bit = OMAP24XX_EN_UART2_SHIFT,
890 .idlest_reg_id = 1,
891 .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
892 },
893 },
894 .slaves = omap2430_uart2_slaves,
895 .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
896 .class = &omap2_uart_class,
897};
898
899/* UART3 */
900
901static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
902 &omap2_l4_core__uart3,
903};
904
905static struct omap_hwmod omap2430_uart3_hwmod = {
906 .name = "uart3",
907 .mpu_irqs = omap2_uart3_mpu_irqs,
908 .sdma_reqs = omap2_uart3_sdma_reqs,
909 .main_clk = "uart3_fck",
910 .prcm = {
911 .omap2 = {
912 .module_offs = CORE_MOD,
913 .prcm_reg_id = 2,
914 .module_bit = OMAP24XX_EN_UART3_SHIFT,
915 .idlest_reg_id = 2,
916 .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
917 },
918 },
919 .slaves = omap2430_uart3_slaves,
920 .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
921 .class = &omap2_uart_class,
922};
923
924/* dss */
925/* dss master ports */
926static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
927 &omap2430_dss__l3,
928};
929
930/* l4_core -> dss */
931static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
932 .master = &omap2430_l4_core_hwmod,
933 .slave = &omap2430_dss_core_hwmod,
934 .clk = "dss_ick",
935 .addr = omap2_dss_addrs,
936 .user = OCP_USER_MPU | OCP_USER_SDMA,
937};
938
939/* dss slave ports */
940static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = {
941 &omap2430_l4_core__dss,
942};
943
944static struct omap_hwmod_opt_clk dss_opt_clks[] = {
945 /*
946 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
947 * driver does not use these clocks.
948 */
949 { .role = "tv_clk", .clk = "dss_54m_fck" },
950 { .role = "sys_clk", .clk = "dss2_fck" },
951};
952
953static struct omap_hwmod omap2430_dss_core_hwmod = {
954 .name = "dss_core",
955 .class = &omap2_dss_hwmod_class,
956 .main_clk = "dss1_fck", /* instead of dss_fck */
957 .sdma_reqs = omap2xxx_dss_sdma_chs,
958 .prcm = {
959 .omap2 = {
960 .prcm_reg_id = 1,
961 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
962 .module_offs = CORE_MOD,
963 .idlest_reg_id = 1,
964 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
965 },
966 },
967 .opt_clks = dss_opt_clks,
968 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
969 .slaves = omap2430_dss_slaves,
970 .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves),
971 .masters = omap2430_dss_masters,
972 .masters_cnt = ARRAY_SIZE(omap2430_dss_masters),
973 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
974};
975
976/* l4_core -> dss_dispc */
977static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
978 .master = &omap2430_l4_core_hwmod,
979 .slave = &omap2430_dss_dispc_hwmod,
980 .clk = "dss_ick",
981 .addr = omap2_dss_dispc_addrs,
982 .user = OCP_USER_MPU | OCP_USER_SDMA,
983};
984
985/* dss_dispc slave ports */
986static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {
987 &omap2430_l4_core__dss_dispc,
988};
989
990static struct omap_hwmod omap2430_dss_dispc_hwmod = {
991 .name = "dss_dispc",
992 .class = &omap2_dispc_hwmod_class,
993 .mpu_irqs = omap2_dispc_irqs,
994 .main_clk = "dss1_fck",
995 .prcm = {
996 .omap2 = {
997 .prcm_reg_id = 1,
998 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
999 .module_offs = CORE_MOD,
1000 .idlest_reg_id = 1,
1001 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
1002 },
1003 },
1004 .slaves = omap2430_dss_dispc_slaves,
1005 .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves),
1006 .flags = HWMOD_NO_IDLEST,
1007 .dev_attr = &omap2_3_dss_dispc_dev_attr
1008};
1009
1010/* l4_core -> dss_rfbi */
1011static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
1012 .master = &omap2430_l4_core_hwmod,
1013 .slave = &omap2430_dss_rfbi_hwmod,
1014 .clk = "dss_ick",
1015 .addr = omap2_dss_rfbi_addrs,
1016 .user = OCP_USER_MPU | OCP_USER_SDMA,
1017};
1018
1019/* dss_rfbi slave ports */
1020static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
1021 &omap2430_l4_core__dss_rfbi,
1022};
1023
1024static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1025 { .role = "ick", .clk = "dss_ick" },
1026};
1027
1028static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
1029 .name = "dss_rfbi",
1030 .class = &omap2_rfbi_hwmod_class,
1031 .main_clk = "dss1_fck",
1032 .prcm = {
1033 .omap2 = {
1034 .prcm_reg_id = 1,
1035 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1036 .module_offs = CORE_MOD,
1037 },
1038 },
1039 .opt_clks = dss_rfbi_opt_clks,
1040 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
1041 .slaves = omap2430_dss_rfbi_slaves,
1042 .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves),
1043 .flags = HWMOD_NO_IDLEST,
1044};
1045
1046/* l4_core -> dss_venc */
1047static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
1048 .master = &omap2430_l4_core_hwmod,
1049 .slave = &omap2430_dss_venc_hwmod,
1050 .clk = "dss_ick",
1051 .addr = omap2_dss_venc_addrs,
1052 .user = OCP_USER_MPU | OCP_USER_SDMA,
1053};
1054
1055/* dss_venc slave ports */
1056static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
1057 &omap2430_l4_core__dss_venc,
1058};
1059
1060static struct omap_hwmod omap2430_dss_venc_hwmod = {
1061 .name = "dss_venc",
1062 .class = &omap2_venc_hwmod_class,
1063 .main_clk = "dss_54m_fck",
1064 .prcm = {
1065 .omap2 = {
1066 .prcm_reg_id = 1,
1067 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1068 .module_offs = CORE_MOD,
1069 },
1070 },
1071 .slaves = omap2430_dss_venc_slaves,
1072 .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves),
1073 .flags = HWMOD_NO_IDLEST,
1074}; 60};
1075 61
1076/* I2C common */ 62/* I2C common */
@@ -1098,11 +84,6 @@ static struct omap_i2c_dev_attr i2c_dev_attr = {
1098}; 84};
1099 85
1100/* I2C1 */ 86/* I2C1 */
1101
1102static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
1103 &omap2430_l4_core__i2c1,
1104};
1105
1106static struct omap_hwmod omap2430_i2c1_hwmod = { 87static struct omap_hwmod omap2430_i2c1_hwmod = {
1107 .name = "i2c1", 88 .name = "i2c1",
1108 .flags = HWMOD_16BIT_REG, 89 .flags = HWMOD_16BIT_REG,
@@ -1126,18 +107,11 @@ static struct omap_hwmod omap2430_i2c1_hwmod = {
1126 .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT, 107 .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
1127 }, 108 },
1128 }, 109 },
1129 .slaves = omap2430_i2c1_slaves,
1130 .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves),
1131 .class = &i2c_class, 110 .class = &i2c_class,
1132 .dev_attr = &i2c_dev_attr, 111 .dev_attr = &i2c_dev_attr,
1133}; 112};
1134 113
1135/* I2C2 */ 114/* I2C2 */
1136
1137static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
1138 &omap2430_l4_core__i2c2,
1139};
1140
1141static struct omap_hwmod omap2430_i2c2_hwmod = { 115static struct omap_hwmod omap2430_i2c2_hwmod = {
1142 .name = "i2c2", 116 .name = "i2c2",
1143 .flags = HWMOD_16BIT_REG, 117 .flags = HWMOD_16BIT_REG,
@@ -1153,218 +127,16 @@ static struct omap_hwmod omap2430_i2c2_hwmod = {
1153 .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT, 127 .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
1154 }, 128 },
1155 }, 129 },
1156 .slaves = omap2430_i2c2_slaves,
1157 .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves),
1158 .class = &i2c_class, 130 .class = &i2c_class,
1159 .dev_attr = &i2c_dev_attr, 131 .dev_attr = &i2c_dev_attr,
1160}; 132};
1161 133
1162/* l4_wkup -> gpio1 */
1163static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
1164 {
1165 .pa_start = 0x4900C000,
1166 .pa_end = 0x4900C1ff,
1167 .flags = ADDR_TYPE_RT
1168 },
1169 { }
1170};
1171
1172static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
1173 .master = &omap2430_l4_wkup_hwmod,
1174 .slave = &omap2430_gpio1_hwmod,
1175 .clk = "gpios_ick",
1176 .addr = omap2430_gpio1_addr_space,
1177 .user = OCP_USER_MPU | OCP_USER_SDMA,
1178};
1179
1180/* l4_wkup -> gpio2 */
1181static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
1182 {
1183 .pa_start = 0x4900E000,
1184 .pa_end = 0x4900E1ff,
1185 .flags = ADDR_TYPE_RT
1186 },
1187 { }
1188};
1189
1190static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
1191 .master = &omap2430_l4_wkup_hwmod,
1192 .slave = &omap2430_gpio2_hwmod,
1193 .clk = "gpios_ick",
1194 .addr = omap2430_gpio2_addr_space,
1195 .user = OCP_USER_MPU | OCP_USER_SDMA,
1196};
1197
1198/* l4_wkup -> gpio3 */
1199static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
1200 {
1201 .pa_start = 0x49010000,
1202 .pa_end = 0x490101ff,
1203 .flags = ADDR_TYPE_RT
1204 },
1205 { }
1206};
1207
1208static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
1209 .master = &omap2430_l4_wkup_hwmod,
1210 .slave = &omap2430_gpio3_hwmod,
1211 .clk = "gpios_ick",
1212 .addr = omap2430_gpio3_addr_space,
1213 .user = OCP_USER_MPU | OCP_USER_SDMA,
1214};
1215
1216/* l4_wkup -> gpio4 */
1217static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
1218 {
1219 .pa_start = 0x49012000,
1220 .pa_end = 0x490121ff,
1221 .flags = ADDR_TYPE_RT
1222 },
1223 { }
1224};
1225
1226static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
1227 .master = &omap2430_l4_wkup_hwmod,
1228 .slave = &omap2430_gpio4_hwmod,
1229 .clk = "gpios_ick",
1230 .addr = omap2430_gpio4_addr_space,
1231 .user = OCP_USER_MPU | OCP_USER_SDMA,
1232};
1233
1234/* l4_core -> gpio5 */
1235static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
1236 {
1237 .pa_start = 0x480B6000,
1238 .pa_end = 0x480B61ff,
1239 .flags = ADDR_TYPE_RT
1240 },
1241 { }
1242};
1243
1244static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
1245 .master = &omap2430_l4_core_hwmod,
1246 .slave = &omap2430_gpio5_hwmod,
1247 .clk = "gpio5_ick",
1248 .addr = omap2430_gpio5_addr_space,
1249 .user = OCP_USER_MPU | OCP_USER_SDMA,
1250};
1251
1252/* gpio dev_attr */
1253static struct omap_gpio_dev_attr gpio_dev_attr = {
1254 .bank_width = 32,
1255 .dbck_flag = false,
1256};
1257
1258/* gpio1 */
1259static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
1260 &omap2430_l4_wkup__gpio1,
1261};
1262
1263static struct omap_hwmod omap2430_gpio1_hwmod = {
1264 .name = "gpio1",
1265 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1266 .mpu_irqs = omap2_gpio1_irqs,
1267 .main_clk = "gpios_fck",
1268 .prcm = {
1269 .omap2 = {
1270 .prcm_reg_id = 1,
1271 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1272 .module_offs = WKUP_MOD,
1273 .idlest_reg_id = 1,
1274 .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
1275 },
1276 },
1277 .slaves = omap2430_gpio1_slaves,
1278 .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
1279 .class = &omap2xxx_gpio_hwmod_class,
1280 .dev_attr = &gpio_dev_attr,
1281};
1282
1283/* gpio2 */
1284static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
1285 &omap2430_l4_wkup__gpio2,
1286};
1287
1288static struct omap_hwmod omap2430_gpio2_hwmod = {
1289 .name = "gpio2",
1290 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1291 .mpu_irqs = omap2_gpio2_irqs,
1292 .main_clk = "gpios_fck",
1293 .prcm = {
1294 .omap2 = {
1295 .prcm_reg_id = 1,
1296 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1297 .module_offs = WKUP_MOD,
1298 .idlest_reg_id = 1,
1299 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1300 },
1301 },
1302 .slaves = omap2430_gpio2_slaves,
1303 .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
1304 .class = &omap2xxx_gpio_hwmod_class,
1305 .dev_attr = &gpio_dev_attr,
1306};
1307
1308/* gpio3 */
1309static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
1310 &omap2430_l4_wkup__gpio3,
1311};
1312
1313static struct omap_hwmod omap2430_gpio3_hwmod = {
1314 .name = "gpio3",
1315 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1316 .mpu_irqs = omap2_gpio3_irqs,
1317 .main_clk = "gpios_fck",
1318 .prcm = {
1319 .omap2 = {
1320 .prcm_reg_id = 1,
1321 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1322 .module_offs = WKUP_MOD,
1323 .idlest_reg_id = 1,
1324 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1325 },
1326 },
1327 .slaves = omap2430_gpio3_slaves,
1328 .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
1329 .class = &omap2xxx_gpio_hwmod_class,
1330 .dev_attr = &gpio_dev_attr,
1331};
1332
1333/* gpio4 */
1334static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
1335 &omap2430_l4_wkup__gpio4,
1336};
1337
1338static struct omap_hwmod omap2430_gpio4_hwmod = {
1339 .name = "gpio4",
1340 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1341 .mpu_irqs = omap2_gpio4_irqs,
1342 .main_clk = "gpios_fck",
1343 .prcm = {
1344 .omap2 = {
1345 .prcm_reg_id = 1,
1346 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1347 .module_offs = WKUP_MOD,
1348 .idlest_reg_id = 1,
1349 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1350 },
1351 },
1352 .slaves = omap2430_gpio4_slaves,
1353 .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
1354 .class = &omap2xxx_gpio_hwmod_class,
1355 .dev_attr = &gpio_dev_attr,
1356};
1357
1358/* gpio5 */ 134/* gpio5 */
1359static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = { 135static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
1360 { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */ 136 { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
1361 { .irq = -1 } 137 { .irq = -1 }
1362}; 138};
1363 139
1364static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
1365 &omap2430_l4_core__gpio5,
1366};
1367
1368static struct omap_hwmod omap2430_gpio5_hwmod = { 140static struct omap_hwmod omap2430_gpio5_hwmod = {
1369 .name = "gpio5", 141 .name = "gpio5",
1370 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 142 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
@@ -1379,10 +151,8 @@ static struct omap_hwmod omap2430_gpio5_hwmod = {
1379 .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT, 151 .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
1380 }, 152 },
1381 }, 153 },
1382 .slaves = omap2430_gpio5_slaves,
1383 .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
1384 .class = &omap2xxx_gpio_hwmod_class, 154 .class = &omap2xxx_gpio_hwmod_class,
1385 .dev_attr = &gpio_dev_attr, 155 .dev_attr = &omap2xxx_gpio_dev_attr,
1386}; 156};
1387 157
1388/* dma attributes */ 158/* dma attributes */
@@ -1392,66 +162,21 @@ static struct omap_dma_dev_attr dma_dev_attr = {
1392 .lch_count = 32, 162 .lch_count = 32,
1393}; 163};
1394 164
1395/* dma_system -> L3 */
1396static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
1397 .master = &omap2430_dma_system_hwmod,
1398 .slave = &omap2430_l3_main_hwmod,
1399 .clk = "core_l3_ck",
1400 .user = OCP_USER_MPU | OCP_USER_SDMA,
1401};
1402
1403/* dma_system master ports */
1404static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = {
1405 &omap2430_dma_system__l3,
1406};
1407
1408/* l4_core -> dma_system */
1409static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
1410 .master = &omap2430_l4_core_hwmod,
1411 .slave = &omap2430_dma_system_hwmod,
1412 .clk = "sdma_ick",
1413 .addr = omap2_dma_system_addrs,
1414 .user = OCP_USER_MPU | OCP_USER_SDMA,
1415};
1416
1417/* dma_system slave ports */
1418static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
1419 &omap2430_l4_core__dma_system,
1420};
1421
1422static struct omap_hwmod omap2430_dma_system_hwmod = { 165static struct omap_hwmod omap2430_dma_system_hwmod = {
1423 .name = "dma", 166 .name = "dma",
1424 .class = &omap2xxx_dma_hwmod_class, 167 .class = &omap2xxx_dma_hwmod_class,
1425 .mpu_irqs = omap2_dma_system_irqs, 168 .mpu_irqs = omap2_dma_system_irqs,
1426 .main_clk = "core_l3_ck", 169 .main_clk = "core_l3_ck",
1427 .slaves = omap2430_dma_system_slaves,
1428 .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves),
1429 .masters = omap2430_dma_system_masters,
1430 .masters_cnt = ARRAY_SIZE(omap2430_dma_system_masters),
1431 .dev_attr = &dma_dev_attr, 170 .dev_attr = &dma_dev_attr,
1432 .flags = HWMOD_NO_IDLEST, 171 .flags = HWMOD_NO_IDLEST,
1433}; 172};
1434 173
1435/* mailbox */ 174/* mailbox */
1436static struct omap_hwmod omap2430_mailbox_hwmod;
1437static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = { 175static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
1438 { .irq = 26 }, 176 { .irq = 26 },
1439 { .irq = -1 } 177 { .irq = -1 }
1440}; 178};
1441 179
1442/* l4_core -> mailbox */
1443static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
1444 .master = &omap2430_l4_core_hwmod,
1445 .slave = &omap2430_mailbox_hwmod,
1446 .addr = omap2_mailbox_addrs,
1447 .user = OCP_USER_MPU | OCP_USER_SDMA,
1448};
1449
1450/* mailbox slave ports */
1451static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
1452 &omap2430_l4_core__mailbox,
1453};
1454
1455static struct omap_hwmod omap2430_mailbox_hwmod = { 180static struct omap_hwmod omap2430_mailbox_hwmod = {
1456 .name = "mailbox", 181 .name = "mailbox",
1457 .class = &omap2xxx_mailbox_hwmod_class, 182 .class = &omap2xxx_mailbox_hwmod_class,
@@ -1466,66 +191,6 @@ static struct omap_hwmod omap2430_mailbox_hwmod = {
1466 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, 191 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
1467 }, 192 },
1468 }, 193 },
1469 .slaves = omap2430_mailbox_slaves,
1470 .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves),
1471};
1472
1473/* mcspi1 */
1474static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
1475 &omap2430_l4_core__mcspi1,
1476};
1477
1478static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1479 .num_chipselect = 4,
1480};
1481
1482static struct omap_hwmod omap2430_mcspi1_hwmod = {
1483 .name = "mcspi1_hwmod",
1484 .mpu_irqs = omap2_mcspi1_mpu_irqs,
1485 .sdma_reqs = omap2_mcspi1_sdma_reqs,
1486 .main_clk = "mcspi1_fck",
1487 .prcm = {
1488 .omap2 = {
1489 .module_offs = CORE_MOD,
1490 .prcm_reg_id = 1,
1491 .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1492 .idlest_reg_id = 1,
1493 .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
1494 },
1495 },
1496 .slaves = omap2430_mcspi1_slaves,
1497 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves),
1498 .class = &omap2xxx_mcspi_class,
1499 .dev_attr = &omap_mcspi1_dev_attr,
1500};
1501
1502/* mcspi2 */
1503static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
1504 &omap2430_l4_core__mcspi2,
1505};
1506
1507static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1508 .num_chipselect = 2,
1509};
1510
1511static struct omap_hwmod omap2430_mcspi2_hwmod = {
1512 .name = "mcspi2_hwmod",
1513 .mpu_irqs = omap2_mcspi2_mpu_irqs,
1514 .sdma_reqs = omap2_mcspi2_sdma_reqs,
1515 .main_clk = "mcspi2_fck",
1516 .prcm = {
1517 .omap2 = {
1518 .module_offs = CORE_MOD,
1519 .prcm_reg_id = 1,
1520 .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1521 .idlest_reg_id = 1,
1522 .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
1523 },
1524 },
1525 .slaves = omap2430_mcspi2_slaves,
1526 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves),
1527 .class = &omap2xxx_mcspi_class,
1528 .dev_attr = &omap_mcspi2_dev_attr,
1529}; 194};
1530 195
1531/* mcspi3 */ 196/* mcspi3 */
@@ -1542,16 +207,12 @@ static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
1542 { .dma_req = -1 } 207 { .dma_req = -1 }
1543}; 208};
1544 209
1545static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
1546 &omap2430_l4_core__mcspi3,
1547};
1548
1549static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = { 210static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1550 .num_chipselect = 2, 211 .num_chipselect = 2,
1551}; 212};
1552 213
1553static struct omap_hwmod omap2430_mcspi3_hwmod = { 214static struct omap_hwmod omap2430_mcspi3_hwmod = {
1554 .name = "mcspi3_hwmod", 215 .name = "mcspi3",
1555 .mpu_irqs = omap2430_mcspi3_mpu_irqs, 216 .mpu_irqs = omap2430_mcspi3_mpu_irqs,
1556 .sdma_reqs = omap2430_mcspi3_sdma_reqs, 217 .sdma_reqs = omap2430_mcspi3_sdma_reqs,
1557 .main_clk = "mcspi3_fck", 218 .main_clk = "mcspi3_fck",
@@ -1564,15 +225,11 @@ static struct omap_hwmod omap2430_mcspi3_hwmod = {
1564 .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT, 225 .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
1565 }, 226 },
1566 }, 227 },
1567 .slaves = omap2430_mcspi3_slaves,
1568 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves),
1569 .class = &omap2xxx_mcspi_class, 228 .class = &omap2xxx_mcspi_class,
1570 .dev_attr = &omap_mcspi3_dev_attr, 229 .dev_attr = &omap_mcspi3_dev_attr,
1571}; 230};
1572 231
1573/* 232/* usbhsotg */
1574 * usbhsotg
1575 */
1576static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = { 233static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
1577 .rev_offs = 0x0400, 234 .rev_offs = 0x0400,
1578 .sysc_offs = 0x0404, 235 .sysc_offs = 0x0404,
@@ -1611,10 +268,6 @@ static struct omap_hwmod omap2430_usbhsotg_hwmod = {
1611 .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT, 268 .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
1612 }, 269 },
1613 }, 270 },
1614 .masters = omap2430_usbhsotg_masters,
1615 .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters),
1616 .slaves = omap2430_usbhsotg_slaves,
1617 .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves),
1618 .class = &usbotg_class, 271 .class = &usbotg_class,
1619 /* 272 /*
1620 * Erratum ID: i479 idle_req / idle_ack mechanism potentially 273 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
@@ -1652,20 +305,6 @@ static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
1652 { .irq = -1 } 305 { .irq = -1 }
1653}; 306};
1654 307
1655/* l4_core -> mcbsp1 */
1656static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
1657 .master = &omap2430_l4_core_hwmod,
1658 .slave = &omap2430_mcbsp1_hwmod,
1659 .clk = "mcbsp1_ick",
1660 .addr = omap2_mcbsp1_addrs,
1661 .user = OCP_USER_MPU | OCP_USER_SDMA,
1662};
1663
1664/* mcbsp1 slave ports */
1665static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
1666 &omap2430_l4_core__mcbsp1,
1667};
1668
1669static struct omap_hwmod omap2430_mcbsp1_hwmod = { 308static struct omap_hwmod omap2430_mcbsp1_hwmod = {
1670 .name = "mcbsp1", 309 .name = "mcbsp1",
1671 .class = &omap2430_mcbsp_hwmod_class, 310 .class = &omap2430_mcbsp_hwmod_class,
@@ -1681,8 +320,6 @@ static struct omap_hwmod omap2430_mcbsp1_hwmod = {
1681 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT, 320 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
1682 }, 321 },
1683 }, 322 },
1684 .slaves = omap2430_mcbsp1_slaves,
1685 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves),
1686}; 323};
1687 324
1688/* mcbsp2 */ 325/* mcbsp2 */
@@ -1693,20 +330,6 @@ static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
1693 { .irq = -1 } 330 { .irq = -1 }
1694}; 331};
1695 332
1696/* l4_core -> mcbsp2 */
1697static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
1698 .master = &omap2430_l4_core_hwmod,
1699 .slave = &omap2430_mcbsp2_hwmod,
1700 .clk = "mcbsp2_ick",
1701 .addr = omap2xxx_mcbsp2_addrs,
1702 .user = OCP_USER_MPU | OCP_USER_SDMA,
1703};
1704
1705/* mcbsp2 slave ports */
1706static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
1707 &omap2430_l4_core__mcbsp2,
1708};
1709
1710static struct omap_hwmod omap2430_mcbsp2_hwmod = { 333static struct omap_hwmod omap2430_mcbsp2_hwmod = {
1711 .name = "mcbsp2", 334 .name = "mcbsp2",
1712 .class = &omap2430_mcbsp_hwmod_class, 335 .class = &omap2430_mcbsp_hwmod_class,
@@ -1722,8 +345,6 @@ static struct omap_hwmod omap2430_mcbsp2_hwmod = {
1722 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT, 345 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
1723 }, 346 },
1724 }, 347 },
1725 .slaves = omap2430_mcbsp2_slaves,
1726 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves),
1727}; 348};
1728 349
1729/* mcbsp3 */ 350/* mcbsp3 */
@@ -1734,30 +355,6 @@ static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
1734 { .irq = -1 } 355 { .irq = -1 }
1735}; 356};
1736 357
1737static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
1738 {
1739 .name = "mpu",
1740 .pa_start = 0x4808C000,
1741 .pa_end = 0x4808C0ff,
1742 .flags = ADDR_TYPE_RT
1743 },
1744 { }
1745};
1746
1747/* l4_core -> mcbsp3 */
1748static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
1749 .master = &omap2430_l4_core_hwmod,
1750 .slave = &omap2430_mcbsp3_hwmod,
1751 .clk = "mcbsp3_ick",
1752 .addr = omap2430_mcbsp3_addrs,
1753 .user = OCP_USER_MPU | OCP_USER_SDMA,
1754};
1755
1756/* mcbsp3 slave ports */
1757static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
1758 &omap2430_l4_core__mcbsp3,
1759};
1760
1761static struct omap_hwmod omap2430_mcbsp3_hwmod = { 358static struct omap_hwmod omap2430_mcbsp3_hwmod = {
1762 .name = "mcbsp3", 359 .name = "mcbsp3",
1763 .class = &omap2430_mcbsp_hwmod_class, 360 .class = &omap2430_mcbsp_hwmod_class,
@@ -1773,8 +370,6 @@ static struct omap_hwmod omap2430_mcbsp3_hwmod = {
1773 .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT, 370 .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
1774 }, 371 },
1775 }, 372 },
1776 .slaves = omap2430_mcbsp3_slaves,
1777 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves),
1778}; 373};
1779 374
1780/* mcbsp4 */ 375/* mcbsp4 */
@@ -1791,30 +386,6 @@ static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
1791 { .dma_req = -1 } 386 { .dma_req = -1 }
1792}; 387};
1793 388
1794static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
1795 {
1796 .name = "mpu",
1797 .pa_start = 0x4808E000,
1798 .pa_end = 0x4808E0ff,
1799 .flags = ADDR_TYPE_RT
1800 },
1801 { }
1802};
1803
1804/* l4_core -> mcbsp4 */
1805static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
1806 .master = &omap2430_l4_core_hwmod,
1807 .slave = &omap2430_mcbsp4_hwmod,
1808 .clk = "mcbsp4_ick",
1809 .addr = omap2430_mcbsp4_addrs,
1810 .user = OCP_USER_MPU | OCP_USER_SDMA,
1811};
1812
1813/* mcbsp4 slave ports */
1814static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
1815 &omap2430_l4_core__mcbsp4,
1816};
1817
1818static struct omap_hwmod omap2430_mcbsp4_hwmod = { 389static struct omap_hwmod omap2430_mcbsp4_hwmod = {
1819 .name = "mcbsp4", 390 .name = "mcbsp4",
1820 .class = &omap2430_mcbsp_hwmod_class, 391 .class = &omap2430_mcbsp_hwmod_class,
@@ -1830,8 +401,6 @@ static struct omap_hwmod omap2430_mcbsp4_hwmod = {
1830 .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT, 401 .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
1831 }, 402 },
1832 }, 403 },
1833 .slaves = omap2430_mcbsp4_slaves,
1834 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves),
1835}; 404};
1836 405
1837/* mcbsp5 */ 406/* mcbsp5 */
@@ -1848,30 +417,6 @@ static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
1848 { .dma_req = -1 } 417 { .dma_req = -1 }
1849}; 418};
1850 419
1851static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
1852 {
1853 .name = "mpu",
1854 .pa_start = 0x48096000,
1855 .pa_end = 0x480960ff,
1856 .flags = ADDR_TYPE_RT
1857 },
1858 { }
1859};
1860
1861/* l4_core -> mcbsp5 */
1862static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
1863 .master = &omap2430_l4_core_hwmod,
1864 .slave = &omap2430_mcbsp5_hwmod,
1865 .clk = "mcbsp5_ick",
1866 .addr = omap2430_mcbsp5_addrs,
1867 .user = OCP_USER_MPU | OCP_USER_SDMA,
1868};
1869
1870/* mcbsp5 slave ports */
1871static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {
1872 &omap2430_l4_core__mcbsp5,
1873};
1874
1875static struct omap_hwmod omap2430_mcbsp5_hwmod = { 420static struct omap_hwmod omap2430_mcbsp5_hwmod = {
1876 .name = "mcbsp5", 421 .name = "mcbsp5",
1877 .class = &omap2430_mcbsp_hwmod_class, 422 .class = &omap2430_mcbsp_hwmod_class,
@@ -1887,12 +432,9 @@ static struct omap_hwmod omap2430_mcbsp5_hwmod = {
1887 .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT, 432 .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
1888 }, 433 },
1889 }, 434 },
1890 .slaves = omap2430_mcbsp5_slaves,
1891 .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves),
1892}; 435};
1893 436
1894/* MMC/SD/SDIO common */ 437/* MMC/SD/SDIO common */
1895
1896static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = { 438static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
1897 .rev_offs = 0x1fc, 439 .rev_offs = 0x1fc,
1898 .sysc_offs = 0x10, 440 .sysc_offs = 0x10,
@@ -1910,7 +452,6 @@ static struct omap_hwmod_class omap2430_mmc_class = {
1910}; 452};
1911 453
1912/* MMC/SD/SDIO1 */ 454/* MMC/SD/SDIO1 */
1913
1914static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = { 455static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
1915 { .irq = 83 }, 456 { .irq = 83 },
1916 { .irq = -1 } 457 { .irq = -1 }
@@ -1926,10 +467,6 @@ static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
1926 { .role = "dbck", .clk = "mmchsdb1_fck" }, 467 { .role = "dbck", .clk = "mmchsdb1_fck" },
1927}; 468};
1928 469
1929static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = {
1930 &omap2430_l4_core__mmc1,
1931};
1932
1933static struct omap_mmc_dev_attr mmc1_dev_attr = { 470static struct omap_mmc_dev_attr mmc1_dev_attr = {
1934 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, 471 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1935}; 472};
@@ -1952,13 +489,10 @@ static struct omap_hwmod omap2430_mmc1_hwmod = {
1952 }, 489 },
1953 }, 490 },
1954 .dev_attr = &mmc1_dev_attr, 491 .dev_attr = &mmc1_dev_attr,
1955 .slaves = omap2430_mmc1_slaves,
1956 .slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves),
1957 .class = &omap2430_mmc_class, 492 .class = &omap2430_mmc_class,
1958}; 493};
1959 494
1960/* MMC/SD/SDIO2 */ 495/* MMC/SD/SDIO2 */
1961
1962static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = { 496static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
1963 { .irq = 86 }, 497 { .irq = 86 },
1964 { .irq = -1 } 498 { .irq = -1 }
@@ -1974,10 +508,6 @@ static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
1974 { .role = "dbck", .clk = "mmchsdb2_fck" }, 508 { .role = "dbck", .clk = "mmchsdb2_fck" },
1975}; 509};
1976 510
1977static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = {
1978 &omap2430_l4_core__mmc2,
1979};
1980
1981static struct omap_hwmod omap2430_mmc2_hwmod = { 511static struct omap_hwmod omap2430_mmc2_hwmod = {
1982 .name = "mmc2", 512 .name = "mmc2",
1983 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 513 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
@@ -1995,78 +525,371 @@ static struct omap_hwmod omap2430_mmc2_hwmod = {
1995 .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT, 525 .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
1996 }, 526 },
1997 }, 527 },
1998 .slaves = omap2430_mmc2_slaves,
1999 .slaves_cnt = ARRAY_SIZE(omap2430_mmc2_slaves),
2000 .class = &omap2430_mmc_class, 528 .class = &omap2430_mmc_class,
2001}; 529};
2002 530
2003static __initdata struct omap_hwmod *omap2430_hwmods[] = { 531/*
2004 &omap2430_l3_main_hwmod, 532 * interfaces
2005 &omap2430_l4_core_hwmod, 533 */
2006 &omap2430_l4_wkup_hwmod, 534
2007 &omap2430_mpu_hwmod, 535/* L3 -> L4_CORE interface */
2008 &omap2430_iva_hwmod, 536/* l3_core -> usbhsotg interface */
2009 537static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
2010 &omap2430_timer1_hwmod, 538 .master = &omap2430_usbhsotg_hwmod,
2011 &omap2430_timer2_hwmod, 539 .slave = &omap2xxx_l3_main_hwmod,
2012 &omap2430_timer3_hwmod, 540 .clk = "core_l3_ck",
2013 &omap2430_timer4_hwmod, 541 .user = OCP_USER_MPU,
2014 &omap2430_timer5_hwmod, 542};
2015 &omap2430_timer6_hwmod, 543
2016 &omap2430_timer7_hwmod, 544/* L4 CORE -> I2C1 interface */
2017 &omap2430_timer8_hwmod, 545static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
2018 &omap2430_timer9_hwmod, 546 .master = &omap2xxx_l4_core_hwmod,
2019 &omap2430_timer10_hwmod, 547 .slave = &omap2430_i2c1_hwmod,
2020 &omap2430_timer11_hwmod, 548 .clk = "i2c1_ick",
2021 &omap2430_timer12_hwmod, 549 .addr = omap2_i2c1_addr_space,
2022 550 .user = OCP_USER_MPU | OCP_USER_SDMA,
2023 &omap2430_wd_timer2_hwmod, 551};
2024 &omap2430_uart1_hwmod, 552
2025 &omap2430_uart2_hwmod, 553/* L4 CORE -> I2C2 interface */
2026 &omap2430_uart3_hwmod, 554static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
2027 /* dss class */ 555 .master = &omap2xxx_l4_core_hwmod,
2028 &omap2430_dss_core_hwmod, 556 .slave = &omap2430_i2c2_hwmod,
2029 &omap2430_dss_dispc_hwmod, 557 .clk = "i2c2_ick",
2030 &omap2430_dss_rfbi_hwmod, 558 .addr = omap2_i2c2_addr_space,
2031 &omap2430_dss_venc_hwmod, 559 .user = OCP_USER_MPU | OCP_USER_SDMA,
2032 /* i2c class */ 560};
2033 &omap2430_i2c1_hwmod, 561
2034 &omap2430_i2c2_hwmod, 562static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
2035 &omap2430_mmc1_hwmod, 563 {
2036 &omap2430_mmc2_hwmod, 564 .pa_start = OMAP243X_HS_BASE,
2037 565 .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
2038 /* gpio class */ 566 .flags = ADDR_TYPE_RT
2039 &omap2430_gpio1_hwmod, 567 },
2040 &omap2430_gpio2_hwmod, 568 { }
2041 &omap2430_gpio3_hwmod, 569};
2042 &omap2430_gpio4_hwmod, 570
2043 &omap2430_gpio5_hwmod, 571/* l4_core ->usbhsotg interface */
2044 572static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
2045 /* dma_system class*/ 573 .master = &omap2xxx_l4_core_hwmod,
2046 &omap2430_dma_system_hwmod, 574 .slave = &omap2430_usbhsotg_hwmod,
2047 575 .clk = "usb_l4_ick",
2048 /* mcbsp class */ 576 .addr = omap2430_usbhsotg_addrs,
2049 &omap2430_mcbsp1_hwmod, 577 .user = OCP_USER_MPU,
2050 &omap2430_mcbsp2_hwmod, 578};
2051 &omap2430_mcbsp3_hwmod, 579
2052 &omap2430_mcbsp4_hwmod, 580/* L4 CORE -> MMC1 interface */
2053 &omap2430_mcbsp5_hwmod, 581static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
2054 582 .master = &omap2xxx_l4_core_hwmod,
2055 /* mailbox class */ 583 .slave = &omap2430_mmc1_hwmod,
2056 &omap2430_mailbox_hwmod, 584 .clk = "mmchs1_ick",
2057 585 .addr = omap2430_mmc1_addr_space,
2058 /* mcspi class */ 586 .user = OCP_USER_MPU | OCP_USER_SDMA,
2059 &omap2430_mcspi1_hwmod, 587};
2060 &omap2430_mcspi2_hwmod, 588
2061 &omap2430_mcspi3_hwmod, 589/* L4 CORE -> MMC2 interface */
2062 590static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
2063 /* usbotg class*/ 591 .master = &omap2xxx_l4_core_hwmod,
2064 &omap2430_usbhsotg_hwmod, 592 .slave = &omap2430_mmc2_hwmod,
593 .clk = "mmchs2_ick",
594 .addr = omap2430_mmc2_addr_space,
595 .user = OCP_USER_MPU | OCP_USER_SDMA,
596};
597
598/* l4 core -> mcspi3 interface */
599static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
600 .master = &omap2xxx_l4_core_hwmod,
601 .slave = &omap2430_mcspi3_hwmod,
602 .clk = "mcspi3_ick",
603 .addr = omap2430_mcspi3_addr_space,
604 .user = OCP_USER_MPU | OCP_USER_SDMA,
605};
606
607/* IVA2 <- L3 interface */
608static struct omap_hwmod_ocp_if omap2430_l3__iva = {
609 .master = &omap2xxx_l3_main_hwmod,
610 .slave = &omap2430_iva_hwmod,
611 .clk = "core_l3_ck",
612 .user = OCP_USER_MPU | OCP_USER_SDMA,
613};
614
615static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
616 {
617 .pa_start = 0x49018000,
618 .pa_end = 0x49018000 + SZ_1K - 1,
619 .flags = ADDR_TYPE_RT
620 },
621 { }
622};
623
624/* l4_wkup -> timer1 */
625static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
626 .master = &omap2xxx_l4_wkup_hwmod,
627 .slave = &omap2xxx_timer1_hwmod,
628 .clk = "gpt1_ick",
629 .addr = omap2430_timer1_addrs,
630 .user = OCP_USER_MPU | OCP_USER_SDMA,
631};
2065 632
633/* l4_wkup -> wd_timer2 */
634static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
635 {
636 .pa_start = 0x49016000,
637 .pa_end = 0x4901607f,
638 .flags = ADDR_TYPE_RT
639 },
640 { }
641};
642
643static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
644 .master = &omap2xxx_l4_wkup_hwmod,
645 .slave = &omap2xxx_wd_timer2_hwmod,
646 .clk = "mpu_wdt_ick",
647 .addr = omap2430_wd_timer2_addrs,
648 .user = OCP_USER_MPU | OCP_USER_SDMA,
649};
650
651/* l4_wkup -> gpio1 */
652static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
653 {
654 .pa_start = 0x4900C000,
655 .pa_end = 0x4900C1ff,
656 .flags = ADDR_TYPE_RT
657 },
658 { }
659};
660
661static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
662 .master = &omap2xxx_l4_wkup_hwmod,
663 .slave = &omap2xxx_gpio1_hwmod,
664 .clk = "gpios_ick",
665 .addr = omap2430_gpio1_addr_space,
666 .user = OCP_USER_MPU | OCP_USER_SDMA,
667};
668
669/* l4_wkup -> gpio2 */
670static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
671 {
672 .pa_start = 0x4900E000,
673 .pa_end = 0x4900E1ff,
674 .flags = ADDR_TYPE_RT
675 },
676 { }
677};
678
679static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
680 .master = &omap2xxx_l4_wkup_hwmod,
681 .slave = &omap2xxx_gpio2_hwmod,
682 .clk = "gpios_ick",
683 .addr = omap2430_gpio2_addr_space,
684 .user = OCP_USER_MPU | OCP_USER_SDMA,
685};
686
687/* l4_wkup -> gpio3 */
688static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
689 {
690 .pa_start = 0x49010000,
691 .pa_end = 0x490101ff,
692 .flags = ADDR_TYPE_RT
693 },
694 { }
695};
696
697static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
698 .master = &omap2xxx_l4_wkup_hwmod,
699 .slave = &omap2xxx_gpio3_hwmod,
700 .clk = "gpios_ick",
701 .addr = omap2430_gpio3_addr_space,
702 .user = OCP_USER_MPU | OCP_USER_SDMA,
703};
704
705/* l4_wkup -> gpio4 */
706static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
707 {
708 .pa_start = 0x49012000,
709 .pa_end = 0x490121ff,
710 .flags = ADDR_TYPE_RT
711 },
712 { }
713};
714
715static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
716 .master = &omap2xxx_l4_wkup_hwmod,
717 .slave = &omap2xxx_gpio4_hwmod,
718 .clk = "gpios_ick",
719 .addr = omap2430_gpio4_addr_space,
720 .user = OCP_USER_MPU | OCP_USER_SDMA,
721};
722
723/* l4_core -> gpio5 */
724static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
725 {
726 .pa_start = 0x480B6000,
727 .pa_end = 0x480B61ff,
728 .flags = ADDR_TYPE_RT
729 },
730 { }
731};
732
733static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
734 .master = &omap2xxx_l4_core_hwmod,
735 .slave = &omap2430_gpio5_hwmod,
736 .clk = "gpio5_ick",
737 .addr = omap2430_gpio5_addr_space,
738 .user = OCP_USER_MPU | OCP_USER_SDMA,
739};
740
741/* dma_system -> L3 */
742static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
743 .master = &omap2430_dma_system_hwmod,
744 .slave = &omap2xxx_l3_main_hwmod,
745 .clk = "core_l3_ck",
746 .user = OCP_USER_MPU | OCP_USER_SDMA,
747};
748
749/* l4_core -> dma_system */
750static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
751 .master = &omap2xxx_l4_core_hwmod,
752 .slave = &omap2430_dma_system_hwmod,
753 .clk = "sdma_ick",
754 .addr = omap2_dma_system_addrs,
755 .user = OCP_USER_MPU | OCP_USER_SDMA,
756};
757
758/* l4_core -> mailbox */
759static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
760 .master = &omap2xxx_l4_core_hwmod,
761 .slave = &omap2430_mailbox_hwmod,
762 .addr = omap2_mailbox_addrs,
763 .user = OCP_USER_MPU | OCP_USER_SDMA,
764};
765
766/* l4_core -> mcbsp1 */
767static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
768 .master = &omap2xxx_l4_core_hwmod,
769 .slave = &omap2430_mcbsp1_hwmod,
770 .clk = "mcbsp1_ick",
771 .addr = omap2_mcbsp1_addrs,
772 .user = OCP_USER_MPU | OCP_USER_SDMA,
773};
774
775/* l4_core -> mcbsp2 */
776static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
777 .master = &omap2xxx_l4_core_hwmod,
778 .slave = &omap2430_mcbsp2_hwmod,
779 .clk = "mcbsp2_ick",
780 .addr = omap2xxx_mcbsp2_addrs,
781 .user = OCP_USER_MPU | OCP_USER_SDMA,
782};
783
784static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
785 {
786 .name = "mpu",
787 .pa_start = 0x4808C000,
788 .pa_end = 0x4808C0ff,
789 .flags = ADDR_TYPE_RT
790 },
791 { }
792};
793
794/* l4_core -> mcbsp3 */
795static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
796 .master = &omap2xxx_l4_core_hwmod,
797 .slave = &omap2430_mcbsp3_hwmod,
798 .clk = "mcbsp3_ick",
799 .addr = omap2430_mcbsp3_addrs,
800 .user = OCP_USER_MPU | OCP_USER_SDMA,
801};
802
803static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
804 {
805 .name = "mpu",
806 .pa_start = 0x4808E000,
807 .pa_end = 0x4808E0ff,
808 .flags = ADDR_TYPE_RT
809 },
810 { }
811};
812
813/* l4_core -> mcbsp4 */
814static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
815 .master = &omap2xxx_l4_core_hwmod,
816 .slave = &omap2430_mcbsp4_hwmod,
817 .clk = "mcbsp4_ick",
818 .addr = omap2430_mcbsp4_addrs,
819 .user = OCP_USER_MPU | OCP_USER_SDMA,
820};
821
822static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
823 {
824 .name = "mpu",
825 .pa_start = 0x48096000,
826 .pa_end = 0x480960ff,
827 .flags = ADDR_TYPE_RT
828 },
829 { }
830};
831
832/* l4_core -> mcbsp5 */
833static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
834 .master = &omap2xxx_l4_core_hwmod,
835 .slave = &omap2430_mcbsp5_hwmod,
836 .clk = "mcbsp5_ick",
837 .addr = omap2430_mcbsp5_addrs,
838 .user = OCP_USER_MPU | OCP_USER_SDMA,
839};
840
841static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
842 &omap2xxx_l3_main__l4_core,
843 &omap2xxx_mpu__l3_main,
844 &omap2xxx_dss__l3,
845 &omap2430_usbhsotg__l3,
846 &omap2430_l4_core__i2c1,
847 &omap2430_l4_core__i2c2,
848 &omap2xxx_l4_core__l4_wkup,
849 &omap2_l4_core__uart1,
850 &omap2_l4_core__uart2,
851 &omap2_l4_core__uart3,
852 &omap2430_l4_core__usbhsotg,
853 &omap2430_l4_core__mmc1,
854 &omap2430_l4_core__mmc2,
855 &omap2xxx_l4_core__mcspi1,
856 &omap2xxx_l4_core__mcspi2,
857 &omap2430_l4_core__mcspi3,
858 &omap2430_l3__iva,
859 &omap2430_l4_wkup__timer1,
860 &omap2xxx_l4_core__timer2,
861 &omap2xxx_l4_core__timer3,
862 &omap2xxx_l4_core__timer4,
863 &omap2xxx_l4_core__timer5,
864 &omap2xxx_l4_core__timer6,
865 &omap2xxx_l4_core__timer7,
866 &omap2xxx_l4_core__timer8,
867 &omap2xxx_l4_core__timer9,
868 &omap2xxx_l4_core__timer10,
869 &omap2xxx_l4_core__timer11,
870 &omap2xxx_l4_core__timer12,
871 &omap2430_l4_wkup__wd_timer2,
872 &omap2xxx_l4_core__dss,
873 &omap2xxx_l4_core__dss_dispc,
874 &omap2xxx_l4_core__dss_rfbi,
875 &omap2xxx_l4_core__dss_venc,
876 &omap2430_l4_wkup__gpio1,
877 &omap2430_l4_wkup__gpio2,
878 &omap2430_l4_wkup__gpio3,
879 &omap2430_l4_wkup__gpio4,
880 &omap2430_l4_core__gpio5,
881 &omap2430_dma_system__l3,
882 &omap2430_l4_core__dma_system,
883 &omap2430_l4_core__mailbox,
884 &omap2430_l4_core__mcbsp1,
885 &omap2430_l4_core__mcbsp2,
886 &omap2430_l4_core__mcbsp3,
887 &omap2430_l4_core__mcbsp4,
888 &omap2430_l4_core__mcbsp5,
2066 NULL, 889 NULL,
2067}; 890};
2068 891
2069int __init omap2430_hwmod_init(void) 892int __init omap2430_hwmod_init(void)
2070{ 893{
2071 return omap_hwmod_register(omap2430_hwmods); 894 return omap_hwmod_register_links(omap2430_hwmod_ocp_ifs);
2072} 895}
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
index 4f3547c2a49e..5178e40e84f9 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
@@ -15,10 +15,12 @@
15 15
16#include <plat/omap_hwmod.h> 16#include <plat/omap_hwmod.h>
17#include <plat/serial.h> 17#include <plat/serial.h>
18#include <plat/l3_2xxx.h>
19#include <plat/l4_2xxx.h>
18 20
19#include "omap_hwmod_common_data.h" 21#include "omap_hwmod_common_data.h"
20 22
21struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = { 23static struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = {
22 { 24 {
23 .pa_start = OMAP2_UART1_BASE, 25 .pa_start = OMAP2_UART1_BASE,
24 .pa_end = OMAP2_UART1_BASE + SZ_8K - 1, 26 .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,
@@ -27,7 +29,7 @@ struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = {
27 { } 29 { }
28}; 30};
29 31
30struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = { 32static struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = {
31 { 33 {
32 .pa_start = OMAP2_UART2_BASE, 34 .pa_start = OMAP2_UART2_BASE,
33 .pa_end = OMAP2_UART2_BASE + SZ_1K - 1, 35 .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,
@@ -36,7 +38,7 @@ struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = {
36 { } 38 { }
37}; 39};
38 40
39struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = { 41static struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = {
40 { 42 {
41 .pa_start = OMAP2_UART3_BASE, 43 .pa_start = OMAP2_UART3_BASE,
42 .pa_end = OMAP2_UART3_BASE + SZ_1K - 1, 44 .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,
@@ -45,7 +47,7 @@ struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = {
45 { } 47 { }
46}; 48};
47 49
48struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = { 50static struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = {
49 { 51 {
50 .pa_start = 0x4802a000, 52 .pa_start = 0x4802a000,
51 .pa_end = 0x4802a000 + SZ_1K - 1, 53 .pa_end = 0x4802a000 + SZ_1K - 1,
@@ -54,7 +56,7 @@ struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = {
54 { } 56 { }
55}; 57};
56 58
57struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = { 59static struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = {
58 { 60 {
59 .pa_start = 0x48078000, 61 .pa_start = 0x48078000,
60 .pa_end = 0x48078000 + SZ_1K - 1, 62 .pa_end = 0x48078000 + SZ_1K - 1,
@@ -63,7 +65,7 @@ struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = {
63 { } 65 { }
64}; 66};
65 67
66struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = { 68static struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = {
67 { 69 {
68 .pa_start = 0x4807a000, 70 .pa_start = 0x4807a000,
69 .pa_end = 0x4807a000 + SZ_1K - 1, 71 .pa_end = 0x4807a000 + SZ_1K - 1,
@@ -72,7 +74,7 @@ struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = {
72 { } 74 { }
73}; 75};
74 76
75struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = { 77static struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = {
76 { 78 {
77 .pa_start = 0x4807c000, 79 .pa_start = 0x4807c000,
78 .pa_end = 0x4807c000 + SZ_1K - 1, 80 .pa_end = 0x4807c000 + SZ_1K - 1,
@@ -81,7 +83,7 @@ struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = {
81 { } 83 { }
82}; 84};
83 85
84struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = { 86static struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = {
85 { 87 {
86 .pa_start = 0x4807e000, 88 .pa_start = 0x4807e000,
87 .pa_end = 0x4807e000 + SZ_1K - 1, 89 .pa_end = 0x4807e000 + SZ_1K - 1,
@@ -90,7 +92,7 @@ struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = {
90 { } 92 { }
91}; 93};
92 94
93struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = { 95static struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = {
94 { 96 {
95 .pa_start = 0x48080000, 97 .pa_start = 0x48080000,
96 .pa_end = 0x48080000 + SZ_1K - 1, 98 .pa_end = 0x48080000 + SZ_1K - 1,
@@ -99,7 +101,7 @@ struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = {
99 { } 101 { }
100}; 102};
101 103
102struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = { 104static struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = {
103 { 105 {
104 .pa_start = 0x48082000, 106 .pa_start = 0x48082000,
105 .pa_end = 0x48082000 + SZ_1K - 1, 107 .pa_end = 0x48082000 + SZ_1K - 1,
@@ -108,7 +110,7 @@ struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = {
108 { } 110 { }
109}; 111};
110 112
111struct omap_hwmod_addr_space omap2xxx_timer9_addrs[] = { 113static struct omap_hwmod_addr_space omap2xxx_timer9_addrs[] = {
112 { 114 {
113 .pa_start = 0x48084000, 115 .pa_start = 0x48084000,
114 .pa_end = 0x48084000 + SZ_1K - 1, 116 .pa_end = 0x48084000 + SZ_1K - 1,
@@ -127,4 +129,246 @@ struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[] = {
127 { } 129 { }
128}; 130};
129 131
132/*
133 * Common interconnect data
134 */
135
136/* L3 -> L4_CORE interface */
137struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core = {
138 .master = &omap2xxx_l3_main_hwmod,
139 .slave = &omap2xxx_l4_core_hwmod,
140 .user = OCP_USER_MPU | OCP_USER_SDMA,
141};
142
143/* MPU -> L3 interface */
144struct omap_hwmod_ocp_if omap2xxx_mpu__l3_main = {
145 .master = &omap2xxx_mpu_hwmod,
146 .slave = &omap2xxx_l3_main_hwmod,
147 .user = OCP_USER_MPU,
148};
149
150/* DSS -> l3 */
151struct omap_hwmod_ocp_if omap2xxx_dss__l3 = {
152 .master = &omap2xxx_dss_core_hwmod,
153 .slave = &omap2xxx_l3_main_hwmod,
154 .fw = {
155 .omap2 = {
156 .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
157 .flags = OMAP_FIREWALL_L3,
158 }
159 },
160 .user = OCP_USER_MPU | OCP_USER_SDMA,
161};
162
163/* L4_CORE -> L4_WKUP interface */
164struct omap_hwmod_ocp_if omap2xxx_l4_core__l4_wkup = {
165 .master = &omap2xxx_l4_core_hwmod,
166 .slave = &omap2xxx_l4_wkup_hwmod,
167 .user = OCP_USER_MPU | OCP_USER_SDMA,
168};
169
170/* L4 CORE -> UART1 interface */
171struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
172 .master = &omap2xxx_l4_core_hwmod,
173 .slave = &omap2xxx_uart1_hwmod,
174 .clk = "uart1_ick",
175 .addr = omap2xxx_uart1_addr_space,
176 .user = OCP_USER_MPU | OCP_USER_SDMA,
177};
178
179/* L4 CORE -> UART2 interface */
180struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
181 .master = &omap2xxx_l4_core_hwmod,
182 .slave = &omap2xxx_uart2_hwmod,
183 .clk = "uart2_ick",
184 .addr = omap2xxx_uart2_addr_space,
185 .user = OCP_USER_MPU | OCP_USER_SDMA,
186};
187
188/* L4 PER -> UART3 interface */
189struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
190 .master = &omap2xxx_l4_core_hwmod,
191 .slave = &omap2xxx_uart3_hwmod,
192 .clk = "uart3_ick",
193 .addr = omap2xxx_uart3_addr_space,
194 .user = OCP_USER_MPU | OCP_USER_SDMA,
195};
196
197/* l4 core -> mcspi1 interface */
198struct omap_hwmod_ocp_if omap2xxx_l4_core__mcspi1 = {
199 .master = &omap2xxx_l4_core_hwmod,
200 .slave = &omap2xxx_mcspi1_hwmod,
201 .clk = "mcspi1_ick",
202 .addr = omap2_mcspi1_addr_space,
203 .user = OCP_USER_MPU | OCP_USER_SDMA,
204};
205
206/* l4 core -> mcspi2 interface */
207struct omap_hwmod_ocp_if omap2xxx_l4_core__mcspi2 = {
208 .master = &omap2xxx_l4_core_hwmod,
209 .slave = &omap2xxx_mcspi2_hwmod,
210 .clk = "mcspi2_ick",
211 .addr = omap2_mcspi2_addr_space,
212 .user = OCP_USER_MPU | OCP_USER_SDMA,
213};
214
215/* l4_core -> timer2 */
216struct omap_hwmod_ocp_if omap2xxx_l4_core__timer2 = {
217 .master = &omap2xxx_l4_core_hwmod,
218 .slave = &omap2xxx_timer2_hwmod,
219 .clk = "gpt2_ick",
220 .addr = omap2xxx_timer2_addrs,
221 .user = OCP_USER_MPU | OCP_USER_SDMA,
222};
223
224/* l4_core -> timer3 */
225struct omap_hwmod_ocp_if omap2xxx_l4_core__timer3 = {
226 .master = &omap2xxx_l4_core_hwmod,
227 .slave = &omap2xxx_timer3_hwmod,
228 .clk = "gpt3_ick",
229 .addr = omap2xxx_timer3_addrs,
230 .user = OCP_USER_MPU | OCP_USER_SDMA,
231};
232
233/* l4_core -> timer4 */
234struct omap_hwmod_ocp_if omap2xxx_l4_core__timer4 = {
235 .master = &omap2xxx_l4_core_hwmod,
236 .slave = &omap2xxx_timer4_hwmod,
237 .clk = "gpt4_ick",
238 .addr = omap2xxx_timer4_addrs,
239 .user = OCP_USER_MPU | OCP_USER_SDMA,
240};
241
242/* l4_core -> timer5 */
243struct omap_hwmod_ocp_if omap2xxx_l4_core__timer5 = {
244 .master = &omap2xxx_l4_core_hwmod,
245 .slave = &omap2xxx_timer5_hwmod,
246 .clk = "gpt5_ick",
247 .addr = omap2xxx_timer5_addrs,
248 .user = OCP_USER_MPU | OCP_USER_SDMA,
249};
250
251/* l4_core -> timer6 */
252struct omap_hwmod_ocp_if omap2xxx_l4_core__timer6 = {
253 .master = &omap2xxx_l4_core_hwmod,
254 .slave = &omap2xxx_timer6_hwmod,
255 .clk = "gpt6_ick",
256 .addr = omap2xxx_timer6_addrs,
257 .user = OCP_USER_MPU | OCP_USER_SDMA,
258};
259
260/* l4_core -> timer7 */
261struct omap_hwmod_ocp_if omap2xxx_l4_core__timer7 = {
262 .master = &omap2xxx_l4_core_hwmod,
263 .slave = &omap2xxx_timer7_hwmod,
264 .clk = "gpt7_ick",
265 .addr = omap2xxx_timer7_addrs,
266 .user = OCP_USER_MPU | OCP_USER_SDMA,
267};
268
269/* l4_core -> timer8 */
270struct omap_hwmod_ocp_if omap2xxx_l4_core__timer8 = {
271 .master = &omap2xxx_l4_core_hwmod,
272 .slave = &omap2xxx_timer8_hwmod,
273 .clk = "gpt8_ick",
274 .addr = omap2xxx_timer8_addrs,
275 .user = OCP_USER_MPU | OCP_USER_SDMA,
276};
277
278/* l4_core -> timer9 */
279struct omap_hwmod_ocp_if omap2xxx_l4_core__timer9 = {
280 .master = &omap2xxx_l4_core_hwmod,
281 .slave = &omap2xxx_timer9_hwmod,
282 .clk = "gpt9_ick",
283 .addr = omap2xxx_timer9_addrs,
284 .user = OCP_USER_MPU | OCP_USER_SDMA,
285};
286
287/* l4_core -> timer10 */
288struct omap_hwmod_ocp_if omap2xxx_l4_core__timer10 = {
289 .master = &omap2xxx_l4_core_hwmod,
290 .slave = &omap2xxx_timer10_hwmod,
291 .clk = "gpt10_ick",
292 .addr = omap2_timer10_addrs,
293 .user = OCP_USER_MPU | OCP_USER_SDMA,
294};
295
296/* l4_core -> timer11 */
297struct omap_hwmod_ocp_if omap2xxx_l4_core__timer11 = {
298 .master = &omap2xxx_l4_core_hwmod,
299 .slave = &omap2xxx_timer11_hwmod,
300 .clk = "gpt11_ick",
301 .addr = omap2_timer11_addrs,
302 .user = OCP_USER_MPU | OCP_USER_SDMA,
303};
304
305/* l4_core -> timer12 */
306struct omap_hwmod_ocp_if omap2xxx_l4_core__timer12 = {
307 .master = &omap2xxx_l4_core_hwmod,
308 .slave = &omap2xxx_timer12_hwmod,
309 .clk = "gpt12_ick",
310 .addr = omap2xxx_timer12_addrs,
311 .user = OCP_USER_MPU | OCP_USER_SDMA,
312};
313
314/* l4_core -> dss */
315struct omap_hwmod_ocp_if omap2xxx_l4_core__dss = {
316 .master = &omap2xxx_l4_core_hwmod,
317 .slave = &omap2xxx_dss_core_hwmod,
318 .clk = "dss_ick",
319 .addr = omap2_dss_addrs,
320 .fw = {
321 .omap2 = {
322 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
323 .flags = OMAP_FIREWALL_L4,
324 }
325 },
326 .user = OCP_USER_MPU | OCP_USER_SDMA,
327};
328
329/* l4_core -> dss_dispc */
330struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_dispc = {
331 .master = &omap2xxx_l4_core_hwmod,
332 .slave = &omap2xxx_dss_dispc_hwmod,
333 .clk = "dss_ick",
334 .addr = omap2_dss_dispc_addrs,
335 .fw = {
336 .omap2 = {
337 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION,
338 .flags = OMAP_FIREWALL_L4,
339 }
340 },
341 .user = OCP_USER_MPU | OCP_USER_SDMA,
342};
343
344/* l4_core -> dss_rfbi */
345struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_rfbi = {
346 .master = &omap2xxx_l4_core_hwmod,
347 .slave = &omap2xxx_dss_rfbi_hwmod,
348 .clk = "dss_ick",
349 .addr = omap2_dss_rfbi_addrs,
350 .fw = {
351 .omap2 = {
352 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
353 .flags = OMAP_FIREWALL_L4,
354 }
355 },
356 .user = OCP_USER_MPU | OCP_USER_SDMA,
357};
358
359/* l4_core -> dss_venc */
360struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_venc = {
361 .master = &omap2xxx_l4_core_hwmod,
362 .slave = &omap2xxx_dss_venc_hwmod,
363 .clk = "dss_ick",
364 .addr = omap2_dss_venc_addrs,
365 .fw = {
366 .omap2 = {
367 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION,
368 .flags = OMAP_FIREWALL_L4,
369 }
370 },
371 .flags = OCPIF_SWSUP_IDLE,
372 .user = OCP_USER_MPU | OCP_USER_SDMA,
373};
130 374
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
index 2a6729741b06..45aaa07e3025 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
@@ -10,6 +10,7 @@
10 */ 10 */
11#include <plat/omap_hwmod.h> 11#include <plat/omap_hwmod.h>
12#include <plat/serial.h> 12#include <plat/serial.h>
13#include <plat/gpio.h>
13#include <plat/dma.h> 14#include <plat/dma.h>
14#include <plat/dmtimer.h> 15#include <plat/dmtimer.h>
15#include <plat/mcspi.h> 16#include <plat/mcspi.h>
@@ -17,6 +18,8 @@
17#include <mach/irqs.h> 18#include <mach/irqs.h>
18 19
19#include "omap_hwmod_common_data.h" 20#include "omap_hwmod_common_data.h"
21#include "cm-regbits-24xx.h"
22#include "prm-regbits-24xx.h"
20#include "wd_timer.h" 23#include "wd_timer.h"
21 24
22struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = { 25struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = {
@@ -170,3 +173,562 @@ struct omap_hwmod_class omap2xxx_mcspi_class = {
170 .sysc = &omap2xxx_mcspi_sysc, 173 .sysc = &omap2xxx_mcspi_sysc,
171 .rev = OMAP2_MCSPI_REV, 174 .rev = OMAP2_MCSPI_REV,
172}; 175};
176
177/*
178 * IP blocks
179 */
180
181/* L3 */
182struct omap_hwmod omap2xxx_l3_main_hwmod = {
183 .name = "l3_main",
184 .class = &l3_hwmod_class,
185 .flags = HWMOD_NO_IDLEST,
186};
187
188/* L4 CORE */
189struct omap_hwmod omap2xxx_l4_core_hwmod = {
190 .name = "l4_core",
191 .class = &l4_hwmod_class,
192 .flags = HWMOD_NO_IDLEST,
193};
194
195/* L4 WKUP */
196struct omap_hwmod omap2xxx_l4_wkup_hwmod = {
197 .name = "l4_wkup",
198 .class = &l4_hwmod_class,
199 .flags = HWMOD_NO_IDLEST,
200};
201
202/* MPU */
203struct omap_hwmod omap2xxx_mpu_hwmod = {
204 .name = "mpu",
205 .class = &mpu_hwmod_class,
206 .main_clk = "mpu_ck",
207};
208
209/* IVA2 */
210struct omap_hwmod omap2xxx_iva_hwmod = {
211 .name = "iva",
212 .class = &iva_hwmod_class,
213};
214
215/* always-on timers dev attribute */
216static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
217 .timer_capability = OMAP_TIMER_ALWON,
218};
219
220/* pwm timers dev attribute */
221static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
222 .timer_capability = OMAP_TIMER_HAS_PWM,
223};
224
225/* timer1 */
226
227struct omap_hwmod omap2xxx_timer1_hwmod = {
228 .name = "timer1",
229 .mpu_irqs = omap2_timer1_mpu_irqs,
230 .main_clk = "gpt1_fck",
231 .prcm = {
232 .omap2 = {
233 .prcm_reg_id = 1,
234 .module_bit = OMAP24XX_EN_GPT1_SHIFT,
235 .module_offs = WKUP_MOD,
236 .idlest_reg_id = 1,
237 .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
238 },
239 },
240 .dev_attr = &capability_alwon_dev_attr,
241 .class = &omap2xxx_timer_hwmod_class,
242};
243
244/* timer2 */
245
246struct omap_hwmod omap2xxx_timer2_hwmod = {
247 .name = "timer2",
248 .mpu_irqs = omap2_timer2_mpu_irqs,
249 .main_clk = "gpt2_fck",
250 .prcm = {
251 .omap2 = {
252 .prcm_reg_id = 1,
253 .module_bit = OMAP24XX_EN_GPT2_SHIFT,
254 .module_offs = CORE_MOD,
255 .idlest_reg_id = 1,
256 .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
257 },
258 },
259 .dev_attr = &capability_alwon_dev_attr,
260 .class = &omap2xxx_timer_hwmod_class,
261};
262
263/* timer3 */
264
265struct omap_hwmod omap2xxx_timer3_hwmod = {
266 .name = "timer3",
267 .mpu_irqs = omap2_timer3_mpu_irqs,
268 .main_clk = "gpt3_fck",
269 .prcm = {
270 .omap2 = {
271 .prcm_reg_id = 1,
272 .module_bit = OMAP24XX_EN_GPT3_SHIFT,
273 .module_offs = CORE_MOD,
274 .idlest_reg_id = 1,
275 .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
276 },
277 },
278 .dev_attr = &capability_alwon_dev_attr,
279 .class = &omap2xxx_timer_hwmod_class,
280};
281
282/* timer4 */
283
284struct omap_hwmod omap2xxx_timer4_hwmod = {
285 .name = "timer4",
286 .mpu_irqs = omap2_timer4_mpu_irqs,
287 .main_clk = "gpt4_fck",
288 .prcm = {
289 .omap2 = {
290 .prcm_reg_id = 1,
291 .module_bit = OMAP24XX_EN_GPT4_SHIFT,
292 .module_offs = CORE_MOD,
293 .idlest_reg_id = 1,
294 .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
295 },
296 },
297 .dev_attr = &capability_alwon_dev_attr,
298 .class = &omap2xxx_timer_hwmod_class,
299};
300
301/* timer5 */
302
303struct omap_hwmod omap2xxx_timer5_hwmod = {
304 .name = "timer5",
305 .mpu_irqs = omap2_timer5_mpu_irqs,
306 .main_clk = "gpt5_fck",
307 .prcm = {
308 .omap2 = {
309 .prcm_reg_id = 1,
310 .module_bit = OMAP24XX_EN_GPT5_SHIFT,
311 .module_offs = CORE_MOD,
312 .idlest_reg_id = 1,
313 .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
314 },
315 },
316 .dev_attr = &capability_alwon_dev_attr,
317 .class = &omap2xxx_timer_hwmod_class,
318};
319
320/* timer6 */
321
322struct omap_hwmod omap2xxx_timer6_hwmod = {
323 .name = "timer6",
324 .mpu_irqs = omap2_timer6_mpu_irqs,
325 .main_clk = "gpt6_fck",
326 .prcm = {
327 .omap2 = {
328 .prcm_reg_id = 1,
329 .module_bit = OMAP24XX_EN_GPT6_SHIFT,
330 .module_offs = CORE_MOD,
331 .idlest_reg_id = 1,
332 .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
333 },
334 },
335 .dev_attr = &capability_alwon_dev_attr,
336 .class = &omap2xxx_timer_hwmod_class,
337};
338
339/* timer7 */
340
341struct omap_hwmod omap2xxx_timer7_hwmod = {
342 .name = "timer7",
343 .mpu_irqs = omap2_timer7_mpu_irqs,
344 .main_clk = "gpt7_fck",
345 .prcm = {
346 .omap2 = {
347 .prcm_reg_id = 1,
348 .module_bit = OMAP24XX_EN_GPT7_SHIFT,
349 .module_offs = CORE_MOD,
350 .idlest_reg_id = 1,
351 .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
352 },
353 },
354 .dev_attr = &capability_alwon_dev_attr,
355 .class = &omap2xxx_timer_hwmod_class,
356};
357
358/* timer8 */
359
360struct omap_hwmod omap2xxx_timer8_hwmod = {
361 .name = "timer8",
362 .mpu_irqs = omap2_timer8_mpu_irqs,
363 .main_clk = "gpt8_fck",
364 .prcm = {
365 .omap2 = {
366 .prcm_reg_id = 1,
367 .module_bit = OMAP24XX_EN_GPT8_SHIFT,
368 .module_offs = CORE_MOD,
369 .idlest_reg_id = 1,
370 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
371 },
372 },
373 .dev_attr = &capability_alwon_dev_attr,
374 .class = &omap2xxx_timer_hwmod_class,
375};
376
377/* timer9 */
378
379struct omap_hwmod omap2xxx_timer9_hwmod = {
380 .name = "timer9",
381 .mpu_irqs = omap2_timer9_mpu_irqs,
382 .main_clk = "gpt9_fck",
383 .prcm = {
384 .omap2 = {
385 .prcm_reg_id = 1,
386 .module_bit = OMAP24XX_EN_GPT9_SHIFT,
387 .module_offs = CORE_MOD,
388 .idlest_reg_id = 1,
389 .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
390 },
391 },
392 .dev_attr = &capability_pwm_dev_attr,
393 .class = &omap2xxx_timer_hwmod_class,
394};
395
396/* timer10 */
397
398struct omap_hwmod omap2xxx_timer10_hwmod = {
399 .name = "timer10",
400 .mpu_irqs = omap2_timer10_mpu_irqs,
401 .main_clk = "gpt10_fck",
402 .prcm = {
403 .omap2 = {
404 .prcm_reg_id = 1,
405 .module_bit = OMAP24XX_EN_GPT10_SHIFT,
406 .module_offs = CORE_MOD,
407 .idlest_reg_id = 1,
408 .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
409 },
410 },
411 .dev_attr = &capability_pwm_dev_attr,
412 .class = &omap2xxx_timer_hwmod_class,
413};
414
415/* timer11 */
416
417struct omap_hwmod omap2xxx_timer11_hwmod = {
418 .name = "timer11",
419 .mpu_irqs = omap2_timer11_mpu_irqs,
420 .main_clk = "gpt11_fck",
421 .prcm = {
422 .omap2 = {
423 .prcm_reg_id = 1,
424 .module_bit = OMAP24XX_EN_GPT11_SHIFT,
425 .module_offs = CORE_MOD,
426 .idlest_reg_id = 1,
427 .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
428 },
429 },
430 .dev_attr = &capability_pwm_dev_attr,
431 .class = &omap2xxx_timer_hwmod_class,
432};
433
434/* timer12 */
435
436struct omap_hwmod omap2xxx_timer12_hwmod = {
437 .name = "timer12",
438 .mpu_irqs = omap2xxx_timer12_mpu_irqs,
439 .main_clk = "gpt12_fck",
440 .prcm = {
441 .omap2 = {
442 .prcm_reg_id = 1,
443 .module_bit = OMAP24XX_EN_GPT12_SHIFT,
444 .module_offs = CORE_MOD,
445 .idlest_reg_id = 1,
446 .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
447 },
448 },
449 .dev_attr = &capability_pwm_dev_attr,
450 .class = &omap2xxx_timer_hwmod_class,
451};
452
453/* wd_timer2 */
454struct omap_hwmod omap2xxx_wd_timer2_hwmod = {
455 .name = "wd_timer2",
456 .class = &omap2xxx_wd_timer_hwmod_class,
457 .main_clk = "mpu_wdt_fck",
458 .prcm = {
459 .omap2 = {
460 .prcm_reg_id = 1,
461 .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
462 .module_offs = WKUP_MOD,
463 .idlest_reg_id = 1,
464 .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
465 },
466 },
467};
468
469/* UART1 */
470
471struct omap_hwmod omap2xxx_uart1_hwmod = {
472 .name = "uart1",
473 .mpu_irqs = omap2_uart1_mpu_irqs,
474 .sdma_reqs = omap2_uart1_sdma_reqs,
475 .main_clk = "uart1_fck",
476 .prcm = {
477 .omap2 = {
478 .module_offs = CORE_MOD,
479 .prcm_reg_id = 1,
480 .module_bit = OMAP24XX_EN_UART1_SHIFT,
481 .idlest_reg_id = 1,
482 .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
483 },
484 },
485 .class = &omap2_uart_class,
486};
487
488/* UART2 */
489
490struct omap_hwmod omap2xxx_uart2_hwmod = {
491 .name = "uart2",
492 .mpu_irqs = omap2_uart2_mpu_irqs,
493 .sdma_reqs = omap2_uart2_sdma_reqs,
494 .main_clk = "uart2_fck",
495 .prcm = {
496 .omap2 = {
497 .module_offs = CORE_MOD,
498 .prcm_reg_id = 1,
499 .module_bit = OMAP24XX_EN_UART2_SHIFT,
500 .idlest_reg_id = 1,
501 .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
502 },
503 },
504 .class = &omap2_uart_class,
505};
506
507/* UART3 */
508
509struct omap_hwmod omap2xxx_uart3_hwmod = {
510 .name = "uart3",
511 .mpu_irqs = omap2_uart3_mpu_irqs,
512 .sdma_reqs = omap2_uart3_sdma_reqs,
513 .main_clk = "uart3_fck",
514 .prcm = {
515 .omap2 = {
516 .module_offs = CORE_MOD,
517 .prcm_reg_id = 2,
518 .module_bit = OMAP24XX_EN_UART3_SHIFT,
519 .idlest_reg_id = 2,
520 .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
521 },
522 },
523 .class = &omap2_uart_class,
524};
525
526/* dss */
527
528static struct omap_hwmod_opt_clk dss_opt_clks[] = {
529 /*
530 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
531 * driver does not use these clocks.
532 */
533 { .role = "tv_clk", .clk = "dss_54m_fck" },
534 { .role = "sys_clk", .clk = "dss2_fck" },
535};
536
537struct omap_hwmod omap2xxx_dss_core_hwmod = {
538 .name = "dss_core",
539 .class = &omap2_dss_hwmod_class,
540 .main_clk = "dss1_fck", /* instead of dss_fck */
541 .sdma_reqs = omap2xxx_dss_sdma_chs,
542 .prcm = {
543 .omap2 = {
544 .prcm_reg_id = 1,
545 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
546 .module_offs = CORE_MOD,
547 .idlest_reg_id = 1,
548 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
549 },
550 },
551 .opt_clks = dss_opt_clks,
552 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
553 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
554};
555
556struct omap_hwmod omap2xxx_dss_dispc_hwmod = {
557 .name = "dss_dispc",
558 .class = &omap2_dispc_hwmod_class,
559 .mpu_irqs = omap2_dispc_irqs,
560 .main_clk = "dss1_fck",
561 .prcm = {
562 .omap2 = {
563 .prcm_reg_id = 1,
564 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
565 .module_offs = CORE_MOD,
566 .idlest_reg_id = 1,
567 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
568 },
569 },
570 .flags = HWMOD_NO_IDLEST,
571 .dev_attr = &omap2_3_dss_dispc_dev_attr
572};
573
574static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
575 { .role = "ick", .clk = "dss_ick" },
576};
577
578struct omap_hwmod omap2xxx_dss_rfbi_hwmod = {
579 .name = "dss_rfbi",
580 .class = &omap2_rfbi_hwmod_class,
581 .main_clk = "dss1_fck",
582 .prcm = {
583 .omap2 = {
584 .prcm_reg_id = 1,
585 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
586 .module_offs = CORE_MOD,
587 },
588 },
589 .opt_clks = dss_rfbi_opt_clks,
590 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
591 .flags = HWMOD_NO_IDLEST,
592};
593
594struct omap_hwmod omap2xxx_dss_venc_hwmod = {
595 .name = "dss_venc",
596 .class = &omap2_venc_hwmod_class,
597 .main_clk = "dss_54m_fck",
598 .prcm = {
599 .omap2 = {
600 .prcm_reg_id = 1,
601 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
602 .module_offs = CORE_MOD,
603 },
604 },
605 .flags = HWMOD_NO_IDLEST,
606};
607
608/* gpio dev_attr */
609struct omap_gpio_dev_attr omap2xxx_gpio_dev_attr = {
610 .bank_width = 32,
611 .dbck_flag = false,
612};
613
614/* gpio1 */
615struct omap_hwmod omap2xxx_gpio1_hwmod = {
616 .name = "gpio1",
617 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
618 .mpu_irqs = omap2_gpio1_irqs,
619 .main_clk = "gpios_fck",
620 .prcm = {
621 .omap2 = {
622 .prcm_reg_id = 1,
623 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
624 .module_offs = WKUP_MOD,
625 .idlest_reg_id = 1,
626 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
627 },
628 },
629 .class = &omap2xxx_gpio_hwmod_class,
630 .dev_attr = &omap2xxx_gpio_dev_attr,
631};
632
633/* gpio2 */
634struct omap_hwmod omap2xxx_gpio2_hwmod = {
635 .name = "gpio2",
636 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
637 .mpu_irqs = omap2_gpio2_irqs,
638 .main_clk = "gpios_fck",
639 .prcm = {
640 .omap2 = {
641 .prcm_reg_id = 1,
642 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
643 .module_offs = WKUP_MOD,
644 .idlest_reg_id = 1,
645 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
646 },
647 },
648 .class = &omap2xxx_gpio_hwmod_class,
649 .dev_attr = &omap2xxx_gpio_dev_attr,
650};
651
652/* gpio3 */
653struct omap_hwmod omap2xxx_gpio3_hwmod = {
654 .name = "gpio3",
655 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
656 .mpu_irqs = omap2_gpio3_irqs,
657 .main_clk = "gpios_fck",
658 .prcm = {
659 .omap2 = {
660 .prcm_reg_id = 1,
661 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
662 .module_offs = WKUP_MOD,
663 .idlest_reg_id = 1,
664 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
665 },
666 },
667 .class = &omap2xxx_gpio_hwmod_class,
668 .dev_attr = &omap2xxx_gpio_dev_attr,
669};
670
671/* gpio4 */
672struct omap_hwmod omap2xxx_gpio4_hwmod = {
673 .name = "gpio4",
674 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
675 .mpu_irqs = omap2_gpio4_irqs,
676 .main_clk = "gpios_fck",
677 .prcm = {
678 .omap2 = {
679 .prcm_reg_id = 1,
680 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
681 .module_offs = WKUP_MOD,
682 .idlest_reg_id = 1,
683 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
684 },
685 },
686 .class = &omap2xxx_gpio_hwmod_class,
687 .dev_attr = &omap2xxx_gpio_dev_attr,
688};
689
690/* mcspi1 */
691static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
692 .num_chipselect = 4,
693};
694
695struct omap_hwmod omap2xxx_mcspi1_hwmod = {
696 .name = "mcspi1",
697 .mpu_irqs = omap2_mcspi1_mpu_irqs,
698 .sdma_reqs = omap2_mcspi1_sdma_reqs,
699 .main_clk = "mcspi1_fck",
700 .prcm = {
701 .omap2 = {
702 .module_offs = CORE_MOD,
703 .prcm_reg_id = 1,
704 .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
705 .idlest_reg_id = 1,
706 .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
707 },
708 },
709 .class = &omap2xxx_mcspi_class,
710 .dev_attr = &omap_mcspi1_dev_attr,
711};
712
713/* mcspi2 */
714static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
715 .num_chipselect = 2,
716};
717
718struct omap_hwmod omap2xxx_mcspi2_hwmod = {
719 .name = "mcspi2",
720 .mpu_irqs = omap2_mcspi2_mpu_irqs,
721 .sdma_reqs = omap2_mcspi2_sdma_reqs,
722 .main_clk = "mcspi2_fck",
723 .prcm = {
724 .omap2 = {
725 .module_offs = CORE_MOD,
726 .prcm_reg_id = 1,
727 .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
728 .idlest_reg_id = 1,
729 .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
730 },
731 },
732 .class = &omap2xxx_mcspi_class,
733 .dev_attr = &omap_mcspi2_dev_attr,
734};
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index db86ce90c69f..0c65079c2b69 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -2,6 +2,7 @@
2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips 2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
3 * 3 *
4 * Copyright (C) 2009-2011 Nokia Corporation 4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2012 Texas Instruments, Inc.
5 * Paul Walmsley 6 * Paul Walmsley
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
@@ -38,491 +39,56 @@
38/* 39/*
39 * OMAP3xxx hardware module integration data 40 * OMAP3xxx hardware module integration data
40 * 41 *
41 * ALl of the data in this section should be autogeneratable from the 42 * All of the data in this section should be autogeneratable from the
42 * TI hardware database or other technical documentation. Data that 43 * TI hardware database or other technical documentation. Data that
43 * is driver-specific or driver-kernel integration-specific belongs 44 * is driver-specific or driver-kernel integration-specific belongs
44 * elsewhere. 45 * elsewhere.
45 */ 46 */
46 47
47static struct omap_hwmod omap3xxx_mpu_hwmod; 48/*
48static struct omap_hwmod omap3xxx_iva_hwmod; 49 * IP blocks
49static struct omap_hwmod omap3xxx_l3_main_hwmod; 50 */
50static struct omap_hwmod omap3xxx_l4_core_hwmod;
51static struct omap_hwmod omap3xxx_l4_per_hwmod;
52static struct omap_hwmod omap3xxx_wd_timer2_hwmod;
53static struct omap_hwmod omap3430es1_dss_core_hwmod;
54static struct omap_hwmod omap3xxx_dss_core_hwmod;
55static struct omap_hwmod omap3xxx_dss_dispc_hwmod;
56static struct omap_hwmod omap3xxx_dss_dsi1_hwmod;
57static struct omap_hwmod omap3xxx_dss_rfbi_hwmod;
58static struct omap_hwmod omap3xxx_dss_venc_hwmod;
59static struct omap_hwmod omap3xxx_i2c1_hwmod;
60static struct omap_hwmod omap3xxx_i2c2_hwmod;
61static struct omap_hwmod omap3xxx_i2c3_hwmod;
62static struct omap_hwmod omap3xxx_gpio1_hwmod;
63static struct omap_hwmod omap3xxx_gpio2_hwmod;
64static struct omap_hwmod omap3xxx_gpio3_hwmod;
65static struct omap_hwmod omap3xxx_gpio4_hwmod;
66static struct omap_hwmod omap3xxx_gpio5_hwmod;
67static struct omap_hwmod omap3xxx_gpio6_hwmod;
68static struct omap_hwmod omap34xx_sr1_hwmod;
69static struct omap_hwmod omap34xx_sr2_hwmod;
70static struct omap_hwmod omap34xx_mcspi1;
71static struct omap_hwmod omap34xx_mcspi2;
72static struct omap_hwmod omap34xx_mcspi3;
73static struct omap_hwmod omap34xx_mcspi4;
74static struct omap_hwmod omap3xxx_mmc1_hwmod;
75static struct omap_hwmod omap3xxx_mmc2_hwmod;
76static struct omap_hwmod omap3xxx_mmc3_hwmod;
77static struct omap_hwmod am35xx_usbhsotg_hwmod;
78
79static struct omap_hwmod omap3xxx_dma_system_hwmod;
80
81static struct omap_hwmod omap3xxx_mcbsp1_hwmod;
82static struct omap_hwmod omap3xxx_mcbsp2_hwmod;
83static struct omap_hwmod omap3xxx_mcbsp3_hwmod;
84static struct omap_hwmod omap3xxx_mcbsp4_hwmod;
85static struct omap_hwmod omap3xxx_mcbsp5_hwmod;
86static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod;
87static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod;
88static struct omap_hwmod omap3xxx_usb_host_hs_hwmod;
89static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod;
90
91/* L3 -> L4_CORE interface */
92static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
93 .master = &omap3xxx_l3_main_hwmod,
94 .slave = &omap3xxx_l4_core_hwmod,
95 .user = OCP_USER_MPU | OCP_USER_SDMA,
96};
97
98/* L3 -> L4_PER interface */
99static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
100 .master = &omap3xxx_l3_main_hwmod,
101 .slave = &omap3xxx_l4_per_hwmod,
102 .user = OCP_USER_MPU | OCP_USER_SDMA,
103};
104 51
105/* L3 taret configuration and error log registers */ 52/* L3 */
106static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = { 53static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
107 { .irq = INT_34XX_L3_DBG_IRQ }, 54 { .irq = INT_34XX_L3_DBG_IRQ },
108 { .irq = INT_34XX_L3_APP_IRQ }, 55 { .irq = INT_34XX_L3_APP_IRQ },
109 { .irq = -1 } 56 { .irq = -1 }
110}; 57};
111 58
112static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
113 {
114 .pa_start = 0x68000000,
115 .pa_end = 0x6800ffff,
116 .flags = ADDR_TYPE_RT,
117 },
118 { }
119};
120
121/* MPU -> L3 interface */
122static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
123 .master = &omap3xxx_mpu_hwmod,
124 .slave = &omap3xxx_l3_main_hwmod,
125 .addr = omap3xxx_l3_main_addrs,
126 .user = OCP_USER_MPU,
127};
128
129/* Slave interfaces on the L3 interconnect */
130static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = {
131 &omap3xxx_mpu__l3_main,
132};
133
134/* DSS -> l3 */
135static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
136 .master = &omap3xxx_dss_core_hwmod,
137 .slave = &omap3xxx_l3_main_hwmod,
138 .fw = {
139 .omap2 = {
140 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
141 .flags = OMAP_FIREWALL_L3,
142 }
143 },
144 .user = OCP_USER_MPU | OCP_USER_SDMA,
145};
146
147/* Master interfaces on the L3 interconnect */
148static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
149 &omap3xxx_l3_main__l4_core,
150 &omap3xxx_l3_main__l4_per,
151};
152
153/* L3 */
154static struct omap_hwmod omap3xxx_l3_main_hwmod = { 59static struct omap_hwmod omap3xxx_l3_main_hwmod = {
155 .name = "l3_main", 60 .name = "l3_main",
156 .class = &l3_hwmod_class, 61 .class = &l3_hwmod_class,
157 .mpu_irqs = omap3xxx_l3_main_irqs, 62 .mpu_irqs = omap3xxx_l3_main_irqs,
158 .masters = omap3xxx_l3_main_masters,
159 .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters),
160 .slaves = omap3xxx_l3_main_slaves,
161 .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_main_slaves),
162 .flags = HWMOD_NO_IDLEST, 63 .flags = HWMOD_NO_IDLEST,
163}; 64};
164 65
165static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
166static struct omap_hwmod omap3xxx_uart1_hwmod;
167static struct omap_hwmod omap3xxx_uart2_hwmod;
168static struct omap_hwmod omap3xxx_uart3_hwmod;
169static struct omap_hwmod omap3xxx_uart4_hwmod;
170static struct omap_hwmod am35xx_uart4_hwmod;
171static struct omap_hwmod omap3xxx_usbhsotg_hwmod;
172
173/* l3_core -> usbhsotg interface */
174static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
175 .master = &omap3xxx_usbhsotg_hwmod,
176 .slave = &omap3xxx_l3_main_hwmod,
177 .clk = "core_l3_ick",
178 .user = OCP_USER_MPU,
179};
180
181/* l3_core -> am35xx_usbhsotg interface */
182static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
183 .master = &am35xx_usbhsotg_hwmod,
184 .slave = &omap3xxx_l3_main_hwmod,
185 .clk = "core_l3_ick",
186 .user = OCP_USER_MPU,
187};
188/* L4_CORE -> L4_WKUP interface */
189static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
190 .master = &omap3xxx_l4_core_hwmod,
191 .slave = &omap3xxx_l4_wkup_hwmod,
192 .user = OCP_USER_MPU | OCP_USER_SDMA,
193};
194
195/* L4 CORE -> MMC1 interface */
196static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = {
197 .master = &omap3xxx_l4_core_hwmod,
198 .slave = &omap3xxx_mmc1_hwmod,
199 .clk = "mmchs1_ick",
200 .addr = omap2430_mmc1_addr_space,
201 .user = OCP_USER_MPU | OCP_USER_SDMA,
202 .flags = OMAP_FIREWALL_L4
203};
204
205/* L4 CORE -> MMC2 interface */
206static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = {
207 .master = &omap3xxx_l4_core_hwmod,
208 .slave = &omap3xxx_mmc2_hwmod,
209 .clk = "mmchs2_ick",
210 .addr = omap2430_mmc2_addr_space,
211 .user = OCP_USER_MPU | OCP_USER_SDMA,
212 .flags = OMAP_FIREWALL_L4
213};
214
215/* L4 CORE -> MMC3 interface */
216static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
217 {
218 .pa_start = 0x480ad000,
219 .pa_end = 0x480ad1ff,
220 .flags = ADDR_TYPE_RT,
221 },
222 { }
223};
224
225static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
226 .master = &omap3xxx_l4_core_hwmod,
227 .slave = &omap3xxx_mmc3_hwmod,
228 .clk = "mmchs3_ick",
229 .addr = omap3xxx_mmc3_addr_space,
230 .user = OCP_USER_MPU | OCP_USER_SDMA,
231 .flags = OMAP_FIREWALL_L4
232};
233
234/* L4 CORE -> UART1 interface */
235static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
236 {
237 .pa_start = OMAP3_UART1_BASE,
238 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
239 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
240 },
241 { }
242};
243
244static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
245 .master = &omap3xxx_l4_core_hwmod,
246 .slave = &omap3xxx_uart1_hwmod,
247 .clk = "uart1_ick",
248 .addr = omap3xxx_uart1_addr_space,
249 .user = OCP_USER_MPU | OCP_USER_SDMA,
250};
251
252/* L4 CORE -> UART2 interface */
253static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
254 {
255 .pa_start = OMAP3_UART2_BASE,
256 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
257 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
258 },
259 { }
260};
261
262static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
263 .master = &omap3xxx_l4_core_hwmod,
264 .slave = &omap3xxx_uart2_hwmod,
265 .clk = "uart2_ick",
266 .addr = omap3xxx_uart2_addr_space,
267 .user = OCP_USER_MPU | OCP_USER_SDMA,
268};
269
270/* L4 PER -> UART3 interface */
271static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
272 {
273 .pa_start = OMAP3_UART3_BASE,
274 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
275 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
276 },
277 { }
278};
279
280static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
281 .master = &omap3xxx_l4_per_hwmod,
282 .slave = &omap3xxx_uart3_hwmod,
283 .clk = "uart3_ick",
284 .addr = omap3xxx_uart3_addr_space,
285 .user = OCP_USER_MPU | OCP_USER_SDMA,
286};
287
288/* L4 PER -> UART4 interface */
289static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
290 {
291 .pa_start = OMAP3_UART4_BASE,
292 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
293 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
294 },
295 { }
296};
297
298static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
299 .master = &omap3xxx_l4_per_hwmod,
300 .slave = &omap3xxx_uart4_hwmod,
301 .clk = "uart4_ick",
302 .addr = omap3xxx_uart4_addr_space,
303 .user = OCP_USER_MPU | OCP_USER_SDMA,
304};
305
306/* AM35xx: L4 CORE -> UART4 interface */
307static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
308 {
309 .pa_start = OMAP3_UART4_AM35XX_BASE,
310 .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
311 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
312 },
313};
314
315static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
316 .master = &omap3xxx_l4_core_hwmod,
317 .slave = &am35xx_uart4_hwmod,
318 .clk = "uart4_ick",
319 .addr = am35xx_uart4_addr_space,
320 .user = OCP_USER_MPU | OCP_USER_SDMA,
321};
322
323/* L4 CORE -> I2C1 interface */
324static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
325 .master = &omap3xxx_l4_core_hwmod,
326 .slave = &omap3xxx_i2c1_hwmod,
327 .clk = "i2c1_ick",
328 .addr = omap2_i2c1_addr_space,
329 .fw = {
330 .omap2 = {
331 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
332 .l4_prot_group = 7,
333 .flags = OMAP_FIREWALL_L4,
334 }
335 },
336 .user = OCP_USER_MPU | OCP_USER_SDMA,
337};
338
339/* L4 CORE -> I2C2 interface */
340static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
341 .master = &omap3xxx_l4_core_hwmod,
342 .slave = &omap3xxx_i2c2_hwmod,
343 .clk = "i2c2_ick",
344 .addr = omap2_i2c2_addr_space,
345 .fw = {
346 .omap2 = {
347 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
348 .l4_prot_group = 7,
349 .flags = OMAP_FIREWALL_L4,
350 }
351 },
352 .user = OCP_USER_MPU | OCP_USER_SDMA,
353};
354
355/* L4 CORE -> I2C3 interface */
356static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
357 {
358 .pa_start = 0x48060000,
359 .pa_end = 0x48060000 + SZ_128 - 1,
360 .flags = ADDR_TYPE_RT,
361 },
362 { }
363};
364
365static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
366 .master = &omap3xxx_l4_core_hwmod,
367 .slave = &omap3xxx_i2c3_hwmod,
368 .clk = "i2c3_ick",
369 .addr = omap3xxx_i2c3_addr_space,
370 .fw = {
371 .omap2 = {
372 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
373 .l4_prot_group = 7,
374 .flags = OMAP_FIREWALL_L4,
375 }
376 },
377 .user = OCP_USER_MPU | OCP_USER_SDMA,
378};
379
380static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
381 { .irq = 18},
382 { .irq = -1 }
383};
384
385static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
386 { .irq = 19},
387 { .irq = -1 }
388};
389
390/* L4 CORE -> SR1 interface */
391static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
392 {
393 .pa_start = OMAP34XX_SR1_BASE,
394 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
395 .flags = ADDR_TYPE_RT,
396 },
397 { }
398};
399
400static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
401 .master = &omap3xxx_l4_core_hwmod,
402 .slave = &omap34xx_sr1_hwmod,
403 .clk = "sr_l4_ick",
404 .addr = omap3_sr1_addr_space,
405 .user = OCP_USER_MPU,
406};
407
408/* L4 CORE -> SR1 interface */
409static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
410 {
411 .pa_start = OMAP34XX_SR2_BASE,
412 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
413 .flags = ADDR_TYPE_RT,
414 },
415 { }
416};
417
418static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
419 .master = &omap3xxx_l4_core_hwmod,
420 .slave = &omap34xx_sr2_hwmod,
421 .clk = "sr_l4_ick",
422 .addr = omap3_sr2_addr_space,
423 .user = OCP_USER_MPU,
424};
425
426/*
427* usbhsotg interface data
428*/
429
430static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
431 {
432 .pa_start = OMAP34XX_HSUSB_OTG_BASE,
433 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
434 .flags = ADDR_TYPE_RT
435 },
436 { }
437};
438
439/* l4_core -> usbhsotg */
440static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
441 .master = &omap3xxx_l4_core_hwmod,
442 .slave = &omap3xxx_usbhsotg_hwmod,
443 .clk = "l4_ick",
444 .addr = omap3xxx_usbhsotg_addrs,
445 .user = OCP_USER_MPU,
446};
447
448static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_masters[] = {
449 &omap3xxx_usbhsotg__l3,
450};
451
452static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_slaves[] = {
453 &omap3xxx_l4_core__usbhsotg,
454};
455
456static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
457 {
458 .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
459 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
460 .flags = ADDR_TYPE_RT
461 },
462 { }
463};
464
465/* l4_core -> usbhsotg */
466static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
467 .master = &omap3xxx_l4_core_hwmod,
468 .slave = &am35xx_usbhsotg_hwmod,
469 .clk = "l4_ick",
470 .addr = am35xx_usbhsotg_addrs,
471 .user = OCP_USER_MPU,
472};
473
474static struct omap_hwmod_ocp_if *am35xx_usbhsotg_masters[] = {
475 &am35xx_usbhsotg__l3,
476};
477
478static struct omap_hwmod_ocp_if *am35xx_usbhsotg_slaves[] = {
479 &am35xx_l4_core__usbhsotg,
480};
481/* Slave interfaces on the L4_CORE interconnect */
482static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
483 &omap3xxx_l3_main__l4_core,
484};
485
486/* L4 CORE */ 66/* L4 CORE */
487static struct omap_hwmod omap3xxx_l4_core_hwmod = { 67static struct omap_hwmod omap3xxx_l4_core_hwmod = {
488 .name = "l4_core", 68 .name = "l4_core",
489 .class = &l4_hwmod_class, 69 .class = &l4_hwmod_class,
490 .slaves = omap3xxx_l4_core_slaves,
491 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves),
492 .flags = HWMOD_NO_IDLEST, 70 .flags = HWMOD_NO_IDLEST,
493}; 71};
494 72
495/* Slave interfaces on the L4_PER interconnect */
496static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
497 &omap3xxx_l3_main__l4_per,
498};
499
500/* L4 PER */ 73/* L4 PER */
501static struct omap_hwmod omap3xxx_l4_per_hwmod = { 74static struct omap_hwmod omap3xxx_l4_per_hwmod = {
502 .name = "l4_per", 75 .name = "l4_per",
503 .class = &l4_hwmod_class, 76 .class = &l4_hwmod_class,
504 .slaves = omap3xxx_l4_per_slaves,
505 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves),
506 .flags = HWMOD_NO_IDLEST, 77 .flags = HWMOD_NO_IDLEST,
507}; 78};
508 79
509/* Slave interfaces on the L4_WKUP interconnect */
510static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = {
511 &omap3xxx_l4_core__l4_wkup,
512};
513
514/* L4 WKUP */ 80/* L4 WKUP */
515static struct omap_hwmod omap3xxx_l4_wkup_hwmod = { 81static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
516 .name = "l4_wkup", 82 .name = "l4_wkup",
517 .class = &l4_hwmod_class, 83 .class = &l4_hwmod_class,
518 .slaves = omap3xxx_l4_wkup_slaves,
519 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves),
520 .flags = HWMOD_NO_IDLEST, 84 .flags = HWMOD_NO_IDLEST,
521}; 85};
522 86
523/* Master interfaces on the MPU device */ 87/* L4 SEC */
524static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = { 88static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
525 &omap3xxx_mpu__l3_main, 89 .name = "l4_sec",
90 .class = &l4_hwmod_class,
91 .flags = HWMOD_NO_IDLEST,
526}; 92};
527 93
528/* MPU */ 94/* MPU */
@@ -530,35 +96,22 @@ static struct omap_hwmod omap3xxx_mpu_hwmod = {
530 .name = "mpu", 96 .name = "mpu",
531 .class = &mpu_hwmod_class, 97 .class = &mpu_hwmod_class,
532 .main_clk = "arm_fck", 98 .main_clk = "arm_fck",
533 .masters = omap3xxx_mpu_masters,
534 .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters),
535}; 99};
536 100
537/* 101/* IVA2 (IVA2) */
538 * IVA2_2 interface data 102static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = {
539 */ 103 { .name = "logic", .rst_shift = 0 },
540 104 { .name = "seq0", .rst_shift = 1 },
541/* IVA2 <- L3 interface */ 105 { .name = "seq1", .rst_shift = 2 },
542static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
543 .master = &omap3xxx_l3_main_hwmod,
544 .slave = &omap3xxx_iva_hwmod,
545 .clk = "iva2_ck",
546 .user = OCP_USER_MPU | OCP_USER_SDMA,
547}; 106};
548 107
549static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = {
550 &omap3xxx_l3__iva,
551};
552
553/*
554 * IVA2 (IVA2)
555 */
556
557static struct omap_hwmod omap3xxx_iva_hwmod = { 108static struct omap_hwmod omap3xxx_iva_hwmod = {
558 .name = "iva", 109 .name = "iva",
559 .class = &iva_hwmod_class, 110 .class = &iva_hwmod_class,
560 .masters = omap3xxx_iva_masters, 111 .clkdm_name = "iva2_clkdm",
561 .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters), 112 .rst_lines = omap3xxx_iva_resets,
113 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets),
114 .main_clk = "iva2_ck",
562}; 115};
563 116
564/* timer class */ 117/* timer class */
@@ -597,46 +150,20 @@ static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
597 150
598/* secure timers dev attribute */ 151/* secure timers dev attribute */
599static struct omap_timer_capability_dev_attr capability_secure_dev_attr = { 152static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
600 .timer_capability = OMAP_TIMER_SECURE, 153 .timer_capability = OMAP_TIMER_SECURE,
601}; 154};
602 155
603/* always-on timers dev attribute */ 156/* always-on timers dev attribute */
604static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = { 157static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
605 .timer_capability = OMAP_TIMER_ALWON, 158 .timer_capability = OMAP_TIMER_ALWON,
606}; 159};
607 160
608/* pwm timers dev attribute */ 161/* pwm timers dev attribute */
609static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = { 162static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
610 .timer_capability = OMAP_TIMER_HAS_PWM, 163 .timer_capability = OMAP_TIMER_HAS_PWM,
611}; 164};
612 165
613/* timer1 */ 166/* timer1 */
614static struct omap_hwmod omap3xxx_timer1_hwmod;
615
616static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
617 {
618 .pa_start = 0x48318000,
619 .pa_end = 0x48318000 + SZ_1K - 1,
620 .flags = ADDR_TYPE_RT
621 },
622 { }
623};
624
625/* l4_wkup -> timer1 */
626static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
627 .master = &omap3xxx_l4_wkup_hwmod,
628 .slave = &omap3xxx_timer1_hwmod,
629 .clk = "gpt1_ick",
630 .addr = omap3xxx_timer1_addrs,
631 .user = OCP_USER_MPU | OCP_USER_SDMA,
632};
633
634/* timer1 slave port */
635static struct omap_hwmod_ocp_if *omap3xxx_timer1_slaves[] = {
636 &omap3xxx_l4_wkup__timer1,
637};
638
639/* timer1 hwmod */
640static struct omap_hwmod omap3xxx_timer1_hwmod = { 167static struct omap_hwmod omap3xxx_timer1_hwmod = {
641 .name = "timer1", 168 .name = "timer1",
642 .mpu_irqs = omap2_timer1_mpu_irqs, 169 .mpu_irqs = omap2_timer1_mpu_irqs,
@@ -651,38 +178,10 @@ static struct omap_hwmod omap3xxx_timer1_hwmod = {
651 }, 178 },
652 }, 179 },
653 .dev_attr = &capability_alwon_dev_attr, 180 .dev_attr = &capability_alwon_dev_attr,
654 .slaves = omap3xxx_timer1_slaves,
655 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer1_slaves),
656 .class = &omap3xxx_timer_1ms_hwmod_class, 181 .class = &omap3xxx_timer_1ms_hwmod_class,
657}; 182};
658 183
659/* timer2 */ 184/* timer2 */
660static struct omap_hwmod omap3xxx_timer2_hwmod;
661
662static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
663 {
664 .pa_start = 0x49032000,
665 .pa_end = 0x49032000 + SZ_1K - 1,
666 .flags = ADDR_TYPE_RT
667 },
668 { }
669};
670
671/* l4_per -> timer2 */
672static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
673 .master = &omap3xxx_l4_per_hwmod,
674 .slave = &omap3xxx_timer2_hwmod,
675 .clk = "gpt2_ick",
676 .addr = omap3xxx_timer2_addrs,
677 .user = OCP_USER_MPU | OCP_USER_SDMA,
678};
679
680/* timer2 slave port */
681static struct omap_hwmod_ocp_if *omap3xxx_timer2_slaves[] = {
682 &omap3xxx_l4_per__timer2,
683};
684
685/* timer2 hwmod */
686static struct omap_hwmod omap3xxx_timer2_hwmod = { 185static struct omap_hwmod omap3xxx_timer2_hwmod = {
687 .name = "timer2", 186 .name = "timer2",
688 .mpu_irqs = omap2_timer2_mpu_irqs, 187 .mpu_irqs = omap2_timer2_mpu_irqs,
@@ -697,38 +196,10 @@ static struct omap_hwmod omap3xxx_timer2_hwmod = {
697 }, 196 },
698 }, 197 },
699 .dev_attr = &capability_alwon_dev_attr, 198 .dev_attr = &capability_alwon_dev_attr,
700 .slaves = omap3xxx_timer2_slaves,
701 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer2_slaves),
702 .class = &omap3xxx_timer_1ms_hwmod_class, 199 .class = &omap3xxx_timer_1ms_hwmod_class,
703}; 200};
704 201
705/* timer3 */ 202/* timer3 */
706static struct omap_hwmod omap3xxx_timer3_hwmod;
707
708static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
709 {
710 .pa_start = 0x49034000,
711 .pa_end = 0x49034000 + SZ_1K - 1,
712 .flags = ADDR_TYPE_RT
713 },
714 { }
715};
716
717/* l4_per -> timer3 */
718static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
719 .master = &omap3xxx_l4_per_hwmod,
720 .slave = &omap3xxx_timer3_hwmod,
721 .clk = "gpt3_ick",
722 .addr = omap3xxx_timer3_addrs,
723 .user = OCP_USER_MPU | OCP_USER_SDMA,
724};
725
726/* timer3 slave port */
727static struct omap_hwmod_ocp_if *omap3xxx_timer3_slaves[] = {
728 &omap3xxx_l4_per__timer3,
729};
730
731/* timer3 hwmod */
732static struct omap_hwmod omap3xxx_timer3_hwmod = { 203static struct omap_hwmod omap3xxx_timer3_hwmod = {
733 .name = "timer3", 204 .name = "timer3",
734 .mpu_irqs = omap2_timer3_mpu_irqs, 205 .mpu_irqs = omap2_timer3_mpu_irqs,
@@ -743,38 +214,10 @@ static struct omap_hwmod omap3xxx_timer3_hwmod = {
743 }, 214 },
744 }, 215 },
745 .dev_attr = &capability_alwon_dev_attr, 216 .dev_attr = &capability_alwon_dev_attr,
746 .slaves = omap3xxx_timer3_slaves,
747 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer3_slaves),
748 .class = &omap3xxx_timer_hwmod_class, 217 .class = &omap3xxx_timer_hwmod_class,
749}; 218};
750 219
751/* timer4 */ 220/* timer4 */
752static struct omap_hwmod omap3xxx_timer4_hwmod;
753
754static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
755 {
756 .pa_start = 0x49036000,
757 .pa_end = 0x49036000 + SZ_1K - 1,
758 .flags = ADDR_TYPE_RT
759 },
760 { }
761};
762
763/* l4_per -> timer4 */
764static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
765 .master = &omap3xxx_l4_per_hwmod,
766 .slave = &omap3xxx_timer4_hwmod,
767 .clk = "gpt4_ick",
768 .addr = omap3xxx_timer4_addrs,
769 .user = OCP_USER_MPU | OCP_USER_SDMA,
770};
771
772/* timer4 slave port */
773static struct omap_hwmod_ocp_if *omap3xxx_timer4_slaves[] = {
774 &omap3xxx_l4_per__timer4,
775};
776
777/* timer4 hwmod */
778static struct omap_hwmod omap3xxx_timer4_hwmod = { 221static struct omap_hwmod omap3xxx_timer4_hwmod = {
779 .name = "timer4", 222 .name = "timer4",
780 .mpu_irqs = omap2_timer4_mpu_irqs, 223 .mpu_irqs = omap2_timer4_mpu_irqs,
@@ -789,38 +232,10 @@ static struct omap_hwmod omap3xxx_timer4_hwmod = {
789 }, 232 },
790 }, 233 },
791 .dev_attr = &capability_alwon_dev_attr, 234 .dev_attr = &capability_alwon_dev_attr,
792 .slaves = omap3xxx_timer4_slaves,
793 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer4_slaves),
794 .class = &omap3xxx_timer_hwmod_class, 235 .class = &omap3xxx_timer_hwmod_class,
795}; 236};
796 237
797/* timer5 */ 238/* timer5 */
798static struct omap_hwmod omap3xxx_timer5_hwmod;
799
800static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
801 {
802 .pa_start = 0x49038000,
803 .pa_end = 0x49038000 + SZ_1K - 1,
804 .flags = ADDR_TYPE_RT
805 },
806 { }
807};
808
809/* l4_per -> timer5 */
810static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
811 .master = &omap3xxx_l4_per_hwmod,
812 .slave = &omap3xxx_timer5_hwmod,
813 .clk = "gpt5_ick",
814 .addr = omap3xxx_timer5_addrs,
815 .user = OCP_USER_MPU | OCP_USER_SDMA,
816};
817
818/* timer5 slave port */
819static struct omap_hwmod_ocp_if *omap3xxx_timer5_slaves[] = {
820 &omap3xxx_l4_per__timer5,
821};
822
823/* timer5 hwmod */
824static struct omap_hwmod omap3xxx_timer5_hwmod = { 239static struct omap_hwmod omap3xxx_timer5_hwmod = {
825 .name = "timer5", 240 .name = "timer5",
826 .mpu_irqs = omap2_timer5_mpu_irqs, 241 .mpu_irqs = omap2_timer5_mpu_irqs,
@@ -835,38 +250,10 @@ static struct omap_hwmod omap3xxx_timer5_hwmod = {
835 }, 250 },
836 }, 251 },
837 .dev_attr = &capability_alwon_dev_attr, 252 .dev_attr = &capability_alwon_dev_attr,
838 .slaves = omap3xxx_timer5_slaves,
839 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer5_slaves),
840 .class = &omap3xxx_timer_hwmod_class, 253 .class = &omap3xxx_timer_hwmod_class,
841}; 254};
842 255
843/* timer6 */ 256/* timer6 */
844static struct omap_hwmod omap3xxx_timer6_hwmod;
845
846static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
847 {
848 .pa_start = 0x4903A000,
849 .pa_end = 0x4903A000 + SZ_1K - 1,
850 .flags = ADDR_TYPE_RT
851 },
852 { }
853};
854
855/* l4_per -> timer6 */
856static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
857 .master = &omap3xxx_l4_per_hwmod,
858 .slave = &omap3xxx_timer6_hwmod,
859 .clk = "gpt6_ick",
860 .addr = omap3xxx_timer6_addrs,
861 .user = OCP_USER_MPU | OCP_USER_SDMA,
862};
863
864/* timer6 slave port */
865static struct omap_hwmod_ocp_if *omap3xxx_timer6_slaves[] = {
866 &omap3xxx_l4_per__timer6,
867};
868
869/* timer6 hwmod */
870static struct omap_hwmod omap3xxx_timer6_hwmod = { 257static struct omap_hwmod omap3xxx_timer6_hwmod = {
871 .name = "timer6", 258 .name = "timer6",
872 .mpu_irqs = omap2_timer6_mpu_irqs, 259 .mpu_irqs = omap2_timer6_mpu_irqs,
@@ -881,38 +268,10 @@ static struct omap_hwmod omap3xxx_timer6_hwmod = {
881 }, 268 },
882 }, 269 },
883 .dev_attr = &capability_alwon_dev_attr, 270 .dev_attr = &capability_alwon_dev_attr,
884 .slaves = omap3xxx_timer6_slaves,
885 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer6_slaves),
886 .class = &omap3xxx_timer_hwmod_class, 271 .class = &omap3xxx_timer_hwmod_class,
887}; 272};
888 273
889/* timer7 */ 274/* timer7 */
890static struct omap_hwmod omap3xxx_timer7_hwmod;
891
892static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
893 {
894 .pa_start = 0x4903C000,
895 .pa_end = 0x4903C000 + SZ_1K - 1,
896 .flags = ADDR_TYPE_RT
897 },
898 { }
899};
900
901/* l4_per -> timer7 */
902static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
903 .master = &omap3xxx_l4_per_hwmod,
904 .slave = &omap3xxx_timer7_hwmod,
905 .clk = "gpt7_ick",
906 .addr = omap3xxx_timer7_addrs,
907 .user = OCP_USER_MPU | OCP_USER_SDMA,
908};
909
910/* timer7 slave port */
911static struct omap_hwmod_ocp_if *omap3xxx_timer7_slaves[] = {
912 &omap3xxx_l4_per__timer7,
913};
914
915/* timer7 hwmod */
916static struct omap_hwmod omap3xxx_timer7_hwmod = { 275static struct omap_hwmod omap3xxx_timer7_hwmod = {
917 .name = "timer7", 276 .name = "timer7",
918 .mpu_irqs = omap2_timer7_mpu_irqs, 277 .mpu_irqs = omap2_timer7_mpu_irqs,
@@ -927,38 +286,10 @@ static struct omap_hwmod omap3xxx_timer7_hwmod = {
927 }, 286 },
928 }, 287 },
929 .dev_attr = &capability_alwon_dev_attr, 288 .dev_attr = &capability_alwon_dev_attr,
930 .slaves = omap3xxx_timer7_slaves,
931 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer7_slaves),
932 .class = &omap3xxx_timer_hwmod_class, 289 .class = &omap3xxx_timer_hwmod_class,
933}; 290};
934 291
935/* timer8 */ 292/* timer8 */
936static struct omap_hwmod omap3xxx_timer8_hwmod;
937
938static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
939 {
940 .pa_start = 0x4903E000,
941 .pa_end = 0x4903E000 + SZ_1K - 1,
942 .flags = ADDR_TYPE_RT
943 },
944 { }
945};
946
947/* l4_per -> timer8 */
948static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
949 .master = &omap3xxx_l4_per_hwmod,
950 .slave = &omap3xxx_timer8_hwmod,
951 .clk = "gpt8_ick",
952 .addr = omap3xxx_timer8_addrs,
953 .user = OCP_USER_MPU | OCP_USER_SDMA,
954};
955
956/* timer8 slave port */
957static struct omap_hwmod_ocp_if *omap3xxx_timer8_slaves[] = {
958 &omap3xxx_l4_per__timer8,
959};
960
961/* timer8 hwmod */
962static struct omap_hwmod omap3xxx_timer8_hwmod = { 293static struct omap_hwmod omap3xxx_timer8_hwmod = {
963 .name = "timer8", 294 .name = "timer8",
964 .mpu_irqs = omap2_timer8_mpu_irqs, 295 .mpu_irqs = omap2_timer8_mpu_irqs,
@@ -973,38 +304,10 @@ static struct omap_hwmod omap3xxx_timer8_hwmod = {
973 }, 304 },
974 }, 305 },
975 .dev_attr = &capability_pwm_dev_attr, 306 .dev_attr = &capability_pwm_dev_attr,
976 .slaves = omap3xxx_timer8_slaves,
977 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer8_slaves),
978 .class = &omap3xxx_timer_hwmod_class, 307 .class = &omap3xxx_timer_hwmod_class,
979}; 308};
980 309
981/* timer9 */ 310/* timer9 */
982static struct omap_hwmod omap3xxx_timer9_hwmod;
983
984static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
985 {
986 .pa_start = 0x49040000,
987 .pa_end = 0x49040000 + SZ_1K - 1,
988 .flags = ADDR_TYPE_RT
989 },
990 { }
991};
992
993/* l4_per -> timer9 */
994static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
995 .master = &omap3xxx_l4_per_hwmod,
996 .slave = &omap3xxx_timer9_hwmod,
997 .clk = "gpt9_ick",
998 .addr = omap3xxx_timer9_addrs,
999 .user = OCP_USER_MPU | OCP_USER_SDMA,
1000};
1001
1002/* timer9 slave port */
1003static struct omap_hwmod_ocp_if *omap3xxx_timer9_slaves[] = {
1004 &omap3xxx_l4_per__timer9,
1005};
1006
1007/* timer9 hwmod */
1008static struct omap_hwmod omap3xxx_timer9_hwmod = { 311static struct omap_hwmod omap3xxx_timer9_hwmod = {
1009 .name = "timer9", 312 .name = "timer9",
1010 .mpu_irqs = omap2_timer9_mpu_irqs, 313 .mpu_irqs = omap2_timer9_mpu_irqs,
@@ -1019,29 +322,10 @@ static struct omap_hwmod omap3xxx_timer9_hwmod = {
1019 }, 322 },
1020 }, 323 },
1021 .dev_attr = &capability_pwm_dev_attr, 324 .dev_attr = &capability_pwm_dev_attr,
1022 .slaves = omap3xxx_timer9_slaves,
1023 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer9_slaves),
1024 .class = &omap3xxx_timer_hwmod_class, 325 .class = &omap3xxx_timer_hwmod_class,
1025}; 326};
1026 327
1027/* timer10 */ 328/* timer10 */
1028static struct omap_hwmod omap3xxx_timer10_hwmod;
1029
1030/* l4_core -> timer10 */
1031static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
1032 .master = &omap3xxx_l4_core_hwmod,
1033 .slave = &omap3xxx_timer10_hwmod,
1034 .clk = "gpt10_ick",
1035 .addr = omap2_timer10_addrs,
1036 .user = OCP_USER_MPU | OCP_USER_SDMA,
1037};
1038
1039/* timer10 slave port */
1040static struct omap_hwmod_ocp_if *omap3xxx_timer10_slaves[] = {
1041 &omap3xxx_l4_core__timer10,
1042};
1043
1044/* timer10 hwmod */
1045static struct omap_hwmod omap3xxx_timer10_hwmod = { 329static struct omap_hwmod omap3xxx_timer10_hwmod = {
1046 .name = "timer10", 330 .name = "timer10",
1047 .mpu_irqs = omap2_timer10_mpu_irqs, 331 .mpu_irqs = omap2_timer10_mpu_irqs,
@@ -1056,29 +340,10 @@ static struct omap_hwmod omap3xxx_timer10_hwmod = {
1056 }, 340 },
1057 }, 341 },
1058 .dev_attr = &capability_pwm_dev_attr, 342 .dev_attr = &capability_pwm_dev_attr,
1059 .slaves = omap3xxx_timer10_slaves,
1060 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer10_slaves),
1061 .class = &omap3xxx_timer_1ms_hwmod_class, 343 .class = &omap3xxx_timer_1ms_hwmod_class,
1062}; 344};
1063 345
1064/* timer11 */ 346/* timer11 */
1065static struct omap_hwmod omap3xxx_timer11_hwmod;
1066
1067/* l4_core -> timer11 */
1068static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
1069 .master = &omap3xxx_l4_core_hwmod,
1070 .slave = &omap3xxx_timer11_hwmod,
1071 .clk = "gpt11_ick",
1072 .addr = omap2_timer11_addrs,
1073 .user = OCP_USER_MPU | OCP_USER_SDMA,
1074};
1075
1076/* timer11 slave port */
1077static struct omap_hwmod_ocp_if *omap3xxx_timer11_slaves[] = {
1078 &omap3xxx_l4_core__timer11,
1079};
1080
1081/* timer11 hwmod */
1082static struct omap_hwmod omap3xxx_timer11_hwmod = { 347static struct omap_hwmod omap3xxx_timer11_hwmod = {
1083 .name = "timer11", 348 .name = "timer11",
1084 .mpu_irqs = omap2_timer11_mpu_irqs, 349 .mpu_irqs = omap2_timer11_mpu_irqs,
@@ -1093,42 +358,15 @@ static struct omap_hwmod omap3xxx_timer11_hwmod = {
1093 }, 358 },
1094 }, 359 },
1095 .dev_attr = &capability_pwm_dev_attr, 360 .dev_attr = &capability_pwm_dev_attr,
1096 .slaves = omap3xxx_timer11_slaves,
1097 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer11_slaves),
1098 .class = &omap3xxx_timer_hwmod_class, 361 .class = &omap3xxx_timer_hwmod_class,
1099}; 362};
1100 363
1101/* timer12*/ 364/* timer12 */
1102static struct omap_hwmod omap3xxx_timer12_hwmod;
1103static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = { 365static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
1104 { .irq = 95, }, 366 { .irq = 95, },
1105 { .irq = -1 } 367 { .irq = -1 }
1106}; 368};
1107 369
1108static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
1109 {
1110 .pa_start = 0x48304000,
1111 .pa_end = 0x48304000 + SZ_1K - 1,
1112 .flags = ADDR_TYPE_RT
1113 },
1114 { }
1115};
1116
1117/* l4_core -> timer12 */
1118static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer12 = {
1119 .master = &omap3xxx_l4_core_hwmod,
1120 .slave = &omap3xxx_timer12_hwmod,
1121 .clk = "gpt12_ick",
1122 .addr = omap3xxx_timer12_addrs,
1123 .user = OCP_USER_MPU | OCP_USER_SDMA,
1124};
1125
1126/* timer12 slave port */
1127static struct omap_hwmod_ocp_if *omap3xxx_timer12_slaves[] = {
1128 &omap3xxx_l4_core__timer12,
1129};
1130
1131/* timer12 hwmod */
1132static struct omap_hwmod omap3xxx_timer12_hwmod = { 370static struct omap_hwmod omap3xxx_timer12_hwmod = {
1133 .name = "timer12", 371 .name = "timer12",
1134 .mpu_irqs = omap3xxx_timer12_mpu_irqs, 372 .mpu_irqs = omap3xxx_timer12_mpu_irqs,
@@ -1143,29 +381,9 @@ static struct omap_hwmod omap3xxx_timer12_hwmod = {
1143 }, 381 },
1144 }, 382 },
1145 .dev_attr = &capability_secure_dev_attr, 383 .dev_attr = &capability_secure_dev_attr,
1146 .slaves = omap3xxx_timer12_slaves,
1147 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer12_slaves),
1148 .class = &omap3xxx_timer_hwmod_class, 384 .class = &omap3xxx_timer_hwmod_class,
1149}; 385};
1150 386
1151/* l4_wkup -> wd_timer2 */
1152static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
1153 {
1154 .pa_start = 0x48314000,
1155 .pa_end = 0x4831407f,
1156 .flags = ADDR_TYPE_RT
1157 },
1158 { }
1159};
1160
1161static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
1162 .master = &omap3xxx_l4_wkup_hwmod,
1163 .slave = &omap3xxx_wd_timer2_hwmod,
1164 .clk = "wdt2_ick",
1165 .addr = omap3xxx_wd_timer2_addrs,
1166 .user = OCP_USER_MPU | OCP_USER_SDMA,
1167};
1168
1169/* 387/*
1170 * 'wd_timer' class 388 * 'wd_timer' class
1171 * 32-bit watchdog upward counter that generates a pulse on the reset pin on 389 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
@@ -1203,11 +421,6 @@ static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
1203 .pre_shutdown = &omap2_wd_timer_disable 421 .pre_shutdown = &omap2_wd_timer_disable
1204}; 422};
1205 423
1206/* wd_timer2 */
1207static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = {
1208 &omap3xxx_l4_wkup__wd_timer2,
1209};
1210
1211static struct omap_hwmod omap3xxx_wd_timer2_hwmod = { 424static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
1212 .name = "wd_timer2", 425 .name = "wd_timer2",
1213 .class = &omap3xxx_wd_timer_hwmod_class, 426 .class = &omap3xxx_wd_timer_hwmod_class,
@@ -1221,8 +434,6 @@ static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
1221 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT, 434 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
1222 }, 435 },
1223 }, 436 },
1224 .slaves = omap3xxx_wd_timer2_slaves,
1225 .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves),
1226 /* 437 /*
1227 * XXX: Use software supervised mode, HW supervised smartidle seems to 438 * XXX: Use software supervised mode, HW supervised smartidle seems to
1228 * block CORE power domain idle transitions. Maybe a HW bug in wdt2? 439 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
@@ -1231,11 +442,6 @@ static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
1231}; 442};
1232 443
1233/* UART1 */ 444/* UART1 */
1234
1235static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
1236 &omap3_l4_core__uart1,
1237};
1238
1239static struct omap_hwmod omap3xxx_uart1_hwmod = { 445static struct omap_hwmod omap3xxx_uart1_hwmod = {
1240 .name = "uart1", 446 .name = "uart1",
1241 .mpu_irqs = omap2_uart1_mpu_irqs, 447 .mpu_irqs = omap2_uart1_mpu_irqs,
@@ -1250,17 +456,10 @@ static struct omap_hwmod omap3xxx_uart1_hwmod = {
1250 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT, 456 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
1251 }, 457 },
1252 }, 458 },
1253 .slaves = omap3xxx_uart1_slaves,
1254 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves),
1255 .class = &omap2_uart_class, 459 .class = &omap2_uart_class,
1256}; 460};
1257 461
1258/* UART2 */ 462/* UART2 */
1259
1260static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
1261 &omap3_l4_core__uart2,
1262};
1263
1264static struct omap_hwmod omap3xxx_uart2_hwmod = { 463static struct omap_hwmod omap3xxx_uart2_hwmod = {
1265 .name = "uart2", 464 .name = "uart2",
1266 .mpu_irqs = omap2_uart2_mpu_irqs, 465 .mpu_irqs = omap2_uart2_mpu_irqs,
@@ -1275,17 +474,10 @@ static struct omap_hwmod omap3xxx_uart2_hwmod = {
1275 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT, 474 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
1276 }, 475 },
1277 }, 476 },
1278 .slaves = omap3xxx_uart2_slaves,
1279 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves),
1280 .class = &omap2_uart_class, 477 .class = &omap2_uart_class,
1281}; 478};
1282 479
1283/* UART3 */ 480/* UART3 */
1284
1285static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
1286 &omap3_l4_per__uart3,
1287};
1288
1289static struct omap_hwmod omap3xxx_uart3_hwmod = { 481static struct omap_hwmod omap3xxx_uart3_hwmod = {
1290 .name = "uart3", 482 .name = "uart3",
1291 .mpu_irqs = omap2_uart3_mpu_irqs, 483 .mpu_irqs = omap2_uart3_mpu_irqs,
@@ -1300,13 +492,10 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = {
1300 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT, 492 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
1301 }, 493 },
1302 }, 494 },
1303 .slaves = omap3xxx_uart3_slaves,
1304 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves),
1305 .class = &omap2_uart_class, 495 .class = &omap2_uart_class,
1306}; 496};
1307 497
1308/* UART4 */ 498/* UART4 */
1309
1310static struct omap_hwmod_irq_info uart4_mpu_irqs[] = { 499static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
1311 { .irq = INT_36XX_UART4_IRQ, }, 500 { .irq = INT_36XX_UART4_IRQ, },
1312 { .irq = -1 } 501 { .irq = -1 }
@@ -1318,11 +507,7 @@ static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
1318 { .dma_req = -1 } 507 { .dma_req = -1 }
1319}; 508};
1320 509
1321static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = { 510static struct omap_hwmod omap36xx_uart4_hwmod = {
1322 &omap3_l4_per__uart4,
1323};
1324
1325static struct omap_hwmod omap3xxx_uart4_hwmod = {
1326 .name = "uart4", 511 .name = "uart4",
1327 .mpu_irqs = uart4_mpu_irqs, 512 .mpu_irqs = uart4_mpu_irqs,
1328 .sdma_reqs = uart4_sdma_reqs, 513 .sdma_reqs = uart4_sdma_reqs,
@@ -1336,8 +521,6 @@ static struct omap_hwmod omap3xxx_uart4_hwmod = {
1336 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT, 521 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
1337 }, 522 },
1338 }, 523 },
1339 .slaves = omap3xxx_uart4_slaves,
1340 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves),
1341 .class = &omap2_uart_class, 524 .class = &omap2_uart_class,
1342}; 525};
1343 526
@@ -1350,16 +533,12 @@ static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
1350 { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, }, 533 { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
1351}; 534};
1352 535
1353static struct omap_hwmod_ocp_if *am35xx_uart4_slaves[] = {
1354 &am35xx_l4_core__uart4,
1355};
1356
1357static struct omap_hwmod am35xx_uart4_hwmod = { 536static struct omap_hwmod am35xx_uart4_hwmod = {
1358 .name = "uart4", 537 .name = "uart4",
1359 .mpu_irqs = am35xx_uart4_mpu_irqs, 538 .mpu_irqs = am35xx_uart4_mpu_irqs,
1360 .sdma_reqs = am35xx_uart4_sdma_reqs, 539 .sdma_reqs = am35xx_uart4_sdma_reqs,
1361 .main_clk = "uart4_fck", 540 .main_clk = "uart4_fck",
1362 .prcm = { 541 .prcm = {
1363 .omap2 = { 542 .omap2 = {
1364 .module_offs = CORE_MOD, 543 .module_offs = CORE_MOD,
1365 .prcm_reg_id = 1, 544 .prcm_reg_id = 1,
@@ -1368,12 +547,9 @@ static struct omap_hwmod am35xx_uart4_hwmod = {
1368 .idlest_idle_bit = OMAP3430_EN_UART4_SHIFT, 547 .idlest_idle_bit = OMAP3430_EN_UART4_SHIFT,
1369 }, 548 },
1370 }, 549 },
1371 .slaves = am35xx_uart4_slaves, 550 .class = &omap2_uart_class,
1372 .slaves_cnt = ARRAY_SIZE(am35xx_uart4_slaves),
1373 .class = &omap2_uart_class,
1374}; 551};
1375 552
1376
1377static struct omap_hwmod_class i2c_class = { 553static struct omap_hwmod_class i2c_class = {
1378 .name = "i2c", 554 .name = "i2c",
1379 .sysc = &i2c_sysc, 555 .sysc = &i2c_sysc,
@@ -1388,51 +564,6 @@ static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
1388}; 564};
1389 565
1390/* dss */ 566/* dss */
1391/* dss master ports */
1392static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = {
1393 &omap3xxx_dss__l3,
1394};
1395
1396/* l4_core -> dss */
1397static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
1398 .master = &omap3xxx_l4_core_hwmod,
1399 .slave = &omap3430es1_dss_core_hwmod,
1400 .clk = "dss_ick",
1401 .addr = omap2_dss_addrs,
1402 .fw = {
1403 .omap2 = {
1404 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
1405 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1406 .flags = OMAP_FIREWALL_L4,
1407 }
1408 },
1409 .user = OCP_USER_MPU | OCP_USER_SDMA,
1410};
1411
1412static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
1413 .master = &omap3xxx_l4_core_hwmod,
1414 .slave = &omap3xxx_dss_core_hwmod,
1415 .clk = "dss_ick",
1416 .addr = omap2_dss_addrs,
1417 .fw = {
1418 .omap2 = {
1419 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
1420 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1421 .flags = OMAP_FIREWALL_L4,
1422 }
1423 },
1424 .user = OCP_USER_MPU | OCP_USER_SDMA,
1425};
1426
1427/* dss slave ports */
1428static struct omap_hwmod_ocp_if *omap3430es1_dss_slaves[] = {
1429 &omap3430es1_l4_core__dss,
1430};
1431
1432static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = {
1433 &omap3xxx_l4_core__dss,
1434};
1435
1436static struct omap_hwmod_opt_clk dss_opt_clks[] = { 567static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1437 /* 568 /*
1438 * The DSS HW needs all DSS clocks enabled during reset. The dss_core 569 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
@@ -1460,10 +591,6 @@ static struct omap_hwmod omap3430es1_dss_core_hwmod = {
1460 }, 591 },
1461 .opt_clks = dss_opt_clks, 592 .opt_clks = dss_opt_clks,
1462 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), 593 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1463 .slaves = omap3430es1_dss_slaves,
1464 .slaves_cnt = ARRAY_SIZE(omap3430es1_dss_slaves),
1465 .masters = omap3xxx_dss_masters,
1466 .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
1467 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET, 594 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1468}; 595};
1469 596
@@ -1485,10 +612,6 @@ static struct omap_hwmod omap3xxx_dss_core_hwmod = {
1485 }, 612 },
1486 .opt_clks = dss_opt_clks, 613 .opt_clks = dss_opt_clks,
1487 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), 614 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1488 .slaves = omap3xxx_dss_slaves,
1489 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_slaves),
1490 .masters = omap3xxx_dss_masters,
1491 .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
1492}; 615};
1493 616
1494/* 617/*
@@ -1513,27 +636,6 @@ static struct omap_hwmod_class omap3_dispc_hwmod_class = {
1513 .sysc = &omap3_dispc_sysc, 636 .sysc = &omap3_dispc_sysc,
1514}; 637};
1515 638
1516/* l4_core -> dss_dispc */
1517static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
1518 .master = &omap3xxx_l4_core_hwmod,
1519 .slave = &omap3xxx_dss_dispc_hwmod,
1520 .clk = "dss_ick",
1521 .addr = omap2_dss_dispc_addrs,
1522 .fw = {
1523 .omap2 = {
1524 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
1525 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1526 .flags = OMAP_FIREWALL_L4,
1527 }
1528 },
1529 .user = OCP_USER_MPU | OCP_USER_SDMA,
1530};
1531
1532/* dss_dispc slave ports */
1533static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = {
1534 &omap3xxx_l4_core__dss_dispc,
1535};
1536
1537static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { 639static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
1538 .name = "dss_dispc", 640 .name = "dss_dispc",
1539 .class = &omap3_dispc_hwmod_class, 641 .class = &omap3_dispc_hwmod_class,
@@ -1546,8 +648,6 @@ static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
1546 .module_offs = OMAP3430_DSS_MOD, 648 .module_offs = OMAP3430_DSS_MOD,
1547 }, 649 },
1548 }, 650 },
1549 .slaves = omap3xxx_dss_dispc_slaves,
1550 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves),
1551 .flags = HWMOD_NO_IDLEST, 651 .flags = HWMOD_NO_IDLEST,
1552 .dev_attr = &omap2_3_dss_dispc_dev_attr 652 .dev_attr = &omap2_3_dss_dispc_dev_attr
1553}; 653};
@@ -1567,36 +667,6 @@ static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
1567}; 667};
1568 668
1569/* dss_dsi1 */ 669/* dss_dsi1 */
1570static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
1571 {
1572 .pa_start = 0x4804FC00,
1573 .pa_end = 0x4804FFFF,
1574 .flags = ADDR_TYPE_RT
1575 },
1576 { }
1577};
1578
1579/* l4_core -> dss_dsi1 */
1580static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
1581 .master = &omap3xxx_l4_core_hwmod,
1582 .slave = &omap3xxx_dss_dsi1_hwmod,
1583 .clk = "dss_ick",
1584 .addr = omap3xxx_dss_dsi1_addrs,
1585 .fw = {
1586 .omap2 = {
1587 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
1588 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1589 .flags = OMAP_FIREWALL_L4,
1590 }
1591 },
1592 .user = OCP_USER_MPU | OCP_USER_SDMA,
1593};
1594
1595/* dss_dsi1 slave ports */
1596static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = {
1597 &omap3xxx_l4_core__dss_dsi1,
1598};
1599
1600static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = { 670static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
1601 { .role = "sys_clk", .clk = "dss2_alwon_fck" }, 671 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
1602}; 672};
@@ -1615,32 +685,9 @@ static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
1615 }, 685 },
1616 .opt_clks = dss_dsi1_opt_clks, 686 .opt_clks = dss_dsi1_opt_clks,
1617 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks), 687 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
1618 .slaves = omap3xxx_dss_dsi1_slaves,
1619 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves),
1620 .flags = HWMOD_NO_IDLEST, 688 .flags = HWMOD_NO_IDLEST,
1621}; 689};
1622 690
1623/* l4_core -> dss_rfbi */
1624static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
1625 .master = &omap3xxx_l4_core_hwmod,
1626 .slave = &omap3xxx_dss_rfbi_hwmod,
1627 .clk = "dss_ick",
1628 .addr = omap2_dss_rfbi_addrs,
1629 .fw = {
1630 .omap2 = {
1631 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
1632 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
1633 .flags = OMAP_FIREWALL_L4,
1634 }
1635 },
1636 .user = OCP_USER_MPU | OCP_USER_SDMA,
1637};
1638
1639/* dss_rfbi slave ports */
1640static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = {
1641 &omap3xxx_l4_core__dss_rfbi,
1642};
1643
1644static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { 691static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1645 { .role = "ick", .clk = "dss_ick" }, 692 { .role = "ick", .clk = "dss_ick" },
1646}; 693};
@@ -1658,32 +705,9 @@ static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
1658 }, 705 },
1659 .opt_clks = dss_rfbi_opt_clks, 706 .opt_clks = dss_rfbi_opt_clks,
1660 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), 707 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
1661 .slaves = omap3xxx_dss_rfbi_slaves,
1662 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves),
1663 .flags = HWMOD_NO_IDLEST, 708 .flags = HWMOD_NO_IDLEST,
1664}; 709};
1665 710
1666/* l4_core -> dss_venc */
1667static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
1668 .master = &omap3xxx_l4_core_hwmod,
1669 .slave = &omap3xxx_dss_venc_hwmod,
1670 .clk = "dss_ick",
1671 .addr = omap2_dss_venc_addrs,
1672 .fw = {
1673 .omap2 = {
1674 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
1675 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1676 .flags = OMAP_FIREWALL_L4,
1677 }
1678 },
1679 .user = OCP_USER_MPU | OCP_USER_SDMA,
1680};
1681
1682/* dss_venc slave ports */
1683static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = {
1684 &omap3xxx_l4_core__dss_venc,
1685};
1686
1687static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = { 711static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
1688 /* required only on OMAP3430 */ 712 /* required only on OMAP3430 */
1689 { .role = "tv_dac_clk", .clk = "dss_96m_fck" }, 713 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
@@ -1702,13 +726,10 @@ static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
1702 }, 726 },
1703 .opt_clks = dss_venc_opt_clks, 727 .opt_clks = dss_venc_opt_clks,
1704 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks), 728 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
1705 .slaves = omap3xxx_dss_venc_slaves,
1706 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves),
1707 .flags = HWMOD_NO_IDLEST, 729 .flags = HWMOD_NO_IDLEST,
1708}; 730};
1709 731
1710/* I2C1 */ 732/* I2C1 */
1711
1712static struct omap_i2c_dev_attr i2c1_dev_attr = { 733static struct omap_i2c_dev_attr i2c1_dev_attr = {
1713 .fifo_depth = 8, /* bytes */ 734 .fifo_depth = 8, /* bytes */
1714 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | 735 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
@@ -1716,10 +737,6 @@ static struct omap_i2c_dev_attr i2c1_dev_attr = {
1716 OMAP_I2C_FLAG_BUS_SHIFT_2, 737 OMAP_I2C_FLAG_BUS_SHIFT_2,
1717}; 738};
1718 739
1719static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
1720 &omap3_l4_core__i2c1,
1721};
1722
1723static struct omap_hwmod omap3xxx_i2c1_hwmod = { 740static struct omap_hwmod omap3xxx_i2c1_hwmod = {
1724 .name = "i2c1", 741 .name = "i2c1",
1725 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, 742 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
@@ -1735,14 +752,11 @@ static struct omap_hwmod omap3xxx_i2c1_hwmod = {
1735 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT, 752 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
1736 }, 753 },
1737 }, 754 },
1738 .slaves = omap3xxx_i2c1_slaves,
1739 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c1_slaves),
1740 .class = &i2c_class, 755 .class = &i2c_class,
1741 .dev_attr = &i2c1_dev_attr, 756 .dev_attr = &i2c1_dev_attr,
1742}; 757};
1743 758
1744/* I2C2 */ 759/* I2C2 */
1745
1746static struct omap_i2c_dev_attr i2c2_dev_attr = { 760static struct omap_i2c_dev_attr i2c2_dev_attr = {
1747 .fifo_depth = 8, /* bytes */ 761 .fifo_depth = 8, /* bytes */
1748 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | 762 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
@@ -1750,10 +764,6 @@ static struct omap_i2c_dev_attr i2c2_dev_attr = {
1750 OMAP_I2C_FLAG_BUS_SHIFT_2, 764 OMAP_I2C_FLAG_BUS_SHIFT_2,
1751}; 765};
1752 766
1753static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
1754 &omap3_l4_core__i2c2,
1755};
1756
1757static struct omap_hwmod omap3xxx_i2c2_hwmod = { 767static struct omap_hwmod omap3xxx_i2c2_hwmod = {
1758 .name = "i2c2", 768 .name = "i2c2",
1759 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, 769 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
@@ -1769,14 +779,11 @@ static struct omap_hwmod omap3xxx_i2c2_hwmod = {
1769 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT, 779 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
1770 }, 780 },
1771 }, 781 },
1772 .slaves = omap3xxx_i2c2_slaves,
1773 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c2_slaves),
1774 .class = &i2c_class, 782 .class = &i2c_class,
1775 .dev_attr = &i2c2_dev_attr, 783 .dev_attr = &i2c2_dev_attr,
1776}; 784};
1777 785
1778/* I2C3 */ 786/* I2C3 */
1779
1780static struct omap_i2c_dev_attr i2c3_dev_attr = { 787static struct omap_i2c_dev_attr i2c3_dev_attr = {
1781 .fifo_depth = 64, /* bytes */ 788 .fifo_depth = 64, /* bytes */
1782 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | 789 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
@@ -1795,10 +802,6 @@ static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
1795 { .dma_req = -1 } 802 { .dma_req = -1 }
1796}; 803};
1797 804
1798static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
1799 &omap3_l4_core__i2c3,
1800};
1801
1802static struct omap_hwmod omap3xxx_i2c3_hwmod = { 805static struct omap_hwmod omap3xxx_i2c3_hwmod = {
1803 .name = "i2c3", 806 .name = "i2c3",
1804 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, 807 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
@@ -1814,114 +817,10 @@ static struct omap_hwmod omap3xxx_i2c3_hwmod = {
1814 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT, 817 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
1815 }, 818 },
1816 }, 819 },
1817 .slaves = omap3xxx_i2c3_slaves,
1818 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c3_slaves),
1819 .class = &i2c_class, 820 .class = &i2c_class,
1820 .dev_attr = &i2c3_dev_attr, 821 .dev_attr = &i2c3_dev_attr,
1821}; 822};
1822 823
1823/* l4_wkup -> gpio1 */
1824static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
1825 {
1826 .pa_start = 0x48310000,
1827 .pa_end = 0x483101ff,
1828 .flags = ADDR_TYPE_RT
1829 },
1830 { }
1831};
1832
1833static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
1834 .master = &omap3xxx_l4_wkup_hwmod,
1835 .slave = &omap3xxx_gpio1_hwmod,
1836 .addr = omap3xxx_gpio1_addrs,
1837 .user = OCP_USER_MPU | OCP_USER_SDMA,
1838};
1839
1840/* l4_per -> gpio2 */
1841static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
1842 {
1843 .pa_start = 0x49050000,
1844 .pa_end = 0x490501ff,
1845 .flags = ADDR_TYPE_RT
1846 },
1847 { }
1848};
1849
1850static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
1851 .master = &omap3xxx_l4_per_hwmod,
1852 .slave = &omap3xxx_gpio2_hwmod,
1853 .addr = omap3xxx_gpio2_addrs,
1854 .user = OCP_USER_MPU | OCP_USER_SDMA,
1855};
1856
1857/* l4_per -> gpio3 */
1858static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
1859 {
1860 .pa_start = 0x49052000,
1861 .pa_end = 0x490521ff,
1862 .flags = ADDR_TYPE_RT
1863 },
1864 { }
1865};
1866
1867static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
1868 .master = &omap3xxx_l4_per_hwmod,
1869 .slave = &omap3xxx_gpio3_hwmod,
1870 .addr = omap3xxx_gpio3_addrs,
1871 .user = OCP_USER_MPU | OCP_USER_SDMA,
1872};
1873
1874/* l4_per -> gpio4 */
1875static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
1876 {
1877 .pa_start = 0x49054000,
1878 .pa_end = 0x490541ff,
1879 .flags = ADDR_TYPE_RT
1880 },
1881 { }
1882};
1883
1884static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
1885 .master = &omap3xxx_l4_per_hwmod,
1886 .slave = &omap3xxx_gpio4_hwmod,
1887 .addr = omap3xxx_gpio4_addrs,
1888 .user = OCP_USER_MPU | OCP_USER_SDMA,
1889};
1890
1891/* l4_per -> gpio5 */
1892static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
1893 {
1894 .pa_start = 0x49056000,
1895 .pa_end = 0x490561ff,
1896 .flags = ADDR_TYPE_RT
1897 },
1898 { }
1899};
1900
1901static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
1902 .master = &omap3xxx_l4_per_hwmod,
1903 .slave = &omap3xxx_gpio5_hwmod,
1904 .addr = omap3xxx_gpio5_addrs,
1905 .user = OCP_USER_MPU | OCP_USER_SDMA,
1906};
1907
1908/* l4_per -> gpio6 */
1909static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
1910 {
1911 .pa_start = 0x49058000,
1912 .pa_end = 0x490581ff,
1913 .flags = ADDR_TYPE_RT
1914 },
1915 { }
1916};
1917
1918static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
1919 .master = &omap3xxx_l4_per_hwmod,
1920 .slave = &omap3xxx_gpio6_hwmod,
1921 .addr = omap3xxx_gpio6_addrs,
1922 .user = OCP_USER_MPU | OCP_USER_SDMA,
1923};
1924
1925/* 824/*
1926 * 'gpio' class 825 * 'gpio' class
1927 * general purpose io module 826 * general purpose io module
@@ -1944,7 +843,7 @@ static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
1944 .rev = 1, 843 .rev = 1,
1945}; 844};
1946 845
1947/* gpio_dev_attr*/ 846/* gpio_dev_attr */
1948static struct omap_gpio_dev_attr gpio_dev_attr = { 847static struct omap_gpio_dev_attr gpio_dev_attr = {
1949 .bank_width = 32, 848 .bank_width = 32,
1950 .dbck_flag = true, 849 .dbck_flag = true,
@@ -1955,10 +854,6 @@ static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
1955 { .role = "dbclk", .clk = "gpio1_dbck", }, 854 { .role = "dbclk", .clk = "gpio1_dbck", },
1956}; 855};
1957 856
1958static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
1959 &omap3xxx_l4_wkup__gpio1,
1960};
1961
1962static struct omap_hwmod omap3xxx_gpio1_hwmod = { 857static struct omap_hwmod omap3xxx_gpio1_hwmod = {
1963 .name = "gpio1", 858 .name = "gpio1",
1964 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 859 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
@@ -1975,8 +870,6 @@ static struct omap_hwmod omap3xxx_gpio1_hwmod = {
1975 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT, 870 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
1976 }, 871 },
1977 }, 872 },
1978 .slaves = omap3xxx_gpio1_slaves,
1979 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves),
1980 .class = &omap3xxx_gpio_hwmod_class, 873 .class = &omap3xxx_gpio_hwmod_class,
1981 .dev_attr = &gpio_dev_attr, 874 .dev_attr = &gpio_dev_attr,
1982}; 875};
@@ -1986,10 +879,6 @@ static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
1986 { .role = "dbclk", .clk = "gpio2_dbck", }, 879 { .role = "dbclk", .clk = "gpio2_dbck", },
1987}; 880};
1988 881
1989static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
1990 &omap3xxx_l4_per__gpio2,
1991};
1992
1993static struct omap_hwmod omap3xxx_gpio2_hwmod = { 882static struct omap_hwmod omap3xxx_gpio2_hwmod = {
1994 .name = "gpio2", 883 .name = "gpio2",
1995 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 884 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
@@ -2006,8 +895,6 @@ static struct omap_hwmod omap3xxx_gpio2_hwmod = {
2006 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT, 895 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
2007 }, 896 },
2008 }, 897 },
2009 .slaves = omap3xxx_gpio2_slaves,
2010 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves),
2011 .class = &omap3xxx_gpio_hwmod_class, 898 .class = &omap3xxx_gpio_hwmod_class,
2012 .dev_attr = &gpio_dev_attr, 899 .dev_attr = &gpio_dev_attr,
2013}; 900};
@@ -2017,10 +904,6 @@ static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
2017 { .role = "dbclk", .clk = "gpio3_dbck", }, 904 { .role = "dbclk", .clk = "gpio3_dbck", },
2018}; 905};
2019 906
2020static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
2021 &omap3xxx_l4_per__gpio3,
2022};
2023
2024static struct omap_hwmod omap3xxx_gpio3_hwmod = { 907static struct omap_hwmod omap3xxx_gpio3_hwmod = {
2025 .name = "gpio3", 908 .name = "gpio3",
2026 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 909 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
@@ -2037,8 +920,6 @@ static struct omap_hwmod omap3xxx_gpio3_hwmod = {
2037 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT, 920 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
2038 }, 921 },
2039 }, 922 },
2040 .slaves = omap3xxx_gpio3_slaves,
2041 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves),
2042 .class = &omap3xxx_gpio_hwmod_class, 923 .class = &omap3xxx_gpio_hwmod_class,
2043 .dev_attr = &gpio_dev_attr, 924 .dev_attr = &gpio_dev_attr,
2044}; 925};
@@ -2048,10 +929,6 @@ static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
2048 { .role = "dbclk", .clk = "gpio4_dbck", }, 929 { .role = "dbclk", .clk = "gpio4_dbck", },
2049}; 930};
2050 931
2051static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
2052 &omap3xxx_l4_per__gpio4,
2053};
2054
2055static struct omap_hwmod omap3xxx_gpio4_hwmod = { 932static struct omap_hwmod omap3xxx_gpio4_hwmod = {
2056 .name = "gpio4", 933 .name = "gpio4",
2057 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 934 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
@@ -2068,8 +945,6 @@ static struct omap_hwmod omap3xxx_gpio4_hwmod = {
2068 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT, 945 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
2069 }, 946 },
2070 }, 947 },
2071 .slaves = omap3xxx_gpio4_slaves,
2072 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves),
2073 .class = &omap3xxx_gpio_hwmod_class, 948 .class = &omap3xxx_gpio_hwmod_class,
2074 .dev_attr = &gpio_dev_attr, 949 .dev_attr = &gpio_dev_attr,
2075}; 950};
@@ -2084,10 +959,6 @@ static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
2084 { .role = "dbclk", .clk = "gpio5_dbck", }, 959 { .role = "dbclk", .clk = "gpio5_dbck", },
2085}; 960};
2086 961
2087static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
2088 &omap3xxx_l4_per__gpio5,
2089};
2090
2091static struct omap_hwmod omap3xxx_gpio5_hwmod = { 962static struct omap_hwmod omap3xxx_gpio5_hwmod = {
2092 .name = "gpio5", 963 .name = "gpio5",
2093 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 964 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
@@ -2104,8 +975,6 @@ static struct omap_hwmod omap3xxx_gpio5_hwmod = {
2104 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT, 975 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
2105 }, 976 },
2106 }, 977 },
2107 .slaves = omap3xxx_gpio5_slaves,
2108 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves),
2109 .class = &omap3xxx_gpio_hwmod_class, 978 .class = &omap3xxx_gpio_hwmod_class,
2110 .dev_attr = &gpio_dev_attr, 979 .dev_attr = &gpio_dev_attr,
2111}; 980};
@@ -2120,10 +989,6 @@ static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
2120 { .role = "dbclk", .clk = "gpio6_dbck", }, 989 { .role = "dbclk", .clk = "gpio6_dbck", },
2121}; 990};
2122 991
2123static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
2124 &omap3xxx_l4_per__gpio6,
2125};
2126
2127static struct omap_hwmod omap3xxx_gpio6_hwmod = { 992static struct omap_hwmod omap3xxx_gpio6_hwmod = {
2128 .name = "gpio6", 993 .name = "gpio6",
2129 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 994 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
@@ -2140,20 +1005,10 @@ static struct omap_hwmod omap3xxx_gpio6_hwmod = {
2140 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT, 1005 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
2141 }, 1006 },
2142 }, 1007 },
2143 .slaves = omap3xxx_gpio6_slaves,
2144 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves),
2145 .class = &omap3xxx_gpio_hwmod_class, 1008 .class = &omap3xxx_gpio_hwmod_class,
2146 .dev_attr = &gpio_dev_attr, 1009 .dev_attr = &gpio_dev_attr,
2147}; 1010};
2148 1011
2149/* dma_system -> L3 */
2150static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
2151 .master = &omap3xxx_dma_system_hwmod,
2152 .slave = &omap3xxx_l3_main_hwmod,
2153 .clk = "core_l3_ick",
2154 .user = OCP_USER_MPU | OCP_USER_SDMA,
2155};
2156
2157/* dma attributes */ 1012/* dma attributes */
2158static struct omap_dma_dev_attr dma_dev_attr = { 1013static struct omap_dma_dev_attr dma_dev_attr = {
2159 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | 1014 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
@@ -2180,34 +1035,6 @@ static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
2180}; 1035};
2181 1036
2182/* dma_system */ 1037/* dma_system */
2183static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
2184 {
2185 .pa_start = 0x48056000,
2186 .pa_end = 0x48056fff,
2187 .flags = ADDR_TYPE_RT
2188 },
2189 { }
2190};
2191
2192/* dma_system master ports */
2193static struct omap_hwmod_ocp_if *omap3xxx_dma_system_masters[] = {
2194 &omap3xxx_dma_system__l3,
2195};
2196
2197/* l4_cfg -> dma_system */
2198static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2199 .master = &omap3xxx_l4_core_hwmod,
2200 .slave = &omap3xxx_dma_system_hwmod,
2201 .clk = "core_l4_ick",
2202 .addr = omap3xxx_dma_system_addrs,
2203 .user = OCP_USER_MPU | OCP_USER_SDMA,
2204};
2205
2206/* dma_system slave ports */
2207static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
2208 &omap3xxx_l4_core__dma_system,
2209};
2210
2211static struct omap_hwmod omap3xxx_dma_system_hwmod = { 1038static struct omap_hwmod omap3xxx_dma_system_hwmod = {
2212 .name = "dma", 1039 .name = "dma",
2213 .class = &omap3xxx_dma_hwmod_class, 1040 .class = &omap3xxx_dma_hwmod_class,
@@ -2222,10 +1049,6 @@ static struct omap_hwmod omap3xxx_dma_system_hwmod = {
2222 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT, 1049 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
2223 }, 1050 },
2224 }, 1051 },
2225 .slaves = omap3xxx_dma_system_slaves,
2226 .slaves_cnt = ARRAY_SIZE(omap3xxx_dma_system_slaves),
2227 .masters = omap3xxx_dma_system_masters,
2228 .masters_cnt = ARRAY_SIZE(omap3xxx_dma_system_masters),
2229 .dev_attr = &dma_dev_attr, 1052 .dev_attr = &dma_dev_attr,
2230 .flags = HWMOD_NO_IDLEST, 1053 .flags = HWMOD_NO_IDLEST,
2231}; 1054};
@@ -2258,30 +1081,6 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
2258 { .irq = -1 } 1081 { .irq = -1 }
2259}; 1082};
2260 1083
2261static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
2262 {
2263 .name = "mpu",
2264 .pa_start = 0x48074000,
2265 .pa_end = 0x480740ff,
2266 .flags = ADDR_TYPE_RT
2267 },
2268 { }
2269};
2270
2271/* l4_core -> mcbsp1 */
2272static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2273 .master = &omap3xxx_l4_core_hwmod,
2274 .slave = &omap3xxx_mcbsp1_hwmod,
2275 .clk = "mcbsp1_ick",
2276 .addr = omap3xxx_mcbsp1_addrs,
2277 .user = OCP_USER_MPU | OCP_USER_SDMA,
2278};
2279
2280/* mcbsp1 slave ports */
2281static struct omap_hwmod_ocp_if *omap3xxx_mcbsp1_slaves[] = {
2282 &omap3xxx_l4_core__mcbsp1,
2283};
2284
2285static struct omap_hwmod omap3xxx_mcbsp1_hwmod = { 1084static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
2286 .name = "mcbsp1", 1085 .name = "mcbsp1",
2287 .class = &omap3xxx_mcbsp_hwmod_class, 1086 .class = &omap3xxx_mcbsp_hwmod_class,
@@ -2297,8 +1096,6 @@ static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
2297 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT, 1096 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
2298 }, 1097 },
2299 }, 1098 },
2300 .slaves = omap3xxx_mcbsp1_slaves,
2301 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_slaves),
2302}; 1099};
2303 1100
2304/* mcbsp2 */ 1101/* mcbsp2 */
@@ -2309,30 +1106,6 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
2309 { .irq = -1 } 1106 { .irq = -1 }
2310}; 1107};
2311 1108
2312static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
2313 {
2314 .name = "mpu",
2315 .pa_start = 0x49022000,
2316 .pa_end = 0x490220ff,
2317 .flags = ADDR_TYPE_RT
2318 },
2319 { }
2320};
2321
2322/* l4_per -> mcbsp2 */
2323static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2324 .master = &omap3xxx_l4_per_hwmod,
2325 .slave = &omap3xxx_mcbsp2_hwmod,
2326 .clk = "mcbsp2_ick",
2327 .addr = omap3xxx_mcbsp2_addrs,
2328 .user = OCP_USER_MPU | OCP_USER_SDMA,
2329};
2330
2331/* mcbsp2 slave ports */
2332static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_slaves[] = {
2333 &omap3xxx_l4_per__mcbsp2,
2334};
2335
2336static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = { 1109static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
2337 .sidetone = "mcbsp2_sidetone", 1110 .sidetone = "mcbsp2_sidetone",
2338}; 1111};
@@ -2352,8 +1125,6 @@ static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
2352 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT, 1125 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
2353 }, 1126 },
2354 }, 1127 },
2355 .slaves = omap3xxx_mcbsp2_slaves,
2356 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_slaves),
2357 .dev_attr = &omap34xx_mcbsp2_dev_attr, 1128 .dev_attr = &omap34xx_mcbsp2_dev_attr,
2358}; 1129};
2359 1130
@@ -2365,32 +1136,8 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
2365 { .irq = -1 } 1136 { .irq = -1 }
2366}; 1137};
2367 1138
2368static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
2369 {
2370 .name = "mpu",
2371 .pa_start = 0x49024000,
2372 .pa_end = 0x490240ff,
2373 .flags = ADDR_TYPE_RT
2374 },
2375 { }
2376};
2377
2378/* l4_per -> mcbsp3 */
2379static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2380 .master = &omap3xxx_l4_per_hwmod,
2381 .slave = &omap3xxx_mcbsp3_hwmod,
2382 .clk = "mcbsp3_ick",
2383 .addr = omap3xxx_mcbsp3_addrs,
2384 .user = OCP_USER_MPU | OCP_USER_SDMA,
2385};
2386
2387/* mcbsp3 slave ports */
2388static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_slaves[] = {
2389 &omap3xxx_l4_per__mcbsp3,
2390};
2391
2392static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = { 1139static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
2393 .sidetone = "mcbsp3_sidetone", 1140 .sidetone = "mcbsp3_sidetone",
2394}; 1141};
2395 1142
2396static struct omap_hwmod omap3xxx_mcbsp3_hwmod = { 1143static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
@@ -2408,8 +1155,6 @@ static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
2408 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT, 1155 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
2409 }, 1156 },
2410 }, 1157 },
2411 .slaves = omap3xxx_mcbsp3_slaves,
2412 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_slaves),
2413 .dev_attr = &omap34xx_mcbsp3_dev_attr, 1158 .dev_attr = &omap34xx_mcbsp3_dev_attr,
2414}; 1159};
2415 1160
@@ -2427,30 +1172,6 @@ static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
2427 { .dma_req = -1 } 1172 { .dma_req = -1 }
2428}; 1173};
2429 1174
2430static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
2431 {
2432 .name = "mpu",
2433 .pa_start = 0x49026000,
2434 .pa_end = 0x490260ff,
2435 .flags = ADDR_TYPE_RT
2436 },
2437 { }
2438};
2439
2440/* l4_per -> mcbsp4 */
2441static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2442 .master = &omap3xxx_l4_per_hwmod,
2443 .slave = &omap3xxx_mcbsp4_hwmod,
2444 .clk = "mcbsp4_ick",
2445 .addr = omap3xxx_mcbsp4_addrs,
2446 .user = OCP_USER_MPU | OCP_USER_SDMA,
2447};
2448
2449/* mcbsp4 slave ports */
2450static struct omap_hwmod_ocp_if *omap3xxx_mcbsp4_slaves[] = {
2451 &omap3xxx_l4_per__mcbsp4,
2452};
2453
2454static struct omap_hwmod omap3xxx_mcbsp4_hwmod = { 1175static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
2455 .name = "mcbsp4", 1176 .name = "mcbsp4",
2456 .class = &omap3xxx_mcbsp_hwmod_class, 1177 .class = &omap3xxx_mcbsp_hwmod_class,
@@ -2466,8 +1187,6 @@ static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
2466 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT, 1187 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
2467 }, 1188 },
2468 }, 1189 },
2469 .slaves = omap3xxx_mcbsp4_slaves,
2470 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_slaves),
2471}; 1190};
2472 1191
2473/* mcbsp5 */ 1192/* mcbsp5 */
@@ -2484,30 +1203,6 @@ static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
2484 { .dma_req = -1 } 1203 { .dma_req = -1 }
2485}; 1204};
2486 1205
2487static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
2488 {
2489 .name = "mpu",
2490 .pa_start = 0x48096000,
2491 .pa_end = 0x480960ff,
2492 .flags = ADDR_TYPE_RT
2493 },
2494 { }
2495};
2496
2497/* l4_core -> mcbsp5 */
2498static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2499 .master = &omap3xxx_l4_core_hwmod,
2500 .slave = &omap3xxx_mcbsp5_hwmod,
2501 .clk = "mcbsp5_ick",
2502 .addr = omap3xxx_mcbsp5_addrs,
2503 .user = OCP_USER_MPU | OCP_USER_SDMA,
2504};
2505
2506/* mcbsp5 slave ports */
2507static struct omap_hwmod_ocp_if *omap3xxx_mcbsp5_slaves[] = {
2508 &omap3xxx_l4_core__mcbsp5,
2509};
2510
2511static struct omap_hwmod omap3xxx_mcbsp5_hwmod = { 1206static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
2512 .name = "mcbsp5", 1207 .name = "mcbsp5",
2513 .class = &omap3xxx_mcbsp_hwmod_class, 1208 .class = &omap3xxx_mcbsp_hwmod_class,
@@ -2523,11 +1218,9 @@ static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
2523 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT, 1218 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
2524 }, 1219 },
2525 }, 1220 },
2526 .slaves = omap3xxx_mcbsp5_slaves,
2527 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_slaves),
2528}; 1221};
2529/* 'mcbsp sidetone' class */
2530 1222
1223/* 'mcbsp sidetone' class */
2531static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = { 1224static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
2532 .sysc_offs = 0x0010, 1225 .sysc_offs = 0x0010,
2533 .sysc_flags = SYSC_HAS_AUTOIDLE, 1226 .sysc_flags = SYSC_HAS_AUTOIDLE,
@@ -2545,30 +1238,6 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
2545 { .irq = -1 } 1238 { .irq = -1 }
2546}; 1239};
2547 1240
2548static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
2549 {
2550 .name = "sidetone",
2551 .pa_start = 0x49028000,
2552 .pa_end = 0x490280ff,
2553 .flags = ADDR_TYPE_RT
2554 },
2555 { }
2556};
2557
2558/* l4_per -> mcbsp2_sidetone */
2559static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2560 .master = &omap3xxx_l4_per_hwmod,
2561 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2562 .clk = "mcbsp2_ick",
2563 .addr = omap3xxx_mcbsp2_sidetone_addrs,
2564 .user = OCP_USER_MPU,
2565};
2566
2567/* mcbsp2_sidetone slave ports */
2568static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_sidetone_slaves[] = {
2569 &omap3xxx_l4_per__mcbsp2_sidetone,
2570};
2571
2572static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = { 1241static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
2573 .name = "mcbsp2_sidetone", 1242 .name = "mcbsp2_sidetone",
2574 .class = &omap3xxx_mcbsp_sidetone_hwmod_class, 1243 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
@@ -2583,8 +1252,6 @@ static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
2583 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT, 1252 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
2584 }, 1253 },
2585 }, 1254 },
2586 .slaves = omap3xxx_mcbsp2_sidetone_slaves,
2587 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_slaves),
2588}; 1255};
2589 1256
2590/* mcbsp3_sidetone */ 1257/* mcbsp3_sidetone */
@@ -2593,30 +1260,6 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
2593 { .irq = -1 } 1260 { .irq = -1 }
2594}; 1261};
2595 1262
2596static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
2597 {
2598 .name = "sidetone",
2599 .pa_start = 0x4902A000,
2600 .pa_end = 0x4902A0ff,
2601 .flags = ADDR_TYPE_RT
2602 },
2603 { }
2604};
2605
2606/* l4_per -> mcbsp3_sidetone */
2607static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2608 .master = &omap3xxx_l4_per_hwmod,
2609 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2610 .clk = "mcbsp3_ick",
2611 .addr = omap3xxx_mcbsp3_sidetone_addrs,
2612 .user = OCP_USER_MPU,
2613};
2614
2615/* mcbsp3_sidetone slave ports */
2616static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_sidetone_slaves[] = {
2617 &omap3xxx_l4_per__mcbsp3_sidetone,
2618};
2619
2620static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = { 1263static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
2621 .name = "mcbsp3_sidetone", 1264 .name = "mcbsp3_sidetone",
2622 .class = &omap3xxx_mcbsp_sidetone_hwmod_class, 1265 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
@@ -2631,11 +1274,8 @@ static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
2631 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT, 1274 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
2632 }, 1275 },
2633 }, 1276 },
2634 .slaves = omap3xxx_mcbsp3_sidetone_slaves,
2635 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_slaves),
2636}; 1277};
2637 1278
2638
2639/* SR common */ 1279/* SR common */
2640static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = { 1280static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
2641 .clkact_shift = 20, 1281 .clkact_shift = 20,
@@ -2656,7 +1296,7 @@ static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
2656 1296
2657static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = { 1297static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
2658 .sidle_shift = 24, 1298 .sidle_shift = 24,
2659 .enwkup_shift = 26 1299 .enwkup_shift = 26,
2660}; 1300};
2661 1301
2662static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = { 1302static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
@@ -2678,12 +1318,13 @@ static struct omap_smartreflex_dev_attr sr1_dev_attr = {
2678 .sensor_voltdm_name = "mpu_iva", 1318 .sensor_voltdm_name = "mpu_iva",
2679}; 1319};
2680 1320
2681static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = { 1321static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
2682 &omap3_l4_core__sr1, 1322 { .irq = 18 },
1323 { .irq = -1 }
2683}; 1324};
2684 1325
2685static struct omap_hwmod omap34xx_sr1_hwmod = { 1326static struct omap_hwmod omap34xx_sr1_hwmod = {
2686 .name = "sr1_hwmod", 1327 .name = "sr1",
2687 .class = &omap34xx_smartreflex_hwmod_class, 1328 .class = &omap34xx_smartreflex_hwmod_class,
2688 .main_clk = "sr1_fck", 1329 .main_clk = "sr1_fck",
2689 .prcm = { 1330 .prcm = {
@@ -2695,15 +1336,13 @@ static struct omap_hwmod omap34xx_sr1_hwmod = {
2695 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT, 1336 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
2696 }, 1337 },
2697 }, 1338 },
2698 .slaves = omap3_sr1_slaves,
2699 .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
2700 .dev_attr = &sr1_dev_attr, 1339 .dev_attr = &sr1_dev_attr,
2701 .mpu_irqs = omap3_smartreflex_mpu_irqs, 1340 .mpu_irqs = omap3_smartreflex_mpu_irqs,
2702 .flags = HWMOD_SET_DEFAULT_CLOCKACT, 1341 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
2703}; 1342};
2704 1343
2705static struct omap_hwmod omap36xx_sr1_hwmod = { 1344static struct omap_hwmod omap36xx_sr1_hwmod = {
2706 .name = "sr1_hwmod", 1345 .name = "sr1",
2707 .class = &omap36xx_smartreflex_hwmod_class, 1346 .class = &omap36xx_smartreflex_hwmod_class,
2708 .main_clk = "sr1_fck", 1347 .main_clk = "sr1_fck",
2709 .prcm = { 1348 .prcm = {
@@ -2715,8 +1354,6 @@ static struct omap_hwmod omap36xx_sr1_hwmod = {
2715 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT, 1354 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
2716 }, 1355 },
2717 }, 1356 },
2718 .slaves = omap3_sr1_slaves,
2719 .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
2720 .dev_attr = &sr1_dev_attr, 1357 .dev_attr = &sr1_dev_attr,
2721 .mpu_irqs = omap3_smartreflex_mpu_irqs, 1358 .mpu_irqs = omap3_smartreflex_mpu_irqs,
2722}; 1359};
@@ -2726,12 +1363,13 @@ static struct omap_smartreflex_dev_attr sr2_dev_attr = {
2726 .sensor_voltdm_name = "core", 1363 .sensor_voltdm_name = "core",
2727}; 1364};
2728 1365
2729static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = { 1366static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
2730 &omap3_l4_core__sr2, 1367 { .irq = 19 },
1368 { .irq = -1 }
2731}; 1369};
2732 1370
2733static struct omap_hwmod omap34xx_sr2_hwmod = { 1371static struct omap_hwmod omap34xx_sr2_hwmod = {
2734 .name = "sr2_hwmod", 1372 .name = "sr2",
2735 .class = &omap34xx_smartreflex_hwmod_class, 1373 .class = &omap34xx_smartreflex_hwmod_class,
2736 .main_clk = "sr2_fck", 1374 .main_clk = "sr2_fck",
2737 .prcm = { 1375 .prcm = {
@@ -2743,15 +1381,13 @@ static struct omap_hwmod omap34xx_sr2_hwmod = {
2743 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT, 1381 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
2744 }, 1382 },
2745 }, 1383 },
2746 .slaves = omap3_sr2_slaves,
2747 .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
2748 .dev_attr = &sr2_dev_attr, 1384 .dev_attr = &sr2_dev_attr,
2749 .mpu_irqs = omap3_smartreflex_core_irqs, 1385 .mpu_irqs = omap3_smartreflex_core_irqs,
2750 .flags = HWMOD_SET_DEFAULT_CLOCKACT, 1386 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
2751}; 1387};
2752 1388
2753static struct omap_hwmod omap36xx_sr2_hwmod = { 1389static struct omap_hwmod omap36xx_sr2_hwmod = {
2754 .name = "sr2_hwmod", 1390 .name = "sr2",
2755 .class = &omap36xx_smartreflex_hwmod_class, 1391 .class = &omap36xx_smartreflex_hwmod_class,
2756 .main_clk = "sr2_fck", 1392 .main_clk = "sr2_fck",
2757 .prcm = { 1393 .prcm = {
@@ -2763,8 +1399,6 @@ static struct omap_hwmod omap36xx_sr2_hwmod = {
2763 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT, 1399 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
2764 }, 1400 },
2765 }, 1401 },
2766 .slaves = omap3_sr2_slaves,
2767 .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
2768 .dev_attr = &sr2_dev_attr, 1402 .dev_attr = &sr2_dev_attr,
2769 .mpu_irqs = omap3_smartreflex_core_irqs, 1403 .mpu_irqs = omap3_smartreflex_core_irqs,
2770}; 1404};
@@ -2790,34 +1424,11 @@ static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
2790 .sysc = &omap3xxx_mailbox_sysc, 1424 .sysc = &omap3xxx_mailbox_sysc,
2791}; 1425};
2792 1426
2793static struct omap_hwmod omap3xxx_mailbox_hwmod;
2794static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = { 1427static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
2795 { .irq = 26 }, 1428 { .irq = 26 },
2796 { .irq = -1 } 1429 { .irq = -1 }
2797}; 1430};
2798 1431
2799static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
2800 {
2801 .pa_start = 0x48094000,
2802 .pa_end = 0x480941ff,
2803 .flags = ADDR_TYPE_RT,
2804 },
2805 { }
2806};
2807
2808/* l4_core -> mailbox */
2809static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
2810 .master = &omap3xxx_l4_core_hwmod,
2811 .slave = &omap3xxx_mailbox_hwmod,
2812 .addr = omap3xxx_mailbox_addrs,
2813 .user = OCP_USER_MPU | OCP_USER_SDMA,
2814};
2815
2816/* mailbox slave ports */
2817static struct omap_hwmod_ocp_if *omap3xxx_mailbox_slaves[] = {
2818 &omap3xxx_l4_core__mailbox,
2819};
2820
2821static struct omap_hwmod omap3xxx_mailbox_hwmod = { 1432static struct omap_hwmod omap3xxx_mailbox_hwmod = {
2822 .name = "mailbox", 1433 .name = "mailbox",
2823 .class = &omap3xxx_mailbox_hwmod_class, 1434 .class = &omap3xxx_mailbox_hwmod_class,
@@ -2832,53 +1443,6 @@ static struct omap_hwmod omap3xxx_mailbox_hwmod = {
2832 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT, 1443 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
2833 }, 1444 },
2834 }, 1445 },
2835 .slaves = omap3xxx_mailbox_slaves,
2836 .slaves_cnt = ARRAY_SIZE(omap3xxx_mailbox_slaves),
2837};
2838
2839/* l4 core -> mcspi1 interface */
2840static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
2841 .master = &omap3xxx_l4_core_hwmod,
2842 .slave = &omap34xx_mcspi1,
2843 .clk = "mcspi1_ick",
2844 .addr = omap2_mcspi1_addr_space,
2845 .user = OCP_USER_MPU | OCP_USER_SDMA,
2846};
2847
2848/* l4 core -> mcspi2 interface */
2849static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
2850 .master = &omap3xxx_l4_core_hwmod,
2851 .slave = &omap34xx_mcspi2,
2852 .clk = "mcspi2_ick",
2853 .addr = omap2_mcspi2_addr_space,
2854 .user = OCP_USER_MPU | OCP_USER_SDMA,
2855};
2856
2857/* l4 core -> mcspi3 interface */
2858static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
2859 .master = &omap3xxx_l4_core_hwmod,
2860 .slave = &omap34xx_mcspi3,
2861 .clk = "mcspi3_ick",
2862 .addr = omap2430_mcspi3_addr_space,
2863 .user = OCP_USER_MPU | OCP_USER_SDMA,
2864};
2865
2866/* l4 core -> mcspi4 interface */
2867static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
2868 {
2869 .pa_start = 0x480ba000,
2870 .pa_end = 0x480ba0ff,
2871 .flags = ADDR_TYPE_RT,
2872 },
2873 { }
2874};
2875
2876static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
2877 .master = &omap3xxx_l4_core_hwmod,
2878 .slave = &omap34xx_mcspi4,
2879 .clk = "mcspi4_ick",
2880 .addr = omap34xx_mcspi4_addr_space,
2881 .user = OCP_USER_MPU | OCP_USER_SDMA,
2882}; 1446};
2883 1447
2884/* 1448/*
@@ -2905,10 +1469,6 @@ static struct omap_hwmod_class omap34xx_mcspi_class = {
2905}; 1469};
2906 1470
2907/* mcspi1 */ 1471/* mcspi1 */
2908static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
2909 &omap34xx_l4_core__mcspi1,
2910};
2911
2912static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { 1472static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
2913 .num_chipselect = 4, 1473 .num_chipselect = 4,
2914}; 1474};
@@ -2927,17 +1487,11 @@ static struct omap_hwmod omap34xx_mcspi1 = {
2927 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT, 1487 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
2928 }, 1488 },
2929 }, 1489 },
2930 .slaves = omap34xx_mcspi1_slaves,
2931 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves),
2932 .class = &omap34xx_mcspi_class, 1490 .class = &omap34xx_mcspi_class,
2933 .dev_attr = &omap_mcspi1_dev_attr, 1491 .dev_attr = &omap_mcspi1_dev_attr,
2934}; 1492};
2935 1493
2936/* mcspi2 */ 1494/* mcspi2 */
2937static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
2938 &omap34xx_l4_core__mcspi2,
2939};
2940
2941static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { 1495static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
2942 .num_chipselect = 2, 1496 .num_chipselect = 2,
2943}; 1497};
@@ -2956,8 +1510,6 @@ static struct omap_hwmod omap34xx_mcspi2 = {
2956 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT, 1510 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
2957 }, 1511 },
2958 }, 1512 },
2959 .slaves = omap34xx_mcspi2_slaves,
2960 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves),
2961 .class = &omap34xx_mcspi_class, 1513 .class = &omap34xx_mcspi_class,
2962 .dev_attr = &omap_mcspi2_dev_attr, 1514 .dev_attr = &omap_mcspi2_dev_attr,
2963}; 1515};
@@ -2976,10 +1528,6 @@ static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
2976 { .dma_req = -1 } 1528 { .dma_req = -1 }
2977}; 1529};
2978 1530
2979static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = {
2980 &omap34xx_l4_core__mcspi3,
2981};
2982
2983static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = { 1531static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
2984 .num_chipselect = 2, 1532 .num_chipselect = 2,
2985}; 1533};
@@ -2998,13 +1546,11 @@ static struct omap_hwmod omap34xx_mcspi3 = {
2998 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT, 1546 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
2999 }, 1547 },
3000 }, 1548 },
3001 .slaves = omap34xx_mcspi3_slaves,
3002 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves),
3003 .class = &omap34xx_mcspi_class, 1549 .class = &omap34xx_mcspi_class,
3004 .dev_attr = &omap_mcspi3_dev_attr, 1550 .dev_attr = &omap_mcspi3_dev_attr,
3005}; 1551};
3006 1552
3007/* SPI4 */ 1553/* mcspi4 */
3008static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = { 1554static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
3009 { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */ 1555 { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
3010 { .irq = -1 } 1556 { .irq = -1 }
@@ -3016,10 +1562,6 @@ static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
3016 { .dma_req = -1 } 1562 { .dma_req = -1 }
3017}; 1563};
3018 1564
3019static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = {
3020 &omap34xx_l4_core__mcspi4,
3021};
3022
3023static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = { 1565static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
3024 .num_chipselect = 1, 1566 .num_chipselect = 1,
3025}; 1567};
@@ -3038,15 +1580,11 @@ static struct omap_hwmod omap34xx_mcspi4 = {
3038 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT, 1580 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
3039 }, 1581 },
3040 }, 1582 },
3041 .slaves = omap34xx_mcspi4_slaves,
3042 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves),
3043 .class = &omap34xx_mcspi_class, 1583 .class = &omap34xx_mcspi_class,
3044 .dev_attr = &omap_mcspi4_dev_attr, 1584 .dev_attr = &omap_mcspi4_dev_attr,
3045}; 1585};
3046 1586
3047/* 1587/* usbhsotg */
3048 * usbhsotg
3049 */
3050static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = { 1588static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
3051 .rev_offs = 0x0400, 1589 .rev_offs = 0x0400,
3052 .sysc_offs = 0x0404, 1590 .sysc_offs = 0x0404,
@@ -3063,6 +1601,7 @@ static struct omap_hwmod_class usbotg_class = {
3063 .name = "usbotg", 1601 .name = "usbotg",
3064 .sysc = &omap3xxx_usbhsotg_sysc, 1602 .sysc = &omap3xxx_usbhsotg_sysc,
3065}; 1603};
1604
3066/* usb_otg_hs */ 1605/* usb_otg_hs */
3067static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = { 1606static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
3068 1607
@@ -3085,10 +1624,6 @@ static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
3085 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT 1624 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
3086 }, 1625 },
3087 }, 1626 },
3088 .masters = omap3xxx_usbhsotg_masters,
3089 .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters),
3090 .slaves = omap3xxx_usbhsotg_slaves,
3091 .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves),
3092 .class = &usbotg_class, 1627 .class = &usbotg_class,
3093 1628
3094 /* 1629 /*
@@ -3120,15 +1655,10 @@ static struct omap_hwmod am35xx_usbhsotg_hwmod = {
3120 .omap2 = { 1655 .omap2 = {
3121 }, 1656 },
3122 }, 1657 },
3123 .masters = am35xx_usbhsotg_masters,
3124 .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters),
3125 .slaves = am35xx_usbhsotg_slaves,
3126 .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves),
3127 .class = &am35xx_usbotg_class, 1658 .class = &am35xx_usbotg_class,
3128}; 1659};
3129 1660
3130/* MMC/SD/SDIO common */ 1661/* MMC/SD/SDIO common */
3131
3132static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = { 1662static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
3133 .rev_offs = 0x1fc, 1663 .rev_offs = 0x1fc,
3134 .sysc_offs = 0x10, 1664 .sysc_offs = 0x10,
@@ -3162,10 +1692,6 @@ static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
3162 { .role = "dbck", .clk = "omap_32k_fck", }, 1692 { .role = "dbck", .clk = "omap_32k_fck", },
3163}; 1693};
3164 1694
3165static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = {
3166 &omap3xxx_l4_core__mmc1,
3167};
3168
3169static struct omap_mmc_dev_attr mmc1_dev_attr = { 1695static struct omap_mmc_dev_attr mmc1_dev_attr = {
3170 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, 1696 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
3171}; 1697};
@@ -3193,8 +1719,6 @@ static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
3193 }, 1719 },
3194 }, 1720 },
3195 .dev_attr = &mmc1_pre_es3_dev_attr, 1721 .dev_attr = &mmc1_pre_es3_dev_attr,
3196 .slaves = omap3xxx_mmc1_slaves,
3197 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
3198 .class = &omap34xx_mmc_class, 1722 .class = &omap34xx_mmc_class,
3199}; 1723};
3200 1724
@@ -3215,8 +1739,6 @@ static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
3215 }, 1739 },
3216 }, 1740 },
3217 .dev_attr = &mmc1_dev_attr, 1741 .dev_attr = &mmc1_dev_attr,
3218 .slaves = omap3xxx_mmc1_slaves,
3219 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
3220 .class = &omap34xx_mmc_class, 1742 .class = &omap34xx_mmc_class,
3221}; 1743};
3222 1744
@@ -3237,10 +1759,6 @@ static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
3237 { .role = "dbck", .clk = "omap_32k_fck", }, 1759 { .role = "dbck", .clk = "omap_32k_fck", },
3238}; 1760};
3239 1761
3240static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = {
3241 &omap3xxx_l4_core__mmc2,
3242};
3243
3244/* See 35xx errata 2.1.1.128 in SPRZ278F */ 1762/* See 35xx errata 2.1.1.128 in SPRZ278F */
3245static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = { 1763static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = {
3246 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ, 1764 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
@@ -3263,8 +1781,6 @@ static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
3263 }, 1781 },
3264 }, 1782 },
3265 .dev_attr = &mmc2_pre_es3_dev_attr, 1783 .dev_attr = &mmc2_pre_es3_dev_attr,
3266 .slaves = omap3xxx_mmc2_slaves,
3267 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
3268 .class = &omap34xx_mmc_class, 1784 .class = &omap34xx_mmc_class,
3269}; 1785};
3270 1786
@@ -3284,8 +1800,6 @@ static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
3284 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT, 1800 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
3285 }, 1801 },
3286 }, 1802 },
3287 .slaves = omap3xxx_mmc2_slaves,
3288 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
3289 .class = &omap34xx_mmc_class, 1803 .class = &omap34xx_mmc_class,
3290}; 1804};
3291 1805
@@ -3306,10 +1820,6 @@ static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
3306 { .role = "dbck", .clk = "omap_32k_fck", }, 1820 { .role = "dbck", .clk = "omap_32k_fck", },
3307}; 1821};
3308 1822
3309static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = {
3310 &omap3xxx_l4_core__mmc3,
3311};
3312
3313static struct omap_hwmod omap3xxx_mmc3_hwmod = { 1823static struct omap_hwmod omap3xxx_mmc3_hwmod = {
3314 .name = "mmc3", 1824 .name = "mmc3",
3315 .mpu_irqs = omap34xx_mmc3_mpu_irqs, 1825 .mpu_irqs = omap34xx_mmc3_mpu_irqs,
@@ -3325,8 +1835,6 @@ static struct omap_hwmod omap3xxx_mmc3_hwmod = {
3325 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT, 1835 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
3326 }, 1836 },
3327 }, 1837 },
3328 .slaves = omap3xxx_mmc3_slaves,
3329 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc3_slaves),
3330 .class = &omap34xx_mmc_class, 1838 .class = &omap34xx_mmc_class,
3331}; 1839};
3332 1840
@@ -3334,12 +1842,6 @@ static struct omap_hwmod omap3xxx_mmc3_hwmod = {
3334 * 'usb_host_hs' class 1842 * 'usb_host_hs' class
3335 * high-speed multi-port usb host controller 1843 * high-speed multi-port usb host controller
3336 */ 1844 */
3337static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
3338 .master = &omap3xxx_usb_host_hs_hwmod,
3339 .slave = &omap3xxx_l3_main_hwmod,
3340 .clk = "core_l3_ick",
3341 .user = OCP_USER_MPU,
3342};
3343 1845
3344static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = { 1846static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
3345 .rev_offs = 0x0000, 1847 .rev_offs = 0x0000,
@@ -3358,42 +1860,6 @@ static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
3358 .sysc = &omap3xxx_usb_host_hs_sysc, 1860 .sysc = &omap3xxx_usb_host_hs_sysc,
3359}; 1861};
3360 1862
3361static struct omap_hwmod_ocp_if *omap3xxx_usb_host_hs_masters[] = {
3362 &omap3xxx_usb_host_hs__l3_main_2,
3363};
3364
3365static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
3366 {
3367 .name = "uhh",
3368 .pa_start = 0x48064000,
3369 .pa_end = 0x480643ff,
3370 .flags = ADDR_TYPE_RT
3371 },
3372 {
3373 .name = "ohci",
3374 .pa_start = 0x48064400,
3375 .pa_end = 0x480647ff,
3376 },
3377 {
3378 .name = "ehci",
3379 .pa_start = 0x48064800,
3380 .pa_end = 0x48064cff,
3381 },
3382 {}
3383};
3384
3385static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
3386 .master = &omap3xxx_l4_core_hwmod,
3387 .slave = &omap3xxx_usb_host_hs_hwmod,
3388 .clk = "usbhost_ick",
3389 .addr = omap3xxx_usb_host_hs_addrs,
3390 .user = OCP_USER_MPU | OCP_USER_SDMA,
3391};
3392
3393static struct omap_hwmod_ocp_if *omap3xxx_usb_host_hs_slaves[] = {
3394 &omap3xxx_l4_core__usb_host_hs,
3395};
3396
3397static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = { 1863static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
3398 { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", }, 1864 { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", },
3399}; 1865};
@@ -3422,10 +1888,6 @@ static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
3422 }, 1888 },
3423 .opt_clks = omap3xxx_usb_host_hs_opt_clks, 1889 .opt_clks = omap3xxx_usb_host_hs_opt_clks,
3424 .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks), 1890 .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks),
3425 .slaves = omap3xxx_usb_host_hs_slaves,
3426 .slaves_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_slaves),
3427 .masters = omap3xxx_usb_host_hs_masters,
3428 .masters_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_masters),
3429 1891
3430 /* 1892 /*
3431 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock 1893 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
@@ -3501,6 +1963,1084 @@ static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
3501 { .irq = -1 } 1963 { .irq = -1 }
3502}; 1964};
3503 1965
1966static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
1967 .name = "usb_tll_hs",
1968 .class = &omap3xxx_usb_tll_hs_hwmod_class,
1969 .clkdm_name = "l3_init_clkdm",
1970 .mpu_irqs = omap3xxx_usb_tll_hs_irqs,
1971 .main_clk = "usbtll_fck",
1972 .prcm = {
1973 .omap2 = {
1974 .module_offs = CORE_MOD,
1975 .prcm_reg_id = 3,
1976 .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
1977 .idlest_reg_id = 3,
1978 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
1979 },
1980 },
1981};
1982
1983/*
1984 * interfaces
1985 */
1986
1987/* L3 -> L4_CORE interface */
1988static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
1989 .master = &omap3xxx_l3_main_hwmod,
1990 .slave = &omap3xxx_l4_core_hwmod,
1991 .user = OCP_USER_MPU | OCP_USER_SDMA,
1992};
1993
1994/* L3 -> L4_PER interface */
1995static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
1996 .master = &omap3xxx_l3_main_hwmod,
1997 .slave = &omap3xxx_l4_per_hwmod,
1998 .user = OCP_USER_MPU | OCP_USER_SDMA,
1999};
2000
2001static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
2002 {
2003 .pa_start = 0x68000000,
2004 .pa_end = 0x6800ffff,
2005 .flags = ADDR_TYPE_RT,
2006 },
2007 { }
2008};
2009
2010/* MPU -> L3 interface */
2011static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
2012 .master = &omap3xxx_mpu_hwmod,
2013 .slave = &omap3xxx_l3_main_hwmod,
2014 .addr = omap3xxx_l3_main_addrs,
2015 .user = OCP_USER_MPU,
2016};
2017
2018/* DSS -> l3 */
2019static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
2020 .master = &omap3430es1_dss_core_hwmod,
2021 .slave = &omap3xxx_l3_main_hwmod,
2022 .user = OCP_USER_MPU | OCP_USER_SDMA,
2023};
2024
2025static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
2026 .master = &omap3xxx_dss_core_hwmod,
2027 .slave = &omap3xxx_l3_main_hwmod,
2028 .fw = {
2029 .omap2 = {
2030 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
2031 .flags = OMAP_FIREWALL_L3,
2032 }
2033 },
2034 .user = OCP_USER_MPU | OCP_USER_SDMA,
2035};
2036
2037/* l3_core -> usbhsotg interface */
2038static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
2039 .master = &omap3xxx_usbhsotg_hwmod,
2040 .slave = &omap3xxx_l3_main_hwmod,
2041 .clk = "core_l3_ick",
2042 .user = OCP_USER_MPU,
2043};
2044
2045/* l3_core -> am35xx_usbhsotg interface */
2046static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
2047 .master = &am35xx_usbhsotg_hwmod,
2048 .slave = &omap3xxx_l3_main_hwmod,
2049 .clk = "core_l3_ick",
2050 .user = OCP_USER_MPU,
2051};
2052/* L4_CORE -> L4_WKUP interface */
2053static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
2054 .master = &omap3xxx_l4_core_hwmod,
2055 .slave = &omap3xxx_l4_wkup_hwmod,
2056 .user = OCP_USER_MPU | OCP_USER_SDMA,
2057};
2058
2059/* L4 CORE -> MMC1 interface */
2060static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
2061 .master = &omap3xxx_l4_core_hwmod,
2062 .slave = &omap3xxx_pre_es3_mmc1_hwmod,
2063 .clk = "mmchs1_ick",
2064 .addr = omap2430_mmc1_addr_space,
2065 .user = OCP_USER_MPU | OCP_USER_SDMA,
2066 .flags = OMAP_FIREWALL_L4
2067};
2068
2069static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
2070 .master = &omap3xxx_l4_core_hwmod,
2071 .slave = &omap3xxx_es3plus_mmc1_hwmod,
2072 .clk = "mmchs1_ick",
2073 .addr = omap2430_mmc1_addr_space,
2074 .user = OCP_USER_MPU | OCP_USER_SDMA,
2075 .flags = OMAP_FIREWALL_L4
2076};
2077
2078/* L4 CORE -> MMC2 interface */
2079static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
2080 .master = &omap3xxx_l4_core_hwmod,
2081 .slave = &omap3xxx_pre_es3_mmc2_hwmod,
2082 .clk = "mmchs2_ick",
2083 .addr = omap2430_mmc2_addr_space,
2084 .user = OCP_USER_MPU | OCP_USER_SDMA,
2085 .flags = OMAP_FIREWALL_L4
2086};
2087
2088static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
2089 .master = &omap3xxx_l4_core_hwmod,
2090 .slave = &omap3xxx_es3plus_mmc2_hwmod,
2091 .clk = "mmchs2_ick",
2092 .addr = omap2430_mmc2_addr_space,
2093 .user = OCP_USER_MPU | OCP_USER_SDMA,
2094 .flags = OMAP_FIREWALL_L4
2095};
2096
2097/* L4 CORE -> MMC3 interface */
2098static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
2099 {
2100 .pa_start = 0x480ad000,
2101 .pa_end = 0x480ad1ff,
2102 .flags = ADDR_TYPE_RT,
2103 },
2104 { }
2105};
2106
2107static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
2108 .master = &omap3xxx_l4_core_hwmod,
2109 .slave = &omap3xxx_mmc3_hwmod,
2110 .clk = "mmchs3_ick",
2111 .addr = omap3xxx_mmc3_addr_space,
2112 .user = OCP_USER_MPU | OCP_USER_SDMA,
2113 .flags = OMAP_FIREWALL_L4
2114};
2115
2116/* L4 CORE -> UART1 interface */
2117static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
2118 {
2119 .pa_start = OMAP3_UART1_BASE,
2120 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
2121 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2122 },
2123 { }
2124};
2125
2126static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
2127 .master = &omap3xxx_l4_core_hwmod,
2128 .slave = &omap3xxx_uart1_hwmod,
2129 .clk = "uart1_ick",
2130 .addr = omap3xxx_uart1_addr_space,
2131 .user = OCP_USER_MPU | OCP_USER_SDMA,
2132};
2133
2134/* L4 CORE -> UART2 interface */
2135static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
2136 {
2137 .pa_start = OMAP3_UART2_BASE,
2138 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
2139 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2140 },
2141 { }
2142};
2143
2144static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
2145 .master = &omap3xxx_l4_core_hwmod,
2146 .slave = &omap3xxx_uart2_hwmod,
2147 .clk = "uart2_ick",
2148 .addr = omap3xxx_uart2_addr_space,
2149 .user = OCP_USER_MPU | OCP_USER_SDMA,
2150};
2151
2152/* L4 PER -> UART3 interface */
2153static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
2154 {
2155 .pa_start = OMAP3_UART3_BASE,
2156 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
2157 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2158 },
2159 { }
2160};
2161
2162static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
2163 .master = &omap3xxx_l4_per_hwmod,
2164 .slave = &omap3xxx_uart3_hwmod,
2165 .clk = "uart3_ick",
2166 .addr = omap3xxx_uart3_addr_space,
2167 .user = OCP_USER_MPU | OCP_USER_SDMA,
2168};
2169
2170/* L4 PER -> UART4 interface */
2171static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = {
2172 {
2173 .pa_start = OMAP3_UART4_BASE,
2174 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
2175 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2176 },
2177 { }
2178};
2179
2180static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
2181 .master = &omap3xxx_l4_per_hwmod,
2182 .slave = &omap36xx_uart4_hwmod,
2183 .clk = "uart4_ick",
2184 .addr = omap36xx_uart4_addr_space,
2185 .user = OCP_USER_MPU | OCP_USER_SDMA,
2186};
2187
2188/* AM35xx: L4 CORE -> UART4 interface */
2189static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
2190 {
2191 .pa_start = OMAP3_UART4_AM35XX_BASE,
2192 .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
2193 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2194 },
2195};
2196
2197static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
2198 .master = &omap3xxx_l4_core_hwmod,
2199 .slave = &am35xx_uart4_hwmod,
2200 .clk = "uart4_ick",
2201 .addr = am35xx_uart4_addr_space,
2202 .user = OCP_USER_MPU | OCP_USER_SDMA,
2203};
2204
2205/* L4 CORE -> I2C1 interface */
2206static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
2207 .master = &omap3xxx_l4_core_hwmod,
2208 .slave = &omap3xxx_i2c1_hwmod,
2209 .clk = "i2c1_ick",
2210 .addr = omap2_i2c1_addr_space,
2211 .fw = {
2212 .omap2 = {
2213 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
2214 .l4_prot_group = 7,
2215 .flags = OMAP_FIREWALL_L4,
2216 }
2217 },
2218 .user = OCP_USER_MPU | OCP_USER_SDMA,
2219};
2220
2221/* L4 CORE -> I2C2 interface */
2222static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
2223 .master = &omap3xxx_l4_core_hwmod,
2224 .slave = &omap3xxx_i2c2_hwmod,
2225 .clk = "i2c2_ick",
2226 .addr = omap2_i2c2_addr_space,
2227 .fw = {
2228 .omap2 = {
2229 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
2230 .l4_prot_group = 7,
2231 .flags = OMAP_FIREWALL_L4,
2232 }
2233 },
2234 .user = OCP_USER_MPU | OCP_USER_SDMA,
2235};
2236
2237/* L4 CORE -> I2C3 interface */
2238static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
2239 {
2240 .pa_start = 0x48060000,
2241 .pa_end = 0x48060000 + SZ_128 - 1,
2242 .flags = ADDR_TYPE_RT,
2243 },
2244 { }
2245};
2246
2247static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
2248 .master = &omap3xxx_l4_core_hwmod,
2249 .slave = &omap3xxx_i2c3_hwmod,
2250 .clk = "i2c3_ick",
2251 .addr = omap3xxx_i2c3_addr_space,
2252 .fw = {
2253 .omap2 = {
2254 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
2255 .l4_prot_group = 7,
2256 .flags = OMAP_FIREWALL_L4,
2257 }
2258 },
2259 .user = OCP_USER_MPU | OCP_USER_SDMA,
2260};
2261
2262/* L4 CORE -> SR1 interface */
2263static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
2264 {
2265 .pa_start = OMAP34XX_SR1_BASE,
2266 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
2267 .flags = ADDR_TYPE_RT,
2268 },
2269 { }
2270};
2271
2272static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
2273 .master = &omap3xxx_l4_core_hwmod,
2274 .slave = &omap34xx_sr1_hwmod,
2275 .clk = "sr_l4_ick",
2276 .addr = omap3_sr1_addr_space,
2277 .user = OCP_USER_MPU,
2278};
2279
2280static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
2281 .master = &omap3xxx_l4_core_hwmod,
2282 .slave = &omap36xx_sr1_hwmod,
2283 .clk = "sr_l4_ick",
2284 .addr = omap3_sr1_addr_space,
2285 .user = OCP_USER_MPU,
2286};
2287
2288/* L4 CORE -> SR1 interface */
2289static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
2290 {
2291 .pa_start = OMAP34XX_SR2_BASE,
2292 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
2293 .flags = ADDR_TYPE_RT,
2294 },
2295 { }
2296};
2297
2298static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
2299 .master = &omap3xxx_l4_core_hwmod,
2300 .slave = &omap34xx_sr2_hwmod,
2301 .clk = "sr_l4_ick",
2302 .addr = omap3_sr2_addr_space,
2303 .user = OCP_USER_MPU,
2304};
2305
2306static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
2307 .master = &omap3xxx_l4_core_hwmod,
2308 .slave = &omap36xx_sr2_hwmod,
2309 .clk = "sr_l4_ick",
2310 .addr = omap3_sr2_addr_space,
2311 .user = OCP_USER_MPU,
2312};
2313
2314static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
2315 {
2316 .pa_start = OMAP34XX_HSUSB_OTG_BASE,
2317 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
2318 .flags = ADDR_TYPE_RT
2319 },
2320 { }
2321};
2322
2323/* l4_core -> usbhsotg */
2324static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
2325 .master = &omap3xxx_l4_core_hwmod,
2326 .slave = &omap3xxx_usbhsotg_hwmod,
2327 .clk = "l4_ick",
2328 .addr = omap3xxx_usbhsotg_addrs,
2329 .user = OCP_USER_MPU,
2330};
2331
2332static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
2333 {
2334 .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
2335 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
2336 .flags = ADDR_TYPE_RT
2337 },
2338 { }
2339};
2340
2341/* l4_core -> usbhsotg */
2342static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
2343 .master = &omap3xxx_l4_core_hwmod,
2344 .slave = &am35xx_usbhsotg_hwmod,
2345 .clk = "l4_ick",
2346 .addr = am35xx_usbhsotg_addrs,
2347 .user = OCP_USER_MPU,
2348};
2349
2350/* L4_WKUP -> L4_SEC interface */
2351static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
2352 .master = &omap3xxx_l4_wkup_hwmod,
2353 .slave = &omap3xxx_l4_sec_hwmod,
2354 .user = OCP_USER_MPU | OCP_USER_SDMA,
2355};
2356
2357/* IVA2 <- L3 interface */
2358static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
2359 .master = &omap3xxx_l3_main_hwmod,
2360 .slave = &omap3xxx_iva_hwmod,
2361 .clk = "core_l3_ick",
2362 .user = OCP_USER_MPU | OCP_USER_SDMA,
2363};
2364
2365static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
2366 {
2367 .pa_start = 0x48318000,
2368 .pa_end = 0x48318000 + SZ_1K - 1,
2369 .flags = ADDR_TYPE_RT
2370 },
2371 { }
2372};
2373
2374/* l4_wkup -> timer1 */
2375static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
2376 .master = &omap3xxx_l4_wkup_hwmod,
2377 .slave = &omap3xxx_timer1_hwmod,
2378 .clk = "gpt1_ick",
2379 .addr = omap3xxx_timer1_addrs,
2380 .user = OCP_USER_MPU | OCP_USER_SDMA,
2381};
2382
2383static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
2384 {
2385 .pa_start = 0x49032000,
2386 .pa_end = 0x49032000 + SZ_1K - 1,
2387 .flags = ADDR_TYPE_RT
2388 },
2389 { }
2390};
2391
2392/* l4_per -> timer2 */
2393static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
2394 .master = &omap3xxx_l4_per_hwmod,
2395 .slave = &omap3xxx_timer2_hwmod,
2396 .clk = "gpt2_ick",
2397 .addr = omap3xxx_timer2_addrs,
2398 .user = OCP_USER_MPU | OCP_USER_SDMA,
2399};
2400
2401static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
2402 {
2403 .pa_start = 0x49034000,
2404 .pa_end = 0x49034000 + SZ_1K - 1,
2405 .flags = ADDR_TYPE_RT
2406 },
2407 { }
2408};
2409
2410/* l4_per -> timer3 */
2411static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
2412 .master = &omap3xxx_l4_per_hwmod,
2413 .slave = &omap3xxx_timer3_hwmod,
2414 .clk = "gpt3_ick",
2415 .addr = omap3xxx_timer3_addrs,
2416 .user = OCP_USER_MPU | OCP_USER_SDMA,
2417};
2418
2419static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
2420 {
2421 .pa_start = 0x49036000,
2422 .pa_end = 0x49036000 + SZ_1K - 1,
2423 .flags = ADDR_TYPE_RT
2424 },
2425 { }
2426};
2427
2428/* l4_per -> timer4 */
2429static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
2430 .master = &omap3xxx_l4_per_hwmod,
2431 .slave = &omap3xxx_timer4_hwmod,
2432 .clk = "gpt4_ick",
2433 .addr = omap3xxx_timer4_addrs,
2434 .user = OCP_USER_MPU | OCP_USER_SDMA,
2435};
2436
2437static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
2438 {
2439 .pa_start = 0x49038000,
2440 .pa_end = 0x49038000 + SZ_1K - 1,
2441 .flags = ADDR_TYPE_RT
2442 },
2443 { }
2444};
2445
2446/* l4_per -> timer5 */
2447static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
2448 .master = &omap3xxx_l4_per_hwmod,
2449 .slave = &omap3xxx_timer5_hwmod,
2450 .clk = "gpt5_ick",
2451 .addr = omap3xxx_timer5_addrs,
2452 .user = OCP_USER_MPU | OCP_USER_SDMA,
2453};
2454
2455static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
2456 {
2457 .pa_start = 0x4903A000,
2458 .pa_end = 0x4903A000 + SZ_1K - 1,
2459 .flags = ADDR_TYPE_RT
2460 },
2461 { }
2462};
2463
2464/* l4_per -> timer6 */
2465static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
2466 .master = &omap3xxx_l4_per_hwmod,
2467 .slave = &omap3xxx_timer6_hwmod,
2468 .clk = "gpt6_ick",
2469 .addr = omap3xxx_timer6_addrs,
2470 .user = OCP_USER_MPU | OCP_USER_SDMA,
2471};
2472
2473static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
2474 {
2475 .pa_start = 0x4903C000,
2476 .pa_end = 0x4903C000 + SZ_1K - 1,
2477 .flags = ADDR_TYPE_RT
2478 },
2479 { }
2480};
2481
2482/* l4_per -> timer7 */
2483static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
2484 .master = &omap3xxx_l4_per_hwmod,
2485 .slave = &omap3xxx_timer7_hwmod,
2486 .clk = "gpt7_ick",
2487 .addr = omap3xxx_timer7_addrs,
2488 .user = OCP_USER_MPU | OCP_USER_SDMA,
2489};
2490
2491static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
2492 {
2493 .pa_start = 0x4903E000,
2494 .pa_end = 0x4903E000 + SZ_1K - 1,
2495 .flags = ADDR_TYPE_RT
2496 },
2497 { }
2498};
2499
2500/* l4_per -> timer8 */
2501static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
2502 .master = &omap3xxx_l4_per_hwmod,
2503 .slave = &omap3xxx_timer8_hwmod,
2504 .clk = "gpt8_ick",
2505 .addr = omap3xxx_timer8_addrs,
2506 .user = OCP_USER_MPU | OCP_USER_SDMA,
2507};
2508
2509static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
2510 {
2511 .pa_start = 0x49040000,
2512 .pa_end = 0x49040000 + SZ_1K - 1,
2513 .flags = ADDR_TYPE_RT
2514 },
2515 { }
2516};
2517
2518/* l4_per -> timer9 */
2519static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
2520 .master = &omap3xxx_l4_per_hwmod,
2521 .slave = &omap3xxx_timer9_hwmod,
2522 .clk = "gpt9_ick",
2523 .addr = omap3xxx_timer9_addrs,
2524 .user = OCP_USER_MPU | OCP_USER_SDMA,
2525};
2526
2527/* l4_core -> timer10 */
2528static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
2529 .master = &omap3xxx_l4_core_hwmod,
2530 .slave = &omap3xxx_timer10_hwmod,
2531 .clk = "gpt10_ick",
2532 .addr = omap2_timer10_addrs,
2533 .user = OCP_USER_MPU | OCP_USER_SDMA,
2534};
2535
2536/* l4_core -> timer11 */
2537static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
2538 .master = &omap3xxx_l4_core_hwmod,
2539 .slave = &omap3xxx_timer11_hwmod,
2540 .clk = "gpt11_ick",
2541 .addr = omap2_timer11_addrs,
2542 .user = OCP_USER_MPU | OCP_USER_SDMA,
2543};
2544
2545static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
2546 {
2547 .pa_start = 0x48304000,
2548 .pa_end = 0x48304000 + SZ_1K - 1,
2549 .flags = ADDR_TYPE_RT
2550 },
2551 { }
2552};
2553
2554/* l4_core -> timer12 */
2555static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
2556 .master = &omap3xxx_l4_sec_hwmod,
2557 .slave = &omap3xxx_timer12_hwmod,
2558 .clk = "gpt12_ick",
2559 .addr = omap3xxx_timer12_addrs,
2560 .user = OCP_USER_MPU | OCP_USER_SDMA,
2561};
2562
2563/* l4_wkup -> wd_timer2 */
2564static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
2565 {
2566 .pa_start = 0x48314000,
2567 .pa_end = 0x4831407f,
2568 .flags = ADDR_TYPE_RT
2569 },
2570 { }
2571};
2572
2573static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
2574 .master = &omap3xxx_l4_wkup_hwmod,
2575 .slave = &omap3xxx_wd_timer2_hwmod,
2576 .clk = "wdt2_ick",
2577 .addr = omap3xxx_wd_timer2_addrs,
2578 .user = OCP_USER_MPU | OCP_USER_SDMA,
2579};
2580
2581/* l4_core -> dss */
2582static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
2583 .master = &omap3xxx_l4_core_hwmod,
2584 .slave = &omap3430es1_dss_core_hwmod,
2585 .clk = "dss_ick",
2586 .addr = omap2_dss_addrs,
2587 .fw = {
2588 .omap2 = {
2589 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
2590 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2591 .flags = OMAP_FIREWALL_L4,
2592 }
2593 },
2594 .user = OCP_USER_MPU | OCP_USER_SDMA,
2595};
2596
2597static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
2598 .master = &omap3xxx_l4_core_hwmod,
2599 .slave = &omap3xxx_dss_core_hwmod,
2600 .clk = "dss_ick",
2601 .addr = omap2_dss_addrs,
2602 .fw = {
2603 .omap2 = {
2604 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
2605 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2606 .flags = OMAP_FIREWALL_L4,
2607 }
2608 },
2609 .user = OCP_USER_MPU | OCP_USER_SDMA,
2610};
2611
2612/* l4_core -> dss_dispc */
2613static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
2614 .master = &omap3xxx_l4_core_hwmod,
2615 .slave = &omap3xxx_dss_dispc_hwmod,
2616 .clk = "dss_ick",
2617 .addr = omap2_dss_dispc_addrs,
2618 .fw = {
2619 .omap2 = {
2620 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
2621 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2622 .flags = OMAP_FIREWALL_L4,
2623 }
2624 },
2625 .user = OCP_USER_MPU | OCP_USER_SDMA,
2626};
2627
2628static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
2629 {
2630 .pa_start = 0x4804FC00,
2631 .pa_end = 0x4804FFFF,
2632 .flags = ADDR_TYPE_RT
2633 },
2634 { }
2635};
2636
2637/* l4_core -> dss_dsi1 */
2638static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
2639 .master = &omap3xxx_l4_core_hwmod,
2640 .slave = &omap3xxx_dss_dsi1_hwmod,
2641 .clk = "dss_ick",
2642 .addr = omap3xxx_dss_dsi1_addrs,
2643 .fw = {
2644 .omap2 = {
2645 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
2646 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2647 .flags = OMAP_FIREWALL_L4,
2648 }
2649 },
2650 .user = OCP_USER_MPU | OCP_USER_SDMA,
2651};
2652
2653/* l4_core -> dss_rfbi */
2654static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
2655 .master = &omap3xxx_l4_core_hwmod,
2656 .slave = &omap3xxx_dss_rfbi_hwmod,
2657 .clk = "dss_ick",
2658 .addr = omap2_dss_rfbi_addrs,
2659 .fw = {
2660 .omap2 = {
2661 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
2662 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
2663 .flags = OMAP_FIREWALL_L4,
2664 }
2665 },
2666 .user = OCP_USER_MPU | OCP_USER_SDMA,
2667};
2668
2669/* l4_core -> dss_venc */
2670static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
2671 .master = &omap3xxx_l4_core_hwmod,
2672 .slave = &omap3xxx_dss_venc_hwmod,
2673 .clk = "dss_ick",
2674 .addr = omap2_dss_venc_addrs,
2675 .fw = {
2676 .omap2 = {
2677 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
2678 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2679 .flags = OMAP_FIREWALL_L4,
2680 }
2681 },
2682 .flags = OCPIF_SWSUP_IDLE,
2683 .user = OCP_USER_MPU | OCP_USER_SDMA,
2684};
2685
2686/* l4_wkup -> gpio1 */
2687static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
2688 {
2689 .pa_start = 0x48310000,
2690 .pa_end = 0x483101ff,
2691 .flags = ADDR_TYPE_RT
2692 },
2693 { }
2694};
2695
2696static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
2697 .master = &omap3xxx_l4_wkup_hwmod,
2698 .slave = &omap3xxx_gpio1_hwmod,
2699 .addr = omap3xxx_gpio1_addrs,
2700 .user = OCP_USER_MPU | OCP_USER_SDMA,
2701};
2702
2703/* l4_per -> gpio2 */
2704static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
2705 {
2706 .pa_start = 0x49050000,
2707 .pa_end = 0x490501ff,
2708 .flags = ADDR_TYPE_RT
2709 },
2710 { }
2711};
2712
2713static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
2714 .master = &omap3xxx_l4_per_hwmod,
2715 .slave = &omap3xxx_gpio2_hwmod,
2716 .addr = omap3xxx_gpio2_addrs,
2717 .user = OCP_USER_MPU | OCP_USER_SDMA,
2718};
2719
2720/* l4_per -> gpio3 */
2721static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
2722 {
2723 .pa_start = 0x49052000,
2724 .pa_end = 0x490521ff,
2725 .flags = ADDR_TYPE_RT
2726 },
2727 { }
2728};
2729
2730static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
2731 .master = &omap3xxx_l4_per_hwmod,
2732 .slave = &omap3xxx_gpio3_hwmod,
2733 .addr = omap3xxx_gpio3_addrs,
2734 .user = OCP_USER_MPU | OCP_USER_SDMA,
2735};
2736
2737/* l4_per -> gpio4 */
2738static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
2739 {
2740 .pa_start = 0x49054000,
2741 .pa_end = 0x490541ff,
2742 .flags = ADDR_TYPE_RT
2743 },
2744 { }
2745};
2746
2747static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
2748 .master = &omap3xxx_l4_per_hwmod,
2749 .slave = &omap3xxx_gpio4_hwmod,
2750 .addr = omap3xxx_gpio4_addrs,
2751 .user = OCP_USER_MPU | OCP_USER_SDMA,
2752};
2753
2754/* l4_per -> gpio5 */
2755static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
2756 {
2757 .pa_start = 0x49056000,
2758 .pa_end = 0x490561ff,
2759 .flags = ADDR_TYPE_RT
2760 },
2761 { }
2762};
2763
2764static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
2765 .master = &omap3xxx_l4_per_hwmod,
2766 .slave = &omap3xxx_gpio5_hwmod,
2767 .addr = omap3xxx_gpio5_addrs,
2768 .user = OCP_USER_MPU | OCP_USER_SDMA,
2769};
2770
2771/* l4_per -> gpio6 */
2772static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
2773 {
2774 .pa_start = 0x49058000,
2775 .pa_end = 0x490581ff,
2776 .flags = ADDR_TYPE_RT
2777 },
2778 { }
2779};
2780
2781static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
2782 .master = &omap3xxx_l4_per_hwmod,
2783 .slave = &omap3xxx_gpio6_hwmod,
2784 .addr = omap3xxx_gpio6_addrs,
2785 .user = OCP_USER_MPU | OCP_USER_SDMA,
2786};
2787
2788/* dma_system -> L3 */
2789static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
2790 .master = &omap3xxx_dma_system_hwmod,
2791 .slave = &omap3xxx_l3_main_hwmod,
2792 .clk = "core_l3_ick",
2793 .user = OCP_USER_MPU | OCP_USER_SDMA,
2794};
2795
2796static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
2797 {
2798 .pa_start = 0x48056000,
2799 .pa_end = 0x48056fff,
2800 .flags = ADDR_TYPE_RT
2801 },
2802 { }
2803};
2804
2805/* l4_cfg -> dma_system */
2806static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2807 .master = &omap3xxx_l4_core_hwmod,
2808 .slave = &omap3xxx_dma_system_hwmod,
2809 .clk = "core_l4_ick",
2810 .addr = omap3xxx_dma_system_addrs,
2811 .user = OCP_USER_MPU | OCP_USER_SDMA,
2812};
2813
2814static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
2815 {
2816 .name = "mpu",
2817 .pa_start = 0x48074000,
2818 .pa_end = 0x480740ff,
2819 .flags = ADDR_TYPE_RT
2820 },
2821 { }
2822};
2823
2824/* l4_core -> mcbsp1 */
2825static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2826 .master = &omap3xxx_l4_core_hwmod,
2827 .slave = &omap3xxx_mcbsp1_hwmod,
2828 .clk = "mcbsp1_ick",
2829 .addr = omap3xxx_mcbsp1_addrs,
2830 .user = OCP_USER_MPU | OCP_USER_SDMA,
2831};
2832
2833static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
2834 {
2835 .name = "mpu",
2836 .pa_start = 0x49022000,
2837 .pa_end = 0x490220ff,
2838 .flags = ADDR_TYPE_RT
2839 },
2840 { }
2841};
2842
2843/* l4_per -> mcbsp2 */
2844static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2845 .master = &omap3xxx_l4_per_hwmod,
2846 .slave = &omap3xxx_mcbsp2_hwmod,
2847 .clk = "mcbsp2_ick",
2848 .addr = omap3xxx_mcbsp2_addrs,
2849 .user = OCP_USER_MPU | OCP_USER_SDMA,
2850};
2851
2852static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
2853 {
2854 .name = "mpu",
2855 .pa_start = 0x49024000,
2856 .pa_end = 0x490240ff,
2857 .flags = ADDR_TYPE_RT
2858 },
2859 { }
2860};
2861
2862/* l4_per -> mcbsp3 */
2863static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2864 .master = &omap3xxx_l4_per_hwmod,
2865 .slave = &omap3xxx_mcbsp3_hwmod,
2866 .clk = "mcbsp3_ick",
2867 .addr = omap3xxx_mcbsp3_addrs,
2868 .user = OCP_USER_MPU | OCP_USER_SDMA,
2869};
2870
2871static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
2872 {
2873 .name = "mpu",
2874 .pa_start = 0x49026000,
2875 .pa_end = 0x490260ff,
2876 .flags = ADDR_TYPE_RT
2877 },
2878 { }
2879};
2880
2881/* l4_per -> mcbsp4 */
2882static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2883 .master = &omap3xxx_l4_per_hwmod,
2884 .slave = &omap3xxx_mcbsp4_hwmod,
2885 .clk = "mcbsp4_ick",
2886 .addr = omap3xxx_mcbsp4_addrs,
2887 .user = OCP_USER_MPU | OCP_USER_SDMA,
2888};
2889
2890static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
2891 {
2892 .name = "mpu",
2893 .pa_start = 0x48096000,
2894 .pa_end = 0x480960ff,
2895 .flags = ADDR_TYPE_RT
2896 },
2897 { }
2898};
2899
2900/* l4_core -> mcbsp5 */
2901static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2902 .master = &omap3xxx_l4_core_hwmod,
2903 .slave = &omap3xxx_mcbsp5_hwmod,
2904 .clk = "mcbsp5_ick",
2905 .addr = omap3xxx_mcbsp5_addrs,
2906 .user = OCP_USER_MPU | OCP_USER_SDMA,
2907};
2908
2909static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
2910 {
2911 .name = "sidetone",
2912 .pa_start = 0x49028000,
2913 .pa_end = 0x490280ff,
2914 .flags = ADDR_TYPE_RT
2915 },
2916 { }
2917};
2918
2919/* l4_per -> mcbsp2_sidetone */
2920static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2921 .master = &omap3xxx_l4_per_hwmod,
2922 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2923 .clk = "mcbsp2_ick",
2924 .addr = omap3xxx_mcbsp2_sidetone_addrs,
2925 .user = OCP_USER_MPU,
2926};
2927
2928static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
2929 {
2930 .name = "sidetone",
2931 .pa_start = 0x4902A000,
2932 .pa_end = 0x4902A0ff,
2933 .flags = ADDR_TYPE_RT
2934 },
2935 { }
2936};
2937
2938/* l4_per -> mcbsp3_sidetone */
2939static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2940 .master = &omap3xxx_l4_per_hwmod,
2941 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2942 .clk = "mcbsp3_ick",
2943 .addr = omap3xxx_mcbsp3_sidetone_addrs,
2944 .user = OCP_USER_MPU,
2945};
2946
2947static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
2948 {
2949 .pa_start = 0x48094000,
2950 .pa_end = 0x480941ff,
2951 .flags = ADDR_TYPE_RT,
2952 },
2953 { }
2954};
2955
2956/* l4_core -> mailbox */
2957static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
2958 .master = &omap3xxx_l4_core_hwmod,
2959 .slave = &omap3xxx_mailbox_hwmod,
2960 .addr = omap3xxx_mailbox_addrs,
2961 .user = OCP_USER_MPU | OCP_USER_SDMA,
2962};
2963
2964/* l4 core -> mcspi1 interface */
2965static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
2966 .master = &omap3xxx_l4_core_hwmod,
2967 .slave = &omap34xx_mcspi1,
2968 .clk = "mcspi1_ick",
2969 .addr = omap2_mcspi1_addr_space,
2970 .user = OCP_USER_MPU | OCP_USER_SDMA,
2971};
2972
2973/* l4 core -> mcspi2 interface */
2974static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
2975 .master = &omap3xxx_l4_core_hwmod,
2976 .slave = &omap34xx_mcspi2,
2977 .clk = "mcspi2_ick",
2978 .addr = omap2_mcspi2_addr_space,
2979 .user = OCP_USER_MPU | OCP_USER_SDMA,
2980};
2981
2982/* l4 core -> mcspi3 interface */
2983static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
2984 .master = &omap3xxx_l4_core_hwmod,
2985 .slave = &omap34xx_mcspi3,
2986 .clk = "mcspi3_ick",
2987 .addr = omap2430_mcspi3_addr_space,
2988 .user = OCP_USER_MPU | OCP_USER_SDMA,
2989};
2990
2991/* l4 core -> mcspi4 interface */
2992static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
2993 {
2994 .pa_start = 0x480ba000,
2995 .pa_end = 0x480ba0ff,
2996 .flags = ADDR_TYPE_RT,
2997 },
2998 { }
2999};
3000
3001static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
3002 .master = &omap3xxx_l4_core_hwmod,
3003 .slave = &omap34xx_mcspi4,
3004 .clk = "mcspi4_ick",
3005 .addr = omap34xx_mcspi4_addr_space,
3006 .user = OCP_USER_MPU | OCP_USER_SDMA,
3007};
3008
3009static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
3010 .master = &omap3xxx_usb_host_hs_hwmod,
3011 .slave = &omap3xxx_l3_main_hwmod,
3012 .clk = "core_l3_ick",
3013 .user = OCP_USER_MPU,
3014};
3015
3016static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
3017 {
3018 .name = "uhh",
3019 .pa_start = 0x48064000,
3020 .pa_end = 0x480643ff,
3021 .flags = ADDR_TYPE_RT
3022 },
3023 {
3024 .name = "ohci",
3025 .pa_start = 0x48064400,
3026 .pa_end = 0x480647ff,
3027 },
3028 {
3029 .name = "ehci",
3030 .pa_start = 0x48064800,
3031 .pa_end = 0x48064cff,
3032 },
3033 {}
3034};
3035
3036static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
3037 .master = &omap3xxx_l4_core_hwmod,
3038 .slave = &omap3xxx_usb_host_hs_hwmod,
3039 .clk = "usbhost_ick",
3040 .addr = omap3xxx_usb_host_hs_addrs,
3041 .user = OCP_USER_MPU | OCP_USER_SDMA,
3042};
3043
3504static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = { 3044static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = {
3505 { 3045 {
3506 .name = "tll", 3046 .name = "tll",
@@ -3519,183 +3059,156 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
3519 .user = OCP_USER_MPU | OCP_USER_SDMA, 3059 .user = OCP_USER_MPU | OCP_USER_SDMA,
3520}; 3060};
3521 3061
3522static struct omap_hwmod_ocp_if *omap3xxx_usb_tll_hs_slaves[] = { 3062static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
3523 &omap3xxx_l4_core__usb_tll_hs, 3063 &omap3xxx_l3_main__l4_core,
3524}; 3064 &omap3xxx_l3_main__l4_per,
3525 3065 &omap3xxx_mpu__l3_main,
3526static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = { 3066 &omap3xxx_l4_core__l4_wkup,
3527 .name = "usb_tll_hs", 3067 &omap3xxx_l4_core__mmc3,
3528 .class = &omap3xxx_usb_tll_hs_hwmod_class, 3068 &omap3_l4_core__uart1,
3529 .clkdm_name = "l3_init_clkdm", 3069 &omap3_l4_core__uart2,
3530 .mpu_irqs = omap3xxx_usb_tll_hs_irqs, 3070 &omap3_l4_per__uart3,
3531 .main_clk = "usbtll_fck", 3071 &omap3_l4_core__i2c1,
3532 .prcm = { 3072 &omap3_l4_core__i2c2,
3533 .omap2 = { 3073 &omap3_l4_core__i2c3,
3534 .module_offs = CORE_MOD, 3074 &omap3xxx_l4_wkup__l4_sec,
3535 .prcm_reg_id = 3, 3075 &omap3xxx_l4_wkup__timer1,
3536 .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT, 3076 &omap3xxx_l4_per__timer2,
3537 .idlest_reg_id = 3, 3077 &omap3xxx_l4_per__timer3,
3538 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT, 3078 &omap3xxx_l4_per__timer4,
3539 }, 3079 &omap3xxx_l4_per__timer5,
3540 }, 3080 &omap3xxx_l4_per__timer6,
3541 .slaves = omap3xxx_usb_tll_hs_slaves, 3081 &omap3xxx_l4_per__timer7,
3542 .slaves_cnt = ARRAY_SIZE(omap3xxx_usb_tll_hs_slaves), 3082 &omap3xxx_l4_per__timer8,
3543}; 3083 &omap3xxx_l4_per__timer9,
3544 3084 &omap3xxx_l4_core__timer10,
3545static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { 3085 &omap3xxx_l4_core__timer11,
3546 &omap3xxx_l3_main_hwmod, 3086 &omap3xxx_l4_wkup__wd_timer2,
3547 &omap3xxx_l4_core_hwmod, 3087 &omap3xxx_l4_wkup__gpio1,
3548 &omap3xxx_l4_per_hwmod, 3088 &omap3xxx_l4_per__gpio2,
3549 &omap3xxx_l4_wkup_hwmod, 3089 &omap3xxx_l4_per__gpio3,
3550 &omap3xxx_mmc3_hwmod, 3090 &omap3xxx_l4_per__gpio4,
3551 &omap3xxx_mpu_hwmod, 3091 &omap3xxx_l4_per__gpio5,
3552 3092 &omap3xxx_l4_per__gpio6,
3553 &omap3xxx_timer1_hwmod, 3093 &omap3xxx_dma_system__l3,
3554 &omap3xxx_timer2_hwmod, 3094 &omap3xxx_l4_core__dma_system,
3555 &omap3xxx_timer3_hwmod, 3095 &omap3xxx_l4_core__mcbsp1,
3556 &omap3xxx_timer4_hwmod, 3096 &omap3xxx_l4_per__mcbsp2,
3557 &omap3xxx_timer5_hwmod, 3097 &omap3xxx_l4_per__mcbsp3,
3558 &omap3xxx_timer6_hwmod, 3098 &omap3xxx_l4_per__mcbsp4,
3559 &omap3xxx_timer7_hwmod, 3099 &omap3xxx_l4_core__mcbsp5,
3560 &omap3xxx_timer8_hwmod, 3100 &omap3xxx_l4_per__mcbsp2_sidetone,
3561 &omap3xxx_timer9_hwmod, 3101 &omap3xxx_l4_per__mcbsp3_sidetone,
3562 &omap3xxx_timer10_hwmod, 3102 &omap34xx_l4_core__mcspi1,
3563 &omap3xxx_timer11_hwmod, 3103 &omap34xx_l4_core__mcspi2,
3564 3104 &omap34xx_l4_core__mcspi3,
3565 &omap3xxx_wd_timer2_hwmod, 3105 &omap34xx_l4_core__mcspi4,
3566 &omap3xxx_uart1_hwmod,
3567 &omap3xxx_uart2_hwmod,
3568 &omap3xxx_uart3_hwmod,
3569
3570 /* i2c class */
3571 &omap3xxx_i2c1_hwmod,
3572 &omap3xxx_i2c2_hwmod,
3573 &omap3xxx_i2c3_hwmod,
3574
3575 /* gpio class */
3576 &omap3xxx_gpio1_hwmod,
3577 &omap3xxx_gpio2_hwmod,
3578 &omap3xxx_gpio3_hwmod,
3579 &omap3xxx_gpio4_hwmod,
3580 &omap3xxx_gpio5_hwmod,
3581 &omap3xxx_gpio6_hwmod,
3582
3583 /* dma_system class*/
3584 &omap3xxx_dma_system_hwmod,
3585
3586 /* mcbsp class */
3587 &omap3xxx_mcbsp1_hwmod,
3588 &omap3xxx_mcbsp2_hwmod,
3589 &omap3xxx_mcbsp3_hwmod,
3590 &omap3xxx_mcbsp4_hwmod,
3591 &omap3xxx_mcbsp5_hwmod,
3592 &omap3xxx_mcbsp2_sidetone_hwmod,
3593 &omap3xxx_mcbsp3_sidetone_hwmod,
3594
3595
3596 /* mcspi class */
3597 &omap34xx_mcspi1,
3598 &omap34xx_mcspi2,
3599 &omap34xx_mcspi3,
3600 &omap34xx_mcspi4,
3601
3602 NULL, 3106 NULL,
3603}; 3107};
3604 3108
3605/* GP-only hwmods */ 3109/* GP-only hwmod links */
3606static __initdata struct omap_hwmod *omap3xxx_gp_hwmods[] = { 3110static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = {
3607 &omap3xxx_timer12_hwmod, 3111 &omap3xxx_l4_sec__timer12,
3608 NULL 3112 NULL
3609}; 3113};
3610 3114
3611/* 3430ES1-only hwmods */ 3115/* 3430ES1-only hwmod links */
3612static __initdata struct omap_hwmod *omap3430es1_hwmods[] = { 3116static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
3613 &omap3430es1_dss_core_hwmod, 3117 &omap3430es1_dss__l3,
3118 &omap3430es1_l4_core__dss,
3614 NULL 3119 NULL
3615}; 3120};
3616 3121
3617/* 3430ES2+-only hwmods */ 3122/* 3430ES2+-only hwmod links */
3618static __initdata struct omap_hwmod *omap3430es2plus_hwmods[] = { 3123static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
3619 &omap3xxx_dss_core_hwmod, 3124 &omap3xxx_dss__l3,
3620 &omap3xxx_usbhsotg_hwmod, 3125 &omap3xxx_l4_core__dss,
3621 &omap3xxx_usb_host_hs_hwmod, 3126 &omap3xxx_usbhsotg__l3,
3622 &omap3xxx_usb_tll_hs_hwmod, 3127 &omap3xxx_l4_core__usbhsotg,
3128 &omap3xxx_usb_host_hs__l3_main_2,
3129 &omap3xxx_l4_core__usb_host_hs,
3130 &omap3xxx_l4_core__usb_tll_hs,
3623 NULL 3131 NULL
3624}; 3132};
3625 3133
3626/* <= 3430ES3-only hwmods */ 3134/* <= 3430ES3-only hwmod links */
3627static struct omap_hwmod *omap3430_pre_es3_hwmods[] __initdata = { 3135static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
3628 &omap3xxx_pre_es3_mmc1_hwmod, 3136 &omap3xxx_l4_core__pre_es3_mmc1,
3629 &omap3xxx_pre_es3_mmc2_hwmod, 3137 &omap3xxx_l4_core__pre_es3_mmc2,
3630 NULL 3138 NULL
3631}; 3139};
3632 3140
3633/* 3430ES3+-only hwmods */ 3141/* 3430ES3+-only hwmod links */
3634static struct omap_hwmod *omap3430_es3plus_hwmods[] __initdata = { 3142static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
3635 &omap3xxx_es3plus_mmc1_hwmod, 3143 &omap3xxx_l4_core__es3plus_mmc1,
3636 &omap3xxx_es3plus_mmc2_hwmod, 3144 &omap3xxx_l4_core__es3plus_mmc2,
3637 NULL 3145 NULL
3638}; 3146};
3639 3147
3640/* 34xx-only hwmods (all ES revisions) */ 3148/* 34xx-only hwmod links (all ES revisions) */
3641static __initdata struct omap_hwmod *omap34xx_hwmods[] = { 3149static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
3642 &omap3xxx_iva_hwmod, 3150 &omap3xxx_l3__iva,
3643 &omap34xx_sr1_hwmod, 3151 &omap34xx_l4_core__sr1,
3644 &omap34xx_sr2_hwmod, 3152 &omap34xx_l4_core__sr2,
3645 &omap3xxx_mailbox_hwmod, 3153 &omap3xxx_l4_core__mailbox,
3646 NULL 3154 NULL
3647}; 3155};
3648 3156
3649/* 36xx-only hwmods (all ES revisions) */ 3157/* 36xx-only hwmod links (all ES revisions) */
3650static __initdata struct omap_hwmod *omap36xx_hwmods[] = { 3158static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
3651 &omap3xxx_iva_hwmod, 3159 &omap3xxx_l3__iva,
3652 &omap3xxx_uart4_hwmod, 3160 &omap36xx_l4_per__uart4,
3653 &omap3xxx_dss_core_hwmod, 3161 &omap3xxx_dss__l3,
3654 &omap36xx_sr1_hwmod, 3162 &omap3xxx_l4_core__dss,
3655 &omap36xx_sr2_hwmod, 3163 &omap36xx_l4_core__sr1,
3656 &omap3xxx_usbhsotg_hwmod, 3164 &omap36xx_l4_core__sr2,
3657 &omap3xxx_mailbox_hwmod, 3165 &omap3xxx_usbhsotg__l3,
3658 &omap3xxx_usb_host_hs_hwmod, 3166 &omap3xxx_l4_core__usbhsotg,
3659 &omap3xxx_usb_tll_hs_hwmod, 3167 &omap3xxx_l4_core__mailbox,
3660 &omap3xxx_es3plus_mmc1_hwmod, 3168 &omap3xxx_usb_host_hs__l3_main_2,
3661 &omap3xxx_es3plus_mmc2_hwmod, 3169 &omap3xxx_l4_core__usb_host_hs,
3170 &omap3xxx_l4_core__usb_tll_hs,
3171 &omap3xxx_l4_core__es3plus_mmc1,
3172 &omap3xxx_l4_core__es3plus_mmc2,
3662 NULL 3173 NULL
3663}; 3174};
3664 3175
3665static __initdata struct omap_hwmod *am35xx_hwmods[] = { 3176static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
3666 &omap3xxx_dss_core_hwmod, /* XXX ??? */ 3177 &omap3xxx_dss__l3,
3667 &am35xx_usbhsotg_hwmod, 3178 &omap3xxx_l4_core__dss,
3668 &am35xx_uart4_hwmod, 3179 &am35xx_usbhsotg__l3,
3669 &omap3xxx_usb_host_hs_hwmod, 3180 &am35xx_l4_core__usbhsotg,
3670 &omap3xxx_usb_tll_hs_hwmod, 3181 &am35xx_l4_core__uart4,
3671 &omap3xxx_es3plus_mmc1_hwmod, 3182 &omap3xxx_usb_host_hs__l3_main_2,
3672 &omap3xxx_es3plus_mmc2_hwmod, 3183 &omap3xxx_l4_core__usb_host_hs,
3184 &omap3xxx_l4_core__usb_tll_hs,
3185 &omap3xxx_l4_core__es3plus_mmc1,
3186 &omap3xxx_l4_core__es3plus_mmc2,
3673 NULL 3187 NULL
3674}; 3188};
3675 3189
3676static __initdata struct omap_hwmod *omap3xxx_dss_hwmods[] = { 3190static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
3677 /* dss class */ 3191 &omap3xxx_l4_core__dss_dispc,
3678 &omap3xxx_dss_dispc_hwmod, 3192 &omap3xxx_l4_core__dss_dsi1,
3679 &omap3xxx_dss_dsi1_hwmod, 3193 &omap3xxx_l4_core__dss_rfbi,
3680 &omap3xxx_dss_rfbi_hwmod, 3194 &omap3xxx_l4_core__dss_venc,
3681 &omap3xxx_dss_venc_hwmod,
3682 NULL 3195 NULL
3683}; 3196};
3684 3197
3685int __init omap3xxx_hwmod_init(void) 3198int __init omap3xxx_hwmod_init(void)
3686{ 3199{
3687 int r; 3200 int r;
3688 struct omap_hwmod **h = NULL; 3201 struct omap_hwmod_ocp_if **h = NULL;
3689 unsigned int rev; 3202 unsigned int rev;
3690 3203
3691 /* Register hwmods common to all OMAP3 */ 3204 /* Register hwmod links common to all OMAP3 */
3692 r = omap_hwmod_register(omap3xxx_hwmods); 3205 r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
3693 if (r < 0) 3206 if (r < 0)
3694 return r; 3207 return r;
3695 3208
3696 /* Register GP-only hwmods. */ 3209 /* Register GP-only hwmod links. */
3697 if (omap_type() == OMAP2_DEVICE_TYPE_GP) { 3210 if (omap_type() == OMAP2_DEVICE_TYPE_GP) {
3698 r = omap_hwmod_register(omap3xxx_gp_hwmods); 3211 r = omap_hwmod_register_links(omap3xxx_gp_hwmod_ocp_ifs);
3699 if (r < 0) 3212 if (r < 0)
3700 return r; 3213 return r;
3701 } 3214 }
@@ -3703,43 +3216,43 @@ int __init omap3xxx_hwmod_init(void)
3703 rev = omap_rev(); 3216 rev = omap_rev();
3704 3217
3705 /* 3218 /*
3706 * Register hwmods common to individual OMAP3 families, all 3219 * Register hwmod links common to individual OMAP3 families, all
3707 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx) 3220 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
3708 * All possible revisions should be included in this conditional. 3221 * All possible revisions should be included in this conditional.
3709 */ 3222 */
3710 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 || 3223 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3711 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 || 3224 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
3712 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) { 3225 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
3713 h = omap34xx_hwmods; 3226 h = omap34xx_hwmod_ocp_ifs;
3714 } else if (rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1) { 3227 } else if (rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1) {
3715 h = am35xx_hwmods; 3228 h = am35xx_hwmod_ocp_ifs;
3716 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 || 3229 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
3717 rev == OMAP3630_REV_ES1_2) { 3230 rev == OMAP3630_REV_ES1_2) {
3718 h = omap36xx_hwmods; 3231 h = omap36xx_hwmod_ocp_ifs;
3719 } else { 3232 } else {
3720 WARN(1, "OMAP3 hwmod family init: unknown chip type\n"); 3233 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
3721 return -EINVAL; 3234 return -EINVAL;
3722 }; 3235 };
3723 3236
3724 r = omap_hwmod_register(h); 3237 r = omap_hwmod_register_links(h);
3725 if (r < 0) 3238 if (r < 0)
3726 return r; 3239 return r;
3727 3240
3728 /* 3241 /*
3729 * Register hwmods specific to certain ES levels of a 3242 * Register hwmod links specific to certain ES levels of a
3730 * particular family of silicon (e.g., 34xx ES1.0) 3243 * particular family of silicon (e.g., 34xx ES1.0)
3731 */ 3244 */
3732 h = NULL; 3245 h = NULL;
3733 if (rev == OMAP3430_REV_ES1_0) { 3246 if (rev == OMAP3430_REV_ES1_0) {
3734 h = omap3430es1_hwmods; 3247 h = omap3430es1_hwmod_ocp_ifs;
3735 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 || 3248 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
3736 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 || 3249 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3737 rev == OMAP3430_REV_ES3_1_2) { 3250 rev == OMAP3430_REV_ES3_1_2) {
3738 h = omap3430es2plus_hwmods; 3251 h = omap3430es2plus_hwmod_ocp_ifs;
3739 }; 3252 };
3740 3253
3741 if (h) { 3254 if (h) {
3742 r = omap_hwmod_register(h); 3255 r = omap_hwmod_register_links(h);
3743 if (r < 0) 3256 if (r < 0)
3744 return r; 3257 return r;
3745 } 3258 }
@@ -3747,29 +3260,29 @@ int __init omap3xxx_hwmod_init(void)
3747 h = NULL; 3260 h = NULL;
3748 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 || 3261 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3749 rev == OMAP3430_REV_ES2_1) { 3262 rev == OMAP3430_REV_ES2_1) {
3750 h = omap3430_pre_es3_hwmods; 3263 h = omap3430_pre_es3_hwmod_ocp_ifs;
3751 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 || 3264 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3752 rev == OMAP3430_REV_ES3_1_2) { 3265 rev == OMAP3430_REV_ES3_1_2) {
3753 h = omap3430_es3plus_hwmods; 3266 h = omap3430_es3plus_hwmod_ocp_ifs;
3754 }; 3267 };
3755 3268
3756 if (h) 3269 if (h)
3757 r = omap_hwmod_register(h); 3270 r = omap_hwmod_register_links(h);
3758 if (r < 0) 3271 if (r < 0)
3759 return r; 3272 return r;
3760 3273
3761 /* 3274 /*
3762 * DSS code presumes that dss_core hwmod is handled first, 3275 * DSS code presumes that dss_core hwmod is handled first,
3763 * _before_ any other DSS related hwmods so register common 3276 * _before_ any other DSS related hwmods so register common
3764 * DSS hwmods last to ensure that dss_core is already registered. 3277 * DSS hwmod links last to ensure that dss_core is already
3765 * Otherwise some change things may happen, for ex. if dispc 3278 * registered. Otherwise some change things may happen, for
3766 * is handled before dss_core and DSS is enabled in bootloader 3279 * ex. if dispc is handled before dss_core and DSS is enabled
3767 * DIPSC will be reset with outputs enabled which sometimes leads 3280 * in bootloader DISPC will be reset with outputs enabled
3768 * to unrecoverable L3 error. 3281 * which sometimes leads to unrecoverable L3 error. XXX The
3769 * XXX The long-term fix to this is to ensure modules are set up 3282 * long-term fix to this is to ensure hwmods are set up in
3770 * in dependency order in the hwmod core code. 3283 * dependency order in the hwmod core code.
3771 */ 3284 */
3772 r = omap_hwmod_register(omap3xxx_dss_hwmods); 3285 r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
3773 3286
3774 return r; 3287 return r;
3775} 3288}
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 6abc75753e42..0d91dec5b4bc 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Hardware modules present on the OMAP44xx chips 2 * Hardware modules present on the OMAP44xx chips
3 * 3 *
4 * Copyright (C) 2009-2011 Texas Instruments, Inc. 4 * Copyright (C) 2009-2012 Texas Instruments, Inc.
5 * Copyright (C) 2009-2010 Nokia Corporation 5 * Copyright (C) 2009-2010 Nokia Corporation
6 * 6 *
7 * Paul Walmsley 7 * Paul Walmsley
@@ -44,38 +44,10 @@
44#define OMAP44XX_IRQ_GIC_START 32 44#define OMAP44XX_IRQ_GIC_START 32
45 45
46/* Base offset for all OMAP4 dma requests */ 46/* Base offset for all OMAP4 dma requests */
47#define OMAP44XX_DMA_REQ_START 1 47#define OMAP44XX_DMA_REQ_START 1
48
49/* Backward references (IPs with Bus Master capability) */
50static struct omap_hwmod omap44xx_aess_hwmod;
51static struct omap_hwmod omap44xx_dma_system_hwmod;
52static struct omap_hwmod omap44xx_dmm_hwmod;
53static struct omap_hwmod omap44xx_dsp_hwmod;
54static struct omap_hwmod omap44xx_dss_hwmod;
55static struct omap_hwmod omap44xx_emif_fw_hwmod;
56static struct omap_hwmod omap44xx_hsi_hwmod;
57static struct omap_hwmod omap44xx_ipu_hwmod;
58static struct omap_hwmod omap44xx_iss_hwmod;
59static struct omap_hwmod omap44xx_iva_hwmod;
60static struct omap_hwmod omap44xx_l3_instr_hwmod;
61static struct omap_hwmod omap44xx_l3_main_1_hwmod;
62static struct omap_hwmod omap44xx_l3_main_2_hwmod;
63static struct omap_hwmod omap44xx_l3_main_3_hwmod;
64static struct omap_hwmod omap44xx_l4_abe_hwmod;
65static struct omap_hwmod omap44xx_l4_cfg_hwmod;
66static struct omap_hwmod omap44xx_l4_per_hwmod;
67static struct omap_hwmod omap44xx_l4_wkup_hwmod;
68static struct omap_hwmod omap44xx_mmc1_hwmod;
69static struct omap_hwmod omap44xx_mmc2_hwmod;
70static struct omap_hwmod omap44xx_mpu_hwmod;
71static struct omap_hwmod omap44xx_mpu_private_hwmod;
72static struct omap_hwmod omap44xx_usb_otg_hs_hwmod;
73static struct omap_hwmod omap44xx_usb_host_hs_hwmod;
74static struct omap_hwmod omap44xx_usb_tll_hs_hwmod;
75 48
76/* 49/*
77 * Interconnects omap_hwmod structures 50 * IP blocks
78 * hwmods that compose the global OMAP interconnect
79 */ 51 */
80 52
81/* 53/*
@@ -92,51 +64,17 @@ static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
92 { .irq = -1 } 64 { .irq = -1 }
93}; 65};
94 66
95/* l3_main_1 -> dmm */
96static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
97 .master = &omap44xx_l3_main_1_hwmod,
98 .slave = &omap44xx_dmm_hwmod,
99 .clk = "l3_div_ck",
100 .user = OCP_USER_SDMA,
101};
102
103static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = {
104 {
105 .pa_start = 0x4e000000,
106 .pa_end = 0x4e0007ff,
107 .flags = ADDR_TYPE_RT
108 },
109 { }
110};
111
112/* mpu -> dmm */
113static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
114 .master = &omap44xx_mpu_hwmod,
115 .slave = &omap44xx_dmm_hwmod,
116 .clk = "l3_div_ck",
117 .addr = omap44xx_dmm_addrs,
118 .user = OCP_USER_MPU,
119};
120
121/* dmm slave ports */
122static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = {
123 &omap44xx_l3_main_1__dmm,
124 &omap44xx_mpu__dmm,
125};
126
127static struct omap_hwmod omap44xx_dmm_hwmod = { 67static struct omap_hwmod omap44xx_dmm_hwmod = {
128 .name = "dmm", 68 .name = "dmm",
129 .class = &omap44xx_dmm_hwmod_class, 69 .class = &omap44xx_dmm_hwmod_class,
130 .clkdm_name = "l3_emif_clkdm", 70 .clkdm_name = "l3_emif_clkdm",
71 .mpu_irqs = omap44xx_dmm_irqs,
131 .prcm = { 72 .prcm = {
132 .omap4 = { 73 .omap4 = {
133 .clkctrl_offs = OMAP4_CM_MEMIF_DMM_CLKCTRL_OFFSET, 74 .clkctrl_offs = OMAP4_CM_MEMIF_DMM_CLKCTRL_OFFSET,
134 .context_offs = OMAP4_RM_MEMIF_DMM_CONTEXT_OFFSET, 75 .context_offs = OMAP4_RM_MEMIF_DMM_CONTEXT_OFFSET,
135 }, 76 },
136 }, 77 },
137 .slaves = omap44xx_dmm_slaves,
138 .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves),
139 .mpu_irqs = omap44xx_dmm_irqs,
140}; 78};
141 79
142/* 80/*
@@ -148,38 +86,6 @@ static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = {
148}; 86};
149 87
150/* emif_fw */ 88/* emif_fw */
151/* dmm -> emif_fw */
152static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
153 .master = &omap44xx_dmm_hwmod,
154 .slave = &omap44xx_emif_fw_hwmod,
155 .clk = "l3_div_ck",
156 .user = OCP_USER_MPU | OCP_USER_SDMA,
157};
158
159static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = {
160 {
161 .pa_start = 0x4a20c000,
162 .pa_end = 0x4a20c0ff,
163 .flags = ADDR_TYPE_RT
164 },
165 { }
166};
167
168/* l4_cfg -> emif_fw */
169static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = {
170 .master = &omap44xx_l4_cfg_hwmod,
171 .slave = &omap44xx_emif_fw_hwmod,
172 .clk = "l4_div_ck",
173 .addr = omap44xx_emif_fw_addrs,
174 .user = OCP_USER_MPU,
175};
176
177/* emif_fw slave ports */
178static struct omap_hwmod_ocp_if *omap44xx_emif_fw_slaves[] = {
179 &omap44xx_dmm__emif_fw,
180 &omap44xx_l4_cfg__emif_fw,
181};
182
183static struct omap_hwmod omap44xx_emif_fw_hwmod = { 89static struct omap_hwmod omap44xx_emif_fw_hwmod = {
184 .name = "emif_fw", 90 .name = "emif_fw",
185 .class = &omap44xx_emif_fw_hwmod_class, 91 .class = &omap44xx_emif_fw_hwmod_class,
@@ -190,8 +96,6 @@ static struct omap_hwmod omap44xx_emif_fw_hwmod = {
190 .context_offs = OMAP4_RM_MEMIF_EMIF_FW_CONTEXT_OFFSET, 96 .context_offs = OMAP4_RM_MEMIF_EMIF_FW_CONTEXT_OFFSET,
191 }, 97 },
192 }, 98 },
193 .slaves = omap44xx_emif_fw_slaves,
194 .slaves_cnt = ARRAY_SIZE(omap44xx_emif_fw_slaves),
195}; 99};
196 100
197/* 101/*
@@ -203,28 +107,6 @@ static struct omap_hwmod_class omap44xx_l3_hwmod_class = {
203}; 107};
204 108
205/* l3_instr */ 109/* l3_instr */
206/* iva -> l3_instr */
207static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = {
208 .master = &omap44xx_iva_hwmod,
209 .slave = &omap44xx_l3_instr_hwmod,
210 .clk = "l3_div_ck",
211 .user = OCP_USER_MPU | OCP_USER_SDMA,
212};
213
214/* l3_main_3 -> l3_instr */
215static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = {
216 .master = &omap44xx_l3_main_3_hwmod,
217 .slave = &omap44xx_l3_instr_hwmod,
218 .clk = "l3_div_ck",
219 .user = OCP_USER_MPU | OCP_USER_SDMA,
220};
221
222/* l3_instr slave ports */
223static struct omap_hwmod_ocp_if *omap44xx_l3_instr_slaves[] = {
224 &omap44xx_iva__l3_instr,
225 &omap44xx_l3_main_3__l3_instr,
226};
227
228static struct omap_hwmod omap44xx_l3_instr_hwmod = { 110static struct omap_hwmod omap44xx_l3_instr_hwmod = {
229 .name = "l3_instr", 111 .name = "l3_instr",
230 .class = &omap44xx_l3_hwmod_class, 112 .class = &omap44xx_l3_hwmod_class,
@@ -236,8 +118,6 @@ static struct omap_hwmod omap44xx_l3_instr_hwmod = {
236 .modulemode = MODULEMODE_HWCTRL, 118 .modulemode = MODULEMODE_HWCTRL,
237 }, 119 },
238 }, 120 },
239 .slaves = omap44xx_l3_instr_slaves,
240 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_instr_slaves),
241}; 121};
242 122
243/* l3_main_1 */ 123/* l3_main_1 */
@@ -247,83 +127,6 @@ static struct omap_hwmod_irq_info omap44xx_l3_main_1_irqs[] = {
247 { .irq = -1 } 127 { .irq = -1 }
248}; 128};
249 129
250/* dsp -> l3_main_1 */
251static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = {
252 .master = &omap44xx_dsp_hwmod,
253 .slave = &omap44xx_l3_main_1_hwmod,
254 .clk = "l3_div_ck",
255 .user = OCP_USER_MPU | OCP_USER_SDMA,
256};
257
258/* dss -> l3_main_1 */
259static struct omap_hwmod_ocp_if omap44xx_dss__l3_main_1 = {
260 .master = &omap44xx_dss_hwmod,
261 .slave = &omap44xx_l3_main_1_hwmod,
262 .clk = "l3_div_ck",
263 .user = OCP_USER_MPU | OCP_USER_SDMA,
264};
265
266/* l3_main_2 -> l3_main_1 */
267static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = {
268 .master = &omap44xx_l3_main_2_hwmod,
269 .slave = &omap44xx_l3_main_1_hwmod,
270 .clk = "l3_div_ck",
271 .user = OCP_USER_MPU | OCP_USER_SDMA,
272};
273
274/* l4_cfg -> l3_main_1 */
275static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = {
276 .master = &omap44xx_l4_cfg_hwmod,
277 .slave = &omap44xx_l3_main_1_hwmod,
278 .clk = "l4_div_ck",
279 .user = OCP_USER_MPU | OCP_USER_SDMA,
280};
281
282/* mmc1 -> l3_main_1 */
283static struct omap_hwmod_ocp_if omap44xx_mmc1__l3_main_1 = {
284 .master = &omap44xx_mmc1_hwmod,
285 .slave = &omap44xx_l3_main_1_hwmod,
286 .clk = "l3_div_ck",
287 .user = OCP_USER_MPU | OCP_USER_SDMA,
288};
289
290/* mmc2 -> l3_main_1 */
291static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = {
292 .master = &omap44xx_mmc2_hwmod,
293 .slave = &omap44xx_l3_main_1_hwmod,
294 .clk = "l3_div_ck",
295 .user = OCP_USER_MPU | OCP_USER_SDMA,
296};
297
298static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = {
299 {
300 .pa_start = 0x44000000,
301 .pa_end = 0x44000fff,
302 .flags = ADDR_TYPE_RT
303 },
304 { }
305};
306
307/* mpu -> l3_main_1 */
308static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
309 .master = &omap44xx_mpu_hwmod,
310 .slave = &omap44xx_l3_main_1_hwmod,
311 .clk = "l3_div_ck",
312 .addr = omap44xx_l3_main_1_addrs,
313 .user = OCP_USER_MPU,
314};
315
316/* l3_main_1 slave ports */
317static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = {
318 &omap44xx_dsp__l3_main_1,
319 &omap44xx_dss__l3_main_1,
320 &omap44xx_l3_main_2__l3_main_1,
321 &omap44xx_l4_cfg__l3_main_1,
322 &omap44xx_mmc1__l3_main_1,
323 &omap44xx_mmc2__l3_main_1,
324 &omap44xx_mpu__l3_main_1,
325};
326
327static struct omap_hwmod omap44xx_l3_main_1_hwmod = { 130static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
328 .name = "l3_main_1", 131 .name = "l3_main_1",
329 .class = &omap44xx_l3_hwmod_class, 132 .class = &omap44xx_l3_hwmod_class,
@@ -335,97 +138,9 @@ static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
335 .context_offs = OMAP4_RM_L3_1_L3_1_CONTEXT_OFFSET, 138 .context_offs = OMAP4_RM_L3_1_L3_1_CONTEXT_OFFSET,
336 }, 139 },
337 }, 140 },
338 .slaves = omap44xx_l3_main_1_slaves,
339 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves),
340}; 141};
341 142
342/* l3_main_2 */ 143/* l3_main_2 */
343/* dma_system -> l3_main_2 */
344static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
345 .master = &omap44xx_dma_system_hwmod,
346 .slave = &omap44xx_l3_main_2_hwmod,
347 .clk = "l3_div_ck",
348 .user = OCP_USER_MPU | OCP_USER_SDMA,
349};
350
351/* hsi -> l3_main_2 */
352static struct omap_hwmod_ocp_if omap44xx_hsi__l3_main_2 = {
353 .master = &omap44xx_hsi_hwmod,
354 .slave = &omap44xx_l3_main_2_hwmod,
355 .clk = "l3_div_ck",
356 .user = OCP_USER_MPU | OCP_USER_SDMA,
357};
358
359/* ipu -> l3_main_2 */
360static struct omap_hwmod_ocp_if omap44xx_ipu__l3_main_2 = {
361 .master = &omap44xx_ipu_hwmod,
362 .slave = &omap44xx_l3_main_2_hwmod,
363 .clk = "l3_div_ck",
364 .user = OCP_USER_MPU | OCP_USER_SDMA,
365};
366
367/* iss -> l3_main_2 */
368static struct omap_hwmod_ocp_if omap44xx_iss__l3_main_2 = {
369 .master = &omap44xx_iss_hwmod,
370 .slave = &omap44xx_l3_main_2_hwmod,
371 .clk = "l3_div_ck",
372 .user = OCP_USER_MPU | OCP_USER_SDMA,
373};
374
375/* iva -> l3_main_2 */
376static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = {
377 .master = &omap44xx_iva_hwmod,
378 .slave = &omap44xx_l3_main_2_hwmod,
379 .clk = "l3_div_ck",
380 .user = OCP_USER_MPU | OCP_USER_SDMA,
381};
382
383static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = {
384 {
385 .pa_start = 0x44800000,
386 .pa_end = 0x44801fff,
387 .flags = ADDR_TYPE_RT
388 },
389 { }
390};
391
392/* l3_main_1 -> l3_main_2 */
393static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
394 .master = &omap44xx_l3_main_1_hwmod,
395 .slave = &omap44xx_l3_main_2_hwmod,
396 .clk = "l3_div_ck",
397 .addr = omap44xx_l3_main_2_addrs,
398 .user = OCP_USER_MPU,
399};
400
401/* l4_cfg -> l3_main_2 */
402static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = {
403 .master = &omap44xx_l4_cfg_hwmod,
404 .slave = &omap44xx_l3_main_2_hwmod,
405 .clk = "l4_div_ck",
406 .user = OCP_USER_MPU | OCP_USER_SDMA,
407};
408
409/* usb_otg_hs -> l3_main_2 */
410static struct omap_hwmod_ocp_if omap44xx_usb_otg_hs__l3_main_2 = {
411 .master = &omap44xx_usb_otg_hs_hwmod,
412 .slave = &omap44xx_l3_main_2_hwmod,
413 .clk = "l3_div_ck",
414 .user = OCP_USER_MPU | OCP_USER_SDMA,
415};
416
417/* l3_main_2 slave ports */
418static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = {
419 &omap44xx_dma_system__l3_main_2,
420 &omap44xx_hsi__l3_main_2,
421 &omap44xx_ipu__l3_main_2,
422 &omap44xx_iss__l3_main_2,
423 &omap44xx_iva__l3_main_2,
424 &omap44xx_l3_main_1__l3_main_2,
425 &omap44xx_l4_cfg__l3_main_2,
426 &omap44xx_usb_otg_hs__l3_main_2,
427};
428
429static struct omap_hwmod omap44xx_l3_main_2_hwmod = { 144static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
430 .name = "l3_main_2", 145 .name = "l3_main_2",
431 .class = &omap44xx_l3_hwmod_class, 146 .class = &omap44xx_l3_hwmod_class,
@@ -436,52 +151,9 @@ static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
436 .context_offs = OMAP4_RM_L3_2_L3_2_CONTEXT_OFFSET, 151 .context_offs = OMAP4_RM_L3_2_L3_2_CONTEXT_OFFSET,
437 }, 152 },
438 }, 153 },
439 .slaves = omap44xx_l3_main_2_slaves,
440 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_2_slaves),
441}; 154};
442 155
443/* l3_main_3 */ 156/* l3_main_3 */
444static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = {
445 {
446 .pa_start = 0x45000000,
447 .pa_end = 0x45000fff,
448 .flags = ADDR_TYPE_RT
449 },
450 { }
451};
452
453/* l3_main_1 -> l3_main_3 */
454static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
455 .master = &omap44xx_l3_main_1_hwmod,
456 .slave = &omap44xx_l3_main_3_hwmod,
457 .clk = "l3_div_ck",
458 .addr = omap44xx_l3_main_3_addrs,
459 .user = OCP_USER_MPU,
460};
461
462/* l3_main_2 -> l3_main_3 */
463static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = {
464 .master = &omap44xx_l3_main_2_hwmod,
465 .slave = &omap44xx_l3_main_3_hwmod,
466 .clk = "l3_div_ck",
467 .user = OCP_USER_MPU | OCP_USER_SDMA,
468};
469
470/* l4_cfg -> l3_main_3 */
471static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = {
472 .master = &omap44xx_l4_cfg_hwmod,
473 .slave = &omap44xx_l3_main_3_hwmod,
474 .clk = "l4_div_ck",
475 .user = OCP_USER_MPU | OCP_USER_SDMA,
476};
477
478/* l3_main_3 slave ports */
479static struct omap_hwmod_ocp_if *omap44xx_l3_main_3_slaves[] = {
480 &omap44xx_l3_main_1__l3_main_3,
481 &omap44xx_l3_main_2__l3_main_3,
482 &omap44xx_l4_cfg__l3_main_3,
483};
484
485static struct omap_hwmod omap44xx_l3_main_3_hwmod = { 157static struct omap_hwmod omap44xx_l3_main_3_hwmod = {
486 .name = "l3_main_3", 158 .name = "l3_main_3",
487 .class = &omap44xx_l3_hwmod_class, 159 .class = &omap44xx_l3_hwmod_class,
@@ -493,8 +165,6 @@ static struct omap_hwmod omap44xx_l3_main_3_hwmod = {
493 .modulemode = MODULEMODE_HWCTRL, 165 .modulemode = MODULEMODE_HWCTRL,
494 }, 166 },
495 }, 167 },
496 .slaves = omap44xx_l3_main_3_slaves,
497 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_3_slaves),
498}; 168};
499 169
500/* 170/*
@@ -506,46 +176,6 @@ static struct omap_hwmod_class omap44xx_l4_hwmod_class = {
506}; 176};
507 177
508/* l4_abe */ 178/* l4_abe */
509/* aess -> l4_abe */
510static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = {
511 .master = &omap44xx_aess_hwmod,
512 .slave = &omap44xx_l4_abe_hwmod,
513 .clk = "ocp_abe_iclk",
514 .user = OCP_USER_MPU | OCP_USER_SDMA,
515};
516
517/* dsp -> l4_abe */
518static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = {
519 .master = &omap44xx_dsp_hwmod,
520 .slave = &omap44xx_l4_abe_hwmod,
521 .clk = "ocp_abe_iclk",
522 .user = OCP_USER_MPU | OCP_USER_SDMA,
523};
524
525/* l3_main_1 -> l4_abe */
526static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = {
527 .master = &omap44xx_l3_main_1_hwmod,
528 .slave = &omap44xx_l4_abe_hwmod,
529 .clk = "l3_div_ck",
530 .user = OCP_USER_MPU | OCP_USER_SDMA,
531};
532
533/* mpu -> l4_abe */
534static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = {
535 .master = &omap44xx_mpu_hwmod,
536 .slave = &omap44xx_l4_abe_hwmod,
537 .clk = "ocp_abe_iclk",
538 .user = OCP_USER_MPU | OCP_USER_SDMA,
539};
540
541/* l4_abe slave ports */
542static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = {
543 &omap44xx_aess__l4_abe,
544 &omap44xx_dsp__l4_abe,
545 &omap44xx_l3_main_1__l4_abe,
546 &omap44xx_mpu__l4_abe,
547};
548
549static struct omap_hwmod omap44xx_l4_abe_hwmod = { 179static struct omap_hwmod omap44xx_l4_abe_hwmod = {
550 .name = "l4_abe", 180 .name = "l4_abe",
551 .class = &omap44xx_l4_hwmod_class, 181 .class = &omap44xx_l4_hwmod_class,
@@ -555,24 +185,9 @@ static struct omap_hwmod omap44xx_l4_abe_hwmod = {
555 .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET, 185 .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET,
556 }, 186 },
557 }, 187 },
558 .slaves = omap44xx_l4_abe_slaves,
559 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_abe_slaves),
560}; 188};
561 189
562/* l4_cfg */ 190/* l4_cfg */
563/* l3_main_1 -> l4_cfg */
564static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
565 .master = &omap44xx_l3_main_1_hwmod,
566 .slave = &omap44xx_l4_cfg_hwmod,
567 .clk = "l3_div_ck",
568 .user = OCP_USER_MPU | OCP_USER_SDMA,
569};
570
571/* l4_cfg slave ports */
572static struct omap_hwmod_ocp_if *omap44xx_l4_cfg_slaves[] = {
573 &omap44xx_l3_main_1__l4_cfg,
574};
575
576static struct omap_hwmod omap44xx_l4_cfg_hwmod = { 191static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
577 .name = "l4_cfg", 192 .name = "l4_cfg",
578 .class = &omap44xx_l4_hwmod_class, 193 .class = &omap44xx_l4_hwmod_class,
@@ -583,24 +198,9 @@ static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
583 .context_offs = OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET, 198 .context_offs = OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
584 }, 199 },
585 }, 200 },
586 .slaves = omap44xx_l4_cfg_slaves,
587 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_cfg_slaves),
588}; 201};
589 202
590/* l4_per */ 203/* l4_per */
591/* l3_main_2 -> l4_per */
592static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = {
593 .master = &omap44xx_l3_main_2_hwmod,
594 .slave = &omap44xx_l4_per_hwmod,
595 .clk = "l3_div_ck",
596 .user = OCP_USER_MPU | OCP_USER_SDMA,
597};
598
599/* l4_per slave ports */
600static struct omap_hwmod_ocp_if *omap44xx_l4_per_slaves[] = {
601 &omap44xx_l3_main_2__l4_per,
602};
603
604static struct omap_hwmod omap44xx_l4_per_hwmod = { 204static struct omap_hwmod omap44xx_l4_per_hwmod = {
605 .name = "l4_per", 205 .name = "l4_per",
606 .class = &omap44xx_l4_hwmod_class, 206 .class = &omap44xx_l4_hwmod_class,
@@ -611,24 +211,9 @@ static struct omap_hwmod omap44xx_l4_per_hwmod = {
611 .context_offs = OMAP4_RM_L4PER_L4_PER_CONTEXT_OFFSET, 211 .context_offs = OMAP4_RM_L4PER_L4_PER_CONTEXT_OFFSET,
612 }, 212 },
613 }, 213 },
614 .slaves = omap44xx_l4_per_slaves,
615 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_per_slaves),
616}; 214};
617 215
618/* l4_wkup */ 216/* l4_wkup */
619/* l4_cfg -> l4_wkup */
620static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = {
621 .master = &omap44xx_l4_cfg_hwmod,
622 .slave = &omap44xx_l4_wkup_hwmod,
623 .clk = "l4_div_ck",
624 .user = OCP_USER_MPU | OCP_USER_SDMA,
625};
626
627/* l4_wkup slave ports */
628static struct omap_hwmod_ocp_if *omap44xx_l4_wkup_slaves[] = {
629 &omap44xx_l4_cfg__l4_wkup,
630};
631
632static struct omap_hwmod omap44xx_l4_wkup_hwmod = { 217static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
633 .name = "l4_wkup", 218 .name = "l4_wkup",
634 .class = &omap44xx_l4_hwmod_class, 219 .class = &omap44xx_l4_hwmod_class,
@@ -639,8 +224,6 @@ static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
639 .context_offs = OMAP4_RM_WKUP_L4WKUP_CONTEXT_OFFSET, 224 .context_offs = OMAP4_RM_WKUP_L4WKUP_CONTEXT_OFFSET,
640 }, 225 },
641 }, 226 },
642 .slaves = omap44xx_l4_wkup_slaves,
643 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_wkup_slaves),
644}; 227};
645 228
646/* 229/*
@@ -652,25 +235,10 @@ static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = {
652}; 235};
653 236
654/* mpu_private */ 237/* mpu_private */
655/* mpu -> mpu_private */
656static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
657 .master = &omap44xx_mpu_hwmod,
658 .slave = &omap44xx_mpu_private_hwmod,
659 .clk = "l3_div_ck",
660 .user = OCP_USER_MPU | OCP_USER_SDMA,
661};
662
663/* mpu_private slave ports */
664static struct omap_hwmod_ocp_if *omap44xx_mpu_private_slaves[] = {
665 &omap44xx_mpu__mpu_private,
666};
667
668static struct omap_hwmod omap44xx_mpu_private_hwmod = { 238static struct omap_hwmod omap44xx_mpu_private_hwmod = {
669 .name = "mpu_private", 239 .name = "mpu_private",
670 .class = &omap44xx_mpu_bus_hwmod_class, 240 .class = &omap44xx_mpu_bus_hwmod_class,
671 .clkdm_name = "mpuss_clkdm", 241 .clkdm_name = "mpuss_clkdm",
672 .slaves = omap44xx_mpu_private_slaves,
673 .slaves_cnt = ARRAY_SIZE(omap44xx_mpu_private_slaves),
674}; 242};
675 243
676/* 244/*
@@ -756,53 +324,6 @@ static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = {
756 { .dma_req = -1 } 324 { .dma_req = -1 }
757}; 325};
758 326
759/* aess master ports */
760static struct omap_hwmod_ocp_if *omap44xx_aess_masters[] = {
761 &omap44xx_aess__l4_abe,
762};
763
764static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = {
765 {
766 .pa_start = 0x401f1000,
767 .pa_end = 0x401f13ff,
768 .flags = ADDR_TYPE_RT
769 },
770 { }
771};
772
773/* l4_abe -> aess */
774static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = {
775 .master = &omap44xx_l4_abe_hwmod,
776 .slave = &omap44xx_aess_hwmod,
777 .clk = "ocp_abe_iclk",
778 .addr = omap44xx_aess_addrs,
779 .user = OCP_USER_MPU,
780};
781
782static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = {
783 {
784 .pa_start = 0x490f1000,
785 .pa_end = 0x490f13ff,
786 .flags = ADDR_TYPE_RT
787 },
788 { }
789};
790
791/* l4_abe -> aess (dma) */
792static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = {
793 .master = &omap44xx_l4_abe_hwmod,
794 .slave = &omap44xx_aess_hwmod,
795 .clk = "ocp_abe_iclk",
796 .addr = omap44xx_aess_dma_addrs,
797 .user = OCP_USER_SDMA,
798};
799
800/* aess slave ports */
801static struct omap_hwmod_ocp_if *omap44xx_aess_slaves[] = {
802 &omap44xx_l4_abe__aess,
803 &omap44xx_l4_abe__aess_dma,
804};
805
806static struct omap_hwmod omap44xx_aess_hwmod = { 327static struct omap_hwmod omap44xx_aess_hwmod = {
807 .name = "aess", 328 .name = "aess",
808 .class = &omap44xx_aess_hwmod_class, 329 .class = &omap44xx_aess_hwmod_class,
@@ -817,37 +338,6 @@ static struct omap_hwmod omap44xx_aess_hwmod = {
817 .modulemode = MODULEMODE_SWCTRL, 338 .modulemode = MODULEMODE_SWCTRL,
818 }, 339 },
819 }, 340 },
820 .slaves = omap44xx_aess_slaves,
821 .slaves_cnt = ARRAY_SIZE(omap44xx_aess_slaves),
822 .masters = omap44xx_aess_masters,
823 .masters_cnt = ARRAY_SIZE(omap44xx_aess_masters),
824};
825
826/*
827 * 'bandgap' class
828 * bangap reference for ldo regulators
829 */
830
831static struct omap_hwmod_class omap44xx_bandgap_hwmod_class = {
832 .name = "bandgap",
833};
834
835/* bandgap */
836static struct omap_hwmod_opt_clk bandgap_opt_clks[] = {
837 { .role = "fclk", .clk = "bandgap_fclk" },
838};
839
840static struct omap_hwmod omap44xx_bandgap_hwmod = {
841 .name = "bandgap",
842 .class = &omap44xx_bandgap_hwmod_class,
843 .clkdm_name = "l4_wkup_clkdm",
844 .prcm = {
845 .omap4 = {
846 .clkctrl_offs = OMAP4_CM_WKUP_BANDGAP_CLKCTRL_OFFSET,
847 },
848 },
849 .opt_clks = bandgap_opt_clks,
850 .opt_clks_cnt = ARRAY_SIZE(bandgap_opt_clks),
851}; 341};
852 342
853/* 343/*
@@ -870,30 +360,6 @@ static struct omap_hwmod_class omap44xx_counter_hwmod_class = {
870}; 360};
871 361
872/* counter_32k */ 362/* counter_32k */
873static struct omap_hwmod omap44xx_counter_32k_hwmod;
874static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = {
875 {
876 .pa_start = 0x4a304000,
877 .pa_end = 0x4a30401f,
878 .flags = ADDR_TYPE_RT
879 },
880 { }
881};
882
883/* l4_wkup -> counter_32k */
884static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = {
885 .master = &omap44xx_l4_wkup_hwmod,
886 .slave = &omap44xx_counter_32k_hwmod,
887 .clk = "l4_wkup_clk_mux_ck",
888 .addr = omap44xx_counter_32k_addrs,
889 .user = OCP_USER_MPU | OCP_USER_SDMA,
890};
891
892/* counter_32k slave ports */
893static struct omap_hwmod_ocp_if *omap44xx_counter_32k_slaves[] = {
894 &omap44xx_l4_wkup__counter_32k,
895};
896
897static struct omap_hwmod omap44xx_counter_32k_hwmod = { 363static struct omap_hwmod omap44xx_counter_32k_hwmod = {
898 .name = "counter_32k", 364 .name = "counter_32k",
899 .class = &omap44xx_counter_hwmod_class, 365 .class = &omap44xx_counter_hwmod_class,
@@ -906,8 +372,6 @@ static struct omap_hwmod omap44xx_counter_32k_hwmod = {
906 .context_offs = OMAP4_RM_WKUP_SYNCTIMER_CONTEXT_OFFSET, 372 .context_offs = OMAP4_RM_WKUP_SYNCTIMER_CONTEXT_OFFSET,
907 }, 373 },
908 }, 374 },
909 .slaves = omap44xx_counter_32k_slaves,
910 .slaves_cnt = ARRAY_SIZE(omap44xx_counter_32k_slaves),
911}; 375};
912 376
913/* 377/*
@@ -950,34 +414,6 @@ static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = {
950 { .irq = -1 } 414 { .irq = -1 }
951}; 415};
952 416
953/* dma_system master ports */
954static struct omap_hwmod_ocp_if *omap44xx_dma_system_masters[] = {
955 &omap44xx_dma_system__l3_main_2,
956};
957
958static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
959 {
960 .pa_start = 0x4a056000,
961 .pa_end = 0x4a056fff,
962 .flags = ADDR_TYPE_RT
963 },
964 { }
965};
966
967/* l4_cfg -> dma_system */
968static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
969 .master = &omap44xx_l4_cfg_hwmod,
970 .slave = &omap44xx_dma_system_hwmod,
971 .clk = "l4_div_ck",
972 .addr = omap44xx_dma_system_addrs,
973 .user = OCP_USER_MPU | OCP_USER_SDMA,
974};
975
976/* dma_system slave ports */
977static struct omap_hwmod_ocp_if *omap44xx_dma_system_slaves[] = {
978 &omap44xx_l4_cfg__dma_system,
979};
980
981static struct omap_hwmod omap44xx_dma_system_hwmod = { 417static struct omap_hwmod omap44xx_dma_system_hwmod = {
982 .name = "dma_system", 418 .name = "dma_system",
983 .class = &omap44xx_dma_hwmod_class, 419 .class = &omap44xx_dma_hwmod_class,
@@ -991,10 +427,6 @@ static struct omap_hwmod omap44xx_dma_system_hwmod = {
991 }, 427 },
992 }, 428 },
993 .dev_attr = &dma_dev_attr, 429 .dev_attr = &dma_dev_attr,
994 .slaves = omap44xx_dma_system_slaves,
995 .slaves_cnt = ARRAY_SIZE(omap44xx_dma_system_slaves),
996 .masters = omap44xx_dma_system_masters,
997 .masters_cnt = ARRAY_SIZE(omap44xx_dma_system_masters),
998}; 430};
999 431
1000/* 432/*
@@ -1018,7 +450,6 @@ static struct omap_hwmod_class omap44xx_dmic_hwmod_class = {
1018}; 450};
1019 451
1020/* dmic */ 452/* dmic */
1021static struct omap_hwmod omap44xx_dmic_hwmod;
1022static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = { 453static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = {
1023 { .irq = 114 + OMAP44XX_IRQ_GIC_START }, 454 { .irq = 114 + OMAP44XX_IRQ_GIC_START },
1024 { .irq = -1 } 455 { .irq = -1 }
@@ -1029,50 +460,6 @@ static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = {
1029 { .dma_req = -1 } 460 { .dma_req = -1 }
1030}; 461};
1031 462
1032static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = {
1033 {
1034 .name = "mpu",
1035 .pa_start = 0x4012e000,
1036 .pa_end = 0x4012e07f,
1037 .flags = ADDR_TYPE_RT
1038 },
1039 { }
1040};
1041
1042/* l4_abe -> dmic */
1043static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = {
1044 .master = &omap44xx_l4_abe_hwmod,
1045 .slave = &omap44xx_dmic_hwmod,
1046 .clk = "ocp_abe_iclk",
1047 .addr = omap44xx_dmic_addrs,
1048 .user = OCP_USER_MPU,
1049};
1050
1051static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = {
1052 {
1053 .name = "dma",
1054 .pa_start = 0x4902e000,
1055 .pa_end = 0x4902e07f,
1056 .flags = ADDR_TYPE_RT
1057 },
1058 { }
1059};
1060
1061/* l4_abe -> dmic (dma) */
1062static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = {
1063 .master = &omap44xx_l4_abe_hwmod,
1064 .slave = &omap44xx_dmic_hwmod,
1065 .clk = "ocp_abe_iclk",
1066 .addr = omap44xx_dmic_dma_addrs,
1067 .user = OCP_USER_SDMA,
1068};
1069
1070/* dmic slave ports */
1071static struct omap_hwmod_ocp_if *omap44xx_dmic_slaves[] = {
1072 &omap44xx_l4_abe__dmic,
1073 &omap44xx_l4_abe__dmic_dma,
1074};
1075
1076static struct omap_hwmod omap44xx_dmic_hwmod = { 463static struct omap_hwmod omap44xx_dmic_hwmod = {
1077 .name = "dmic", 464 .name = "dmic",
1078 .class = &omap44xx_dmic_hwmod_class, 465 .class = &omap44xx_dmic_hwmod_class,
@@ -1087,8 +474,6 @@ static struct omap_hwmod omap44xx_dmic_hwmod = {
1087 .modulemode = MODULEMODE_SWCTRL, 474 .modulemode = MODULEMODE_SWCTRL,
1088 }, 475 },
1089 }, 476 },
1090 .slaves = omap44xx_dmic_slaves,
1091 .slaves_cnt = ARRAY_SIZE(omap44xx_dmic_slaves),
1092}; 477};
1093 478
1094/* 479/*
@@ -1107,53 +492,8 @@ static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = {
1107}; 492};
1108 493
1109static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = { 494static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = {
1110 { .name = "mmu_cache", .rst_shift = 1 },
1111};
1112
1113static struct omap_hwmod_rst_info omap44xx_dsp_c0_resets[] = {
1114 { .name = "dsp", .rst_shift = 0 }, 495 { .name = "dsp", .rst_shift = 0 },
1115}; 496 { .name = "mmu_cache", .rst_shift = 1 },
1116
1117/* dsp -> iva */
1118static struct omap_hwmod_ocp_if omap44xx_dsp__iva = {
1119 .master = &omap44xx_dsp_hwmod,
1120 .slave = &omap44xx_iva_hwmod,
1121 .clk = "dpll_iva_m5x2_ck",
1122};
1123
1124/* dsp master ports */
1125static struct omap_hwmod_ocp_if *omap44xx_dsp_masters[] = {
1126 &omap44xx_dsp__l3_main_1,
1127 &omap44xx_dsp__l4_abe,
1128 &omap44xx_dsp__iva,
1129};
1130
1131/* l4_cfg -> dsp */
1132static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dsp = {
1133 .master = &omap44xx_l4_cfg_hwmod,
1134 .slave = &omap44xx_dsp_hwmod,
1135 .clk = "l4_div_ck",
1136 .user = OCP_USER_MPU | OCP_USER_SDMA,
1137};
1138
1139/* dsp slave ports */
1140static struct omap_hwmod_ocp_if *omap44xx_dsp_slaves[] = {
1141 &omap44xx_l4_cfg__dsp,
1142};
1143
1144/* Pseudo hwmod for reset control purpose only */
1145static struct omap_hwmod omap44xx_dsp_c0_hwmod = {
1146 .name = "dsp_c0",
1147 .class = &omap44xx_dsp_hwmod_class,
1148 .clkdm_name = "tesla_clkdm",
1149 .flags = HWMOD_INIT_NO_RESET,
1150 .rst_lines = omap44xx_dsp_c0_resets,
1151 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_c0_resets),
1152 .prcm = {
1153 .omap4 = {
1154 .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
1155 },
1156 },
1157}; 497};
1158 498
1159static struct omap_hwmod omap44xx_dsp_hwmod = { 499static struct omap_hwmod omap44xx_dsp_hwmod = {
@@ -1172,10 +512,6 @@ static struct omap_hwmod omap44xx_dsp_hwmod = {
1172 .modulemode = MODULEMODE_HWCTRL, 512 .modulemode = MODULEMODE_HWCTRL,
1173 }, 513 },
1174 }, 514 },
1175 .slaves = omap44xx_dsp_slaves,
1176 .slaves_cnt = ARRAY_SIZE(omap44xx_dsp_slaves),
1177 .masters = omap44xx_dsp_masters,
1178 .masters_cnt = ARRAY_SIZE(omap44xx_dsp_masters),
1179}; 515};
1180 516
1181/* 517/*
@@ -1196,53 +532,6 @@ static struct omap_hwmod_class omap44xx_dss_hwmod_class = {
1196}; 532};
1197 533
1198/* dss */ 534/* dss */
1199/* dss master ports */
1200static struct omap_hwmod_ocp_if *omap44xx_dss_masters[] = {
1201 &omap44xx_dss__l3_main_1,
1202};
1203
1204static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = {
1205 {
1206 .pa_start = 0x58000000,
1207 .pa_end = 0x5800007f,
1208 .flags = ADDR_TYPE_RT
1209 },
1210 { }
1211};
1212
1213/* l3_main_2 -> dss */
1214static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = {
1215 .master = &omap44xx_l3_main_2_hwmod,
1216 .slave = &omap44xx_dss_hwmod,
1217 .clk = "dss_fck",
1218 .addr = omap44xx_dss_dma_addrs,
1219 .user = OCP_USER_SDMA,
1220};
1221
1222static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = {
1223 {
1224 .pa_start = 0x48040000,
1225 .pa_end = 0x4804007f,
1226 .flags = ADDR_TYPE_RT
1227 },
1228 { }
1229};
1230
1231/* l4_per -> dss */
1232static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = {
1233 .master = &omap44xx_l4_per_hwmod,
1234 .slave = &omap44xx_dss_hwmod,
1235 .clk = "l4_div_ck",
1236 .addr = omap44xx_dss_addrs,
1237 .user = OCP_USER_MPU,
1238};
1239
1240/* dss slave ports */
1241static struct omap_hwmod_ocp_if *omap44xx_dss_slaves[] = {
1242 &omap44xx_l3_main_2__dss,
1243 &omap44xx_l4_per__dss,
1244};
1245
1246static struct omap_hwmod_opt_clk dss_opt_clks[] = { 535static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1247 { .role = "sys_clk", .clk = "dss_sys_clk" }, 536 { .role = "sys_clk", .clk = "dss_sys_clk" },
1248 { .role = "tv_clk", .clk = "dss_tv_clk" }, 537 { .role = "tv_clk", .clk = "dss_tv_clk" },
@@ -1263,10 +552,6 @@ static struct omap_hwmod omap44xx_dss_hwmod = {
1263 }, 552 },
1264 .opt_clks = dss_opt_clks, 553 .opt_clks = dss_opt_clks,
1265 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), 554 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1266 .slaves = omap44xx_dss_slaves,
1267 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_slaves),
1268 .masters = omap44xx_dss_masters,
1269 .masters_cnt = ARRAY_SIZE(omap44xx_dss_masters),
1270}; 555};
1271 556
1272/* 557/*
@@ -1293,7 +578,6 @@ static struct omap_hwmod_class omap44xx_dispc_hwmod_class = {
1293}; 578};
1294 579
1295/* dss_dispc */ 580/* dss_dispc */
1296static struct omap_hwmod omap44xx_dss_dispc_hwmod;
1297static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = { 581static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = {
1298 { .irq = 25 + OMAP44XX_IRQ_GIC_START }, 582 { .irq = 25 + OMAP44XX_IRQ_GIC_START },
1299 { .irq = -1 } 583 { .irq = -1 }
@@ -1304,53 +588,11 @@ static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = {
1304 { .dma_req = -1 } 588 { .dma_req = -1 }
1305}; 589};
1306 590
1307static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = {
1308 {
1309 .pa_start = 0x58001000,
1310 .pa_end = 0x58001fff,
1311 .flags = ADDR_TYPE_RT
1312 },
1313 { }
1314};
1315
1316/* l3_main_2 -> dss_dispc */
1317static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = {
1318 .master = &omap44xx_l3_main_2_hwmod,
1319 .slave = &omap44xx_dss_dispc_hwmod,
1320 .clk = "dss_fck",
1321 .addr = omap44xx_dss_dispc_dma_addrs,
1322 .user = OCP_USER_SDMA,
1323};
1324
1325static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = {
1326 {
1327 .pa_start = 0x48041000,
1328 .pa_end = 0x48041fff,
1329 .flags = ADDR_TYPE_RT
1330 },
1331 { }
1332};
1333
1334static struct omap_dss_dispc_dev_attr omap44xx_dss_dispc_dev_attr = { 591static struct omap_dss_dispc_dev_attr omap44xx_dss_dispc_dev_attr = {
1335 .manager_count = 3, 592 .manager_count = 3,
1336 .has_framedonetv_irq = 1 593 .has_framedonetv_irq = 1
1337}; 594};
1338 595
1339/* l4_per -> dss_dispc */
1340static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = {
1341 .master = &omap44xx_l4_per_hwmod,
1342 .slave = &omap44xx_dss_dispc_hwmod,
1343 .clk = "l4_div_ck",
1344 .addr = omap44xx_dss_dispc_addrs,
1345 .user = OCP_USER_MPU,
1346};
1347
1348/* dss_dispc slave ports */
1349static struct omap_hwmod_ocp_if *omap44xx_dss_dispc_slaves[] = {
1350 &omap44xx_l3_main_2__dss_dispc,
1351 &omap44xx_l4_per__dss_dispc,
1352};
1353
1354static struct omap_hwmod omap44xx_dss_dispc_hwmod = { 596static struct omap_hwmod omap44xx_dss_dispc_hwmod = {
1355 .name = "dss_dispc", 597 .name = "dss_dispc",
1356 .class = &omap44xx_dispc_hwmod_class, 598 .class = &omap44xx_dispc_hwmod_class,
@@ -1364,8 +606,6 @@ static struct omap_hwmod omap44xx_dss_dispc_hwmod = {
1364 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET, 606 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
1365 }, 607 },
1366 }, 608 },
1367 .slaves = omap44xx_dss_dispc_slaves,
1368 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves),
1369 .dev_attr = &omap44xx_dss_dispc_dev_attr 609 .dev_attr = &omap44xx_dss_dispc_dev_attr
1370}; 610};
1371 611
@@ -1391,7 +631,6 @@ static struct omap_hwmod_class omap44xx_dsi_hwmod_class = {
1391}; 631};
1392 632
1393/* dss_dsi1 */ 633/* dss_dsi1 */
1394static struct omap_hwmod omap44xx_dss_dsi1_hwmod;
1395static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = { 634static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = {
1396 { .irq = 53 + OMAP44XX_IRQ_GIC_START }, 635 { .irq = 53 + OMAP44XX_IRQ_GIC_START },
1397 { .irq = -1 } 636 { .irq = -1 }
@@ -1402,48 +641,6 @@ static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = {
1402 { .dma_req = -1 } 641 { .dma_req = -1 }
1403}; 642};
1404 643
1405static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = {
1406 {
1407 .pa_start = 0x58004000,
1408 .pa_end = 0x580041ff,
1409 .flags = ADDR_TYPE_RT
1410 },
1411 { }
1412};
1413
1414/* l3_main_2 -> dss_dsi1 */
1415static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = {
1416 .master = &omap44xx_l3_main_2_hwmod,
1417 .slave = &omap44xx_dss_dsi1_hwmod,
1418 .clk = "dss_fck",
1419 .addr = omap44xx_dss_dsi1_dma_addrs,
1420 .user = OCP_USER_SDMA,
1421};
1422
1423static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = {
1424 {
1425 .pa_start = 0x48044000,
1426 .pa_end = 0x480441ff,
1427 .flags = ADDR_TYPE_RT
1428 },
1429 { }
1430};
1431
1432/* l4_per -> dss_dsi1 */
1433static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = {
1434 .master = &omap44xx_l4_per_hwmod,
1435 .slave = &omap44xx_dss_dsi1_hwmod,
1436 .clk = "l4_div_ck",
1437 .addr = omap44xx_dss_dsi1_addrs,
1438 .user = OCP_USER_MPU,
1439};
1440
1441/* dss_dsi1 slave ports */
1442static struct omap_hwmod_ocp_if *omap44xx_dss_dsi1_slaves[] = {
1443 &omap44xx_l3_main_2__dss_dsi1,
1444 &omap44xx_l4_per__dss_dsi1,
1445};
1446
1447static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = { 644static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
1448 { .role = "sys_clk", .clk = "dss_sys_clk" }, 645 { .role = "sys_clk", .clk = "dss_sys_clk" },
1449}; 646};
@@ -1463,12 +660,9 @@ static struct omap_hwmod omap44xx_dss_dsi1_hwmod = {
1463 }, 660 },
1464 .opt_clks = dss_dsi1_opt_clks, 661 .opt_clks = dss_dsi1_opt_clks,
1465 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks), 662 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
1466 .slaves = omap44xx_dss_dsi1_slaves,
1467 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_slaves),
1468}; 663};
1469 664
1470/* dss_dsi2 */ 665/* dss_dsi2 */
1471static struct omap_hwmod omap44xx_dss_dsi2_hwmod;
1472static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = { 666static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = {
1473 { .irq = 84 + OMAP44XX_IRQ_GIC_START }, 667 { .irq = 84 + OMAP44XX_IRQ_GIC_START },
1474 { .irq = -1 } 668 { .irq = -1 }
@@ -1479,48 +673,6 @@ static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = {
1479 { .dma_req = -1 } 673 { .dma_req = -1 }
1480}; 674};
1481 675
1482static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = {
1483 {
1484 .pa_start = 0x58005000,
1485 .pa_end = 0x580051ff,
1486 .flags = ADDR_TYPE_RT
1487 },
1488 { }
1489};
1490
1491/* l3_main_2 -> dss_dsi2 */
1492static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = {
1493 .master = &omap44xx_l3_main_2_hwmod,
1494 .slave = &omap44xx_dss_dsi2_hwmod,
1495 .clk = "dss_fck",
1496 .addr = omap44xx_dss_dsi2_dma_addrs,
1497 .user = OCP_USER_SDMA,
1498};
1499
1500static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = {
1501 {
1502 .pa_start = 0x48045000,
1503 .pa_end = 0x480451ff,
1504 .flags = ADDR_TYPE_RT
1505 },
1506 { }
1507};
1508
1509/* l4_per -> dss_dsi2 */
1510static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = {
1511 .master = &omap44xx_l4_per_hwmod,
1512 .slave = &omap44xx_dss_dsi2_hwmod,
1513 .clk = "l4_div_ck",
1514 .addr = omap44xx_dss_dsi2_addrs,
1515 .user = OCP_USER_MPU,
1516};
1517
1518/* dss_dsi2 slave ports */
1519static struct omap_hwmod_ocp_if *omap44xx_dss_dsi2_slaves[] = {
1520 &omap44xx_l3_main_2__dss_dsi2,
1521 &omap44xx_l4_per__dss_dsi2,
1522};
1523
1524static struct omap_hwmod_opt_clk dss_dsi2_opt_clks[] = { 676static struct omap_hwmod_opt_clk dss_dsi2_opt_clks[] = {
1525 { .role = "sys_clk", .clk = "dss_sys_clk" }, 677 { .role = "sys_clk", .clk = "dss_sys_clk" },
1526}; 678};
@@ -1540,8 +692,6 @@ static struct omap_hwmod omap44xx_dss_dsi2_hwmod = {
1540 }, 692 },
1541 .opt_clks = dss_dsi2_opt_clks, 693 .opt_clks = dss_dsi2_opt_clks,
1542 .opt_clks_cnt = ARRAY_SIZE(dss_dsi2_opt_clks), 694 .opt_clks_cnt = ARRAY_SIZE(dss_dsi2_opt_clks),
1543 .slaves = omap44xx_dss_dsi2_slaves,
1544 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_slaves),
1545}; 695};
1546 696
1547/* 697/*
@@ -1565,7 +715,6 @@ static struct omap_hwmod_class omap44xx_hdmi_hwmod_class = {
1565}; 715};
1566 716
1567/* dss_hdmi */ 717/* dss_hdmi */
1568static struct omap_hwmod omap44xx_dss_hdmi_hwmod;
1569static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = { 718static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = {
1570 { .irq = 101 + OMAP44XX_IRQ_GIC_START }, 719 { .irq = 101 + OMAP44XX_IRQ_GIC_START },
1571 { .irq = -1 } 720 { .irq = -1 }
@@ -1576,48 +725,6 @@ static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = {
1576 { .dma_req = -1 } 725 { .dma_req = -1 }
1577}; 726};
1578 727
1579static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = {
1580 {
1581 .pa_start = 0x58006000,
1582 .pa_end = 0x58006fff,
1583 .flags = ADDR_TYPE_RT
1584 },
1585 { }
1586};
1587
1588/* l3_main_2 -> dss_hdmi */
1589static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = {
1590 .master = &omap44xx_l3_main_2_hwmod,
1591 .slave = &omap44xx_dss_hdmi_hwmod,
1592 .clk = "dss_fck",
1593 .addr = omap44xx_dss_hdmi_dma_addrs,
1594 .user = OCP_USER_SDMA,
1595};
1596
1597static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = {
1598 {
1599 .pa_start = 0x48046000,
1600 .pa_end = 0x48046fff,
1601 .flags = ADDR_TYPE_RT
1602 },
1603 { }
1604};
1605
1606/* l4_per -> dss_hdmi */
1607static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = {
1608 .master = &omap44xx_l4_per_hwmod,
1609 .slave = &omap44xx_dss_hdmi_hwmod,
1610 .clk = "l4_div_ck",
1611 .addr = omap44xx_dss_hdmi_addrs,
1612 .user = OCP_USER_MPU,
1613};
1614
1615/* dss_hdmi slave ports */
1616static struct omap_hwmod_ocp_if *omap44xx_dss_hdmi_slaves[] = {
1617 &omap44xx_l3_main_2__dss_hdmi,
1618 &omap44xx_l4_per__dss_hdmi,
1619};
1620
1621static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = { 728static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
1622 { .role = "sys_clk", .clk = "dss_sys_clk" }, 729 { .role = "sys_clk", .clk = "dss_sys_clk" },
1623}; 730};
@@ -1637,8 +744,6 @@ static struct omap_hwmod omap44xx_dss_hdmi_hwmod = {
1637 }, 744 },
1638 .opt_clks = dss_hdmi_opt_clks, 745 .opt_clks = dss_hdmi_opt_clks,
1639 .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks), 746 .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
1640 .slaves = omap44xx_dss_hdmi_slaves,
1641 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_slaves),
1642}; 747};
1643 748
1644/* 749/*
@@ -1662,54 +767,11 @@ static struct omap_hwmod_class omap44xx_rfbi_hwmod_class = {
1662}; 767};
1663 768
1664/* dss_rfbi */ 769/* dss_rfbi */
1665static struct omap_hwmod omap44xx_dss_rfbi_hwmod;
1666static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = { 770static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = {
1667 { .dma_req = 13 + OMAP44XX_DMA_REQ_START }, 771 { .dma_req = 13 + OMAP44XX_DMA_REQ_START },
1668 { .dma_req = -1 } 772 { .dma_req = -1 }
1669}; 773};
1670 774
1671static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = {
1672 {
1673 .pa_start = 0x58002000,
1674 .pa_end = 0x580020ff,
1675 .flags = ADDR_TYPE_RT
1676 },
1677 { }
1678};
1679
1680/* l3_main_2 -> dss_rfbi */
1681static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = {
1682 .master = &omap44xx_l3_main_2_hwmod,
1683 .slave = &omap44xx_dss_rfbi_hwmod,
1684 .clk = "dss_fck",
1685 .addr = omap44xx_dss_rfbi_dma_addrs,
1686 .user = OCP_USER_SDMA,
1687};
1688
1689static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = {
1690 {
1691 .pa_start = 0x48042000,
1692 .pa_end = 0x480420ff,
1693 .flags = ADDR_TYPE_RT
1694 },
1695 { }
1696};
1697
1698/* l4_per -> dss_rfbi */
1699static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = {
1700 .master = &omap44xx_l4_per_hwmod,
1701 .slave = &omap44xx_dss_rfbi_hwmod,
1702 .clk = "l4_div_ck",
1703 .addr = omap44xx_dss_rfbi_addrs,
1704 .user = OCP_USER_MPU,
1705};
1706
1707/* dss_rfbi slave ports */
1708static struct omap_hwmod_ocp_if *omap44xx_dss_rfbi_slaves[] = {
1709 &omap44xx_l3_main_2__dss_rfbi,
1710 &omap44xx_l4_per__dss_rfbi,
1711};
1712
1713static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { 775static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1714 { .role = "ick", .clk = "dss_fck" }, 776 { .role = "ick", .clk = "dss_fck" },
1715}; 777};
@@ -1728,8 +790,6 @@ static struct omap_hwmod omap44xx_dss_rfbi_hwmod = {
1728 }, 790 },
1729 .opt_clks = dss_rfbi_opt_clks, 791 .opt_clks = dss_rfbi_opt_clks,
1730 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), 792 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
1731 .slaves = omap44xx_dss_rfbi_slaves,
1732 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_slaves),
1733}; 793};
1734 794
1735/* 795/*
@@ -1742,49 +802,6 @@ static struct omap_hwmod_class omap44xx_venc_hwmod_class = {
1742}; 802};
1743 803
1744/* dss_venc */ 804/* dss_venc */
1745static struct omap_hwmod omap44xx_dss_venc_hwmod;
1746static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = {
1747 {
1748 .pa_start = 0x58003000,
1749 .pa_end = 0x580030ff,
1750 .flags = ADDR_TYPE_RT
1751 },
1752 { }
1753};
1754
1755/* l3_main_2 -> dss_venc */
1756static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = {
1757 .master = &omap44xx_l3_main_2_hwmod,
1758 .slave = &omap44xx_dss_venc_hwmod,
1759 .clk = "dss_fck",
1760 .addr = omap44xx_dss_venc_dma_addrs,
1761 .user = OCP_USER_SDMA,
1762};
1763
1764static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = {
1765 {
1766 .pa_start = 0x48043000,
1767 .pa_end = 0x480430ff,
1768 .flags = ADDR_TYPE_RT
1769 },
1770 { }
1771};
1772
1773/* l4_per -> dss_venc */
1774static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = {
1775 .master = &omap44xx_l4_per_hwmod,
1776 .slave = &omap44xx_dss_venc_hwmod,
1777 .clk = "l4_div_ck",
1778 .addr = omap44xx_dss_venc_addrs,
1779 .user = OCP_USER_MPU,
1780};
1781
1782/* dss_venc slave ports */
1783static struct omap_hwmod_ocp_if *omap44xx_dss_venc_slaves[] = {
1784 &omap44xx_l3_main_2__dss_venc,
1785 &omap44xx_l4_per__dss_venc,
1786};
1787
1788static struct omap_hwmod omap44xx_dss_venc_hwmod = { 805static struct omap_hwmod omap44xx_dss_venc_hwmod = {
1789 .name = "dss_venc", 806 .name = "dss_venc",
1790 .class = &omap44xx_venc_hwmod_class, 807 .class = &omap44xx_venc_hwmod_class,
@@ -1796,8 +813,6 @@ static struct omap_hwmod omap44xx_dss_venc_hwmod = {
1796 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET, 813 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
1797 }, 814 },
1798 }, 815 },
1799 .slaves = omap44xx_dss_venc_slaves,
1800 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_venc_slaves),
1801}; 816};
1802 817
1803/* 818/*
@@ -1830,35 +845,11 @@ static struct omap_gpio_dev_attr gpio_dev_attr = {
1830}; 845};
1831 846
1832/* gpio1 */ 847/* gpio1 */
1833static struct omap_hwmod omap44xx_gpio1_hwmod;
1834static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = { 848static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = {
1835 { .irq = 29 + OMAP44XX_IRQ_GIC_START }, 849 { .irq = 29 + OMAP44XX_IRQ_GIC_START },
1836 { .irq = -1 } 850 { .irq = -1 }
1837}; 851};
1838 852
1839static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
1840 {
1841 .pa_start = 0x4a310000,
1842 .pa_end = 0x4a3101ff,
1843 .flags = ADDR_TYPE_RT
1844 },
1845 { }
1846};
1847
1848/* l4_wkup -> gpio1 */
1849static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = {
1850 .master = &omap44xx_l4_wkup_hwmod,
1851 .slave = &omap44xx_gpio1_hwmod,
1852 .clk = "l4_wkup_clk_mux_ck",
1853 .addr = omap44xx_gpio1_addrs,
1854 .user = OCP_USER_MPU | OCP_USER_SDMA,
1855};
1856
1857/* gpio1 slave ports */
1858static struct omap_hwmod_ocp_if *omap44xx_gpio1_slaves[] = {
1859 &omap44xx_l4_wkup__gpio1,
1860};
1861
1862static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { 853static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
1863 { .role = "dbclk", .clk = "gpio1_dbclk" }, 854 { .role = "dbclk", .clk = "gpio1_dbclk" },
1864}; 855};
@@ -1879,40 +870,14 @@ static struct omap_hwmod omap44xx_gpio1_hwmod = {
1879 .opt_clks = gpio1_opt_clks, 870 .opt_clks = gpio1_opt_clks,
1880 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks), 871 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
1881 .dev_attr = &gpio_dev_attr, 872 .dev_attr = &gpio_dev_attr,
1882 .slaves = omap44xx_gpio1_slaves,
1883 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio1_slaves),
1884}; 873};
1885 874
1886/* gpio2 */ 875/* gpio2 */
1887static struct omap_hwmod omap44xx_gpio2_hwmod;
1888static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = { 876static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = {
1889 { .irq = 30 + OMAP44XX_IRQ_GIC_START }, 877 { .irq = 30 + OMAP44XX_IRQ_GIC_START },
1890 { .irq = -1 } 878 { .irq = -1 }
1891}; 879};
1892 880
1893static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
1894 {
1895 .pa_start = 0x48055000,
1896 .pa_end = 0x480551ff,
1897 .flags = ADDR_TYPE_RT
1898 },
1899 { }
1900};
1901
1902/* l4_per -> gpio2 */
1903static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = {
1904 .master = &omap44xx_l4_per_hwmod,
1905 .slave = &omap44xx_gpio2_hwmod,
1906 .clk = "l4_div_ck",
1907 .addr = omap44xx_gpio2_addrs,
1908 .user = OCP_USER_MPU | OCP_USER_SDMA,
1909};
1910
1911/* gpio2 slave ports */
1912static struct omap_hwmod_ocp_if *omap44xx_gpio2_slaves[] = {
1913 &omap44xx_l4_per__gpio2,
1914};
1915
1916static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { 881static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
1917 { .role = "dbclk", .clk = "gpio2_dbclk" }, 882 { .role = "dbclk", .clk = "gpio2_dbclk" },
1918}; 883};
@@ -1934,40 +899,14 @@ static struct omap_hwmod omap44xx_gpio2_hwmod = {
1934 .opt_clks = gpio2_opt_clks, 899 .opt_clks = gpio2_opt_clks,
1935 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks), 900 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
1936 .dev_attr = &gpio_dev_attr, 901 .dev_attr = &gpio_dev_attr,
1937 .slaves = omap44xx_gpio2_slaves,
1938 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio2_slaves),
1939}; 902};
1940 903
1941/* gpio3 */ 904/* gpio3 */
1942static struct omap_hwmod omap44xx_gpio3_hwmod;
1943static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = { 905static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = {
1944 { .irq = 31 + OMAP44XX_IRQ_GIC_START }, 906 { .irq = 31 + OMAP44XX_IRQ_GIC_START },
1945 { .irq = -1 } 907 { .irq = -1 }
1946}; 908};
1947 909
1948static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
1949 {
1950 .pa_start = 0x48057000,
1951 .pa_end = 0x480571ff,
1952 .flags = ADDR_TYPE_RT
1953 },
1954 { }
1955};
1956
1957/* l4_per -> gpio3 */
1958static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = {
1959 .master = &omap44xx_l4_per_hwmod,
1960 .slave = &omap44xx_gpio3_hwmod,
1961 .clk = "l4_div_ck",
1962 .addr = omap44xx_gpio3_addrs,
1963 .user = OCP_USER_MPU | OCP_USER_SDMA,
1964};
1965
1966/* gpio3 slave ports */
1967static struct omap_hwmod_ocp_if *omap44xx_gpio3_slaves[] = {
1968 &omap44xx_l4_per__gpio3,
1969};
1970
1971static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { 910static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
1972 { .role = "dbclk", .clk = "gpio3_dbclk" }, 911 { .role = "dbclk", .clk = "gpio3_dbclk" },
1973}; 912};
@@ -1989,40 +928,14 @@ static struct omap_hwmod omap44xx_gpio3_hwmod = {
1989 .opt_clks = gpio3_opt_clks, 928 .opt_clks = gpio3_opt_clks,
1990 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks), 929 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
1991 .dev_attr = &gpio_dev_attr, 930 .dev_attr = &gpio_dev_attr,
1992 .slaves = omap44xx_gpio3_slaves,
1993 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio3_slaves),
1994}; 931};
1995 932
1996/* gpio4 */ 933/* gpio4 */
1997static struct omap_hwmod omap44xx_gpio4_hwmod;
1998static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = { 934static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = {
1999 { .irq = 32 + OMAP44XX_IRQ_GIC_START }, 935 { .irq = 32 + OMAP44XX_IRQ_GIC_START },
2000 { .irq = -1 } 936 { .irq = -1 }
2001}; 937};
2002 938
2003static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
2004 {
2005 .pa_start = 0x48059000,
2006 .pa_end = 0x480591ff,
2007 .flags = ADDR_TYPE_RT
2008 },
2009 { }
2010};
2011
2012/* l4_per -> gpio4 */
2013static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = {
2014 .master = &omap44xx_l4_per_hwmod,
2015 .slave = &omap44xx_gpio4_hwmod,
2016 .clk = "l4_div_ck",
2017 .addr = omap44xx_gpio4_addrs,
2018 .user = OCP_USER_MPU | OCP_USER_SDMA,
2019};
2020
2021/* gpio4 slave ports */
2022static struct omap_hwmod_ocp_if *omap44xx_gpio4_slaves[] = {
2023 &omap44xx_l4_per__gpio4,
2024};
2025
2026static struct omap_hwmod_opt_clk gpio4_opt_clks[] = { 939static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
2027 { .role = "dbclk", .clk = "gpio4_dbclk" }, 940 { .role = "dbclk", .clk = "gpio4_dbclk" },
2028}; 941};
@@ -2044,40 +957,14 @@ static struct omap_hwmod omap44xx_gpio4_hwmod = {
2044 .opt_clks = gpio4_opt_clks, 957 .opt_clks = gpio4_opt_clks,
2045 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks), 958 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
2046 .dev_attr = &gpio_dev_attr, 959 .dev_attr = &gpio_dev_attr,
2047 .slaves = omap44xx_gpio4_slaves,
2048 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio4_slaves),
2049}; 960};
2050 961
2051/* gpio5 */ 962/* gpio5 */
2052static struct omap_hwmod omap44xx_gpio5_hwmod;
2053static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = { 963static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = {
2054 { .irq = 33 + OMAP44XX_IRQ_GIC_START }, 964 { .irq = 33 + OMAP44XX_IRQ_GIC_START },
2055 { .irq = -1 } 965 { .irq = -1 }
2056}; 966};
2057 967
2058static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
2059 {
2060 .pa_start = 0x4805b000,
2061 .pa_end = 0x4805b1ff,
2062 .flags = ADDR_TYPE_RT
2063 },
2064 { }
2065};
2066
2067/* l4_per -> gpio5 */
2068static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = {
2069 .master = &omap44xx_l4_per_hwmod,
2070 .slave = &omap44xx_gpio5_hwmod,
2071 .clk = "l4_div_ck",
2072 .addr = omap44xx_gpio5_addrs,
2073 .user = OCP_USER_MPU | OCP_USER_SDMA,
2074};
2075
2076/* gpio5 slave ports */
2077static struct omap_hwmod_ocp_if *omap44xx_gpio5_slaves[] = {
2078 &omap44xx_l4_per__gpio5,
2079};
2080
2081static struct omap_hwmod_opt_clk gpio5_opt_clks[] = { 968static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
2082 { .role = "dbclk", .clk = "gpio5_dbclk" }, 969 { .role = "dbclk", .clk = "gpio5_dbclk" },
2083}; 970};
@@ -2099,40 +986,14 @@ static struct omap_hwmod omap44xx_gpio5_hwmod = {
2099 .opt_clks = gpio5_opt_clks, 986 .opt_clks = gpio5_opt_clks,
2100 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks), 987 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
2101 .dev_attr = &gpio_dev_attr, 988 .dev_attr = &gpio_dev_attr,
2102 .slaves = omap44xx_gpio5_slaves,
2103 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio5_slaves),
2104}; 989};
2105 990
2106/* gpio6 */ 991/* gpio6 */
2107static struct omap_hwmod omap44xx_gpio6_hwmod;
2108static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = { 992static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = {
2109 { .irq = 34 + OMAP44XX_IRQ_GIC_START }, 993 { .irq = 34 + OMAP44XX_IRQ_GIC_START },
2110 { .irq = -1 } 994 { .irq = -1 }
2111}; 995};
2112 996
2113static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
2114 {
2115 .pa_start = 0x4805d000,
2116 .pa_end = 0x4805d1ff,
2117 .flags = ADDR_TYPE_RT
2118 },
2119 { }
2120};
2121
2122/* l4_per -> gpio6 */
2123static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
2124 .master = &omap44xx_l4_per_hwmod,
2125 .slave = &omap44xx_gpio6_hwmod,
2126 .clk = "l4_div_ck",
2127 .addr = omap44xx_gpio6_addrs,
2128 .user = OCP_USER_MPU | OCP_USER_SDMA,
2129};
2130
2131/* gpio6 slave ports */
2132static struct omap_hwmod_ocp_if *omap44xx_gpio6_slaves[] = {
2133 &omap44xx_l4_per__gpio6,
2134};
2135
2136static struct omap_hwmod_opt_clk gpio6_opt_clks[] = { 997static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
2137 { .role = "dbclk", .clk = "gpio6_dbclk" }, 998 { .role = "dbclk", .clk = "gpio6_dbclk" },
2138}; 999};
@@ -2154,8 +1015,6 @@ static struct omap_hwmod omap44xx_gpio6_hwmod = {
2154 .opt_clks = gpio6_opt_clks, 1015 .opt_clks = gpio6_opt_clks,
2155 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks), 1016 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
2156 .dev_attr = &gpio_dev_attr, 1017 .dev_attr = &gpio_dev_attr,
2157 .slaves = omap44xx_gpio6_slaves,
2158 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio6_slaves),
2159}; 1018};
2160 1019
2161/* 1020/*
@@ -2190,34 +1049,6 @@ static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = {
2190 { .irq = -1 } 1049 { .irq = -1 }
2191}; 1050};
2192 1051
2193/* hsi master ports */
2194static struct omap_hwmod_ocp_if *omap44xx_hsi_masters[] = {
2195 &omap44xx_hsi__l3_main_2,
2196};
2197
2198static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = {
2199 {
2200 .pa_start = 0x4a058000,
2201 .pa_end = 0x4a05bfff,
2202 .flags = ADDR_TYPE_RT
2203 },
2204 { }
2205};
2206
2207/* l4_cfg -> hsi */
2208static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = {
2209 .master = &omap44xx_l4_cfg_hwmod,
2210 .slave = &omap44xx_hsi_hwmod,
2211 .clk = "l4_div_ck",
2212 .addr = omap44xx_hsi_addrs,
2213 .user = OCP_USER_MPU | OCP_USER_SDMA,
2214};
2215
2216/* hsi slave ports */
2217static struct omap_hwmod_ocp_if *omap44xx_hsi_slaves[] = {
2218 &omap44xx_l4_cfg__hsi,
2219};
2220
2221static struct omap_hwmod omap44xx_hsi_hwmod = { 1052static struct omap_hwmod omap44xx_hsi_hwmod = {
2222 .name = "hsi", 1053 .name = "hsi",
2223 .class = &omap44xx_hsi_hwmod_class, 1054 .class = &omap44xx_hsi_hwmod_class,
@@ -2231,10 +1062,6 @@ static struct omap_hwmod omap44xx_hsi_hwmod = {
2231 .modulemode = MODULEMODE_HWCTRL, 1062 .modulemode = MODULEMODE_HWCTRL,
2232 }, 1063 },
2233 }, 1064 },
2234 .slaves = omap44xx_hsi_slaves,
2235 .slaves_cnt = ARRAY_SIZE(omap44xx_hsi_slaves),
2236 .masters = omap44xx_hsi_masters,
2237 .masters_cnt = ARRAY_SIZE(omap44xx_hsi_masters),
2238}; 1065};
2239 1066
2240/* 1067/*
@@ -2266,7 +1093,6 @@ static struct omap_i2c_dev_attr i2c_dev_attr = {
2266}; 1093};
2267 1094
2268/* i2c1 */ 1095/* i2c1 */
2269static struct omap_hwmod omap44xx_i2c1_hwmod;
2270static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = { 1096static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = {
2271 { .irq = 56 + OMAP44XX_IRQ_GIC_START }, 1097 { .irq = 56 + OMAP44XX_IRQ_GIC_START },
2272 { .irq = -1 } 1098 { .irq = -1 }
@@ -2278,29 +1104,6 @@ static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = {
2278 { .dma_req = -1 } 1104 { .dma_req = -1 }
2279}; 1105};
2280 1106
2281static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
2282 {
2283 .pa_start = 0x48070000,
2284 .pa_end = 0x480700ff,
2285 .flags = ADDR_TYPE_RT
2286 },
2287 { }
2288};
2289
2290/* l4_per -> i2c1 */
2291static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = {
2292 .master = &omap44xx_l4_per_hwmod,
2293 .slave = &omap44xx_i2c1_hwmod,
2294 .clk = "l4_div_ck",
2295 .addr = omap44xx_i2c1_addrs,
2296 .user = OCP_USER_MPU | OCP_USER_SDMA,
2297};
2298
2299/* i2c1 slave ports */
2300static struct omap_hwmod_ocp_if *omap44xx_i2c1_slaves[] = {
2301 &omap44xx_l4_per__i2c1,
2302};
2303
2304static struct omap_hwmod omap44xx_i2c1_hwmod = { 1107static struct omap_hwmod omap44xx_i2c1_hwmod = {
2305 .name = "i2c1", 1108 .name = "i2c1",
2306 .class = &omap44xx_i2c_hwmod_class, 1109 .class = &omap44xx_i2c_hwmod_class,
@@ -2316,13 +1119,10 @@ static struct omap_hwmod omap44xx_i2c1_hwmod = {
2316 .modulemode = MODULEMODE_SWCTRL, 1119 .modulemode = MODULEMODE_SWCTRL,
2317 }, 1120 },
2318 }, 1121 },
2319 .slaves = omap44xx_i2c1_slaves,
2320 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves),
2321 .dev_attr = &i2c_dev_attr, 1122 .dev_attr = &i2c_dev_attr,
2322}; 1123};
2323 1124
2324/* i2c2 */ 1125/* i2c2 */
2325static struct omap_hwmod omap44xx_i2c2_hwmod;
2326static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = { 1126static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = {
2327 { .irq = 57 + OMAP44XX_IRQ_GIC_START }, 1127 { .irq = 57 + OMAP44XX_IRQ_GIC_START },
2328 { .irq = -1 } 1128 { .irq = -1 }
@@ -2334,29 +1134,6 @@ static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = {
2334 { .dma_req = -1 } 1134 { .dma_req = -1 }
2335}; 1135};
2336 1136
2337static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
2338 {
2339 .pa_start = 0x48072000,
2340 .pa_end = 0x480720ff,
2341 .flags = ADDR_TYPE_RT
2342 },
2343 { }
2344};
2345
2346/* l4_per -> i2c2 */
2347static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = {
2348 .master = &omap44xx_l4_per_hwmod,
2349 .slave = &omap44xx_i2c2_hwmod,
2350 .clk = "l4_div_ck",
2351 .addr = omap44xx_i2c2_addrs,
2352 .user = OCP_USER_MPU | OCP_USER_SDMA,
2353};
2354
2355/* i2c2 slave ports */
2356static struct omap_hwmod_ocp_if *omap44xx_i2c2_slaves[] = {
2357 &omap44xx_l4_per__i2c2,
2358};
2359
2360static struct omap_hwmod omap44xx_i2c2_hwmod = { 1137static struct omap_hwmod omap44xx_i2c2_hwmod = {
2361 .name = "i2c2", 1138 .name = "i2c2",
2362 .class = &omap44xx_i2c_hwmod_class, 1139 .class = &omap44xx_i2c_hwmod_class,
@@ -2372,13 +1149,10 @@ static struct omap_hwmod omap44xx_i2c2_hwmod = {
2372 .modulemode = MODULEMODE_SWCTRL, 1149 .modulemode = MODULEMODE_SWCTRL,
2373 }, 1150 },
2374 }, 1151 },
2375 .slaves = omap44xx_i2c2_slaves,
2376 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves),
2377 .dev_attr = &i2c_dev_attr, 1152 .dev_attr = &i2c_dev_attr,
2378}; 1153};
2379 1154
2380/* i2c3 */ 1155/* i2c3 */
2381static struct omap_hwmod omap44xx_i2c3_hwmod;
2382static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = { 1156static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = {
2383 { .irq = 61 + OMAP44XX_IRQ_GIC_START }, 1157 { .irq = 61 + OMAP44XX_IRQ_GIC_START },
2384 { .irq = -1 } 1158 { .irq = -1 }
@@ -2390,29 +1164,6 @@ static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = {
2390 { .dma_req = -1 } 1164 { .dma_req = -1 }
2391}; 1165};
2392 1166
2393static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
2394 {
2395 .pa_start = 0x48060000,
2396 .pa_end = 0x480600ff,
2397 .flags = ADDR_TYPE_RT
2398 },
2399 { }
2400};
2401
2402/* l4_per -> i2c3 */
2403static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = {
2404 .master = &omap44xx_l4_per_hwmod,
2405 .slave = &omap44xx_i2c3_hwmod,
2406 .clk = "l4_div_ck",
2407 .addr = omap44xx_i2c3_addrs,
2408 .user = OCP_USER_MPU | OCP_USER_SDMA,
2409};
2410
2411/* i2c3 slave ports */
2412static struct omap_hwmod_ocp_if *omap44xx_i2c3_slaves[] = {
2413 &omap44xx_l4_per__i2c3,
2414};
2415
2416static struct omap_hwmod omap44xx_i2c3_hwmod = { 1167static struct omap_hwmod omap44xx_i2c3_hwmod = {
2417 .name = "i2c3", 1168 .name = "i2c3",
2418 .class = &omap44xx_i2c_hwmod_class, 1169 .class = &omap44xx_i2c_hwmod_class,
@@ -2428,13 +1179,10 @@ static struct omap_hwmod omap44xx_i2c3_hwmod = {
2428 .modulemode = MODULEMODE_SWCTRL, 1179 .modulemode = MODULEMODE_SWCTRL,
2429 }, 1180 },
2430 }, 1181 },
2431 .slaves = omap44xx_i2c3_slaves,
2432 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves),
2433 .dev_attr = &i2c_dev_attr, 1182 .dev_attr = &i2c_dev_attr,
2434}; 1183};
2435 1184
2436/* i2c4 */ 1185/* i2c4 */
2437static struct omap_hwmod omap44xx_i2c4_hwmod;
2438static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = { 1186static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = {
2439 { .irq = 62 + OMAP44XX_IRQ_GIC_START }, 1187 { .irq = 62 + OMAP44XX_IRQ_GIC_START },
2440 { .irq = -1 } 1188 { .irq = -1 }
@@ -2446,29 +1194,6 @@ static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = {
2446 { .dma_req = -1 } 1194 { .dma_req = -1 }
2447}; 1195};
2448 1196
2449static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
2450 {
2451 .pa_start = 0x48350000,
2452 .pa_end = 0x483500ff,
2453 .flags = ADDR_TYPE_RT
2454 },
2455 { }
2456};
2457
2458/* l4_per -> i2c4 */
2459static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = {
2460 .master = &omap44xx_l4_per_hwmod,
2461 .slave = &omap44xx_i2c4_hwmod,
2462 .clk = "l4_div_ck",
2463 .addr = omap44xx_i2c4_addrs,
2464 .user = OCP_USER_MPU | OCP_USER_SDMA,
2465};
2466
2467/* i2c4 slave ports */
2468static struct omap_hwmod_ocp_if *omap44xx_i2c4_slaves[] = {
2469 &omap44xx_l4_per__i2c4,
2470};
2471
2472static struct omap_hwmod omap44xx_i2c4_hwmod = { 1197static struct omap_hwmod omap44xx_i2c4_hwmod = {
2473 .name = "i2c4", 1198 .name = "i2c4",
2474 .class = &omap44xx_i2c_hwmod_class, 1199 .class = &omap44xx_i2c_hwmod_class,
@@ -2484,8 +1209,6 @@ static struct omap_hwmod omap44xx_i2c4_hwmod = {
2484 .modulemode = MODULEMODE_SWCTRL, 1209 .modulemode = MODULEMODE_SWCTRL,
2485 }, 1210 },
2486 }, 1211 },
2487 .slaves = omap44xx_i2c4_slaves,
2488 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves),
2489 .dev_attr = &i2c_dev_attr, 1212 .dev_attr = &i2c_dev_attr,
2490}; 1213};
2491 1214
@@ -2504,66 +1227,12 @@ static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = {
2504 { .irq = -1 } 1227 { .irq = -1 }
2505}; 1228};
2506 1229
2507static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = { 1230static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = {
2508 { .name = "cpu0", .rst_shift = 0 }, 1231 { .name = "cpu0", .rst_shift = 0 },
2509};
2510
2511static struct omap_hwmod_rst_info omap44xx_ipu_c1_resets[] = {
2512 { .name = "cpu1", .rst_shift = 1 }, 1232 { .name = "cpu1", .rst_shift = 1 },
2513};
2514
2515static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = {
2516 { .name = "mmu_cache", .rst_shift = 2 }, 1233 { .name = "mmu_cache", .rst_shift = 2 },
2517}; 1234};
2518 1235
2519/* ipu master ports */
2520static struct omap_hwmod_ocp_if *omap44xx_ipu_masters[] = {
2521 &omap44xx_ipu__l3_main_2,
2522};
2523
2524/* l3_main_2 -> ipu */
2525static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ipu = {
2526 .master = &omap44xx_l3_main_2_hwmod,
2527 .slave = &omap44xx_ipu_hwmod,
2528 .clk = "l3_div_ck",
2529 .user = OCP_USER_MPU | OCP_USER_SDMA,
2530};
2531
2532/* ipu slave ports */
2533static struct omap_hwmod_ocp_if *omap44xx_ipu_slaves[] = {
2534 &omap44xx_l3_main_2__ipu,
2535};
2536
2537/* Pseudo hwmod for reset control purpose only */
2538static struct omap_hwmod omap44xx_ipu_c0_hwmod = {
2539 .name = "ipu_c0",
2540 .class = &omap44xx_ipu_hwmod_class,
2541 .clkdm_name = "ducati_clkdm",
2542 .flags = HWMOD_INIT_NO_RESET,
2543 .rst_lines = omap44xx_ipu_c0_resets,
2544 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets),
2545 .prcm = {
2546 .omap4 = {
2547 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
2548 },
2549 },
2550};
2551
2552/* Pseudo hwmod for reset control purpose only */
2553static struct omap_hwmod omap44xx_ipu_c1_hwmod = {
2554 .name = "ipu_c1",
2555 .class = &omap44xx_ipu_hwmod_class,
2556 .clkdm_name = "ducati_clkdm",
2557 .flags = HWMOD_INIT_NO_RESET,
2558 .rst_lines = omap44xx_ipu_c1_resets,
2559 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets),
2560 .prcm = {
2561 .omap4 = {
2562 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
2563 },
2564 },
2565};
2566
2567static struct omap_hwmod omap44xx_ipu_hwmod = { 1236static struct omap_hwmod omap44xx_ipu_hwmod = {
2568 .name = "ipu", 1237 .name = "ipu",
2569 .class = &omap44xx_ipu_hwmod_class, 1238 .class = &omap44xx_ipu_hwmod_class,
@@ -2580,10 +1249,6 @@ static struct omap_hwmod omap44xx_ipu_hwmod = {
2580 .modulemode = MODULEMODE_HWCTRL, 1249 .modulemode = MODULEMODE_HWCTRL,
2581 }, 1250 },
2582 }, 1251 },
2583 .slaves = omap44xx_ipu_slaves,
2584 .slaves_cnt = ARRAY_SIZE(omap44xx_ipu_slaves),
2585 .masters = omap44xx_ipu_masters,
2586 .masters_cnt = ARRAY_SIZE(omap44xx_ipu_masters),
2587}; 1252};
2588 1253
2589/* 1254/*
@@ -2630,34 +1295,6 @@ static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = {
2630 { .dma_req = -1 } 1295 { .dma_req = -1 }
2631}; 1296};
2632 1297
2633/* iss master ports */
2634static struct omap_hwmod_ocp_if *omap44xx_iss_masters[] = {
2635 &omap44xx_iss__l3_main_2,
2636};
2637
2638static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = {
2639 {
2640 .pa_start = 0x52000000,
2641 .pa_end = 0x520000ff,
2642 .flags = ADDR_TYPE_RT
2643 },
2644 { }
2645};
2646
2647/* l3_main_2 -> iss */
2648static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = {
2649 .master = &omap44xx_l3_main_2_hwmod,
2650 .slave = &omap44xx_iss_hwmod,
2651 .clk = "l3_div_ck",
2652 .addr = omap44xx_iss_addrs,
2653 .user = OCP_USER_MPU | OCP_USER_SDMA,
2654};
2655
2656/* iss slave ports */
2657static struct omap_hwmod_ocp_if *omap44xx_iss_slaves[] = {
2658 &omap44xx_l3_main_2__iss,
2659};
2660
2661static struct omap_hwmod_opt_clk iss_opt_clks[] = { 1298static struct omap_hwmod_opt_clk iss_opt_clks[] = {
2662 { .role = "ctrlclk", .clk = "iss_ctrlclk" }, 1299 { .role = "ctrlclk", .clk = "iss_ctrlclk" },
2663}; 1300};
@@ -2678,10 +1315,6 @@ static struct omap_hwmod omap44xx_iss_hwmod = {
2678 }, 1315 },
2679 .opt_clks = iss_opt_clks, 1316 .opt_clks = iss_opt_clks,
2680 .opt_clks_cnt = ARRAY_SIZE(iss_opt_clks), 1317 .opt_clks_cnt = ARRAY_SIZE(iss_opt_clks),
2681 .slaves = omap44xx_iss_slaves,
2682 .slaves_cnt = ARRAY_SIZE(omap44xx_iss_slaves),
2683 .masters = omap44xx_iss_masters,
2684 .masters_cnt = ARRAY_SIZE(omap44xx_iss_masters),
2685}; 1318};
2686 1319
2687/* 1320/*
@@ -2702,75 +1335,9 @@ static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = {
2702}; 1335};
2703 1336
2704static struct omap_hwmod_rst_info omap44xx_iva_resets[] = { 1337static struct omap_hwmod_rst_info omap44xx_iva_resets[] = {
2705 { .name = "logic", .rst_shift = 2 },
2706};
2707
2708static struct omap_hwmod_rst_info omap44xx_iva_seq0_resets[] = {
2709 { .name = "seq0", .rst_shift = 0 }, 1338 { .name = "seq0", .rst_shift = 0 },
2710};
2711
2712static struct omap_hwmod_rst_info omap44xx_iva_seq1_resets[] = {
2713 { .name = "seq1", .rst_shift = 1 }, 1339 { .name = "seq1", .rst_shift = 1 },
2714}; 1340 { .name = "logic", .rst_shift = 2 },
2715
2716/* iva master ports */
2717static struct omap_hwmod_ocp_if *omap44xx_iva_masters[] = {
2718 &omap44xx_iva__l3_main_2,
2719 &omap44xx_iva__l3_instr,
2720};
2721
2722static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
2723 {
2724 .pa_start = 0x5a000000,
2725 .pa_end = 0x5a07ffff,
2726 .flags = ADDR_TYPE_RT
2727 },
2728 { }
2729};
2730
2731/* l3_main_2 -> iva */
2732static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
2733 .master = &omap44xx_l3_main_2_hwmod,
2734 .slave = &omap44xx_iva_hwmod,
2735 .clk = "l3_div_ck",
2736 .addr = omap44xx_iva_addrs,
2737 .user = OCP_USER_MPU,
2738};
2739
2740/* iva slave ports */
2741static struct omap_hwmod_ocp_if *omap44xx_iva_slaves[] = {
2742 &omap44xx_dsp__iva,
2743 &omap44xx_l3_main_2__iva,
2744};
2745
2746/* Pseudo hwmod for reset control purpose only */
2747static struct omap_hwmod omap44xx_iva_seq0_hwmod = {
2748 .name = "iva_seq0",
2749 .class = &omap44xx_iva_hwmod_class,
2750 .clkdm_name = "ivahd_clkdm",
2751 .flags = HWMOD_INIT_NO_RESET,
2752 .rst_lines = omap44xx_iva_seq0_resets,
2753 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq0_resets),
2754 .prcm = {
2755 .omap4 = {
2756 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
2757 },
2758 },
2759};
2760
2761/* Pseudo hwmod for reset control purpose only */
2762static struct omap_hwmod omap44xx_iva_seq1_hwmod = {
2763 .name = "iva_seq1",
2764 .class = &omap44xx_iva_hwmod_class,
2765 .clkdm_name = "ivahd_clkdm",
2766 .flags = HWMOD_INIT_NO_RESET,
2767 .rst_lines = omap44xx_iva_seq1_resets,
2768 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq1_resets),
2769 .prcm = {
2770 .omap4 = {
2771 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
2772 },
2773 },
2774}; 1341};
2775 1342
2776static struct omap_hwmod omap44xx_iva_hwmod = { 1343static struct omap_hwmod omap44xx_iva_hwmod = {
@@ -2789,10 +1356,6 @@ static struct omap_hwmod omap44xx_iva_hwmod = {
2789 .modulemode = MODULEMODE_HWCTRL, 1356 .modulemode = MODULEMODE_HWCTRL,
2790 }, 1357 },
2791 }, 1358 },
2792 .slaves = omap44xx_iva_slaves,
2793 .slaves_cnt = ARRAY_SIZE(omap44xx_iva_slaves),
2794 .masters = omap44xx_iva_masters,
2795 .masters_cnt = ARRAY_SIZE(omap44xx_iva_masters),
2796}; 1359};
2797 1360
2798/* 1361/*
@@ -2818,35 +1381,11 @@ static struct omap_hwmod_class omap44xx_kbd_hwmod_class = {
2818}; 1381};
2819 1382
2820/* kbd */ 1383/* kbd */
2821static struct omap_hwmod omap44xx_kbd_hwmod;
2822static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = { 1384static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = {
2823 { .irq = 120 + OMAP44XX_IRQ_GIC_START }, 1385 { .irq = 120 + OMAP44XX_IRQ_GIC_START },
2824 { .irq = -1 } 1386 { .irq = -1 }
2825}; 1387};
2826 1388
2827static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = {
2828 {
2829 .pa_start = 0x4a31c000,
2830 .pa_end = 0x4a31c07f,
2831 .flags = ADDR_TYPE_RT
2832 },
2833 { }
2834};
2835
2836/* l4_wkup -> kbd */
2837static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = {
2838 .master = &omap44xx_l4_wkup_hwmod,
2839 .slave = &omap44xx_kbd_hwmod,
2840 .clk = "l4_wkup_clk_mux_ck",
2841 .addr = omap44xx_kbd_addrs,
2842 .user = OCP_USER_MPU | OCP_USER_SDMA,
2843};
2844
2845/* kbd slave ports */
2846static struct omap_hwmod_ocp_if *omap44xx_kbd_slaves[] = {
2847 &omap44xx_l4_wkup__kbd,
2848};
2849
2850static struct omap_hwmod omap44xx_kbd_hwmod = { 1389static struct omap_hwmod omap44xx_kbd_hwmod = {
2851 .name = "kbd", 1390 .name = "kbd",
2852 .class = &omap44xx_kbd_hwmod_class, 1391 .class = &omap44xx_kbd_hwmod_class,
@@ -2860,8 +1399,6 @@ static struct omap_hwmod omap44xx_kbd_hwmod = {
2860 .modulemode = MODULEMODE_SWCTRL, 1399 .modulemode = MODULEMODE_SWCTRL,
2861 }, 1400 },
2862 }, 1401 },
2863 .slaves = omap44xx_kbd_slaves,
2864 .slaves_cnt = ARRAY_SIZE(omap44xx_kbd_slaves),
2865}; 1402};
2866 1403
2867/* 1404/*
@@ -2885,35 +1422,11 @@ static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = {
2885}; 1422};
2886 1423
2887/* mailbox */ 1424/* mailbox */
2888static struct omap_hwmod omap44xx_mailbox_hwmod;
2889static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = { 1425static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
2890 { .irq = 26 + OMAP44XX_IRQ_GIC_START }, 1426 { .irq = 26 + OMAP44XX_IRQ_GIC_START },
2891 { .irq = -1 } 1427 { .irq = -1 }
2892}; 1428};
2893 1429
2894static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
2895 {
2896 .pa_start = 0x4a0f4000,
2897 .pa_end = 0x4a0f41ff,
2898 .flags = ADDR_TYPE_RT
2899 },
2900 { }
2901};
2902
2903/* l4_cfg -> mailbox */
2904static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = {
2905 .master = &omap44xx_l4_cfg_hwmod,
2906 .slave = &omap44xx_mailbox_hwmod,
2907 .clk = "l4_div_ck",
2908 .addr = omap44xx_mailbox_addrs,
2909 .user = OCP_USER_MPU | OCP_USER_SDMA,
2910};
2911
2912/* mailbox slave ports */
2913static struct omap_hwmod_ocp_if *omap44xx_mailbox_slaves[] = {
2914 &omap44xx_l4_cfg__mailbox,
2915};
2916
2917static struct omap_hwmod omap44xx_mailbox_hwmod = { 1430static struct omap_hwmod omap44xx_mailbox_hwmod = {
2918 .name = "mailbox", 1431 .name = "mailbox",
2919 .class = &omap44xx_mailbox_hwmod_class, 1432 .class = &omap44xx_mailbox_hwmod_class,
@@ -2925,8 +1438,6 @@ static struct omap_hwmod omap44xx_mailbox_hwmod = {
2925 .context_offs = OMAP4_RM_L4CFG_MAILBOX_CONTEXT_OFFSET, 1438 .context_offs = OMAP4_RM_L4CFG_MAILBOX_CONTEXT_OFFSET,
2926 }, 1439 },
2927 }, 1440 },
2928 .slaves = omap44xx_mailbox_slaves,
2929 .slaves_cnt = ARRAY_SIZE(omap44xx_mailbox_slaves),
2930}; 1441};
2931 1442
2932/* 1443/*
@@ -2949,7 +1460,6 @@ static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = {
2949}; 1460};
2950 1461
2951/* mcbsp1 */ 1462/* mcbsp1 */
2952static struct omap_hwmod omap44xx_mcbsp1_hwmod;
2953static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = { 1463static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = {
2954 { .irq = 17 + OMAP44XX_IRQ_GIC_START }, 1464 { .irq = 17 + OMAP44XX_IRQ_GIC_START },
2955 { .irq = -1 } 1465 { .irq = -1 }
@@ -2961,50 +1471,6 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = {
2961 { .dma_req = -1 } 1471 { .dma_req = -1 }
2962}; 1472};
2963 1473
2964static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
2965 {
2966 .name = "mpu",
2967 .pa_start = 0x40122000,
2968 .pa_end = 0x401220ff,
2969 .flags = ADDR_TYPE_RT
2970 },
2971 { }
2972};
2973
2974/* l4_abe -> mcbsp1 */
2975static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
2976 .master = &omap44xx_l4_abe_hwmod,
2977 .slave = &omap44xx_mcbsp1_hwmod,
2978 .clk = "ocp_abe_iclk",
2979 .addr = omap44xx_mcbsp1_addrs,
2980 .user = OCP_USER_MPU,
2981};
2982
2983static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
2984 {
2985 .name = "dma",
2986 .pa_start = 0x49022000,
2987 .pa_end = 0x490220ff,
2988 .flags = ADDR_TYPE_RT
2989 },
2990 { }
2991};
2992
2993/* l4_abe -> mcbsp1 (dma) */
2994static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = {
2995 .master = &omap44xx_l4_abe_hwmod,
2996 .slave = &omap44xx_mcbsp1_hwmod,
2997 .clk = "ocp_abe_iclk",
2998 .addr = omap44xx_mcbsp1_dma_addrs,
2999 .user = OCP_USER_SDMA,
3000};
3001
3002/* mcbsp1 slave ports */
3003static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = {
3004 &omap44xx_l4_abe__mcbsp1,
3005 &omap44xx_l4_abe__mcbsp1_dma,
3006};
3007
3008static struct omap_hwmod_opt_clk mcbsp1_opt_clks[] = { 1474static struct omap_hwmod_opt_clk mcbsp1_opt_clks[] = {
3009 { .role = "pad_fck", .clk = "pad_clks_ck" }, 1475 { .role = "pad_fck", .clk = "pad_clks_ck" },
3010 { .role = "prcm_clk", .clk = "mcbsp1_sync_mux_ck" }, 1476 { .role = "prcm_clk", .clk = "mcbsp1_sync_mux_ck" },
@@ -3024,14 +1490,11 @@ static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
3024 .modulemode = MODULEMODE_SWCTRL, 1490 .modulemode = MODULEMODE_SWCTRL,
3025 }, 1491 },
3026 }, 1492 },
3027 .slaves = omap44xx_mcbsp1_slaves,
3028 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves),
3029 .opt_clks = mcbsp1_opt_clks, 1493 .opt_clks = mcbsp1_opt_clks,
3030 .opt_clks_cnt = ARRAY_SIZE(mcbsp1_opt_clks), 1494 .opt_clks_cnt = ARRAY_SIZE(mcbsp1_opt_clks),
3031}; 1495};
3032 1496
3033/* mcbsp2 */ 1497/* mcbsp2 */
3034static struct omap_hwmod omap44xx_mcbsp2_hwmod;
3035static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = { 1498static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = {
3036 { .irq = 22 + OMAP44XX_IRQ_GIC_START }, 1499 { .irq = 22 + OMAP44XX_IRQ_GIC_START },
3037 { .irq = -1 } 1500 { .irq = -1 }
@@ -3043,50 +1506,6 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = {
3043 { .dma_req = -1 } 1506 { .dma_req = -1 }
3044}; 1507};
3045 1508
3046static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
3047 {
3048 .name = "mpu",
3049 .pa_start = 0x40124000,
3050 .pa_end = 0x401240ff,
3051 .flags = ADDR_TYPE_RT
3052 },
3053 { }
3054};
3055
3056/* l4_abe -> mcbsp2 */
3057static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
3058 .master = &omap44xx_l4_abe_hwmod,
3059 .slave = &omap44xx_mcbsp2_hwmod,
3060 .clk = "ocp_abe_iclk",
3061 .addr = omap44xx_mcbsp2_addrs,
3062 .user = OCP_USER_MPU,
3063};
3064
3065static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
3066 {
3067 .name = "dma",
3068 .pa_start = 0x49024000,
3069 .pa_end = 0x490240ff,
3070 .flags = ADDR_TYPE_RT
3071 },
3072 { }
3073};
3074
3075/* l4_abe -> mcbsp2 (dma) */
3076static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = {
3077 .master = &omap44xx_l4_abe_hwmod,
3078 .slave = &omap44xx_mcbsp2_hwmod,
3079 .clk = "ocp_abe_iclk",
3080 .addr = omap44xx_mcbsp2_dma_addrs,
3081 .user = OCP_USER_SDMA,
3082};
3083
3084/* mcbsp2 slave ports */
3085static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = {
3086 &omap44xx_l4_abe__mcbsp2,
3087 &omap44xx_l4_abe__mcbsp2_dma,
3088};
3089
3090static struct omap_hwmod_opt_clk mcbsp2_opt_clks[] = { 1509static struct omap_hwmod_opt_clk mcbsp2_opt_clks[] = {
3091 { .role = "pad_fck", .clk = "pad_clks_ck" }, 1510 { .role = "pad_fck", .clk = "pad_clks_ck" },
3092 { .role = "prcm_clk", .clk = "mcbsp2_sync_mux_ck" }, 1511 { .role = "prcm_clk", .clk = "mcbsp2_sync_mux_ck" },
@@ -3106,14 +1525,11 @@ static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
3106 .modulemode = MODULEMODE_SWCTRL, 1525 .modulemode = MODULEMODE_SWCTRL,
3107 }, 1526 },
3108 }, 1527 },
3109 .slaves = omap44xx_mcbsp2_slaves,
3110 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves),
3111 .opt_clks = mcbsp2_opt_clks, 1528 .opt_clks = mcbsp2_opt_clks,
3112 .opt_clks_cnt = ARRAY_SIZE(mcbsp2_opt_clks), 1529 .opt_clks_cnt = ARRAY_SIZE(mcbsp2_opt_clks),
3113}; 1530};
3114 1531
3115/* mcbsp3 */ 1532/* mcbsp3 */
3116static struct omap_hwmod omap44xx_mcbsp3_hwmod;
3117static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = { 1533static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = {
3118 { .irq = 23 + OMAP44XX_IRQ_GIC_START }, 1534 { .irq = 23 + OMAP44XX_IRQ_GIC_START },
3119 { .irq = -1 } 1535 { .irq = -1 }
@@ -3125,50 +1541,6 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = {
3125 { .dma_req = -1 } 1541 { .dma_req = -1 }
3126}; 1542};
3127 1543
3128static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
3129 {
3130 .name = "mpu",
3131 .pa_start = 0x40126000,
3132 .pa_end = 0x401260ff,
3133 .flags = ADDR_TYPE_RT
3134 },
3135 { }
3136};
3137
3138/* l4_abe -> mcbsp3 */
3139static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
3140 .master = &omap44xx_l4_abe_hwmod,
3141 .slave = &omap44xx_mcbsp3_hwmod,
3142 .clk = "ocp_abe_iclk",
3143 .addr = omap44xx_mcbsp3_addrs,
3144 .user = OCP_USER_MPU,
3145};
3146
3147static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
3148 {
3149 .name = "dma",
3150 .pa_start = 0x49026000,
3151 .pa_end = 0x490260ff,
3152 .flags = ADDR_TYPE_RT
3153 },
3154 { }
3155};
3156
3157/* l4_abe -> mcbsp3 (dma) */
3158static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = {
3159 .master = &omap44xx_l4_abe_hwmod,
3160 .slave = &omap44xx_mcbsp3_hwmod,
3161 .clk = "ocp_abe_iclk",
3162 .addr = omap44xx_mcbsp3_dma_addrs,
3163 .user = OCP_USER_SDMA,
3164};
3165
3166/* mcbsp3 slave ports */
3167static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = {
3168 &omap44xx_l4_abe__mcbsp3,
3169 &omap44xx_l4_abe__mcbsp3_dma,
3170};
3171
3172static struct omap_hwmod_opt_clk mcbsp3_opt_clks[] = { 1544static struct omap_hwmod_opt_clk mcbsp3_opt_clks[] = {
3173 { .role = "pad_fck", .clk = "pad_clks_ck" }, 1545 { .role = "pad_fck", .clk = "pad_clks_ck" },
3174 { .role = "prcm_clk", .clk = "mcbsp3_sync_mux_ck" }, 1546 { .role = "prcm_clk", .clk = "mcbsp3_sync_mux_ck" },
@@ -3188,14 +1560,11 @@ static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
3188 .modulemode = MODULEMODE_SWCTRL, 1560 .modulemode = MODULEMODE_SWCTRL,
3189 }, 1561 },
3190 }, 1562 },
3191 .slaves = omap44xx_mcbsp3_slaves,
3192 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves),
3193 .opt_clks = mcbsp3_opt_clks, 1563 .opt_clks = mcbsp3_opt_clks,
3194 .opt_clks_cnt = ARRAY_SIZE(mcbsp3_opt_clks), 1564 .opt_clks_cnt = ARRAY_SIZE(mcbsp3_opt_clks),
3195}; 1565};
3196 1566
3197/* mcbsp4 */ 1567/* mcbsp4 */
3198static struct omap_hwmod omap44xx_mcbsp4_hwmod;
3199static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = { 1568static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = {
3200 { .irq = 16 + OMAP44XX_IRQ_GIC_START }, 1569 { .irq = 16 + OMAP44XX_IRQ_GIC_START },
3201 { .irq = -1 } 1570 { .irq = -1 }
@@ -3207,29 +1576,6 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = {
3207 { .dma_req = -1 } 1576 { .dma_req = -1 }
3208}; 1577};
3209 1578
3210static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
3211 {
3212 .pa_start = 0x48096000,
3213 .pa_end = 0x480960ff,
3214 .flags = ADDR_TYPE_RT
3215 },
3216 { }
3217};
3218
3219/* l4_per -> mcbsp4 */
3220static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = {
3221 .master = &omap44xx_l4_per_hwmod,
3222 .slave = &omap44xx_mcbsp4_hwmod,
3223 .clk = "l4_div_ck",
3224 .addr = omap44xx_mcbsp4_addrs,
3225 .user = OCP_USER_MPU | OCP_USER_SDMA,
3226};
3227
3228/* mcbsp4 slave ports */
3229static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = {
3230 &omap44xx_l4_per__mcbsp4,
3231};
3232
3233static struct omap_hwmod_opt_clk mcbsp4_opt_clks[] = { 1579static struct omap_hwmod_opt_clk mcbsp4_opt_clks[] = {
3234 { .role = "pad_fck", .clk = "pad_clks_ck" }, 1580 { .role = "pad_fck", .clk = "pad_clks_ck" },
3235 { .role = "prcm_clk", .clk = "mcbsp4_sync_mux_ck" }, 1581 { .role = "prcm_clk", .clk = "mcbsp4_sync_mux_ck" },
@@ -3249,8 +1595,6 @@ static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
3249 .modulemode = MODULEMODE_SWCTRL, 1595 .modulemode = MODULEMODE_SWCTRL,
3250 }, 1596 },
3251 }, 1597 },
3252 .slaves = omap44xx_mcbsp4_slaves,
3253 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves),
3254 .opt_clks = mcbsp4_opt_clks, 1598 .opt_clks = mcbsp4_opt_clks,
3255 .opt_clks_cnt = ARRAY_SIZE(mcbsp4_opt_clks), 1599 .opt_clks_cnt = ARRAY_SIZE(mcbsp4_opt_clks),
3256}; 1600};
@@ -3277,7 +1621,6 @@ static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = {
3277}; 1621};
3278 1622
3279/* mcpdm */ 1623/* mcpdm */
3280static struct omap_hwmod omap44xx_mcpdm_hwmod;
3281static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = { 1624static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = {
3282 { .irq = 112 + OMAP44XX_IRQ_GIC_START }, 1625 { .irq = 112 + OMAP44XX_IRQ_GIC_START },
3283 { .irq = -1 } 1626 { .irq = -1 }
@@ -3289,48 +1632,6 @@ static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = {
3289 { .dma_req = -1 } 1632 { .dma_req = -1 }
3290}; 1633};
3291 1634
3292static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
3293 {
3294 .pa_start = 0x40132000,
3295 .pa_end = 0x4013207f,
3296 .flags = ADDR_TYPE_RT
3297 },
3298 { }
3299};
3300
3301/* l4_abe -> mcpdm */
3302static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
3303 .master = &omap44xx_l4_abe_hwmod,
3304 .slave = &omap44xx_mcpdm_hwmod,
3305 .clk = "ocp_abe_iclk",
3306 .addr = omap44xx_mcpdm_addrs,
3307 .user = OCP_USER_MPU,
3308};
3309
3310static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = {
3311 {
3312 .pa_start = 0x49032000,
3313 .pa_end = 0x4903207f,
3314 .flags = ADDR_TYPE_RT
3315 },
3316 { }
3317};
3318
3319/* l4_abe -> mcpdm (dma) */
3320static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = {
3321 .master = &omap44xx_l4_abe_hwmod,
3322 .slave = &omap44xx_mcpdm_hwmod,
3323 .clk = "ocp_abe_iclk",
3324 .addr = omap44xx_mcpdm_dma_addrs,
3325 .user = OCP_USER_SDMA,
3326};
3327
3328/* mcpdm slave ports */
3329static struct omap_hwmod_ocp_if *omap44xx_mcpdm_slaves[] = {
3330 &omap44xx_l4_abe__mcpdm,
3331 &omap44xx_l4_abe__mcpdm_dma,
3332};
3333
3334static struct omap_hwmod omap44xx_mcpdm_hwmod = { 1635static struct omap_hwmod omap44xx_mcpdm_hwmod = {
3335 .name = "mcpdm", 1636 .name = "mcpdm",
3336 .class = &omap44xx_mcpdm_hwmod_class, 1637 .class = &omap44xx_mcpdm_hwmod_class,
@@ -3345,8 +1646,6 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = {
3345 .modulemode = MODULEMODE_SWCTRL, 1646 .modulemode = MODULEMODE_SWCTRL,
3346 }, 1647 },
3347 }, 1648 },
3348 .slaves = omap44xx_mcpdm_slaves,
3349 .slaves_cnt = ARRAY_SIZE(omap44xx_mcpdm_slaves),
3350}; 1649};
3351 1650
3352/* 1651/*
@@ -3372,7 +1671,6 @@ static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = {
3372}; 1671};
3373 1672
3374/* mcspi1 */ 1673/* mcspi1 */
3375static struct omap_hwmod omap44xx_mcspi1_hwmod;
3376static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = { 1674static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = {
3377 { .irq = 65 + OMAP44XX_IRQ_GIC_START }, 1675 { .irq = 65 + OMAP44XX_IRQ_GIC_START },
3378 { .irq = -1 } 1676 { .irq = -1 }
@@ -3390,29 +1688,6 @@ static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = {
3390 { .dma_req = -1 } 1688 { .dma_req = -1 }
3391}; 1689};
3392 1690
3393static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = {
3394 {
3395 .pa_start = 0x48098000,
3396 .pa_end = 0x480981ff,
3397 .flags = ADDR_TYPE_RT
3398 },
3399 { }
3400};
3401
3402/* l4_per -> mcspi1 */
3403static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = {
3404 .master = &omap44xx_l4_per_hwmod,
3405 .slave = &omap44xx_mcspi1_hwmod,
3406 .clk = "l4_div_ck",
3407 .addr = omap44xx_mcspi1_addrs,
3408 .user = OCP_USER_MPU | OCP_USER_SDMA,
3409};
3410
3411/* mcspi1 slave ports */
3412static struct omap_hwmod_ocp_if *omap44xx_mcspi1_slaves[] = {
3413 &omap44xx_l4_per__mcspi1,
3414};
3415
3416/* mcspi1 dev_attr */ 1691/* mcspi1 dev_attr */
3417static struct omap2_mcspi_dev_attr mcspi1_dev_attr = { 1692static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
3418 .num_chipselect = 4, 1693 .num_chipselect = 4,
@@ -3433,12 +1708,9 @@ static struct omap_hwmod omap44xx_mcspi1_hwmod = {
3433 }, 1708 },
3434 }, 1709 },
3435 .dev_attr = &mcspi1_dev_attr, 1710 .dev_attr = &mcspi1_dev_attr,
3436 .slaves = omap44xx_mcspi1_slaves,
3437 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi1_slaves),
3438}; 1711};
3439 1712
3440/* mcspi2 */ 1713/* mcspi2 */
3441static struct omap_hwmod omap44xx_mcspi2_hwmod;
3442static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = { 1714static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = {
3443 { .irq = 66 + OMAP44XX_IRQ_GIC_START }, 1715 { .irq = 66 + OMAP44XX_IRQ_GIC_START },
3444 { .irq = -1 } 1716 { .irq = -1 }
@@ -3452,29 +1724,6 @@ static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = {
3452 { .dma_req = -1 } 1724 { .dma_req = -1 }
3453}; 1725};
3454 1726
3455static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = {
3456 {
3457 .pa_start = 0x4809a000,
3458 .pa_end = 0x4809a1ff,
3459 .flags = ADDR_TYPE_RT
3460 },
3461 { }
3462};
3463
3464/* l4_per -> mcspi2 */
3465static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = {
3466 .master = &omap44xx_l4_per_hwmod,
3467 .slave = &omap44xx_mcspi2_hwmod,
3468 .clk = "l4_div_ck",
3469 .addr = omap44xx_mcspi2_addrs,
3470 .user = OCP_USER_MPU | OCP_USER_SDMA,
3471};
3472
3473/* mcspi2 slave ports */
3474static struct omap_hwmod_ocp_if *omap44xx_mcspi2_slaves[] = {
3475 &omap44xx_l4_per__mcspi2,
3476};
3477
3478/* mcspi2 dev_attr */ 1727/* mcspi2 dev_attr */
3479static struct omap2_mcspi_dev_attr mcspi2_dev_attr = { 1728static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
3480 .num_chipselect = 2, 1729 .num_chipselect = 2,
@@ -3495,12 +1744,9 @@ static struct omap_hwmod omap44xx_mcspi2_hwmod = {
3495 }, 1744 },
3496 }, 1745 },
3497 .dev_attr = &mcspi2_dev_attr, 1746 .dev_attr = &mcspi2_dev_attr,
3498 .slaves = omap44xx_mcspi2_slaves,
3499 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi2_slaves),
3500}; 1747};
3501 1748
3502/* mcspi3 */ 1749/* mcspi3 */
3503static struct omap_hwmod omap44xx_mcspi3_hwmod;
3504static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = { 1750static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = {
3505 { .irq = 91 + OMAP44XX_IRQ_GIC_START }, 1751 { .irq = 91 + OMAP44XX_IRQ_GIC_START },
3506 { .irq = -1 } 1752 { .irq = -1 }
@@ -3514,29 +1760,6 @@ static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = {
3514 { .dma_req = -1 } 1760 { .dma_req = -1 }
3515}; 1761};
3516 1762
3517static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = {
3518 {
3519 .pa_start = 0x480b8000,
3520 .pa_end = 0x480b81ff,
3521 .flags = ADDR_TYPE_RT
3522 },
3523 { }
3524};
3525
3526/* l4_per -> mcspi3 */
3527static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = {
3528 .master = &omap44xx_l4_per_hwmod,
3529 .slave = &omap44xx_mcspi3_hwmod,
3530 .clk = "l4_div_ck",
3531 .addr = omap44xx_mcspi3_addrs,
3532 .user = OCP_USER_MPU | OCP_USER_SDMA,
3533};
3534
3535/* mcspi3 slave ports */
3536static struct omap_hwmod_ocp_if *omap44xx_mcspi3_slaves[] = {
3537 &omap44xx_l4_per__mcspi3,
3538};
3539
3540/* mcspi3 dev_attr */ 1763/* mcspi3 dev_attr */
3541static struct omap2_mcspi_dev_attr mcspi3_dev_attr = { 1764static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
3542 .num_chipselect = 2, 1765 .num_chipselect = 2,
@@ -3557,12 +1780,9 @@ static struct omap_hwmod omap44xx_mcspi3_hwmod = {
3557 }, 1780 },
3558 }, 1781 },
3559 .dev_attr = &mcspi3_dev_attr, 1782 .dev_attr = &mcspi3_dev_attr,
3560 .slaves = omap44xx_mcspi3_slaves,
3561 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi3_slaves),
3562}; 1783};
3563 1784
3564/* mcspi4 */ 1785/* mcspi4 */
3565static struct omap_hwmod omap44xx_mcspi4_hwmod;
3566static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = { 1786static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = {
3567 { .irq = 48 + OMAP44XX_IRQ_GIC_START }, 1787 { .irq = 48 + OMAP44XX_IRQ_GIC_START },
3568 { .irq = -1 } 1788 { .irq = -1 }
@@ -3574,29 +1794,6 @@ static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = {
3574 { .dma_req = -1 } 1794 { .dma_req = -1 }
3575}; 1795};
3576 1796
3577static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = {
3578 {
3579 .pa_start = 0x480ba000,
3580 .pa_end = 0x480ba1ff,
3581 .flags = ADDR_TYPE_RT
3582 },
3583 { }
3584};
3585
3586/* l4_per -> mcspi4 */
3587static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = {
3588 .master = &omap44xx_l4_per_hwmod,
3589 .slave = &omap44xx_mcspi4_hwmod,
3590 .clk = "l4_div_ck",
3591 .addr = omap44xx_mcspi4_addrs,
3592 .user = OCP_USER_MPU | OCP_USER_SDMA,
3593};
3594
3595/* mcspi4 slave ports */
3596static struct omap_hwmod_ocp_if *omap44xx_mcspi4_slaves[] = {
3597 &omap44xx_l4_per__mcspi4,
3598};
3599
3600/* mcspi4 dev_attr */ 1797/* mcspi4 dev_attr */
3601static struct omap2_mcspi_dev_attr mcspi4_dev_attr = { 1798static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
3602 .num_chipselect = 1, 1799 .num_chipselect = 1,
@@ -3617,8 +1814,6 @@ static struct omap_hwmod omap44xx_mcspi4_hwmod = {
3617 }, 1814 },
3618 }, 1815 },
3619 .dev_attr = &mcspi4_dev_attr, 1816 .dev_attr = &mcspi4_dev_attr,
3620 .slaves = omap44xx_mcspi4_slaves,
3621 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi4_slaves),
3622}; 1817};
3623 1818
3624/* 1819/*
@@ -3655,34 +1850,6 @@ static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = {
3655 { .dma_req = -1 } 1850 { .dma_req = -1 }
3656}; 1851};
3657 1852
3658/* mmc1 master ports */
3659static struct omap_hwmod_ocp_if *omap44xx_mmc1_masters[] = {
3660 &omap44xx_mmc1__l3_main_1,
3661};
3662
3663static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = {
3664 {
3665 .pa_start = 0x4809c000,
3666 .pa_end = 0x4809c3ff,
3667 .flags = ADDR_TYPE_RT
3668 },
3669 { }
3670};
3671
3672/* l4_per -> mmc1 */
3673static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = {
3674 .master = &omap44xx_l4_per_hwmod,
3675 .slave = &omap44xx_mmc1_hwmod,
3676 .clk = "l4_div_ck",
3677 .addr = omap44xx_mmc1_addrs,
3678 .user = OCP_USER_MPU | OCP_USER_SDMA,
3679};
3680
3681/* mmc1 slave ports */
3682static struct omap_hwmod_ocp_if *omap44xx_mmc1_slaves[] = {
3683 &omap44xx_l4_per__mmc1,
3684};
3685
3686/* mmc1 dev_attr */ 1853/* mmc1 dev_attr */
3687static struct omap_mmc_dev_attr mmc1_dev_attr = { 1854static struct omap_mmc_dev_attr mmc1_dev_attr = {
3688 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, 1855 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
@@ -3703,10 +1870,6 @@ static struct omap_hwmod omap44xx_mmc1_hwmod = {
3703 }, 1870 },
3704 }, 1871 },
3705 .dev_attr = &mmc1_dev_attr, 1872 .dev_attr = &mmc1_dev_attr,
3706 .slaves = omap44xx_mmc1_slaves,
3707 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc1_slaves),
3708 .masters = omap44xx_mmc1_masters,
3709 .masters_cnt = ARRAY_SIZE(omap44xx_mmc1_masters),
3710}; 1873};
3711 1874
3712/* mmc2 */ 1875/* mmc2 */
@@ -3721,34 +1884,6 @@ static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = {
3721 { .dma_req = -1 } 1884 { .dma_req = -1 }
3722}; 1885};
3723 1886
3724/* mmc2 master ports */
3725static struct omap_hwmod_ocp_if *omap44xx_mmc2_masters[] = {
3726 &omap44xx_mmc2__l3_main_1,
3727};
3728
3729static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = {
3730 {
3731 .pa_start = 0x480b4000,
3732 .pa_end = 0x480b43ff,
3733 .flags = ADDR_TYPE_RT
3734 },
3735 { }
3736};
3737
3738/* l4_per -> mmc2 */
3739static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = {
3740 .master = &omap44xx_l4_per_hwmod,
3741 .slave = &omap44xx_mmc2_hwmod,
3742 .clk = "l4_div_ck",
3743 .addr = omap44xx_mmc2_addrs,
3744 .user = OCP_USER_MPU | OCP_USER_SDMA,
3745};
3746
3747/* mmc2 slave ports */
3748static struct omap_hwmod_ocp_if *omap44xx_mmc2_slaves[] = {
3749 &omap44xx_l4_per__mmc2,
3750};
3751
3752static struct omap_hwmod omap44xx_mmc2_hwmod = { 1887static struct omap_hwmod omap44xx_mmc2_hwmod = {
3753 .name = "mmc2", 1888 .name = "mmc2",
3754 .class = &omap44xx_mmc_hwmod_class, 1889 .class = &omap44xx_mmc_hwmod_class,
@@ -3763,14 +1898,9 @@ static struct omap_hwmod omap44xx_mmc2_hwmod = {
3763 .modulemode = MODULEMODE_SWCTRL, 1898 .modulemode = MODULEMODE_SWCTRL,
3764 }, 1899 },
3765 }, 1900 },
3766 .slaves = omap44xx_mmc2_slaves,
3767 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc2_slaves),
3768 .masters = omap44xx_mmc2_masters,
3769 .masters_cnt = ARRAY_SIZE(omap44xx_mmc2_masters),
3770}; 1901};
3771 1902
3772/* mmc3 */ 1903/* mmc3 */
3773static struct omap_hwmod omap44xx_mmc3_hwmod;
3774static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = { 1904static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = {
3775 { .irq = 94 + OMAP44XX_IRQ_GIC_START }, 1905 { .irq = 94 + OMAP44XX_IRQ_GIC_START },
3776 { .irq = -1 } 1906 { .irq = -1 }
@@ -3782,29 +1912,6 @@ static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = {
3782 { .dma_req = -1 } 1912 { .dma_req = -1 }
3783}; 1913};
3784 1914
3785static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = {
3786 {
3787 .pa_start = 0x480ad000,
3788 .pa_end = 0x480ad3ff,
3789 .flags = ADDR_TYPE_RT
3790 },
3791 { }
3792};
3793
3794/* l4_per -> mmc3 */
3795static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = {
3796 .master = &omap44xx_l4_per_hwmod,
3797 .slave = &omap44xx_mmc3_hwmod,
3798 .clk = "l4_div_ck",
3799 .addr = omap44xx_mmc3_addrs,
3800 .user = OCP_USER_MPU | OCP_USER_SDMA,
3801};
3802
3803/* mmc3 slave ports */
3804static struct omap_hwmod_ocp_if *omap44xx_mmc3_slaves[] = {
3805 &omap44xx_l4_per__mmc3,
3806};
3807
3808static struct omap_hwmod omap44xx_mmc3_hwmod = { 1915static struct omap_hwmod omap44xx_mmc3_hwmod = {
3809 .name = "mmc3", 1916 .name = "mmc3",
3810 .class = &omap44xx_mmc_hwmod_class, 1917 .class = &omap44xx_mmc_hwmod_class,
@@ -3819,12 +1926,9 @@ static struct omap_hwmod omap44xx_mmc3_hwmod = {
3819 .modulemode = MODULEMODE_SWCTRL, 1926 .modulemode = MODULEMODE_SWCTRL,
3820 }, 1927 },
3821 }, 1928 },
3822 .slaves = omap44xx_mmc3_slaves,
3823 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc3_slaves),
3824}; 1929};
3825 1930
3826/* mmc4 */ 1931/* mmc4 */
3827static struct omap_hwmod omap44xx_mmc4_hwmod;
3828static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = { 1932static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = {
3829 { .irq = 96 + OMAP44XX_IRQ_GIC_START }, 1933 { .irq = 96 + OMAP44XX_IRQ_GIC_START },
3830 { .irq = -1 } 1934 { .irq = -1 }
@@ -3836,35 +1940,11 @@ static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = {
3836 { .dma_req = -1 } 1940 { .dma_req = -1 }
3837}; 1941};
3838 1942
3839static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = {
3840 {
3841 .pa_start = 0x480d1000,
3842 .pa_end = 0x480d13ff,
3843 .flags = ADDR_TYPE_RT
3844 },
3845 { }
3846};
3847
3848/* l4_per -> mmc4 */
3849static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = {
3850 .master = &omap44xx_l4_per_hwmod,
3851 .slave = &omap44xx_mmc4_hwmod,
3852 .clk = "l4_div_ck",
3853 .addr = omap44xx_mmc4_addrs,
3854 .user = OCP_USER_MPU | OCP_USER_SDMA,
3855};
3856
3857/* mmc4 slave ports */
3858static struct omap_hwmod_ocp_if *omap44xx_mmc4_slaves[] = {
3859 &omap44xx_l4_per__mmc4,
3860};
3861
3862static struct omap_hwmod omap44xx_mmc4_hwmod = { 1943static struct omap_hwmod omap44xx_mmc4_hwmod = {
3863 .name = "mmc4", 1944 .name = "mmc4",
3864 .class = &omap44xx_mmc_hwmod_class, 1945 .class = &omap44xx_mmc_hwmod_class,
3865 .clkdm_name = "l4_per_clkdm", 1946 .clkdm_name = "l4_per_clkdm",
3866 .mpu_irqs = omap44xx_mmc4_irqs, 1947 .mpu_irqs = omap44xx_mmc4_irqs,
3867
3868 .sdma_reqs = omap44xx_mmc4_sdma_reqs, 1948 .sdma_reqs = omap44xx_mmc4_sdma_reqs,
3869 .main_clk = "mmc4_fck", 1949 .main_clk = "mmc4_fck",
3870 .prcm = { 1950 .prcm = {
@@ -3874,12 +1954,9 @@ static struct omap_hwmod omap44xx_mmc4_hwmod = {
3874 .modulemode = MODULEMODE_SWCTRL, 1954 .modulemode = MODULEMODE_SWCTRL,
3875 }, 1955 },
3876 }, 1956 },
3877 .slaves = omap44xx_mmc4_slaves,
3878 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc4_slaves),
3879}; 1957};
3880 1958
3881/* mmc5 */ 1959/* mmc5 */
3882static struct omap_hwmod omap44xx_mmc5_hwmod;
3883static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = { 1960static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = {
3884 { .irq = 59 + OMAP44XX_IRQ_GIC_START }, 1961 { .irq = 59 + OMAP44XX_IRQ_GIC_START },
3885 { .irq = -1 } 1962 { .irq = -1 }
@@ -3891,29 +1968,6 @@ static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = {
3891 { .dma_req = -1 } 1968 { .dma_req = -1 }
3892}; 1969};
3893 1970
3894static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = {
3895 {
3896 .pa_start = 0x480d5000,
3897 .pa_end = 0x480d53ff,
3898 .flags = ADDR_TYPE_RT
3899 },
3900 { }
3901};
3902
3903/* l4_per -> mmc5 */
3904static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = {
3905 .master = &omap44xx_l4_per_hwmod,
3906 .slave = &omap44xx_mmc5_hwmod,
3907 .clk = "l4_div_ck",
3908 .addr = omap44xx_mmc5_addrs,
3909 .user = OCP_USER_MPU | OCP_USER_SDMA,
3910};
3911
3912/* mmc5 slave ports */
3913static struct omap_hwmod_ocp_if *omap44xx_mmc5_slaves[] = {
3914 &omap44xx_l4_per__mmc5,
3915};
3916
3917static struct omap_hwmod omap44xx_mmc5_hwmod = { 1971static struct omap_hwmod omap44xx_mmc5_hwmod = {
3918 .name = "mmc5", 1972 .name = "mmc5",
3919 .class = &omap44xx_mmc_hwmod_class, 1973 .class = &omap44xx_mmc_hwmod_class,
@@ -3928,8 +1982,6 @@ static struct omap_hwmod omap44xx_mmc5_hwmod = {
3928 .modulemode = MODULEMODE_SWCTRL, 1982 .modulemode = MODULEMODE_SWCTRL,
3929 }, 1983 },
3930 }, 1984 },
3931 .slaves = omap44xx_mmc5_slaves,
3932 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc5_slaves),
3933}; 1985};
3934 1986
3935/* 1987/*
@@ -3949,13 +2001,6 @@ static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
3949 { .irq = -1 } 2001 { .irq = -1 }
3950}; 2002};
3951 2003
3952/* mpu master ports */
3953static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = {
3954 &omap44xx_mpu__l3_main_1,
3955 &omap44xx_mpu__l4_abe,
3956 &omap44xx_mpu__dmm,
3957};
3958
3959static struct omap_hwmod omap44xx_mpu_hwmod = { 2004static struct omap_hwmod omap44xx_mpu_hwmod = {
3960 .name = "mpu", 2005 .name = "mpu",
3961 .class = &omap44xx_mpu_hwmod_class, 2006 .class = &omap44xx_mpu_hwmod_class,
@@ -3969,8 +2014,6 @@ static struct omap_hwmod omap44xx_mpu_hwmod = {
3969 .context_offs = OMAP4_RM_MPU_MPU_CONTEXT_OFFSET, 2014 .context_offs = OMAP4_RM_MPU_MPU_CONTEXT_OFFSET,
3970 }, 2015 },
3971 }, 2016 },
3972 .masters = omap44xx_mpu_masters,
3973 .masters_cnt = ARRAY_SIZE(omap44xx_mpu_masters),
3974}; 2017};
3975 2018
3976/* 2019/*
@@ -4004,35 +2047,11 @@ static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
4004 .sensor_voltdm_name = "core", 2047 .sensor_voltdm_name = "core",
4005}; 2048};
4006 2049
4007static struct omap_hwmod omap44xx_smartreflex_core_hwmod;
4008static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = { 2050static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = {
4009 { .irq = 19 + OMAP44XX_IRQ_GIC_START }, 2051 { .irq = 19 + OMAP44XX_IRQ_GIC_START },
4010 { .irq = -1 } 2052 { .irq = -1 }
4011}; 2053};
4012 2054
4013static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
4014 {
4015 .pa_start = 0x4a0dd000,
4016 .pa_end = 0x4a0dd03f,
4017 .flags = ADDR_TYPE_RT
4018 },
4019 { }
4020};
4021
4022/* l4_cfg -> smartreflex_core */
4023static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = {
4024 .master = &omap44xx_l4_cfg_hwmod,
4025 .slave = &omap44xx_smartreflex_core_hwmod,
4026 .clk = "l4_div_ck",
4027 .addr = omap44xx_smartreflex_core_addrs,
4028 .user = OCP_USER_MPU | OCP_USER_SDMA,
4029};
4030
4031/* smartreflex_core slave ports */
4032static struct omap_hwmod_ocp_if *omap44xx_smartreflex_core_slaves[] = {
4033 &omap44xx_l4_cfg__smartreflex_core,
4034};
4035
4036static struct omap_hwmod omap44xx_smartreflex_core_hwmod = { 2055static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
4037 .name = "smartreflex_core", 2056 .name = "smartreflex_core",
4038 .class = &omap44xx_smartreflex_hwmod_class, 2057 .class = &omap44xx_smartreflex_hwmod_class,
@@ -4047,8 +2066,6 @@ static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
4047 .modulemode = MODULEMODE_SWCTRL, 2066 .modulemode = MODULEMODE_SWCTRL,
4048 }, 2067 },
4049 }, 2068 },
4050 .slaves = omap44xx_smartreflex_core_slaves,
4051 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_slaves),
4052 .dev_attr = &smartreflex_core_dev_attr, 2069 .dev_attr = &smartreflex_core_dev_attr,
4053}; 2070};
4054 2071
@@ -4057,35 +2074,11 @@ static struct omap_smartreflex_dev_attr smartreflex_iva_dev_attr = {
4057 .sensor_voltdm_name = "iva", 2074 .sensor_voltdm_name = "iva",
4058}; 2075};
4059 2076
4060static struct omap_hwmod omap44xx_smartreflex_iva_hwmod;
4061static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = { 2077static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = {
4062 { .irq = 102 + OMAP44XX_IRQ_GIC_START }, 2078 { .irq = 102 + OMAP44XX_IRQ_GIC_START },
4063 { .irq = -1 } 2079 { .irq = -1 }
4064}; 2080};
4065 2081
4066static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = {
4067 {
4068 .pa_start = 0x4a0db000,
4069 .pa_end = 0x4a0db03f,
4070 .flags = ADDR_TYPE_RT
4071 },
4072 { }
4073};
4074
4075/* l4_cfg -> smartreflex_iva */
4076static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = {
4077 .master = &omap44xx_l4_cfg_hwmod,
4078 .slave = &omap44xx_smartreflex_iva_hwmod,
4079 .clk = "l4_div_ck",
4080 .addr = omap44xx_smartreflex_iva_addrs,
4081 .user = OCP_USER_MPU | OCP_USER_SDMA,
4082};
4083
4084/* smartreflex_iva slave ports */
4085static struct omap_hwmod_ocp_if *omap44xx_smartreflex_iva_slaves[] = {
4086 &omap44xx_l4_cfg__smartreflex_iva,
4087};
4088
4089static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = { 2082static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
4090 .name = "smartreflex_iva", 2083 .name = "smartreflex_iva",
4091 .class = &omap44xx_smartreflex_hwmod_class, 2084 .class = &omap44xx_smartreflex_hwmod_class,
@@ -4099,8 +2092,6 @@ static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
4099 .modulemode = MODULEMODE_SWCTRL, 2092 .modulemode = MODULEMODE_SWCTRL,
4100 }, 2093 },
4101 }, 2094 },
4102 .slaves = omap44xx_smartreflex_iva_slaves,
4103 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_iva_slaves),
4104 .dev_attr = &smartreflex_iva_dev_attr, 2095 .dev_attr = &smartreflex_iva_dev_attr,
4105}; 2096};
4106 2097
@@ -4109,35 +2100,11 @@ static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
4109 .sensor_voltdm_name = "mpu", 2100 .sensor_voltdm_name = "mpu",
4110}; 2101};
4111 2102
4112static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod;
4113static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = { 2103static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = {
4114 { .irq = 18 + OMAP44XX_IRQ_GIC_START }, 2104 { .irq = 18 + OMAP44XX_IRQ_GIC_START },
4115 { .irq = -1 } 2105 { .irq = -1 }
4116}; 2106};
4117 2107
4118static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = {
4119 {
4120 .pa_start = 0x4a0d9000,
4121 .pa_end = 0x4a0d903f,
4122 .flags = ADDR_TYPE_RT
4123 },
4124 { }
4125};
4126
4127/* l4_cfg -> smartreflex_mpu */
4128static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = {
4129 .master = &omap44xx_l4_cfg_hwmod,
4130 .slave = &omap44xx_smartreflex_mpu_hwmod,
4131 .clk = "l4_div_ck",
4132 .addr = omap44xx_smartreflex_mpu_addrs,
4133 .user = OCP_USER_MPU | OCP_USER_SDMA,
4134};
4135
4136/* smartreflex_mpu slave ports */
4137static struct omap_hwmod_ocp_if *omap44xx_smartreflex_mpu_slaves[] = {
4138 &omap44xx_l4_cfg__smartreflex_mpu,
4139};
4140
4141static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = { 2108static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = {
4142 .name = "smartreflex_mpu", 2109 .name = "smartreflex_mpu",
4143 .class = &omap44xx_smartreflex_hwmod_class, 2110 .class = &omap44xx_smartreflex_hwmod_class,
@@ -4151,8 +2118,6 @@ static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = {
4151 .modulemode = MODULEMODE_SWCTRL, 2118 .modulemode = MODULEMODE_SWCTRL,
4152 }, 2119 },
4153 }, 2120 },
4154 .slaves = omap44xx_smartreflex_mpu_slaves,
4155 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_mpu_slaves),
4156 .dev_attr = &smartreflex_mpu_dev_attr, 2121 .dev_attr = &smartreflex_mpu_dev_attr,
4157}; 2122};
4158 2123
@@ -4180,30 +2145,6 @@ static struct omap_hwmod_class omap44xx_spinlock_hwmod_class = {
4180}; 2145};
4181 2146
4182/* spinlock */ 2147/* spinlock */
4183static struct omap_hwmod omap44xx_spinlock_hwmod;
4184static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = {
4185 {
4186 .pa_start = 0x4a0f6000,
4187 .pa_end = 0x4a0f6fff,
4188 .flags = ADDR_TYPE_RT
4189 },
4190 { }
4191};
4192
4193/* l4_cfg -> spinlock */
4194static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = {
4195 .master = &omap44xx_l4_cfg_hwmod,
4196 .slave = &omap44xx_spinlock_hwmod,
4197 .clk = "l4_div_ck",
4198 .addr = omap44xx_spinlock_addrs,
4199 .user = OCP_USER_MPU | OCP_USER_SDMA,
4200};
4201
4202/* spinlock slave ports */
4203static struct omap_hwmod_ocp_if *omap44xx_spinlock_slaves[] = {
4204 &omap44xx_l4_cfg__spinlock,
4205};
4206
4207static struct omap_hwmod omap44xx_spinlock_hwmod = { 2148static struct omap_hwmod omap44xx_spinlock_hwmod = {
4208 .name = "spinlock", 2149 .name = "spinlock",
4209 .class = &omap44xx_spinlock_hwmod_class, 2150 .class = &omap44xx_spinlock_hwmod_class,
@@ -4214,8 +2155,6 @@ static struct omap_hwmod omap44xx_spinlock_hwmod = {
4214 .context_offs = OMAP4_RM_L4CFG_HW_SEM_CONTEXT_OFFSET, 2155 .context_offs = OMAP4_RM_L4CFG_HW_SEM_CONTEXT_OFFSET,
4215 }, 2156 },
4216 }, 2157 },
4217 .slaves = omap44xx_spinlock_slaves,
4218 .slaves_cnt = ARRAY_SIZE(omap44xx_spinlock_slaves),
4219}; 2158};
4220 2159
4221/* 2160/*
@@ -4267,35 +2206,11 @@ static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
4267}; 2206};
4268 2207
4269/* timer1 */ 2208/* timer1 */
4270static struct omap_hwmod omap44xx_timer1_hwmod;
4271static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = { 2209static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = {
4272 { .irq = 37 + OMAP44XX_IRQ_GIC_START }, 2210 { .irq = 37 + OMAP44XX_IRQ_GIC_START },
4273 { .irq = -1 } 2211 { .irq = -1 }
4274}; 2212};
4275 2213
4276static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = {
4277 {
4278 .pa_start = 0x4a318000,
4279 .pa_end = 0x4a31807f,
4280 .flags = ADDR_TYPE_RT
4281 },
4282 { }
4283};
4284
4285/* l4_wkup -> timer1 */
4286static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = {
4287 .master = &omap44xx_l4_wkup_hwmod,
4288 .slave = &omap44xx_timer1_hwmod,
4289 .clk = "l4_wkup_clk_mux_ck",
4290 .addr = omap44xx_timer1_addrs,
4291 .user = OCP_USER_MPU | OCP_USER_SDMA,
4292};
4293
4294/* timer1 slave ports */
4295static struct omap_hwmod_ocp_if *omap44xx_timer1_slaves[] = {
4296 &omap44xx_l4_wkup__timer1,
4297};
4298
4299static struct omap_hwmod omap44xx_timer1_hwmod = { 2214static struct omap_hwmod omap44xx_timer1_hwmod = {
4300 .name = "timer1", 2215 .name = "timer1",
4301 .class = &omap44xx_timer_1ms_hwmod_class, 2216 .class = &omap44xx_timer_1ms_hwmod_class,
@@ -4310,40 +2225,14 @@ static struct omap_hwmod omap44xx_timer1_hwmod = {
4310 }, 2225 },
4311 }, 2226 },
4312 .dev_attr = &capability_alwon_dev_attr, 2227 .dev_attr = &capability_alwon_dev_attr,
4313 .slaves = omap44xx_timer1_slaves,
4314 .slaves_cnt = ARRAY_SIZE(omap44xx_timer1_slaves),
4315}; 2228};
4316 2229
4317/* timer2 */ 2230/* timer2 */
4318static struct omap_hwmod omap44xx_timer2_hwmod;
4319static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = { 2231static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = {
4320 { .irq = 38 + OMAP44XX_IRQ_GIC_START }, 2232 { .irq = 38 + OMAP44XX_IRQ_GIC_START },
4321 { .irq = -1 } 2233 { .irq = -1 }
4322}; 2234};
4323 2235
4324static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = {
4325 {
4326 .pa_start = 0x48032000,
4327 .pa_end = 0x4803207f,
4328 .flags = ADDR_TYPE_RT
4329 },
4330 { }
4331};
4332
4333/* l4_per -> timer2 */
4334static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = {
4335 .master = &omap44xx_l4_per_hwmod,
4336 .slave = &omap44xx_timer2_hwmod,
4337 .clk = "l4_div_ck",
4338 .addr = omap44xx_timer2_addrs,
4339 .user = OCP_USER_MPU | OCP_USER_SDMA,
4340};
4341
4342/* timer2 slave ports */
4343static struct omap_hwmod_ocp_if *omap44xx_timer2_slaves[] = {
4344 &omap44xx_l4_per__timer2,
4345};
4346
4347static struct omap_hwmod omap44xx_timer2_hwmod = { 2236static struct omap_hwmod omap44xx_timer2_hwmod = {
4348 .name = "timer2", 2237 .name = "timer2",
4349 .class = &omap44xx_timer_1ms_hwmod_class, 2238 .class = &omap44xx_timer_1ms_hwmod_class,
@@ -4358,40 +2247,14 @@ static struct omap_hwmod omap44xx_timer2_hwmod = {
4358 }, 2247 },
4359 }, 2248 },
4360 .dev_attr = &capability_alwon_dev_attr, 2249 .dev_attr = &capability_alwon_dev_attr,
4361 .slaves = omap44xx_timer2_slaves,
4362 .slaves_cnt = ARRAY_SIZE(omap44xx_timer2_slaves),
4363}; 2250};
4364 2251
4365/* timer3 */ 2252/* timer3 */
4366static struct omap_hwmod omap44xx_timer3_hwmod;
4367static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = { 2253static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = {
4368 { .irq = 39 + OMAP44XX_IRQ_GIC_START }, 2254 { .irq = 39 + OMAP44XX_IRQ_GIC_START },
4369 { .irq = -1 } 2255 { .irq = -1 }
4370}; 2256};
4371 2257
4372static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = {
4373 {
4374 .pa_start = 0x48034000,
4375 .pa_end = 0x4803407f,
4376 .flags = ADDR_TYPE_RT
4377 },
4378 { }
4379};
4380
4381/* l4_per -> timer3 */
4382static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = {
4383 .master = &omap44xx_l4_per_hwmod,
4384 .slave = &omap44xx_timer3_hwmod,
4385 .clk = "l4_div_ck",
4386 .addr = omap44xx_timer3_addrs,
4387 .user = OCP_USER_MPU | OCP_USER_SDMA,
4388};
4389
4390/* timer3 slave ports */
4391static struct omap_hwmod_ocp_if *omap44xx_timer3_slaves[] = {
4392 &omap44xx_l4_per__timer3,
4393};
4394
4395static struct omap_hwmod omap44xx_timer3_hwmod = { 2258static struct omap_hwmod omap44xx_timer3_hwmod = {
4396 .name = "timer3", 2259 .name = "timer3",
4397 .class = &omap44xx_timer_hwmod_class, 2260 .class = &omap44xx_timer_hwmod_class,
@@ -4406,40 +2269,14 @@ static struct omap_hwmod omap44xx_timer3_hwmod = {
4406 }, 2269 },
4407 }, 2270 },
4408 .dev_attr = &capability_alwon_dev_attr, 2271 .dev_attr = &capability_alwon_dev_attr,
4409 .slaves = omap44xx_timer3_slaves,
4410 .slaves_cnt = ARRAY_SIZE(omap44xx_timer3_slaves),
4411}; 2272};
4412 2273
4413/* timer4 */ 2274/* timer4 */
4414static struct omap_hwmod omap44xx_timer4_hwmod;
4415static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = { 2275static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = {
4416 { .irq = 40 + OMAP44XX_IRQ_GIC_START }, 2276 { .irq = 40 + OMAP44XX_IRQ_GIC_START },
4417 { .irq = -1 } 2277 { .irq = -1 }
4418}; 2278};
4419 2279
4420static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = {
4421 {
4422 .pa_start = 0x48036000,
4423 .pa_end = 0x4803607f,
4424 .flags = ADDR_TYPE_RT
4425 },
4426 { }
4427};
4428
4429/* l4_per -> timer4 */
4430static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = {
4431 .master = &omap44xx_l4_per_hwmod,
4432 .slave = &omap44xx_timer4_hwmod,
4433 .clk = "l4_div_ck",
4434 .addr = omap44xx_timer4_addrs,
4435 .user = OCP_USER_MPU | OCP_USER_SDMA,
4436};
4437
4438/* timer4 slave ports */
4439static struct omap_hwmod_ocp_if *omap44xx_timer4_slaves[] = {
4440 &omap44xx_l4_per__timer4,
4441};
4442
4443static struct omap_hwmod omap44xx_timer4_hwmod = { 2280static struct omap_hwmod omap44xx_timer4_hwmod = {
4444 .name = "timer4", 2281 .name = "timer4",
4445 .class = &omap44xx_timer_hwmod_class, 2282 .class = &omap44xx_timer_hwmod_class,
@@ -4454,59 +2291,14 @@ static struct omap_hwmod omap44xx_timer4_hwmod = {
4454 }, 2291 },
4455 }, 2292 },
4456 .dev_attr = &capability_alwon_dev_attr, 2293 .dev_attr = &capability_alwon_dev_attr,
4457 .slaves = omap44xx_timer4_slaves,
4458 .slaves_cnt = ARRAY_SIZE(omap44xx_timer4_slaves),
4459}; 2294};
4460 2295
4461/* timer5 */ 2296/* timer5 */
4462static struct omap_hwmod omap44xx_timer5_hwmod;
4463static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = { 2297static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = {
4464 { .irq = 41 + OMAP44XX_IRQ_GIC_START }, 2298 { .irq = 41 + OMAP44XX_IRQ_GIC_START },
4465 { .irq = -1 } 2299 { .irq = -1 }
4466}; 2300};
4467 2301
4468static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = {
4469 {
4470 .pa_start = 0x40138000,
4471 .pa_end = 0x4013807f,
4472 .flags = ADDR_TYPE_RT
4473 },
4474 { }
4475};
4476
4477/* l4_abe -> timer5 */
4478static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = {
4479 .master = &omap44xx_l4_abe_hwmod,
4480 .slave = &omap44xx_timer5_hwmod,
4481 .clk = "ocp_abe_iclk",
4482 .addr = omap44xx_timer5_addrs,
4483 .user = OCP_USER_MPU,
4484};
4485
4486static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = {
4487 {
4488 .pa_start = 0x49038000,
4489 .pa_end = 0x4903807f,
4490 .flags = ADDR_TYPE_RT
4491 },
4492 { }
4493};
4494
4495/* l4_abe -> timer5 (dma) */
4496static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = {
4497 .master = &omap44xx_l4_abe_hwmod,
4498 .slave = &omap44xx_timer5_hwmod,
4499 .clk = "ocp_abe_iclk",
4500 .addr = omap44xx_timer5_dma_addrs,
4501 .user = OCP_USER_SDMA,
4502};
4503
4504/* timer5 slave ports */
4505static struct omap_hwmod_ocp_if *omap44xx_timer5_slaves[] = {
4506 &omap44xx_l4_abe__timer5,
4507 &omap44xx_l4_abe__timer5_dma,
4508};
4509
4510static struct omap_hwmod omap44xx_timer5_hwmod = { 2302static struct omap_hwmod omap44xx_timer5_hwmod = {
4511 .name = "timer5", 2303 .name = "timer5",
4512 .class = &omap44xx_timer_hwmod_class, 2304 .class = &omap44xx_timer_hwmod_class,
@@ -4521,59 +2313,14 @@ static struct omap_hwmod omap44xx_timer5_hwmod = {
4521 }, 2313 },
4522 }, 2314 },
4523 .dev_attr = &capability_alwon_dev_attr, 2315 .dev_attr = &capability_alwon_dev_attr,
4524 .slaves = omap44xx_timer5_slaves,
4525 .slaves_cnt = ARRAY_SIZE(omap44xx_timer5_slaves),
4526}; 2316};
4527 2317
4528/* timer6 */ 2318/* timer6 */
4529static struct omap_hwmod omap44xx_timer6_hwmod;
4530static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = { 2319static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = {
4531 { .irq = 42 + OMAP44XX_IRQ_GIC_START }, 2320 { .irq = 42 + OMAP44XX_IRQ_GIC_START },
4532 { .irq = -1 } 2321 { .irq = -1 }
4533}; 2322};
4534 2323
4535static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = {
4536 {
4537 .pa_start = 0x4013a000,
4538 .pa_end = 0x4013a07f,
4539 .flags = ADDR_TYPE_RT
4540 },
4541 { }
4542};
4543
4544/* l4_abe -> timer6 */
4545static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = {
4546 .master = &omap44xx_l4_abe_hwmod,
4547 .slave = &omap44xx_timer6_hwmod,
4548 .clk = "ocp_abe_iclk",
4549 .addr = omap44xx_timer6_addrs,
4550 .user = OCP_USER_MPU,
4551};
4552
4553static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = {
4554 {
4555 .pa_start = 0x4903a000,
4556 .pa_end = 0x4903a07f,
4557 .flags = ADDR_TYPE_RT
4558 },
4559 { }
4560};
4561
4562/* l4_abe -> timer6 (dma) */
4563static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = {
4564 .master = &omap44xx_l4_abe_hwmod,
4565 .slave = &omap44xx_timer6_hwmod,
4566 .clk = "ocp_abe_iclk",
4567 .addr = omap44xx_timer6_dma_addrs,
4568 .user = OCP_USER_SDMA,
4569};
4570
4571/* timer6 slave ports */
4572static struct omap_hwmod_ocp_if *omap44xx_timer6_slaves[] = {
4573 &omap44xx_l4_abe__timer6,
4574 &omap44xx_l4_abe__timer6_dma,
4575};
4576
4577static struct omap_hwmod omap44xx_timer6_hwmod = { 2324static struct omap_hwmod omap44xx_timer6_hwmod = {
4578 .name = "timer6", 2325 .name = "timer6",
4579 .class = &omap44xx_timer_hwmod_class, 2326 .class = &omap44xx_timer_hwmod_class,
@@ -4589,59 +2336,14 @@ static struct omap_hwmod omap44xx_timer6_hwmod = {
4589 }, 2336 },
4590 }, 2337 },
4591 .dev_attr = &capability_alwon_dev_attr, 2338 .dev_attr = &capability_alwon_dev_attr,
4592 .slaves = omap44xx_timer6_slaves,
4593 .slaves_cnt = ARRAY_SIZE(omap44xx_timer6_slaves),
4594}; 2339};
4595 2340
4596/* timer7 */ 2341/* timer7 */
4597static struct omap_hwmod omap44xx_timer7_hwmod;
4598static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = { 2342static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = {
4599 { .irq = 43 + OMAP44XX_IRQ_GIC_START }, 2343 { .irq = 43 + OMAP44XX_IRQ_GIC_START },
4600 { .irq = -1 } 2344 { .irq = -1 }
4601}; 2345};
4602 2346
4603static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = {
4604 {
4605 .pa_start = 0x4013c000,
4606 .pa_end = 0x4013c07f,
4607 .flags = ADDR_TYPE_RT
4608 },
4609 { }
4610};
4611
4612/* l4_abe -> timer7 */
4613static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = {
4614 .master = &omap44xx_l4_abe_hwmod,
4615 .slave = &omap44xx_timer7_hwmod,
4616 .clk = "ocp_abe_iclk",
4617 .addr = omap44xx_timer7_addrs,
4618 .user = OCP_USER_MPU,
4619};
4620
4621static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = {
4622 {
4623 .pa_start = 0x4903c000,
4624 .pa_end = 0x4903c07f,
4625 .flags = ADDR_TYPE_RT
4626 },
4627 { }
4628};
4629
4630/* l4_abe -> timer7 (dma) */
4631static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = {
4632 .master = &omap44xx_l4_abe_hwmod,
4633 .slave = &omap44xx_timer7_hwmod,
4634 .clk = "ocp_abe_iclk",
4635 .addr = omap44xx_timer7_dma_addrs,
4636 .user = OCP_USER_SDMA,
4637};
4638
4639/* timer7 slave ports */
4640static struct omap_hwmod_ocp_if *omap44xx_timer7_slaves[] = {
4641 &omap44xx_l4_abe__timer7,
4642 &omap44xx_l4_abe__timer7_dma,
4643};
4644
4645static struct omap_hwmod omap44xx_timer7_hwmod = { 2347static struct omap_hwmod omap44xx_timer7_hwmod = {
4646 .name = "timer7", 2348 .name = "timer7",
4647 .class = &omap44xx_timer_hwmod_class, 2349 .class = &omap44xx_timer_hwmod_class,
@@ -4656,59 +2358,14 @@ static struct omap_hwmod omap44xx_timer7_hwmod = {
4656 }, 2358 },
4657 }, 2359 },
4658 .dev_attr = &capability_alwon_dev_attr, 2360 .dev_attr = &capability_alwon_dev_attr,
4659 .slaves = omap44xx_timer7_slaves,
4660 .slaves_cnt = ARRAY_SIZE(omap44xx_timer7_slaves),
4661}; 2361};
4662 2362
4663/* timer8 */ 2363/* timer8 */
4664static struct omap_hwmod omap44xx_timer8_hwmod;
4665static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = { 2364static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = {
4666 { .irq = 44 + OMAP44XX_IRQ_GIC_START }, 2365 { .irq = 44 + OMAP44XX_IRQ_GIC_START },
4667 { .irq = -1 } 2366 { .irq = -1 }
4668}; 2367};
4669 2368
4670static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = {
4671 {
4672 .pa_start = 0x4013e000,
4673 .pa_end = 0x4013e07f,
4674 .flags = ADDR_TYPE_RT
4675 },
4676 { }
4677};
4678
4679/* l4_abe -> timer8 */
4680static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = {
4681 .master = &omap44xx_l4_abe_hwmod,
4682 .slave = &omap44xx_timer8_hwmod,
4683 .clk = "ocp_abe_iclk",
4684 .addr = omap44xx_timer8_addrs,
4685 .user = OCP_USER_MPU,
4686};
4687
4688static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = {
4689 {
4690 .pa_start = 0x4903e000,
4691 .pa_end = 0x4903e07f,
4692 .flags = ADDR_TYPE_RT
4693 },
4694 { }
4695};
4696
4697/* l4_abe -> timer8 (dma) */
4698static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = {
4699 .master = &omap44xx_l4_abe_hwmod,
4700 .slave = &omap44xx_timer8_hwmod,
4701 .clk = "ocp_abe_iclk",
4702 .addr = omap44xx_timer8_dma_addrs,
4703 .user = OCP_USER_SDMA,
4704};
4705
4706/* timer8 slave ports */
4707static struct omap_hwmod_ocp_if *omap44xx_timer8_slaves[] = {
4708 &omap44xx_l4_abe__timer8,
4709 &omap44xx_l4_abe__timer8_dma,
4710};
4711
4712static struct omap_hwmod omap44xx_timer8_hwmod = { 2369static struct omap_hwmod omap44xx_timer8_hwmod = {
4713 .name = "timer8", 2370 .name = "timer8",
4714 .class = &omap44xx_timer_hwmod_class, 2371 .class = &omap44xx_timer_hwmod_class,
@@ -4723,40 +2380,14 @@ static struct omap_hwmod omap44xx_timer8_hwmod = {
4723 }, 2380 },
4724 }, 2381 },
4725 .dev_attr = &capability_pwm_dev_attr, 2382 .dev_attr = &capability_pwm_dev_attr,
4726 .slaves = omap44xx_timer8_slaves,
4727 .slaves_cnt = ARRAY_SIZE(omap44xx_timer8_slaves),
4728}; 2383};
4729 2384
4730/* timer9 */ 2385/* timer9 */
4731static struct omap_hwmod omap44xx_timer9_hwmod;
4732static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = { 2386static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = {
4733 { .irq = 45 + OMAP44XX_IRQ_GIC_START }, 2387 { .irq = 45 + OMAP44XX_IRQ_GIC_START },
4734 { .irq = -1 } 2388 { .irq = -1 }
4735}; 2389};
4736 2390
4737static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = {
4738 {
4739 .pa_start = 0x4803e000,
4740 .pa_end = 0x4803e07f,
4741 .flags = ADDR_TYPE_RT
4742 },
4743 { }
4744};
4745
4746/* l4_per -> timer9 */
4747static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = {
4748 .master = &omap44xx_l4_per_hwmod,
4749 .slave = &omap44xx_timer9_hwmod,
4750 .clk = "l4_div_ck",
4751 .addr = omap44xx_timer9_addrs,
4752 .user = OCP_USER_MPU | OCP_USER_SDMA,
4753};
4754
4755/* timer9 slave ports */
4756static struct omap_hwmod_ocp_if *omap44xx_timer9_slaves[] = {
4757 &omap44xx_l4_per__timer9,
4758};
4759
4760static struct omap_hwmod omap44xx_timer9_hwmod = { 2391static struct omap_hwmod omap44xx_timer9_hwmod = {
4761 .name = "timer9", 2392 .name = "timer9",
4762 .class = &omap44xx_timer_hwmod_class, 2393 .class = &omap44xx_timer_hwmod_class,
@@ -4771,40 +2402,14 @@ static struct omap_hwmod omap44xx_timer9_hwmod = {
4771 }, 2402 },
4772 }, 2403 },
4773 .dev_attr = &capability_pwm_dev_attr, 2404 .dev_attr = &capability_pwm_dev_attr,
4774 .slaves = omap44xx_timer9_slaves,
4775 .slaves_cnt = ARRAY_SIZE(omap44xx_timer9_slaves),
4776}; 2405};
4777 2406
4778/* timer10 */ 2407/* timer10 */
4779static struct omap_hwmod omap44xx_timer10_hwmod;
4780static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = { 2408static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = {
4781 { .irq = 46 + OMAP44XX_IRQ_GIC_START }, 2409 { .irq = 46 + OMAP44XX_IRQ_GIC_START },
4782 { .irq = -1 } 2410 { .irq = -1 }
4783}; 2411};
4784 2412
4785static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = {
4786 {
4787 .pa_start = 0x48086000,
4788 .pa_end = 0x4808607f,
4789 .flags = ADDR_TYPE_RT
4790 },
4791 { }
4792};
4793
4794/* l4_per -> timer10 */
4795static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = {
4796 .master = &omap44xx_l4_per_hwmod,
4797 .slave = &omap44xx_timer10_hwmod,
4798 .clk = "l4_div_ck",
4799 .addr = omap44xx_timer10_addrs,
4800 .user = OCP_USER_MPU | OCP_USER_SDMA,
4801};
4802
4803/* timer10 slave ports */
4804static struct omap_hwmod_ocp_if *omap44xx_timer10_slaves[] = {
4805 &omap44xx_l4_per__timer10,
4806};
4807
4808static struct omap_hwmod omap44xx_timer10_hwmod = { 2413static struct omap_hwmod omap44xx_timer10_hwmod = {
4809 .name = "timer10", 2414 .name = "timer10",
4810 .class = &omap44xx_timer_1ms_hwmod_class, 2415 .class = &omap44xx_timer_1ms_hwmod_class,
@@ -4819,40 +2424,14 @@ static struct omap_hwmod omap44xx_timer10_hwmod = {
4819 }, 2424 },
4820 }, 2425 },
4821 .dev_attr = &capability_pwm_dev_attr, 2426 .dev_attr = &capability_pwm_dev_attr,
4822 .slaves = omap44xx_timer10_slaves,
4823 .slaves_cnt = ARRAY_SIZE(omap44xx_timer10_slaves),
4824}; 2427};
4825 2428
4826/* timer11 */ 2429/* timer11 */
4827static struct omap_hwmod omap44xx_timer11_hwmod;
4828static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = { 2430static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = {
4829 { .irq = 47 + OMAP44XX_IRQ_GIC_START }, 2431 { .irq = 47 + OMAP44XX_IRQ_GIC_START },
4830 { .irq = -1 } 2432 { .irq = -1 }
4831}; 2433};
4832 2434
4833static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = {
4834 {
4835 .pa_start = 0x48088000,
4836 .pa_end = 0x4808807f,
4837 .flags = ADDR_TYPE_RT
4838 },
4839 { }
4840};
4841
4842/* l4_per -> timer11 */
4843static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = {
4844 .master = &omap44xx_l4_per_hwmod,
4845 .slave = &omap44xx_timer11_hwmod,
4846 .clk = "l4_div_ck",
4847 .addr = omap44xx_timer11_addrs,
4848 .user = OCP_USER_MPU | OCP_USER_SDMA,
4849};
4850
4851/* timer11 slave ports */
4852static struct omap_hwmod_ocp_if *omap44xx_timer11_slaves[] = {
4853 &omap44xx_l4_per__timer11,
4854};
4855
4856static struct omap_hwmod omap44xx_timer11_hwmod = { 2435static struct omap_hwmod omap44xx_timer11_hwmod = {
4857 .name = "timer11", 2436 .name = "timer11",
4858 .class = &omap44xx_timer_hwmod_class, 2437 .class = &omap44xx_timer_hwmod_class,
@@ -4867,8 +2446,6 @@ static struct omap_hwmod omap44xx_timer11_hwmod = {
4867 }, 2446 },
4868 }, 2447 },
4869 .dev_attr = &capability_pwm_dev_attr, 2448 .dev_attr = &capability_pwm_dev_attr,
4870 .slaves = omap44xx_timer11_slaves,
4871 .slaves_cnt = ARRAY_SIZE(omap44xx_timer11_slaves),
4872}; 2449};
4873 2450
4874/* 2451/*
@@ -4894,7 +2471,6 @@ static struct omap_hwmod_class omap44xx_uart_hwmod_class = {
4894}; 2471};
4895 2472
4896/* uart1 */ 2473/* uart1 */
4897static struct omap_hwmod omap44xx_uart1_hwmod;
4898static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = { 2474static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = {
4899 { .irq = 72 + OMAP44XX_IRQ_GIC_START }, 2475 { .irq = 72 + OMAP44XX_IRQ_GIC_START },
4900 { .irq = -1 } 2476 { .irq = -1 }
@@ -4906,29 +2482,6 @@ static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = {
4906 { .dma_req = -1 } 2482 { .dma_req = -1 }
4907}; 2483};
4908 2484
4909static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
4910 {
4911 .pa_start = 0x4806a000,
4912 .pa_end = 0x4806a0ff,
4913 .flags = ADDR_TYPE_RT
4914 },
4915 { }
4916};
4917
4918/* l4_per -> uart1 */
4919static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
4920 .master = &omap44xx_l4_per_hwmod,
4921 .slave = &omap44xx_uart1_hwmod,
4922 .clk = "l4_div_ck",
4923 .addr = omap44xx_uart1_addrs,
4924 .user = OCP_USER_MPU | OCP_USER_SDMA,
4925};
4926
4927/* uart1 slave ports */
4928static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = {
4929 &omap44xx_l4_per__uart1,
4930};
4931
4932static struct omap_hwmod omap44xx_uart1_hwmod = { 2485static struct omap_hwmod omap44xx_uart1_hwmod = {
4933 .name = "uart1", 2486 .name = "uart1",
4934 .class = &omap44xx_uart_hwmod_class, 2487 .class = &omap44xx_uart_hwmod_class,
@@ -4943,12 +2496,9 @@ static struct omap_hwmod omap44xx_uart1_hwmod = {
4943 .modulemode = MODULEMODE_SWCTRL, 2496 .modulemode = MODULEMODE_SWCTRL,
4944 }, 2497 },
4945 }, 2498 },
4946 .slaves = omap44xx_uart1_slaves,
4947 .slaves_cnt = ARRAY_SIZE(omap44xx_uart1_slaves),
4948}; 2499};
4949 2500
4950/* uart2 */ 2501/* uart2 */
4951static struct omap_hwmod omap44xx_uart2_hwmod;
4952static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = { 2502static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = {
4953 { .irq = 73 + OMAP44XX_IRQ_GIC_START }, 2503 { .irq = 73 + OMAP44XX_IRQ_GIC_START },
4954 { .irq = -1 } 2504 { .irq = -1 }
@@ -4960,29 +2510,6 @@ static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = {
4960 { .dma_req = -1 } 2510 { .dma_req = -1 }
4961}; 2511};
4962 2512
4963static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
4964 {
4965 .pa_start = 0x4806c000,
4966 .pa_end = 0x4806c0ff,
4967 .flags = ADDR_TYPE_RT
4968 },
4969 { }
4970};
4971
4972/* l4_per -> uart2 */
4973static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
4974 .master = &omap44xx_l4_per_hwmod,
4975 .slave = &omap44xx_uart2_hwmod,
4976 .clk = "l4_div_ck",
4977 .addr = omap44xx_uart2_addrs,
4978 .user = OCP_USER_MPU | OCP_USER_SDMA,
4979};
4980
4981/* uart2 slave ports */
4982static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = {
4983 &omap44xx_l4_per__uart2,
4984};
4985
4986static struct omap_hwmod omap44xx_uart2_hwmod = { 2513static struct omap_hwmod omap44xx_uart2_hwmod = {
4987 .name = "uart2", 2514 .name = "uart2",
4988 .class = &omap44xx_uart_hwmod_class, 2515 .class = &omap44xx_uart_hwmod_class,
@@ -4997,12 +2524,9 @@ static struct omap_hwmod omap44xx_uart2_hwmod = {
4997 .modulemode = MODULEMODE_SWCTRL, 2524 .modulemode = MODULEMODE_SWCTRL,
4998 }, 2525 },
4999 }, 2526 },
5000 .slaves = omap44xx_uart2_slaves,
5001 .slaves_cnt = ARRAY_SIZE(omap44xx_uart2_slaves),
5002}; 2527};
5003 2528
5004/* uart3 */ 2529/* uart3 */
5005static struct omap_hwmod omap44xx_uart3_hwmod;
5006static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = { 2530static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = {
5007 { .irq = 74 + OMAP44XX_IRQ_GIC_START }, 2531 { .irq = 74 + OMAP44XX_IRQ_GIC_START },
5008 { .irq = -1 } 2532 { .irq = -1 }
@@ -5014,29 +2538,6 @@ static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = {
5014 { .dma_req = -1 } 2538 { .dma_req = -1 }
5015}; 2539};
5016 2540
5017static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
5018 {
5019 .pa_start = 0x48020000,
5020 .pa_end = 0x480200ff,
5021 .flags = ADDR_TYPE_RT
5022 },
5023 { }
5024};
5025
5026/* l4_per -> uart3 */
5027static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
5028 .master = &omap44xx_l4_per_hwmod,
5029 .slave = &omap44xx_uart3_hwmod,
5030 .clk = "l4_div_ck",
5031 .addr = omap44xx_uart3_addrs,
5032 .user = OCP_USER_MPU | OCP_USER_SDMA,
5033};
5034
5035/* uart3 slave ports */
5036static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = {
5037 &omap44xx_l4_per__uart3,
5038};
5039
5040static struct omap_hwmod omap44xx_uart3_hwmod = { 2541static struct omap_hwmod omap44xx_uart3_hwmod = {
5041 .name = "uart3", 2542 .name = "uart3",
5042 .class = &omap44xx_uart_hwmod_class, 2543 .class = &omap44xx_uart_hwmod_class,
@@ -5052,12 +2553,9 @@ static struct omap_hwmod omap44xx_uart3_hwmod = {
5052 .modulemode = MODULEMODE_SWCTRL, 2553 .modulemode = MODULEMODE_SWCTRL,
5053 }, 2554 },
5054 }, 2555 },
5055 .slaves = omap44xx_uart3_slaves,
5056 .slaves_cnt = ARRAY_SIZE(omap44xx_uart3_slaves),
5057}; 2556};
5058 2557
5059/* uart4 */ 2558/* uart4 */
5060static struct omap_hwmod omap44xx_uart4_hwmod;
5061static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = { 2559static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = {
5062 { .irq = 70 + OMAP44XX_IRQ_GIC_START }, 2560 { .irq = 70 + OMAP44XX_IRQ_GIC_START },
5063 { .irq = -1 } 2561 { .irq = -1 }
@@ -5069,29 +2567,6 @@ static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = {
5069 { .dma_req = -1 } 2567 { .dma_req = -1 }
5070}; 2568};
5071 2569
5072static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
5073 {
5074 .pa_start = 0x4806e000,
5075 .pa_end = 0x4806e0ff,
5076 .flags = ADDR_TYPE_RT
5077 },
5078 { }
5079};
5080
5081/* l4_per -> uart4 */
5082static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
5083 .master = &omap44xx_l4_per_hwmod,
5084 .slave = &omap44xx_uart4_hwmod,
5085 .clk = "l4_div_ck",
5086 .addr = omap44xx_uart4_addrs,
5087 .user = OCP_USER_MPU | OCP_USER_SDMA,
5088};
5089
5090/* uart4 slave ports */
5091static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = {
5092 &omap44xx_l4_per__uart4,
5093};
5094
5095static struct omap_hwmod omap44xx_uart4_hwmod = { 2570static struct omap_hwmod omap44xx_uart4_hwmod = {
5096 .name = "uart4", 2571 .name = "uart4",
5097 .class = &omap44xx_uart_hwmod_class, 2572 .class = &omap44xx_uart_hwmod_class,
@@ -5106,8 +2581,98 @@ static struct omap_hwmod omap44xx_uart4_hwmod = {
5106 .modulemode = MODULEMODE_SWCTRL, 2581 .modulemode = MODULEMODE_SWCTRL,
5107 }, 2582 },
5108 }, 2583 },
5109 .slaves = omap44xx_uart4_slaves, 2584};
5110 .slaves_cnt = ARRAY_SIZE(omap44xx_uart4_slaves), 2585
2586/*
2587 * 'usb_host_hs' class
2588 * high-speed multi-port usb host controller
2589 */
2590
2591static struct omap_hwmod_class_sysconfig omap44xx_usb_host_hs_sysc = {
2592 .rev_offs = 0x0000,
2593 .sysc_offs = 0x0010,
2594 .syss_offs = 0x0014,
2595 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
2596 SYSC_HAS_SOFTRESET),
2597 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2598 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
2599 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
2600 .sysc_fields = &omap_hwmod_sysc_type2,
2601};
2602
2603static struct omap_hwmod_class omap44xx_usb_host_hs_hwmod_class = {
2604 .name = "usb_host_hs",
2605 .sysc = &omap44xx_usb_host_hs_sysc,
2606};
2607
2608/* usb_host_hs */
2609static struct omap_hwmod_irq_info omap44xx_usb_host_hs_irqs[] = {
2610 { .name = "ohci-irq", .irq = 76 + OMAP44XX_IRQ_GIC_START },
2611 { .name = "ehci-irq", .irq = 77 + OMAP44XX_IRQ_GIC_START },
2612 { .irq = -1 }
2613};
2614
2615static struct omap_hwmod omap44xx_usb_host_hs_hwmod = {
2616 .name = "usb_host_hs",
2617 .class = &omap44xx_usb_host_hs_hwmod_class,
2618 .clkdm_name = "l3_init_clkdm",
2619 .main_clk = "usb_host_hs_fck",
2620 .prcm = {
2621 .omap4 = {
2622 .clkctrl_offs = OMAP4_CM_L3INIT_USB_HOST_CLKCTRL_OFFSET,
2623 .context_offs = OMAP4_RM_L3INIT_USB_HOST_CONTEXT_OFFSET,
2624 .modulemode = MODULEMODE_SWCTRL,
2625 },
2626 },
2627 .mpu_irqs = omap44xx_usb_host_hs_irqs,
2628
2629 /*
2630 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
2631 * id: i660
2632 *
2633 * Description:
2634 * In the following configuration :
2635 * - USBHOST module is set to smart-idle mode
2636 * - PRCM asserts idle_req to the USBHOST module ( This typically
2637 * happens when the system is going to a low power mode : all ports
2638 * have been suspended, the master part of the USBHOST module has
2639 * entered the standby state, and SW has cut the functional clocks)
2640 * - an USBHOST interrupt occurs before the module is able to answer
2641 * idle_ack, typically a remote wakeup IRQ.
2642 * Then the USB HOST module will enter a deadlock situation where it
2643 * is no more accessible nor functional.
2644 *
2645 * Workaround:
2646 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
2647 */
2648
2649 /*
2650 * Errata: USB host EHCI may stall when entering smart-standby mode
2651 * Id: i571
2652 *
2653 * Description:
2654 * When the USBHOST module is set to smart-standby mode, and when it is
2655 * ready to enter the standby state (i.e. all ports are suspended and
2656 * all attached devices are in suspend mode), then it can wrongly assert
2657 * the Mstandby signal too early while there are still some residual OCP
2658 * transactions ongoing. If this condition occurs, the internal state
2659 * machine may go to an undefined state and the USB link may be stuck
2660 * upon the next resume.
2661 *
2662 * Workaround:
2663 * Don't use smart standby; use only force standby,
2664 * hence HWMOD_SWSUP_MSTANDBY
2665 */
2666
2667 /*
2668 * During system boot; If the hwmod framework resets the module
2669 * the module will have smart idle settings; which can lead to deadlock
2670 * (above Errata Id:i660); so, dont reset the module during boot;
2671 * Use HWMOD_INIT_NO_RESET.
2672 */
2673
2674 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
2675 HWMOD_INIT_NO_RESET,
5111}; 2676};
5112 2677
5113/* 2678/*
@@ -5140,34 +2705,6 @@ static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = {
5140 { .irq = -1 } 2705 { .irq = -1 }
5141}; 2706};
5142 2707
5143/* usb_otg_hs master ports */
5144static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_masters[] = {
5145 &omap44xx_usb_otg_hs__l3_main_2,
5146};
5147
5148static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
5149 {
5150 .pa_start = 0x4a0ab000,
5151 .pa_end = 0x4a0ab003,
5152 .flags = ADDR_TYPE_RT
5153 },
5154 { }
5155};
5156
5157/* l4_cfg -> usb_otg_hs */
5158static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = {
5159 .master = &omap44xx_l4_cfg_hwmod,
5160 .slave = &omap44xx_usb_otg_hs_hwmod,
5161 .clk = "l4_div_ck",
5162 .addr = omap44xx_usb_otg_hs_addrs,
5163 .user = OCP_USER_MPU | OCP_USER_SDMA,
5164};
5165
5166/* usb_otg_hs slave ports */
5167static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_slaves[] = {
5168 &omap44xx_l4_cfg__usb_otg_hs,
5169};
5170
5171static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = { 2708static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = {
5172 { .role = "xclk", .clk = "usb_otg_hs_xclk" }, 2709 { .role = "xclk", .clk = "usb_otg_hs_xclk" },
5173}; 2710};
@@ -5188,10 +2725,47 @@ static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = {
5188 }, 2725 },
5189 .opt_clks = usb_otg_hs_opt_clks, 2726 .opt_clks = usb_otg_hs_opt_clks,
5190 .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks), 2727 .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks),
5191 .slaves = omap44xx_usb_otg_hs_slaves, 2728};
5192 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves), 2729
5193 .masters = omap44xx_usb_otg_hs_masters, 2730/*
5194 .masters_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_masters), 2731 * 'usb_tll_hs' class
2732 * usb_tll_hs module is the adapter on the usb_host_hs ports
2733 */
2734
2735static struct omap_hwmod_class_sysconfig omap44xx_usb_tll_hs_sysc = {
2736 .rev_offs = 0x0000,
2737 .sysc_offs = 0x0010,
2738 .syss_offs = 0x0014,
2739 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2740 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2741 SYSC_HAS_AUTOIDLE),
2742 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2743 .sysc_fields = &omap_hwmod_sysc_type1,
2744};
2745
2746static struct omap_hwmod_class omap44xx_usb_tll_hs_hwmod_class = {
2747 .name = "usb_tll_hs",
2748 .sysc = &omap44xx_usb_tll_hs_sysc,
2749};
2750
2751static struct omap_hwmod_irq_info omap44xx_usb_tll_hs_irqs[] = {
2752 { .name = "tll-irq", .irq = 78 + OMAP44XX_IRQ_GIC_START },
2753 { .irq = -1 }
2754};
2755
2756static struct omap_hwmod omap44xx_usb_tll_hs_hwmod = {
2757 .name = "usb_tll_hs",
2758 .class = &omap44xx_usb_tll_hs_hwmod_class,
2759 .clkdm_name = "l3_init_clkdm",
2760 .mpu_irqs = omap44xx_usb_tll_hs_irqs,
2761 .main_clk = "usb_tll_hs_ick",
2762 .prcm = {
2763 .omap4 = {
2764 .clkctrl_offs = OMAP4_CM_L3INIT_USB_TLL_CLKCTRL_OFFSET,
2765 .context_offs = OMAP4_RM_L3INIT_USB_TLL_CONTEXT_OFFSET,
2766 .modulemode = MODULEMODE_HWCTRL,
2767 },
2768 },
5195}; 2769};
5196 2770
5197/* 2771/*
@@ -5218,35 +2792,11 @@ static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
5218}; 2792};
5219 2793
5220/* wd_timer2 */ 2794/* wd_timer2 */
5221static struct omap_hwmod omap44xx_wd_timer2_hwmod;
5222static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = { 2795static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = {
5223 { .irq = 80 + OMAP44XX_IRQ_GIC_START }, 2796 { .irq = 80 + OMAP44XX_IRQ_GIC_START },
5224 { .irq = -1 } 2797 { .irq = -1 }
5225}; 2798};
5226 2799
5227static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
5228 {
5229 .pa_start = 0x4a314000,
5230 .pa_end = 0x4a31407f,
5231 .flags = ADDR_TYPE_RT
5232 },
5233 { }
5234};
5235
5236/* l4_wkup -> wd_timer2 */
5237static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
5238 .master = &omap44xx_l4_wkup_hwmod,
5239 .slave = &omap44xx_wd_timer2_hwmod,
5240 .clk = "l4_wkup_clk_mux_ck",
5241 .addr = omap44xx_wd_timer2_addrs,
5242 .user = OCP_USER_MPU | OCP_USER_SDMA,
5243};
5244
5245/* wd_timer2 slave ports */
5246static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = {
5247 &omap44xx_l4_wkup__wd_timer2,
5248};
5249
5250static struct omap_hwmod omap44xx_wd_timer2_hwmod = { 2800static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
5251 .name = "wd_timer2", 2801 .name = "wd_timer2",
5252 .class = &omap44xx_wd_timer_hwmod_class, 2802 .class = &omap44xx_wd_timer_hwmod_class,
@@ -5260,106 +2810,1746 @@ static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
5260 .modulemode = MODULEMODE_SWCTRL, 2810 .modulemode = MODULEMODE_SWCTRL,
5261 }, 2811 },
5262 }, 2812 },
5263 .slaves = omap44xx_wd_timer2_slaves,
5264 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer2_slaves),
5265}; 2813};
5266 2814
5267/* wd_timer3 */ 2815/* wd_timer3 */
5268static struct omap_hwmod omap44xx_wd_timer3_hwmod;
5269static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = { 2816static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = {
5270 { .irq = 36 + OMAP44XX_IRQ_GIC_START }, 2817 { .irq = 36 + OMAP44XX_IRQ_GIC_START },
5271 { .irq = -1 } 2818 { .irq = -1 }
5272}; 2819};
5273 2820
5274static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = { 2821static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
2822 .name = "wd_timer3",
2823 .class = &omap44xx_wd_timer_hwmod_class,
2824 .clkdm_name = "abe_clkdm",
2825 .mpu_irqs = omap44xx_wd_timer3_irqs,
2826 .main_clk = "wd_timer3_fck",
2827 .prcm = {
2828 .omap4 = {
2829 .clkctrl_offs = OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET,
2830 .context_offs = OMAP4_RM_ABE_WDT3_CONTEXT_OFFSET,
2831 .modulemode = MODULEMODE_SWCTRL,
2832 },
2833 },
2834};
2835
2836
2837/*
2838 * interfaces
2839 */
2840
2841/* l3_main_1 -> dmm */
2842static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
2843 .master = &omap44xx_l3_main_1_hwmod,
2844 .slave = &omap44xx_dmm_hwmod,
2845 .clk = "l3_div_ck",
2846 .user = OCP_USER_SDMA,
2847};
2848
2849static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = {
5275 { 2850 {
5276 .pa_start = 0x40130000, 2851 .pa_start = 0x4e000000,
5277 .pa_end = 0x4013007f, 2852 .pa_end = 0x4e0007ff,
5278 .flags = ADDR_TYPE_RT 2853 .flags = ADDR_TYPE_RT
5279 }, 2854 },
5280 { } 2855 { }
5281}; 2856};
5282 2857
5283/* l4_abe -> wd_timer3 */ 2858/* mpu -> dmm */
5284static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = { 2859static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
2860 .master = &omap44xx_mpu_hwmod,
2861 .slave = &omap44xx_dmm_hwmod,
2862 .clk = "l3_div_ck",
2863 .addr = omap44xx_dmm_addrs,
2864 .user = OCP_USER_MPU,
2865};
2866
2867/* dmm -> emif_fw */
2868static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
2869 .master = &omap44xx_dmm_hwmod,
2870 .slave = &omap44xx_emif_fw_hwmod,
2871 .clk = "l3_div_ck",
2872 .user = OCP_USER_MPU | OCP_USER_SDMA,
2873};
2874
2875static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = {
2876 {
2877 .pa_start = 0x4a20c000,
2878 .pa_end = 0x4a20c0ff,
2879 .flags = ADDR_TYPE_RT
2880 },
2881 { }
2882};
2883
2884/* l4_cfg -> emif_fw */
2885static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = {
2886 .master = &omap44xx_l4_cfg_hwmod,
2887 .slave = &omap44xx_emif_fw_hwmod,
2888 .clk = "l4_div_ck",
2889 .addr = omap44xx_emif_fw_addrs,
2890 .user = OCP_USER_MPU,
2891};
2892
2893/* iva -> l3_instr */
2894static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = {
2895 .master = &omap44xx_iva_hwmod,
2896 .slave = &omap44xx_l3_instr_hwmod,
2897 .clk = "l3_div_ck",
2898 .user = OCP_USER_MPU | OCP_USER_SDMA,
2899};
2900
2901/* l3_main_3 -> l3_instr */
2902static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = {
2903 .master = &omap44xx_l3_main_3_hwmod,
2904 .slave = &omap44xx_l3_instr_hwmod,
2905 .clk = "l3_div_ck",
2906 .user = OCP_USER_MPU | OCP_USER_SDMA,
2907};
2908
2909/* dsp -> l3_main_1 */
2910static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = {
2911 .master = &omap44xx_dsp_hwmod,
2912 .slave = &omap44xx_l3_main_1_hwmod,
2913 .clk = "l3_div_ck",
2914 .user = OCP_USER_MPU | OCP_USER_SDMA,
2915};
2916
2917/* dss -> l3_main_1 */
2918static struct omap_hwmod_ocp_if omap44xx_dss__l3_main_1 = {
2919 .master = &omap44xx_dss_hwmod,
2920 .slave = &omap44xx_l3_main_1_hwmod,
2921 .clk = "l3_div_ck",
2922 .user = OCP_USER_MPU | OCP_USER_SDMA,
2923};
2924
2925/* l3_main_2 -> l3_main_1 */
2926static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = {
2927 .master = &omap44xx_l3_main_2_hwmod,
2928 .slave = &omap44xx_l3_main_1_hwmod,
2929 .clk = "l3_div_ck",
2930 .user = OCP_USER_MPU | OCP_USER_SDMA,
2931};
2932
2933/* l4_cfg -> l3_main_1 */
2934static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = {
2935 .master = &omap44xx_l4_cfg_hwmod,
2936 .slave = &omap44xx_l3_main_1_hwmod,
2937 .clk = "l4_div_ck",
2938 .user = OCP_USER_MPU | OCP_USER_SDMA,
2939};
2940
2941/* mmc1 -> l3_main_1 */
2942static struct omap_hwmod_ocp_if omap44xx_mmc1__l3_main_1 = {
2943 .master = &omap44xx_mmc1_hwmod,
2944 .slave = &omap44xx_l3_main_1_hwmod,
2945 .clk = "l3_div_ck",
2946 .user = OCP_USER_MPU | OCP_USER_SDMA,
2947};
2948
2949/* mmc2 -> l3_main_1 */
2950static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = {
2951 .master = &omap44xx_mmc2_hwmod,
2952 .slave = &omap44xx_l3_main_1_hwmod,
2953 .clk = "l3_div_ck",
2954 .user = OCP_USER_MPU | OCP_USER_SDMA,
2955};
2956
2957static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = {
2958 {
2959 .pa_start = 0x44000000,
2960 .pa_end = 0x44000fff,
2961 .flags = ADDR_TYPE_RT
2962 },
2963 { }
2964};
2965
2966/* mpu -> l3_main_1 */
2967static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
2968 .master = &omap44xx_mpu_hwmod,
2969 .slave = &omap44xx_l3_main_1_hwmod,
2970 .clk = "l3_div_ck",
2971 .addr = omap44xx_l3_main_1_addrs,
2972 .user = OCP_USER_MPU,
2973};
2974
2975/* dma_system -> l3_main_2 */
2976static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
2977 .master = &omap44xx_dma_system_hwmod,
2978 .slave = &omap44xx_l3_main_2_hwmod,
2979 .clk = "l3_div_ck",
2980 .user = OCP_USER_MPU | OCP_USER_SDMA,
2981};
2982
2983/* hsi -> l3_main_2 */
2984static struct omap_hwmod_ocp_if omap44xx_hsi__l3_main_2 = {
2985 .master = &omap44xx_hsi_hwmod,
2986 .slave = &omap44xx_l3_main_2_hwmod,
2987 .clk = "l3_div_ck",
2988 .user = OCP_USER_MPU | OCP_USER_SDMA,
2989};
2990
2991/* ipu -> l3_main_2 */
2992static struct omap_hwmod_ocp_if omap44xx_ipu__l3_main_2 = {
2993 .master = &omap44xx_ipu_hwmod,
2994 .slave = &omap44xx_l3_main_2_hwmod,
2995 .clk = "l3_div_ck",
2996 .user = OCP_USER_MPU | OCP_USER_SDMA,
2997};
2998
2999/* iss -> l3_main_2 */
3000static struct omap_hwmod_ocp_if omap44xx_iss__l3_main_2 = {
3001 .master = &omap44xx_iss_hwmod,
3002 .slave = &omap44xx_l3_main_2_hwmod,
3003 .clk = "l3_div_ck",
3004 .user = OCP_USER_MPU | OCP_USER_SDMA,
3005};
3006
3007/* iva -> l3_main_2 */
3008static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = {
3009 .master = &omap44xx_iva_hwmod,
3010 .slave = &omap44xx_l3_main_2_hwmod,
3011 .clk = "l3_div_ck",
3012 .user = OCP_USER_MPU | OCP_USER_SDMA,
3013};
3014
3015static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = {
3016 {
3017 .pa_start = 0x44800000,
3018 .pa_end = 0x44801fff,
3019 .flags = ADDR_TYPE_RT
3020 },
3021 { }
3022};
3023
3024/* l3_main_1 -> l3_main_2 */
3025static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
3026 .master = &omap44xx_l3_main_1_hwmod,
3027 .slave = &omap44xx_l3_main_2_hwmod,
3028 .clk = "l3_div_ck",
3029 .addr = omap44xx_l3_main_2_addrs,
3030 .user = OCP_USER_MPU,
3031};
3032
3033/* l4_cfg -> l3_main_2 */
3034static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = {
3035 .master = &omap44xx_l4_cfg_hwmod,
3036 .slave = &omap44xx_l3_main_2_hwmod,
3037 .clk = "l4_div_ck",
3038 .user = OCP_USER_MPU | OCP_USER_SDMA,
3039};
3040
3041/* usb_host_hs -> l3_main_2 */
3042static struct omap_hwmod_ocp_if omap44xx_usb_host_hs__l3_main_2 = {
3043 .master = &omap44xx_usb_host_hs_hwmod,
3044 .slave = &omap44xx_l3_main_2_hwmod,
3045 .clk = "l3_div_ck",
3046 .user = OCP_USER_MPU | OCP_USER_SDMA,
3047};
3048
3049/* usb_otg_hs -> l3_main_2 */
3050static struct omap_hwmod_ocp_if omap44xx_usb_otg_hs__l3_main_2 = {
3051 .master = &omap44xx_usb_otg_hs_hwmod,
3052 .slave = &omap44xx_l3_main_2_hwmod,
3053 .clk = "l3_div_ck",
3054 .user = OCP_USER_MPU | OCP_USER_SDMA,
3055};
3056
3057static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = {
3058 {
3059 .pa_start = 0x45000000,
3060 .pa_end = 0x45000fff,
3061 .flags = ADDR_TYPE_RT
3062 },
3063 { }
3064};
3065
3066/* l3_main_1 -> l3_main_3 */
3067static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
3068 .master = &omap44xx_l3_main_1_hwmod,
3069 .slave = &omap44xx_l3_main_3_hwmod,
3070 .clk = "l3_div_ck",
3071 .addr = omap44xx_l3_main_3_addrs,
3072 .user = OCP_USER_MPU,
3073};
3074
3075/* l3_main_2 -> l3_main_3 */
3076static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = {
3077 .master = &omap44xx_l3_main_2_hwmod,
3078 .slave = &omap44xx_l3_main_3_hwmod,
3079 .clk = "l3_div_ck",
3080 .user = OCP_USER_MPU | OCP_USER_SDMA,
3081};
3082
3083/* l4_cfg -> l3_main_3 */
3084static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = {
3085 .master = &omap44xx_l4_cfg_hwmod,
3086 .slave = &omap44xx_l3_main_3_hwmod,
3087 .clk = "l4_div_ck",
3088 .user = OCP_USER_MPU | OCP_USER_SDMA,
3089};
3090
3091/* aess -> l4_abe */
3092static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = {
3093 .master = &omap44xx_aess_hwmod,
3094 .slave = &omap44xx_l4_abe_hwmod,
3095 .clk = "ocp_abe_iclk",
3096 .user = OCP_USER_MPU | OCP_USER_SDMA,
3097};
3098
3099/* dsp -> l4_abe */
3100static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = {
3101 .master = &omap44xx_dsp_hwmod,
3102 .slave = &omap44xx_l4_abe_hwmod,
3103 .clk = "ocp_abe_iclk",
3104 .user = OCP_USER_MPU | OCP_USER_SDMA,
3105};
3106
3107/* l3_main_1 -> l4_abe */
3108static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = {
3109 .master = &omap44xx_l3_main_1_hwmod,
3110 .slave = &omap44xx_l4_abe_hwmod,
3111 .clk = "l3_div_ck",
3112 .user = OCP_USER_MPU | OCP_USER_SDMA,
3113};
3114
3115/* mpu -> l4_abe */
3116static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = {
3117 .master = &omap44xx_mpu_hwmod,
3118 .slave = &omap44xx_l4_abe_hwmod,
3119 .clk = "ocp_abe_iclk",
3120 .user = OCP_USER_MPU | OCP_USER_SDMA,
3121};
3122
3123/* l3_main_1 -> l4_cfg */
3124static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
3125 .master = &omap44xx_l3_main_1_hwmod,
3126 .slave = &omap44xx_l4_cfg_hwmod,
3127 .clk = "l3_div_ck",
3128 .user = OCP_USER_MPU | OCP_USER_SDMA,
3129};
3130
3131/* l3_main_2 -> l4_per */
3132static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = {
3133 .master = &omap44xx_l3_main_2_hwmod,
3134 .slave = &omap44xx_l4_per_hwmod,
3135 .clk = "l3_div_ck",
3136 .user = OCP_USER_MPU | OCP_USER_SDMA,
3137};
3138
3139/* l4_cfg -> l4_wkup */
3140static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = {
3141 .master = &omap44xx_l4_cfg_hwmod,
3142 .slave = &omap44xx_l4_wkup_hwmod,
3143 .clk = "l4_div_ck",
3144 .user = OCP_USER_MPU | OCP_USER_SDMA,
3145};
3146
3147/* mpu -> mpu_private */
3148static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
3149 .master = &omap44xx_mpu_hwmod,
3150 .slave = &omap44xx_mpu_private_hwmod,
3151 .clk = "l3_div_ck",
3152 .user = OCP_USER_MPU | OCP_USER_SDMA,
3153};
3154
3155static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = {
3156 {
3157 .pa_start = 0x401f1000,
3158 .pa_end = 0x401f13ff,
3159 .flags = ADDR_TYPE_RT
3160 },
3161 { }
3162};
3163
3164/* l4_abe -> aess */
3165static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = {
5285 .master = &omap44xx_l4_abe_hwmod, 3166 .master = &omap44xx_l4_abe_hwmod,
5286 .slave = &omap44xx_wd_timer3_hwmod, 3167 .slave = &omap44xx_aess_hwmod,
5287 .clk = "ocp_abe_iclk", 3168 .clk = "ocp_abe_iclk",
5288 .addr = omap44xx_wd_timer3_addrs, 3169 .addr = omap44xx_aess_addrs,
5289 .user = OCP_USER_MPU, 3170 .user = OCP_USER_MPU,
5290}; 3171};
5291 3172
5292static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = { 3173static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = {
5293 { 3174 {
5294 .pa_start = 0x49030000, 3175 .pa_start = 0x490f1000,
5295 .pa_end = 0x4903007f, 3176 .pa_end = 0x490f13ff,
5296 .flags = ADDR_TYPE_RT 3177 .flags = ADDR_TYPE_RT
5297 }, 3178 },
5298 { } 3179 { }
5299}; 3180};
5300 3181
5301/* l4_abe -> wd_timer3 (dma) */ 3182/* l4_abe -> aess (dma) */
5302static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = { 3183static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = {
5303 .master = &omap44xx_l4_abe_hwmod, 3184 .master = &omap44xx_l4_abe_hwmod,
5304 .slave = &omap44xx_wd_timer3_hwmod, 3185 .slave = &omap44xx_aess_hwmod,
5305 .clk = "ocp_abe_iclk", 3186 .clk = "ocp_abe_iclk",
5306 .addr = omap44xx_wd_timer3_dma_addrs, 3187 .addr = omap44xx_aess_dma_addrs,
5307 .user = OCP_USER_SDMA, 3188 .user = OCP_USER_SDMA,
5308}; 3189};
5309 3190
5310/* wd_timer3 slave ports */ 3191static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = {
5311static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = { 3192 {
5312 &omap44xx_l4_abe__wd_timer3, 3193 .pa_start = 0x4a304000,
5313 &omap44xx_l4_abe__wd_timer3_dma, 3194 .pa_end = 0x4a30401f,
3195 .flags = ADDR_TYPE_RT
3196 },
3197 { }
5314}; 3198};
5315 3199
5316static struct omap_hwmod omap44xx_wd_timer3_hwmod = { 3200/* l4_wkup -> counter_32k */
5317 .name = "wd_timer3", 3201static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = {
5318 .class = &omap44xx_wd_timer_hwmod_class, 3202 .master = &omap44xx_l4_wkup_hwmod,
5319 .clkdm_name = "abe_clkdm", 3203 .slave = &omap44xx_counter_32k_hwmod,
5320 .mpu_irqs = omap44xx_wd_timer3_irqs, 3204 .clk = "l4_wkup_clk_mux_ck",
5321 .main_clk = "wd_timer3_fck", 3205 .addr = omap44xx_counter_32k_addrs,
5322 .prcm = { 3206 .user = OCP_USER_MPU | OCP_USER_SDMA,
5323 .omap4 = { 3207};
5324 .clkctrl_offs = OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET, 3208
5325 .context_offs = OMAP4_RM_ABE_WDT3_CONTEXT_OFFSET, 3209static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
5326 .modulemode = MODULEMODE_SWCTRL, 3210 {
5327 }, 3211 .pa_start = 0x4a056000,
3212 .pa_end = 0x4a056fff,
3213 .flags = ADDR_TYPE_RT
5328 }, 3214 },
5329 .slaves = omap44xx_wd_timer3_slaves, 3215 { }
5330 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer3_slaves),
5331}; 3216};
5332 3217
5333/* 3218/* l4_cfg -> dma_system */
5334 * 'usb_host_hs' class 3219static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
5335 * high-speed multi-port usb host controller 3220 .master = &omap44xx_l4_cfg_hwmod,
5336 */ 3221 .slave = &omap44xx_dma_system_hwmod,
5337static struct omap_hwmod_ocp_if omap44xx_usb_host_hs__l3_main_2 = { 3222 .clk = "l4_div_ck",
5338 .master = &omap44xx_usb_host_hs_hwmod, 3223 .addr = omap44xx_dma_system_addrs,
5339 .slave = &omap44xx_l3_main_2_hwmod, 3224 .user = OCP_USER_MPU | OCP_USER_SDMA,
3225};
3226
3227static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = {
3228 {
3229 .name = "mpu",
3230 .pa_start = 0x4012e000,
3231 .pa_end = 0x4012e07f,
3232 .flags = ADDR_TYPE_RT
3233 },
3234 { }
3235};
3236
3237/* l4_abe -> dmic */
3238static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = {
3239 .master = &omap44xx_l4_abe_hwmod,
3240 .slave = &omap44xx_dmic_hwmod,
3241 .clk = "ocp_abe_iclk",
3242 .addr = omap44xx_dmic_addrs,
3243 .user = OCP_USER_MPU,
3244};
3245
3246static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = {
3247 {
3248 .name = "dma",
3249 .pa_start = 0x4902e000,
3250 .pa_end = 0x4902e07f,
3251 .flags = ADDR_TYPE_RT
3252 },
3253 { }
3254};
3255
3256/* l4_abe -> dmic (dma) */
3257static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = {
3258 .master = &omap44xx_l4_abe_hwmod,
3259 .slave = &omap44xx_dmic_hwmod,
3260 .clk = "ocp_abe_iclk",
3261 .addr = omap44xx_dmic_dma_addrs,
3262 .user = OCP_USER_SDMA,
3263};
3264
3265/* dsp -> iva */
3266static struct omap_hwmod_ocp_if omap44xx_dsp__iva = {
3267 .master = &omap44xx_dsp_hwmod,
3268 .slave = &omap44xx_iva_hwmod,
3269 .clk = "dpll_iva_m5x2_ck",
3270 .user = OCP_USER_DSP,
3271};
3272
3273/* l4_cfg -> dsp */
3274static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dsp = {
3275 .master = &omap44xx_l4_cfg_hwmod,
3276 .slave = &omap44xx_dsp_hwmod,
3277 .clk = "l4_div_ck",
3278 .user = OCP_USER_MPU | OCP_USER_SDMA,
3279};
3280
3281static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = {
3282 {
3283 .pa_start = 0x58000000,
3284 .pa_end = 0x5800007f,
3285 .flags = ADDR_TYPE_RT
3286 },
3287 { }
3288};
3289
3290/* l3_main_2 -> dss */
3291static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = {
3292 .master = &omap44xx_l3_main_2_hwmod,
3293 .slave = &omap44xx_dss_hwmod,
3294 .clk = "dss_fck",
3295 .addr = omap44xx_dss_dma_addrs,
3296 .user = OCP_USER_SDMA,
3297};
3298
3299static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = {
3300 {
3301 .pa_start = 0x48040000,
3302 .pa_end = 0x4804007f,
3303 .flags = ADDR_TYPE_RT
3304 },
3305 { }
3306};
3307
3308/* l4_per -> dss */
3309static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = {
3310 .master = &omap44xx_l4_per_hwmod,
3311 .slave = &omap44xx_dss_hwmod,
3312 .clk = "l4_div_ck",
3313 .addr = omap44xx_dss_addrs,
3314 .user = OCP_USER_MPU,
3315};
3316
3317static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = {
3318 {
3319 .pa_start = 0x58001000,
3320 .pa_end = 0x58001fff,
3321 .flags = ADDR_TYPE_RT
3322 },
3323 { }
3324};
3325
3326/* l3_main_2 -> dss_dispc */
3327static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = {
3328 .master = &omap44xx_l3_main_2_hwmod,
3329 .slave = &omap44xx_dss_dispc_hwmod,
3330 .clk = "dss_fck",
3331 .addr = omap44xx_dss_dispc_dma_addrs,
3332 .user = OCP_USER_SDMA,
3333};
3334
3335static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = {
3336 {
3337 .pa_start = 0x48041000,
3338 .pa_end = 0x48041fff,
3339 .flags = ADDR_TYPE_RT
3340 },
3341 { }
3342};
3343
3344/* l4_per -> dss_dispc */
3345static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = {
3346 .master = &omap44xx_l4_per_hwmod,
3347 .slave = &omap44xx_dss_dispc_hwmod,
3348 .clk = "l4_div_ck",
3349 .addr = omap44xx_dss_dispc_addrs,
3350 .user = OCP_USER_MPU,
3351};
3352
3353static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = {
3354 {
3355 .pa_start = 0x58004000,
3356 .pa_end = 0x580041ff,
3357 .flags = ADDR_TYPE_RT
3358 },
3359 { }
3360};
3361
3362/* l3_main_2 -> dss_dsi1 */
3363static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = {
3364 .master = &omap44xx_l3_main_2_hwmod,
3365 .slave = &omap44xx_dss_dsi1_hwmod,
3366 .clk = "dss_fck",
3367 .addr = omap44xx_dss_dsi1_dma_addrs,
3368 .user = OCP_USER_SDMA,
3369};
3370
3371static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = {
3372 {
3373 .pa_start = 0x48044000,
3374 .pa_end = 0x480441ff,
3375 .flags = ADDR_TYPE_RT
3376 },
3377 { }
3378};
3379
3380/* l4_per -> dss_dsi1 */
3381static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = {
3382 .master = &omap44xx_l4_per_hwmod,
3383 .slave = &omap44xx_dss_dsi1_hwmod,
3384 .clk = "l4_div_ck",
3385 .addr = omap44xx_dss_dsi1_addrs,
3386 .user = OCP_USER_MPU,
3387};
3388
3389static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = {
3390 {
3391 .pa_start = 0x58005000,
3392 .pa_end = 0x580051ff,
3393 .flags = ADDR_TYPE_RT
3394 },
3395 { }
3396};
3397
3398/* l3_main_2 -> dss_dsi2 */
3399static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = {
3400 .master = &omap44xx_l3_main_2_hwmod,
3401 .slave = &omap44xx_dss_dsi2_hwmod,
3402 .clk = "dss_fck",
3403 .addr = omap44xx_dss_dsi2_dma_addrs,
3404 .user = OCP_USER_SDMA,
3405};
3406
3407static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = {
3408 {
3409 .pa_start = 0x48045000,
3410 .pa_end = 0x480451ff,
3411 .flags = ADDR_TYPE_RT
3412 },
3413 { }
3414};
3415
3416/* l4_per -> dss_dsi2 */
3417static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = {
3418 .master = &omap44xx_l4_per_hwmod,
3419 .slave = &omap44xx_dss_dsi2_hwmod,
3420 .clk = "l4_div_ck",
3421 .addr = omap44xx_dss_dsi2_addrs,
3422 .user = OCP_USER_MPU,
3423};
3424
3425static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = {
3426 {
3427 .pa_start = 0x58006000,
3428 .pa_end = 0x58006fff,
3429 .flags = ADDR_TYPE_RT
3430 },
3431 { }
3432};
3433
3434/* l3_main_2 -> dss_hdmi */
3435static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = {
3436 .master = &omap44xx_l3_main_2_hwmod,
3437 .slave = &omap44xx_dss_hdmi_hwmod,
3438 .clk = "dss_fck",
3439 .addr = omap44xx_dss_hdmi_dma_addrs,
3440 .user = OCP_USER_SDMA,
3441};
3442
3443static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = {
3444 {
3445 .pa_start = 0x48046000,
3446 .pa_end = 0x48046fff,
3447 .flags = ADDR_TYPE_RT
3448 },
3449 { }
3450};
3451
3452/* l4_per -> dss_hdmi */
3453static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = {
3454 .master = &omap44xx_l4_per_hwmod,
3455 .slave = &omap44xx_dss_hdmi_hwmod,
3456 .clk = "l4_div_ck",
3457 .addr = omap44xx_dss_hdmi_addrs,
3458 .user = OCP_USER_MPU,
3459};
3460
3461static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = {
3462 {
3463 .pa_start = 0x58002000,
3464 .pa_end = 0x580020ff,
3465 .flags = ADDR_TYPE_RT
3466 },
3467 { }
3468};
3469
3470/* l3_main_2 -> dss_rfbi */
3471static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = {
3472 .master = &omap44xx_l3_main_2_hwmod,
3473 .slave = &omap44xx_dss_rfbi_hwmod,
3474 .clk = "dss_fck",
3475 .addr = omap44xx_dss_rfbi_dma_addrs,
3476 .user = OCP_USER_SDMA,
3477};
3478
3479static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = {
3480 {
3481 .pa_start = 0x48042000,
3482 .pa_end = 0x480420ff,
3483 .flags = ADDR_TYPE_RT
3484 },
3485 { }
3486};
3487
3488/* l4_per -> dss_rfbi */
3489static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = {
3490 .master = &omap44xx_l4_per_hwmod,
3491 .slave = &omap44xx_dss_rfbi_hwmod,
3492 .clk = "l4_div_ck",
3493 .addr = omap44xx_dss_rfbi_addrs,
3494 .user = OCP_USER_MPU,
3495};
3496
3497static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = {
3498 {
3499 .pa_start = 0x58003000,
3500 .pa_end = 0x580030ff,
3501 .flags = ADDR_TYPE_RT
3502 },
3503 { }
3504};
3505
3506/* l3_main_2 -> dss_venc */
3507static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = {
3508 .master = &omap44xx_l3_main_2_hwmod,
3509 .slave = &omap44xx_dss_venc_hwmod,
3510 .clk = "dss_fck",
3511 .addr = omap44xx_dss_venc_dma_addrs,
3512 .user = OCP_USER_SDMA,
3513};
3514
3515static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = {
3516 {
3517 .pa_start = 0x48043000,
3518 .pa_end = 0x480430ff,
3519 .flags = ADDR_TYPE_RT
3520 },
3521 { }
3522};
3523
3524/* l4_per -> dss_venc */
3525static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = {
3526 .master = &omap44xx_l4_per_hwmod,
3527 .slave = &omap44xx_dss_venc_hwmod,
3528 .clk = "l4_div_ck",
3529 .addr = omap44xx_dss_venc_addrs,
3530 .user = OCP_USER_MPU,
3531};
3532
3533static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
3534 {
3535 .pa_start = 0x4a310000,
3536 .pa_end = 0x4a3101ff,
3537 .flags = ADDR_TYPE_RT
3538 },
3539 { }
3540};
3541
3542/* l4_wkup -> gpio1 */
3543static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = {
3544 .master = &omap44xx_l4_wkup_hwmod,
3545 .slave = &omap44xx_gpio1_hwmod,
3546 .clk = "l4_wkup_clk_mux_ck",
3547 .addr = omap44xx_gpio1_addrs,
3548 .user = OCP_USER_MPU | OCP_USER_SDMA,
3549};
3550
3551static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
3552 {
3553 .pa_start = 0x48055000,
3554 .pa_end = 0x480551ff,
3555 .flags = ADDR_TYPE_RT
3556 },
3557 { }
3558};
3559
3560/* l4_per -> gpio2 */
3561static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = {
3562 .master = &omap44xx_l4_per_hwmod,
3563 .slave = &omap44xx_gpio2_hwmod,
3564 .clk = "l4_div_ck",
3565 .addr = omap44xx_gpio2_addrs,
3566 .user = OCP_USER_MPU | OCP_USER_SDMA,
3567};
3568
3569static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
3570 {
3571 .pa_start = 0x48057000,
3572 .pa_end = 0x480571ff,
3573 .flags = ADDR_TYPE_RT
3574 },
3575 { }
3576};
3577
3578/* l4_per -> gpio3 */
3579static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = {
3580 .master = &omap44xx_l4_per_hwmod,
3581 .slave = &omap44xx_gpio3_hwmod,
3582 .clk = "l4_div_ck",
3583 .addr = omap44xx_gpio3_addrs,
3584 .user = OCP_USER_MPU | OCP_USER_SDMA,
3585};
3586
3587static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
3588 {
3589 .pa_start = 0x48059000,
3590 .pa_end = 0x480591ff,
3591 .flags = ADDR_TYPE_RT
3592 },
3593 { }
3594};
3595
3596/* l4_per -> gpio4 */
3597static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = {
3598 .master = &omap44xx_l4_per_hwmod,
3599 .slave = &omap44xx_gpio4_hwmod,
3600 .clk = "l4_div_ck",
3601 .addr = omap44xx_gpio4_addrs,
3602 .user = OCP_USER_MPU | OCP_USER_SDMA,
3603};
3604
3605static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
3606 {
3607 .pa_start = 0x4805b000,
3608 .pa_end = 0x4805b1ff,
3609 .flags = ADDR_TYPE_RT
3610 },
3611 { }
3612};
3613
3614/* l4_per -> gpio5 */
3615static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = {
3616 .master = &omap44xx_l4_per_hwmod,
3617 .slave = &omap44xx_gpio5_hwmod,
3618 .clk = "l4_div_ck",
3619 .addr = omap44xx_gpio5_addrs,
3620 .user = OCP_USER_MPU | OCP_USER_SDMA,
3621};
3622
3623static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
3624 {
3625 .pa_start = 0x4805d000,
3626 .pa_end = 0x4805d1ff,
3627 .flags = ADDR_TYPE_RT
3628 },
3629 { }
3630};
3631
3632/* l4_per -> gpio6 */
3633static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
3634 .master = &omap44xx_l4_per_hwmod,
3635 .slave = &omap44xx_gpio6_hwmod,
3636 .clk = "l4_div_ck",
3637 .addr = omap44xx_gpio6_addrs,
3638 .user = OCP_USER_MPU | OCP_USER_SDMA,
3639};
3640
3641static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = {
3642 {
3643 .pa_start = 0x4a058000,
3644 .pa_end = 0x4a05bfff,
3645 .flags = ADDR_TYPE_RT
3646 },
3647 { }
3648};
3649
3650/* l4_cfg -> hsi */
3651static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = {
3652 .master = &omap44xx_l4_cfg_hwmod,
3653 .slave = &omap44xx_hsi_hwmod,
3654 .clk = "l4_div_ck",
3655 .addr = omap44xx_hsi_addrs,
3656 .user = OCP_USER_MPU | OCP_USER_SDMA,
3657};
3658
3659static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
3660 {
3661 .pa_start = 0x48070000,
3662 .pa_end = 0x480700ff,
3663 .flags = ADDR_TYPE_RT
3664 },
3665 { }
3666};
3667
3668/* l4_per -> i2c1 */
3669static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = {
3670 .master = &omap44xx_l4_per_hwmod,
3671 .slave = &omap44xx_i2c1_hwmod,
3672 .clk = "l4_div_ck",
3673 .addr = omap44xx_i2c1_addrs,
3674 .user = OCP_USER_MPU | OCP_USER_SDMA,
3675};
3676
3677static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
3678 {
3679 .pa_start = 0x48072000,
3680 .pa_end = 0x480720ff,
3681 .flags = ADDR_TYPE_RT
3682 },
3683 { }
3684};
3685
3686/* l4_per -> i2c2 */
3687static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = {
3688 .master = &omap44xx_l4_per_hwmod,
3689 .slave = &omap44xx_i2c2_hwmod,
3690 .clk = "l4_div_ck",
3691 .addr = omap44xx_i2c2_addrs,
3692 .user = OCP_USER_MPU | OCP_USER_SDMA,
3693};
3694
3695static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
3696 {
3697 .pa_start = 0x48060000,
3698 .pa_end = 0x480600ff,
3699 .flags = ADDR_TYPE_RT
3700 },
3701 { }
3702};
3703
3704/* l4_per -> i2c3 */
3705static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = {
3706 .master = &omap44xx_l4_per_hwmod,
3707 .slave = &omap44xx_i2c3_hwmod,
3708 .clk = "l4_div_ck",
3709 .addr = omap44xx_i2c3_addrs,
3710 .user = OCP_USER_MPU | OCP_USER_SDMA,
3711};
3712
3713static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
3714 {
3715 .pa_start = 0x48350000,
3716 .pa_end = 0x483500ff,
3717 .flags = ADDR_TYPE_RT
3718 },
3719 { }
3720};
3721
3722/* l4_per -> i2c4 */
3723static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = {
3724 .master = &omap44xx_l4_per_hwmod,
3725 .slave = &omap44xx_i2c4_hwmod,
3726 .clk = "l4_div_ck",
3727 .addr = omap44xx_i2c4_addrs,
3728 .user = OCP_USER_MPU | OCP_USER_SDMA,
3729};
3730
3731/* l3_main_2 -> ipu */
3732static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ipu = {
3733 .master = &omap44xx_l3_main_2_hwmod,
3734 .slave = &omap44xx_ipu_hwmod,
5340 .clk = "l3_div_ck", 3735 .clk = "l3_div_ck",
5341 .user = OCP_USER_MPU | OCP_USER_SDMA, 3736 .user = OCP_USER_MPU | OCP_USER_SDMA,
5342}; 3737};
5343 3738
5344static struct omap_hwmod_class_sysconfig omap44xx_usb_host_hs_sysc = { 3739static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = {
5345 .rev_offs = 0x0000, 3740 {
5346 .sysc_offs = 0x0010, 3741 .pa_start = 0x52000000,
5347 .syss_offs = 0x0014, 3742 .pa_end = 0x520000ff,
5348 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE | 3743 .flags = ADDR_TYPE_RT
5349 SYSC_HAS_SOFTRESET), 3744 },
5350 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 3745 { }
5351 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
5352 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
5353 .sysc_fields = &omap_hwmod_sysc_type2,
5354}; 3746};
5355 3747
5356static struct omap_hwmod_class omap44xx_usb_host_hs_hwmod_class = { 3748/* l3_main_2 -> iss */
5357 .name = "usb_host_hs", 3749static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = {
5358 .sysc = &omap44xx_usb_host_hs_sysc, 3750 .master = &omap44xx_l3_main_2_hwmod,
3751 .slave = &omap44xx_iss_hwmod,
3752 .clk = "l3_div_ck",
3753 .addr = omap44xx_iss_addrs,
3754 .user = OCP_USER_MPU | OCP_USER_SDMA,
5359}; 3755};
5360 3756
5361static struct omap_hwmod_ocp_if *omap44xx_usb_host_hs_masters[] = { 3757static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
5362 &omap44xx_usb_host_hs__l3_main_2, 3758 {
3759 .pa_start = 0x5a000000,
3760 .pa_end = 0x5a07ffff,
3761 .flags = ADDR_TYPE_RT
3762 },
3763 { }
3764};
3765
3766/* l3_main_2 -> iva */
3767static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
3768 .master = &omap44xx_l3_main_2_hwmod,
3769 .slave = &omap44xx_iva_hwmod,
3770 .clk = "l3_div_ck",
3771 .addr = omap44xx_iva_addrs,
3772 .user = OCP_USER_MPU,
3773};
3774
3775static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = {
3776 {
3777 .pa_start = 0x4a31c000,
3778 .pa_end = 0x4a31c07f,
3779 .flags = ADDR_TYPE_RT
3780 },
3781 { }
3782};
3783
3784/* l4_wkup -> kbd */
3785static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = {
3786 .master = &omap44xx_l4_wkup_hwmod,
3787 .slave = &omap44xx_kbd_hwmod,
3788 .clk = "l4_wkup_clk_mux_ck",
3789 .addr = omap44xx_kbd_addrs,
3790 .user = OCP_USER_MPU | OCP_USER_SDMA,
3791};
3792
3793static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
3794 {
3795 .pa_start = 0x4a0f4000,
3796 .pa_end = 0x4a0f41ff,
3797 .flags = ADDR_TYPE_RT
3798 },
3799 { }
3800};
3801
3802/* l4_cfg -> mailbox */
3803static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = {
3804 .master = &omap44xx_l4_cfg_hwmod,
3805 .slave = &omap44xx_mailbox_hwmod,
3806 .clk = "l4_div_ck",
3807 .addr = omap44xx_mailbox_addrs,
3808 .user = OCP_USER_MPU | OCP_USER_SDMA,
3809};
3810
3811static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
3812 {
3813 .name = "mpu",
3814 .pa_start = 0x40122000,
3815 .pa_end = 0x401220ff,
3816 .flags = ADDR_TYPE_RT
3817 },
3818 { }
3819};
3820
3821/* l4_abe -> mcbsp1 */
3822static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
3823 .master = &omap44xx_l4_abe_hwmod,
3824 .slave = &omap44xx_mcbsp1_hwmod,
3825 .clk = "ocp_abe_iclk",
3826 .addr = omap44xx_mcbsp1_addrs,
3827 .user = OCP_USER_MPU,
3828};
3829
3830static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
3831 {
3832 .name = "dma",
3833 .pa_start = 0x49022000,
3834 .pa_end = 0x490220ff,
3835 .flags = ADDR_TYPE_RT
3836 },
3837 { }
3838};
3839
3840/* l4_abe -> mcbsp1 (dma) */
3841static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = {
3842 .master = &omap44xx_l4_abe_hwmod,
3843 .slave = &omap44xx_mcbsp1_hwmod,
3844 .clk = "ocp_abe_iclk",
3845 .addr = omap44xx_mcbsp1_dma_addrs,
3846 .user = OCP_USER_SDMA,
3847};
3848
3849static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
3850 {
3851 .name = "mpu",
3852 .pa_start = 0x40124000,
3853 .pa_end = 0x401240ff,
3854 .flags = ADDR_TYPE_RT
3855 },
3856 { }
3857};
3858
3859/* l4_abe -> mcbsp2 */
3860static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
3861 .master = &omap44xx_l4_abe_hwmod,
3862 .slave = &omap44xx_mcbsp2_hwmod,
3863 .clk = "ocp_abe_iclk",
3864 .addr = omap44xx_mcbsp2_addrs,
3865 .user = OCP_USER_MPU,
3866};
3867
3868static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
3869 {
3870 .name = "dma",
3871 .pa_start = 0x49024000,
3872 .pa_end = 0x490240ff,
3873 .flags = ADDR_TYPE_RT
3874 },
3875 { }
3876};
3877
3878/* l4_abe -> mcbsp2 (dma) */
3879static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = {
3880 .master = &omap44xx_l4_abe_hwmod,
3881 .slave = &omap44xx_mcbsp2_hwmod,
3882 .clk = "ocp_abe_iclk",
3883 .addr = omap44xx_mcbsp2_dma_addrs,
3884 .user = OCP_USER_SDMA,
3885};
3886
3887static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
3888 {
3889 .name = "mpu",
3890 .pa_start = 0x40126000,
3891 .pa_end = 0x401260ff,
3892 .flags = ADDR_TYPE_RT
3893 },
3894 { }
3895};
3896
3897/* l4_abe -> mcbsp3 */
3898static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
3899 .master = &omap44xx_l4_abe_hwmod,
3900 .slave = &omap44xx_mcbsp3_hwmod,
3901 .clk = "ocp_abe_iclk",
3902 .addr = omap44xx_mcbsp3_addrs,
3903 .user = OCP_USER_MPU,
3904};
3905
3906static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
3907 {
3908 .name = "dma",
3909 .pa_start = 0x49026000,
3910 .pa_end = 0x490260ff,
3911 .flags = ADDR_TYPE_RT
3912 },
3913 { }
3914};
3915
3916/* l4_abe -> mcbsp3 (dma) */
3917static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = {
3918 .master = &omap44xx_l4_abe_hwmod,
3919 .slave = &omap44xx_mcbsp3_hwmod,
3920 .clk = "ocp_abe_iclk",
3921 .addr = omap44xx_mcbsp3_dma_addrs,
3922 .user = OCP_USER_SDMA,
3923};
3924
3925static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
3926 {
3927 .pa_start = 0x48096000,
3928 .pa_end = 0x480960ff,
3929 .flags = ADDR_TYPE_RT
3930 },
3931 { }
3932};
3933
3934/* l4_per -> mcbsp4 */
3935static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = {
3936 .master = &omap44xx_l4_per_hwmod,
3937 .slave = &omap44xx_mcbsp4_hwmod,
3938 .clk = "l4_div_ck",
3939 .addr = omap44xx_mcbsp4_addrs,
3940 .user = OCP_USER_MPU | OCP_USER_SDMA,
3941};
3942
3943static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
3944 {
3945 .pa_start = 0x40132000,
3946 .pa_end = 0x4013207f,
3947 .flags = ADDR_TYPE_RT
3948 },
3949 { }
3950};
3951
3952/* l4_abe -> mcpdm */
3953static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
3954 .master = &omap44xx_l4_abe_hwmod,
3955 .slave = &omap44xx_mcpdm_hwmod,
3956 .clk = "ocp_abe_iclk",
3957 .addr = omap44xx_mcpdm_addrs,
3958 .user = OCP_USER_MPU,
3959};
3960
3961static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = {
3962 {
3963 .pa_start = 0x49032000,
3964 .pa_end = 0x4903207f,
3965 .flags = ADDR_TYPE_RT
3966 },
3967 { }
3968};
3969
3970/* l4_abe -> mcpdm (dma) */
3971static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = {
3972 .master = &omap44xx_l4_abe_hwmod,
3973 .slave = &omap44xx_mcpdm_hwmod,
3974 .clk = "ocp_abe_iclk",
3975 .addr = omap44xx_mcpdm_dma_addrs,
3976 .user = OCP_USER_SDMA,
3977};
3978
3979static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = {
3980 {
3981 .pa_start = 0x48098000,
3982 .pa_end = 0x480981ff,
3983 .flags = ADDR_TYPE_RT
3984 },
3985 { }
3986};
3987
3988/* l4_per -> mcspi1 */
3989static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = {
3990 .master = &omap44xx_l4_per_hwmod,
3991 .slave = &omap44xx_mcspi1_hwmod,
3992 .clk = "l4_div_ck",
3993 .addr = omap44xx_mcspi1_addrs,
3994 .user = OCP_USER_MPU | OCP_USER_SDMA,
3995};
3996
3997static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = {
3998 {
3999 .pa_start = 0x4809a000,
4000 .pa_end = 0x4809a1ff,
4001 .flags = ADDR_TYPE_RT
4002 },
4003 { }
4004};
4005
4006/* l4_per -> mcspi2 */
4007static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = {
4008 .master = &omap44xx_l4_per_hwmod,
4009 .slave = &omap44xx_mcspi2_hwmod,
4010 .clk = "l4_div_ck",
4011 .addr = omap44xx_mcspi2_addrs,
4012 .user = OCP_USER_MPU | OCP_USER_SDMA,
4013};
4014
4015static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = {
4016 {
4017 .pa_start = 0x480b8000,
4018 .pa_end = 0x480b81ff,
4019 .flags = ADDR_TYPE_RT
4020 },
4021 { }
4022};
4023
4024/* l4_per -> mcspi3 */
4025static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = {
4026 .master = &omap44xx_l4_per_hwmod,
4027 .slave = &omap44xx_mcspi3_hwmod,
4028 .clk = "l4_div_ck",
4029 .addr = omap44xx_mcspi3_addrs,
4030 .user = OCP_USER_MPU | OCP_USER_SDMA,
4031};
4032
4033static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = {
4034 {
4035 .pa_start = 0x480ba000,
4036 .pa_end = 0x480ba1ff,
4037 .flags = ADDR_TYPE_RT
4038 },
4039 { }
4040};
4041
4042/* l4_per -> mcspi4 */
4043static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = {
4044 .master = &omap44xx_l4_per_hwmod,
4045 .slave = &omap44xx_mcspi4_hwmod,
4046 .clk = "l4_div_ck",
4047 .addr = omap44xx_mcspi4_addrs,
4048 .user = OCP_USER_MPU | OCP_USER_SDMA,
4049};
4050
4051static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = {
4052 {
4053 .pa_start = 0x4809c000,
4054 .pa_end = 0x4809c3ff,
4055 .flags = ADDR_TYPE_RT
4056 },
4057 { }
4058};
4059
4060/* l4_per -> mmc1 */
4061static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = {
4062 .master = &omap44xx_l4_per_hwmod,
4063 .slave = &omap44xx_mmc1_hwmod,
4064 .clk = "l4_div_ck",
4065 .addr = omap44xx_mmc1_addrs,
4066 .user = OCP_USER_MPU | OCP_USER_SDMA,
4067};
4068
4069static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = {
4070 {
4071 .pa_start = 0x480b4000,
4072 .pa_end = 0x480b43ff,
4073 .flags = ADDR_TYPE_RT
4074 },
4075 { }
4076};
4077
4078/* l4_per -> mmc2 */
4079static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = {
4080 .master = &omap44xx_l4_per_hwmod,
4081 .slave = &omap44xx_mmc2_hwmod,
4082 .clk = "l4_div_ck",
4083 .addr = omap44xx_mmc2_addrs,
4084 .user = OCP_USER_MPU | OCP_USER_SDMA,
4085};
4086
4087static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = {
4088 {
4089 .pa_start = 0x480ad000,
4090 .pa_end = 0x480ad3ff,
4091 .flags = ADDR_TYPE_RT
4092 },
4093 { }
4094};
4095
4096/* l4_per -> mmc3 */
4097static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = {
4098 .master = &omap44xx_l4_per_hwmod,
4099 .slave = &omap44xx_mmc3_hwmod,
4100 .clk = "l4_div_ck",
4101 .addr = omap44xx_mmc3_addrs,
4102 .user = OCP_USER_MPU | OCP_USER_SDMA,
4103};
4104
4105static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = {
4106 {
4107 .pa_start = 0x480d1000,
4108 .pa_end = 0x480d13ff,
4109 .flags = ADDR_TYPE_RT
4110 },
4111 { }
4112};
4113
4114/* l4_per -> mmc4 */
4115static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = {
4116 .master = &omap44xx_l4_per_hwmod,
4117 .slave = &omap44xx_mmc4_hwmod,
4118 .clk = "l4_div_ck",
4119 .addr = omap44xx_mmc4_addrs,
4120 .user = OCP_USER_MPU | OCP_USER_SDMA,
4121};
4122
4123static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = {
4124 {
4125 .pa_start = 0x480d5000,
4126 .pa_end = 0x480d53ff,
4127 .flags = ADDR_TYPE_RT
4128 },
4129 { }
4130};
4131
4132/* l4_per -> mmc5 */
4133static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = {
4134 .master = &omap44xx_l4_per_hwmod,
4135 .slave = &omap44xx_mmc5_hwmod,
4136 .clk = "l4_div_ck",
4137 .addr = omap44xx_mmc5_addrs,
4138 .user = OCP_USER_MPU | OCP_USER_SDMA,
4139};
4140
4141static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
4142 {
4143 .pa_start = 0x4a0dd000,
4144 .pa_end = 0x4a0dd03f,
4145 .flags = ADDR_TYPE_RT
4146 },
4147 { }
4148};
4149
4150/* l4_cfg -> smartreflex_core */
4151static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = {
4152 .master = &omap44xx_l4_cfg_hwmod,
4153 .slave = &omap44xx_smartreflex_core_hwmod,
4154 .clk = "l4_div_ck",
4155 .addr = omap44xx_smartreflex_core_addrs,
4156 .user = OCP_USER_MPU | OCP_USER_SDMA,
4157};
4158
4159static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = {
4160 {
4161 .pa_start = 0x4a0db000,
4162 .pa_end = 0x4a0db03f,
4163 .flags = ADDR_TYPE_RT
4164 },
4165 { }
4166};
4167
4168/* l4_cfg -> smartreflex_iva */
4169static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = {
4170 .master = &omap44xx_l4_cfg_hwmod,
4171 .slave = &omap44xx_smartreflex_iva_hwmod,
4172 .clk = "l4_div_ck",
4173 .addr = omap44xx_smartreflex_iva_addrs,
4174 .user = OCP_USER_MPU | OCP_USER_SDMA,
4175};
4176
4177static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = {
4178 {
4179 .pa_start = 0x4a0d9000,
4180 .pa_end = 0x4a0d903f,
4181 .flags = ADDR_TYPE_RT
4182 },
4183 { }
4184};
4185
4186/* l4_cfg -> smartreflex_mpu */
4187static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = {
4188 .master = &omap44xx_l4_cfg_hwmod,
4189 .slave = &omap44xx_smartreflex_mpu_hwmod,
4190 .clk = "l4_div_ck",
4191 .addr = omap44xx_smartreflex_mpu_addrs,
4192 .user = OCP_USER_MPU | OCP_USER_SDMA,
4193};
4194
4195static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = {
4196 {
4197 .pa_start = 0x4a0f6000,
4198 .pa_end = 0x4a0f6fff,
4199 .flags = ADDR_TYPE_RT
4200 },
4201 { }
4202};
4203
4204/* l4_cfg -> spinlock */
4205static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = {
4206 .master = &omap44xx_l4_cfg_hwmod,
4207 .slave = &omap44xx_spinlock_hwmod,
4208 .clk = "l4_div_ck",
4209 .addr = omap44xx_spinlock_addrs,
4210 .user = OCP_USER_MPU | OCP_USER_SDMA,
4211};
4212
4213static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = {
4214 {
4215 .pa_start = 0x4a318000,
4216 .pa_end = 0x4a31807f,
4217 .flags = ADDR_TYPE_RT
4218 },
4219 { }
4220};
4221
4222/* l4_wkup -> timer1 */
4223static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = {
4224 .master = &omap44xx_l4_wkup_hwmod,
4225 .slave = &omap44xx_timer1_hwmod,
4226 .clk = "l4_wkup_clk_mux_ck",
4227 .addr = omap44xx_timer1_addrs,
4228 .user = OCP_USER_MPU | OCP_USER_SDMA,
4229};
4230
4231static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = {
4232 {
4233 .pa_start = 0x48032000,
4234 .pa_end = 0x4803207f,
4235 .flags = ADDR_TYPE_RT
4236 },
4237 { }
4238};
4239
4240/* l4_per -> timer2 */
4241static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = {
4242 .master = &omap44xx_l4_per_hwmod,
4243 .slave = &omap44xx_timer2_hwmod,
4244 .clk = "l4_div_ck",
4245 .addr = omap44xx_timer2_addrs,
4246 .user = OCP_USER_MPU | OCP_USER_SDMA,
4247};
4248
4249static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = {
4250 {
4251 .pa_start = 0x48034000,
4252 .pa_end = 0x4803407f,
4253 .flags = ADDR_TYPE_RT
4254 },
4255 { }
4256};
4257
4258/* l4_per -> timer3 */
4259static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = {
4260 .master = &omap44xx_l4_per_hwmod,
4261 .slave = &omap44xx_timer3_hwmod,
4262 .clk = "l4_div_ck",
4263 .addr = omap44xx_timer3_addrs,
4264 .user = OCP_USER_MPU | OCP_USER_SDMA,
4265};
4266
4267static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = {
4268 {
4269 .pa_start = 0x48036000,
4270 .pa_end = 0x4803607f,
4271 .flags = ADDR_TYPE_RT
4272 },
4273 { }
4274};
4275
4276/* l4_per -> timer4 */
4277static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = {
4278 .master = &omap44xx_l4_per_hwmod,
4279 .slave = &omap44xx_timer4_hwmod,
4280 .clk = "l4_div_ck",
4281 .addr = omap44xx_timer4_addrs,
4282 .user = OCP_USER_MPU | OCP_USER_SDMA,
4283};
4284
4285static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = {
4286 {
4287 .pa_start = 0x40138000,
4288 .pa_end = 0x4013807f,
4289 .flags = ADDR_TYPE_RT
4290 },
4291 { }
4292};
4293
4294/* l4_abe -> timer5 */
4295static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = {
4296 .master = &omap44xx_l4_abe_hwmod,
4297 .slave = &omap44xx_timer5_hwmod,
4298 .clk = "ocp_abe_iclk",
4299 .addr = omap44xx_timer5_addrs,
4300 .user = OCP_USER_MPU,
4301};
4302
4303static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = {
4304 {
4305 .pa_start = 0x49038000,
4306 .pa_end = 0x4903807f,
4307 .flags = ADDR_TYPE_RT
4308 },
4309 { }
4310};
4311
4312/* l4_abe -> timer5 (dma) */
4313static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = {
4314 .master = &omap44xx_l4_abe_hwmod,
4315 .slave = &omap44xx_timer5_hwmod,
4316 .clk = "ocp_abe_iclk",
4317 .addr = omap44xx_timer5_dma_addrs,
4318 .user = OCP_USER_SDMA,
4319};
4320
4321static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = {
4322 {
4323 .pa_start = 0x4013a000,
4324 .pa_end = 0x4013a07f,
4325 .flags = ADDR_TYPE_RT
4326 },
4327 { }
4328};
4329
4330/* l4_abe -> timer6 */
4331static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = {
4332 .master = &omap44xx_l4_abe_hwmod,
4333 .slave = &omap44xx_timer6_hwmod,
4334 .clk = "ocp_abe_iclk",
4335 .addr = omap44xx_timer6_addrs,
4336 .user = OCP_USER_MPU,
4337};
4338
4339static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = {
4340 {
4341 .pa_start = 0x4903a000,
4342 .pa_end = 0x4903a07f,
4343 .flags = ADDR_TYPE_RT
4344 },
4345 { }
4346};
4347
4348/* l4_abe -> timer6 (dma) */
4349static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = {
4350 .master = &omap44xx_l4_abe_hwmod,
4351 .slave = &omap44xx_timer6_hwmod,
4352 .clk = "ocp_abe_iclk",
4353 .addr = omap44xx_timer6_dma_addrs,
4354 .user = OCP_USER_SDMA,
4355};
4356
4357static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = {
4358 {
4359 .pa_start = 0x4013c000,
4360 .pa_end = 0x4013c07f,
4361 .flags = ADDR_TYPE_RT
4362 },
4363 { }
4364};
4365
4366/* l4_abe -> timer7 */
4367static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = {
4368 .master = &omap44xx_l4_abe_hwmod,
4369 .slave = &omap44xx_timer7_hwmod,
4370 .clk = "ocp_abe_iclk",
4371 .addr = omap44xx_timer7_addrs,
4372 .user = OCP_USER_MPU,
4373};
4374
4375static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = {
4376 {
4377 .pa_start = 0x4903c000,
4378 .pa_end = 0x4903c07f,
4379 .flags = ADDR_TYPE_RT
4380 },
4381 { }
4382};
4383
4384/* l4_abe -> timer7 (dma) */
4385static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = {
4386 .master = &omap44xx_l4_abe_hwmod,
4387 .slave = &omap44xx_timer7_hwmod,
4388 .clk = "ocp_abe_iclk",
4389 .addr = omap44xx_timer7_dma_addrs,
4390 .user = OCP_USER_SDMA,
4391};
4392
4393static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = {
4394 {
4395 .pa_start = 0x4013e000,
4396 .pa_end = 0x4013e07f,
4397 .flags = ADDR_TYPE_RT
4398 },
4399 { }
4400};
4401
4402/* l4_abe -> timer8 */
4403static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = {
4404 .master = &omap44xx_l4_abe_hwmod,
4405 .slave = &omap44xx_timer8_hwmod,
4406 .clk = "ocp_abe_iclk",
4407 .addr = omap44xx_timer8_addrs,
4408 .user = OCP_USER_MPU,
4409};
4410
4411static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = {
4412 {
4413 .pa_start = 0x4903e000,
4414 .pa_end = 0x4903e07f,
4415 .flags = ADDR_TYPE_RT
4416 },
4417 { }
4418};
4419
4420/* l4_abe -> timer8 (dma) */
4421static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = {
4422 .master = &omap44xx_l4_abe_hwmod,
4423 .slave = &omap44xx_timer8_hwmod,
4424 .clk = "ocp_abe_iclk",
4425 .addr = omap44xx_timer8_dma_addrs,
4426 .user = OCP_USER_SDMA,
4427};
4428
4429static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = {
4430 {
4431 .pa_start = 0x4803e000,
4432 .pa_end = 0x4803e07f,
4433 .flags = ADDR_TYPE_RT
4434 },
4435 { }
4436};
4437
4438/* l4_per -> timer9 */
4439static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = {
4440 .master = &omap44xx_l4_per_hwmod,
4441 .slave = &omap44xx_timer9_hwmod,
4442 .clk = "l4_div_ck",
4443 .addr = omap44xx_timer9_addrs,
4444 .user = OCP_USER_MPU | OCP_USER_SDMA,
4445};
4446
4447static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = {
4448 {
4449 .pa_start = 0x48086000,
4450 .pa_end = 0x4808607f,
4451 .flags = ADDR_TYPE_RT
4452 },
4453 { }
4454};
4455
4456/* l4_per -> timer10 */
4457static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = {
4458 .master = &omap44xx_l4_per_hwmod,
4459 .slave = &omap44xx_timer10_hwmod,
4460 .clk = "l4_div_ck",
4461 .addr = omap44xx_timer10_addrs,
4462 .user = OCP_USER_MPU | OCP_USER_SDMA,
4463};
4464
4465static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = {
4466 {
4467 .pa_start = 0x48088000,
4468 .pa_end = 0x4808807f,
4469 .flags = ADDR_TYPE_RT
4470 },
4471 { }
4472};
4473
4474/* l4_per -> timer11 */
4475static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = {
4476 .master = &omap44xx_l4_per_hwmod,
4477 .slave = &omap44xx_timer11_hwmod,
4478 .clk = "l4_div_ck",
4479 .addr = omap44xx_timer11_addrs,
4480 .user = OCP_USER_MPU | OCP_USER_SDMA,
4481};
4482
4483static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
4484 {
4485 .pa_start = 0x4806a000,
4486 .pa_end = 0x4806a0ff,
4487 .flags = ADDR_TYPE_RT
4488 },
4489 { }
4490};
4491
4492/* l4_per -> uart1 */
4493static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
4494 .master = &omap44xx_l4_per_hwmod,
4495 .slave = &omap44xx_uart1_hwmod,
4496 .clk = "l4_div_ck",
4497 .addr = omap44xx_uart1_addrs,
4498 .user = OCP_USER_MPU | OCP_USER_SDMA,
4499};
4500
4501static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
4502 {
4503 .pa_start = 0x4806c000,
4504 .pa_end = 0x4806c0ff,
4505 .flags = ADDR_TYPE_RT
4506 },
4507 { }
4508};
4509
4510/* l4_per -> uart2 */
4511static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
4512 .master = &omap44xx_l4_per_hwmod,
4513 .slave = &omap44xx_uart2_hwmod,
4514 .clk = "l4_div_ck",
4515 .addr = omap44xx_uart2_addrs,
4516 .user = OCP_USER_MPU | OCP_USER_SDMA,
4517};
4518
4519static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
4520 {
4521 .pa_start = 0x48020000,
4522 .pa_end = 0x480200ff,
4523 .flags = ADDR_TYPE_RT
4524 },
4525 { }
4526};
4527
4528/* l4_per -> uart3 */
4529static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
4530 .master = &omap44xx_l4_per_hwmod,
4531 .slave = &omap44xx_uart3_hwmod,
4532 .clk = "l4_div_ck",
4533 .addr = omap44xx_uart3_addrs,
4534 .user = OCP_USER_MPU | OCP_USER_SDMA,
4535};
4536
4537static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
4538 {
4539 .pa_start = 0x4806e000,
4540 .pa_end = 0x4806e0ff,
4541 .flags = ADDR_TYPE_RT
4542 },
4543 { }
4544};
4545
4546/* l4_per -> uart4 */
4547static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
4548 .master = &omap44xx_l4_per_hwmod,
4549 .slave = &omap44xx_uart4_hwmod,
4550 .clk = "l4_div_ck",
4551 .addr = omap44xx_uart4_addrs,
4552 .user = OCP_USER_MPU | OCP_USER_SDMA,
5363}; 4553};
5364 4554
5365static struct omap_hwmod_addr_space omap44xx_usb_host_hs_addrs[] = { 4555static struct omap_hwmod_addr_space omap44xx_usb_host_hs_addrs[] = {
@@ -5382,12 +4572,7 @@ static struct omap_hwmod_addr_space omap44xx_usb_host_hs_addrs[] = {
5382 {} 4572 {}
5383}; 4573};
5384 4574
5385static struct omap_hwmod_irq_info omap44xx_usb_host_hs_irqs[] = { 4575/* l4_cfg -> usb_host_hs */
5386 { .name = "ohci-irq", .irq = 76 + OMAP44XX_IRQ_GIC_START },
5387 { .name = "ehci-irq", .irq = 77 + OMAP44XX_IRQ_GIC_START },
5388 { .irq = -1 }
5389};
5390
5391static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_hs = { 4576static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_hs = {
5392 .master = &omap44xx_l4_cfg_hwmod, 4577 .master = &omap44xx_l4_cfg_hwmod,
5393 .slave = &omap44xx_usb_host_hs_hwmod, 4578 .slave = &omap44xx_usb_host_hs_hwmod,
@@ -5396,100 +4581,22 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_hs = {
5396 .user = OCP_USER_MPU | OCP_USER_SDMA, 4581 .user = OCP_USER_MPU | OCP_USER_SDMA,
5397}; 4582};
5398 4583
5399static struct omap_hwmod_ocp_if *omap44xx_usb_host_hs_slaves[] = { 4584static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
5400 &omap44xx_l4_cfg__usb_host_hs, 4585 {
5401}; 4586 .pa_start = 0x4a0ab000,
5402 4587 .pa_end = 0x4a0ab003,
5403static struct omap_hwmod omap44xx_usb_host_hs_hwmod = { 4588 .flags = ADDR_TYPE_RT
5404 .name = "usb_host_hs",
5405 .class = &omap44xx_usb_host_hs_hwmod_class,
5406 .clkdm_name = "l3_init_clkdm",
5407 .main_clk = "usb_host_hs_fck",
5408 .prcm = {
5409 .omap4 = {
5410 .clkctrl_offs = OMAP4_CM_L3INIT_USB_HOST_CLKCTRL_OFFSET,
5411 .context_offs = OMAP4_RM_L3INIT_USB_HOST_CONTEXT_OFFSET,
5412 .modulemode = MODULEMODE_SWCTRL,
5413 },
5414 }, 4589 },
5415 .mpu_irqs = omap44xx_usb_host_hs_irqs, 4590 { }
5416 .slaves = omap44xx_usb_host_hs_slaves,
5417 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_host_hs_slaves),
5418 .masters = omap44xx_usb_host_hs_masters,
5419 .masters_cnt = ARRAY_SIZE(omap44xx_usb_host_hs_masters),
5420
5421 /*
5422 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
5423 * id: i660
5424 *
5425 * Description:
5426 * In the following configuration :
5427 * - USBHOST module is set to smart-idle mode
5428 * - PRCM asserts idle_req to the USBHOST module ( This typically
5429 * happens when the system is going to a low power mode : all ports
5430 * have been suspended, the master part of the USBHOST module has
5431 * entered the standby state, and SW has cut the functional clocks)
5432 * - an USBHOST interrupt occurs before the module is able to answer
5433 * idle_ack, typically a remote wakeup IRQ.
5434 * Then the USB HOST module will enter a deadlock situation where it
5435 * is no more accessible nor functional.
5436 *
5437 * Workaround:
5438 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
5439 */
5440
5441 /*
5442 * Errata: USB host EHCI may stall when entering smart-standby mode
5443 * Id: i571
5444 *
5445 * Description:
5446 * When the USBHOST module is set to smart-standby mode, and when it is
5447 * ready to enter the standby state (i.e. all ports are suspended and
5448 * all attached devices are in suspend mode), then it can wrongly assert
5449 * the Mstandby signal too early while there are still some residual OCP
5450 * transactions ongoing. If this condition occurs, the internal state
5451 * machine may go to an undefined state and the USB link may be stuck
5452 * upon the next resume.
5453 *
5454 * Workaround:
5455 * Don't use smart standby; use only force standby,
5456 * hence HWMOD_SWSUP_MSTANDBY
5457 */
5458
5459 /*
5460 * During system boot; If the hwmod framework resets the module
5461 * the module will have smart idle settings; which can lead to deadlock
5462 * (above Errata Id:i660); so, dont reset the module during boot;
5463 * Use HWMOD_INIT_NO_RESET.
5464 */
5465
5466 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
5467 HWMOD_INIT_NO_RESET,
5468};
5469
5470/*
5471 * 'usb_tll_hs' class
5472 * usb_tll_hs module is the adapter on the usb_host_hs ports
5473 */
5474static struct omap_hwmod_class_sysconfig omap44xx_usb_tll_hs_sysc = {
5475 .rev_offs = 0x0000,
5476 .sysc_offs = 0x0010,
5477 .syss_offs = 0x0014,
5478 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
5479 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
5480 SYSC_HAS_AUTOIDLE),
5481 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
5482 .sysc_fields = &omap_hwmod_sysc_type1,
5483};
5484
5485static struct omap_hwmod_class omap44xx_usb_tll_hs_hwmod_class = {
5486 .name = "usb_tll_hs",
5487 .sysc = &omap44xx_usb_tll_hs_sysc,
5488}; 4591};
5489 4592
5490static struct omap_hwmod_irq_info omap44xx_usb_tll_hs_irqs[] = { 4593/* l4_cfg -> usb_otg_hs */
5491 { .name = "tll-irq", .irq = 78 + OMAP44XX_IRQ_GIC_START }, 4594static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = {
5492 { .irq = -1 } 4595 .master = &omap44xx_l4_cfg_hwmod,
4596 .slave = &omap44xx_usb_otg_hs_hwmod,
4597 .clk = "l4_div_ck",
4598 .addr = omap44xx_usb_otg_hs_addrs,
4599 .user = OCP_USER_MPU | OCP_USER_SDMA,
5493}; 4600};
5494 4601
5495static struct omap_hwmod_addr_space omap44xx_usb_tll_hs_addrs[] = { 4602static struct omap_hwmod_addr_space omap44xx_usb_tll_hs_addrs[] = {
@@ -5502,6 +4609,7 @@ static struct omap_hwmod_addr_space omap44xx_usb_tll_hs_addrs[] = {
5502 {} 4609 {}
5503}; 4610};
5504 4611
4612/* l4_cfg -> usb_tll_hs */
5505static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_tll_hs = { 4613static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_tll_hs = {
5506 .master = &omap44xx_l4_cfg_hwmod, 4614 .master = &omap44xx_l4_cfg_hwmod,
5507 .slave = &omap44xx_usb_tll_hs_hwmod, 4615 .slave = &omap44xx_usb_tll_hs_hwmod,
@@ -5510,181 +4618,184 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_tll_hs = {
5510 .user = OCP_USER_MPU | OCP_USER_SDMA, 4618 .user = OCP_USER_MPU | OCP_USER_SDMA,
5511}; 4619};
5512 4620
5513static struct omap_hwmod_ocp_if *omap44xx_usb_tll_hs_slaves[] = { 4621static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
5514 &omap44xx_l4_cfg__usb_tll_hs, 4622 {
4623 .pa_start = 0x4a314000,
4624 .pa_end = 0x4a31407f,
4625 .flags = ADDR_TYPE_RT
4626 },
4627 { }
5515}; 4628};
5516 4629
5517static struct omap_hwmod omap44xx_usb_tll_hs_hwmod = { 4630/* l4_wkup -> wd_timer2 */
5518 .name = "usb_tll_hs", 4631static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
5519 .class = &omap44xx_usb_tll_hs_hwmod_class, 4632 .master = &omap44xx_l4_wkup_hwmod,
5520 .clkdm_name = "l3_init_clkdm", 4633 .slave = &omap44xx_wd_timer2_hwmod,
5521 .main_clk = "usb_tll_hs_ick", 4634 .clk = "l4_wkup_clk_mux_ck",
5522 .prcm = { 4635 .addr = omap44xx_wd_timer2_addrs,
5523 .omap4 = { 4636 .user = OCP_USER_MPU | OCP_USER_SDMA,
5524 .clkctrl_offs = OMAP4_CM_L3INIT_USB_TLL_CLKCTRL_OFFSET, 4637};
5525 .context_offs = OMAP4_RM_L3INIT_USB_TLL_CONTEXT_OFFSET, 4638
5526 .modulemode = MODULEMODE_HWCTRL, 4639static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = {
5527 }, 4640 {
4641 .pa_start = 0x40130000,
4642 .pa_end = 0x4013007f,
4643 .flags = ADDR_TYPE_RT
5528 }, 4644 },
5529 .mpu_irqs = omap44xx_usb_tll_hs_irqs, 4645 { }
5530 .slaves = omap44xx_usb_tll_hs_slaves, 4646};
5531 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_tll_hs_slaves), 4647
4648/* l4_abe -> wd_timer3 */
4649static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = {
4650 .master = &omap44xx_l4_abe_hwmod,
4651 .slave = &omap44xx_wd_timer3_hwmod,
4652 .clk = "ocp_abe_iclk",
4653 .addr = omap44xx_wd_timer3_addrs,
4654 .user = OCP_USER_MPU,
5532}; 4655};
5533 4656
5534static __initdata struct omap_hwmod *omap44xx_hwmods[] = { 4657static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = {
5535 4658 {
5536 /* dmm class */ 4659 .pa_start = 0x49030000,
5537 &omap44xx_dmm_hwmod, 4660 .pa_end = 0x4903007f,
5538 4661 .flags = ADDR_TYPE_RT
5539 /* emif_fw class */ 4662 },
5540 &omap44xx_emif_fw_hwmod, 4663 { }
5541 4664};
5542 /* l3 class */ 4665
5543 &omap44xx_l3_instr_hwmod, 4666/* l4_abe -> wd_timer3 (dma) */
5544 &omap44xx_l3_main_1_hwmod, 4667static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = {
5545 &omap44xx_l3_main_2_hwmod, 4668 .master = &omap44xx_l4_abe_hwmod,
5546 &omap44xx_l3_main_3_hwmod, 4669 .slave = &omap44xx_wd_timer3_hwmod,
5547 4670 .clk = "ocp_abe_iclk",
5548 /* l4 class */ 4671 .addr = omap44xx_wd_timer3_dma_addrs,
5549 &omap44xx_l4_abe_hwmod, 4672 .user = OCP_USER_SDMA,
5550 &omap44xx_l4_cfg_hwmod, 4673};
5551 &omap44xx_l4_per_hwmod, 4674
5552 &omap44xx_l4_wkup_hwmod, 4675static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
5553 4676 &omap44xx_l3_main_1__dmm,
5554 /* mpu_bus class */ 4677 &omap44xx_mpu__dmm,
5555 &omap44xx_mpu_private_hwmod, 4678 &omap44xx_dmm__emif_fw,
5556 4679 &omap44xx_l4_cfg__emif_fw,
5557 /* aess class */ 4680 &omap44xx_iva__l3_instr,
5558/* &omap44xx_aess_hwmod, */ 4681 &omap44xx_l3_main_3__l3_instr,
5559 4682 &omap44xx_dsp__l3_main_1,
5560 /* bandgap class */ 4683 &omap44xx_dss__l3_main_1,
5561 &omap44xx_bandgap_hwmod, 4684 &omap44xx_l3_main_2__l3_main_1,
5562 4685 &omap44xx_l4_cfg__l3_main_1,
5563 /* counter class */ 4686 &omap44xx_mmc1__l3_main_1,
5564/* &omap44xx_counter_32k_hwmod, */ 4687 &omap44xx_mmc2__l3_main_1,
5565 4688 &omap44xx_mpu__l3_main_1,
5566 /* dma class */ 4689 &omap44xx_dma_system__l3_main_2,
5567 &omap44xx_dma_system_hwmod, 4690 &omap44xx_hsi__l3_main_2,
5568 4691 &omap44xx_ipu__l3_main_2,
5569 /* dmic class */ 4692 &omap44xx_iss__l3_main_2,
5570 &omap44xx_dmic_hwmod, 4693 &omap44xx_iva__l3_main_2,
5571 4694 &omap44xx_l3_main_1__l3_main_2,
5572 /* dsp class */ 4695 &omap44xx_l4_cfg__l3_main_2,
5573 &omap44xx_dsp_hwmod, 4696 &omap44xx_usb_host_hs__l3_main_2,
5574 &omap44xx_dsp_c0_hwmod, 4697 &omap44xx_usb_otg_hs__l3_main_2,
5575 4698 &omap44xx_l3_main_1__l3_main_3,
5576 /* dss class */ 4699 &omap44xx_l3_main_2__l3_main_3,
5577 &omap44xx_dss_hwmod, 4700 &omap44xx_l4_cfg__l3_main_3,
5578 &omap44xx_dss_dispc_hwmod, 4701 &omap44xx_aess__l4_abe,
5579 &omap44xx_dss_dsi1_hwmod, 4702 &omap44xx_dsp__l4_abe,
5580 &omap44xx_dss_dsi2_hwmod, 4703 &omap44xx_l3_main_1__l4_abe,
5581 &omap44xx_dss_hdmi_hwmod, 4704 &omap44xx_mpu__l4_abe,
5582 &omap44xx_dss_rfbi_hwmod, 4705 &omap44xx_l3_main_1__l4_cfg,
5583 &omap44xx_dss_venc_hwmod, 4706 &omap44xx_l3_main_2__l4_per,
5584 4707 &omap44xx_l4_cfg__l4_wkup,
5585 /* gpio class */ 4708 &omap44xx_mpu__mpu_private,
5586 &omap44xx_gpio1_hwmod, 4709 &omap44xx_l4_abe__aess,
5587 &omap44xx_gpio2_hwmod, 4710 &omap44xx_l4_abe__aess_dma,
5588 &omap44xx_gpio3_hwmod, 4711 &omap44xx_l4_wkup__counter_32k,
5589 &omap44xx_gpio4_hwmod, 4712 &omap44xx_l4_cfg__dma_system,
5590 &omap44xx_gpio5_hwmod, 4713 &omap44xx_l4_abe__dmic,
5591 &omap44xx_gpio6_hwmod, 4714 &omap44xx_l4_abe__dmic_dma,
5592 4715 &omap44xx_dsp__iva,
5593 /* hsi class */ 4716 &omap44xx_l4_cfg__dsp,
5594/* &omap44xx_hsi_hwmod, */ 4717 &omap44xx_l3_main_2__dss,
5595 4718 &omap44xx_l4_per__dss,
5596 /* i2c class */ 4719 &omap44xx_l3_main_2__dss_dispc,
5597 &omap44xx_i2c1_hwmod, 4720 &omap44xx_l4_per__dss_dispc,
5598 &omap44xx_i2c2_hwmod, 4721 &omap44xx_l3_main_2__dss_dsi1,
5599 &omap44xx_i2c3_hwmod, 4722 &omap44xx_l4_per__dss_dsi1,
5600 &omap44xx_i2c4_hwmod, 4723 &omap44xx_l3_main_2__dss_dsi2,
5601 4724 &omap44xx_l4_per__dss_dsi2,
5602 /* ipu class */ 4725 &omap44xx_l3_main_2__dss_hdmi,
5603 &omap44xx_ipu_hwmod, 4726 &omap44xx_l4_per__dss_hdmi,
5604 &omap44xx_ipu_c0_hwmod, 4727 &omap44xx_l3_main_2__dss_rfbi,
5605 &omap44xx_ipu_c1_hwmod, 4728 &omap44xx_l4_per__dss_rfbi,
5606 4729 &omap44xx_l3_main_2__dss_venc,
5607 /* iss class */ 4730 &omap44xx_l4_per__dss_venc,
5608/* &omap44xx_iss_hwmod, */ 4731 &omap44xx_l4_wkup__gpio1,
5609 4732 &omap44xx_l4_per__gpio2,
5610 /* iva class */ 4733 &omap44xx_l4_per__gpio3,
5611 &omap44xx_iva_hwmod, 4734 &omap44xx_l4_per__gpio4,
5612 &omap44xx_iva_seq0_hwmod, 4735 &omap44xx_l4_per__gpio5,
5613 &omap44xx_iva_seq1_hwmod, 4736 &omap44xx_l4_per__gpio6,
5614 4737 &omap44xx_l4_cfg__hsi,
5615 /* kbd class */ 4738 &omap44xx_l4_per__i2c1,
5616 &omap44xx_kbd_hwmod, 4739 &omap44xx_l4_per__i2c2,
5617 4740 &omap44xx_l4_per__i2c3,
5618 /* mailbox class */ 4741 &omap44xx_l4_per__i2c4,
5619 &omap44xx_mailbox_hwmod, 4742 &omap44xx_l3_main_2__ipu,
5620 4743 &omap44xx_l3_main_2__iss,
5621 /* mcbsp class */ 4744 &omap44xx_l3_main_2__iva,
5622 &omap44xx_mcbsp1_hwmod, 4745 &omap44xx_l4_wkup__kbd,
5623 &omap44xx_mcbsp2_hwmod, 4746 &omap44xx_l4_cfg__mailbox,
5624 &omap44xx_mcbsp3_hwmod, 4747 &omap44xx_l4_abe__mcbsp1,
5625 &omap44xx_mcbsp4_hwmod, 4748 &omap44xx_l4_abe__mcbsp1_dma,
5626 4749 &omap44xx_l4_abe__mcbsp2,
5627 /* mcpdm class */ 4750 &omap44xx_l4_abe__mcbsp2_dma,
5628 &omap44xx_mcpdm_hwmod, 4751 &omap44xx_l4_abe__mcbsp3,
5629 4752 &omap44xx_l4_abe__mcbsp3_dma,
5630 /* mcspi class */ 4753 &omap44xx_l4_per__mcbsp4,
5631 &omap44xx_mcspi1_hwmod, 4754 &omap44xx_l4_abe__mcpdm,
5632 &omap44xx_mcspi2_hwmod, 4755 &omap44xx_l4_abe__mcpdm_dma,
5633 &omap44xx_mcspi3_hwmod, 4756 &omap44xx_l4_per__mcspi1,
5634 &omap44xx_mcspi4_hwmod, 4757 &omap44xx_l4_per__mcspi2,
5635 4758 &omap44xx_l4_per__mcspi3,
5636 /* mmc class */ 4759 &omap44xx_l4_per__mcspi4,
5637 &omap44xx_mmc1_hwmod, 4760 &omap44xx_l4_per__mmc1,
5638 &omap44xx_mmc2_hwmod, 4761 &omap44xx_l4_per__mmc2,
5639 &omap44xx_mmc3_hwmod, 4762 &omap44xx_l4_per__mmc3,
5640 &omap44xx_mmc4_hwmod, 4763 &omap44xx_l4_per__mmc4,
5641 &omap44xx_mmc5_hwmod, 4764 &omap44xx_l4_per__mmc5,
5642 4765 &omap44xx_l4_cfg__smartreflex_core,
5643 /* mpu class */ 4766 &omap44xx_l4_cfg__smartreflex_iva,
5644 &omap44xx_mpu_hwmod, 4767 &omap44xx_l4_cfg__smartreflex_mpu,
5645 4768 &omap44xx_l4_cfg__spinlock,
5646 /* smartreflex class */ 4769 &omap44xx_l4_wkup__timer1,
5647 &omap44xx_smartreflex_core_hwmod, 4770 &omap44xx_l4_per__timer2,
5648 &omap44xx_smartreflex_iva_hwmod, 4771 &omap44xx_l4_per__timer3,
5649 &omap44xx_smartreflex_mpu_hwmod, 4772 &omap44xx_l4_per__timer4,
5650 4773 &omap44xx_l4_abe__timer5,
5651 /* spinlock class */ 4774 &omap44xx_l4_abe__timer5_dma,
5652 &omap44xx_spinlock_hwmod, 4775 &omap44xx_l4_abe__timer6,
5653 4776 &omap44xx_l4_abe__timer6_dma,
5654 /* timer class */ 4777 &omap44xx_l4_abe__timer7,
5655 &omap44xx_timer1_hwmod, 4778 &omap44xx_l4_abe__timer7_dma,
5656 &omap44xx_timer2_hwmod, 4779 &omap44xx_l4_abe__timer8,
5657 &omap44xx_timer3_hwmod, 4780 &omap44xx_l4_abe__timer8_dma,
5658 &omap44xx_timer4_hwmod, 4781 &omap44xx_l4_per__timer9,
5659 &omap44xx_timer5_hwmod, 4782 &omap44xx_l4_per__timer10,
5660 &omap44xx_timer6_hwmod, 4783 &omap44xx_l4_per__timer11,
5661 &omap44xx_timer7_hwmod, 4784 &omap44xx_l4_per__uart1,
5662 &omap44xx_timer8_hwmod, 4785 &omap44xx_l4_per__uart2,
5663 &omap44xx_timer9_hwmod, 4786 &omap44xx_l4_per__uart3,
5664 &omap44xx_timer10_hwmod, 4787 &omap44xx_l4_per__uart4,
5665 &omap44xx_timer11_hwmod, 4788 &omap44xx_l4_cfg__usb_host_hs,
5666 4789 &omap44xx_l4_cfg__usb_otg_hs,
5667 /* uart class */ 4790 &omap44xx_l4_cfg__usb_tll_hs,
5668 &omap44xx_uart1_hwmod, 4791 &omap44xx_l4_wkup__wd_timer2,
5669 &omap44xx_uart2_hwmod, 4792 &omap44xx_l4_abe__wd_timer3,
5670 &omap44xx_uart3_hwmod, 4793 &omap44xx_l4_abe__wd_timer3_dma,
5671 &omap44xx_uart4_hwmod,
5672
5673 /* usb host class */
5674 &omap44xx_usb_host_hs_hwmod,
5675 &omap44xx_usb_tll_hs_hwmod,
5676
5677 /* usb_otg_hs class */
5678 &omap44xx_usb_otg_hs_hwmod,
5679
5680 /* wd_timer class */
5681 &omap44xx_wd_timer2_hwmod,
5682 &omap44xx_wd_timer3_hwmod,
5683 NULL, 4794 NULL,
5684}; 4795};
5685 4796
5686int __init omap44xx_hwmod_init(void) 4797int __init omap44xx_hwmod_init(void)
5687{ 4798{
5688 return omap_hwmod_register(omap44xx_hwmods); 4799 return omap_hwmod_register_links(omap44xx_hwmod_ocp_ifs);
5689} 4800}
5690 4801
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h
index ad5d8f04c0b8..7aa9156d50ab 100644
--- a/arch/arm/mach-omap2/omap_hwmod_common_data.h
+++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h
@@ -19,18 +19,6 @@
19#include "display.h" 19#include "display.h"
20 20
21/* Common address space across OMAP2xxx */ 21/* Common address space across OMAP2xxx */
22extern struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[];
23extern struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[];
24extern struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[];
25extern struct omap_hwmod_addr_space omap2xxx_timer2_addrs[];
26extern struct omap_hwmod_addr_space omap2xxx_timer3_addrs[];
27extern struct omap_hwmod_addr_space omap2xxx_timer4_addrs[];
28extern struct omap_hwmod_addr_space omap2xxx_timer5_addrs[];
29extern struct omap_hwmod_addr_space omap2xxx_timer6_addrs[];
30extern struct omap_hwmod_addr_space omap2xxx_timer7_addrs[];
31extern struct omap_hwmod_addr_space omap2xxx_timer8_addrs[];
32extern struct omap_hwmod_addr_space omap2xxx_timer9_addrs[];
33extern struct omap_hwmod_addr_space omap2xxx_timer12_addrs[];
34extern struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[]; 22extern struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[];
35 23
36/* Common address space across OMAP2xxx/3xxx */ 24/* Common address space across OMAP2xxx/3xxx */
@@ -54,6 +42,64 @@ extern struct omap_hwmod_addr_space omap2_mcbsp1_addrs[];
54/* Common IP block data across OMAP2xxx */ 42/* Common IP block data across OMAP2xxx */
55extern struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[]; 43extern struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[];
56extern struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[]; 44extern struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[];
45extern struct omap_gpio_dev_attr omap2xxx_gpio_dev_attr;
46extern struct omap_hwmod omap2xxx_l3_main_hwmod;
47extern struct omap_hwmod omap2xxx_l4_core_hwmod;
48extern struct omap_hwmod omap2xxx_l4_wkup_hwmod;
49extern struct omap_hwmod omap2xxx_mpu_hwmod;
50extern struct omap_hwmod omap2xxx_iva_hwmod;
51extern struct omap_hwmod omap2xxx_timer1_hwmod;
52extern struct omap_hwmod omap2xxx_timer2_hwmod;
53extern struct omap_hwmod omap2xxx_timer3_hwmod;
54extern struct omap_hwmod omap2xxx_timer4_hwmod;
55extern struct omap_hwmod omap2xxx_timer5_hwmod;
56extern struct omap_hwmod omap2xxx_timer6_hwmod;
57extern struct omap_hwmod omap2xxx_timer7_hwmod;
58extern struct omap_hwmod omap2xxx_timer8_hwmod;
59extern struct omap_hwmod omap2xxx_timer9_hwmod;
60extern struct omap_hwmod omap2xxx_timer10_hwmod;
61extern struct omap_hwmod omap2xxx_timer11_hwmod;
62extern struct omap_hwmod omap2xxx_timer12_hwmod;
63extern struct omap_hwmod omap2xxx_wd_timer2_hwmod;
64extern struct omap_hwmod omap2xxx_uart1_hwmod;
65extern struct omap_hwmod omap2xxx_uart2_hwmod;
66extern struct omap_hwmod omap2xxx_uart3_hwmod;
67extern struct omap_hwmod omap2xxx_dss_core_hwmod;
68extern struct omap_hwmod omap2xxx_dss_dispc_hwmod;
69extern struct omap_hwmod omap2xxx_dss_rfbi_hwmod;
70extern struct omap_hwmod omap2xxx_dss_venc_hwmod;
71extern struct omap_hwmod omap2xxx_gpio1_hwmod;
72extern struct omap_hwmod omap2xxx_gpio2_hwmod;
73extern struct omap_hwmod omap2xxx_gpio3_hwmod;
74extern struct omap_hwmod omap2xxx_gpio4_hwmod;
75extern struct omap_hwmod omap2xxx_mcspi1_hwmod;
76extern struct omap_hwmod omap2xxx_mcspi2_hwmod;
77
78/* Common interface data across OMAP2xxx */
79extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core;
80extern struct omap_hwmod_ocp_if omap2xxx_mpu__l3_main;
81extern struct omap_hwmod_ocp_if omap2xxx_dss__l3;
82extern struct omap_hwmod_ocp_if omap2xxx_l4_core__l4_wkup;
83extern struct omap_hwmod_ocp_if omap2_l4_core__uart1;
84extern struct omap_hwmod_ocp_if omap2_l4_core__uart2;
85extern struct omap_hwmod_ocp_if omap2_l4_core__uart3;
86extern struct omap_hwmod_ocp_if omap2xxx_l4_core__mcspi1;
87extern struct omap_hwmod_ocp_if omap2xxx_l4_core__mcspi2;
88extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer2;
89extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer3;
90extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer4;
91extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer5;
92extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer6;
93extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer7;
94extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer8;
95extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer9;
96extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer10;
97extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer11;
98extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer12;
99extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss;
100extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_dispc;
101extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_rfbi;
102extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_venc;
57 103
58/* Common IP block data */ 104/* Common IP block data */
59extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[]; 105extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[];
@@ -94,6 +140,7 @@ extern struct omap_hwmod_irq_info omap2_gpio4_irqs[];
94extern struct omap_hwmod_irq_info omap2_dma_system_irqs[]; 140extern struct omap_hwmod_irq_info omap2_dma_system_irqs[];
95extern struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[]; 141extern struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[];
96extern struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[]; 142extern struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[];
143extern struct omap_hwmod_addr_space omap2xxx_timer12_addrs[];
97 144
98/* OMAP hwmod classes - forward declarations */ 145/* OMAP hwmod classes - forward declarations */
99extern struct omap_hwmod_class l3_hwmod_class; 146extern struct omap_hwmod_class l3_hwmod_class;
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index 36fa90b6ece8..78564895e914 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -38,27 +38,6 @@ static inline int omap4_opp_init(void)
38} 38}
39#endif 39#endif
40 40
41/*
42 * cpuidle mach specific parameters
43 *
44 * The board code can override the default C-states definition using
45 * omap3_pm_init_cpuidle
46 */
47struct cpuidle_params {
48 u32 exit_latency; /* exit_latency = sleep + wake-up latencies */
49 u32 target_residency;
50 u8 valid; /* validates the C-state */
51};
52
53#if defined(CONFIG_PM) && defined(CONFIG_CPU_IDLE)
54extern void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params);
55#else
56static
57inline void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params)
58{
59}
60#endif
61
62extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm); 41extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm);
63extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state); 42extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state);
64 43
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index 95442b69ae27..facfffca9eac 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -171,8 +171,6 @@ static int omap2_allow_mpu_retention(void)
171 171
172static void omap2_enter_mpu_retention(void) 172static void omap2_enter_mpu_retention(void)
173{ 173{
174 int only_idle = 0;
175
176 /* Putting MPU into the WFI state while a transfer is active 174 /* Putting MPU into the WFI state while a transfer is active
177 * seems to cause the I2C block to timeout. Why? Good question. */ 175 * seems to cause the I2C block to timeout. Why? Good question. */
178 if (omap2_i2c_active()) 176 if (omap2_i2c_active())
@@ -195,7 +193,6 @@ static void omap2_enter_mpu_retention(void)
195 193
196 omap2_prm_write_mod_reg(OMAP_LOGICRETSTATE_MASK, MPU_MOD, 194 omap2_prm_write_mod_reg(OMAP_LOGICRETSTATE_MASK, MPU_MOD,
197 OMAP2_PM_PWSTCTRL); 195 OMAP2_PM_PWSTCTRL);
198 only_idle = 1;
199 } 196 }
200 197
201 omap2_sram_idle(); 198 omap2_sram_idle();
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 703bd1099259..8b43aefba0ea 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -273,7 +273,7 @@ void omap_sram_idle(void)
273 int per_next_state = PWRDM_POWER_ON; 273 int per_next_state = PWRDM_POWER_ON;
274 int core_next_state = PWRDM_POWER_ON; 274 int core_next_state = PWRDM_POWER_ON;
275 int per_going_off; 275 int per_going_off;
276 int core_prev_state, per_prev_state; 276 int core_prev_state;
277 u32 sdrc_pwr = 0; 277 u32 sdrc_pwr = 0;
278 278
279 mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm); 279 mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm);
@@ -375,10 +375,8 @@ void omap_sram_idle(void)
375 pwrdm_post_transition(); 375 pwrdm_post_transition();
376 376
377 /* PER */ 377 /* PER */
378 if (per_next_state < PWRDM_POWER_ON) { 378 if (per_next_state < PWRDM_POWER_ON)
379 per_prev_state = pwrdm_read_prev_pwrst(per_pwrdm);
380 omap2_gpio_resume_after_idle(); 379 omap2_gpio_resume_after_idle();
381 }
382 380
383 /* Disable IO-PAD and IO-CHAIN wakeup */ 381 /* Disable IO-PAD and IO-CHAIN wakeup */
384 if (omap3_has_io_wakeup() && 382 if (omap3_has_io_wakeup() &&
@@ -702,7 +700,7 @@ static void __init pm_errata_configure(void)
702static int __init omap3_pm_init(void) 700static int __init omap3_pm_init(void)
703{ 701{
704 struct power_state *pwrst, *tmp; 702 struct power_state *pwrst, *tmp;
705 struct clockdomain *neon_clkdm, *per_clkdm, *mpu_clkdm, *core_clkdm; 703 struct clockdomain *neon_clkdm, *mpu_clkdm;
706 int ret; 704 int ret;
707 705
708 if (!cpu_is_omap34xx()) 706 if (!cpu_is_omap34xx())
@@ -757,8 +755,6 @@ static int __init omap3_pm_init(void)
757 755
758 neon_clkdm = clkdm_lookup("neon_clkdm"); 756 neon_clkdm = clkdm_lookup("neon_clkdm");
759 mpu_clkdm = clkdm_lookup("mpu_clkdm"); 757 mpu_clkdm = clkdm_lookup("mpu_clkdm");
760 per_clkdm = clkdm_lookup("per_clkdm");
761 core_clkdm = clkdm_lookup("core_clkdm");
762 758
763#ifdef CONFIG_SUSPEND 759#ifdef CONFIG_SUSPEND
764 omap_pm_suspend = omap3_pm_suspend; 760 omap_pm_suspend = omap3_pm_suspend;
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c
index d28f848897d6..dfe00ddb5c60 100644
--- a/arch/arm/mach-omap2/prm_common.c
+++ b/arch/arm/mach-omap2/prm_common.c
@@ -237,7 +237,7 @@ void omap_prcm_irq_complete(void)
237 */ 237 */
238int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup) 238int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup)
239{ 239{
240 int nr_regs = irq_setup->nr_regs; 240 int nr_regs;
241 u32 mask[OMAP_PRCM_MAX_NR_PENDING_REG]; 241 u32 mask[OMAP_PRCM_MAX_NR_PENDING_REG];
242 int offset, i; 242 int offset, i;
243 struct irq_chip_generic *gc; 243 struct irq_chip_generic *gc;
@@ -246,6 +246,8 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup)
246 if (!irq_setup) 246 if (!irq_setup)
247 return -EINVAL; 247 return -EINVAL;
248 248
249 nr_regs = irq_setup->nr_regs;
250
249 if (prcm_irq_setup) { 251 if (prcm_irq_setup) {
250 pr_err("PRCM: already initialized; won't reinitialize\n"); 252 pr_err("PRCM: already initialized; won't reinitialize\n");
251 return -EINVAL; 253 return -EINVAL;
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 9fc2f44188cb..678dd1d612e5 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -133,7 +133,7 @@ static void omap_serial_fill_default_pads(struct omap_board_data *bdata)
133static void omap_serial_fill_default_pads(struct omap_board_data *bdata) {} 133static void omap_serial_fill_default_pads(struct omap_board_data *bdata) {}
134#endif 134#endif
135 135
136char *cmdline_find_option(char *str) 136static char *cmdline_find_option(char *str)
137{ 137{
138 extern char *saved_command_line; 138 extern char *saved_command_line;
139 139
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index c512bac69ec5..ecec873e78cd 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -145,8 +145,10 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
145{ 145{
146 char name[10]; /* 10 = sizeof("gptXX_Xck0") */ 146 char name[10]; /* 10 = sizeof("gptXX_Xck0") */
147 struct omap_hwmod *oh; 147 struct omap_hwmod *oh;
148 struct resource irq_rsrc, mem_rsrc;
148 size_t size; 149 size_t size;
149 int res = 0; 150 int res = 0;
151 int r;
150 152
151 sprintf(name, "timer%d", gptimer_id); 153 sprintf(name, "timer%d", gptimer_id);
152 omap_hwmod_setup_one(name); 154 omap_hwmod_setup_one(name);
@@ -154,9 +156,16 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
154 if (!oh) 156 if (!oh)
155 return -ENODEV; 157 return -ENODEV;
156 158
157 timer->irq = oh->mpu_irqs[0].irq; 159 r = omap_hwmod_get_resource_byname(oh, IORESOURCE_IRQ, NULL, &irq_rsrc);
158 timer->phys_base = oh->slaves[0]->addr->pa_start; 160 if (r)
159 size = oh->slaves[0]->addr->pa_end - timer->phys_base; 161 return -ENXIO;
162 timer->irq = irq_rsrc.start;
163
164 r = omap_hwmod_get_resource_byname(oh, IORESOURCE_MEM, NULL, &mem_rsrc);
165 if (r)
166 return -ENXIO;
167 timer->phys_base = mem_rsrc.start;
168 size = mem_rsrc.end - mem_rsrc.start;
160 169
161 /* Static mapping, never released */ 170 /* Static mapping, never released */
162 timer->io_base = ioremap(timer->phys_base, size); 171 timer->io_base = ioremap(timer->phys_base, size);
diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c
index 994d8f591a1d..db84a46ce7fd 100644
--- a/arch/arm/mach-omap2/usb-tusb6010.c
+++ b/arch/arm/mach-omap2/usb-tusb6010.c
@@ -126,7 +126,7 @@ static int tusb_set_sync_mode(unsigned sysclk_ps, unsigned fclk_ps)
126 tmp = (t.sync_clk + fclk_ps - 1) / fclk_ps; 126 tmp = (t.sync_clk + fclk_ps - 1) / fclk_ps;
127 if (tmp > 4) 127 if (tmp > 4)
128 return -ERANGE; 128 return -ERANGE;
129 if (tmp <= 0) 129 if (tmp == 0)
130 tmp = 1; 130 tmp = 1;
131 t.page_burst_access = (fclk_ps * tmp) / 1000; 131 t.page_burst_access = (fclk_ps * tmp) / 1000;
132 132
diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig
index 6604fc6ca58a..0673f0c10432 100644
--- a/arch/arm/mach-orion5x/Kconfig
+++ b/arch/arm/mach-orion5x/Kconfig
@@ -86,7 +86,6 @@ config MACH_WRT350N_V2
86 86
87config MACH_TS78XX 87config MACH_TS78XX
88 bool "Technologic Systems TS-78xx" 88 bool "Technologic Systems TS-78xx"
89 select PM
90 help 89 help
91 Say 'Y' here if you want your kernel to support the 90 Say 'Y' here if you want your kernel to support the
92 Technologic Systems TS-78xx platform. 91 Technologic Systems TS-78xx platform.
diff --git a/arch/arm/mach-orion5x/addr-map.c b/arch/arm/mach-orion5x/addr-map.c
index 3638e5c12b7e..eaac83d1df6f 100644
--- a/arch/arm/mach-orion5x/addr-map.c
+++ b/arch/arm/mach-orion5x/addr-map.c
@@ -76,7 +76,7 @@ static int __init cpu_win_can_remap(const struct orion_addr_map_cfg *cfg,
76/* 76/*
77 * Description of the windows needed by the platform code 77 * Description of the windows needed by the platform code
78 */ 78 */
79static struct __initdata orion_addr_map_cfg addr_map_cfg = { 79static struct orion_addr_map_cfg addr_map_cfg __initdata = {
80 .num_wins = 8, 80 .num_wins = 8,
81 .cpu_win_can_remap = cpu_win_can_remap, 81 .cpu_win_can_remap = cpu_win_can_remap,
82 .bridge_virt_base = ORION5X_BRIDGE_VIRT_BASE, 82 .bridge_virt_base = ORION5X_BRIDGE_VIRT_BASE,
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 24481666d2cd..e2e9db492d0c 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -205,7 +205,7 @@ int __init orion5x_find_tclk(void)
205 return 166666667; 205 return 166666667;
206} 206}
207 207
208static void orion5x_timer_init(void) 208static void __init orion5x_timer_init(void)
209{ 209{
210 orion5x_tclk = orion5x_find_tclk(); 210 orion5x_tclk = orion5x_find_tclk();
211 211
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h
index 2e6454c8d4ba..31bab92ce038 100644
--- a/arch/arm/mach-orion5x/common.h
+++ b/arch/arm/mach-orion5x/common.h
@@ -45,6 +45,7 @@ void orion5x_restart(char, const char *);
45 */ 45 */
46struct pci_bus; 46struct pci_bus;
47struct pci_sys_data; 47struct pci_sys_data;
48struct pci_dev;
48 49
49void orion5x_pcie_id(u32 *dev, u32 *rev); 50void orion5x_pcie_id(u32 *dev, u32 *rev);
50void orion5x_pci_disable(void); 51void orion5x_pci_disable(void);
diff --git a/arch/arm/mach-orion5x/ts78xx-fpga.h b/arch/arm/mach-orion5x/ts78xx-fpga.h
index 151e89e1e676..97c393d39ae2 100644
--- a/arch/arm/mach-orion5x/ts78xx-fpga.h
+++ b/arch/arm/mach-orion5x/ts78xx-fpga.h
@@ -28,9 +28,9 @@ struct fpga_device {
28 28
29struct fpga_devices { 29struct fpga_devices {
30 /* Technologic Systems */ 30 /* Technologic Systems */
31 struct fpga_device ts_rtc; 31 struct fpga_device ts_rtc;
32 struct fpga_device ts_nand; 32 struct fpga_device ts_nand;
33 struct fpga_device ts_rng; 33 struct fpga_device ts_rng;
34}; 34};
35 35
36struct ts78xx_fpga_data { 36struct ts78xx_fpga_data {
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c
index c96f37472eda..a74f3cf54cc5 100644
--- a/arch/arm/mach-orion5x/ts78xx-setup.c
+++ b/arch/arm/mach-orion5x/ts78xx-setup.c
@@ -8,6 +8,8 @@
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10 10
11#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
12
11#include <linux/kernel.h> 13#include <linux/kernel.h>
12#include <linux/init.h> 14#include <linux/init.h>
13#include <linux/sysfs.h> 15#include <linux/sysfs.h>
@@ -115,7 +117,7 @@ static struct platform_device ts78xx_ts_rtc_device = {
115 * I've used the method TS use in their rtc7800.c example for the detection 117 * I've used the method TS use in their rtc7800.c example for the detection
116 * 118 *
117 * TODO: track down a guinea pig without an RTC to see if we can work out a 119 * TODO: track down a guinea pig without an RTC to see if we can work out a
118 * better RTC detection routine 120 * better RTC detection routine
119 */ 121 */
120static int ts78xx_ts_rtc_load(void) 122static int ts78xx_ts_rtc_load(void)
121{ 123{
@@ -141,10 +143,14 @@ static int ts78xx_ts_rtc_load(void)
141 } else 143 } else
142 rc = platform_device_add(&ts78xx_ts_rtc_device); 144 rc = platform_device_add(&ts78xx_ts_rtc_device);
143 145
146 if (rc)
147 pr_info("RTC could not be registered: %d\n",
148 rc);
144 return rc; 149 return rc;
145 } 150 }
146 } 151 }
147 152
153 pr_info("RTC not found\n");
148 return -ENODEV; 154 return -ENODEV;
149}; 155};
150 156
@@ -292,11 +298,8 @@ static struct platform_nand_data ts78xx_ts_nand_data = {
292 }, 298 },
293}; 299};
294 300
295static struct resource ts78xx_ts_nand_resources = { 301static struct resource ts78xx_ts_nand_resources
296 .start = TS_NAND_DATA, 302 = DEFINE_RES_MEM(TS_NAND_DATA, 4);
297 .end = TS_NAND_DATA + 4,
298 .flags = IORESOURCE_MEM,
299};
300 303
301static struct platform_device ts78xx_ts_nand_device = { 304static struct platform_device ts78xx_ts_nand_device = {
302 .name = "gen_nand", 305 .name = "gen_nand",
@@ -319,6 +322,8 @@ static int ts78xx_ts_nand_load(void)
319 } else 322 } else
320 rc = platform_device_add(&ts78xx_ts_nand_device); 323 rc = platform_device_add(&ts78xx_ts_nand_device);
321 324
325 if (rc)
326 pr_info("NAND could not be registered: %d\n", rc);
322 return rc; 327 return rc;
323}; 328};
324 329
@@ -332,11 +337,8 @@ static void ts78xx_ts_nand_unload(void)
332 ****************************************************************************/ 337 ****************************************************************************/
333#define TS_RNG_DATA (TS78XX_FPGA_REGS_PHYS_BASE | 0x044) 338#define TS_RNG_DATA (TS78XX_FPGA_REGS_PHYS_BASE | 0x044)
334 339
335static struct resource ts78xx_ts_rng_resource = { 340static struct resource ts78xx_ts_rng_resource
336 .flags = IORESOURCE_MEM, 341 = DEFINE_RES_MEM(TS_RNG_DATA, 4);
337 .start = TS_RNG_DATA,
338 .end = TS_RNG_DATA + 4 - 1,
339};
340 342
341static struct timeriomem_rng_data ts78xx_ts_rng_data = { 343static struct timeriomem_rng_data ts78xx_ts_rng_data = {
342 .period = 1000000, /* one second */ 344 .period = 1000000, /* one second */
@@ -363,6 +365,8 @@ static int ts78xx_ts_rng_load(void)
363 } else 365 } else
364 rc = platform_device_add(&ts78xx_ts_rng_device); 366 rc = platform_device_add(&ts78xx_ts_rng_device);
365 367
368 if (rc)
369 pr_info("RNG could not be registered: %d\n", rc);
366 return rc; 370 return rc;
367}; 371};
368 372
@@ -402,7 +406,7 @@ static void ts78xx_fpga_supports(void)
402 /* enable devices if magic matches */ 406 /* enable devices if magic matches */
403 switch ((ts78xx_fpga.id >> 8) & 0xffffff) { 407 switch ((ts78xx_fpga.id >> 8) & 0xffffff) {
404 case TS7800_FPGA_MAGIC: 408 case TS7800_FPGA_MAGIC:
405 pr_warning("TS-7800 FPGA: unrecognized revision 0x%.2x\n", 409 pr_warning("unrecognised FPGA revision 0x%.2x\n",
406 ts78xx_fpga.id & 0xff); 410 ts78xx_fpga.id & 0xff);
407 ts78xx_fpga.supports.ts_rtc.present = 1; 411 ts78xx_fpga.supports.ts_rtc.present = 1;
408 ts78xx_fpga.supports.ts_nand.present = 1; 412 ts78xx_fpga.supports.ts_nand.present = 1;
@@ -422,26 +426,20 @@ static int ts78xx_fpga_load_devices(void)
422 426
423 if (ts78xx_fpga.supports.ts_rtc.present == 1) { 427 if (ts78xx_fpga.supports.ts_rtc.present == 1) {
424 tmp = ts78xx_ts_rtc_load(); 428 tmp = ts78xx_ts_rtc_load();
425 if (tmp) { 429 if (tmp)
426 pr_info("TS-78xx: RTC not registered\n");
427 ts78xx_fpga.supports.ts_rtc.present = 0; 430 ts78xx_fpga.supports.ts_rtc.present = 0;
428 }
429 ret |= tmp; 431 ret |= tmp;
430 } 432 }
431 if (ts78xx_fpga.supports.ts_nand.present == 1) { 433 if (ts78xx_fpga.supports.ts_nand.present == 1) {
432 tmp = ts78xx_ts_nand_load(); 434 tmp = ts78xx_ts_nand_load();
433 if (tmp) { 435 if (tmp)
434 pr_info("TS-78xx: NAND not registered\n");
435 ts78xx_fpga.supports.ts_nand.present = 0; 436 ts78xx_fpga.supports.ts_nand.present = 0;
436 }
437 ret |= tmp; 437 ret |= tmp;
438 } 438 }
439 if (ts78xx_fpga.supports.ts_rng.present == 1) { 439 if (ts78xx_fpga.supports.ts_rng.present == 1) {
440 tmp = ts78xx_ts_rng_load(); 440 tmp = ts78xx_ts_rng_load();
441 if (tmp) { 441 if (tmp)
442 pr_info("TS-78xx: RNG not registered\n");
443 ts78xx_fpga.supports.ts_rng.present = 0; 442 ts78xx_fpga.supports.ts_rng.present = 0;
444 }
445 ret |= tmp; 443 ret |= tmp;
446 } 444 }
447 445
@@ -466,7 +464,7 @@ static int ts78xx_fpga_load(void)
466{ 464{
467 ts78xx_fpga.id = readl(TS78XX_FPGA_REGS_VIRT_BASE); 465 ts78xx_fpga.id = readl(TS78XX_FPGA_REGS_VIRT_BASE);
468 466
469 pr_info("TS-78xx FPGA: magic=0x%.6x, rev=0x%.2x\n", 467 pr_info("FPGA magic=0x%.6x, rev=0x%.2x\n",
470 (ts78xx_fpga.id >> 8) & 0xffffff, 468 (ts78xx_fpga.id >> 8) & 0xffffff,
471 ts78xx_fpga.id & 0xff); 469 ts78xx_fpga.id & 0xff);
472 470
@@ -494,7 +492,7 @@ static int ts78xx_fpga_unload(void)
494 * UrJTAG SVN since r1381 can be used to reprogram the FPGA 492 * UrJTAG SVN since r1381 can be used to reprogram the FPGA
495 */ 493 */
496 if (ts78xx_fpga.id != fpga_id) { 494 if (ts78xx_fpga.id != fpga_id) {
497 pr_err("TS-78xx FPGA: magic/rev mismatch\n" 495 pr_err("FPGA magic/rev mismatch\n"
498 "TS-78xx FPGA: was 0x%.6x/%.2x but now 0x%.6x/%.2x\n", 496 "TS-78xx FPGA: was 0x%.6x/%.2x but now 0x%.6x/%.2x\n",
499 (ts78xx_fpga.id >> 8) & 0xffffff, ts78xx_fpga.id & 0xff, 497 (ts78xx_fpga.id >> 8) & 0xffffff, ts78xx_fpga.id & 0xff,
500 (fpga_id >> 8) & 0xffffff, fpga_id & 0xff); 498 (fpga_id >> 8) & 0xffffff, fpga_id & 0xff);
@@ -525,7 +523,7 @@ static ssize_t ts78xx_fpga_store(struct kobject *kobj,
525 int value, ret; 523 int value, ret;
526 524
527 if (ts78xx_fpga.state < 0) { 525 if (ts78xx_fpga.state < 0) {
528 pr_err("TS-78xx FPGA: borked, you must powercycle asap\n"); 526 pr_err("FPGA borked, you must powercycle ASAP\n");
529 return -EBUSY; 527 return -EBUSY;
530 } 528 }
531 529
@@ -533,10 +531,8 @@ static ssize_t ts78xx_fpga_store(struct kobject *kobj,
533 value = 1; 531 value = 1;
534 else if (strncmp(buf, "offline", sizeof("offline") - 1) == 0) 532 else if (strncmp(buf, "offline", sizeof("offline") - 1) == 0)
535 value = 0; 533 value = 0;
536 else { 534 else
537 pr_err("ts78xx_fpga_store: Invalid value\n");
538 return -EINVAL; 535 return -EINVAL;
539 }
540 536
541 if (ts78xx_fpga.state == value) 537 if (ts78xx_fpga.state == value)
542 return n; 538 return n;
@@ -614,7 +610,7 @@ static void __init ts78xx_init(void)
614 /* FPGA init */ 610 /* FPGA init */
615 ts78xx_fpga_devices_zero_init(); 611 ts78xx_fpga_devices_zero_init();
616 ret = ts78xx_fpga_load(); 612 ret = ts78xx_fpga_load();
617 ret = sysfs_create_file(power_kobj, &ts78xx_fpga_attr.attr); 613 ret = sysfs_create_file(firmware_kobj, &ts78xx_fpga_attr.attr);
618 if (ret) 614 if (ret)
619 pr_err("sysfs_create_file failed: %d\n", ret); 615 pr_err("sysfs_create_file failed: %d\n", ret);
620} 616}
diff --git a/arch/arm/mach-s3c24xx/bast-ide.c b/arch/arm/mach-s3c24xx/bast-ide.c
index 298ececfa366..ba02cf8d80a2 100644
--- a/arch/arm/mach-s3c24xx/bast-ide.c
+++ b/arch/arm/mach-s3c24xx/bast-ide.c
@@ -37,21 +37,9 @@ static struct pata_platform_info bast_ide_platdata = {
37#define IDE_CS S3C2410_CS5 37#define IDE_CS S3C2410_CS5
38 38
39static struct resource bast_ide0_resource[] = { 39static struct resource bast_ide0_resource[] = {
40 [0] = { 40 [0] = DEFINE_RES_MEM(IDE_CS + BAST_PA_IDEPRI, 8 * 0x20),
41 .start = IDE_CS + BAST_PA_IDEPRI, 41 [1] = DEFINE_RES_MEM(IDE_CS + BAST_PA_IDEPRIAUX + (6 * 0x20), 0x20),
42 .end = IDE_CS + BAST_PA_IDEPRI + (8 * 0x20) - 1, 42 [2] = DEFINE_RES_IRQ(IRQ_IDE0),
43 .flags = IORESOURCE_MEM,
44 },
45 [1] = {
46 .start = IDE_CS + BAST_PA_IDEPRIAUX + (6 * 0x20) ,
47 .end = IDE_CS + BAST_PA_IDEPRIAUX + (7 * 0x20) - 1,
48 .flags = IORESOURCE_MEM,
49 },
50 [2] = {
51 .start = IRQ_IDE0,
52 .end = IRQ_IDE0,
53 .flags = IORESOURCE_IRQ,
54 },
55}; 43};
56 44
57static struct platform_device bast_device_ide0 = { 45static struct platform_device bast_device_ide0 = {
@@ -67,21 +55,9 @@ static struct platform_device bast_device_ide0 = {
67}; 55};
68 56
69static struct resource bast_ide1_resource[] = { 57static struct resource bast_ide1_resource[] = {
70 [0] = { 58 [0] = DEFINE_RES_MEM(IDE_CS + BAST_PA_IDESEC, 8 * 0x20),
71 .start = IDE_CS + BAST_PA_IDESEC, 59 [1] = DEFINE_RES_MEM(IDE_CS + BAST_PA_IDESECAUX + (6 * 0x20), 0x20),
72 .end = IDE_CS + BAST_PA_IDESEC + (8 * 0x20) - 1, 60 [2] = DEFINE_RES_IRQ(IRQ_IDE1),
73 .flags = IORESOURCE_MEM,
74 },
75 [1] = {
76 .start = IDE_CS + BAST_PA_IDESECAUX + (6 * 0x20),
77 .end = IDE_CS + BAST_PA_IDESECAUX + (7 * 0x20) - 1,
78 .flags = IORESOURCE_MEM,
79 },
80 [2] = {
81 .start = IRQ_IDE1,
82 .end = IRQ_IDE1,
83 .flags = IORESOURCE_IRQ,
84 },
85}; 61};
86 62
87static struct platform_device bast_device_ide1 = { 63static struct platform_device bast_device_ide1 = {
diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c24xx/mach-amlm5900.c
index 4220cc60de3c..ea2c4b003d58 100644
--- a/arch/arm/mach-s3c24xx/mach-amlm5900.c
+++ b/arch/arm/mach-s3c24xx/mach-amlm5900.c
@@ -65,13 +65,8 @@
65 65
66#include "common.h" 66#include "common.h"
67 67
68static struct resource amlm5900_nor_resource = { 68static struct resource amlm5900_nor_resource =
69 .start = 0x00000000, 69 DEFINE_RES_MEM(0x00000000, SZ_16M);
70 .end = 0x01000000 - 1,
71 .flags = IORESOURCE_MEM,
72};
73
74
75 70
76static struct mtd_partition amlm5900_mtd_partitions[] = { 71static struct mtd_partition amlm5900_mtd_partitions[] = {
77 { 72 {
diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24xx/mach-anubis.c
index 60c72c54c21e..5a7d0c0010f7 100644
--- a/arch/arm/mach-s3c24xx/mach-anubis.c
+++ b/arch/arm/mach-s3c24xx/mach-anubis.c
@@ -235,19 +235,9 @@ static struct pata_platform_info anubis_ide_platdata = {
235}; 235};
236 236
237static struct resource anubis_ide0_resource[] = { 237static struct resource anubis_ide0_resource[] = {
238 { 238 [0] = DEFINE_RES_MEM(S3C2410_CS3, 8 * 32),
239 .start = S3C2410_CS3, 239 [2] = DEFINE_RES_MEM(S3C2410_CS3 + (1 << 26) + (6 * 32), 32),
240 .end = S3C2410_CS3 + (8*32) - 1, 240 [3] = DEFINE_RES_IRQ(IRQ_IDE0),
241 .flags = IORESOURCE_MEM,
242 }, {
243 .start = S3C2410_CS3 + (1<<26) + (6*32),
244 .end = S3C2410_CS3 + (1<<26) + (7*32) - 1,
245 .flags = IORESOURCE_MEM,
246 }, {
247 .start = IRQ_IDE0,
248 .end = IRQ_IDE0,
249 .flags = IORESOURCE_IRQ,
250 },
251}; 241};
252 242
253static struct platform_device anubis_device_ide0 = { 243static struct platform_device anubis_device_ide0 = {
@@ -262,19 +252,9 @@ static struct platform_device anubis_device_ide0 = {
262}; 252};
263 253
264static struct resource anubis_ide1_resource[] = { 254static struct resource anubis_ide1_resource[] = {
265 { 255 [0] = DEFINE_RES_MEM(S3C2410_CS4, 8 * 32),
266 .start = S3C2410_CS4, 256 [1] = DEFINE_RES_MEM(S3C2410_CS4 + (1 << 26) + (6 * 32), 32),
267 .end = S3C2410_CS4 + (8*32) - 1, 257 [2] = DEFINE_RES_IRQ(IRQ_IDE0),
268 .flags = IORESOURCE_MEM,
269 }, {
270 .start = S3C2410_CS4 + (1<<26) + (6*32),
271 .end = S3C2410_CS4 + (1<<26) + (7*32) - 1,
272 .flags = IORESOURCE_MEM,
273 }, {
274 .start = IRQ_IDE0,
275 .end = IRQ_IDE0,
276 .flags = IORESOURCE_IRQ,
277 },
278}; 258};
279 259
280static struct platform_device anubis_device_ide1 = { 260static struct platform_device anubis_device_ide1 = {
@@ -298,16 +278,8 @@ static struct ax_plat_data anubis_asix_platdata = {
298}; 278};
299 279
300static struct resource anubis_asix_resource[] = { 280static struct resource anubis_asix_resource[] = {
301 [0] = { 281 [0] = DEFINE_RES_MEM(S3C2410_CS5, 0x20 * 0x20),
302 .start = S3C2410_CS5, 282 [1] = DEFINE_RES_IRQ(IRQ_ASIX),
303 .end = S3C2410_CS5 + (0x20 * 0x20) -1,
304 .flags = IORESOURCE_MEM
305 },
306 [1] = {
307 .start = IRQ_ASIX,
308 .end = IRQ_ASIX,
309 .flags = IORESOURCE_IRQ
310 }
311}; 283};
312 284
313static struct platform_device anubis_device_asix = { 285static struct platform_device anubis_device_asix = {
@@ -323,21 +295,9 @@ static struct platform_device anubis_device_asix = {
323/* SM501 */ 295/* SM501 */
324 296
325static struct resource anubis_sm501_resource[] = { 297static struct resource anubis_sm501_resource[] = {
326 [0] = { 298 [0] = DEFINE_RES_MEM(S3C2410_CS2, SZ_8M),
327 .start = S3C2410_CS2, 299 [1] = DEFINE_RES_MEM(S3C2410_CS2 + SZ_64M - SZ_2M, SZ_2M),
328 .end = S3C2410_CS2 + SZ_8M, 300 [2] = DEFINE_RES_IRQ(IRQ_EINT0),
329 .flags = IORESOURCE_MEM,
330 },
331 [1] = {
332 .start = S3C2410_CS2 + SZ_64M - SZ_2M,
333 .end = S3C2410_CS2 + SZ_64M - 1,
334 .flags = IORESOURCE_MEM,
335 },
336 [2] = {
337 .start = IRQ_EINT0,
338 .end = IRQ_EINT0,
339 .flags = IORESOURCE_IRQ,
340 },
341}; 301};
342 302
343static struct sm501_initdata anubis_sm501_initdata = { 303static struct sm501_initdata anubis_sm501_initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c
index d7ae49c90118..7a05abf1270b 100644
--- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
+++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c
@@ -118,21 +118,10 @@ static struct s3c2410_platform_nand __initdata at2440evb_nand_info = {
118/* DM9000AEP 10/100 ethernet controller */ 118/* DM9000AEP 10/100 ethernet controller */
119 119
120static struct resource at2440evb_dm9k_resource[] = { 120static struct resource at2440evb_dm9k_resource[] = {
121 [0] = { 121 [0] = DEFINE_RES_MEM(S3C2410_CS3, 4),
122 .start = S3C2410_CS3, 122 [1] = DEFINE_RES_MEM(S3C2410_CS3 + 4, 4),
123 .end = S3C2410_CS3 + 3, 123 [2] = DEFINE_RES_NAMED(IRQ_EINT7, 1, NULL, IORESOURCE_IRQ \
124 .flags = IORESOURCE_MEM 124 | IORESOURCE_IRQ_HIGHEDGE),
125 },
126 [1] = {
127 .start = S3C2410_CS3 + 4,
128 .end = S3C2410_CS3 + 7,
129 .flags = IORESOURCE_MEM
130 },
131 [2] = {
132 .start = IRQ_EINT7,
133 .end = IRQ_EINT7,
134 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
135 }
136}; 125};
137 126
138static struct dm9000_plat_data at2440evb_dm9k_pdata = { 127static struct dm9000_plat_data at2440evb_dm9k_pdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/mach-bast.c
index 53219c02eca0..1cf1720682d3 100644
--- a/arch/arm/mach-s3c24xx/mach-bast.c
+++ b/arch/arm/mach-s3c24xx/mach-bast.c
@@ -310,22 +310,10 @@ static struct s3c2410_platform_nand __initdata bast_nand_info = {
310/* DM9000 */ 310/* DM9000 */
311 311
312static struct resource bast_dm9k_resource[] = { 312static struct resource bast_dm9k_resource[] = {
313 [0] = { 313 [0] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_DM9000, 4),
314 .start = S3C2410_CS5 + BAST_PA_DM9000, 314 [1] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_DM9000 + 0x40, 0x40),
315 .end = S3C2410_CS5 + BAST_PA_DM9000 + 3, 315 [2] = DEFINE_RES_NAMED(IRQ_DM9000 , 1, NULL, IORESOURCE_IRQ \
316 .flags = IORESOURCE_MEM, 316 | IORESOURCE_IRQ_HIGHLEVEL),
317 },
318 [1] = {
319 .start = S3C2410_CS5 + BAST_PA_DM9000 + 0x40,
320 .end = S3C2410_CS5 + BAST_PA_DM9000 + 0x40 + 0x3f,
321 .flags = IORESOURCE_MEM,
322 },
323 [2] = {
324 .start = IRQ_DM9000,
325 .end = IRQ_DM9000,
326 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
327 }
328
329}; 317};
330 318
331/* for the moment we limit ourselves to 16bit IO until some 319/* for the moment we limit ourselves to 16bit IO until some
@@ -400,21 +388,9 @@ static struct ax_plat_data bast_asix_platdata = {
400}; 388};
401 389
402static struct resource bast_asix_resource[] = { 390static struct resource bast_asix_resource[] = {
403 [0] = { 391 [0] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_ASIXNET, 0x18 * 0x20),
404 .start = S3C2410_CS5 + BAST_PA_ASIXNET, 392 [1] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_ASIXNET + (0x1f * 0x20), 1),
405 .end = S3C2410_CS5 + BAST_PA_ASIXNET + (0x18 * 0x20) - 1, 393 [2] = DEFINE_RES_IRQ(IRQ_ASIX),
406 .flags = IORESOURCE_MEM,
407 },
408 [1] = {
409 .start = S3C2410_CS5 + BAST_PA_ASIXNET + (0x1f * 0x20),
410 .end = S3C2410_CS5 + BAST_PA_ASIXNET + (0x1f * 0x20),
411 .flags = IORESOURCE_MEM,
412 },
413 [2] = {
414 .start = IRQ_ASIX,
415 .end = IRQ_ASIX,
416 .flags = IORESOURCE_IRQ
417 }
418}; 394};
419 395
420static struct platform_device bast_device_asix = { 396static struct platform_device bast_device_asix = {
@@ -430,11 +406,8 @@ static struct platform_device bast_device_asix = {
430/* Asix AX88796 10/100 ethernet controller parallel port */ 406/* Asix AX88796 10/100 ethernet controller parallel port */
431 407
432static struct resource bast_asixpp_resource[] = { 408static struct resource bast_asixpp_resource[] = {
433 [0] = { 409 [0] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_ASIXNET + (0x18 * 0x20), \
434 .start = S3C2410_CS5 + BAST_PA_ASIXNET + (0x18 * 0x20), 410 0x30 * 0x20),
435 .end = S3C2410_CS5 + BAST_PA_ASIXNET + (0x1b * 0x20) - 1,
436 .flags = IORESOURCE_MEM,
437 }
438}; 411};
439 412
440static struct platform_device bast_device_axpp = { 413static struct platform_device bast_device_axpp = {
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index ba5d85394105..0f29f64a3eeb 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -387,11 +387,8 @@ static struct physmap_flash_data gta02_nor_flash_data = {
387 .width = 2, 387 .width = 2,
388}; 388};
389 389
390static struct resource gta02_nor_flash_resource = { 390static struct resource gta02_nor_flash_resource =
391 .start = GTA02_FLASH_BASE, 391 DEFINE_RES_MEM(GTA02_FLASH_BASE, GTA02_FLASH_SIZE);
392 .end = GTA02_FLASH_BASE + GTA02_FLASH_SIZE - 1,
393 .flags = IORESOURCE_MEM,
394};
395 392
396static struct platform_device gta02_nor_flash = { 393static struct platform_device gta02_nor_flash = {
397 .name = "physmap-flash", 394 .name = "physmap-flash",
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 6b21ba107eab..bb8d008d5a5c 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -253,13 +253,8 @@ static struct pda_power_pdata power_supply_info = {
253}; 253};
254 254
255static struct resource power_supply_resources[] = { 255static struct resource power_supply_resources[] = {
256 [0] = { 256 [0] = DEFINE_RES_NAMED(IRQ_EINT2, 1, "ac", IORESOURCE_IRQ \
257 .name = "ac", 257 | IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE),
258 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE |
259 IORESOURCE_IRQ_HIGHEDGE,
260 .start = IRQ_EINT2,
261 .end = IRQ_EINT2,
262 },
263}; 258};
264 259
265static struct platform_device power_supply = { 260static struct platform_device power_supply = {
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index 5d66fb218a41..f092b188ab70 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -292,21 +292,10 @@ static struct s3c2410_platform_nand mini2440_nand_info __initdata = {
292/* DM9000AEP 10/100 ethernet controller */ 292/* DM9000AEP 10/100 ethernet controller */
293 293
294static struct resource mini2440_dm9k_resource[] = { 294static struct resource mini2440_dm9k_resource[] = {
295 [0] = { 295 [0] = DEFINE_RES_MEM(MACH_MINI2440_DM9K_BASE, 4),
296 .start = MACH_MINI2440_DM9K_BASE, 296 [1] = DEFINE_RES_MEM(MACH_MINI2440_DM9K_BASE + 4, 4),
297 .end = MACH_MINI2440_DM9K_BASE + 3, 297 [2] = DEFINE_RES_NAMED(IRQ_EINT7, 1, NULL, IORESOURCE_IRQ \
298 .flags = IORESOURCE_MEM 298 | IORESOURCE_IRQ_HIGHEDGE),
299 },
300 [1] = {
301 .start = MACH_MINI2440_DM9K_BASE + 4,
302 .end = MACH_MINI2440_DM9K_BASE + 7,
303 .flags = IORESOURCE_MEM
304 },
305 [2] = {
306 .start = IRQ_EINT7,
307 .end = IRQ_EINT7,
308 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
309 }
310}; 299};
311 300
312/* 301/*
diff --git a/arch/arm/mach-s3c24xx/mach-nexcoder.c b/arch/arm/mach-s3c24xx/mach-nexcoder.c
index 5198e3e1c5be..5c05ba1c330f 100644
--- a/arch/arm/mach-s3c24xx/mach-nexcoder.c
+++ b/arch/arm/mach-s3c24xx/mach-nexcoder.c
@@ -84,11 +84,7 @@ static struct s3c2410_uartcfg nexcoder_uartcfgs[] __initdata = {
84/* NOR Flash on NexVision NexCoder 2440 board */ 84/* NOR Flash on NexVision NexCoder 2440 board */
85 85
86static struct resource nexcoder_nor_resource[] = { 86static struct resource nexcoder_nor_resource[] = {
87 [0] = { 87 [0] = DEFINE_RES_MEM(S3C2410_CS0, SZ_8M),
88 .start = S3C2410_CS0,
89 .end = S3C2410_CS0 + (8*1024*1024) - 1,
90 .flags = IORESOURCE_MEM,
91 }
92}; 88};
93 89
94static struct map_info nexcoder_nor_map = { 90static struct map_info nexcoder_nor_map = {
diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c
index c5daeb612a88..95d077255024 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris.c
@@ -244,16 +244,8 @@ static struct s3c2410_platform_nand __initdata osiris_nand_info = {
244/* PCMCIA control and configuration */ 244/* PCMCIA control and configuration */
245 245
246static struct resource osiris_pcmcia_resource[] = { 246static struct resource osiris_pcmcia_resource[] = {
247 [0] = { 247 [0] = DEFINE_RES_MEM(0x0f000000, SZ_1M),
248 .start = 0x0f000000, 248 [1] = DEFINE_RES_MEM(0x0c000000, SZ_1M),
249 .end = 0x0f100000,
250 .flags = IORESOURCE_MEM,
251 },
252 [1] = {
253 .start = 0x0c000000,
254 .end = 0x0c100000,
255 .flags = IORESOURCE_MEM,
256 }
257}; 249};
258 250
259static struct platform_device osiris_pcmcia = { 251static struct platform_device osiris_pcmcia = {
diff --git a/arch/arm/mach-s3c24xx/mach-otom.c b/arch/arm/mach-s3c24xx/mach-otom.c
index 5f1e0eeb38a9..bc4b6efb3b27 100644
--- a/arch/arm/mach-s3c24xx/mach-otom.c
+++ b/arch/arm/mach-s3c24xx/mach-otom.c
@@ -77,11 +77,7 @@ static struct s3c2410_uartcfg otom11_uartcfgs[] __initdata = {
77/* NOR Flash on NexVision OTOM board */ 77/* NOR Flash on NexVision OTOM board */
78 78
79static struct resource otom_nor_resource[] = { 79static struct resource otom_nor_resource[] = {
80 [0] = { 80 [0] = DEFINE_RES_MEM(S3C2410_CS0, SZ_4M),
81 .start = S3C2410_CS0,
82 .end = S3C2410_CS0 + (4*1024*1024) - 1,
83 .flags = IORESOURCE_MEM,
84 }
85}; 81};
86 82
87static struct platform_device otom_device_nor = { 83static struct platform_device otom_device_nor = {
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index 91c16d9d2459..b868dddcb836 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -180,16 +180,8 @@ static struct s3c2410fb_mach_info qt2410_fb_info __initdata = {
180/* CS8900 */ 180/* CS8900 */
181 181
182static struct resource qt2410_cs89x0_resources[] = { 182static struct resource qt2410_cs89x0_resources[] = {
183 [0] = { 183 [0] = DEFINE_RES_MEM(0x19000000, 17),
184 .start = 0x19000000, 184 [1] = DEFINE_RES_IRQ(IRQ_EINT9),
185 .end = 0x19000000 + 16,
186 .flags = IORESOURCE_MEM,
187 },
188 [1] = {
189 .start = IRQ_EINT9,
190 .end = IRQ_EINT9,
191 .flags = IORESOURCE_IRQ,
192 },
193}; 185};
194 186
195static struct platform_device qt2410_cs89x0 = { 187static struct platform_device qt2410_cs89x0 = {
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 200debb4c72d..a6762aae4727 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -152,13 +152,8 @@ static struct pda_power_pdata power_supply_info = {
152}; 152};
153 153
154static struct resource power_supply_resources[] = { 154static struct resource power_supply_resources[] = {
155 [0] = { 155 [0] = DEFINE_RES_NAMED(IRQ_EINT2, 1, "ac", IORESOURCE_IRQ \
156 .name = "ac", 156 | IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE),
157 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE |
158 IORESOURCE_IRQ_HIGHEDGE,
159 .start = IRQ_EINT2,
160 .end = IRQ_EINT2,
161 },
162}; 157};
163 158
164static struct platform_device power_supply = { 159static struct platform_device power_supply = {
diff --git a/arch/arm/mach-s3c24xx/mach-tct_hammer.c b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
index 1114666f0efb..fe990289ee7d 100644
--- a/arch/arm/mach-s3c24xx/mach-tct_hammer.c
+++ b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
@@ -56,11 +56,8 @@
56 56
57#include "common.h" 57#include "common.h"
58 58
59static struct resource tct_hammer_nor_resource = { 59static struct resource tct_hammer_nor_resource =
60 .start = 0x00000000, 60 DEFINE_RES_MEM(0x00000000, SZ_16M);
61 .end = 0x01000000 - 1,
62 .flags = IORESOURCE_MEM,
63};
64 61
65static struct mtd_partition tct_hammer_mtd_partitions[] = { 62static struct mtd_partition tct_hammer_mtd_partitions[] = {
66 { 63 {
diff --git a/arch/arm/mach-s3c24xx/mach-vr1000.c b/arch/arm/mach-s3c24xx/mach-vr1000.c
index 87608d45dac4..bd5f189f0424 100644
--- a/arch/arm/mach-s3c24xx/mach-vr1000.c
+++ b/arch/arm/mach-s3c24xx/mach-vr1000.c
@@ -187,40 +187,17 @@ static struct platform_device serial_device = {
187/* DM9000 ethernet devices */ 187/* DM9000 ethernet devices */
188 188
189static struct resource vr1000_dm9k0_resource[] = { 189static struct resource vr1000_dm9k0_resource[] = {
190 [0] = { 190 [0] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000, 4),
191 .start = S3C2410_CS5 + VR1000_PA_DM9000, 191 [1] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000 + 0x40, 0x40),
192 .end = S3C2410_CS5 + VR1000_PA_DM9000 + 3, 192 [2] = DEFINE_RES_NAMED(IRQ_VR1000_DM9000A, 1, NULL, IORESOURCE_IRQ \
193 .flags = IORESOURCE_MEM 193 | IORESOURCE_IRQ_HIGHLEVEL),
194 },
195 [1] = {
196 .start = S3C2410_CS5 + VR1000_PA_DM9000 + 0x40,
197 .end = S3C2410_CS5 + VR1000_PA_DM9000 + 0x7f,
198 .flags = IORESOURCE_MEM
199 },
200 [2] = {
201 .start = IRQ_VR1000_DM9000A,
202 .end = IRQ_VR1000_DM9000A,
203 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
204 }
205
206}; 194};
207 195
208static struct resource vr1000_dm9k1_resource[] = { 196static struct resource vr1000_dm9k1_resource[] = {
209 [0] = { 197 [0] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000 + 0x80, 4),
210 .start = S3C2410_CS5 + VR1000_PA_DM9000 + 0x80, 198 [1] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000 + 0xC0, 0x40),
211 .end = S3C2410_CS5 + VR1000_PA_DM9000 + 0x83, 199 [2] = DEFINE_RES_NAMED(IRQ_VR1000_DM9000N, 1, NULL, IORESOURCE_IRQ \
212 .flags = IORESOURCE_MEM 200 | IORESOURCE_IRQ_HIGHLEVEL),
213 },
214 [1] = {
215 .start = S3C2410_CS5 + VR1000_PA_DM9000 + 0xC0,
216 .end = S3C2410_CS5 + VR1000_PA_DM9000 + 0xFF,
217 .flags = IORESOURCE_MEM
218 },
219 [2] = {
220 .start = IRQ_VR1000_DM9000N,
221 .end = IRQ_VR1000_DM9000N,
222 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
223 }
224}; 201};
225 202
226/* for the moment we limit ourselves to 16bit IO until some 203/* for the moment we limit ourselves to 16bit IO until some
diff --git a/arch/arm/mach-s3c24xx/simtec-nor.c b/arch/arm/mach-s3c24xx/simtec-nor.c
index b9d6d4f92c03..029744fcaacb 100644
--- a/arch/arm/mach-s3c24xx/simtec-nor.c
+++ b/arch/arm/mach-s3c24xx/simtec-nor.c
@@ -55,11 +55,7 @@ static struct physmap_flash_data simtec_nor_pdata = {
55}; 55};
56 56
57static struct resource simtec_nor_resource[] = { 57static struct resource simtec_nor_resource[] = {
58 [0] = { 58 [0] = DEFINE_RES_MEM(S3C2410_CS1 + 0x4000000, SZ_8M),
59 .start = S3C2410_CS1 + 0x4000000,
60 .end = S3C2410_CS1 + 0x4000000 + SZ_8M - 1,
61 .flags = IORESOURCE_MEM,
62 }
63}; 59};
64 60
65static struct platform_device simtec_device_nor = { 61static struct platform_device simtec_device_nor = {
diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c64xx/dev-audio.c
index 93470b158a4e..124fd5d63006 100644
--- a/arch/arm/mach-s3c64xx/dev-audio.c
+++ b/arch/arm/mach-s3c64xx/dev-audio.c
@@ -57,21 +57,9 @@ static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev)
57} 57}
58 58
59static struct resource s3c64xx_iis0_resource[] = { 59static struct resource s3c64xx_iis0_resource[] = {
60 [0] = { 60 [0] = DEFINE_RES_MEM(S3C64XX_PA_IIS0, SZ_256),
61 .start = S3C64XX_PA_IIS0, 61 [1] = DEFINE_RES_DMA(DMACH_I2S0_OUT),
62 .end = S3C64XX_PA_IIS0 + 0x100 - 1, 62 [2] = DEFINE_RES_DMA(DMACH_I2S0_IN),
63 .flags = IORESOURCE_MEM,
64 },
65 [1] = {
66 .start = DMACH_I2S0_OUT,
67 .end = DMACH_I2S0_OUT,
68 .flags = IORESOURCE_DMA,
69 },
70 [2] = {
71 .start = DMACH_I2S0_IN,
72 .end = DMACH_I2S0_IN,
73 .flags = IORESOURCE_DMA,
74 },
75}; 63};
76 64
77static struct s3c_audio_pdata i2sv3_pdata = { 65static struct s3c_audio_pdata i2sv3_pdata = {
@@ -95,21 +83,9 @@ struct platform_device s3c64xx_device_iis0 = {
95EXPORT_SYMBOL(s3c64xx_device_iis0); 83EXPORT_SYMBOL(s3c64xx_device_iis0);
96 84
97static struct resource s3c64xx_iis1_resource[] = { 85static struct resource s3c64xx_iis1_resource[] = {
98 [0] = { 86 [0] = DEFINE_RES_MEM(S3C64XX_PA_IIS1, SZ_256),
99 .start = S3C64XX_PA_IIS1, 87 [1] = DEFINE_RES_DMA(DMACH_I2S1_OUT),
100 .end = S3C64XX_PA_IIS1 + 0x100 - 1, 88 [2] = DEFINE_RES_DMA(DMACH_I2S1_IN),
101 .flags = IORESOURCE_MEM,
102 },
103 [1] = {
104 .start = DMACH_I2S1_OUT,
105 .end = DMACH_I2S1_OUT,
106 .flags = IORESOURCE_DMA,
107 },
108 [2] = {
109 .start = DMACH_I2S1_IN,
110 .end = DMACH_I2S1_IN,
111 .flags = IORESOURCE_DMA,
112 },
113}; 89};
114 90
115struct platform_device s3c64xx_device_iis1 = { 91struct platform_device s3c64xx_device_iis1 = {
@@ -124,21 +100,9 @@ struct platform_device s3c64xx_device_iis1 = {
124EXPORT_SYMBOL(s3c64xx_device_iis1); 100EXPORT_SYMBOL(s3c64xx_device_iis1);
125 101
126static struct resource s3c64xx_iisv4_resource[] = { 102static struct resource s3c64xx_iisv4_resource[] = {
127 [0] = { 103 [0] = DEFINE_RES_MEM(S3C64XX_PA_IISV4, SZ_256),
128 .start = S3C64XX_PA_IISV4, 104 [1] = DEFINE_RES_DMA(DMACH_HSI_I2SV40_TX),
129 .end = S3C64XX_PA_IISV4 + 0x100 - 1, 105 [2] = DEFINE_RES_DMA(DMACH_HSI_I2SV40_RX),
130 .flags = IORESOURCE_MEM,
131 },
132 [1] = {
133 .start = DMACH_HSI_I2SV40_TX,
134 .end = DMACH_HSI_I2SV40_TX,
135 .flags = IORESOURCE_DMA,
136 },
137 [2] = {
138 .start = DMACH_HSI_I2SV40_RX,
139 .end = DMACH_HSI_I2SV40_RX,
140 .flags = IORESOURCE_DMA,
141 },
142}; 106};
143 107
144static struct s3c_audio_pdata i2sv4_pdata = { 108static struct s3c_audio_pdata i2sv4_pdata = {
@@ -187,21 +151,9 @@ static int s3c64xx_pcm_cfg_gpio(struct platform_device *pdev)
187} 151}
188 152
189static struct resource s3c64xx_pcm0_resource[] = { 153static struct resource s3c64xx_pcm0_resource[] = {
190 [0] = { 154 [0] = DEFINE_RES_MEM(S3C64XX_PA_PCM0, SZ_256),
191 .start = S3C64XX_PA_PCM0, 155 [1] = DEFINE_RES_DMA(DMACH_PCM0_TX),
192 .end = S3C64XX_PA_PCM0 + 0x100 - 1, 156 [2] = DEFINE_RES_DMA(DMACH_PCM0_RX),
193 .flags = IORESOURCE_MEM,
194 },
195 [1] = {
196 .start = DMACH_PCM0_TX,
197 .end = DMACH_PCM0_TX,
198 .flags = IORESOURCE_DMA,
199 },
200 [2] = {
201 .start = DMACH_PCM0_RX,
202 .end = DMACH_PCM0_RX,
203 .flags = IORESOURCE_DMA,
204 },
205}; 157};
206 158
207static struct s3c_audio_pdata s3c_pcm0_pdata = { 159static struct s3c_audio_pdata s3c_pcm0_pdata = {
@@ -220,21 +172,9 @@ struct platform_device s3c64xx_device_pcm0 = {
220EXPORT_SYMBOL(s3c64xx_device_pcm0); 172EXPORT_SYMBOL(s3c64xx_device_pcm0);
221 173
222static struct resource s3c64xx_pcm1_resource[] = { 174static struct resource s3c64xx_pcm1_resource[] = {
223 [0] = { 175 [0] = DEFINE_RES_MEM(S3C64XX_PA_PCM1, SZ_256),
224 .start = S3C64XX_PA_PCM1, 176 [1] = DEFINE_RES_DMA(DMACH_PCM1_TX),
225 .end = S3C64XX_PA_PCM1 + 0x100 - 1, 177 [2] = DEFINE_RES_DMA(DMACH_PCM1_RX),
226 .flags = IORESOURCE_MEM,
227 },
228 [1] = {
229 .start = DMACH_PCM1_TX,
230 .end = DMACH_PCM1_TX,
231 .flags = IORESOURCE_DMA,
232 },
233 [2] = {
234 .start = DMACH_PCM1_RX,
235 .end = DMACH_PCM1_RX,
236 .flags = IORESOURCE_DMA,
237 },
238}; 178};
239 179
240static struct s3c_audio_pdata s3c_pcm1_pdata = { 180static struct s3c_audio_pdata s3c_pcm1_pdata = {
@@ -265,31 +205,11 @@ static int s3c64xx_ac97_cfg_gpe(struct platform_device *pdev)
265} 205}
266 206
267static struct resource s3c64xx_ac97_resource[] = { 207static struct resource s3c64xx_ac97_resource[] = {
268 [0] = { 208 [0] = DEFINE_RES_MEM(S3C64XX_PA_AC97, SZ_256),
269 .start = S3C64XX_PA_AC97, 209 [1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT),
270 .end = S3C64XX_PA_AC97 + 0x100 - 1, 210 [2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN),
271 .flags = IORESOURCE_MEM, 211 [3] = DEFINE_RES_DMA(DMACH_AC97_MICIN),
272 }, 212 [4] = DEFINE_RES_IRQ(IRQ_AC97),
273 [1] = {
274 .start = DMACH_AC97_PCMOUT,
275 .end = DMACH_AC97_PCMOUT,
276 .flags = IORESOURCE_DMA,
277 },
278 [2] = {
279 .start = DMACH_AC97_PCMIN,
280 .end = DMACH_AC97_PCMIN,
281 .flags = IORESOURCE_DMA,
282 },
283 [3] = {
284 .start = DMACH_AC97_MICIN,
285 .end = DMACH_AC97_MICIN,
286 .flags = IORESOURCE_DMA,
287 },
288 [4] = {
289 .start = IRQ_AC97,
290 .end = IRQ_AC97,
291 .flags = IORESOURCE_IRQ,
292 },
293}; 213};
294 214
295static struct s3c_audio_pdata s3c_ac97_pdata; 215static struct s3c_audio_pdata s3c_ac97_pdata;
diff --git a/arch/arm/mach-s3c64xx/dev-uart.c b/arch/arm/mach-s3c64xx/dev-uart.c
index c681b99eda08..46e18d77ea93 100644
--- a/arch/arm/mach-s3c64xx/dev-uart.c
+++ b/arch/arm/mach-s3c64xx/dev-uart.c
@@ -31,55 +31,23 @@
31/* 64xx uarts are closer together */ 31/* 64xx uarts are closer together */
32 32
33static struct resource s3c64xx_uart0_resource[] = { 33static struct resource s3c64xx_uart0_resource[] = {
34 [0] = { 34 [0] = DEFINE_RES_MEM(S3C_PA_UART0, SZ_256),
35 .start = S3C_PA_UART0, 35 [1] = DEFINE_RES_IRQ(IRQ_UART0),
36 .end = S3C_PA_UART0 + 0x100,
37 .flags = IORESOURCE_MEM,
38 },
39 [1] = {
40 .start = IRQ_UART0,
41 .end = IRQ_UART0,
42 .flags = IORESOURCE_IRQ,
43 },
44}; 36};
45 37
46static struct resource s3c64xx_uart1_resource[] = { 38static struct resource s3c64xx_uart1_resource[] = {
47 [0] = { 39 [0] = DEFINE_RES_MEM(S3C_PA_UART1, SZ_256),
48 .start = S3C_PA_UART1, 40 [1] = DEFINE_RES_IRQ(IRQ_UART1),
49 .end = S3C_PA_UART1 + 0x100,
50 .flags = IORESOURCE_MEM,
51 },
52 [1] = {
53 .start = IRQ_UART1,
54 .end = IRQ_UART1,
55 .flags = IORESOURCE_IRQ,
56 },
57}; 41};
58 42
59static struct resource s3c6xx_uart2_resource[] = { 43static struct resource s3c6xx_uart2_resource[] = {
60 [0] = { 44 [0] = DEFINE_RES_MEM(S3C_PA_UART2, SZ_256),
61 .start = S3C_PA_UART2, 45 [1] = DEFINE_RES_IRQ(IRQ_UART2),
62 .end = S3C_PA_UART2 + 0x100,
63 .flags = IORESOURCE_MEM,
64 },
65 [1] = {
66 .start = IRQ_UART2,
67 .end = IRQ_UART2,
68 .flags = IORESOURCE_IRQ,
69 },
70}; 46};
71 47
72static struct resource s3c64xx_uart3_resource[] = { 48static struct resource s3c64xx_uart3_resource[] = {
73 [0] = { 49 [0] = DEFINE_RES_MEM(S3C_PA_UART3, SZ_256),
74 .start = S3C_PA_UART3, 50 [1] = DEFINE_RES_IRQ(IRQ_UART3),
75 .end = S3C_PA_UART3 + 0x100,
76 .flags = IORESOURCE_MEM,
77 },
78 [1] = {
79 .start = IRQ_UART3,
80 .end = IRQ_UART3,
81 .flags = IORESOURCE_IRQ,
82 },
83}; 51};
84 52
85 53
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c
index b86f2779e4e6..f252691fb209 100644
--- a/arch/arm/mach-s3c64xx/mach-anw6410.c
+++ b/arch/arm/mach-s3c64xx/mach-anw6410.c
@@ -165,21 +165,10 @@ static void __init anw6410_dm9000_enable(void)
165} 165}
166 166
167static struct resource anw6410_dm9000_resource[] = { 167static struct resource anw6410_dm9000_resource[] = {
168 [0] = { 168 [0] = DEFINE_RES_MEM(ANW6410_PA_DM9000, 4),
169 .start = ANW6410_PA_DM9000, 169 [1] = DEFINE_RES_MEM(ANW6410_PA_DM9000 + 4, 501),
170 .end = ANW6410_PA_DM9000 + 3, 170 [2] = DEFINE_RES_NAMED(IRQ_EINT(15), 1, NULL, IORESOURCE_IRQ \
171 .flags = IORESOURCE_MEM, 171 | IRQF_TRIGGER_HIGH),
172 },
173 [1] = {
174 .start = ANW6410_PA_DM9000 + 4,
175 .end = ANW6410_PA_DM9000 + 4 + 500,
176 .flags = IORESOURCE_MEM,
177 },
178 [2] = {
179 .start = IRQ_EINT(15),
180 .end = IRQ_EINT(15),
181 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH,
182 },
183}; 172};
184 173
185static struct dm9000_plat_data anw6410_dm9000_pdata = { 174static struct dm9000_plat_data anw6410_dm9000_pdata = {
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index e20bf5835365..164467cbb7ea 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -232,21 +232,10 @@ static struct platform_device crag6410_gpio_keydev = {
232}; 232};
233 233
234static struct resource crag6410_dm9k_resource[] = { 234static struct resource crag6410_dm9k_resource[] = {
235 [0] = { 235 [0] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN5, 2),
236 .start = S3C64XX_PA_XM0CSN5, 236 [1] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN5 + (1 << 8), 2),
237 .end = S3C64XX_PA_XM0CSN5 + 1, 237 [2] = DEFINE_RES_NAMED(S3C_EINT(17), 1, NULL, IORESOURCE_IRQ \
238 .flags = IORESOURCE_MEM, 238 | IORESOURCE_IRQ_HIGHLEVEL),
239 },
240 [1] = {
241 .start = S3C64XX_PA_XM0CSN5 + (1 << 8),
242 .end = S3C64XX_PA_XM0CSN5 + (1 << 8) + 1,
243 .flags = IORESOURCE_MEM,
244 },
245 [2] = {
246 .start = S3C_EINT(17),
247 .end = S3C_EINT(17),
248 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
249 },
250}; 239};
251 240
252static struct dm9000_plat_data mini6410_dm9k_pdata = { 241static struct dm9000_plat_data mini6410_dm9k_pdata = {
@@ -262,12 +251,7 @@ static struct platform_device crag6410_dm9k_device = {
262}; 251};
263 252
264static struct resource crag6410_mmgpio_resource[] = { 253static struct resource crag6410_mmgpio_resource[] = {
265 [0] = { 254 [0] = DEFINE_RES_MEM_NAMED(S3C64XX_PA_XM0CSN4, 1, "dat"),
266 .name = "dat",
267 .start = S3C64XX_PA_XM0CSN4 + 1,
268 .end = S3C64XX_PA_XM0CSN4 + 1,
269 .flags = IORESOURCE_MEM,
270 },
271}; 255};
272 256
273static struct platform_device crag6410_mmgpio = { 257static struct platform_device crag6410_mmgpio = {
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
index c34c2ab22ead..b2166d4a5538 100644
--- a/arch/arm/mach-s3c64xx/mach-mini6410.c
+++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
@@ -85,21 +85,10 @@ static struct s3c2410_uartcfg mini6410_uartcfgs[] __initdata = {
85/* DM9000AEP 10/100 ethernet controller */ 85/* DM9000AEP 10/100 ethernet controller */
86 86
87static struct resource mini6410_dm9k_resource[] = { 87static struct resource mini6410_dm9k_resource[] = {
88 [0] = { 88 [0] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN1, 2),
89 .start = S3C64XX_PA_XM0CSN1, 89 [1] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN1 + 4, 2),
90 .end = S3C64XX_PA_XM0CSN1 + 1, 90 [2] = DEFINE_RES_NAMED(S3C_EINT(7), 1, NULL, IORESOURCE_IRQ \
91 .flags = IORESOURCE_MEM 91 | IORESOURCE_IRQ_HIGHLEVEL),
92 },
93 [1] = {
94 .start = S3C64XX_PA_XM0CSN1 + 4,
95 .end = S3C64XX_PA_XM0CSN1 + 5,
96 .flags = IORESOURCE_MEM
97 },
98 [2] = {
99 .start = S3C_EINT(7),
100 .end = S3C_EINT(7),
101 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL
102 }
103}; 92};
104 93
105static struct dm9000_plat_data mini6410_dm9k_pdata = { 94static struct dm9000_plat_data mini6410_dm9k_pdata = {
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
index be2a9a22ab74..5c08266cea21 100644
--- a/arch/arm/mach-s3c64xx/mach-real6410.c
+++ b/arch/arm/mach-s3c64xx/mach-real6410.c
@@ -86,21 +86,10 @@ static struct s3c2410_uartcfg real6410_uartcfgs[] __initdata = {
86/* DM9000AEP 10/100 ethernet controller */ 86/* DM9000AEP 10/100 ethernet controller */
87 87
88static struct resource real6410_dm9k_resource[] = { 88static struct resource real6410_dm9k_resource[] = {
89 [0] = { 89 [0] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN1, 2),
90 .start = S3C64XX_PA_XM0CSN1, 90 [1] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN1 + 4, 2),
91 .end = S3C64XX_PA_XM0CSN1 + 1, 91 [2] = DEFINE_RES_NAMED(S3C_EINT(7), 1, NULL, IORESOURCE_IRQ \
92 .flags = IORESOURCE_MEM 92 | IORESOURCE_IRQ_HIGHLEVEL),
93 },
94 [1] = {
95 .start = S3C64XX_PA_XM0CSN1 + 4,
96 .end = S3C64XX_PA_XM0CSN1 + 5,
97 .flags = IORESOURCE_MEM
98 },
99 [2] = {
100 .start = S3C_EINT(7),
101 .end = S3C_EINT(7),
102 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL
103 }
104}; 93};
105 94
106static struct dm9000_plat_data real6410_dm9k_pdata = { 95static struct dm9000_plat_data real6410_dm9k_pdata = {
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index d55bc96d9582..1ecd0485a9b6 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -182,16 +182,9 @@ static struct s3c_fb_platdata smdk6410_lcd_pdata __initdata = {
182 */ 182 */
183 183
184static struct resource smdk6410_smsc911x_resources[] = { 184static struct resource smdk6410_smsc911x_resources[] = {
185 [0] = { 185 [0] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN1, SZ_64K),
186 .start = S3C64XX_PA_XM0CSN1, 186 [1] = DEFINE_RES_NAMED(S3C_EINT(10), 1, NULL, IORESOURCE_IRQ \
187 .end = S3C64XX_PA_XM0CSN1 + SZ_64K - 1, 187 | IRQ_TYPE_LEVEL_LOW),
188 .flags = IORESOURCE_MEM,
189 },
190 [1] = {
191 .start = S3C_EINT(10),
192 .end = S3C_EINT(10),
193 .flags = IORESOURCE_IRQ | IRQ_TYPE_LEVEL_LOW,
194 },
195}; 188};
196 189
197static struct smsc911x_platform_config smdk6410_smsc911x_pdata = { 190static struct smsc911x_platform_config smdk6410_smsc911x_pdata = {
diff --git a/arch/arm/mach-s5p64x0/dev-audio.c b/arch/arm/mach-s5p64x0/dev-audio.c
index 35f1f226dabb..91113ddc51da 100644
--- a/arch/arm/mach-s5p64x0/dev-audio.c
+++ b/arch/arm/mach-s5p64x0/dev-audio.c
@@ -51,21 +51,9 @@ static struct s3c_audio_pdata s5p6440_i2s_pdata = {
51}; 51};
52 52
53static struct resource s5p64x0_i2s0_resource[] = { 53static struct resource s5p64x0_i2s0_resource[] = {
54 [0] = { 54 [0] = DEFINE_RES_MEM(S5P64X0_PA_I2S, SZ_256),
55 .start = S5P64X0_PA_I2S, 55 [1] = DEFINE_RES_DMA(DMACH_I2S0_TX),
56 .end = S5P64X0_PA_I2S + 0x100 - 1, 56 [2] = DEFINE_RES_DMA(DMACH_I2S0_RX),
57 .flags = IORESOURCE_MEM,
58 },
59 [1] = {
60 .start = DMACH_I2S0_TX,
61 .end = DMACH_I2S0_TX,
62 .flags = IORESOURCE_DMA,
63 },
64 [2] = {
65 .start = DMACH_I2S0_RX,
66 .end = DMACH_I2S0_RX,
67 .flags = IORESOURCE_DMA,
68 },
69}; 57};
70 58
71struct platform_device s5p6440_device_iis = { 59struct platform_device s5p6440_device_iis = {
@@ -130,21 +118,9 @@ static struct s3c_audio_pdata s5p6450_i2s_pdata = {
130}; 118};
131 119
132static struct resource s5p6450_i2s1_resource[] = { 120static struct resource s5p6450_i2s1_resource[] = {
133 [0] = { 121 [0] = DEFINE_RES_MEM(S5P6450_PA_I2S1, SZ_256),
134 .start = S5P6450_PA_I2S1, 122 [1] = DEFINE_RES_DMA(DMACH_I2S1_TX),
135 .end = S5P6450_PA_I2S1 + 0x100 - 1, 123 [2] = DEFINE_RES_DMA(DMACH_I2S1_RX),
136 .flags = IORESOURCE_MEM,
137 },
138 [1] = {
139 .start = DMACH_I2S1_TX,
140 .end = DMACH_I2S1_TX,
141 .flags = IORESOURCE_DMA,
142 },
143 [2] = {
144 .start = DMACH_I2S1_RX,
145 .end = DMACH_I2S1_RX,
146 .flags = IORESOURCE_DMA,
147 },
148}; 124};
149 125
150struct platform_device s5p6450_device_iis1 = { 126struct platform_device s5p6450_device_iis1 = {
@@ -158,21 +134,9 @@ struct platform_device s5p6450_device_iis1 = {
158}; 134};
159 135
160static struct resource s5p6450_i2s2_resource[] = { 136static struct resource s5p6450_i2s2_resource[] = {
161 [0] = { 137 [0] = DEFINE_RES_MEM(S5P6450_PA_I2S2, SZ_256),
162 .start = S5P6450_PA_I2S2, 138 [1] = DEFINE_RES_DMA(DMACH_I2S2_TX),
163 .end = S5P6450_PA_I2S2 + 0x100 - 1, 139 [2] = DEFINE_RES_DMA(DMACH_I2S2_RX),
164 .flags = IORESOURCE_MEM,
165 },
166 [1] = {
167 .start = DMACH_I2S2_TX,
168 .end = DMACH_I2S2_TX,
169 .flags = IORESOURCE_DMA,
170 },
171 [2] = {
172 .start = DMACH_I2S2_RX,
173 .end = DMACH_I2S2_RX,
174 .flags = IORESOURCE_DMA,
175 },
176}; 140};
177 141
178struct platform_device s5p6450_device_iis2 = { 142struct platform_device s5p6450_device_iis2 = {
@@ -208,21 +172,9 @@ static struct s3c_audio_pdata s5p6440_pcm_pdata = {
208}; 172};
209 173
210static struct resource s5p6440_pcm0_resource[] = { 174static struct resource s5p6440_pcm0_resource[] = {
211 [0] = { 175 [0] = DEFINE_RES_MEM(S5P64X0_PA_PCM, SZ_256),
212 .start = S5P64X0_PA_PCM, 176 [1] = DEFINE_RES_DMA(DMACH_PCM0_TX),
213 .end = S5P64X0_PA_PCM + 0x100 - 1, 177 [2] = DEFINE_RES_DMA(DMACH_PCM0_RX),
214 .flags = IORESOURCE_MEM,
215 },
216 [1] = {
217 .start = DMACH_PCM0_TX,
218 .end = DMACH_PCM0_TX,
219 .flags = IORESOURCE_DMA,
220 },
221 [2] = {
222 .start = DMACH_PCM0_RX,
223 .end = DMACH_PCM0_RX,
224 .flags = IORESOURCE_DMA,
225 },
226}; 178};
227 179
228struct platform_device s5p6440_device_pcm = { 180struct platform_device s5p6440_device_pcm = {
diff --git a/arch/arm/mach-s5pc100/dev-audio.c b/arch/arm/mach-s5pc100/dev-audio.c
index ab2d27172cbc..9d4bde3f1110 100644
--- a/arch/arm/mach-s5pc100/dev-audio.c
+++ b/arch/arm/mach-s5pc100/dev-audio.c
@@ -56,26 +56,10 @@ static struct s3c_audio_pdata i2sv5_pdata = {
56}; 56};
57 57
58static struct resource s5pc100_iis0_resource[] = { 58static struct resource s5pc100_iis0_resource[] = {
59 [0] = { 59 [0] = DEFINE_RES_MEM(S5PC100_PA_I2S0, SZ_256),
60 .start = S5PC100_PA_I2S0, 60 [1] = DEFINE_RES_DMA(DMACH_I2S0_TX),
61 .end = S5PC100_PA_I2S0 + 0x100 - 1, 61 [2] = DEFINE_RES_DMA(DMACH_I2S0_RX),
62 .flags = IORESOURCE_MEM, 62 [3] = DEFINE_RES_DMA(DMACH_I2S0S_TX),
63 },
64 [1] = {
65 .start = DMACH_I2S0_TX,
66 .end = DMACH_I2S0_TX,
67 .flags = IORESOURCE_DMA,
68 },
69 [2] = {
70 .start = DMACH_I2S0_RX,
71 .end = DMACH_I2S0_RX,
72 .flags = IORESOURCE_DMA,
73 },
74 [3] = {
75 .start = DMACH_I2S0S_TX,
76 .end = DMACH_I2S0S_TX,
77 .flags = IORESOURCE_DMA,
78 },
79}; 63};
80 64
81struct platform_device s5pc100_device_iis0 = { 65struct platform_device s5pc100_device_iis0 = {
@@ -103,21 +87,9 @@ static struct s3c_audio_pdata i2sv3_pdata = {
103}; 87};
104 88
105static struct resource s5pc100_iis1_resource[] = { 89static struct resource s5pc100_iis1_resource[] = {
106 [0] = { 90 [0] = DEFINE_RES_MEM(S5PC100_PA_I2S1, SZ_256),
107 .start = S5PC100_PA_I2S1, 91 [1] = DEFINE_RES_DMA(DMACH_I2S1_TX),
108 .end = S5PC100_PA_I2S1 + 0x100 - 1, 92 [2] = DEFINE_RES_DMA(DMACH_I2S1_RX),
109 .flags = IORESOURCE_MEM,
110 },
111 [1] = {
112 .start = DMACH_I2S1_TX,
113 .end = DMACH_I2S1_TX,
114 .flags = IORESOURCE_DMA,
115 },
116 [2] = {
117 .start = DMACH_I2S1_RX,
118 .end = DMACH_I2S1_RX,
119 .flags = IORESOURCE_DMA,
120 },
121}; 93};
122 94
123struct platform_device s5pc100_device_iis1 = { 95struct platform_device s5pc100_device_iis1 = {
@@ -131,21 +103,9 @@ struct platform_device s5pc100_device_iis1 = {
131}; 103};
132 104
133static struct resource s5pc100_iis2_resource[] = { 105static struct resource s5pc100_iis2_resource[] = {
134 [0] = { 106 [0] = DEFINE_RES_MEM(S5PC100_PA_I2S2, SZ_256),
135 .start = S5PC100_PA_I2S2, 107 [1] = DEFINE_RES_DMA(DMACH_I2S2_TX),
136 .end = S5PC100_PA_I2S2 + 0x100 - 1, 108 [2] = DEFINE_RES_DMA(DMACH_I2S2_RX),
137 .flags = IORESOURCE_MEM,
138 },
139 [1] = {
140 .start = DMACH_I2S2_TX,
141 .end = DMACH_I2S2_TX,
142 .flags = IORESOURCE_DMA,
143 },
144 [2] = {
145 .start = DMACH_I2S2_RX,
146 .end = DMACH_I2S2_RX,
147 .flags = IORESOURCE_DMA,
148 },
149}; 109};
150 110
151struct platform_device s5pc100_device_iis2 = { 111struct platform_device s5pc100_device_iis2 = {
@@ -184,21 +144,9 @@ static struct s3c_audio_pdata s3c_pcm_pdata = {
184}; 144};
185 145
186static struct resource s5pc100_pcm0_resource[] = { 146static struct resource s5pc100_pcm0_resource[] = {
187 [0] = { 147 [0] = DEFINE_RES_MEM(S5PC100_PA_PCM0, SZ_256),
188 .start = S5PC100_PA_PCM0, 148 [1] = DEFINE_RES_DMA(DMACH_PCM0_TX),
189 .end = S5PC100_PA_PCM0 + 0x100 - 1, 149 [2] = DEFINE_RES_DMA(DMACH_PCM0_RX),
190 .flags = IORESOURCE_MEM,
191 },
192 [1] = {
193 .start = DMACH_PCM0_TX,
194 .end = DMACH_PCM0_TX,
195 .flags = IORESOURCE_DMA,
196 },
197 [2] = {
198 .start = DMACH_PCM0_RX,
199 .end = DMACH_PCM0_RX,
200 .flags = IORESOURCE_DMA,
201 },
202}; 150};
203 151
204struct platform_device s5pc100_device_pcm0 = { 152struct platform_device s5pc100_device_pcm0 = {
@@ -212,21 +160,9 @@ struct platform_device s5pc100_device_pcm0 = {
212}; 160};
213 161
214static struct resource s5pc100_pcm1_resource[] = { 162static struct resource s5pc100_pcm1_resource[] = {
215 [0] = { 163 [0] = DEFINE_RES_MEM(S5PC100_PA_PCM1, SZ_256),
216 .start = S5PC100_PA_PCM1, 164 [1] = DEFINE_RES_DMA(DMACH_PCM1_TX),
217 .end = S5PC100_PA_PCM1 + 0x100 - 1, 165 [2] = DEFINE_RES_DMA(DMACH_PCM1_RX),
218 .flags = IORESOURCE_MEM,
219 },
220 [1] = {
221 .start = DMACH_PCM1_TX,
222 .end = DMACH_PCM1_TX,
223 .flags = IORESOURCE_DMA,
224 },
225 [2] = {
226 .start = DMACH_PCM1_RX,
227 .end = DMACH_PCM1_RX,
228 .flags = IORESOURCE_DMA,
229 },
230}; 166};
231 167
232struct platform_device s5pc100_device_pcm1 = { 168struct platform_device s5pc100_device_pcm1 = {
@@ -247,31 +183,11 @@ static int s5pc100_ac97_cfg_gpio(struct platform_device *pdev)
247} 183}
248 184
249static struct resource s5pc100_ac97_resource[] = { 185static struct resource s5pc100_ac97_resource[] = {
250 [0] = { 186 [0] = DEFINE_RES_MEM(S5PC100_PA_AC97, SZ_256),
251 .start = S5PC100_PA_AC97, 187 [1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT),
252 .end = S5PC100_PA_AC97 + 0x100 - 1, 188 [2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN),
253 .flags = IORESOURCE_MEM, 189 [3] = DEFINE_RES_DMA(DMACH_AC97_MICIN),
254 }, 190 [4] = DEFINE_RES_IRQ(IRQ_AC97),
255 [1] = {
256 .start = DMACH_AC97_PCMOUT,
257 .end = DMACH_AC97_PCMOUT,
258 .flags = IORESOURCE_DMA,
259 },
260 [2] = {
261 .start = DMACH_AC97_PCMIN,
262 .end = DMACH_AC97_PCMIN,
263 .flags = IORESOURCE_DMA,
264 },
265 [3] = {
266 .start = DMACH_AC97_MICIN,
267 .end = DMACH_AC97_MICIN,
268 .flags = IORESOURCE_DMA,
269 },
270 [4] = {
271 .start = IRQ_AC97,
272 .end = IRQ_AC97,
273 .flags = IORESOURCE_IRQ,
274 },
275}; 191};
276 192
277static struct s3c_audio_pdata s3c_ac97_pdata = { 193static struct s3c_audio_pdata s3c_ac97_pdata = {
@@ -308,16 +224,8 @@ static int s5pc100_spdif_cfg_gpg3(struct platform_device *pdev)
308} 224}
309 225
310static struct resource s5pc100_spdif_resource[] = { 226static struct resource s5pc100_spdif_resource[] = {
311 [0] = { 227 [0] = DEFINE_RES_MEM(S5PC100_PA_SPDIF, SZ_256),
312 .start = S5PC100_PA_SPDIF, 228 [1] = DEFINE_RES_DMA(DMACH_SPDIF),
313 .end = S5PC100_PA_SPDIF + 0x100 - 1,
314 .flags = IORESOURCE_MEM,
315 },
316 [1] = {
317 .start = DMACH_SPDIF,
318 .end = DMACH_SPDIF,
319 .flags = IORESOURCE_DMA,
320 },
321}; 229};
322 230
323static struct s3c_audio_pdata s5p_spdif_pdata = { 231static struct s3c_audio_pdata s5p_spdif_pdata = {
diff --git a/arch/arm/mach-s5pv210/dev-audio.c b/arch/arm/mach-s5pv210/dev-audio.c
index 63f5d82004b5..8367749c3eec 100644
--- a/arch/arm/mach-s5pv210/dev-audio.c
+++ b/arch/arm/mach-s5pv210/dev-audio.c
@@ -59,26 +59,10 @@ static struct s3c_audio_pdata i2sv5_pdata = {
59}; 59};
60 60
61static struct resource s5pv210_iis0_resource[] = { 61static struct resource s5pv210_iis0_resource[] = {
62 [0] = { 62 [0] = DEFINE_RES_MEM(S5PV210_PA_IIS0, SZ_256),
63 .start = S5PV210_PA_IIS0, 63 [1] = DEFINE_RES_DMA(DMACH_I2S0_TX),
64 .end = S5PV210_PA_IIS0 + 0x100 - 1, 64 [2] = DEFINE_RES_DMA(DMACH_I2S0_RX),
65 .flags = IORESOURCE_MEM, 65 [3] = DEFINE_RES_DMA(DMACH_I2S0S_TX),
66 },
67 [1] = {
68 .start = DMACH_I2S0_TX,
69 .end = DMACH_I2S0_TX,
70 .flags = IORESOURCE_DMA,
71 },
72 [2] = {
73 .start = DMACH_I2S0_RX,
74 .end = DMACH_I2S0_RX,
75 .flags = IORESOURCE_DMA,
76 },
77 [3] = {
78 .start = DMACH_I2S0S_TX,
79 .end = DMACH_I2S0S_TX,
80 .flags = IORESOURCE_DMA,
81 },
82}; 66};
83 67
84struct platform_device s5pv210_device_iis0 = { 68struct platform_device s5pv210_device_iis0 = {
@@ -106,21 +90,9 @@ static struct s3c_audio_pdata i2sv3_pdata = {
106}; 90};
107 91
108static struct resource s5pv210_iis1_resource[] = { 92static struct resource s5pv210_iis1_resource[] = {
109 [0] = { 93 [0] = DEFINE_RES_MEM(S5PV210_PA_IIS1, SZ_256),
110 .start = S5PV210_PA_IIS1, 94 [1] = DEFINE_RES_DMA(DMACH_I2S1_TX),
111 .end = S5PV210_PA_IIS1 + 0x100 - 1, 95 [2] = DEFINE_RES_DMA(DMACH_I2S1_RX),
112 .flags = IORESOURCE_MEM,
113 },
114 [1] = {
115 .start = DMACH_I2S1_TX,
116 .end = DMACH_I2S1_TX,
117 .flags = IORESOURCE_DMA,
118 },
119 [2] = {
120 .start = DMACH_I2S1_RX,
121 .end = DMACH_I2S1_RX,
122 .flags = IORESOURCE_DMA,
123 },
124}; 96};
125 97
126struct platform_device s5pv210_device_iis1 = { 98struct platform_device s5pv210_device_iis1 = {
@@ -134,21 +106,9 @@ struct platform_device s5pv210_device_iis1 = {
134}; 106};
135 107
136static struct resource s5pv210_iis2_resource[] = { 108static struct resource s5pv210_iis2_resource[] = {
137 [0] = { 109 [0] = DEFINE_RES_MEM(S5PV210_PA_IIS2, SZ_256),
138 .start = S5PV210_PA_IIS2, 110 [1] = DEFINE_RES_DMA(DMACH_I2S2_TX),
139 .end = S5PV210_PA_IIS2 + 0x100 - 1, 111 [2] = DEFINE_RES_DMA(DMACH_I2S2_RX),
140 .flags = IORESOURCE_MEM,
141 },
142 [1] = {
143 .start = DMACH_I2S2_TX,
144 .end = DMACH_I2S2_TX,
145 .flags = IORESOURCE_DMA,
146 },
147 [2] = {
148 .start = DMACH_I2S2_RX,
149 .end = DMACH_I2S2_RX,
150 .flags = IORESOURCE_DMA,
151 },
152}; 112};
153 113
154struct platform_device s5pv210_device_iis2 = { 114struct platform_device s5pv210_device_iis2 = {
@@ -188,21 +148,9 @@ static struct s3c_audio_pdata s3c_pcm_pdata = {
188}; 148};
189 149
190static struct resource s5pv210_pcm0_resource[] = { 150static struct resource s5pv210_pcm0_resource[] = {
191 [0] = { 151 [0] = DEFINE_RES_MEM(S5PV210_PA_PCM0, SZ_256),
192 .start = S5PV210_PA_PCM0, 152 [1] = DEFINE_RES_DMA(DMACH_PCM0_TX),
193 .end = S5PV210_PA_PCM0 + 0x100 - 1, 153 [2] = DEFINE_RES_DMA(DMACH_PCM0_RX),
194 .flags = IORESOURCE_MEM,
195 },
196 [1] = {
197 .start = DMACH_PCM0_TX,
198 .end = DMACH_PCM0_TX,
199 .flags = IORESOURCE_DMA,
200 },
201 [2] = {
202 .start = DMACH_PCM0_RX,
203 .end = DMACH_PCM0_RX,
204 .flags = IORESOURCE_DMA,
205 },
206}; 154};
207 155
208struct platform_device s5pv210_device_pcm0 = { 156struct platform_device s5pv210_device_pcm0 = {
@@ -216,21 +164,9 @@ struct platform_device s5pv210_device_pcm0 = {
216}; 164};
217 165
218static struct resource s5pv210_pcm1_resource[] = { 166static struct resource s5pv210_pcm1_resource[] = {
219 [0] = { 167 [0] = DEFINE_RES_MEM(S5PV210_PA_PCM1, SZ_256),
220 .start = S5PV210_PA_PCM1, 168 [1] = DEFINE_RES_DMA(DMACH_PCM1_TX),
221 .end = S5PV210_PA_PCM1 + 0x100 - 1, 169 [2] = DEFINE_RES_DMA(DMACH_PCM1_RX),
222 .flags = IORESOURCE_MEM,
223 },
224 [1] = {
225 .start = DMACH_PCM1_TX,
226 .end = DMACH_PCM1_TX,
227 .flags = IORESOURCE_DMA,
228 },
229 [2] = {
230 .start = DMACH_PCM1_RX,
231 .end = DMACH_PCM1_RX,
232 .flags = IORESOURCE_DMA,
233 },
234}; 170};
235 171
236struct platform_device s5pv210_device_pcm1 = { 172struct platform_device s5pv210_device_pcm1 = {
@@ -244,21 +180,9 @@ struct platform_device s5pv210_device_pcm1 = {
244}; 180};
245 181
246static struct resource s5pv210_pcm2_resource[] = { 182static struct resource s5pv210_pcm2_resource[] = {
247 [0] = { 183 [0] = DEFINE_RES_MEM(S5PV210_PA_PCM2, SZ_256),
248 .start = S5PV210_PA_PCM2, 184 [1] = DEFINE_RES_DMA(DMACH_PCM2_TX),
249 .end = S5PV210_PA_PCM2 + 0x100 - 1, 185 [2] = DEFINE_RES_DMA(DMACH_PCM2_RX),
250 .flags = IORESOURCE_MEM,
251 },
252 [1] = {
253 .start = DMACH_PCM2_TX,
254 .end = DMACH_PCM2_TX,
255 .flags = IORESOURCE_DMA,
256 },
257 [2] = {
258 .start = DMACH_PCM2_RX,
259 .end = DMACH_PCM2_RX,
260 .flags = IORESOURCE_DMA,
261 },
262}; 186};
263 187
264struct platform_device s5pv210_device_pcm2 = { 188struct platform_device s5pv210_device_pcm2 = {
@@ -279,31 +203,11 @@ static int s5pv210_ac97_cfg_gpio(struct platform_device *pdev)
279} 203}
280 204
281static struct resource s5pv210_ac97_resource[] = { 205static struct resource s5pv210_ac97_resource[] = {
282 [0] = { 206 [0] = DEFINE_RES_MEM(S5PV210_PA_AC97, SZ_256),
283 .start = S5PV210_PA_AC97, 207 [1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT),
284 .end = S5PV210_PA_AC97 + 0x100 - 1, 208 [2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN),
285 .flags = IORESOURCE_MEM, 209 [3] = DEFINE_RES_DMA(DMACH_AC97_MICIN),
286 }, 210 [4] = DEFINE_RES_IRQ(IRQ_AC97),
287 [1] = {
288 .start = DMACH_AC97_PCMOUT,
289 .end = DMACH_AC97_PCMOUT,
290 .flags = IORESOURCE_DMA,
291 },
292 [2] = {
293 .start = DMACH_AC97_PCMIN,
294 .end = DMACH_AC97_PCMIN,
295 .flags = IORESOURCE_DMA,
296 },
297 [3] = {
298 .start = DMACH_AC97_MICIN,
299 .end = DMACH_AC97_MICIN,
300 .flags = IORESOURCE_DMA,
301 },
302 [4] = {
303 .start = IRQ_AC97,
304 .end = IRQ_AC97,
305 .flags = IORESOURCE_IRQ,
306 },
307}; 211};
308 212
309static struct s3c_audio_pdata s3c_ac97_pdata = { 213static struct s3c_audio_pdata s3c_ac97_pdata = {
@@ -334,16 +238,8 @@ static int s5pv210_spdif_cfg_gpio(struct platform_device *pdev)
334} 238}
335 239
336static struct resource s5pv210_spdif_resource[] = { 240static struct resource s5pv210_spdif_resource[] = {
337 [0] = { 241 [0] = DEFINE_RES_MEM(S5PV210_PA_SPDIF, SZ_256),
338 .start = S5PV210_PA_SPDIF, 242 [1] = DEFINE_RES_DMA(DMACH_SPDIF),
339 .end = S5PV210_PA_SPDIF + 0x100 - 1,
340 .flags = IORESOURCE_MEM,
341 },
342 [1] = {
343 .start = DMACH_SPDIF,
344 .end = DMACH_SPDIF,
345 .flags = IORESOURCE_DMA,
346 },
347}; 243};
348 244
349static struct s3c_audio_pdata samsung_spdif_pdata = { 245static struct s3c_audio_pdata samsung_spdif_pdata = {
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
index 91d4ad8bcc73..fa1b61209fd9 100644
--- a/arch/arm/mach-s5pv210/mach-smdkv210.c
+++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
@@ -119,21 +119,10 @@ static struct samsung_keypad_platdata smdkv210_keypad_data __initdata = {
119}; 119};
120 120
121static struct resource smdkv210_dm9000_resources[] = { 121static struct resource smdkv210_dm9000_resources[] = {
122 [0] = { 122 [0] = DEFINE_RES_MEM(S5PV210_PA_SROM_BANK5, 1),
123 .start = S5PV210_PA_SROM_BANK5, 123 [1] = DEFINE_RES_MEM(S5PV210_PA_SROM_BANK5 + 2, 1),
124 .end = S5PV210_PA_SROM_BANK5, 124 [2] = DEFINE_RES_NAMED(IRQ_EINT(9), 1, NULL, IORESOURCE_IRQ \
125 .flags = IORESOURCE_MEM, 125 | IORESOURCE_IRQ_HIGHLEVEL),
126 },
127 [1] = {
128 .start = S5PV210_PA_SROM_BANK5 + 2,
129 .end = S5PV210_PA_SROM_BANK5 + 2,
130 .flags = IORESOURCE_MEM,
131 },
132 [2] = {
133 .start = IRQ_EINT(9),
134 .end = IRQ_EINT(9),
135 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
136 },
137}; 126};
138 127
139static struct dm9000_plat_data smdkv210_dm9000_platdata = { 128static struct dm9000_plat_data smdkv210_dm9000_platdata = {
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c
index 0952494f481a..72ae62003520 100644
--- a/arch/arm/mach-tegra/board-dt-tegra20.c
+++ b/arch/arm/mach-tegra/board-dt-tegra20.c
@@ -37,7 +37,6 @@
37#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
38#include <asm/mach/time.h> 38#include <asm/mach/time.h>
39#include <asm/setup.h> 39#include <asm/setup.h>
40#include <asm/hardware/gic.h>
41 40
42#include <mach/iomap.h> 41#include <mach/iomap.h>
43#include <mach/irqs.h> 42#include <mach/irqs.h>
diff --git a/arch/arm/mach-tegra/include/mach/dma.h b/arch/arm/mach-tegra/include/mach/dma.h
index 3c9339058bec..9077092812c0 100644
--- a/arch/arm/mach-tegra/include/mach/dma.h
+++ b/arch/arm/mach-tegra/include/mach/dma.h
@@ -51,8 +51,6 @@
51#define TEGRA_DMA_REQ_SEL_OWR 25 51#define TEGRA_DMA_REQ_SEL_OWR 25
52#define TEGRA_DMA_REQ_SEL_INVALID 31 52#define TEGRA_DMA_REQ_SEL_INVALID 31
53 53
54#if defined(CONFIG_TEGRA_SYSTEM_DMA)
55
56struct tegra_dma_req; 54struct tegra_dma_req;
57struct tegra_dma_channel; 55struct tegra_dma_channel;
58 56
@@ -151,5 +149,3 @@ void tegra_dma_free_channel(struct tegra_dma_channel *ch);
151int __init tegra_dma_init(void); 149int __init tegra_dma_init(void);
152 150
153#endif 151#endif
154
155#endif
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
index ef7099eea0f2..0e8470a3fbeb 100644
--- a/arch/arm/mach-ux500/Kconfig
+++ b/arch/arm/mach-ux500/Kconfig
@@ -10,10 +10,6 @@ config UX500_SOC_COMMON
10 select ARM_ERRATA_764369 10 select ARM_ERRATA_764369
11 select CACHE_L2X0 11 select CACHE_L2X0
12 12
13config UX500_SOC_DB5500
14 bool
15 select MFD_DB5500_PRCMU
16
17config UX500_SOC_DB8500 13config UX500_SOC_DB8500
18 bool 14 bool
19 select MFD_DB8500_PRCMU 15 select MFD_DB8500_PRCMU
@@ -45,15 +41,8 @@ config MACH_SNOWBALL
45 help 41 help
46 Include support for the snowball development platform. 42 Include support for the snowball development platform.
47 43
48config MACH_U5500
49 bool "U5500 Development platform"
50 select UX500_SOC_DB5500
51 help
52 Include support for the U5500 development platform.
53
54config UX500_AUTO_PLATFORM 44config UX500_AUTO_PLATFORM
55 def_bool y 45 def_bool y
56 depends on !MACH_U5500
57 select MACH_MOP500 46 select MACH_MOP500
58 help 47 help
59 At least one platform needs to be selected in order to build 48 At least one platform needs to be selected in order to build
@@ -74,18 +63,4 @@ config UX500_DEBUG_UART
74 Choose the UART on which kernel low-level debug messages should be 63 Choose the UART on which kernel low-level debug messages should be
75 output. 64 output.
76 65
77config U5500_MODEM_IRQ
78 bool "Modem IRQ support"
79 depends on UX500_SOC_DB5500
80 default y
81 help
82 Add support for handling IRQ:s from modem side
83
84config U5500_MBOX
85 bool "Mailbox support"
86 depends on U5500_MODEM_IRQ
87 default y
88 help
89 Add support for U5500 mailbox communication with modem side
90
91endif 66endif
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index 465b9ec9510a..fc7db5df970b 100644
--- a/arch/arm/mach-ux500/Makefile
+++ b/arch/arm/mach-ux500/Makefile
@@ -5,16 +5,11 @@
5obj-y := clock.o cpu.o devices.o devices-common.o \ 5obj-y := clock.o cpu.o devices.o devices-common.o \
6 id.o usb.o timer.o 6 id.o usb.o timer.o
7obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o 7obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
8obj-$(CONFIG_UX500_SOC_DB5500) += cpu-db5500.o dma-db5500.o
9obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o 8obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o
10obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \ 9obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \
11 board-mop500-regulators.o \ 10 board-mop500-regulators.o \
12 board-mop500-uib.o board-mop500-stuib.o \ 11 board-mop500-uib.o board-mop500-stuib.o \
13 board-mop500-u8500uib.o \ 12 board-mop500-u8500uib.o \
14 board-mop500-pins.o 13 board-mop500-pins.o
15obj-$(CONFIG_MACH_U5500) += board-u5500.o board-u5500-sdi.o
16obj-$(CONFIG_SMP) += platsmp.o headsmp.o 14obj-$(CONFIG_SMP) += platsmp.o headsmp.o
17obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 15obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
18obj-$(CONFIG_U5500_MODEM_IRQ) += modem-irq-db5500.o
19obj-$(CONFIG_U5500_MBOX) += mbox-db5500.o
20
diff --git a/arch/arm/mach-ux500/board-u5500-sdi.c b/arch/arm/mach-ux500/board-u5500-sdi.c
deleted file mode 100644
index 836112eedde7..000000000000
--- a/arch/arm/mach-ux500/board-u5500-sdi.c
+++ /dev/null
@@ -1,74 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * Author: Hanumath Prasad <ulf.hansson@stericsson.com>
5 * License terms: GNU General Public License (GPL) version 2
6 */
7
8#include <linux/amba/mmci.h>
9#include <linux/mmc/host.h>
10
11#include <plat/pincfg.h>
12#include <plat/gpio-nomadik.h>
13#include <mach/db5500-regs.h>
14#include <plat/ste_dma40.h>
15
16#include "pins-db5500.h"
17#include "devices-db5500.h"
18#include "ste-dma40-db5500.h"
19
20static pin_cfg_t u5500_sdi_pins[] = {
21 /* SDI0 (POP eMMC) */
22 GPIO5_MC0_DAT0 | PIN_DIR_INPUT | PIN_PULL_UP,
23 GPIO6_MC0_DAT1 | PIN_DIR_INPUT | PIN_PULL_UP,
24 GPIO7_MC0_DAT2 | PIN_DIR_INPUT | PIN_PULL_UP,
25 GPIO8_MC0_DAT3 | PIN_DIR_INPUT | PIN_PULL_UP,
26 GPIO9_MC0_DAT4 | PIN_DIR_INPUT | PIN_PULL_UP,
27 GPIO10_MC0_DAT5 | PIN_DIR_INPUT | PIN_PULL_UP,
28 GPIO11_MC0_DAT6 | PIN_DIR_INPUT | PIN_PULL_UP,
29 GPIO12_MC0_DAT7 | PIN_DIR_INPUT | PIN_PULL_UP,
30 GPIO13_MC0_CMD | PIN_DIR_INPUT | PIN_PULL_UP,
31 GPIO14_MC0_CLK | PIN_DIR_OUTPUT | PIN_VAL_LOW,
32};
33
34#ifdef CONFIG_STE_DMA40
35struct stedma40_chan_cfg u5500_sdi0_dma_cfg_rx = {
36 .mode = STEDMA40_MODE_LOGICAL,
37 .dir = STEDMA40_PERIPH_TO_MEM,
38 .src_dev_type = DB5500_DMA_DEV24_SDMMC0_RX,
39 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
40 .src_info.data_width = STEDMA40_WORD_WIDTH,
41 .dst_info.data_width = STEDMA40_WORD_WIDTH,
42};
43
44static struct stedma40_chan_cfg u5500_sdi0_dma_cfg_tx = {
45 .mode = STEDMA40_MODE_LOGICAL,
46 .dir = STEDMA40_MEM_TO_PERIPH,
47 .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
48 .dst_dev_type = DB5500_DMA_DEV24_SDMMC0_TX,
49 .src_info.data_width = STEDMA40_WORD_WIDTH,
50 .dst_info.data_width = STEDMA40_WORD_WIDTH,
51};
52#endif
53
54static struct mmci_platform_data u5500_sdi0_data = {
55 .ocr_mask = MMC_VDD_165_195,
56 .f_max = 50000000,
57 .capabilities = MMC_CAP_4_BIT_DATA |
58 MMC_CAP_8_BIT_DATA |
59 MMC_CAP_MMC_HIGHSPEED,
60 .gpio_cd = -1,
61 .gpio_wp = -1,
62#ifdef CONFIG_STE_DMA40
63 .dma_filter = stedma40_filter,
64 .dma_rx_param = &u5500_sdi0_dma_cfg_rx,
65 .dma_tx_param = &u5500_sdi0_dma_cfg_tx,
66#endif
67};
68
69void __init u5500_sdi_init(struct device *parent)
70{
71 nmk_config_pins(u5500_sdi_pins, ARRAY_SIZE(u5500_sdi_pins));
72
73 db5500_add_sdi0(parent, &u5500_sdi0_data);
74}
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c
deleted file mode 100644
index 0ff4be72a809..000000000000
--- a/arch/arm/mach-ux500/board-u5500.c
+++ /dev/null
@@ -1,162 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
5 * License terms: GNU General Public License (GPL) version 2
6 */
7
8#include <linux/init.h>
9#include <linux/platform_device.h>
10#include <linux/amba/bus.h>
11#include <linux/irq.h>
12#include <linux/i2c.h>
13#include <linux/mfd/abx500/ab5500.h>
14
15#include <asm/hardware/gic.h>
16#include <asm/mach/arch.h>
17#include <asm/mach-types.h>
18
19#include <plat/pincfg.h>
20#include <plat/i2c.h>
21#include <plat/gpio-nomadik.h>
22
23#include <mach/hardware.h>
24#include <mach/devices.h>
25#include <mach/setup.h>
26
27#include "pins-db5500.h"
28#include "devices-db5500.h"
29#include <linux/led-lm3530.h>
30
31/*
32 * GPIO
33 */
34
35static pin_cfg_t u5500_pins[] = {
36 /* I2C */
37 GPIO218_I2C2_SCL | PIN_INPUT_PULLUP,
38 GPIO219_I2C2_SDA | PIN_INPUT_PULLUP,
39
40 /* DISPLAY_ENABLE */
41 GPIO226_GPIO | PIN_OUTPUT_LOW,
42
43 /* Backlight Enbale */
44 GPIO224_GPIO | PIN_OUTPUT_HIGH,
45};
46/*
47 * I2C
48 */
49
50#define U5500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, _sm) \
51static struct nmk_i2c_controller u5500_i2c##id##_data = { \
52 /* \
53 * slave data setup time, which is \
54 * 250 ns,100ns,10ns which is 14,6,2 \
55 * respectively for a 48 Mhz \
56 * i2c clock \
57 */ \
58 .slsu = _slsu, \
59 /* Tx FIFO threshold */ \
60 .tft = _tft, \
61 /* Rx FIFO threshold */ \
62 .rft = _rft, \
63 /* std. mode operation */ \
64 .clk_freq = clk, \
65 .sm = _sm, \
66}
67/*
68 * The board uses TODO <3> i2c controllers, initialize all of
69 * them with slave data setup time of 250 ns,
70 * Tx & Rx FIFO threshold values as 1 and standard
71 * mode of operation
72 */
73
74U5500_I2C_CONTROLLER(2, 0xe, 1, 1, 400000, I2C_FREQ_MODE_FAST);
75
76static struct lm3530_platform_data u5500_als_platform_data = {
77 .mode = LM3530_BL_MODE_MANUAL,
78 .als_input_mode = LM3530_INPUT_ALS1,
79 .max_current = LM3530_FS_CURR_26mA,
80 .pwm_pol_hi = true,
81 .als_avrg_time = LM3530_ALS_AVRG_TIME_512ms,
82 .brt_ramp_law = 1, /* Linear */
83 .brt_ramp_fall = LM3530_RAMP_TIME_8s,
84 .brt_ramp_rise = LM3530_RAMP_TIME_8s,
85 .als1_resistor_sel = LM3530_ALS_IMPD_13_53kOhm,
86 .als2_resistor_sel = LM3530_ALS_IMPD_Z,
87 .als_vmin = 730, /* mV */
88 .als_vmax = 1020, /* mV */
89 .brt_val = 0x7F, /* Max brightness */
90};
91
92static struct i2c_board_info __initdata u5500_i2c2_devices[] = {
93 {
94 /* Backlight */
95 I2C_BOARD_INFO("lm3530-led", 0x36),
96 .platform_data = &u5500_als_platform_data,
97 },
98};
99
100static void __init u5500_i2c_init(struct device *parent)
101{
102 db5500_add_i2c2(parent, &u5500_i2c2_data);
103 i2c_register_board_info(2, ARRAY_AND_SIZE(u5500_i2c2_devices));
104}
105
106static struct ab5500_platform_data ab5500_plf_data = {
107 .irq = {
108 .base = 0,
109 .count = 0,
110 },
111 .init_settings = NULL,
112 .init_settings_sz = 0,
113 .pm_power_off = false,
114};
115
116static struct platform_device ab5500_device = {
117 .name = "ab5500-core",
118 .id = 0,
119 .dev = {
120 .platform_data = &ab5500_plf_data,
121 },
122 .num_resources = 0,
123};
124
125static struct platform_device *u5500_platform_devices[] __initdata = {
126 &ab5500_device,
127};
128
129static void __init u5500_uart_init(struct device *parent)
130{
131 db5500_add_uart0(parent, NULL);
132 db5500_add_uart1(parent, NULL);
133 db5500_add_uart2(parent, NULL);
134}
135
136static void __init u5500_init_machine(void)
137{
138 struct device *parent = NULL;
139 int i;
140
141 parent = u5500_init_devices();
142 nmk_config_pins(u5500_pins, ARRAY_SIZE(u5500_pins));
143
144 u5500_i2c_init(parent);
145 u5500_sdi_init(parent);
146 u5500_uart_init(parent);
147
148 for (i = 0; i < ARRAY_SIZE(u5500_platform_devices); i++)
149 u5500_platform_devices[i]->dev.parent = parent;
150
151 platform_add_devices(u5500_platform_devices,
152 ARRAY_SIZE(u5500_platform_devices));
153}
154
155MACHINE_START(U5500, "ST-Ericsson U5500 Platform")
156 .atag_offset = 0x100,
157 .map_io = u5500_map_io,
158 .init_irq = ux500_init_irq,
159 .timer = &ux500_timer,
160 .handle_irq = gic_handle_irq,
161 .init_machine = u5500_init_machine,
162MACHINE_END
diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c
index 77a75ed0df67..df91344aa2db 100644
--- a/arch/arm/mach-ux500/cache-l2x0.c
+++ b/arch/arm/mach-ux500/cache-l2x0.c
@@ -36,9 +36,7 @@ static int __init ux500_l2x0_unlock(void)
36 36
37static int __init ux500_l2x0_init(void) 37static int __init ux500_l2x0_init(void)
38{ 38{
39 if (cpu_is_u5500()) 39 if (cpu_is_u8500())
40 l2x0_base = __io_address(U5500_L2CC_BASE);
41 else if (cpu_is_u8500())
42 l2x0_base = __io_address(U8500_L2CC_BASE); 40 l2x0_base = __io_address(U8500_L2CC_BASE);
43 else 41 else
44 ux500_unknown_soc(); 42 ux500_unknown_soc();
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c
index ec35f0aa5665..9feb6bc7f20e 100644
--- a/arch/arm/mach-ux500/clock.c
+++ b/arch/arm/mach-ux500/clock.c
@@ -149,9 +149,7 @@ static unsigned long clk_mtu_get_rate(struct clk *clk)
149 unsigned long mturate; 149 unsigned long mturate;
150 unsigned long retclk; 150 unsigned long retclk;
151 151
152 if (cpu_is_u5500()) 152 if (cpu_is_u8500())
153 addr = __io_address(U5500_PRCMU_BASE);
154 else if (cpu_is_u8500())
155 addr = __io_address(U8500_PRCMU_BASE); 153 addr = __io_address(U8500_PRCMU_BASE);
156 else 154 else
157 ux500_unknown_soc(); 155 ux500_unknown_soc();
@@ -705,14 +703,6 @@ late_initcall(clk_init_smp_twd_cpufreq);
705 703
706int __init clk_init(void) 704int __init clk_init(void)
707{ 705{
708 if (cpu_is_u5500()) {
709 /* Clock tree for U5500 not implemented yet */
710 clk_prcc_ops.enable = clk_prcc_ops.disable = NULL;
711 clk_prcmu_ops.enable = clk_prcmu_ops.disable = NULL;
712 clk_uartclk.rate = 36360000;
713 clk_sdmmcclk.rate = 99900000;
714 }
715
716 clkdev_add_table(u8500_clks, ARRAY_SIZE(u8500_clks)); 706 clkdev_add_table(u8500_clks, ARRAY_SIZE(u8500_clks));
717 clkdev_add(&clk_smp_twd_lookup); 707 clkdev_add(&clk_smp_twd_lookup);
718 708
diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c
deleted file mode 100644
index bca47f32082f..000000000000
--- a/arch/arm/mach-ux500/cpu-db5500.c
+++ /dev/null
@@ -1,247 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
5 * License terms: GNU General Public License (GPL) version 2
6 */
7
8#include <linux/platform_device.h>
9#include <linux/amba/bus.h>
10#include <linux/io.h>
11#include <linux/irq.h>
12
13#include <asm/mach/map.h>
14#include <asm/pmu.h>
15
16#include <plat/gpio-nomadik.h>
17
18#include <mach/hardware.h>
19#include <mach/devices.h>
20#include <mach/setup.h>
21#include <mach/irqs.h>
22#include <mach/usb.h>
23
24#include "devices-db5500.h"
25#include "ste-dma40-db5500.h"
26
27static struct map_desc u5500_uart_io_desc[] __initdata = {
28 __IO_DEV_DESC(U5500_UART0_BASE, SZ_4K),
29 __IO_DEV_DESC(U5500_UART2_BASE, SZ_4K),
30};
31
32static struct map_desc u5500_io_desc[] __initdata = {
33 /* SCU base also covers GIC CPU BASE and TWD with its 4K page */
34 __IO_DEV_DESC(U5500_SCU_BASE, SZ_4K),
35 __IO_DEV_DESC(U5500_GIC_DIST_BASE, SZ_4K),
36 __IO_DEV_DESC(U5500_L2CC_BASE, SZ_4K),
37 __IO_DEV_DESC(U5500_MTU0_BASE, SZ_4K),
38 __IO_DEV_DESC(U5500_BACKUPRAM0_BASE, SZ_8K),
39
40 __IO_DEV_DESC(U5500_GPIO0_BASE, SZ_4K),
41 __IO_DEV_DESC(U5500_GPIO1_BASE, SZ_4K),
42 __IO_DEV_DESC(U5500_GPIO2_BASE, SZ_4K),
43 __IO_DEV_DESC(U5500_GPIO3_BASE, SZ_4K),
44 __IO_DEV_DESC(U5500_GPIO4_BASE, SZ_4K),
45 __IO_DEV_DESC(U5500_PRCMU_BASE, SZ_4K),
46 __IO_DEV_DESC(U5500_PRCMU_TCDM_BASE, SZ_4K),
47};
48
49static struct resource mbox0_resources[] = {
50 {
51 .name = "mbox_peer",
52 .start = U5500_MBOX0_PEER_START,
53 .end = U5500_MBOX0_PEER_END,
54 .flags = IORESOURCE_MEM,
55 },
56 {
57 .name = "mbox_local",
58 .start = U5500_MBOX0_LOCAL_START,
59 .end = U5500_MBOX0_LOCAL_END,
60 .flags = IORESOURCE_MEM,
61 },
62 {
63 .name = "mbox_irq",
64 .start = MBOX_PAIR0_VIRT_IRQ,
65 .end = MBOX_PAIR0_VIRT_IRQ,
66 .flags = IORESOURCE_IRQ,
67 }
68};
69
70static struct resource mbox1_resources[] = {
71 {
72 .name = "mbox_peer",
73 .start = U5500_MBOX1_PEER_START,
74 .end = U5500_MBOX1_PEER_END,
75 .flags = IORESOURCE_MEM,
76 },
77 {
78 .name = "mbox_local",
79 .start = U5500_MBOX1_LOCAL_START,
80 .end = U5500_MBOX1_LOCAL_END,
81 .flags = IORESOURCE_MEM,
82 },
83 {
84 .name = "mbox_irq",
85 .start = MBOX_PAIR1_VIRT_IRQ,
86 .end = MBOX_PAIR1_VIRT_IRQ,
87 .flags = IORESOURCE_IRQ,
88 }
89};
90
91static struct resource mbox2_resources[] = {
92 {
93 .name = "mbox_peer",
94 .start = U5500_MBOX2_PEER_START,
95 .end = U5500_MBOX2_PEER_END,
96 .flags = IORESOURCE_MEM,
97 },
98 {
99 .name = "mbox_local",
100 .start = U5500_MBOX2_LOCAL_START,
101 .end = U5500_MBOX2_LOCAL_END,
102 .flags = IORESOURCE_MEM,
103 },
104 {
105 .name = "mbox_irq",
106 .start = MBOX_PAIR2_VIRT_IRQ,
107 .end = MBOX_PAIR2_VIRT_IRQ,
108 .flags = IORESOURCE_IRQ,
109 }
110};
111
112static struct platform_device mbox0_device = {
113 .id = 0,
114 .name = "mbox",
115 .resource = mbox0_resources,
116 .num_resources = ARRAY_SIZE(mbox0_resources),
117};
118
119static struct platform_device mbox1_device = {
120 .id = 1,
121 .name = "mbox",
122 .resource = mbox1_resources,
123 .num_resources = ARRAY_SIZE(mbox1_resources),
124};
125
126static struct platform_device mbox2_device = {
127 .id = 2,
128 .name = "mbox",
129 .resource = mbox2_resources,
130 .num_resources = ARRAY_SIZE(mbox2_resources),
131};
132
133static struct platform_device *db5500_platform_devs[] __initdata = {
134 &mbox0_device,
135 &mbox1_device,
136 &mbox2_device,
137};
138
139static resource_size_t __initdata db5500_gpio_base[] = {
140 U5500_GPIOBANK0_BASE,
141 U5500_GPIOBANK1_BASE,
142 U5500_GPIOBANK2_BASE,
143 U5500_GPIOBANK3_BASE,
144 U5500_GPIOBANK4_BASE,
145 U5500_GPIOBANK5_BASE,
146 U5500_GPIOBANK6_BASE,
147 U5500_GPIOBANK7_BASE,
148};
149
150static void __init db5500_add_gpios(struct device *parent)
151{
152 struct nmk_gpio_platform_data pdata = {
153 /* No custom data yet */
154 };
155
156 dbx500_add_gpios(parent, ARRAY_AND_SIZE(db5500_gpio_base),
157 IRQ_DB5500_GPIO0, &pdata);
158}
159
160void __init u5500_map_io(void)
161{
162 /*
163 * Map the UARTs early so that the DEBUG_LL stuff continues to work.
164 */
165 iotable_init(u5500_uart_io_desc, ARRAY_SIZE(u5500_uart_io_desc));
166
167 ux500_map_io();
168
169 iotable_init(u5500_io_desc, ARRAY_SIZE(u5500_io_desc));
170
171 _PRCMU_BASE = __io_address(U5500_PRCMU_BASE);
172}
173
174static void __init db5500_pmu_init(void)
175{
176 struct resource res[] = {
177 [0] = {
178 .start = IRQ_DB5500_PMU0,
179 .end = IRQ_DB5500_PMU0,
180 .flags = IORESOURCE_IRQ,
181 },
182 [1] = {
183 .start = IRQ_DB5500_PMU1,
184 .end = IRQ_DB5500_PMU1,
185 .flags = IORESOURCE_IRQ,
186 },
187 };
188
189 platform_device_register_simple("arm-pmu", ARM_PMU_DEVICE_CPU,
190 res, ARRAY_SIZE(res));
191}
192
193static int usb_db5500_rx_dma_cfg[] = {
194 DB5500_DMA_DEV4_USB_OTG_IEP_1_9,
195 DB5500_DMA_DEV5_USB_OTG_IEP_2_10,
196 DB5500_DMA_DEV6_USB_OTG_IEP_3_11,
197 DB5500_DMA_DEV20_USB_OTG_IEP_4_12,
198 DB5500_DMA_DEV21_USB_OTG_IEP_5_13,
199 DB5500_DMA_DEV22_USB_OTG_IEP_6_14,
200 DB5500_DMA_DEV23_USB_OTG_IEP_7_15,
201 DB5500_DMA_DEV38_USB_OTG_IEP_8
202};
203
204static int usb_db5500_tx_dma_cfg[] = {
205 DB5500_DMA_DEV4_USB_OTG_OEP_1_9,
206 DB5500_DMA_DEV5_USB_OTG_OEP_2_10,
207 DB5500_DMA_DEV6_USB_OTG_OEP_3_11,
208 DB5500_DMA_DEV20_USB_OTG_OEP_4_12,
209 DB5500_DMA_DEV21_USB_OTG_OEP_5_13,
210 DB5500_DMA_DEV22_USB_OTG_OEP_6_14,
211 DB5500_DMA_DEV23_USB_OTG_OEP_7_15,
212 DB5500_DMA_DEV38_USB_OTG_OEP_8
213};
214
215static const char *db5500_read_soc_id(void)
216{
217 return kasprintf(GFP_KERNEL, "u5500 currently unsupported\n");
218}
219
220static struct device * __init db5500_soc_device_init(void)
221{
222 const char *soc_id = db5500_read_soc_id();
223
224 return ux500_soc_device_init(soc_id);
225}
226
227struct device * __init u5500_init_devices(void)
228{
229 struct device *parent;
230 int i;
231
232 parent = db5500_soc_device_init();
233
234 db5500_add_gpios(parent);
235 db5500_pmu_init();
236 db5500_dma_init(parent);
237 db5500_add_rtc(parent);
238 db5500_add_usb(parent, usb_db5500_rx_dma_cfg, usb_db5500_tx_dma_cfg);
239
240 for (i = 0; i < ARRAY_SIZE(db5500_platform_devs); i++)
241 db5500_platform_devs[i]->dev.parent = parent;
242
243 platform_add_devices(db5500_platform_devs,
244 ARRAY_SIZE(db5500_platform_devs));
245
246 return parent;
247}
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c
index d11f3892a27d..4b4e59b30d81 100644
--- a/arch/arm/mach-ux500/cpu.c
+++ b/arch/arm/mach-ux500/cpu.c
@@ -10,7 +10,6 @@
10#include <linux/io.h> 10#include <linux/io.h>
11#include <linux/clk.h> 11#include <linux/clk.h>
12#include <linux/mfd/db8500-prcmu.h> 12#include <linux/mfd/db8500-prcmu.h>
13#include <linux/mfd/db5500-prcmu.h>
14#include <linux/clksrc-dbx500-prcmu.h> 13#include <linux/clksrc-dbx500-prcmu.h>
15#include <linux/sys_soc.h> 14#include <linux/sys_soc.h>
16#include <linux/err.h> 15#include <linux/err.h>
@@ -40,10 +39,7 @@ void __init ux500_init_irq(void)
40 void __iomem *dist_base; 39 void __iomem *dist_base;
41 void __iomem *cpu_base; 40 void __iomem *cpu_base;
42 41
43 if (cpu_is_u5500()) { 42 if (cpu_is_u8500()) {
44 dist_base = __io_address(U5500_GIC_DIST_BASE);
45 cpu_base = __io_address(U5500_GIC_CPU_BASE);
46 } else if (cpu_is_u8500()) {
47 dist_base = __io_address(U8500_GIC_DIST_BASE); 43 dist_base = __io_address(U8500_GIC_DIST_BASE);
48 cpu_base = __io_address(U8500_GIC_CPU_BASE); 44 cpu_base = __io_address(U8500_GIC_CPU_BASE);
49 } else 45 } else
@@ -60,8 +56,6 @@ void __init ux500_init_irq(void)
60 * Init clocks here so that they are available for system timer 56 * Init clocks here so that they are available for system timer
61 * initialization. 57 * initialization.
62 */ 58 */
63 if (cpu_is_u5500())
64 db5500_prcmu_early_init();
65 if (cpu_is_u8500()) 59 if (cpu_is_u8500())
66 db8500_prcmu_early_init(); 60 db8500_prcmu_early_init();
67 clk_init(); 61 clk_init();
diff --git a/arch/arm/mach-ux500/devices-db5500.h b/arch/arm/mach-ux500/devices-db5500.h
deleted file mode 100644
index e70955502c35..000000000000
--- a/arch/arm/mach-ux500/devices-db5500.h
+++ /dev/null
@@ -1,99 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
5 * License terms: GNU General Public License (GPL), version 2.
6 */
7
8#ifndef __DEVICES_DB5500_H
9#define __DEVICES_DB5500_H
10
11#include "devices-common.h"
12
13#define db5500_add_i2c1(parent, pdata) \
14 dbx500_add_i2c(parent, 1, U5500_I2C1_BASE, IRQ_DB5500_I2C1, pdata)
15#define db5500_add_i2c2(parent, pdata) \
16 dbx500_add_i2c(parent, 2, U5500_I2C2_BASE, IRQ_DB5500_I2C2, pdata)
17#define db5500_add_i2c3(parent, pdata) \
18 dbx500_add_i2c(parent, 3, U5500_I2C3_BASE, IRQ_DB5500_I2C3, pdata)
19
20#define db5500_add_msp0_spi(parent, pdata) \
21 dbx500_add_msp_spi(parent, "msp0", U5500_MSP0_BASE, \
22 IRQ_DB5500_MSP0, pdata)
23#define db5500_add_msp1_spi(parent, pdata) \
24 dbx500_add_msp_spi(parent, "msp1", U5500_MSP1_BASE, \
25 IRQ_DB5500_MSP1, pdata)
26#define db5500_add_msp2_spi(parent, pdata) \
27 dbx500_add_msp_spi(parent, "msp2", U5500_MSP2_BASE, \
28 IRQ_DB5500_MSP2, pdata)
29
30#define db5500_add_msp0_spi(parent, pdata) \
31 dbx500_add_msp_spi(parent, "msp0", U5500_MSP0_BASE, \
32 IRQ_DB5500_MSP0, pdata)
33#define db5500_add_msp1_spi(parent, pdata) \
34 dbx500_add_msp_spi(parent, "msp1", U5500_MSP1_BASE, \
35 IRQ_DB5500_MSP1, pdata)
36#define db5500_add_msp2_spi(parent, pdata) \
37 dbx500_add_msp_spi(parent, "msp2", U5500_MSP2_BASE, \
38 IRQ_DB5500_MSP2, pdata)
39
40#define db5500_add_rtc(parent) \
41 dbx500_add_rtc(parent, U5500_RTC_BASE, IRQ_DB5500_RTC);
42
43#define db5500_add_usb(parent, rx_cfg, tx_cfg) \
44 ux500_add_usb(parent, U5500_USBOTG_BASE, \
45 IRQ_DB5500_USBOTG, rx_cfg, tx_cfg)
46
47#define db5500_add_sdi0(parent, pdata) \
48 dbx500_add_sdi(parent, "sdi0", U5500_SDI0_BASE, \
49 IRQ_DB5500_SDMMC0, pdata, \
50 0x10480180)
51#define db5500_add_sdi1(parent, pdata) \
52 dbx500_add_sdi(parent, "sdi1", U5500_SDI1_BASE, \
53 IRQ_DB5500_SDMMC1, pdata, \
54 0x10480180)
55#define db5500_add_sdi2(parent, pdata) \
56 dbx500_add_sdi(parent, "sdi2", U5500_SDI2_BASE, \
57 IRQ_DB5500_SDMMC2, pdata \
58 0x10480180)
59#define db5500_add_sdi3(parent, pdata) \
60 dbx500_add_sdi(parent, "sdi3", U5500_SDI3_BASE, \
61 IRQ_DB5500_SDMMC3, pdata \
62 0x10480180)
63#define db5500_add_sdi4(parent, pdata) \
64 dbx500_add_sdi(parent, "sdi4", U5500_SDI4_BASE, \
65 IRQ_DB5500_SDMMC4, pdata \
66 0x10480180)
67
68/* This one has a bad peripheral ID in the U5500 silicon */
69#define db5500_add_spi0(parent, pdata) \
70 dbx500_add_spi(parent, "spi0", U5500_SPI0_BASE, \
71 IRQ_DB5500_SPI0, pdata, \
72 0x10080023)
73#define db5500_add_spi1(parent, pdata) \
74 dbx500_add_spi(parent, "spi1", U5500_SPI1_BASE, \
75 IRQ_DB5500_SPI1, pdata, \
76 0x10080023)
77#define db5500_add_spi2(parent, pdata) \
78 dbx500_add_spi(parent, "spi2", U5500_SPI2_BASE, \
79 IRQ_DB5500_SPI2, pdata \
80 0x10080023)
81#define db5500_add_spi3(parent, pdata) \
82 dbx500_add_spi(parent, "spi3", U5500_SPI3_BASE, \
83 IRQ_DB5500_SPI3, pdata \
84 0x10080023)
85
86#define db5500_add_uart0(parent, plat) \
87 dbx500_add_uart(parent, "uart0", U5500_UART0_BASE, \
88 IRQ_DB5500_UART0, plat)
89#define db5500_add_uart1(parent, plat) \
90 dbx500_add_uart(parent, "uart1", U5500_UART1_BASE, \
91 IRQ_DB5500_UART1, plat)
92#define db5500_add_uart2(parent, plat) \
93 dbx500_add_uart(parent, "uart2", U5500_UART2_BASE, \
94 IRQ_DB5500_UART2, plat)
95#define db5500_add_uart3(parent, plat) \
96 dbx500_add_uart(parent, "uart3", U5500_UART3_BASE, \
97 IRQ_DB5500_UART3, plat)
98
99#endif
diff --git a/arch/arm/mach-ux500/dma-db5500.c b/arch/arm/mach-ux500/dma-db5500.c
deleted file mode 100644
index 41e9470fa0e6..000000000000
--- a/arch/arm/mach-ux500/dma-db5500.c
+++ /dev/null
@@ -1,137 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * Author: Per Forlin <per.forlin@stericsson.com> for ST-Ericsson
5 * Author: Jonas Aaberg <jonas.aberg@stericsson.com> for ST-Ericsson
6 * Author: Rabin Vincent <rabinv.vincent@stericsson.com> for ST-Ericsson
7 *
8 * License terms: GNU General Public License (GPL), version 2
9 */
10
11#include <linux/kernel.h>
12#include <linux/platform_device.h>
13
14#include <plat/ste_dma40.h>
15#include <mach/setup.h>
16#include <mach/hardware.h>
17
18#include "ste-dma40-db5500.h"
19
20static struct resource dma40_resources[] = {
21 [0] = {
22 .start = U5500_DMA_BASE,
23 .end = U5500_DMA_BASE + SZ_4K - 1,
24 .flags = IORESOURCE_MEM,
25 .name = "base",
26 },
27 [1] = {
28 .start = U5500_DMA_LCPA_BASE,
29 .end = U5500_DMA_LCPA_BASE + 2 * SZ_1K - 1,
30 .flags = IORESOURCE_MEM,
31 .name = "lcpa",
32 },
33 [2] = {
34 .start = IRQ_DB5500_DMA,
35 .end = IRQ_DB5500_DMA,
36 .flags = IORESOURCE_IRQ
37 }
38};
39
40/* Default configuration for physical memcpy */
41static struct stedma40_chan_cfg dma40_memcpy_conf_phy = {
42 .mode = STEDMA40_MODE_PHYSICAL,
43 .dir = STEDMA40_MEM_TO_MEM,
44
45 .src_info.data_width = STEDMA40_BYTE_WIDTH,
46 .src_info.psize = STEDMA40_PSIZE_PHY_1,
47 .src_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL,
48
49 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
50 .dst_info.psize = STEDMA40_PSIZE_PHY_1,
51 .dst_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL,
52};
53
54/* Default configuration for logical memcpy */
55static struct stedma40_chan_cfg dma40_memcpy_conf_log = {
56 .dir = STEDMA40_MEM_TO_MEM,
57
58 .src_info.data_width = STEDMA40_BYTE_WIDTH,
59 .src_info.psize = STEDMA40_PSIZE_LOG_1,
60 .src_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL,
61
62 .dst_info.data_width = STEDMA40_BYTE_WIDTH,
63 .dst_info.psize = STEDMA40_PSIZE_LOG_1,
64 .dst_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL,
65};
66
67/*
68 * Mapping between soruce event lines and physical device address This was
69 * created assuming that the event line is tied to a device and therefore the
70 * address is constant, however this is not true for at least USB, and the
71 * values are just placeholders for USB. This table is preserved and used for
72 * now.
73 */
74static const dma_addr_t dma40_rx_map[DB5500_DMA_NR_DEV] = {
75 [DB5500_DMA_DEV24_SDMMC0_RX] = -1,
76 [DB5500_DMA_DEV38_USB_OTG_IEP_8] = -1,
77 [DB5500_DMA_DEV23_USB_OTG_IEP_7_15] = -1,
78 [DB5500_DMA_DEV22_USB_OTG_IEP_6_14] = -1,
79 [DB5500_DMA_DEV21_USB_OTG_IEP_5_13] = -1,
80 [DB5500_DMA_DEV20_USB_OTG_IEP_4_12] = -1,
81 [DB5500_DMA_DEV6_USB_OTG_IEP_3_11] = -1,
82 [DB5500_DMA_DEV5_USB_OTG_IEP_2_10] = -1,
83 [DB5500_DMA_DEV4_USB_OTG_IEP_1_9] = -1,
84};
85
86/* Mapping between destination event lines and physical device address */
87static const dma_addr_t dma40_tx_map[DB5500_DMA_NR_DEV] = {
88 [DB5500_DMA_DEV24_SDMMC0_TX] = -1,
89 [DB5500_DMA_DEV38_USB_OTG_OEP_8] = -1,
90 [DB5500_DMA_DEV23_USB_OTG_OEP_7_15] = -1,
91 [DB5500_DMA_DEV22_USB_OTG_OEP_6_14] = -1,
92 [DB5500_DMA_DEV21_USB_OTG_OEP_5_13] = -1,
93 [DB5500_DMA_DEV20_USB_OTG_OEP_4_12] = -1,
94 [DB5500_DMA_DEV6_USB_OTG_OEP_3_11] = -1,
95 [DB5500_DMA_DEV5_USB_OTG_OEP_2_10] = -1,
96 [DB5500_DMA_DEV4_USB_OTG_OEP_1_9] = -1,
97};
98
99static int dma40_memcpy_event[] = {
100 DB5500_DMA_MEMCPY_TX_1,
101 DB5500_DMA_MEMCPY_TX_2,
102 DB5500_DMA_MEMCPY_TX_3,
103 DB5500_DMA_MEMCPY_TX_4,
104 DB5500_DMA_MEMCPY_TX_5,
105};
106
107static struct stedma40_platform_data dma40_plat_data = {
108 .dev_len = ARRAY_SIZE(dma40_rx_map),
109 .dev_rx = dma40_rx_map,
110 .dev_tx = dma40_tx_map,
111 .memcpy = dma40_memcpy_event,
112 .memcpy_len = ARRAY_SIZE(dma40_memcpy_event),
113 .memcpy_conf_phy = &dma40_memcpy_conf_phy,
114 .memcpy_conf_log = &dma40_memcpy_conf_log,
115 .disabled_channels = {-1},
116};
117
118static struct platform_device dma40_device = {
119 .dev = {
120 .platform_data = &dma40_plat_data,
121 },
122 .name = "dma40",
123 .id = 0,
124 .num_resources = ARRAY_SIZE(dma40_resources),
125 .resource = dma40_resources
126};
127
128void __init db5500_dma_init(struct device *parent)
129{
130 int ret;
131
132 dma40_device.dev.parent = parent;
133 ret = platform_device_register(&dma40_device);
134 if (ret)
135 dev_err(&dma40_device.dev, "unable to register device: %d\n", ret);
136
137}
diff --git a/arch/arm/mach-ux500/include/mach/db5500-regs.h b/arch/arm/mach-ux500/include/mach/db5500-regs.h
deleted file mode 100644
index 8e714bcb099f..000000000000
--- a/arch/arm/mach-ux500/include/mach/db5500-regs.h
+++ /dev/null
@@ -1,143 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * License terms: GNU General Public License (GPL) version 2
5 */
6
7#ifndef __MACH_DB5500_REGS_H
8#define __MACH_DB5500_REGS_H
9
10#define U5500_PER1_BASE 0xA0020000
11#define U5500_PER2_BASE 0xA0010000
12#define U5500_PER3_BASE 0x80140000
13#define U5500_PER4_BASE 0x80150000
14#define U5500_PER5_BASE 0x80100000
15#define U5500_PER6_BASE 0x80120000
16
17#define U5500_GIC_DIST_BASE 0xA0411000
18#define U5500_GIC_CPU_BASE 0xA0410100
19#define U5500_DMA_BASE 0x90030000
20#define U5500_STM_BASE 0x90020000
21#define U5500_STM_REG_BASE (U5500_STM_BASE + 0xF000)
22#define U5500_MCDE_BASE 0xA0400000
23#define U5500_MODEM_BASE 0xB0000000
24#define U5500_L2CC_BASE 0xA0412000
25#define U5500_SCU_BASE 0xA0410000
26#define U5500_DSI1_BASE 0xA0401000
27#define U5500_DSI2_BASE 0xA0402000
28#define U5500_SIA_BASE 0xA0100000
29#define U5500_SVA_BASE 0x80200000
30#define U5500_HSEM_BASE 0xA0000000
31#define U5500_NAND0_BASE 0x60000000
32#define U5500_NAND1_BASE 0x70000000
33#define U5500_TWD_BASE 0xa0410600
34#define U5500_ICN_BASE 0xA0040000
35#define U5500_B2R2_BASE 0xa0200000
36#define U5500_BOOT_ROM_BASE 0x90000000
37
38#define U5500_FSMC_BASE (U5500_PER1_BASE + 0x0000)
39#define U5500_SDI0_BASE (U5500_PER1_BASE + 0x1000)
40#define U5500_SDI2_BASE (U5500_PER1_BASE + 0x2000)
41#define U5500_UART0_BASE (U5500_PER1_BASE + 0x3000)
42#define U5500_I2C1_BASE (U5500_PER1_BASE + 0x4000)
43#define U5500_MSP0_BASE (U5500_PER1_BASE + 0x5000)
44#define U5500_GPIO0_BASE (U5500_PER1_BASE + 0xE000)
45#define U5500_CLKRST1_BASE (U5500_PER1_BASE + 0xF000)
46
47#define U5500_USBOTG_BASE (U5500_PER2_BASE + 0x0000)
48#define U5500_GPIO1_BASE (U5500_PER2_BASE + 0xE000)
49#define U5500_CLKRST2_BASE (U5500_PER2_BASE + 0xF000)
50
51#define U5500_KEYPAD_BASE (U5500_PER3_BASE + 0x0000)
52#define U5500_PWM_BASE (U5500_PER3_BASE + 0x1000)
53#define U5500_GPIO3_BASE (U5500_PER3_BASE + 0xE000)
54#define U5500_CLKRST3_BASE (U5500_PER3_BASE + 0xF000)
55
56#define U5500_BACKUPRAM0_BASE (U5500_PER4_BASE + 0x0000)
57#define U5500_BACKUPRAM1_BASE (U5500_PER4_BASE + 0x1000)
58#define U5500_RTT0_BASE (U5500_PER4_BASE + 0x2000)
59#define U5500_RTT1_BASE (U5500_PER4_BASE + 0x3000)
60#define U5500_RTC_BASE (U5500_PER4_BASE + 0x4000)
61#define U5500_SCR_BASE (U5500_PER4_BASE + 0x5000)
62#define U5500_DMC_BASE (U5500_PER4_BASE + 0x6000)
63#define U5500_PRCMU_BASE (U5500_PER4_BASE + 0x7000)
64#define U5500_PRCMU_TIMER_3_BASE (U5500_PER4_BASE + 0x07338)
65#define U5500_PRCMU_TIMER_4_BASE (U5500_PER4_BASE + 0x07450)
66#define U5500_MSP1_BASE (U5500_PER4_BASE + 0x9000)
67#define U5500_GPIO2_BASE (U5500_PER4_BASE + 0xA000)
68#define U5500_MTIMER_BASE (U5500_PER4_BASE + 0xC000)
69#define U5500_CDETECT_BASE (U5500_PER4_BASE + 0xF000)
70#define U5500_PRCMU_TCDM_BASE (U5500_PER4_BASE + 0x18000)
71#define U5500_PRCMU_TCPM_BASE (U5500_PER4_BASE + 0x10000)
72#define U5500_TPIU_BASE (U5500_PER4_BASE + 0x50000)
73
74#define U5500_SPI0_BASE (U5500_PER5_BASE + 0x0000)
75#define U5500_SPI1_BASE (U5500_PER5_BASE + 0x1000)
76#define U5500_SPI2_BASE (U5500_PER5_BASE + 0x2000)
77#define U5500_SPI3_BASE (U5500_PER5_BASE + 0x3000)
78#define U5500_UART1_BASE (U5500_PER5_BASE + 0x4000)
79#define U5500_UART2_BASE (U5500_PER5_BASE + 0x5000)
80#define U5500_UART3_BASE (U5500_PER5_BASE + 0x6000)
81#define U5500_SDI1_BASE (U5500_PER5_BASE + 0x7000)
82#define U5500_SDI3_BASE (U5500_PER5_BASE + 0x8000)
83#define U5500_SDI4_BASE (U5500_PER5_BASE + 0x9000)
84#define U5500_I2C2_BASE (U5500_PER5_BASE + 0xA000)
85#define U5500_I2C3_BASE (U5500_PER5_BASE + 0xB000)
86#define U5500_MSP2_BASE (U5500_PER5_BASE + 0xC000)
87#define U5500_IRDA_BASE (U5500_PER5_BASE + 0xD000)
88#define U5500_IRRC_BASE (U5500_PER5_BASE + 0x10000)
89#define U5500_GPIO4_BASE (U5500_PER5_BASE + 0x1E000)
90#define U5500_CLKRST5_BASE (U5500_PER5_BASE + 0x1F000)
91
92#define U5500_RNG_BASE (U5500_PER6_BASE + 0x0000)
93#define U5500_HASH0_BASE (U5500_PER6_BASE + 0x1000)
94#define U5500_HASH1_BASE (U5500_PER6_BASE + 0x2000)
95#define U5500_PKA_BASE (U5500_PER6_BASE + 0x4000)
96#define U5500_PKAM_BASE (U5500_PER6_BASE + 0x5100)
97#define U5500_MTU0_BASE (U5500_PER6_BASE + 0x6000)
98#define U5500_MTU1_BASE (U5500_PER6_BASE + 0x7000)
99#define U5500_CR_BASE (U5500_PER6_BASE + 0x8000)
100#define U5500_CRYP0_BASE (U5500_PER6_BASE + 0xA000)
101#define U5500_CRYP1_BASE (U5500_PER6_BASE + 0xB000)
102#define U5500_CLKRST6_BASE (U5500_PER6_BASE + 0xF000)
103
104#define U5500_GPIOBANK0_BASE U5500_GPIO0_BASE
105#define U5500_GPIOBANK1_BASE (U5500_GPIO0_BASE + 0x80)
106#define U5500_GPIOBANK2_BASE U5500_GPIO1_BASE
107#define U5500_GPIOBANK3_BASE U5500_GPIO2_BASE
108#define U5500_GPIOBANK4_BASE U5500_GPIO3_BASE
109#define U5500_GPIOBANK5_BASE U5500_GPIO4_BASE
110#define U5500_GPIOBANK6_BASE (U5500_GPIO4_BASE + 0x80)
111#define U5500_GPIOBANK7_BASE (U5500_GPIO4_BASE + 0x100)
112
113#define U5500_MBOX_BASE (U5500_MODEM_BASE + 0xFFD1000)
114#define U5500_MBOX0_PEER_START (U5500_MBOX_BASE + 0x40)
115#define U5500_MBOX0_PEER_END (U5500_MBOX_BASE + 0x5F)
116#define U5500_MBOX0_LOCAL_START (U5500_MBOX_BASE + 0x60)
117#define U5500_MBOX0_LOCAL_END (U5500_MBOX_BASE + 0x7F)
118#define U5500_MBOX1_PEER_START (U5500_MBOX_BASE + 0x80)
119#define U5500_MBOX1_PEER_END (U5500_MBOX_BASE + 0x9F)
120#define U5500_MBOX1_LOCAL_START (U5500_MBOX_BASE + 0xA0)
121#define U5500_MBOX1_LOCAL_END (U5500_MBOX_BASE + 0xBF)
122#define U5500_MBOX2_PEER_START (U5500_MBOX_BASE + 0x00)
123#define U5500_MBOX2_PEER_END (U5500_MBOX_BASE + 0x1F)
124#define U5500_MBOX2_LOCAL_START (U5500_MBOX_BASE + 0x20)
125#define U5500_MBOX2_LOCAL_END (U5500_MBOX_BASE + 0x3F)
126
127#define U5500_ACCCON_BASE_SEC (0xBFFF0000)
128#define U5500_ACCCON_BASE (0xBFFF1000)
129#define U5500_ACCCON_CPUVEC_RESET_ADDR_OFFSET (0x00000020)
130#define U5500_ACCCON_ACC_CPU_CTRL_OFFSET (0x000000BC)
131#define U5500_INTCON_MBOX1_INT_RESET_ADDR (0xBFFD31A4)
132
133#define U5500_ESRAM_BASE 0x40000000
134#define U5500_ESRAM_DMA_LCPA_OFFSET 0x10000
135#define U5500_DMA_LCPA_BASE (U5500_ESRAM_BASE + U5500_ESRAM_DMA_LCPA_OFFSET)
136
137#define U5500_MCDE_SIZE 0x1000
138#define U5500_DSI_LINK_SIZE 0x1000
139#define U5500_DSI_LINK_COUNT 0x2
140#define U5500_DSI_LINK1_BASE (U5500_MCDE_BASE + U5500_MCDE_SIZE)
141#define U5500_DSI_LINK2_BASE (U5500_DSI_LINK1_BASE + U5500_DSI_LINK_SIZE)
142
143#endif
diff --git a/arch/arm/mach-ux500/include/mach/debug-macro.S b/arch/arm/mach-ux500/include/mach/debug-macro.S
index 8d74d927d4e2..67035223334a 100644
--- a/arch/arm/mach-ux500/include/mach/debug-macro.S
+++ b/arch/arm/mach-ux500/include/mach/debug-macro.S
@@ -20,10 +20,6 @@
20 * built, so that there's some hint during the build that something is wrong. 20 * built, so that there's some hint during the build that something is wrong.
21 */ 21 */
22 22
23#ifdef CONFIG_UX500_SOC_DB5500
24#define __UX500_UART(n) U5500_UART##n##_BASE
25#endif
26
27#ifdef CONFIG_UX500_SOC_DB8500 23#ifdef CONFIG_UX500_SOC_DB8500
28#define __UX500_UART(n) U8500_UART##n##_BASE 24#define __UX500_UART(n) U8500_UART##n##_BASE
29#endif 25#endif
diff --git a/arch/arm/mach-ux500/include/mach/devices.h b/arch/arm/mach-ux500/include/mach/devices.h
index 5f6cb71fc62d..9b5eb69a0154 100644
--- a/arch/arm/mach-ux500/include/mach/devices.h
+++ b/arch/arm/mach-ux500/include/mach/devices.h
@@ -10,7 +10,6 @@
10struct platform_device; 10struct platform_device;
11struct amba_device; 11struct amba_device;
12 12
13extern struct platform_device u5500_gpio_devs[];
14extern struct platform_device u8500_gpio_devs[]; 13extern struct platform_device u8500_gpio_devs[];
15 14
16extern struct amba_device ux500_pl031_device; 15extern struct amba_device ux500_pl031_device;
diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h
index f84698936d36..cf6fac3d1eeb 100644
--- a/arch/arm/mach-ux500/include/mach/hardware.h
+++ b/arch/arm/mach-ux500/include/mach/hardware.h
@@ -28,7 +28,6 @@
28#define io_p2v(n) __io_address(n) 28#define io_p2v(n) __io_address(n)
29 29
30#include <mach/db8500-regs.h> 30#include <mach/db8500-regs.h>
31#include <mach/db5500-regs.h>
32 31
33#define MSP_TX_RX_REG_OFFSET 0 32#define MSP_TX_RX_REG_OFFSET 0
34 33
diff --git a/arch/arm/mach-ux500/include/mach/irqs-board-u5500.h b/arch/arm/mach-ux500/include/mach/irqs-board-u5500.h
deleted file mode 100644
index 29d972c7717b..000000000000
--- a/arch/arm/mach-ux500/include/mach/irqs-board-u5500.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * License terms: GNU General Public License (GPL) version 2
5 */
6
7#ifndef __MACH_IRQS_BOARD_U5500_H
8#define __MACH_IRQS_BOARD_U5500_H
9
10#define AB5500_NR_IRQS 5
11#define IRQ_AB5500_BASE IRQ_BOARD_START
12#define IRQ_AB5500_END (IRQ_AB5500_BASE + AB5500_NR_IRQS)
13
14#define U5500_IRQ_END IRQ_AB5500_END
15
16#if IRQ_BOARD_END < U5500_IRQ_END
17#undef IRQ_BOARD_END
18#define IRQ_BOARD_END U5500_IRQ_END
19#endif
20
21#endif
diff --git a/arch/arm/mach-ux500/include/mach/irqs-db5500.h b/arch/arm/mach-ux500/include/mach/irqs-db5500.h
deleted file mode 100644
index 77239776a6f2..000000000000
--- a/arch/arm/mach-ux500/include/mach/irqs-db5500.h
+++ /dev/null
@@ -1,113 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * Author: Rabin Vincent <rabin.vincent@stericsson.com>
5 * License terms: GNU General Public License (GPL) version 2
6 */
7
8#ifndef __MACH_IRQS_DB5500_H
9#define __MACH_IRQS_DB5500_H
10
11#define IRQ_DB5500_MTU0 (IRQ_SHPI_START + 4)
12#define IRQ_DB5500_SPI2 (IRQ_SHPI_START + 6)
13#define IRQ_DB5500_PMU0 (IRQ_SHPI_START + 7)
14#define IRQ_DB5500_SPI0 (IRQ_SHPI_START + 8)
15#define IRQ_DB5500_RTT (IRQ_SHPI_START + 9)
16#define IRQ_DB5500_PKA (IRQ_SHPI_START + 10)
17#define IRQ_DB5500_UART0 (IRQ_SHPI_START + 11)
18#define IRQ_DB5500_I2C3 (IRQ_SHPI_START + 12)
19#define IRQ_DB5500_L2CC (IRQ_SHPI_START + 13)
20#define IRQ_DB5500_MSP0 (IRQ_SHPI_START + 14)
21#define IRQ_DB5500_CRYP1 (IRQ_SHPI_START + 15)
22#define IRQ_DB5500_PMU1 (IRQ_SHPI_START + 16)
23#define IRQ_DB5500_MTU1 (IRQ_SHPI_START + 17)
24#define IRQ_DB5500_RTC (IRQ_SHPI_START + 18)
25#define IRQ_DB5500_UART1 (IRQ_SHPI_START + 19)
26#define IRQ_DB5500_USB_WAKEUP (IRQ_SHPI_START + 20)
27#define IRQ_DB5500_I2C0 (IRQ_SHPI_START + 21)
28#define IRQ_DB5500_I2C1 (IRQ_SHPI_START + 22)
29#define IRQ_DB5500_USBOTG (IRQ_SHPI_START + 23)
30#define IRQ_DB5500_DMA_SECURE (IRQ_SHPI_START + 24)
31#define IRQ_DB5500_DMA (IRQ_SHPI_START + 25)
32#define IRQ_DB5500_UART2 (IRQ_SHPI_START + 26)
33#define IRQ_DB5500_ICN_PMU1 (IRQ_SHPI_START + 27)
34#define IRQ_DB5500_ICN_PMU2 (IRQ_SHPI_START + 28)
35#define IRQ_DB5500_UART3 (IRQ_SHPI_START + 29)
36#define IRQ_DB5500_SPI3 (IRQ_SHPI_START + 30)
37#define IRQ_DB5500_SDMMC4 (IRQ_SHPI_START + 31)
38#define IRQ_DB5500_IRRC (IRQ_SHPI_START + 33)
39#define IRQ_DB5500_IRDA_FT (IRQ_SHPI_START + 34)
40#define IRQ_DB5500_IRDA_SD (IRQ_SHPI_START + 35)
41#define IRQ_DB5500_IRDA_FI (IRQ_SHPI_START + 36)
42#define IRQ_DB5500_IRDA_FD (IRQ_SHPI_START + 37)
43#define IRQ_DB5500_FSMC_CODEREADY (IRQ_SHPI_START + 38)
44#define IRQ_DB5500_FSMC_NANDWAIT (IRQ_SHPI_START + 39)
45#define IRQ_DB5500_AB5500 (IRQ_SHPI_START + 40)
46#define IRQ_DB5500_SDMMC2 (IRQ_SHPI_START + 41)
47#define IRQ_DB5500_SIA (IRQ_SHPI_START + 42)
48#define IRQ_DB5500_SIA2 (IRQ_SHPI_START + 43)
49#define IRQ_DB5500_HVA (IRQ_SHPI_START + 44)
50#define IRQ_DB5500_HVA2 (IRQ_SHPI_START + 45)
51#define IRQ_DB5500_PRCMU0 (IRQ_SHPI_START + 46)
52#define IRQ_DB5500_PRCMU1 (IRQ_SHPI_START + 47)
53#define IRQ_DB5500_DISP (IRQ_SHPI_START + 48)
54#define IRQ_DB5500_SDMMC1 (IRQ_SHPI_START + 50)
55#define IRQ_DB5500_MSP1 (IRQ_SHPI_START + 52)
56#define IRQ_DB5500_KBD (IRQ_SHPI_START + 53)
57#define IRQ_DB5500_I2C2 (IRQ_SHPI_START + 55)
58#define IRQ_DB5500_B2R2 (IRQ_SHPI_START + 56)
59#define IRQ_DB5500_CRYP0 (IRQ_SHPI_START + 57)
60#define IRQ_DB5500_SDMMC3 (IRQ_SHPI_START + 59)
61#define IRQ_DB5500_SDMMC0 (IRQ_SHPI_START + 60)
62#define IRQ_DB5500_HSEM (IRQ_SHPI_START + 61)
63#define IRQ_DB5500_SBAG (IRQ_SHPI_START + 63)
64#define IRQ_DB5500_MODEM (IRQ_SHPI_START + 65)
65#define IRQ_DB5500_SPI1 (IRQ_SHPI_START + 96)
66#define IRQ_DB5500_MSP2 (IRQ_SHPI_START + 98)
67#define IRQ_DB5500_SRPTIMER (IRQ_SHPI_START + 101)
68#define IRQ_DB5500_CTI0 (IRQ_SHPI_START + 108)
69#define IRQ_DB5500_CTI1 (IRQ_SHPI_START + 109)
70#define IRQ_DB5500_ICN_ERR (IRQ_SHPI_START + 110)
71#define IRQ_DB5500_MALI_PPMMU (IRQ_SHPI_START + 112)
72#define IRQ_DB5500_MALI_PP (IRQ_SHPI_START + 113)
73#define IRQ_DB5500_MALI_GPMMU (IRQ_SHPI_START + 114)
74#define IRQ_DB5500_MALI_GP (IRQ_SHPI_START + 115)
75#define IRQ_DB5500_MALI (IRQ_SHPI_START + 116)
76#define IRQ_DB5500_PRCMU_SEM (IRQ_SHPI_START + 118)
77#define IRQ_DB5500_GPIO0 (IRQ_SHPI_START + 119)
78#define IRQ_DB5500_GPIO1 (IRQ_SHPI_START + 120)
79#define IRQ_DB5500_GPIO2 (IRQ_SHPI_START + 121)
80#define IRQ_DB5500_GPIO3 (IRQ_SHPI_START + 122)
81#define IRQ_DB5500_GPIO4 (IRQ_SHPI_START + 123)
82#define IRQ_DB5500_GPIO5 (IRQ_SHPI_START + 124)
83#define IRQ_DB5500_GPIO6 (IRQ_SHPI_START + 125)
84#define IRQ_DB5500_GPIO7 (IRQ_SHPI_START + 126)
85
86#ifdef CONFIG_UX500_SOC_DB5500
87
88/*
89 * After the GPIO ones we reserve a range of IRQ:s in which virtual
90 * IRQ:s representing modem IRQ:s can be allocated
91 */
92#define IRQ_MODEM_EVENTS_BASE IRQ_SOC_START
93#define IRQ_MODEM_EVENTS_NBR 72
94#define IRQ_MODEM_EVENTS_END (IRQ_MODEM_EVENTS_BASE + IRQ_MODEM_EVENTS_NBR)
95
96/* List of virtual IRQ:s that are allocated from the range above */
97#define MBOX_PAIR0_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 43)
98#define MBOX_PAIR1_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 45)
99#define MBOX_PAIR2_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 41)
100
101/*
102 * We may have several SoCs, but only one will run at a
103 * time, so the one with most IRQs will bump this ahead,
104 * but the IRQ_SOC_START remains the same for either SoC.
105 */
106#if IRQ_SOC_END < IRQ_MODEM_EVENTS_END
107#undef IRQ_SOC_END
108#define IRQ_SOC_END IRQ_MODEM_EVENTS_END
109#endif
110
111#endif /* CONFIG_UX500_SOC_DB5500 */
112
113#endif
diff --git a/arch/arm/mach-ux500/include/mach/irqs.h b/arch/arm/mach-ux500/include/mach/irqs.h
index c23a6b5f0c4e..d06dcf6208fa 100644
--- a/arch/arm/mach-ux500/include/mach/irqs.h
+++ b/arch/arm/mach-ux500/include/mach/irqs.h
@@ -36,7 +36,6 @@
36/* This will be overridden by SoC-specific irq headers */ 36/* This will be overridden by SoC-specific irq headers */
37#define IRQ_SOC_END IRQ_SOC_START 37#define IRQ_SOC_END IRQ_SOC_START
38 38
39#include <mach/irqs-db5500.h>
40#include <mach/irqs-db8500.h> 39#include <mach/irqs-db8500.h>
41 40
42#define IRQ_BOARD_START IRQ_SOC_END 41#define IRQ_BOARD_START IRQ_SOC_END
@@ -47,10 +46,6 @@
47#include <mach/irqs-board-mop500.h> 46#include <mach/irqs-board-mop500.h>
48#endif 47#endif
49 48
50#ifdef CONFIG_MACH_U5500
51#include <mach/irqs-board-u5500.h>
52#endif
53
54#define NR_IRQS IRQ_BOARD_END 49#define NR_IRQS IRQ_BOARD_END
55 50
56#endif /* ASM_ARCH_IRQS_H */ 51#endif /* ASM_ARCH_IRQS_H */
diff --git a/arch/arm/mach-ux500/include/mach/mbox-db5500.h b/arch/arm/mach-ux500/include/mach/mbox-db5500.h
deleted file mode 100644
index 7f9da4d2fbda..000000000000
--- a/arch/arm/mach-ux500/include/mach/mbox-db5500.h
+++ /dev/null
@@ -1,88 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 * Author: Stefan Nilsson <stefan.xk.nilsson@stericsson.com> for ST-Ericsson.
4 * Author: Martin Persson <martin.persson@stericsson.com> for ST-Ericsson.
5 * License terms: GNU General Public License (GPL), version 2.
6 */
7
8#ifndef __INC_STE_MBOX_H
9#define __INC_STE_MBOX_H
10
11#define MBOX_BUF_SIZE 16
12#define MBOX_NAME_SIZE 8
13
14/**
15 * mbox_recv_cb_t - Definition of the mailbox callback.
16 * @mbox_msg: The mailbox message.
17 * @priv: The clients private data as specified in the call to mbox_setup.
18 *
19 * This function will be called upon reception of new mailbox messages.
20 */
21typedef void mbox_recv_cb_t (u32 mbox_msg, void *priv);
22
23/**
24 * struct mbox - Mailbox instance struct
25 * @list: Linked list head.
26 * @pdev: Pointer to device struct.
27 * @cb: Callback function. Will be called
28 * when new data is received.
29 * @client_data: Clients private data. Will be sent back
30 * in the callback function.
31 * @virtbase_peer: Virtual address for outgoing mailbox.
32 * @virtbase_local: Virtual address for incoming mailbox.
33 * @buffer: Then internal queue for outgoing messages.
34 * @name: Name of this mailbox.
35 * @buffer_available: Completion variable to achieve "blocking send".
36 * This variable will be signaled when there is
37 * internal buffer space available.
38 * @client_blocked: To keep track if any client is currently
39 * blocked.
40 * @lock: Spinlock to protect this mailbox instance.
41 * @write_index: Index in internal buffer to write to.
42 * @read_index: Index in internal buffer to read from.
43 * @allocated: Indicates whether this particular mailbox
44 * id has been allocated by someone.
45 */
46struct mbox {
47 struct list_head list;
48 struct platform_device *pdev;
49 mbox_recv_cb_t *cb;
50 void *client_data;
51 void __iomem *virtbase_peer;
52 void __iomem *virtbase_local;
53 u32 buffer[MBOX_BUF_SIZE];
54 char name[MBOX_NAME_SIZE];
55 struct completion buffer_available;
56 u8 client_blocked;
57 spinlock_t lock;
58 u8 write_index;
59 u8 read_index;
60 bool allocated;
61};
62
63/**
64 * mbox_setup - Set up a mailbox and return its instance.
65 * @mbox_id: The ID number of the mailbox. 0 or 1 for modem CPU,
66 * 2 for modem DSP.
67 * @mbox_cb: Pointer to the callback function to be called when a new message
68 * is received.
69 * @priv: Client user data which will be returned in the callback.
70 *
71 * Returns a mailbox instance to be specified in subsequent calls to mbox_send.
72 */
73struct mbox *mbox_setup(u8 mbox_id, mbox_recv_cb_t *mbox_cb, void *priv);
74
75/**
76 * mbox_send - Send a mailbox message.
77 * @mbox: Mailbox instance (returned by mbox_setup)
78 * @mbox_msg: The mailbox message to send.
79 * @block: Specifies whether this call will block until send is possible,
80 * or return an error if the mailbox buffer is full.
81 *
82 * Returns 0 on success or a negative error code on error. -ENOMEM indicates
83 * that the internal buffer is full and you have to try again later (or
84 * specify "block" in order to block until send is possible).
85 */
86int mbox_send(struct mbox *mbox, u32 mbox_msg, bool block);
87
88#endif /*INC_STE_MBOX_H*/
diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/include/mach/setup.h
index 3dc00ffa7bfa..4e369f1645ec 100644
--- a/arch/arm/mach-ux500/include/mach/setup.h
+++ b/arch/arm/mach-ux500/include/mach/setup.h
@@ -15,18 +15,12 @@
15#include <linux/init.h> 15#include <linux/init.h>
16 16
17void __init ux500_map_io(void); 17void __init ux500_map_io(void);
18extern void __init u5500_map_io(void);
19extern void __init u8500_map_io(void); 18extern void __init u8500_map_io(void);
20 19
21extern struct device * __init u5500_init_devices(void);
22extern struct device * __init u8500_init_devices(void); 20extern struct device * __init u8500_init_devices(void);
23 21
24extern void __init ux500_init_irq(void); 22extern void __init ux500_init_irq(void);
25 23
26extern void __init u5500_sdi_init(struct device *parent);
27
28extern void __init db5500_dma_init(struct device *parent);
29
30extern struct device *ux500_soc_device_init(const char *soc_id); 24extern struct device *ux500_soc_device_init(const char *soc_id);
31 25
32struct amba_device; 26struct amba_device;
diff --git a/arch/arm/mach-ux500/include/mach/uncompress.h b/arch/arm/mach-ux500/include/mach/uncompress.h
index 6fb3c4b0105d..34775baadaea 100644
--- a/arch/arm/mach-ux500/include/mach/uncompress.h
+++ b/arch/arm/mach-ux500/include/mach/uncompress.h
@@ -50,11 +50,8 @@ static void flush(void)
50 50
51static inline void arch_decomp_setup(void) 51static inline void arch_decomp_setup(void)
52{ 52{
53 /* Check in run time if we run on an U8500 or U5500 */ 53 /* Use machine_is_foo() macro if you need to switch base someday */
54 if (machine_is_u5500()) 54 ux500_uart_base = U8500_UART2_BASE;
55 ux500_uart_base = U5500_UART0_BASE;
56 else
57 ux500_uart_base = U8500_UART2_BASE;
58} 55}
59 56
60#define arch_decomp_wdog() /* nothing to do here */ 57#define arch_decomp_wdog() /* nothing to do here */
diff --git a/arch/arm/mach-ux500/mbox-db5500.c b/arch/arm/mach-ux500/mbox-db5500.c
deleted file mode 100644
index 0127490218cd..000000000000
--- a/arch/arm/mach-ux500/mbox-db5500.c
+++ /dev/null
@@ -1,565 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 * Author: Stefan Nilsson <stefan.xk.nilsson@stericsson.com> for ST-Ericsson.
4 * Author: Martin Persson <martin.persson@stericsson.com> for ST-Ericsson.
5 * License terms: GNU General Public License (GPL), version 2.
6 */
7
8/*
9 * Mailbox nomenclature:
10 *
11 * APE MODEM
12 * mbox pairX
13 * ..........................
14 * . .
15 * . peer .
16 * . send ---- .
17 * . --> | | .
18 * . | | .
19 * . ---- .
20 * . .
21 * . local .
22 * . rec ---- .
23 * . | | <-- .
24 * . | | .
25 * . ---- .
26 * .........................
27 */
28
29#include <linux/init.h>
30#include <linux/module.h>
31#include <linux/device.h>
32#include <linux/interrupt.h>
33#include <linux/spinlock.h>
34#include <linux/errno.h>
35#include <linux/io.h>
36#include <linux/irq.h>
37#include <linux/platform_device.h>
38#include <linux/debugfs.h>
39#include <linux/seq_file.h>
40#include <linux/completion.h>
41#include <mach/mbox-db5500.h>
42
43#define MBOX_NAME "mbox"
44
45#define MBOX_FIFO_DATA 0x000
46#define MBOX_FIFO_ADD 0x004
47#define MBOX_FIFO_REMOVE 0x008
48#define MBOX_FIFO_THRES_FREE 0x00C
49#define MBOX_FIFO_THRES_OCCUP 0x010
50#define MBOX_FIFO_STATUS 0x014
51
52#define MBOX_DISABLE_IRQ 0x4
53#define MBOX_ENABLE_IRQ 0x0
54#define MBOX_LATCH 1
55
56/* Global list of all mailboxes */
57static struct list_head mboxs = LIST_HEAD_INIT(mboxs);
58
59static struct mbox *get_mbox_with_id(u8 id)
60{
61 u8 i;
62 struct list_head *pos = &mboxs;
63 for (i = 0; i <= id; i++)
64 pos = pos->next;
65
66 return (struct mbox *) list_entry(pos, struct mbox, list);
67}
68
69int mbox_send(struct mbox *mbox, u32 mbox_msg, bool block)
70{
71 int res = 0;
72
73 spin_lock(&mbox->lock);
74
75 dev_dbg(&(mbox->pdev->dev),
76 "About to buffer 0x%X to mailbox 0x%X."
77 " ri = %d, wi = %d\n",
78 mbox_msg, (u32)mbox, mbox->read_index,
79 mbox->write_index);
80
81 /* Check if write buffer is full */
82 while (((mbox->write_index + 1) % MBOX_BUF_SIZE) == mbox->read_index) {
83 if (!block) {
84 dev_dbg(&(mbox->pdev->dev),
85 "Buffer full in non-blocking call! "
86 "Returning -ENOMEM!\n");
87 res = -ENOMEM;
88 goto exit;
89 }
90 spin_unlock(&mbox->lock);
91 dev_dbg(&(mbox->pdev->dev),
92 "Buffer full in blocking call! Sleeping...\n");
93 mbox->client_blocked = 1;
94 wait_for_completion(&mbox->buffer_available);
95 dev_dbg(&(mbox->pdev->dev),
96 "Blocking send was woken up! Trying again...\n");
97 spin_lock(&mbox->lock);
98 }
99
100 mbox->buffer[mbox->write_index] = mbox_msg;
101 mbox->write_index = (mbox->write_index + 1) % MBOX_BUF_SIZE;
102
103 /*
104 * Indicate that we want an IRQ as soon as there is a slot
105 * in the FIFO
106 */
107 writel(MBOX_ENABLE_IRQ, mbox->virtbase_peer + MBOX_FIFO_THRES_FREE);
108
109exit:
110 spin_unlock(&mbox->lock);
111 return res;
112}
113EXPORT_SYMBOL(mbox_send);
114
115#if defined(CONFIG_DEBUG_FS)
116/*
117 * Expected input: <value> <nbr sends>
118 * Example: "echo 0xdeadbeef 4 > mbox-node" sends 0xdeadbeef 4 times
119 */
120static ssize_t mbox_write_fifo(struct device *dev,
121 struct device_attribute *attr,
122 const char *buf,
123 size_t count)
124{
125 unsigned long mbox_mess;
126 unsigned long nbr_sends;
127 unsigned long i;
128 char int_buf[16];
129 char *token;
130 char *val;
131
132 struct mbox *mbox = (struct mbox *) dev->platform_data;
133
134 strncpy((char *) &int_buf, buf, sizeof(int_buf));
135 token = (char *) &int_buf;
136
137 /* Parse message */
138 val = strsep(&token, " ");
139 if ((val == NULL) || (strict_strtoul(val, 16, &mbox_mess) != 0))
140 mbox_mess = 0xDEADBEEF;
141
142 val = strsep(&token, " ");
143 if ((val == NULL) || (strict_strtoul(val, 10, &nbr_sends) != 0))
144 nbr_sends = 1;
145
146 dev_dbg(dev, "Will write 0x%lX %ld times using data struct at 0x%X\n",
147 mbox_mess, nbr_sends, (u32) mbox);
148
149 for (i = 0; i < nbr_sends; i++)
150 mbox_send(mbox, mbox_mess, true);
151
152 return count;
153}
154
155static ssize_t mbox_read_fifo(struct device *dev,
156 struct device_attribute *attr,
157 char *buf)
158{
159 int mbox_value;
160 struct mbox *mbox = (struct mbox *) dev->platform_data;
161
162 if ((readl(mbox->virtbase_local + MBOX_FIFO_STATUS) & 0x7) <= 0)
163 return sprintf(buf, "Mailbox is empty\n");
164
165 mbox_value = readl(mbox->virtbase_local + MBOX_FIFO_DATA);
166 writel(MBOX_LATCH, (mbox->virtbase_local + MBOX_FIFO_REMOVE));
167
168 return sprintf(buf, "0x%X\n", mbox_value);
169}
170
171static DEVICE_ATTR(fifo, S_IWUSR | S_IRUGO, mbox_read_fifo, mbox_write_fifo);
172
173static int mbox_show(struct seq_file *s, void *data)
174{
175 struct list_head *pos;
176 u8 mbox_index = 0;
177
178 list_for_each(pos, &mboxs) {
179 struct mbox *m =
180 (struct mbox *) list_entry(pos, struct mbox, list);
181 if (m == NULL) {
182 seq_printf(s,
183 "Unable to retrieve mailbox %d\n",
184 mbox_index);
185 continue;
186 }
187
188 spin_lock(&m->lock);
189 if ((m->virtbase_peer == NULL) || (m->virtbase_local == NULL)) {
190 seq_printf(s, "MAILBOX %d not setup or corrupt\n",
191 mbox_index);
192 spin_unlock(&m->lock);
193 continue;
194 }
195
196 seq_printf(s,
197 "===========================\n"
198 " MAILBOX %d\n"
199 " PEER MAILBOX DUMP\n"
200 "---------------------------\n"
201 "FIFO: 0x%X (%d)\n"
202 "Free Threshold: 0x%.2X (%d)\n"
203 "Occupied Threshold: 0x%.2X (%d)\n"
204 "Status: 0x%.2X (%d)\n"
205 " Free spaces (ot): %d (%d)\n"
206 " Occup spaces (ot): %d (%d)\n"
207 "===========================\n"
208 " LOCAL MAILBOX DUMP\n"
209 "---------------------------\n"
210 "FIFO: 0x%.X (%d)\n"
211 "Free Threshold: 0x%.2X (%d)\n"
212 "Occupied Threshold: 0x%.2X (%d)\n"
213 "Status: 0x%.2X (%d)\n"
214 " Free spaces (ot): %d (%d)\n"
215 " Occup spaces (ot): %d (%d)\n"
216 "===========================\n"
217 "write_index: %d\n"
218 "read_index : %d\n"
219 "===========================\n"
220 "\n",
221 mbox_index,
222 readl(m->virtbase_peer + MBOX_FIFO_DATA),
223 readl(m->virtbase_peer + MBOX_FIFO_DATA),
224 readl(m->virtbase_peer + MBOX_FIFO_THRES_FREE),
225 readl(m->virtbase_peer + MBOX_FIFO_THRES_FREE),
226 readl(m->virtbase_peer + MBOX_FIFO_THRES_OCCUP),
227 readl(m->virtbase_peer + MBOX_FIFO_THRES_OCCUP),
228 readl(m->virtbase_peer + MBOX_FIFO_STATUS),
229 readl(m->virtbase_peer + MBOX_FIFO_STATUS),
230 (readl(m->virtbase_peer + MBOX_FIFO_STATUS) >> 4) & 0x7,
231 (readl(m->virtbase_peer + MBOX_FIFO_STATUS) >> 7) & 0x1,
232 (readl(m->virtbase_peer + MBOX_FIFO_STATUS) >> 0) & 0x7,
233 (readl(m->virtbase_peer + MBOX_FIFO_STATUS) >> 3) & 0x1,
234 readl(m->virtbase_local + MBOX_FIFO_DATA),
235 readl(m->virtbase_local + MBOX_FIFO_DATA),
236 readl(m->virtbase_local + MBOX_FIFO_THRES_FREE),
237 readl(m->virtbase_local + MBOX_FIFO_THRES_FREE),
238 readl(m->virtbase_local + MBOX_FIFO_THRES_OCCUP),
239 readl(m->virtbase_local + MBOX_FIFO_THRES_OCCUP),
240 readl(m->virtbase_local + MBOX_FIFO_STATUS),
241 readl(m->virtbase_local + MBOX_FIFO_STATUS),
242 (readl(m->virtbase_local + MBOX_FIFO_STATUS) >> 4) & 0x7,
243 (readl(m->virtbase_local + MBOX_FIFO_STATUS) >> 7) & 0x1,
244 (readl(m->virtbase_local + MBOX_FIFO_STATUS) >> 0) & 0x7,
245 (readl(m->virtbase_local + MBOX_FIFO_STATUS) >> 3) & 0x1,
246 m->write_index, m->read_index);
247 mbox_index++;
248 spin_unlock(&m->lock);
249 }
250
251 return 0;
252}
253
254static int mbox_open(struct inode *inode, struct file *file)
255{
256 return single_open(file, mbox_show, NULL);
257}
258
259static const struct file_operations mbox_operations = {
260 .owner = THIS_MODULE,
261 .open = mbox_open,
262 .read = seq_read,
263 .llseek = seq_lseek,
264 .release = single_release,
265};
266#endif
267
268static irqreturn_t mbox_irq(int irq, void *arg)
269{
270 u32 mbox_value;
271 int nbr_occup;
272 int nbr_free;
273 struct mbox *mbox = (struct mbox *) arg;
274
275 spin_lock(&mbox->lock);
276
277 dev_dbg(&(mbox->pdev->dev),
278 "mbox IRQ [%d] received. ri = %d, wi = %d\n",
279 irq, mbox->read_index, mbox->write_index);
280
281 /*
282 * Check if we have any outgoing messages, and if there is space for
283 * them in the FIFO.
284 */
285 if (mbox->read_index != mbox->write_index) {
286 /*
287 * Check by reading FREE for LOCAL since that indicates
288 * OCCUP for PEER
289 */
290 nbr_free = (readl(mbox->virtbase_local + MBOX_FIFO_STATUS)
291 >> 4) & 0x7;
292 dev_dbg(&(mbox->pdev->dev),
293 "Status indicates %d empty spaces in the FIFO!\n",
294 nbr_free);
295
296 while ((nbr_free > 0) &&
297 (mbox->read_index != mbox->write_index)) {
298 /* Write the message and latch it into the FIFO */
299 writel(mbox->buffer[mbox->read_index],
300 (mbox->virtbase_peer + MBOX_FIFO_DATA));
301 writel(MBOX_LATCH,
302 (mbox->virtbase_peer + MBOX_FIFO_ADD));
303 dev_dbg(&(mbox->pdev->dev),
304 "Wrote message 0x%X to addr 0x%X\n",
305 mbox->buffer[mbox->read_index],
306 (u32) (mbox->virtbase_peer + MBOX_FIFO_DATA));
307
308 nbr_free--;
309 mbox->read_index =
310 (mbox->read_index + 1) % MBOX_BUF_SIZE;
311 }
312
313 /*
314 * Check if we still want IRQ:s when there is free
315 * space to send
316 */
317 if (mbox->read_index != mbox->write_index) {
318 dev_dbg(&(mbox->pdev->dev),
319 "Still have messages to send, but FIFO full. "
320 "Request IRQ again!\n");
321 writel(MBOX_ENABLE_IRQ,
322 mbox->virtbase_peer + MBOX_FIFO_THRES_FREE);
323 } else {
324 dev_dbg(&(mbox->pdev->dev),
325 "No more messages to send. "
326 "Do not request IRQ again!\n");
327 writel(MBOX_DISABLE_IRQ,
328 mbox->virtbase_peer + MBOX_FIFO_THRES_FREE);
329 }
330
331 /*
332 * Check if we can signal any blocked clients that it is OK to
333 * start buffering again
334 */
335 if (mbox->client_blocked &&
336 (((mbox->write_index + 1) % MBOX_BUF_SIZE)
337 != mbox->read_index)) {
338 dev_dbg(&(mbox->pdev->dev),
339 "Waking up blocked client\n");
340 complete(&mbox->buffer_available);
341 mbox->client_blocked = 0;
342 }
343 }
344
345 /* Check if we have any incoming messages */
346 nbr_occup = readl(mbox->virtbase_local + MBOX_FIFO_STATUS) & 0x7;
347 if (nbr_occup == 0)
348 goto exit;
349
350 if (mbox->cb == NULL) {
351 dev_dbg(&(mbox->pdev->dev), "No receive callback registered, "
352 "leaving %d incoming messages in fifo!\n", nbr_occup);
353 goto exit;
354 }
355
356 /* Read and acknowledge the message */
357 mbox_value = readl(mbox->virtbase_local + MBOX_FIFO_DATA);
358 writel(MBOX_LATCH, (mbox->virtbase_local + MBOX_FIFO_REMOVE));
359
360 /* Notify consumer of new mailbox message */
361 dev_dbg(&(mbox->pdev->dev), "Calling callback for message 0x%X!\n",
362 mbox_value);
363 mbox->cb(mbox_value, mbox->client_data);
364
365exit:
366 dev_dbg(&(mbox->pdev->dev), "Exit mbox IRQ. ri = %d, wi = %d\n",
367 mbox->read_index, mbox->write_index);
368 spin_unlock(&mbox->lock);
369
370 return IRQ_HANDLED;
371}
372
373/* Setup is executed once for each mbox pair */
374struct mbox *mbox_setup(u8 mbox_id, mbox_recv_cb_t *mbox_cb, void *priv)
375{
376 struct resource *resource;
377 int irq;
378 int res;
379 struct mbox *mbox;
380
381 mbox = get_mbox_with_id(mbox_id);
382 if (mbox == NULL) {
383 dev_err(&(mbox->pdev->dev), "Incorrect mailbox id: %d!\n",
384 mbox_id);
385 goto exit;
386 }
387
388 /*
389 * Check if mailbox has been allocated to someone else,
390 * otherwise allocate it
391 */
392 if (mbox->allocated) {
393 dev_err(&(mbox->pdev->dev), "Mailbox number %d is busy!\n",
394 mbox_id);
395 mbox = NULL;
396 goto exit;
397 }
398 mbox->allocated = true;
399
400 dev_dbg(&(mbox->pdev->dev), "Initiating mailbox number %d: 0x%X...\n",
401 mbox_id, (u32)mbox);
402
403 mbox->client_data = priv;
404 mbox->cb = mbox_cb;
405
406 /* Get addr for peer mailbox and ioremap it */
407 resource = platform_get_resource_byname(mbox->pdev,
408 IORESOURCE_MEM,
409 "mbox_peer");
410 if (resource == NULL) {
411 dev_err(&(mbox->pdev->dev),
412 "Unable to retrieve mbox peer resource\n");
413 mbox = NULL;
414 goto exit;
415 }
416 dev_dbg(&(mbox->pdev->dev),
417 "Resource name: %s start: 0x%X, end: 0x%X\n",
418 resource->name, resource->start, resource->end);
419 mbox->virtbase_peer = ioremap(resource->start, resource_size(resource));
420 if (!mbox->virtbase_peer) {
421 dev_err(&(mbox->pdev->dev), "Unable to ioremap peer mbox\n");
422 mbox = NULL;
423 goto exit;
424 }
425 dev_dbg(&(mbox->pdev->dev),
426 "ioremapped peer physical: (0x%X-0x%X) to virtual: 0x%X\n",
427 resource->start, resource->end, (u32) mbox->virtbase_peer);
428
429 /* Get addr for local mailbox and ioremap it */
430 resource = platform_get_resource_byname(mbox->pdev,
431 IORESOURCE_MEM,
432 "mbox_local");
433 if (resource == NULL) {
434 dev_err(&(mbox->pdev->dev),
435 "Unable to retrieve mbox local resource\n");
436 mbox = NULL;
437 goto exit;
438 }
439 dev_dbg(&(mbox->pdev->dev),
440 "Resource name: %s start: 0x%X, end: 0x%X\n",
441 resource->name, resource->start, resource->end);
442 mbox->virtbase_local = ioremap(resource->start, resource_size(resource));
443 if (!mbox->virtbase_local) {
444 dev_err(&(mbox->pdev->dev), "Unable to ioremap local mbox\n");
445 mbox = NULL;
446 goto exit;
447 }
448 dev_dbg(&(mbox->pdev->dev),
449 "ioremapped local physical: (0x%X-0x%X) to virtual: 0x%X\n",
450 resource->start, resource->end, (u32) mbox->virtbase_peer);
451
452 init_completion(&mbox->buffer_available);
453 mbox->client_blocked = 0;
454
455 /* Get IRQ for mailbox and allocate it */
456 irq = platform_get_irq_byname(mbox->pdev, "mbox_irq");
457 if (irq < 0) {
458 dev_err(&(mbox->pdev->dev),
459 "Unable to retrieve mbox irq resource\n");
460 mbox = NULL;
461 goto exit;
462 }
463
464 dev_dbg(&(mbox->pdev->dev), "Allocating irq %d...\n", irq);
465 res = request_irq(irq, mbox_irq, 0, mbox->name, (void *) mbox);
466 if (res < 0) {
467 dev_err(&(mbox->pdev->dev),
468 "Unable to allocate mbox irq %d\n", irq);
469 mbox = NULL;
470 goto exit;
471 }
472
473 /* Set up mailbox to not launch IRQ on free space in mailbox */
474 writel(MBOX_DISABLE_IRQ, mbox->virtbase_peer + MBOX_FIFO_THRES_FREE);
475
476 /*
477 * Set up mailbox to launch IRQ on new message if we have
478 * a callback set. If not, do not raise IRQ, but keep message
479 * in FIFO for manual retrieval
480 */
481 if (mbox_cb != NULL)
482 writel(MBOX_ENABLE_IRQ,
483 mbox->virtbase_local + MBOX_FIFO_THRES_OCCUP);
484 else
485 writel(MBOX_DISABLE_IRQ,
486 mbox->virtbase_local + MBOX_FIFO_THRES_OCCUP);
487
488#if defined(CONFIG_DEBUG_FS)
489 res = device_create_file(&(mbox->pdev->dev), &dev_attr_fifo);
490 if (res != 0)
491 dev_warn(&(mbox->pdev->dev),
492 "Unable to create mbox sysfs entry");
493
494 (void) debugfs_create_file("mbox", S_IFREG | S_IRUGO, NULL,
495 NULL, &mbox_operations);
496#endif
497
498 dev_info(&(mbox->pdev->dev),
499 "Mailbox driver with index %d initiated!\n", mbox_id);
500
501exit:
502 return mbox;
503}
504EXPORT_SYMBOL(mbox_setup);
505
506
507int __init mbox_probe(struct platform_device *pdev)
508{
509 struct mbox local_mbox;
510 struct mbox *mbox;
511 int res = 0;
512 dev_dbg(&(pdev->dev), "Probing mailbox (pdev = 0x%X)...\n", (u32) pdev);
513
514 memset(&local_mbox, 0x0, sizeof(struct mbox));
515
516 /* Associate our mbox data with the platform device */
517 res = platform_device_add_data(pdev,
518 (void *) &local_mbox,
519 sizeof(struct mbox));
520 if (res != 0) {
521 dev_err(&(pdev->dev),
522 "Unable to allocate driver platform data!\n");
523 goto exit;
524 }
525
526 mbox = (struct mbox *) pdev->dev.platform_data;
527 mbox->pdev = pdev;
528 mbox->write_index = 0;
529 mbox->read_index = 0;
530
531 INIT_LIST_HEAD(&(mbox->list));
532 list_add_tail(&(mbox->list), &mboxs);
533
534 sprintf(mbox->name, "%s", MBOX_NAME);
535 spin_lock_init(&mbox->lock);
536
537 dev_info(&(pdev->dev), "Mailbox driver loaded\n");
538
539exit:
540 return res;
541}
542
543static struct platform_driver mbox_driver = {
544 .driver = {
545 .name = MBOX_NAME,
546 .owner = THIS_MODULE,
547 },
548};
549
550static int __init mbox_init(void)
551{
552 return platform_driver_probe(&mbox_driver, mbox_probe);
553}
554
555module_init(mbox_init);
556
557void __exit mbox_exit(void)
558{
559 platform_driver_unregister(&mbox_driver);
560}
561
562module_exit(mbox_exit);
563
564MODULE_LICENSE("GPL");
565MODULE_DESCRIPTION("MBOX driver");
diff --git a/arch/arm/mach-ux500/modem-irq-db5500.c b/arch/arm/mach-ux500/modem-irq-db5500.c
deleted file mode 100644
index 6b86416c94c9..000000000000
--- a/arch/arm/mach-ux500/modem-irq-db5500.c
+++ /dev/null
@@ -1,143 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 * Author: Stefan Nilsson <stefan.xk.nilsson@stericsson.com> for ST-Ericsson.
4 * Author: Martin Persson <martin.persson@stericsson.com> for ST-Ericsson.
5 * License terms: GNU General Public License (GPL), version 2.
6 */
7
8#include <linux/module.h>
9#include <linux/kernel.h>
10#include <linux/irq.h>
11#include <linux/interrupt.h>
12#include <linux/io.h>
13#include <linux/slab.h>
14
15#include <mach/id.h>
16
17#define MODEM_INTCON_BASE_ADDR 0xBFFD3000
18#define MODEM_INTCON_SIZE 0xFFF
19
20#define DEST_IRQ41_OFFSET 0x2A4
21#define DEST_IRQ43_OFFSET 0x2AC
22#define DEST_IRQ45_OFFSET 0x2B4
23
24#define PRIO_IRQ41_OFFSET 0x6A4
25#define PRIO_IRQ43_OFFSET 0x6AC
26#define PRIO_IRQ45_OFFSET 0x6B4
27
28#define ALLOW_IRQ_OFFSET 0x104
29
30#define MODEM_INTCON_CPU_NBR 0x1
31#define MODEM_INTCON_PRIO_HIGH 0x0
32
33#define MODEM_INTCON_ALLOW_IRQ41 0x0200
34#define MODEM_INTCON_ALLOW_IRQ43 0x0800
35#define MODEM_INTCON_ALLOW_IRQ45 0x2000
36
37#define MODEM_IRQ_REG_OFFSET 0x4
38
39struct modem_irq {
40 void __iomem *modem_intcon_base;
41};
42
43
44static void setup_modem_intcon(void __iomem *modem_intcon_base)
45{
46 /* IC_DESTINATION_BASE_ARRAY - Which CPU to receive the IRQ */
47 writel(MODEM_INTCON_CPU_NBR, modem_intcon_base + DEST_IRQ41_OFFSET);
48 writel(MODEM_INTCON_CPU_NBR, modem_intcon_base + DEST_IRQ43_OFFSET);
49 writel(MODEM_INTCON_CPU_NBR, modem_intcon_base + DEST_IRQ45_OFFSET);
50
51 /* IC_PRIORITY_BASE_ARRAY - IRQ priority in modem IRQ controller */
52 writel(MODEM_INTCON_PRIO_HIGH, modem_intcon_base + PRIO_IRQ41_OFFSET);
53 writel(MODEM_INTCON_PRIO_HIGH, modem_intcon_base + PRIO_IRQ43_OFFSET);
54 writel(MODEM_INTCON_PRIO_HIGH, modem_intcon_base + PRIO_IRQ45_OFFSET);
55
56 /* IC_ALLOW_ARRAY - IRQ enable */
57 writel(MODEM_INTCON_ALLOW_IRQ41 |
58 MODEM_INTCON_ALLOW_IRQ43 |
59 MODEM_INTCON_ALLOW_IRQ45,
60 modem_intcon_base + ALLOW_IRQ_OFFSET);
61}
62
63static irqreturn_t modem_cpu_irq_handler(int irq, void *data)
64{
65 int real_irq;
66 int virt_irq;
67 struct modem_irq *mi = (struct modem_irq *)data;
68
69 /* Read modem side IRQ number from modem IRQ controller */
70 real_irq = readl(mi->modem_intcon_base + MODEM_IRQ_REG_OFFSET) & 0xFF;
71 virt_irq = IRQ_MODEM_EVENTS_BASE + real_irq;
72
73 pr_debug("modem_irq: Worker read addr 0x%X and got value 0x%X "
74 "which will be 0x%X (%d) which translates to "
75 "virtual IRQ 0x%X (%d)!\n",
76 (u32)mi->modem_intcon_base + MODEM_IRQ_REG_OFFSET,
77 real_irq,
78 real_irq & 0xFF,
79 real_irq & 0xFF,
80 virt_irq,
81 virt_irq);
82
83 if (virt_irq != 0)
84 generic_handle_irq(virt_irq);
85
86 pr_debug("modem_irq: Done handling virtual IRQ %d!\n", virt_irq);
87
88 return IRQ_HANDLED;
89}
90
91static void create_virtual_irq(int irq, struct irq_chip *modem_irq_chip)
92{
93 irq_set_chip_and_handler(irq, modem_irq_chip, handle_simple_irq);
94 set_irq_flags(irq, IRQF_VALID);
95
96 pr_debug("modem_irq: Created virtual IRQ %d\n", irq);
97}
98
99static int modem_irq_init(void)
100{
101 int err;
102 static struct irq_chip modem_irq_chip;
103 struct modem_irq *mi;
104
105 if (!cpu_is_u5500())
106 return -ENODEV;
107
108 pr_info("modem_irq: Set up IRQ handler for incoming modem IRQ %d\n",
109 IRQ_DB5500_MODEM);
110
111 mi = kmalloc(sizeof(struct modem_irq), GFP_KERNEL);
112 if (!mi) {
113 pr_err("modem_irq: Could not allocate device\n");
114 return -ENOMEM;
115 }
116
117 mi->modem_intcon_base =
118 ioremap(MODEM_INTCON_BASE_ADDR, MODEM_INTCON_SIZE);
119 pr_debug("modem_irq: ioremapped modem_intcon_base from "
120 "phy 0x%x to virt 0x%x\n", MODEM_INTCON_BASE_ADDR,
121 (u32)mi->modem_intcon_base);
122
123 setup_modem_intcon(mi->modem_intcon_base);
124
125 modem_irq_chip = dummy_irq_chip;
126 modem_irq_chip.name = "modem_irq";
127
128 /* Create the virtual IRQ:s needed */
129 create_virtual_irq(MBOX_PAIR0_VIRT_IRQ, &modem_irq_chip);
130 create_virtual_irq(MBOX_PAIR1_VIRT_IRQ, &modem_irq_chip);
131 create_virtual_irq(MBOX_PAIR2_VIRT_IRQ, &modem_irq_chip);
132
133 err = request_threaded_irq(IRQ_DB5500_MODEM, NULL,
134 modem_cpu_irq_handler, IRQF_ONESHOT,
135 "modem_irq", mi);
136 if (err)
137 pr_err("modem_irq: Could not register IRQ %d\n",
138 IRQ_DB5500_MODEM);
139
140 return 0;
141}
142
143arch_initcall(modem_irq_init);
diff --git a/arch/arm/mach-ux500/pins-db5500.h b/arch/arm/mach-ux500/pins-db5500.h
deleted file mode 100644
index bf50c21fe69d..000000000000
--- a/arch/arm/mach-ux500/pins-db5500.h
+++ /dev/null
@@ -1,620 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * License terms: GNU General Public License, version 2
5 * Author: Rabin Vincent <rabin.vincent@stericsson.com>
6 */
7
8#ifndef __MACH_DB5500_PINS_H
9#define __MACH_DB5500_PINS_H
10
11#define GPIO0_GPIO PIN_CFG(0, GPIO)
12#define GPIO0_SM_CS3n PIN_CFG(0, ALT_A)
13
14#define GPIO1_GPIO PIN_CFG(1, GPIO)
15#define GPIO1_SM_A3 PIN_CFG(1, ALT_A)
16
17#define GPIO2_GPIO PIN_CFG(2, GPIO)
18#define GPIO2_SM_A4 PIN_CFG(2, ALT_A)
19#define GPIO2_SM_AVD PIN_CFG(2, ALT_B)
20
21#define GPIO3_GPIO PIN_CFG(3, GPIO)
22#define GPIO3_I2C1_SCL PIN_CFG(3, ALT_A)
23
24#define GPIO4_GPIO PIN_CFG(4, GPIO)
25#define GPIO4_I2C1_SDA PIN_CFG(4, ALT_A)
26
27#define GPIO5_GPIO PIN_CFG(5, GPIO)
28#define GPIO5_MC0_DAT0 PIN_CFG(5, ALT_A)
29#define GPIO5_SM_ADQ8 PIN_CFG(5, ALT_B)
30
31#define GPIO6_GPIO PIN_CFG(6, GPIO)
32#define GPIO6_MC0_DAT1 PIN_CFG(6, ALT_A)
33#define GPIO6_SM_ADQ0 PIN_CFG(6, ALT_B)
34
35#define GPIO7_GPIO PIN_CFG(7, GPIO)
36#define GPIO7_MC0_DAT2 PIN_CFG(7, ALT_A)
37#define GPIO7_SM_ADQ9 PIN_CFG(7, ALT_B)
38
39#define GPIO8_GPIO PIN_CFG(8, GPIO)
40#define GPIO8_MC0_DAT3 PIN_CFG(8, ALT_A)
41#define GPIO8_SM_ADQ1 PIN_CFG(8, ALT_B)
42
43#define GPIO9_GPIO PIN_CFG(9, GPIO)
44#define GPIO9_MC0_DAT4 PIN_CFG(9, ALT_A)
45#define GPIO9_SM_ADQ10 PIN_CFG(9, ALT_B)
46
47#define GPIO10_GPIO PIN_CFG(10, GPIO)
48#define GPIO10_MC0_DAT5 PIN_CFG(10, ALT_A)
49#define GPIO10_SM_ADQ2 PIN_CFG(10, ALT_B)
50
51#define GPIO11_GPIO PIN_CFG(11, GPIO)
52#define GPIO11_MC0_DAT6 PIN_CFG(11, ALT_A)
53#define GPIO11_SM_ADQ11 PIN_CFG(11, ALT_B)
54
55#define GPIO12_GPIO PIN_CFG(12, GPIO)
56#define GPIO12_MC0_DAT7 PIN_CFG(12, ALT_A)
57#define GPIO12_SM_ADQ3 PIN_CFG(12, ALT_B)
58
59#define GPIO13_GPIO PIN_CFG(13, GPIO)
60#define GPIO13_MC0_CMD PIN_CFG(13, ALT_A)
61#define GPIO13_SM_BUSY0n PIN_CFG(13, ALT_B)
62#define GPIO13_SM_WAIT0n PIN_CFG(13, ALT_C)
63
64#define GPIO14_GPIO PIN_CFG(14, GPIO)
65#define GPIO14_MC0_CLK PIN_CFG(14, ALT_A)
66#define GPIO14_SM_CS1n PIN_CFG(14, ALT_B)
67#define GPIO14_SM_CKO PIN_CFG(14, ALT_C)
68
69#define GPIO15_GPIO PIN_CFG(15, GPIO)
70#define GPIO15_SM_A5 PIN_CFG(15, ALT_A)
71#define GPIO15_SM_CLE PIN_CFG(15, ALT_B)
72
73#define GPIO16_GPIO PIN_CFG(16, GPIO)
74#define GPIO16_MC2_CMD PIN_CFG(16, ALT_A)
75#define GPIO16_SM_OEn PIN_CFG(16, ALT_B)
76
77#define GPIO17_GPIO PIN_CFG(17, GPIO)
78#define GPIO17_MC2_CLK PIN_CFG(17, ALT_A)
79#define GPIO17_SM_WEn PIN_CFG(17, ALT_B)
80
81#define GPIO18_GPIO PIN_CFG(18, GPIO)
82#define GPIO18_SM_A6 PIN_CFG(18, ALT_A)
83#define GPIO18_SM_ALE PIN_CFG(18, ALT_B)
84#define GPIO18_SM_AVDn PIN_CFG(18, ALT_C)
85
86#define GPIO19_GPIO PIN_CFG(19, GPIO)
87#define GPIO19_MC2_DAT1 PIN_CFG(19, ALT_A)
88#define GPIO19_SM_ADQ4 PIN_CFG(19, ALT_B)
89
90#define GPIO20_GPIO PIN_CFG(20, GPIO)
91#define GPIO20_MC2_DAT3 PIN_CFG(20, ALT_A)
92#define GPIO20_SM_ADQ5 PIN_CFG(20, ALT_B)
93
94#define GPIO21_GPIO PIN_CFG(21, GPIO)
95#define GPIO21_MC2_DAT5 PIN_CFG(21, ALT_A)
96#define GPIO21_SM_ADQ6 PIN_CFG(21, ALT_B)
97
98#define GPIO22_GPIO PIN_CFG(22, GPIO)
99#define GPIO22_MC2_DAT7 PIN_CFG(22, ALT_A)
100#define GPIO22_SM_ADQ7 PIN_CFG(22, ALT_B)
101
102#define GPIO23_GPIO PIN_CFG(23, GPIO)
103#define GPIO23_MC2_DAT0 PIN_CFG(23, ALT_A)
104#define GPIO23_SM_ADQ12 PIN_CFG(23, ALT_B)
105#define GPIO23_MC0_DAT1 PIN_CFG(23, ALT_C)
106
107#define GPIO24_GPIO PIN_CFG(24, GPIO)
108#define GPIO24_MC2_DAT2 PIN_CFG(24, ALT_A)
109#define GPIO24_SM_ADQ13 PIN_CFG(24, ALT_B)
110#define GPIO24_MC0_DAT3 PIN_CFG(24, ALT_C)
111
112#define GPIO25_GPIO PIN_CFG(25, GPIO)
113#define GPIO25_MC2_DAT4 PIN_CFG(25, ALT_A)
114#define GPIO25_SM_ADQ14 PIN_CFG(25, ALT_B)
115#define GPIO25_MC0_CMD PIN_CFG(25, ALT_C)
116
117#define GPIO26_GPIO PIN_CFG(26, GPIO)
118#define GPIO26_MC2_DAT6 PIN_CFG(26, ALT_A)
119#define GPIO26_SM_ADQ15 PIN_CFG(26, ALT_B)
120
121#define GPIO27_GPIO PIN_CFG(27, GPIO)
122#define GPIO27_SM_CS0n PIN_CFG(27, ALT_A)
123#define GPIO27_SM_PS0n PIN_CFG(27, ALT_B)
124
125#define GPIO28_GPIO PIN_CFG(28, GPIO)
126#define GPIO28_U0_TXD PIN_CFG(28, ALT_A)
127#define GPIO28_SM_A0 PIN_CFG(28, ALT_B)
128
129#define GPIO29_GPIO PIN_CFG(29, GPIO)
130#define GPIO29_U0_RXD PIN_CFG(29, ALT_A)
131#define GPIO29_SM_A1 PIN_CFG(29, ALT_B)
132#define GPIO29_PWM_0 PIN_CFG(29, ALT_C)
133
134#define GPIO30_GPIO PIN_CFG(30, GPIO)
135#define GPIO30_MC0_DAT5 PIN_CFG(30, ALT_A)
136#define GPIO30_SM_A2 PIN_CFG(30, ALT_B)
137#define GPIO30_PWM_1 PIN_CFG(30, ALT_C)
138
139#define GPIO31_GPIO PIN_CFG(31, GPIO)
140#define GPIO31_MC0_DAT7 PIN_CFG(31, ALT_A)
141#define GPIO31_SM_CS2n PIN_CFG(31, ALT_B)
142#define GPIO31_PWM_2 PIN_CFG(31, ALT_C)
143
144#define GPIO32_GPIO PIN_CFG(32, GPIO)
145#define GPIO32_MSP0_TCK PIN_CFG(32, ALT_A)
146#define GPIO32_ACCI2S0_SCK PIN_CFG(32, ALT_B)
147
148#define GPIO33_GPIO PIN_CFG(33, GPIO)
149#define GPIO33_MSP0_TFS PIN_CFG(33, ALT_A)
150#define GPIO33_ACCI2S0_WS PIN_CFG(33, ALT_B)
151
152#define GPIO34_GPIO PIN_CFG(34, GPIO)
153#define GPIO34_MSP0_TXD PIN_CFG(34, ALT_A)
154#define GPIO34_ACCI2S0_DLD PIN_CFG(34, ALT_B)
155
156#define GPIO35_GPIO PIN_CFG(35, GPIO)
157#define GPIO35_MSP0_RXD PIN_CFG(35, ALT_A)
158#define GPIO35_ACCI2S0_ULD PIN_CFG(35, ALT_B)
159
160#define GPIO64_GPIO PIN_CFG(64, GPIO)
161#define GPIO64_USB_DAT0 PIN_CFG(64, ALT_A)
162#define GPIO64_U0_TXD PIN_CFG(64, ALT_B)
163
164#define GPIO65_GPIO PIN_CFG(65, GPIO)
165#define GPIO65_USB_DAT1 PIN_CFG(65, ALT_A)
166#define GPIO65_U0_RXD PIN_CFG(65, ALT_B)
167
168#define GPIO66_GPIO PIN_CFG(66, GPIO)
169#define GPIO66_USB_DAT2 PIN_CFG(66, ALT_A)
170
171#define GPIO67_GPIO PIN_CFG(67, GPIO)
172#define GPIO67_USB_DAT3 PIN_CFG(67, ALT_A)
173
174#define GPIO68_GPIO PIN_CFG(68, GPIO)
175#define GPIO68_USB_DAT4 PIN_CFG(68, ALT_A)
176
177#define GPIO69_GPIO PIN_CFG(69, GPIO)
178#define GPIO69_USB_DAT5 PIN_CFG(69, ALT_A)
179
180#define GPIO70_GPIO PIN_CFG(70, GPIO)
181#define GPIO70_USB_DAT6 PIN_CFG(70, ALT_A)
182
183#define GPIO71_GPIO PIN_CFG(71, GPIO)
184#define GPIO71_USB_DAT7 PIN_CFG(71, ALT_A)
185
186#define GPIO72_GPIO PIN_CFG(72, GPIO)
187#define GPIO72_USB_STP PIN_CFG(72, ALT_A)
188
189#define GPIO73_GPIO PIN_CFG(73, GPIO)
190#define GPIO73_USB_DIR PIN_CFG(73, ALT_A)
191
192#define GPIO74_GPIO PIN_CFG(74, GPIO)
193#define GPIO74_USB_NXT PIN_CFG(74, ALT_A)
194
195#define GPIO75_GPIO PIN_CFG(75, GPIO)
196#define GPIO75_USB_XCLK PIN_CFG(75, ALT_A)
197
198#define GPIO76_GPIO PIN_CFG(76, GPIO)
199
200#define GPIO77_GPIO PIN_CFG(77, GPIO)
201#define GPIO77_ACCTX_ON PIN_CFG(77, ALT_A)
202
203#define GPIO78_GPIO PIN_CFG(78, GPIO)
204#define GPIO78_IRQn PIN_CFG(78, ALT_A)
205
206#define GPIO79_GPIO PIN_CFG(79, GPIO)
207#define GPIO79_ACCSIM_Clk PIN_CFG(79, ALT_A)
208
209#define GPIO80_GPIO PIN_CFG(80, GPIO)
210#define GPIO80_ACCSIM_Da PIN_CFG(80, ALT_A)
211
212#define GPIO81_GPIO PIN_CFG(81, GPIO)
213#define GPIO81_ACCSIM_Reset PIN_CFG(81, ALT_A)
214
215#define GPIO82_GPIO PIN_CFG(82, GPIO)
216#define GPIO82_ACCSIM_DDir PIN_CFG(82, ALT_A)
217
218#define GPIO96_GPIO PIN_CFG(96, GPIO)
219#define GPIO96_MSP1_TCK PIN_CFG(96, ALT_A)
220#define GPIO96_PRCMU_DEBUG3 PIN_CFG(96, ALT_B)
221#define GPIO96_PRCMU_DEBUG7 PIN_CFG(96, ALT_C)
222
223#define GPIO97_GPIO PIN_CFG(97, GPIO)
224#define GPIO97_MSP1_TFS PIN_CFG(97, ALT_A)
225#define GPIO97_PRCMU_DEBUG2 PIN_CFG(97, ALT_B)
226#define GPIO97_PRCMU_DEBUG6 PIN_CFG(97, ALT_C)
227
228#define GPIO98_GPIO PIN_CFG(98, GPIO)
229#define GPIO98_MSP1_TXD PIN_CFG(98, ALT_A)
230#define GPIO98_PRCMU_DEBUG1 PIN_CFG(98, ALT_B)
231#define GPIO98_PRCMU_DEBUG5 PIN_CFG(98, ALT_C)
232
233#define GPIO99_GPIO PIN_CFG(99, GPIO)
234#define GPIO99_MSP1_RXD PIN_CFG(99, ALT_A)
235#define GPIO99_PRCMU_DEBUG0 PIN_CFG(99, ALT_B)
236#define GPIO99_PRCMU_DEBUG4 PIN_CFG(99, ALT_C)
237
238#define GPIO100_GPIO PIN_CFG(100, GPIO)
239#define GPIO100_I2C0_SCL PIN_CFG(100, ALT_A)
240
241#define GPIO101_GPIO PIN_CFG(101, GPIO)
242#define GPIO101_I2C0_SDA PIN_CFG(101, ALT_A)
243
244#define GPIO128_GPIO PIN_CFG(128, GPIO)
245#define GPIO128_KP_I0 PIN_CFG(128, ALT_A)
246#define GPIO128_BUSMON_D0 PIN_CFG(128, ALT_B)
247
248#define GPIO129_GPIO PIN_CFG(129, GPIO)
249#define GPIO129_KP_O0 PIN_CFG(129, ALT_A)
250#define GPIO129_BUSMON_D1 PIN_CFG(129, ALT_B)
251
252#define GPIO130_GPIO PIN_CFG(130, GPIO)
253#define GPIO130_KP_I1 PIN_CFG(130, ALT_A)
254#define GPIO130_BUSMON_D2 PIN_CFG(130, ALT_B)
255
256#define GPIO131_GPIO PIN_CFG(131, GPIO)
257#define GPIO131_KP_O1 PIN_CFG(131, ALT_A)
258#define GPIO131_BUSMON_D3 PIN_CFG(131, ALT_B)
259
260#define GPIO132_GPIO PIN_CFG(132, GPIO)
261#define GPIO132_KP_I2 PIN_CFG(132, ALT_A)
262#define GPIO132_ETM_D15 PIN_CFG(132, ALT_B)
263#define GPIO132_STMAPE_CLK PIN_CFG(132, ALT_C)
264
265#define GPIO133_GPIO PIN_CFG(133, GPIO)
266#define GPIO133_KP_O2 PIN_CFG(133, ALT_A)
267#define GPIO133_ETM_D14 PIN_CFG(133, ALT_B)
268#define GPIO133_U0_RXD PIN_CFG(133, ALT_C)
269
270#define GPIO134_GPIO PIN_CFG(134, GPIO)
271#define GPIO134_KP_I3 PIN_CFG(134, ALT_A)
272#define GPIO134_ETM_D13 PIN_CFG(134, ALT_B)
273#define GPIO134_STMAPE_DAT0 PIN_CFG(134, ALT_C)
274
275#define GPIO135_GPIO PIN_CFG(135, GPIO)
276#define GPIO135_KP_O3 PIN_CFG(135, ALT_A)
277#define GPIO135_ETM_D12 PIN_CFG(135, ALT_B)
278#define GPIO135_STMAPE_DAT1 PIN_CFG(135, ALT_C)
279
280#define GPIO136_GPIO PIN_CFG(136, GPIO)
281#define GPIO136_KP_I4 PIN_CFG(136, ALT_A)
282#define GPIO136_ETM_D11 PIN_CFG(136, ALT_B)
283#define GPIO136_STMAPE_DAT2 PIN_CFG(136, ALT_C)
284
285#define GPIO137_GPIO PIN_CFG(137, GPIO)
286#define GPIO137_KP_O4 PIN_CFG(137, ALT_A)
287#define GPIO137_ETM_D10 PIN_CFG(137, ALT_B)
288#define GPIO137_STMAPE_DAT3 PIN_CFG(137, ALT_C)
289
290#define GPIO138_GPIO PIN_CFG(138, GPIO)
291#define GPIO138_KP_I5 PIN_CFG(138, ALT_A)
292#define GPIO138_ETM_D9 PIN_CFG(138, ALT_B)
293#define GPIO138_U0_TXD PIN_CFG(138, ALT_C)
294
295#define GPIO139_GPIO PIN_CFG(139, GPIO)
296#define GPIO139_KP_O5 PIN_CFG(139, ALT_A)
297#define GPIO139_ETM_D8 PIN_CFG(139, ALT_B)
298#define GPIO139_BUSMON_D11 PIN_CFG(139, ALT_C)
299
300#define GPIO140_GPIO PIN_CFG(140, GPIO)
301#define GPIO140_KP_I6 PIN_CFG(140, ALT_A)
302#define GPIO140_ETM_D7 PIN_CFG(140, ALT_B)
303#define GPIO140_STMAPE_CLK PIN_CFG(140, ALT_C)
304
305#define GPIO141_GPIO PIN_CFG(141, GPIO)
306#define GPIO141_KP_O6 PIN_CFG(141, ALT_A)
307#define GPIO141_ETM_D6 PIN_CFG(141, ALT_B)
308#define GPIO141_U0_RXD PIN_CFG(141, ALT_C)
309
310#define GPIO142_GPIO PIN_CFG(142, GPIO)
311#define GPIO142_KP_I7 PIN_CFG(142, ALT_A)
312#define GPIO142_ETM_D5 PIN_CFG(142, ALT_B)
313#define GPIO142_STMAPE_DAT0 PIN_CFG(142, ALT_C)
314
315#define GPIO143_GPIO PIN_CFG(143, GPIO)
316#define GPIO143_KP_O7 PIN_CFG(143, ALT_A)
317#define GPIO143_ETM_D4 PIN_CFG(143, ALT_B)
318#define GPIO143_STMAPE_DAT1 PIN_CFG(143, ALT_C)
319
320#define GPIO144_GPIO PIN_CFG(144, GPIO)
321#define GPIO144_I2C3_SCL PIN_CFG(144, ALT_A)
322#define GPIO144_ETM_D3 PIN_CFG(144, ALT_B)
323#define GPIO144_STMAPE_DAT2 PIN_CFG(144, ALT_C)
324
325#define GPIO145_GPIO PIN_CFG(145, GPIO)
326#define GPIO145_I2C3_SDA PIN_CFG(145, ALT_A)
327#define GPIO145_ETM_D2 PIN_CFG(145, ALT_B)
328#define GPIO145_STMAPE_DAT3 PIN_CFG(145, ALT_C)
329
330#define GPIO146_GPIO PIN_CFG(146, GPIO)
331#define GPIO146_PWM_0 PIN_CFG(146, ALT_A)
332#define GPIO146_ETM_D1 PIN_CFG(146, ALT_B)
333
334#define GPIO147_GPIO PIN_CFG(147, GPIO)
335#define GPIO147_PWM_1 PIN_CFG(147, ALT_A)
336#define GPIO147_ETM_D0 PIN_CFG(147, ALT_B)
337
338#define GPIO148_GPIO PIN_CFG(148, GPIO)
339#define GPIO148_PWM_2 PIN_CFG(148, ALT_A)
340#define GPIO148_ETM_CLK PIN_CFG(148, ALT_B)
341
342#define GPIO160_GPIO PIN_CFG(160, GPIO)
343#define GPIO160_CLKOUT_REQn PIN_CFG(160, ALT_A)
344
345#define GPIO161_GPIO PIN_CFG(161, GPIO)
346#define GPIO161_CLKOUT_0 PIN_CFG(161, ALT_A)
347
348#define GPIO162_GPIO PIN_CFG(162, GPIO)
349#define GPIO162_CLKOUT_1 PIN_CFG(162, ALT_A)
350
351#define GPIO163_GPIO PIN_CFG(163, GPIO)
352
353#define GPIO164_GPIO PIN_CFG(164, GPIO)
354#define GPIO164_GPS_START PIN_CFG(164, ALT_A)
355
356#define GPIO165_GPIO PIN_CFG(165, GPIO)
357#define GPIO165_SPI1_CS2n PIN_CFG(165, ALT_A)
358#define GPIO165_U3_RXD PIN_CFG(165, ALT_B)
359#define GPIO165_BUSMON_D20 PIN_CFG(165, ALT_C)
360
361#define GPIO166_GPIO PIN_CFG(166, GPIO)
362#define GPIO166_SPI1_CS1n PIN_CFG(166, ALT_A)
363#define GPIO166_U3_TXD PIN_CFG(166, ALT_B)
364#define GPIO166_BUSMON_D21 PIN_CFG(166, ALT_C)
365
366#define GPIO167_GPIO PIN_CFG(167, GPIO)
367#define GPIO167_SPI1_CS0n PIN_CFG(167, ALT_A)
368#define GPIO167_U3_RTSn PIN_CFG(167, ALT_B)
369#define GPIO167_BUSMON_D22 PIN_CFG(167, ALT_C)
370
371#define GPIO168_GPIO PIN_CFG(168, GPIO)
372#define GPIO168_SPI1_RXD PIN_CFG(168, ALT_A)
373#define GPIO168_U3_CTSn PIN_CFG(168, ALT_B)
374#define GPIO168_BUSMON_D23 PIN_CFG(168, ALT_C)
375
376#define GPIO169_GPIO PIN_CFG(169, GPIO)
377#define GPIO169_SPI1_TXD PIN_CFG(169, ALT_A)
378#define GPIO169_DDR_RC PIN_CFG(169, ALT_B)
379#define GPIO169_BUSMON_D24 PIN_CFG(169, ALT_C)
380
381#define GPIO170_GPIO PIN_CFG(170, GPIO)
382#define GPIO170_SPI1_CLK PIN_CFG(170, ALT_A)
383
384#define GPIO171_GPIO PIN_CFG(171, GPIO)
385#define GPIO171_MC3_DAT0 PIN_CFG(171, ALT_A)
386#define GPIO171_SPI3_RXD PIN_CFG(171, ALT_B)
387#define GPIO171_BUSMON_D25 PIN_CFG(171, ALT_C)
388
389#define GPIO172_GPIO PIN_CFG(172, GPIO)
390#define GPIO172_MC3_DAT1 PIN_CFG(172, ALT_A)
391#define GPIO172_SPI3_CS1n PIN_CFG(172, ALT_B)
392#define GPIO172_BUSMON_D26 PIN_CFG(172, ALT_C)
393
394#define GPIO173_GPIO PIN_CFG(173, GPIO)
395#define GPIO173_MC3_DAT2 PIN_CFG(173, ALT_A)
396#define GPIO173_SPI3_CS2n PIN_CFG(173, ALT_B)
397#define GPIO173_BUSMON_D27 PIN_CFG(173, ALT_C)
398
399#define GPIO174_GPIO PIN_CFG(174, GPIO)
400#define GPIO174_MC3_DAT3 PIN_CFG(174, ALT_A)
401#define GPIO174_SPI3_CS0n PIN_CFG(174, ALT_B)
402#define GPIO174_BUSMON_D28 PIN_CFG(174, ALT_C)
403
404#define GPIO175_GPIO PIN_CFG(175, GPIO)
405#define GPIO175_MC3_CMD PIN_CFG(175, ALT_A)
406#define GPIO175_SPI3_TXD PIN_CFG(175, ALT_B)
407#define GPIO175_BUSMON_D29 PIN_CFG(175, ALT_C)
408
409#define GPIO176_GPIO PIN_CFG(176, GPIO)
410#define GPIO176_MC3_CLK PIN_CFG(176, ALT_A)
411#define GPIO176_SPI3_CLK PIN_CFG(176, ALT_B)
412
413#define GPIO177_GPIO PIN_CFG(177, GPIO)
414#define GPIO177_U2_RXD PIN_CFG(177, ALT_A)
415#define GPIO177_I2C3_SCL PIN_CFG(177, ALT_B)
416#define GPIO177_BUSMON_D30 PIN_CFG(177, ALT_C)
417
418#define GPIO178_GPIO PIN_CFG(178, GPIO)
419#define GPIO178_U2_TXD PIN_CFG(178, ALT_A)
420#define GPIO178_I2C3_SDA PIN_CFG(178, ALT_B)
421#define GPIO178_BUSMON_D31 PIN_CFG(178, ALT_C)
422
423#define GPIO179_GPIO PIN_CFG(179, GPIO)
424#define GPIO179_U2_CTSn PIN_CFG(179, ALT_A)
425#define GPIO179_U3_RXD PIN_CFG(179, ALT_B)
426#define GPIO179_BUSMON_D32 PIN_CFG(179, ALT_C)
427
428#define GPIO180_GPIO PIN_CFG(180, GPIO)
429#define GPIO180_U2_RTSn PIN_CFG(180, ALT_A)
430#define GPIO180_U3_TXD PIN_CFG(180, ALT_B)
431#define GPIO180_BUSMON_D33 PIN_CFG(180, ALT_C)
432
433#define GPIO185_GPIO PIN_CFG(185, GPIO)
434#define GPIO185_SPI3_CS2n PIN_CFG(185, ALT_A)
435#define GPIO185_MC4_DAT0 PIN_CFG(185, ALT_B)
436
437#define GPIO186_GPIO PIN_CFG(186, GPIO)
438#define GPIO186_SPI3_CS1n PIN_CFG(186, ALT_A)
439#define GPIO186_MC4_DAT1 PIN_CFG(186, ALT_B)
440
441#define GPIO187_GPIO PIN_CFG(187, GPIO)
442#define GPIO187_SPI3_CS0n PIN_CFG(187, ALT_A)
443#define GPIO187_MC4_DAT2 PIN_CFG(187, ALT_B)
444
445#define GPIO188_GPIO PIN_CFG(188, GPIO)
446#define GPIO188_SPI3_RXD PIN_CFG(188, ALT_A)
447#define GPIO188_MC4_DAT3 PIN_CFG(188, ALT_B)
448
449#define GPIO189_GPIO PIN_CFG(189, GPIO)
450#define GPIO189_SPI3_TXD PIN_CFG(189, ALT_A)
451#define GPIO189_MC4_CMD PIN_CFG(189, ALT_B)
452
453#define GPIO190_GPIO PIN_CFG(190, GPIO)
454#define GPIO190_SPI3_CLK PIN_CFG(190, ALT_A)
455#define GPIO190_MC4_CLK PIN_CFG(190, ALT_B)
456
457#define GPIO191_GPIO PIN_CFG(191, GPIO)
458#define GPIO191_MC1_DAT0 PIN_CFG(191, ALT_A)
459#define GPIO191_MC4_DAT4 PIN_CFG(191, ALT_B)
460#define GPIO191_STMAPE_DAT0 PIN_CFG(191, ALT_C)
461
462#define GPIO192_GPIO PIN_CFG(192, GPIO)
463#define GPIO192_MC1_DAT1 PIN_CFG(192, ALT_A)
464#define GPIO192_MC4_DAT5 PIN_CFG(192, ALT_B)
465#define GPIO192_STMAPE_DAT1 PIN_CFG(192, ALT_C)
466
467#define GPIO193_GPIO PIN_CFG(193, GPIO)
468#define GPIO193_MC1_DAT2 PIN_CFG(193, ALT_A)
469#define GPIO193_MC4_DAT6 PIN_CFG(193, ALT_B)
470#define GPIO193_STMAPE_DAT2 PIN_CFG(193, ALT_C)
471
472#define GPIO194_GPIO PIN_CFG(194, GPIO)
473#define GPIO194_MC1_DAT3 PIN_CFG(194, ALT_A)
474#define GPIO194_MC4_DAT7 PIN_CFG(194, ALT_B)
475#define GPIO194_STMAPE_DAT3 PIN_CFG(194, ALT_C)
476
477#define GPIO195_GPIO PIN_CFG(195, GPIO)
478#define GPIO195_MC1_CLK PIN_CFG(195, ALT_A)
479#define GPIO195_STMAPE_CLK PIN_CFG(195, ALT_B)
480#define GPIO195_BUSMON_CLK PIN_CFG(195, ALT_C)
481
482#define GPIO196_GPIO PIN_CFG(196, GPIO)
483#define GPIO196_MC1_CMD PIN_CFG(196, ALT_A)
484#define GPIO196_U0_RXD PIN_CFG(196, ALT_B)
485#define GPIO196_BUSMON_D38 PIN_CFG(196, ALT_C)
486
487#define GPIO197_GPIO PIN_CFG(197, GPIO)
488#define GPIO197_MC1_CMDDIR PIN_CFG(197, ALT_A)
489#define GPIO197_BUSMON_D39 PIN_CFG(197, ALT_B)
490
491#define GPIO198_GPIO PIN_CFG(198, GPIO)
492#define GPIO198_MC1_FBCLK PIN_CFG(198, ALT_A)
493
494#define GPIO199_GPIO PIN_CFG(199, GPIO)
495#define GPIO199_MC1_DAT0DIR PIN_CFG(199, ALT_A)
496#define GPIO199_BUSMON_D40 PIN_CFG(199, ALT_B)
497
498#define GPIO200_GPIO PIN_CFG(200, GPIO)
499#define GPIO200_U1_TXD PIN_CFG(200, ALT_A)
500#define GPIO200_ACCU0_RTSn PIN_CFG(200, ALT_B)
501
502#define GPIO201_GPIO PIN_CFG(201, GPIO)
503#define GPIO201_U1_RXD PIN_CFG(201, ALT_A)
504#define GPIO201_ACCU0_CTSn PIN_CFG(201, ALT_B)
505
506#define GPIO202_GPIO PIN_CFG(202, GPIO)
507#define GPIO202_U1_CTSn PIN_CFG(202, ALT_A)
508#define GPIO202_ACCU0_RXD PIN_CFG(202, ALT_B)
509
510#define GPIO203_GPIO PIN_CFG(203, GPIO)
511#define GPIO203_U1_RTSn PIN_CFG(203, ALT_A)
512#define GPIO203_ACCU0_TXD PIN_CFG(203, ALT_B)
513
514#define GPIO204_GPIO PIN_CFG(204, GPIO)
515#define GPIO204_SPI0_CS2n PIN_CFG(204, ALT_A)
516#define GPIO204_ACCGPIO_000 PIN_CFG(204, ALT_B)
517#define GPIO204_LCD_VSI1 PIN_CFG(204, ALT_C)
518
519#define GPIO205_GPIO PIN_CFG(205, GPIO)
520#define GPIO205_SPI0_CS1n PIN_CFG(205, ALT_A)
521#define GPIO205_ACCGPIO_001 PIN_CFG(205, ALT_B)
522#define GPIO205_LCD_D3 PIN_CFG(205, ALT_C)
523
524#define GPIO206_GPIO PIN_CFG(206, GPIO)
525#define GPIO206_SPI0_CS0n PIN_CFG(206, ALT_A)
526#define GPIO206_ACCGPIO_002 PIN_CFG(206, ALT_B)
527#define GPIO206_LCD_D2 PIN_CFG(206, ALT_C)
528
529#define GPIO207_GPIO PIN_CFG(207, GPIO)
530#define GPIO207_SPI0_RXD PIN_CFG(207, ALT_A)
531#define GPIO207_ACCGPIO_003 PIN_CFG(207, ALT_B)
532#define GPIO207_LCD_D1 PIN_CFG(207, ALT_C)
533
534#define GPIO208_GPIO PIN_CFG(208, GPIO)
535#define GPIO208_SPI0_TXD PIN_CFG(208, ALT_A)
536#define GPIO208_ACCGPIO_004 PIN_CFG(208, ALT_B)
537#define GPIO208_LCD_D0 PIN_CFG(208, ALT_C)
538
539#define GPIO209_GPIO PIN_CFG(209, GPIO)
540#define GPIO209_SPI0_CLK PIN_CFG(209, ALT_A)
541#define GPIO209_ACCGPIO_005 PIN_CFG(209, ALT_B)
542#define GPIO209_LCD_CLK PIN_CFG(209, ALT_C)
543
544#define GPIO210_GPIO PIN_CFG(210, GPIO)
545#define GPIO210_LCD_VSO PIN_CFG(210, ALT_A)
546#define GPIO210_PRCMU_PWRCTRL1 PIN_CFG(210, ALT_B)
547
548#define GPIO211_GPIO PIN_CFG(211, GPIO)
549#define GPIO211_LCD_VSI0 PIN_CFG(211, ALT_A)
550#define GPIO211_PRCMU_PWRCTRL2 PIN_CFG(211, ALT_B)
551
552#define GPIO212_GPIO PIN_CFG(212, GPIO)
553#define GPIO212_SPI2_CS2n PIN_CFG(212, ALT_A)
554#define GPIO212_LCD_HSO PIN_CFG(212, ALT_B)
555
556#define GPIO213_GPIO PIN_CFG(213, GPIO)
557#define GPIO213_SPI2_CS1n PIN_CFG(213, ALT_A)
558#define GPIO213_LCD_DE PIN_CFG(213, ALT_B)
559#define GPIO213_BUSMON_D16 PIN_CFG(213, ALT_C)
560
561#define GPIO214_GPIO PIN_CFG(214, GPIO)
562#define GPIO214_SPI2_CS0n PIN_CFG(214, ALT_A)
563#define GPIO214_LCD_D7 PIN_CFG(214, ALT_B)
564#define GPIO214_BUSMON_D17 PIN_CFG(214, ALT_C)
565
566#define GPIO215_GPIO PIN_CFG(215, GPIO)
567#define GPIO215_SPI2_RXD PIN_CFG(215, ALT_A)
568#define GPIO215_LCD_D6 PIN_CFG(215, ALT_B)
569#define GPIO215_BUSMON_D18 PIN_CFG(215, ALT_C)
570
571#define GPIO216_GPIO PIN_CFG(216, GPIO)
572#define GPIO216_SPI2_CLK PIN_CFG(216, ALT_A)
573#define GPIO216_LCD_D5 PIN_CFG(216, ALT_B)
574
575#define GPIO217_GPIO PIN_CFG(217, GPIO)
576#define GPIO217_SPI2_TXD PIN_CFG(217, ALT_A)
577#define GPIO217_LCD_D4 PIN_CFG(217, ALT_B)
578#define GPIO217_BUSMON_D19 PIN_CFG(217, ALT_C)
579
580#define GPIO218_GPIO PIN_CFG(218, GPIO)
581#define GPIO218_I2C2_SCL PIN_CFG(218, ALT_A)
582#define GPIO218_LCD_VSO PIN_CFG(218, ALT_B)
583
584#define GPIO219_GPIO PIN_CFG(219, GPIO)
585#define GPIO219_I2C2_SDA PIN_CFG(219, ALT_A)
586#define GPIO219_LCD_D3 PIN_CFG(219, ALT_B)
587
588#define GPIO220_GPIO PIN_CFG(220, GPIO)
589#define GPIO220_MSP2_TCK PIN_CFG(220, ALT_A)
590#define GPIO220_LCD_D2 PIN_CFG(220, ALT_B)
591
592#define GPIO221_GPIO PIN_CFG(221, GPIO)
593#define GPIO221_MSP2_TFS PIN_CFG(221, ALT_A)
594#define GPIO221_LCD_D1 PIN_CFG(221, ALT_B)
595
596#define GPIO222_GPIO PIN_CFG(222, GPIO)
597#define GPIO222_MSP2_TXD PIN_CFG(222, ALT_A)
598#define GPIO222_LCD_D0 PIN_CFG(222, ALT_B)
599
600#define GPIO223_GPIO PIN_CFG(223, GPIO)
601#define GPIO223_MSP2_RXD PIN_CFG(223, ALT_A)
602#define GPIO223_LCD_CLK PIN_CFG(223, ALT_B)
603
604#define GPIO224_GPIO PIN_CFG(224, GPIO)
605#define GPIO224_PRCMU_PWRCTRL0 PIN_CFG(224, ALT_A)
606#define GPIO224_LCD_VSI1 PIN_CFG(224, ALT_B)
607
608#define GPIO225_GPIO PIN_CFG(225, GPIO)
609#define GPIO225_PRCMU_PWRCTRL1 PIN_CFG(225, ALT_A)
610#define GPIO225_IRDA_RXD PIN_CFG(225, ALT_B)
611
612#define GPIO226_GPIO PIN_CFG(226, GPIO)
613#define GPIO226_PRCMU_PWRCTRL2 PIN_CFG(226, ALT_A)
614#define GPIO226_IRRC_DAT PIN_CFG(226, ALT_B)
615
616#define GPIO227_GPIO PIN_CFG(227, GPIO)
617#define GPIO227_IRRC_DAT PIN_CFG(227, ALT_A)
618#define GPIO227_IRDA_TXD PIN_CFG(227, ALT_B)
619
620#endif
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
index eff5842f6232..e8cd51aa61e4 100644
--- a/arch/arm/mach-ux500/platsmp.c
+++ b/arch/arm/mach-ux500/platsmp.c
@@ -48,9 +48,7 @@ static void write_pen_release(int val)
48 48
49static void __iomem *scu_base_addr(void) 49static void __iomem *scu_base_addr(void)
50{ 50{
51 if (cpu_is_u5500()) 51 if (cpu_is_u8500())
52 return __io_address(U5500_SCU_BASE);
53 else if (cpu_is_u8500())
54 return __io_address(U8500_SCU_BASE); 52 return __io_address(U8500_SCU_BASE);
55 else 53 else
56 ux500_unknown_soc(); 54 ux500_unknown_soc();
@@ -120,9 +118,7 @@ static void __init wakeup_secondary(void)
120{ 118{
121 void __iomem *backupram; 119 void __iomem *backupram;
122 120
123 if (cpu_is_u5500()) 121 if (cpu_is_u8500())
124 backupram = __io_address(U5500_BACKUPRAM0_BASE);
125 else if (cpu_is_u8500())
126 backupram = __io_address(U8500_BACKUPRAM0_BASE); 122 backupram = __io_address(U8500_BACKUPRAM0_BASE);
127 else 123 else
128 ux500_unknown_soc(); 124 ux500_unknown_soc();
diff --git a/arch/arm/mach-ux500/ste-dma40-db5500.h b/arch/arm/mach-ux500/ste-dma40-db5500.h
deleted file mode 100644
index cb2110c32858..000000000000
--- a/arch/arm/mach-ux500/ste-dma40-db5500.h
+++ /dev/null
@@ -1,135 +0,0 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
5 * License terms: GNU General Public License (GPL) version 2
6 *
7 * DB5500-SoC-specific configuration for DMA40
8 */
9
10#ifndef STE_DMA40_DB5500_H
11#define STE_DMA40_DB5500_H
12
13#define DB5500_DMA_NR_DEV 64
14
15enum dma_src_dev_type {
16 DB5500_DMA_DEV0_SPI0_RX = 0,
17 DB5500_DMA_DEV1_SPI1_RX = 1,
18 DB5500_DMA_DEV2_SPI2_RX = 2,
19 DB5500_DMA_DEV3_SPI3_RX = 3,
20 DB5500_DMA_DEV4_USB_OTG_IEP_1_9 = 4,
21 DB5500_DMA_DEV5_USB_OTG_IEP_2_10 = 5,
22 DB5500_DMA_DEV6_USB_OTG_IEP_3_11 = 6,
23 DB5500_DMA_DEV7_IRDA_RFS = 7,
24 DB5500_DMA_DEV8_IRDA_FIFO_RX = 8,
25 DB5500_DMA_DEV9_MSP0_RX = 9,
26 DB5500_DMA_DEV10_MSP1_RX = 10,
27 DB5500_DMA_DEV11_MSP2_RX = 11,
28 DB5500_DMA_DEV12_UART0_RX = 12,
29 DB5500_DMA_DEV13_UART1_RX = 13,
30 DB5500_DMA_DEV14_UART2_RX = 14,
31 DB5500_DMA_DEV15_UART3_RX = 15,
32 DB5500_DMA_DEV16_USB_OTG_IEP_8 = 16,
33 DB5500_DMA_DEV17_USB_OTG_IEP_1_9 = 17,
34 DB5500_DMA_DEV18_USB_OTG_IEP_2_10 = 18,
35 DB5500_DMA_DEV19_USB_OTG_IEP_3_11 = 19,
36 DB5500_DMA_DEV20_USB_OTG_IEP_4_12 = 20,
37 DB5500_DMA_DEV21_USB_OTG_IEP_5_13 = 21,
38 DB5500_DMA_DEV22_USB_OTG_IEP_6_14 = 22,
39 DB5500_DMA_DEV23_USB_OTG_IEP_7_15 = 23,
40 DB5500_DMA_DEV24_SDMMC0_RX = 24,
41 DB5500_DMA_DEV25_SDMMC1_RX = 25,
42 DB5500_DMA_DEV26_SDMMC2_RX = 26,
43 DB5500_DMA_DEV27_SDMMC3_RX = 27,
44 DB5500_DMA_DEV28_SDMMC4_RX = 28,
45 /* 29 - 32 not used */
46 DB5500_DMA_DEV33_SDMMC0_RX = 33,
47 DB5500_DMA_DEV34_SDMMC1_RX = 34,
48 DB5500_DMA_DEV35_SDMMC2_RX = 35,
49 DB5500_DMA_DEV36_SDMMC3_RX = 36,
50 DB5500_DMA_DEV37_SDMMC4_RX = 37,
51 DB5500_DMA_DEV38_USB_OTG_IEP_8 = 38,
52 DB5500_DMA_DEV39_USB_OTG_IEP_1_9 = 39,
53 DB5500_DMA_DEV40_USB_OTG_IEP_2_10 = 40,
54 DB5500_DMA_DEV41_USB_OTG_IEP_3_11 = 41,
55 DB5500_DMA_DEV42_USB_OTG_IEP_4_12 = 42,
56 DB5500_DMA_DEV43_USB_OTG_IEP_5_13 = 43,
57 DB5500_DMA_DEV44_USB_OTG_IEP_6_14 = 44,
58 DB5500_DMA_DEV45_USB_OTG_IEP_7_15 = 45,
59 /* 46 not used */
60 DB5500_DMA_DEV47_MCDE_RX = 47,
61 DB5500_DMA_DEV48_CRYPTO1_RX = 48,
62 /* 49, 50 not used */
63 DB5500_DMA_DEV49_I2C1_RX = 51,
64 DB5500_DMA_DEV50_I2C3_RX = 52,
65 DB5500_DMA_DEV51_I2C2_RX = 53,
66 /* 54 - 60 not used */
67 DB5500_DMA_DEV61_CRYPTO0_RX = 61,
68 /* 62, 63 not used */
69};
70
71enum dma_dest_dev_type {
72 DB5500_DMA_DEV0_SPI0_TX = 0,
73 DB5500_DMA_DEV1_SPI1_TX = 1,
74 DB5500_DMA_DEV2_SPI2_TX = 2,
75 DB5500_DMA_DEV3_SPI3_TX = 3,
76 DB5500_DMA_DEV4_USB_OTG_OEP_1_9 = 4,
77 DB5500_DMA_DEV5_USB_OTG_OEP_2_10 = 5,
78 DB5500_DMA_DEV6_USB_OTG_OEP_3_11 = 6,
79 DB5500_DMA_DEV7_IRRC_TX = 7,
80 DB5500_DMA_DEV8_IRDA_FIFO_TX = 8,
81 DB5500_DMA_DEV9_MSP0_TX = 9,
82 DB5500_DMA_DEV10_MSP1_TX = 10,
83 DB5500_DMA_DEV11_MSP2_TX = 11,
84 DB5500_DMA_DEV12_UART0_TX = 12,
85 DB5500_DMA_DEV13_UART1_TX = 13,
86 DB5500_DMA_DEV14_UART2_TX = 14,
87 DB5500_DMA_DEV15_UART3_TX = 15,
88 DB5500_DMA_DEV16_USB_OTG_OEP_8 = 16,
89 DB5500_DMA_DEV17_USB_OTG_OEP_1_9 = 17,
90 DB5500_DMA_DEV18_USB_OTG_OEP_2_10 = 18,
91 DB5500_DMA_DEV19_USB_OTG_OEP_3_11 = 19,
92 DB5500_DMA_DEV20_USB_OTG_OEP_4_12 = 20,
93 DB5500_DMA_DEV21_USB_OTG_OEP_5_13 = 21,
94 DB5500_DMA_DEV22_USB_OTG_OEP_6_14 = 22,
95 DB5500_DMA_DEV23_USB_OTG_OEP_7_15 = 23,
96 DB5500_DMA_DEV24_SDMMC0_TX = 24,
97 DB5500_DMA_DEV25_SDMMC1_TX = 25,
98 DB5500_DMA_DEV26_SDMMC2_TX = 26,
99 DB5500_DMA_DEV27_SDMMC3_TX = 27,
100 DB5500_DMA_DEV28_SDMMC4_TX = 28,
101 /* 29 - 31 not used */
102 DB5500_DMA_DEV32_FSMC_TX = 32,
103 DB5500_DMA_DEV33_SDMMC0_TX = 33,
104 DB5500_DMA_DEV34_SDMMC1_TX = 34,
105 DB5500_DMA_DEV35_SDMMC2_TX = 35,
106 DB5500_DMA_DEV36_SDMMC3_TX = 36,
107 DB5500_DMA_DEV37_SDMMC4_TX = 37,
108 DB5500_DMA_DEV38_USB_OTG_OEP_8 = 38,
109 DB5500_DMA_DEV39_USB_OTG_OEP_1_9 = 39,
110 DB5500_DMA_DEV40_USB_OTG_OEP_2_10 = 40,
111 DB5500_DMA_DEV41_USB_OTG_OEP_3_11 = 41,
112 DB5500_DMA_DEV42_USB_OTG_OEP_4_12 = 42,
113 DB5500_DMA_DEV43_USB_OTG_OEP_5_13 = 43,
114 DB5500_DMA_DEV44_USB_OTG_OEP_6_14 = 44,
115 DB5500_DMA_DEV45_USB_OTG_OEP_7_15 = 45,
116 /* 46 not used */
117 DB5500_DMA_DEV47_STM_TX = 47,
118 DB5500_DMA_DEV48_CRYPTO1_TX = 48,
119 DB5500_DMA_DEV49_CRYPTO1_TX_HASH1_TX = 49,
120 DB5500_DMA_DEV50_HASH1_TX = 50,
121 DB5500_DMA_DEV51_I2C1_TX = 51,
122 DB5500_DMA_DEV52_I2C3_TX = 52,
123 DB5500_DMA_DEV53_I2C2_TX = 53,
124 /* 54, 55 not used */
125 DB5500_DMA_MEMCPY_TX_1 = 56,
126 DB5500_DMA_MEMCPY_TX_2 = 57,
127 DB5500_DMA_MEMCPY_TX_3 = 58,
128 DB5500_DMA_MEMCPY_TX_4 = 59,
129 DB5500_DMA_MEMCPY_TX_5 = 60,
130 DB5500_DMA_DEV61_CRYPTO0_TX = 61,
131 DB5500_DMA_DEV62_CRYPTO0_TX_HASH0_TX = 62,
132 DB5500_DMA_DEV63_HASH0_TX = 63,
133};
134
135#endif
diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c
index d37df98b5c32..52e55337aa9b 100644
--- a/arch/arm/mach-ux500/timer.c
+++ b/arch/arm/mach-ux500/timer.c
@@ -18,8 +18,6 @@
18#include <mach/irqs.h> 18#include <mach/irqs.h>
19 19
20#ifdef CONFIG_HAVE_ARM_TWD 20#ifdef CONFIG_HAVE_ARM_TWD
21static DEFINE_TWD_LOCAL_TIMER(u5500_twd_local_timer,
22 U5500_TWD_BASE, IRQ_LOCALTIMER);
23static DEFINE_TWD_LOCAL_TIMER(u8500_twd_local_timer, 21static DEFINE_TWD_LOCAL_TIMER(u8500_twd_local_timer,
24 U8500_TWD_BASE, IRQ_LOCALTIMER); 22 U8500_TWD_BASE, IRQ_LOCALTIMER);
25 23
@@ -28,8 +26,8 @@ static void __init ux500_twd_init(void)
28 struct twd_local_timer *twd_local_timer; 26 struct twd_local_timer *twd_local_timer;
29 int err; 27 int err;
30 28
31 twd_local_timer = cpu_is_u5500() ? &u5500_twd_local_timer : 29 /* Use this to switch local timer base if changed in new ASICs */
32 &u8500_twd_local_timer; 30 twd_local_timer = &u8500_twd_local_timer;
33 31
34 if (of_have_populated_dt()) 32 if (of_have_populated_dt())
35 twd_local_timer_of_register(); 33 twd_local_timer_of_register();
@@ -48,10 +46,7 @@ static void __init ux500_timer_init(void)
48 void __iomem *mtu_timer_base; 46 void __iomem *mtu_timer_base;
49 void __iomem *prcmu_timer_base; 47 void __iomem *prcmu_timer_base;
50 48
51 if (cpu_is_u5500()) { 49 if (cpu_is_u8500()) {
52 mtu_timer_base = __io_address(U5500_MTU0_BASE);
53 prcmu_timer_base = __io_address(U5500_PRCMU_TIMER_3_BASE);
54 } else if (cpu_is_u8500()) {
55 mtu_timer_base = __io_address(U8500_MTU0_BASE); 50 mtu_timer_base = __io_address(U8500_MTU0_BASE);
56 prcmu_timer_base = __io_address(U8500_PRCMU_TIMER_4_BASE); 51 prcmu_timer_base = __io_address(U8500_PRCMU_TIMER_4_BASE);
57 } else { 52 } else {
@@ -70,7 +65,7 @@ static void __init ux500_timer_init(void)
70 * depending on delay which is not yet calibrated. RTC-RTT is in the 65 * depending on delay which is not yet calibrated. RTC-RTT is in the
71 * always-on powerdomain and is used as clockevent instead of twd when 66 * always-on powerdomain and is used as clockevent instead of twd when
72 * sleeping. 67 * sleeping.
73 * The PRCMU timer 4(3 for DB5500) register a clocksource and 68 * The PRCMU timer 4 register a clocksource and
74 * sched_clock with higher rating then MTU since is always-on. 69 * sched_clock with higher rating then MTU since is always-on.
75 * 70 *
76 */ 71 */
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx51.h b/arch/arm/plat-mxc/include/mach/iomux-mx51.h
index c7f5169a6a54..36c8989d9de6 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx51.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-mx51.h
@@ -256,13 +256,13 @@
256#define MX51_PAD_NANDF_RB1__GPIO3_9 IOMUX_PAD(0x4fc, 0x120, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) 256#define MX51_PAD_NANDF_RB1__GPIO3_9 IOMUX_PAD(0x4fc, 0x120, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
257#define MX51_PAD_NANDF_RB1__NANDF_RB1 IOMUX_PAD(0x4fc, 0x120, 0, __NA_, 0, NO_PAD_CTRL) 257#define MX51_PAD_NANDF_RB1__NANDF_RB1 IOMUX_PAD(0x4fc, 0x120, 0, __NA_, 0, NO_PAD_CTRL)
258#define MX51_PAD_NANDF_RB1__PATA_IORDY IOMUX_PAD(0x4fc, 0x120, 1, __NA_, 0, NO_PAD_CTRL) 258#define MX51_PAD_NANDF_RB1__PATA_IORDY IOMUX_PAD(0x4fc, 0x120, 1, __NA_, 0, NO_PAD_CTRL)
259#define MX51_PAD_NANDF_RB1__SD4_CMD IOMUX_PAD(0x4fc, 0x120, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL) 259#define MX51_PAD_NANDF_RB1__SD4_CMD IOMUX_PAD(0x4fc, 0x120, 0x15, __NA_, 0, MX51_SDHCI_PAD_CTRL)
260#define MX51_PAD_NANDF_RB2__DISP2_WAIT IOMUX_PAD(0x500, 0x124, 5, 0x9a8, 0, NO_PAD_CTRL) 260#define MX51_PAD_NANDF_RB2__DISP2_WAIT IOMUX_PAD(0x500, 0x124, 5, 0x9a8, 0, NO_PAD_CTRL)
261#define MX51_PAD_NANDF_RB2__ECSPI2_SCLK IOMUX_PAD(0x500, 0x124, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) 261#define MX51_PAD_NANDF_RB2__ECSPI2_SCLK IOMUX_PAD(0x500, 0x124, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL)
262#define MX51_PAD_NANDF_RB2__FEC_COL IOMUX_PAD(0x500, 0x124, 1, 0x94c, 0, MX51_PAD_CTRL_2) 262#define MX51_PAD_NANDF_RB2__FEC_COL IOMUX_PAD(0x500, 0x124, 1, 0x94c, 0, MX51_PAD_CTRL_2)
263#define MX51_PAD_NANDF_RB2__GPIO3_10 IOMUX_PAD(0x500, 0x124, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) 263#define MX51_PAD_NANDF_RB2__GPIO3_10 IOMUX_PAD(0x500, 0x124, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
264#define MX51_PAD_NANDF_RB2__NANDF_RB2 IOMUX_PAD(0x500, 0x124, 0, __NA_, 0, NO_PAD_CTRL) 264#define MX51_PAD_NANDF_RB2__NANDF_RB2 IOMUX_PAD(0x500, 0x124, 0, __NA_, 0, NO_PAD_CTRL)
265#define MX51_PAD_NANDF_RB2__USBH3_H3_DP IOMUX_PAD(0x500, 0x124, 7, __NA_, 0, NO_PAD_CTRL) 265#define MX51_PAD_NANDF_RB2__USBH3_H3_DP IOMUX_PAD(0x500, 0x124, 0x17, __NA_, 0, NO_PAD_CTRL)
266#define MX51_PAD_NANDF_RB2__USBH3_NXT IOMUX_PAD(0x500, 0x124, 6, 0xa20, 0, NO_PAD_CTRL) 266#define MX51_PAD_NANDF_RB2__USBH3_NXT IOMUX_PAD(0x500, 0x124, 6, 0xa20, 0, NO_PAD_CTRL)
267#define MX51_PAD_NANDF_RB3__DISP1_WAIT IOMUX_PAD(0x504, 0x128, 5, __NA_, 0, NO_PAD_CTRL) 267#define MX51_PAD_NANDF_RB3__DISP1_WAIT IOMUX_PAD(0x504, 0x128, 5, __NA_, 0, NO_PAD_CTRL)
268#define MX51_PAD_NANDF_RB3__ECSPI2_MISO IOMUX_PAD(0x504, 0x128, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) 268#define MX51_PAD_NANDF_RB3__ECSPI2_MISO IOMUX_PAD(0x504, 0x128, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL)
@@ -270,7 +270,7 @@
270#define MX51_PAD_NANDF_RB3__GPIO3_11 IOMUX_PAD(0x504, 0x128, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) 270#define MX51_PAD_NANDF_RB3__GPIO3_11 IOMUX_PAD(0x504, 0x128, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
271#define MX51_PAD_NANDF_RB3__NANDF_RB3 IOMUX_PAD(0x504, 0x128, 0, __NA_, 0, NO_PAD_CTRL) 271#define MX51_PAD_NANDF_RB3__NANDF_RB3 IOMUX_PAD(0x504, 0x128, 0, __NA_, 0, NO_PAD_CTRL)
272#define MX51_PAD_NANDF_RB3__USBH3_CLK IOMUX_PAD(0x504, 0x128, 6, 0x9f8, 0, NO_PAD_CTRL) 272#define MX51_PAD_NANDF_RB3__USBH3_CLK IOMUX_PAD(0x504, 0x128, 6, 0x9f8, 0, NO_PAD_CTRL)
273#define MX51_PAD_NANDF_RB3__USBH3_H3_DM IOMUX_PAD(0x504, 0x128, 7, __NA_, 0, NO_PAD_CTRL) 273#define MX51_PAD_NANDF_RB3__USBH3_H3_DM IOMUX_PAD(0x504, 0x128, 0x17, __NA_, 0, NO_PAD_CTRL)
274#define MX51_PAD_GPIO_NAND__GPIO_NAND IOMUX_PAD(0x514, 0x12c, 0, 0x998, 0, MX51_GPIO_PAD_CTRL) 274#define MX51_PAD_GPIO_NAND__GPIO_NAND IOMUX_PAD(0x514, 0x12c, 0, 0x998, 0, MX51_GPIO_PAD_CTRL)
275#define MX51_PAD_GPIO_NAND__PATA_INTRQ IOMUX_PAD(0x514, 0x12c, 1, __NA_, 0, NO_PAD_CTRL) 275#define MX51_PAD_GPIO_NAND__PATA_INTRQ IOMUX_PAD(0x514, 0x12c, 1, __NA_, 0, NO_PAD_CTRL)
276#define MX51_PAD_NANDF_CS0__GPIO3_16 IOMUX_PAD(0x518, 0x130, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) 276#define MX51_PAD_NANDF_CS0__GPIO3_16 IOMUX_PAD(0x518, 0x130, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
@@ -283,13 +283,13 @@
283#define MX51_PAD_NANDF_CS2__NANDF_CS2 IOMUX_PAD(0x520, 0x138, 0, __NA_, 0, NO_PAD_CTRL) 283#define MX51_PAD_NANDF_CS2__NANDF_CS2 IOMUX_PAD(0x520, 0x138, 0, __NA_, 0, NO_PAD_CTRL)
284#define MX51_PAD_NANDF_CS2__PATA_CS_0 IOMUX_PAD(0x520, 0x138, 1, __NA_, 0, NO_PAD_CTRL) 284#define MX51_PAD_NANDF_CS2__PATA_CS_0 IOMUX_PAD(0x520, 0x138, 1, __NA_, 0, NO_PAD_CTRL)
285#define MX51_PAD_NANDF_CS2__SD4_CLK IOMUX_PAD(0x520, 0x138, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL | PAD_CTL_HYS) 285#define MX51_PAD_NANDF_CS2__SD4_CLK IOMUX_PAD(0x520, 0x138, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL | PAD_CTL_HYS)
286#define MX51_PAD_NANDF_CS2__USBH3_H1_DP IOMUX_PAD(0x520, 0x138, 7, __NA_, 0, NO_PAD_CTRL) 286#define MX51_PAD_NANDF_CS2__USBH3_H1_DP IOMUX_PAD(0x520, 0x138, 0x17, __NA_, 0, NO_PAD_CTRL)
287#define MX51_PAD_NANDF_CS3__FEC_MDC IOMUX_PAD(0x524, 0x13c, 2, __NA_, 0, MX51_PAD_CTRL_5) 287#define MX51_PAD_NANDF_CS3__FEC_MDC IOMUX_PAD(0x524, 0x13c, 2, __NA_, 0, MX51_PAD_CTRL_5)
288#define MX51_PAD_NANDF_CS3__GPIO3_19 IOMUX_PAD(0x524, 0x13c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) 288#define MX51_PAD_NANDF_CS3__GPIO3_19 IOMUX_PAD(0x524, 0x13c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
289#define MX51_PAD_NANDF_CS3__NANDF_CS3 IOMUX_PAD(0x524, 0x13c, 0, __NA_, 0, NO_PAD_CTRL) 289#define MX51_PAD_NANDF_CS3__NANDF_CS3 IOMUX_PAD(0x524, 0x13c, 0, __NA_, 0, NO_PAD_CTRL)
290#define MX51_PAD_NANDF_CS3__PATA_CS_1 IOMUX_PAD(0x524, 0x13c, 1, __NA_, 0, NO_PAD_CTRL) 290#define MX51_PAD_NANDF_CS3__PATA_CS_1 IOMUX_PAD(0x524, 0x13c, 1, __NA_, 0, NO_PAD_CTRL)
291#define MX51_PAD_NANDF_CS3__SD4_DAT0 IOMUX_PAD(0x524, 0x13c, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL) 291#define MX51_PAD_NANDF_CS3__SD4_DAT0 IOMUX_PAD(0x524, 0x13c, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL)
292#define MX51_PAD_NANDF_CS3__USBH3_H1_DM IOMUX_PAD(0x524, 0x13c, 7, __NA_, 0, NO_PAD_CTRL) 292#define MX51_PAD_NANDF_CS3__USBH3_H1_DM IOMUX_PAD(0x524, 0x13c, 0x17, __NA_, 0, NO_PAD_CTRL)
293#define MX51_PAD_NANDF_CS4__FEC_TDATA1 IOMUX_PAD(0x528, 0x140, 2, __NA_, 0, MX51_PAD_CTRL_5) 293#define MX51_PAD_NANDF_CS4__FEC_TDATA1 IOMUX_PAD(0x528, 0x140, 2, __NA_, 0, MX51_PAD_CTRL_5)
294#define MX51_PAD_NANDF_CS4__GPIO3_20 IOMUX_PAD(0x528, 0x140, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) 294#define MX51_PAD_NANDF_CS4__GPIO3_20 IOMUX_PAD(0x528, 0x140, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
295#define MX51_PAD_NANDF_CS4__NANDF_CS4 IOMUX_PAD(0x528, 0x140, 0, __NA_, 0, NO_PAD_CTRL) 295#define MX51_PAD_NANDF_CS4__NANDF_CS4 IOMUX_PAD(0x528, 0x140, 0, __NA_, 0, NO_PAD_CTRL)
@@ -316,7 +316,7 @@
316#define MX51_PAD_NANDF_RDY_INT__FEC_TX_CLK IOMUX_PAD(0x538, 0x150, 1, 0x974, 0, MX51_PAD_CTRL_4) 316#define MX51_PAD_NANDF_RDY_INT__FEC_TX_CLK IOMUX_PAD(0x538, 0x150, 1, 0x974, 0, MX51_PAD_CTRL_4)
317#define MX51_PAD_NANDF_RDY_INT__GPIO3_24 IOMUX_PAD(0x538, 0x150, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) 317#define MX51_PAD_NANDF_RDY_INT__GPIO3_24 IOMUX_PAD(0x538, 0x150, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
318#define MX51_PAD_NANDF_RDY_INT__NANDF_RDY_INT IOMUX_PAD(0x538, 0x150, 0, 0x938, 0, NO_PAD_CTRL) 318#define MX51_PAD_NANDF_RDY_INT__NANDF_RDY_INT IOMUX_PAD(0x538, 0x150, 0, 0x938, 0, NO_PAD_CTRL)
319#define MX51_PAD_NANDF_RDY_INT__SD3_CMD IOMUX_PAD(0x538, 0x150, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL) 319#define MX51_PAD_NANDF_RDY_INT__SD3_CMD IOMUX_PAD(0x538, 0x150, 0x15, __NA_, 0, MX51_SDHCI_PAD_CTRL)
320#define MX51_PAD_NANDF_D15__ECSPI2_MOSI IOMUX_PAD(0x53c, 0x154, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) 320#define MX51_PAD_NANDF_D15__ECSPI2_MOSI IOMUX_PAD(0x53c, 0x154, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL)
321#define MX51_PAD_NANDF_D15__GPIO3_25 IOMUX_PAD(0x53c, 0x154, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) 321#define MX51_PAD_NANDF_D15__GPIO3_25 IOMUX_PAD(0x53c, 0x154, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
322#define MX51_PAD_NANDF_D15__NANDF_D15 IOMUX_PAD(0x53c, 0x154, 0, __NA_, 0, NO_PAD_CTRL) 322#define MX51_PAD_NANDF_D15__NANDF_D15 IOMUX_PAD(0x53c, 0x154, 0, __NA_, 0, NO_PAD_CTRL)
@@ -672,23 +672,23 @@
672#define MX51_PAD_DISP2_DAT5__DISP2_DAT5 IOMUX_PAD(0x770, 0x368, 0, __NA_, 0, NO_PAD_CTRL) 672#define MX51_PAD_DISP2_DAT5__DISP2_DAT5 IOMUX_PAD(0x770, 0x368, 0, __NA_, 0, NO_PAD_CTRL)
673#define MX51_PAD_DISP2_DAT6__DISP2_DAT6 IOMUX_PAD(0x774, 0x36c, 0, __NA_, 0, NO_PAD_CTRL) 673#define MX51_PAD_DISP2_DAT6__DISP2_DAT6 IOMUX_PAD(0x774, 0x36c, 0, __NA_, 0, NO_PAD_CTRL)
674#define MX51_PAD_DISP2_DAT6__FEC_TDATA1 IOMUX_PAD(0x774, 0x36c, 2, __NA_, 0, MX51_PAD_CTRL_5) 674#define MX51_PAD_DISP2_DAT6__FEC_TDATA1 IOMUX_PAD(0x774, 0x36c, 2, __NA_, 0, MX51_PAD_CTRL_5)
675#define MX51_PAD_DISP2_DAT6__GPIO1_19 IOMUX_PAD(0x774, 0x36c, 5, __NA_, 0, NO_PAD_CTRL) 675#define MX51_PAD_DISP2_DAT6__GPIO1_19 IOMUX_PAD(0x774, 0x36c, 5, __NA_, 0, MX51_GPIO_PAD_CTRL)
676#define MX51_PAD_DISP2_DAT6__KEY_ROW4 IOMUX_PAD(0x774, 0x36c, 4, 0x9d0, 1, NO_PAD_CTRL) 676#define MX51_PAD_DISP2_DAT6__KEY_ROW4 IOMUX_PAD(0x774, 0x36c, 4, 0x9d0, 1, NO_PAD_CTRL)
677#define MX51_PAD_DISP2_DAT6__USBH3_STP IOMUX_PAD(0x774, 0x36c, 3, 0xa24, 1, NO_PAD_CTRL) 677#define MX51_PAD_DISP2_DAT6__USBH3_STP IOMUX_PAD(0x774, 0x36c, 3, 0xa24, 1, NO_PAD_CTRL)
678#define MX51_PAD_DISP2_DAT7__DISP2_DAT7 IOMUX_PAD(0x778, 0x370, 0, __NA_, 0, NO_PAD_CTRL) 678#define MX51_PAD_DISP2_DAT7__DISP2_DAT7 IOMUX_PAD(0x778, 0x370, 0, __NA_, 0, NO_PAD_CTRL)
679#define MX51_PAD_DISP2_DAT7__FEC_TDATA2 IOMUX_PAD(0x778, 0x370, 2, __NA_, 0, MX51_PAD_CTRL_5) 679#define MX51_PAD_DISP2_DAT7__FEC_TDATA2 IOMUX_PAD(0x778, 0x370, 2, __NA_, 0, MX51_PAD_CTRL_5)
680#define MX51_PAD_DISP2_DAT7__GPIO1_29 IOMUX_PAD(0x778, 0x370, 5, __NA_, 0, NO_PAD_CTRL) 680#define MX51_PAD_DISP2_DAT7__GPIO1_29 IOMUX_PAD(0x778, 0x370, 5, __NA_, 0, MX51_GPIO_PAD_CTRL)
681#define MX51_PAD_DISP2_DAT7__KEY_ROW5 IOMUX_PAD(0x778, 0x370, 4, 0x9d4, 1, NO_PAD_CTRL) 681#define MX51_PAD_DISP2_DAT7__KEY_ROW5 IOMUX_PAD(0x778, 0x370, 4, 0x9d4, 1, NO_PAD_CTRL)
682#define MX51_PAD_DISP2_DAT7__USBH3_NXT IOMUX_PAD(0x778, 0x370, 3, 0xa20, 1, NO_PAD_CTRL) 682#define MX51_PAD_DISP2_DAT7__USBH3_NXT IOMUX_PAD(0x778, 0x370, 3, 0xa20, 1, NO_PAD_CTRL)
683#define MX51_PAD_DISP2_DAT8__DISP2_DAT8 IOMUX_PAD(0x77c, 0x374, 0, __NA_, 0, NO_PAD_CTRL) 683#define MX51_PAD_DISP2_DAT8__DISP2_DAT8 IOMUX_PAD(0x77c, 0x374, 0, __NA_, 0, NO_PAD_CTRL)
684#define MX51_PAD_DISP2_DAT8__FEC_TDATA3 IOMUX_PAD(0x77c, 0x374, 2, __NA_, 0, MX51_PAD_CTRL_5) 684#define MX51_PAD_DISP2_DAT8__FEC_TDATA3 IOMUX_PAD(0x77c, 0x374, 2, __NA_, 0, MX51_PAD_CTRL_5)
685#define MX51_PAD_DISP2_DAT8__GPIO1_30 IOMUX_PAD(0x77c, 0x374, 5, __NA_, 0, NO_PAD_CTRL) 685#define MX51_PAD_DISP2_DAT8__GPIO1_30 IOMUX_PAD(0x77c, 0x374, 5, __NA_, 0, MX51_GPIO_PAD_CTRL)
686#define MX51_PAD_DISP2_DAT8__KEY_ROW6 IOMUX_PAD(0x77c, 0x374, 4, 0x9d8, 1, NO_PAD_CTRL) 686#define MX51_PAD_DISP2_DAT8__KEY_ROW6 IOMUX_PAD(0x77c, 0x374, 4, 0x9d8, 1, NO_PAD_CTRL)
687#define MX51_PAD_DISP2_DAT8__USBH3_DATA0 IOMUX_PAD(0x77c, 0x374, 3, 0x9fc, 1, NO_PAD_CTRL) 687#define MX51_PAD_DISP2_DAT8__USBH3_DATA0 IOMUX_PAD(0x77c, 0x374, 3, 0x9fc, 1, NO_PAD_CTRL)
688#define MX51_PAD_DISP2_DAT9__AUD6_RXC IOMUX_PAD(0x780, 0x378, 4, 0x8f4, 1, NO_PAD_CTRL) 688#define MX51_PAD_DISP2_DAT9__AUD6_RXC IOMUX_PAD(0x780, 0x378, 4, 0x8f4, 1, NO_PAD_CTRL)
689#define MX51_PAD_DISP2_DAT9__DISP2_DAT9 IOMUX_PAD(0x780, 0x378, 0, __NA_, 0, NO_PAD_CTRL) 689#define MX51_PAD_DISP2_DAT9__DISP2_DAT9 IOMUX_PAD(0x780, 0x378, 0, __NA_, 0, NO_PAD_CTRL)
690#define MX51_PAD_DISP2_DAT9__FEC_TX_EN IOMUX_PAD(0x780, 0x378, 2, __NA_, 0, MX51_PAD_CTRL_5) 690#define MX51_PAD_DISP2_DAT9__FEC_TX_EN IOMUX_PAD(0x780, 0x378, 2, __NA_, 0, MX51_PAD_CTRL_5)
691#define MX51_PAD_DISP2_DAT9__GPIO1_31 IOMUX_PAD(0x780, 0x378, 5, __NA_, 0, NO_PAD_CTRL) 691#define MX51_PAD_DISP2_DAT9__GPIO1_31 IOMUX_PAD(0x780, 0x378, 5, __NA_, 0, MX51_GPIO_PAD_CTRL)
692#define MX51_PAD_DISP2_DAT9__USBH3_DATA1 IOMUX_PAD(0x780, 0x378, 3, 0xa00, 1, NO_PAD_CTRL) 692#define MX51_PAD_DISP2_DAT9__USBH3_DATA1 IOMUX_PAD(0x780, 0x378, 3, 0xa00, 1, NO_PAD_CTRL)
693#define MX51_PAD_DISP2_DAT10__DISP2_DAT10 IOMUX_PAD(0x784, 0x37c, 0, __NA_, 0, NO_PAD_CTRL) 693#define MX51_PAD_DISP2_DAT10__DISP2_DAT10 IOMUX_PAD(0x784, 0x37c, 0, __NA_, 0, NO_PAD_CTRL)
694#define MX51_PAD_DISP2_DAT10__DISP2_SER_CS IOMUX_PAD(0x784, 0x37c, 5, __NA_, 0, NO_PAD_CTRL) 694#define MX51_PAD_DISP2_DAT10__DISP2_SER_CS IOMUX_PAD(0x784, 0x37c, 5, __NA_, 0, NO_PAD_CTRL)
@@ -698,7 +698,7 @@
698#define MX51_PAD_DISP2_DAT11__AUD6_TXD IOMUX_PAD(0x788, 0x380, 4, 0x8f0, 1, NO_PAD_CTRL) 698#define MX51_PAD_DISP2_DAT11__AUD6_TXD IOMUX_PAD(0x788, 0x380, 4, 0x8f0, 1, NO_PAD_CTRL)
699#define MX51_PAD_DISP2_DAT11__DISP2_DAT11 IOMUX_PAD(0x788, 0x380, 0, __NA_, 0, NO_PAD_CTRL) 699#define MX51_PAD_DISP2_DAT11__DISP2_DAT11 IOMUX_PAD(0x788, 0x380, 0, __NA_, 0, NO_PAD_CTRL)
700#define MX51_PAD_DISP2_DAT11__FEC_RX_CLK IOMUX_PAD(0x788, 0x380, 2, 0x968, 1, NO_PAD_CTRL) 700#define MX51_PAD_DISP2_DAT11__FEC_RX_CLK IOMUX_PAD(0x788, 0x380, 2, 0x968, 1, NO_PAD_CTRL)
701#define MX51_PAD_DISP2_DAT11__GPIO1_10 IOMUX_PAD(0x788, 0x380, 7, __NA_, 0, NO_PAD_CTRL) 701#define MX51_PAD_DISP2_DAT11__GPIO1_10 IOMUX_PAD(0x788, 0x380, 7, __NA_, 0, MX51_GPIO_PAD_CTRL)
702#define MX51_PAD_DISP2_DAT11__USBH3_DATA3 IOMUX_PAD(0x788, 0x380, 3, 0xa08, 1, NO_PAD_CTRL) 702#define MX51_PAD_DISP2_DAT11__USBH3_DATA3 IOMUX_PAD(0x788, 0x380, 3, 0xa08, 1, NO_PAD_CTRL)
703#define MX51_PAD_DISP2_DAT12__AUD6_RXD IOMUX_PAD(0x78c, 0x384, 4, 0x8ec, 1, NO_PAD_CTRL) 703#define MX51_PAD_DISP2_DAT12__AUD6_RXD IOMUX_PAD(0x78c, 0x384, 4, 0x8ec, 1, NO_PAD_CTRL)
704#define MX51_PAD_DISP2_DAT12__DISP2_DAT12 IOMUX_PAD(0x78c, 0x384, 0, __NA_, 0, NO_PAD_CTRL) 704#define MX51_PAD_DISP2_DAT12__DISP2_DAT12 IOMUX_PAD(0x78c, 0x384, 0, __NA_, 0, NO_PAD_CTRL)
@@ -746,16 +746,16 @@
746#define MX51_PAD_SD1_DATA3__CSPI_SS1 IOMUX_PAD(0x7b0, 0x3a8, 2, 0x920, 1, MX51_ECSPI_PAD_CTRL) 746#define MX51_PAD_SD1_DATA3__CSPI_SS1 IOMUX_PAD(0x7b0, 0x3a8, 2, 0x920, 1, MX51_ECSPI_PAD_CTRL)
747#define MX51_PAD_SD1_DATA3__SD1_DATA3 IOMUX_PAD(0x7b0, 0x3a8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) 747#define MX51_PAD_SD1_DATA3__SD1_DATA3 IOMUX_PAD(0x7b0, 0x3a8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL)
748#define MX51_PAD_GPIO1_0__CSPI_SS2 IOMUX_PAD(0x7b4, 0x3ac, 2, 0x924, 0, MX51_ECSPI_PAD_CTRL) 748#define MX51_PAD_GPIO1_0__CSPI_SS2 IOMUX_PAD(0x7b4, 0x3ac, 2, 0x924, 0, MX51_ECSPI_PAD_CTRL)
749#define MX51_PAD_GPIO1_0__GPIO1_0 IOMUX_PAD(0x7b4, 0x3ac, 1, __NA_, 0, NO_PAD_CTRL) 749#define MX51_PAD_GPIO1_0__GPIO1_0 IOMUX_PAD(0x7b4, 0x3ac, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
750#define MX51_PAD_GPIO1_0__SD1_CD IOMUX_PAD(0x7b4, 0x3ac, 0, __NA_, 0, MX51_ESDHC_PAD_CTRL) 750#define MX51_PAD_GPIO1_0__SD1_CD IOMUX_PAD(0x7b4, 0x3ac, 0, __NA_, 0, MX51_ESDHC_PAD_CTRL)
751#define MX51_PAD_GPIO1_1__CSPI_MISO IOMUX_PAD(0x7b8, 0x3b0, 2, 0x918, 2, MX51_ECSPI_PAD_CTRL) 751#define MX51_PAD_GPIO1_1__CSPI_MISO IOMUX_PAD(0x7b8, 0x3b0, 2, 0x918, 2, MX51_ECSPI_PAD_CTRL)
752#define MX51_PAD_GPIO1_1__GPIO1_1 IOMUX_PAD(0x7b8, 0x3b0, 1, __NA_, 0, NO_PAD_CTRL) 752#define MX51_PAD_GPIO1_1__GPIO1_1 IOMUX_PAD(0x7b8, 0x3b0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
753#define MX51_PAD_GPIO1_1__SD1_WP IOMUX_PAD(0x7b8, 0x3b0, 0, __NA_, 0, MX51_ESDHC_PAD_CTRL) 753#define MX51_PAD_GPIO1_1__SD1_WP IOMUX_PAD(0x7b8, 0x3b0, 0, __NA_, 0, MX51_ESDHC_PAD_CTRL)
754#define MX51_PAD_EIM_DA12__EIM_DA12 IOMUX_PAD(__NA_, 0x04c, 0, 0x000, 0, NO_PAD_CTRL) 754#define MX51_PAD_EIM_DA12__EIM_DA12 IOMUX_PAD(__NA_, 0x04c, 0, 0x000, 0, NO_PAD_CTRL)
755#define MX51_PAD_EIM_DA13__EIM_DA13 IOMUX_PAD(__NA_, 0x050, 0, 0x000, 0, NO_PAD_CTRL) 755#define MX51_PAD_EIM_DA13__EIM_DA13 IOMUX_PAD(__NA_, 0x050, 0, 0x000, 0, NO_PAD_CTRL)
756#define MX51_PAD_EIM_DA14__EIM_DA14 IOMUX_PAD(__NA_, 0x054, 0, 0x000, 0, NO_PAD_CTRL) 756#define MX51_PAD_EIM_DA14__EIM_DA14 IOMUX_PAD(__NA_, 0x054, 0, 0x000, 0, NO_PAD_CTRL)
757#define MX51_PAD_EIM_DA15__EIM_DA15 IOMUX_PAD(__NA_, 0x058, 0, 0x000, 0, NO_PAD_CTRL) 757#define MX51_PAD_EIM_DA15__EIM_DA15 IOMUX_PAD(__NA_, 0x058, 0, 0x000, 0, NO_PAD_CTRL)
758#define MX51_PAD_SD2_CMD__CSPI_MOSI IOMUX_PAD(__NA_, 0x3b4, 2, 0x91c, 3, MX51_ECSPI_PAD_CTRL) 758#define MX51_PAD_SD2_CMD__CSPI_MOSI IOMUX_PAD(0x7bc, 0x3b4, 2, 0x91c, 3, MX51_ECSPI_PAD_CTRL)
759#define MX51_PAD_SD2_CMD__I2C1_SCL IOMUX_PAD(0x7bc, 0x3b4, 0x11, 0x9b0, 2, MX51_I2C_PAD_CTRL) 759#define MX51_PAD_SD2_CMD__I2C1_SCL IOMUX_PAD(0x7bc, 0x3b4, 0x11, 0x9b0, 2, MX51_I2C_PAD_CTRL)
760#define MX51_PAD_SD2_CMD__SD2_CMD IOMUX_PAD(0x7bc, 0x3b4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) 760#define MX51_PAD_SD2_CMD__SD2_CMD IOMUX_PAD(0x7bc, 0x3b4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL)
761#define MX51_PAD_SD2_CLK__CSPI_SCLK IOMUX_PAD(0x7c0, 0x3b8, 2, 0x914, 3, MX51_ECSPI_PAD_CTRL) 761#define MX51_PAD_SD2_CLK__CSPI_SCLK IOMUX_PAD(0x7c0, 0x3b8, 2, 0x914, 3, MX51_ECSPI_PAD_CTRL)
@@ -766,19 +766,19 @@
766#define MX51_PAD_SD2_DATA0__SD2_DATA0 IOMUX_PAD(0x7c4, 0x3bc, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) 766#define MX51_PAD_SD2_DATA0__SD2_DATA0 IOMUX_PAD(0x7c4, 0x3bc, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL)
767#define MX51_PAD_SD2_DATA1__SD1_DAT5 IOMUX_PAD(0x7c8, 0x3c0, 1, __NA_, 0, NO_PAD_CTRL) 767#define MX51_PAD_SD2_DATA1__SD1_DAT5 IOMUX_PAD(0x7c8, 0x3c0, 1, __NA_, 0, NO_PAD_CTRL)
768#define MX51_PAD_SD2_DATA1__SD2_DATA1 IOMUX_PAD(0x7c8, 0x3c0, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) 768#define MX51_PAD_SD2_DATA1__SD2_DATA1 IOMUX_PAD(0x7c8, 0x3c0, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL)
769#define MX51_PAD_SD2_DATA1__USBH3_H2_DP IOMUX_PAD(0x7c8, 0x3c0, 2, __NA_, 0, NO_PAD_CTRL) 769#define MX51_PAD_SD2_DATA1__USBH3_H2_DP IOMUX_PAD(0x7c8, 0x3c0, 0x12, __NA_, 0, NO_PAD_CTRL)
770#define MX51_PAD_SD2_DATA2__SD1_DAT6 IOMUX_PAD(0x7cc, 0x3c4, 1, __NA_, 0, NO_PAD_CTRL) 770#define MX51_PAD_SD2_DATA2__SD1_DAT6 IOMUX_PAD(0x7cc, 0x3c4, 1, __NA_, 0, NO_PAD_CTRL)
771#define MX51_PAD_SD2_DATA2__SD2_DATA2 IOMUX_PAD(0x7cc, 0x3c4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) 771#define MX51_PAD_SD2_DATA2__SD2_DATA2 IOMUX_PAD(0x7cc, 0x3c4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL)
772#define MX51_PAD_SD2_DATA2__USBH3_H2_DM IOMUX_PAD(0x7cc, 0x3c4, 2, __NA_, 0, NO_PAD_CTRL) 772#define MX51_PAD_SD2_DATA2__USBH3_H2_DM IOMUX_PAD(0x7cc, 0x3c4, 0x12, __NA_, 0, NO_PAD_CTRL)
773#define MX51_PAD_SD2_DATA3__CSPI_SS2 IOMUX_PAD(0x7d0, 0x3c8, 2, 0x924, 1, MX51_ECSPI_PAD_CTRL) 773#define MX51_PAD_SD2_DATA3__CSPI_SS2 IOMUX_PAD(0x7d0, 0x3c8, 2, 0x924, 1, MX51_ECSPI_PAD_CTRL)
774#define MX51_PAD_SD2_DATA3__SD1_DAT7 IOMUX_PAD(0x7d0, 0x3c8, 1, __NA_, 0, NO_PAD_CTRL) 774#define MX51_PAD_SD2_DATA3__SD1_DAT7 IOMUX_PAD(0x7d0, 0x3c8, 1, __NA_, 0, NO_PAD_CTRL)
775#define MX51_PAD_SD2_DATA3__SD2_DATA3 IOMUX_PAD(0x7d0, 0x3c8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) 775#define MX51_PAD_SD2_DATA3__SD2_DATA3 IOMUX_PAD(0x7d0, 0x3c8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL)
776#define MX51_PAD_GPIO1_2__CCM_OUT_2 IOMUX_PAD(0x7d4, 0x3cc, 5, __NA_, 0, NO_PAD_CTRL) 776#define MX51_PAD_GPIO1_2__CCM_OUT_2 IOMUX_PAD(0x7d4, 0x3cc, 5, __NA_, 0, NO_PAD_CTRL)
777#define MX51_PAD_GPIO1_2__GPIO1_2 IOMUX_PAD(0x7d4, 0x3cc, 0, __NA_, 0, NO_PAD_CTRL) 777#define MX51_PAD_GPIO1_2__GPIO1_2 IOMUX_PAD(0x7d4, 0x3cc, 0, __NA_, 0, MX51_GPIO_PAD_CTRL)
778#define MX51_PAD_GPIO1_2__I2C2_SCL IOMUX_PAD(0x7d4, 0x3cc, 0x12, 0x9b8, 3, MX51_I2C_PAD_CTRL) 778#define MX51_PAD_GPIO1_2__I2C2_SCL IOMUX_PAD(0x7d4, 0x3cc, 0x12, 0x9b8, 3, MX51_I2C_PAD_CTRL)
779#define MX51_PAD_GPIO1_2__PLL1_BYP IOMUX_PAD(0x7d4, 0x3cc, 7, 0x90c, 1, NO_PAD_CTRL) 779#define MX51_PAD_GPIO1_2__PLL1_BYP IOMUX_PAD(0x7d4, 0x3cc, 7, 0x90c, 1, NO_PAD_CTRL)
780#define MX51_PAD_GPIO1_2__PWM1_PWMO IOMUX_PAD(0x7d4, 0x3cc, 1, __NA_, 0, NO_PAD_CTRL) 780#define MX51_PAD_GPIO1_2__PWM1_PWMO IOMUX_PAD(0x7d4, 0x3cc, 1, __NA_, 0, NO_PAD_CTRL)
781#define MX51_PAD_GPIO1_3__GPIO1_3 IOMUX_PAD(0x7d8, 0x3d0, 0, __NA_, 0, NO_PAD_CTRL) 781#define MX51_PAD_GPIO1_3__GPIO1_3 IOMUX_PAD(0x7d8, 0x3d0, 0, __NA_, 0, MX51_GPIO_PAD_CTRL)
782#define MX51_PAD_GPIO1_3__I2C2_SDA IOMUX_PAD(0x7d8, 0x3d0, 0x12, 0x9bc, 3, MX51_I2C_PAD_CTRL) 782#define MX51_PAD_GPIO1_3__I2C2_SDA IOMUX_PAD(0x7d8, 0x3d0, 0x12, 0x9bc, 3, MX51_I2C_PAD_CTRL)
783#define MX51_PAD_GPIO1_3__PLL2_BYP IOMUX_PAD(0x7d8, 0x3d0, 7, 0x910, 1, NO_PAD_CTRL) 783#define MX51_PAD_GPIO1_3__PLL2_BYP IOMUX_PAD(0x7d8, 0x3d0, 7, 0x910, 1, NO_PAD_CTRL)
784#define MX51_PAD_GPIO1_3__PWM2_PWMO IOMUX_PAD(0x7d8, 0x3d0, 1, __NA_, 0, NO_PAD_CTRL) 784#define MX51_PAD_GPIO1_3__PWM2_PWMO IOMUX_PAD(0x7d8, 0x3d0, 1, __NA_, 0, NO_PAD_CTRL)
@@ -786,27 +786,27 @@
786#define MX51_PAD_PMIC_INT_REQ__PMIC_PMU_IRQ_B IOMUX_PAD(0x7fc, 0x3d4, 1, __NA_, 0, NO_PAD_CTRL) 786#define MX51_PAD_PMIC_INT_REQ__PMIC_PMU_IRQ_B IOMUX_PAD(0x7fc, 0x3d4, 1, __NA_, 0, NO_PAD_CTRL)
787#define MX51_PAD_GPIO1_4__DISP2_EXT_CLK IOMUX_PAD(0x804, 0x3d8, 4, 0x908, 1, NO_PAD_CTRL) 787#define MX51_PAD_GPIO1_4__DISP2_EXT_CLK IOMUX_PAD(0x804, 0x3d8, 4, 0x908, 1, NO_PAD_CTRL)
788#define MX51_PAD_GPIO1_4__EIM_RDY IOMUX_PAD(0x804, 0x3d8, 3, 0x938, 1, NO_PAD_CTRL) 788#define MX51_PAD_GPIO1_4__EIM_RDY IOMUX_PAD(0x804, 0x3d8, 3, 0x938, 1, NO_PAD_CTRL)
789#define MX51_PAD_GPIO1_4__GPIO1_4 IOMUX_PAD(0x804, 0x3d8, 0, __NA_, 0, NO_PAD_CTRL) 789#define MX51_PAD_GPIO1_4__GPIO1_4 IOMUX_PAD(0x804, 0x3d8, 0, __NA_, 0, MX51_GPIO_PAD_CTRL)
790#define MX51_PAD_GPIO1_4__WDOG1_WDOG_B IOMUX_PAD(0x804, 0x3d8, 2, __NA_, 0, NO_PAD_CTRL) 790#define MX51_PAD_GPIO1_4__WDOG1_WDOG_B IOMUX_PAD(0x804, 0x3d8, 2, __NA_, 0, NO_PAD_CTRL)
791#define MX51_PAD_GPIO1_5__CSI2_MCLK IOMUX_PAD(0x808, 0x3dc, 6, __NA_, 0, NO_PAD_CTRL) 791#define MX51_PAD_GPIO1_5__CSI2_MCLK IOMUX_PAD(0x808, 0x3dc, 6, __NA_, 0, NO_PAD_CTRL)
792#define MX51_PAD_GPIO1_5__DISP2_PIN16 IOMUX_PAD(0x808, 0x3dc, 3, __NA_, 0, NO_PAD_CTRL) 792#define MX51_PAD_GPIO1_5__DISP2_PIN16 IOMUX_PAD(0x808, 0x3dc, 3, __NA_, 0, NO_PAD_CTRL)
793#define MX51_PAD_GPIO1_5__GPIO1_5 IOMUX_PAD(0x808, 0x3dc, 0, __NA_, 0, NO_PAD_CTRL) 793#define MX51_PAD_GPIO1_5__GPIO1_5 IOMUX_PAD(0x808, 0x3dc, 0, __NA_, 0, MX51_GPIO_PAD_CTRL)
794#define MX51_PAD_GPIO1_5__WDOG2_WDOG_B IOMUX_PAD(0x808, 0x3dc, 2, __NA_, 0, NO_PAD_CTRL) 794#define MX51_PAD_GPIO1_5__WDOG2_WDOG_B IOMUX_PAD(0x808, 0x3dc, 2, __NA_, 0, NO_PAD_CTRL)
795#define MX51_PAD_GPIO1_6__DISP2_PIN17 IOMUX_PAD(0x80c, 0x3e0, 4, __NA_, 0, NO_PAD_CTRL) 795#define MX51_PAD_GPIO1_6__DISP2_PIN17 IOMUX_PAD(0x80c, 0x3e0, 4, __NA_, 0, NO_PAD_CTRL)
796#define MX51_PAD_GPIO1_6__GPIO1_6 IOMUX_PAD(0x80c, 0x3e0, 0, __NA_, 0, NO_PAD_CTRL) 796#define MX51_PAD_GPIO1_6__GPIO1_6 IOMUX_PAD(0x80c, 0x3e0, 0, __NA_, 0, MX51_GPIO_PAD_CTRL)
797#define MX51_PAD_GPIO1_6__REF_EN_B IOMUX_PAD(0x80c, 0x3e0, 3, __NA_, 0, NO_PAD_CTRL) 797#define MX51_PAD_GPIO1_6__REF_EN_B IOMUX_PAD(0x80c, 0x3e0, 3, __NA_, 0, NO_PAD_CTRL)
798#define MX51_PAD_GPIO1_7__CCM_OUT_0 IOMUX_PAD(0x810, 0x3e4, 3, __NA_, 0, NO_PAD_CTRL) 798#define MX51_PAD_GPIO1_7__CCM_OUT_0 IOMUX_PAD(0x810, 0x3e4, 3, __NA_, 0, NO_PAD_CTRL)
799#define MX51_PAD_GPIO1_7__GPIO1_7 IOMUX_PAD(0x810, 0x3e4, 0, __NA_, 0, NO_PAD_CTRL) 799#define MX51_PAD_GPIO1_7__GPIO1_7 IOMUX_PAD(0x810, 0x3e4, 0, __NA_, 0, MX51_GPIO_PAD_CTRL)
800#define MX51_PAD_GPIO1_7__SD2_WP IOMUX_PAD(0x810, 0x3e4, 6, __NA_, 0, MX51_ESDHC_PAD_CTRL) 800#define MX51_PAD_GPIO1_7__SD2_WP IOMUX_PAD(0x810, 0x3e4, 6, __NA_, 0, MX51_ESDHC_PAD_CTRL)
801#define MX51_PAD_GPIO1_7__SPDIF_OUT1 IOMUX_PAD(0x810, 0x3e4, 2, __NA_, 0, NO_PAD_CTRL) 801#define MX51_PAD_GPIO1_7__SPDIF_OUT1 IOMUX_PAD(0x810, 0x3e4, 2, __NA_, 0, NO_PAD_CTRL)
802#define MX51_PAD_GPIO1_8__CSI2_DATA_EN IOMUX_PAD(0x814, 0x3e8, 2, 0x99c, 2, NO_PAD_CTRL) 802#define MX51_PAD_GPIO1_8__CSI2_DATA_EN IOMUX_PAD(0x814, 0x3e8, 2, 0x99c, 2, NO_PAD_CTRL)
803#define MX51_PAD_GPIO1_8__GPIO1_8 IOMUX_PAD(0x814, 0x3e8, 0, __NA_, 0, NO_PAD_CTRL) 803#define MX51_PAD_GPIO1_8__GPIO1_8 IOMUX_PAD(0x814, 0x3e8, 0, __NA_, 0, MX51_GPIO_PAD_CTRL)
804#define MX51_PAD_GPIO1_8__SD2_CD IOMUX_PAD(0x814, 0x3e8, 6, __NA_, 0, MX51_ESDHC_PAD_CTRL) 804#define MX51_PAD_GPIO1_8__SD2_CD IOMUX_PAD(0x814, 0x3e8, 6, __NA_, 0, MX51_ESDHC_PAD_CTRL)
805#define MX51_PAD_GPIO1_8__USBH3_PWR IOMUX_PAD(0x814, 0x3e8, 1, __NA_, 0, NO_PAD_CTRL) 805#define MX51_PAD_GPIO1_8__USBH3_PWR IOMUX_PAD(0x814, 0x3e8, 1, __NA_, 0, NO_PAD_CTRL)
806#define MX51_PAD_GPIO1_9__CCM_OUT_1 IOMUX_PAD(0x818, 0x3ec, 3, __NA_, 0, NO_PAD_CTRL) 806#define MX51_PAD_GPIO1_9__CCM_OUT_1 IOMUX_PAD(0x818, 0x3ec, 3, __NA_, 0, NO_PAD_CTRL)
807#define MX51_PAD_GPIO1_9__DISP2_D1_CS IOMUX_PAD(0x818, 0x3ec, 2, __NA_, 0, NO_PAD_CTRL) 807#define MX51_PAD_GPIO1_9__DISP2_D1_CS IOMUX_PAD(0x818, 0x3ec, 2, __NA_, 0, NO_PAD_CTRL)
808#define MX51_PAD_GPIO1_9__DISP2_SER_CS IOMUX_PAD(0x818, 0x3ec, 7, __NA_, 0, NO_PAD_CTRL) 808#define MX51_PAD_GPIO1_9__DISP2_SER_CS IOMUX_PAD(0x818, 0x3ec, 7, __NA_, 0, NO_PAD_CTRL)
809#define MX51_PAD_GPIO1_9__GPIO1_9 IOMUX_PAD(0x818, 0x3ec, 0, __NA_, 0, NO_PAD_CTRL) 809#define MX51_PAD_GPIO1_9__GPIO1_9 IOMUX_PAD(0x818, 0x3ec, 0, __NA_, 0, MX51_GPIO_PAD_CTRL)
810#define MX51_PAD_GPIO1_9__SD2_LCTL IOMUX_PAD(0x818, 0x3ec, 6, __NA_, 0, NO_PAD_CTRL) 810#define MX51_PAD_GPIO1_9__SD2_LCTL IOMUX_PAD(0x818, 0x3ec, 6, __NA_, 0, NO_PAD_CTRL)
811#define MX51_PAD_GPIO1_9__USBH3_OC IOMUX_PAD(0x818, 0x3ec, 1, __NA_, 0, NO_PAD_CTRL) 811#define MX51_PAD_GPIO1_9__USBH3_OC IOMUX_PAD(0x818, 0x3ec, 1, __NA_, 0, NO_PAD_CTRL)
812 812
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx53.h b/arch/arm/plat-mxc/include/mach/iomux-mx53.h
index 527f8fe3e31b..9761e003bde2 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx53.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-mx53.h
@@ -573,7 +573,7 @@
573#define MX53_PAD_EIM_D28__UART2_CTS IOMUX_PAD(0x494, 0x14C, 2, __NA_, 0, MX53_UART_PAD_CTRL) 573#define MX53_PAD_EIM_D28__UART2_CTS IOMUX_PAD(0x494, 0x14C, 2, __NA_, 0, MX53_UART_PAD_CTRL)
574#define MX53_PAD_EIM_D28__IPU_DISPB0_SER_DIO IOMUX_PAD(0x494, 0x14C, 3, 0x82C, 1, NO_PAD_CTRL) 574#define MX53_PAD_EIM_D28__IPU_DISPB0_SER_DIO IOMUX_PAD(0x494, 0x14C, 3, 0x82C, 1, NO_PAD_CTRL)
575#define MX53_PAD_EIM_D28__CSPI_MOSI IOMUX_PAD(0x494, 0x14C, 4, 0x788, 1, NO_PAD_CTRL) 575#define MX53_PAD_EIM_D28__CSPI_MOSI IOMUX_PAD(0x494, 0x14C, 4, 0x788, 1, NO_PAD_CTRL)
576#define MX53_PAD_EIM_D28__I2C1_SDA IOMUX_PAD(0x494, 0x14C, 5 | IOMUX_CONFIG_SION, 0x818, 1, PAD_CTRL_I2C) 576#define MX53_PAD_EIM_D28__I2C1_SDA IOMUX_PAD(0x494, 0x14C, 5 | IOMUX_CONFIG_SION, 0x818, 1, NO_PAD_CTRL)
577#define MX53_PAD_EIM_D28__IPU_EXT_TRIG IOMUX_PAD(0x494, 0x14C, 6, __NA_, 0, NO_PAD_CTRL) 577#define MX53_PAD_EIM_D28__IPU_EXT_TRIG IOMUX_PAD(0x494, 0x14C, 6, __NA_, 0, NO_PAD_CTRL)
578#define MX53_PAD_EIM_D28__IPU_DI0_PIN13 IOMUX_PAD(0x494, 0x14C, 7, __NA_, 0, NO_PAD_CTRL) 578#define MX53_PAD_EIM_D28__IPU_DI0_PIN13 IOMUX_PAD(0x494, 0x14C, 7, __NA_, 0, NO_PAD_CTRL)
579#define MX53_PAD_EIM_D29__EMI_WEIM_D_29 IOMUX_PAD(0x498, 0x150, 0, __NA_, 0, NO_PAD_CTRL) 579#define MX53_PAD_EIM_D29__EMI_WEIM_D_29 IOMUX_PAD(0x498, 0x150, 0, __NA_, 0, NO_PAD_CTRL)
@@ -1187,7 +1187,7 @@
1187#define MX53_PAD_GPIO_8__ESAI1_TX5_RX0 IOMUX_PAD(0x6C8, 0x338, 0, 0x7F8, 1, NO_PAD_CTRL) 1187#define MX53_PAD_GPIO_8__ESAI1_TX5_RX0 IOMUX_PAD(0x6C8, 0x338, 0, 0x7F8, 1, NO_PAD_CTRL)
1188#define MX53_PAD_GPIO_8__GPIO1_8 IOMUX_PAD(0x6C8, 0x338, 1, __NA_, 0, NO_PAD_CTRL) 1188#define MX53_PAD_GPIO_8__GPIO1_8 IOMUX_PAD(0x6C8, 0x338, 1, __NA_, 0, NO_PAD_CTRL)
1189#define MX53_PAD_GPIO_8__EPIT2_EPITO IOMUX_PAD(0x6C8, 0x338, 2, __NA_, 0, NO_PAD_CTRL) 1189#define MX53_PAD_GPIO_8__EPIT2_EPITO IOMUX_PAD(0x6C8, 0x338, 2, __NA_, 0, NO_PAD_CTRL)
1190#define MX53_PAD_GPIO_8__CAN1_RXCAN IOMUX_PAD(0x6C8, 0x338, 3, 0x760, 3, NO_PAD_CTRL) 1190#define MX53_PAD_GPIO_8__CAN1_RXCAN IOMUX_PAD(0x6C8, 0x338, 3, 0x760, 2, NO_PAD_CTRL)
1191#define MX53_PAD_GPIO_8__UART2_RXD_MUX IOMUX_PAD(0x6C8, 0x338, 4, 0x880, 5, MX53_UART_PAD_CTRL) 1191#define MX53_PAD_GPIO_8__UART2_RXD_MUX IOMUX_PAD(0x6C8, 0x338, 4, 0x880, 5, MX53_UART_PAD_CTRL)
1192#define MX53_PAD_GPIO_8__FIRI_TXD IOMUX_PAD(0x6C8, 0x338, 5, __NA_, 0, NO_PAD_CTRL) 1192#define MX53_PAD_GPIO_8__FIRI_TXD IOMUX_PAD(0x6C8, 0x338, 5, __NA_, 0, NO_PAD_CTRL)
1193#define MX53_PAD_GPIO_8__SPDIF_SRCLK IOMUX_PAD(0x6C8, 0x338, 6, __NA_, 0, NO_PAD_CTRL) 1193#define MX53_PAD_GPIO_8__SPDIF_SRCLK IOMUX_PAD(0x6C8, 0x338, 6, __NA_, 0, NO_PAD_CTRL)
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index c0fe2757b695..ed8605f01155 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -9,9 +9,6 @@ obj-m :=
9obj-n := 9obj-n :=
10obj- := 10obj- :=
11 11
12# OCPI interconnect support for 1710, 1610 and 5912
13obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
14
15# omap_device support (OMAP2+ only at the moment) 12# omap_device support (OMAP2+ only at the moment)
16obj-$(CONFIG_ARCH_OMAP2) += omap_device.o 13obj-$(CONFIG_ARCH_OMAP2) += omap_device.o
17obj-$(CONFIG_ARCH_OMAP3) += omap_device.o 14obj-$(CONFIG_ARCH_OMAP3) += omap_device.o
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index f1e46ea6b81d..0a9b9a970113 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -20,6 +20,7 @@
20#include <plat/board.h> 20#include <plat/board.h>
21#include <plat/vram.h> 21#include <plat/vram.h>
22#include <plat/dsp.h> 22#include <plat/dsp.h>
23#include <plat/dma.h>
23 24
24#include <plat/omap-secure.h> 25#include <plat/omap-secure.h>
25 26
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index c58d896cd5c3..987e6101267d 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -41,6 +41,15 @@
41 41
42#include <plat/tc.h> 42#include <plat/tc.h>
43 43
44/*
45 * MAX_LOGICAL_DMA_CH_COUNT: the maximum number of logical DMA
46 * channels that an instance of the SDMA IP block can support. Used
47 * to size arrays. (The actual maximum on a particular SoC may be less
48 * than this -- for example, OMAP1 SDMA instances only support 17 logical
49 * DMA channels.)
50 */
51#define MAX_LOGICAL_DMA_CH_COUNT 32
52
44#undef DEBUG 53#undef DEBUG
45 54
46#ifndef CONFIG_ARCH_OMAP1 55#ifndef CONFIG_ARCH_OMAP1
@@ -883,7 +892,7 @@ void omap_start_dma(int lch)
883 892
884 if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { 893 if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) {
885 int next_lch, cur_lch; 894 int next_lch, cur_lch;
886 char dma_chan_link_map[dma_lch_count]; 895 char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT];
887 896
888 dma_chan_link_map[lch] = 1; 897 dma_chan_link_map[lch] = 1;
889 /* Set the link register of the first channel */ 898 /* Set the link register of the first channel */
@@ -981,7 +990,7 @@ void omap_stop_dma(int lch)
981 990
982 if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { 991 if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) {
983 int next_lch, cur_lch = lch; 992 int next_lch, cur_lch = lch;
984 char dma_chan_link_map[dma_lch_count]; 993 char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT];
985 994
986 memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map)); 995 memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map));
987 do { 996 do {
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 652139c0339e..c4ed35e89fbd 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -349,11 +349,12 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_start);
349int omap_dm_timer_stop(struct omap_dm_timer *timer) 349int omap_dm_timer_stop(struct omap_dm_timer *timer)
350{ 350{
351 unsigned long rate = 0; 351 unsigned long rate = 0;
352 struct dmtimer_platform_data *pdata = timer->pdev->dev.platform_data; 352 struct dmtimer_platform_data *pdata;
353 353
354 if (unlikely(!timer)) 354 if (unlikely(!timer))
355 return -EINVAL; 355 return -EINVAL;
356 356
357 pdata = timer->pdev->dev.platform_data;
357 if (!pdata->needs_manual_reset) 358 if (!pdata->needs_manual_reset)
358 rate = clk_get_rate(timer->fclk); 359 rate = clk_get_rate(timer->fclk);
359 360
diff --git a/arch/arm/plat-omap/include/plat/board.h b/arch/arm/plat-omap/include/plat/board.h
index d5eb4c87db9d..4814c5b65306 100644
--- a/arch/arm/plat-omap/include/plat/board.h
+++ b/arch/arm/plat-omap/include/plat/board.h
@@ -91,6 +91,8 @@ struct omap_usb_config {
91 u32 (*usb0_init)(unsigned nwires, unsigned is_device); 91 u32 (*usb0_init)(unsigned nwires, unsigned is_device);
92 u32 (*usb1_init)(unsigned nwires); 92 u32 (*usb1_init)(unsigned nwires);
93 u32 (*usb2_init)(unsigned nwires, unsigned alt_pingroup); 93 u32 (*usb2_init)(unsigned nwires, unsigned alt_pingroup);
94
95 int (*ocpi_enable)(void);
94}; 96};
95 97
96struct omap_lcd_config { 98struct omap_lcd_config {
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h
index b4d7ec3fbfbe..a557b8484e6c 100644
--- a/arch/arm/plat-omap/include/plat/common.h
+++ b/arch/arm/plat-omap/include/plat/common.h
@@ -32,6 +32,8 @@
32 32
33extern int __init omap_init_clocksource_32k(void); 33extern int __init omap_init_clocksource_32k(void);
34 34
35extern void __init omap_check_revision(void);
36
35extern void omap_reserve(void); 37extern void omap_reserve(void);
36extern int omap_dss_reset(struct omap_hwmod *); 38extern int omap_dss_reset(struct omap_hwmod *);
37 39
diff --git a/arch/arm/plat-omap/include/plat/dma.h b/arch/arm/plat-omap/include/plat/dma.h
index dc562a5c0a8a..42afb4c45517 100644
--- a/arch/arm/plat-omap/include/plat/dma.h
+++ b/arch/arm/plat-omap/include/plat/dma.h
@@ -442,6 +442,7 @@ struct omap_system_dma_plat_info {
442 u32 (*dma_read)(int reg, int lch); 442 u32 (*dma_read)(int reg, int lch);
443}; 443};
444 444
445extern void __init omap_init_consistent_dma_size(void);
445extern void omap_set_dma_priority(int lch, int dst_port, int priority); 446extern void omap_set_dma_priority(int lch, int dst_port, int priority);
446extern int omap_request_dma(int dev_id, const char *dev_name, 447extern int omap_request_dma(int dev_id, const char *dev_name,
447 void (*callback)(int lch, u16 ch_status, void *data), 448 void (*callback)(int lch, u16 ch_status, void *data),
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
index 9418f00b6c38..230ff91be491 100644
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
@@ -316,12 +316,12 @@ static inline void __omap_dm_timer_init_regs(struct omap_dm_timer *timer)
316 OMAP_TIMER_V1_SYS_STAT_OFFSET; 316 OMAP_TIMER_V1_SYS_STAT_OFFSET;
317 timer->irq_stat = timer->io_base + OMAP_TIMER_V1_STAT_OFFSET; 317 timer->irq_stat = timer->io_base + OMAP_TIMER_V1_STAT_OFFSET;
318 timer->irq_ena = timer->io_base + OMAP_TIMER_V1_INT_EN_OFFSET; 318 timer->irq_ena = timer->io_base + OMAP_TIMER_V1_INT_EN_OFFSET;
319 timer->irq_dis = 0; 319 timer->irq_dis = NULL;
320 timer->pend = timer->io_base + _OMAP_TIMER_WRITE_PEND_OFFSET; 320 timer->pend = timer->io_base + _OMAP_TIMER_WRITE_PEND_OFFSET;
321 timer->func_base = timer->io_base; 321 timer->func_base = timer->io_base;
322 } else { 322 } else {
323 timer->revision = 2; 323 timer->revision = 2;
324 timer->sys_stat = 0; 324 timer->sys_stat = NULL;
325 timer->irq_stat = timer->io_base + OMAP_TIMER_V2_IRQSTATUS; 325 timer->irq_stat = timer->io_base + OMAP_TIMER_V2_IRQSTATUS;
326 timer->irq_ena = timer->io_base + OMAP_TIMER_V2_IRQENABLE_SET; 326 timer->irq_ena = timer->io_base + OMAP_TIMER_V2_IRQENABLE_SET;
327 timer->irq_dis = timer->io_base + OMAP_TIMER_V2_IRQENABLE_CLR; 327 timer->irq_dis = timer->io_base + OMAP_TIMER_V2_IRQENABLE_CLR;
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 3f26db4ee8e6..14dde32cd406 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -213,11 +213,16 @@ struct omap_hwmod_addr_space {
213 */ 213 */
214#define OCP_USER_MPU (1 << 0) 214#define OCP_USER_MPU (1 << 0)
215#define OCP_USER_SDMA (1 << 1) 215#define OCP_USER_SDMA (1 << 1)
216#define OCP_USER_DSP (1 << 2)
216 217
217/* omap_hwmod_ocp_if.flags bits */ 218/* omap_hwmod_ocp_if.flags bits */
218#define OCPIF_SWSUP_IDLE (1 << 0) 219#define OCPIF_SWSUP_IDLE (1 << 0)
219#define OCPIF_CAN_BURST (1 << 1) 220#define OCPIF_CAN_BURST (1 << 1)
220 221
222/* omap_hwmod_ocp_if._int_flags possibilities */
223#define _OCPIF_INT_FLAGS_REGISTERED (1 << 0)
224
225
221/** 226/**
222 * struct omap_hwmod_ocp_if - OCP interface data 227 * struct omap_hwmod_ocp_if - OCP interface data
223 * @master: struct omap_hwmod that initiates OCP transactions on this link 228 * @master: struct omap_hwmod that initiates OCP transactions on this link
@@ -229,6 +234,7 @@ struct omap_hwmod_addr_space {
229 * @width: OCP data width 234 * @width: OCP data width
230 * @user: initiators using this interface (see OCP_USER_* macros above) 235 * @user: initiators using this interface (see OCP_USER_* macros above)
231 * @flags: OCP interface flags (see OCPIF_* macros above) 236 * @flags: OCP interface flags (see OCPIF_* macros above)
237 * @_int_flags: internal flags (see _OCPIF_INT_FLAGS* macros above)
232 * 238 *
233 * It may also be useful to add a tag_cnt field for OCP2.x devices. 239 * It may also be useful to add a tag_cnt field for OCP2.x devices.
234 * 240 *
@@ -247,6 +253,7 @@ struct omap_hwmod_ocp_if {
247 u8 width; 253 u8 width;
248 u8 user; 254 u8 user;
249 u8 flags; 255 u8 flags;
256 u8 _int_flags;
250}; 257};
251 258
252 259
@@ -327,9 +334,9 @@ struct omap_hwmod_sysc_fields {
327 * then this field has to be populated with the correct offset structure. 334 * then this field has to be populated with the correct offset structure.
328 */ 335 */
329struct omap_hwmod_class_sysconfig { 336struct omap_hwmod_class_sysconfig {
330 u16 rev_offs; 337 u32 rev_offs;
331 u16 sysc_offs; 338 u32 sysc_offs;
332 u16 syss_offs; 339 u32 syss_offs;
333 u16 sysc_flags; 340 u16 sysc_flags;
334 struct omap_hwmod_sysc_fields *sysc_fields; 341 struct omap_hwmod_sysc_fields *sysc_fields;
335 u8 srst_udelay; 342 u8 srst_udelay;
@@ -476,6 +483,16 @@ struct omap_hwmod_class {
476}; 483};
477 484
478/** 485/**
486 * struct omap_hwmod_link - internal structure linking hwmods with ocp_ifs
487 * @ocp_if: OCP interface structure record pointer
488 * @node: list_head pointing to next struct omap_hwmod_link in a list
489 */
490struct omap_hwmod_link {
491 struct omap_hwmod_ocp_if *ocp_if;
492 struct list_head node;
493};
494
495/**
479 * struct omap_hwmod - integration data for OMAP hardware "modules" (IP blocks) 496 * struct omap_hwmod - integration data for OMAP hardware "modules" (IP blocks)
480 * @name: name of the hwmod 497 * @name: name of the hwmod
481 * @class: struct omap_hwmod_class * to the class of this hwmod 498 * @class: struct omap_hwmod_class * to the class of this hwmod
@@ -487,12 +504,10 @@ struct omap_hwmod_class {
487 * @_clk: pointer to the main struct clk (filled in at runtime) 504 * @_clk: pointer to the main struct clk (filled in at runtime)
488 * @opt_clks: other device clocks that drivers can request (0..*) 505 * @opt_clks: other device clocks that drivers can request (0..*)
489 * @voltdm: pointer to voltage domain (filled in at runtime) 506 * @voltdm: pointer to voltage domain (filled in at runtime)
490 * @masters: ptr to array of OCP ifs that this hwmod can initiate on
491 * @slaves: ptr to array of OCP ifs that this hwmod can respond on
492 * @dev_attr: arbitrary device attributes that can be passed to the driver 507 * @dev_attr: arbitrary device attributes that can be passed to the driver
493 * @_sysc_cache: internal-use hwmod flags 508 * @_sysc_cache: internal-use hwmod flags
494 * @_mpu_rt_va: cached register target start address (internal use) 509 * @_mpu_rt_va: cached register target start address (internal use)
495 * @_mpu_port_index: cached MPU register target slave ID (internal use) 510 * @_mpu_port: cached MPU register target slave (internal use)
496 * @opt_clks_cnt: number of @opt_clks 511 * @opt_clks_cnt: number of @opt_clks
497 * @master_cnt: number of @master entries 512 * @master_cnt: number of @master entries
498 * @slaves_cnt: number of @slave entries 513 * @slaves_cnt: number of @slave entries
@@ -511,6 +526,8 @@ struct omap_hwmod_class {
511 * 526 *
512 * Parameter names beginning with an underscore are managed internally by 527 * Parameter names beginning with an underscore are managed internally by
513 * the omap_hwmod code and should not be set during initialization. 528 * the omap_hwmod code and should not be set during initialization.
529 *
530 * @masters and @slaves are now deprecated.
514 */ 531 */
515struct omap_hwmod { 532struct omap_hwmod {
516 const char *name; 533 const char *name;
@@ -529,15 +546,15 @@ struct omap_hwmod {
529 struct omap_hwmod_opt_clk *opt_clks; 546 struct omap_hwmod_opt_clk *opt_clks;
530 char *clkdm_name; 547 char *clkdm_name;
531 struct clockdomain *clkdm; 548 struct clockdomain *clkdm;
532 struct omap_hwmod_ocp_if **masters; /* connect to *_IA */ 549 struct list_head master_ports; /* connect to *_IA */
533 struct omap_hwmod_ocp_if **slaves; /* connect to *_TA */ 550 struct list_head slave_ports; /* connect to *_TA */
534 void *dev_attr; 551 void *dev_attr;
535 u32 _sysc_cache; 552 u32 _sysc_cache;
536 void __iomem *_mpu_rt_va; 553 void __iomem *_mpu_rt_va;
537 spinlock_t _lock; 554 spinlock_t _lock;
538 struct list_head node; 555 struct list_head node;
556 struct omap_hwmod_ocp_if *_mpu_port;
539 u16 flags; 557 u16 flags;
540 u8 _mpu_port_index;
541 u8 response_lat; 558 u8 response_lat;
542 u8 rst_lines_cnt; 559 u8 rst_lines_cnt;
543 u8 opt_clks_cnt; 560 u8 opt_clks_cnt;
@@ -549,7 +566,6 @@ struct omap_hwmod {
549 u8 _postsetup_state; 566 u8 _postsetup_state;
550}; 567};
551 568
552int omap_hwmod_register(struct omap_hwmod **ohs);
553struct omap_hwmod *omap_hwmod_lookup(const char *name); 569struct omap_hwmod *omap_hwmod_lookup(const char *name);
554int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), 570int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data),
555 void *data); 571 void *data);
@@ -581,6 +597,8 @@ int omap_hwmod_softreset(struct omap_hwmod *oh);
581 597
582int omap_hwmod_count_resources(struct omap_hwmod *oh); 598int omap_hwmod_count_resources(struct omap_hwmod *oh);
583int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res); 599int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
600int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
601 const char *name, struct resource *res);
584 602
585struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh); 603struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh);
586void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh); 604void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh);
@@ -619,4 +637,6 @@ extern int omap2430_hwmod_init(void);
619extern int omap3xxx_hwmod_init(void); 637extern int omap3xxx_hwmod_init(void);
620extern int omap44xx_hwmod_init(void); 638extern int omap44xx_hwmod_init(void);
621 639
640extern int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois);
641
622#endif 642#endif
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index d50cbc6385bd..c490240bb82c 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -475,13 +475,11 @@ static int omap_device_count_resources(struct omap_device *od)
475static int omap_device_fill_resources(struct omap_device *od, 475static int omap_device_fill_resources(struct omap_device *od,
476 struct resource *res) 476 struct resource *res)
477{ 477{
478 int c = 0;
479 int i, r; 478 int i, r;
480 479
481 for (i = 0; i < od->hwmods_cnt; i++) { 480 for (i = 0; i < od->hwmods_cnt; i++) {
482 r = omap_hwmod_fill_resources(od->hwmods[i], res); 481 r = omap_hwmod_fill_resources(od->hwmods[i], res);
483 res += r; 482 res += r;
484 c += r;
485 } 483 }
486 484
487 return 0; 485 return 0;
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index f9a8c5341ee9..477363c163ec 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -196,8 +196,8 @@ static void __init omap_map_sram(void)
196 * Looks like we need to preserve some bootloader code at the 196 * Looks like we need to preserve some bootloader code at the
197 * beginning of SRAM for jumping to flash for reboot to work... 197 * beginning of SRAM for jumping to flash for reboot to work...
198 */ 198 */
199 memset((void *)omap_sram_base + SRAM_BOOTLOADER_SZ, 0, 199 memset_io(omap_sram_base + SRAM_BOOTLOADER_SZ, 0,
200 omap_sram_size - SRAM_BOOTLOADER_SZ); 200 omap_sram_size - SRAM_BOOTLOADER_SZ);
201} 201}
202 202
203/* 203/*
diff --git a/arch/arm/plat-omap/usb.c b/arch/arm/plat-omap/usb.c
index d2bbfd1cb0b5..daa0327381b5 100644
--- a/arch/arm/plat-omap/usb.c
+++ b/arch/arm/plat-omap/usb.c
@@ -31,15 +31,12 @@
31 31
32#include <mach/hardware.h> 32#include <mach/hardware.h>
33 33
34#include "../mach-omap2/common.h"
35
36#ifdef CONFIG_ARCH_OMAP_OTG 34#ifdef CONFIG_ARCH_OMAP_OTG
37 35
38void __init 36void __init
39omap_otg_init(struct omap_usb_config *config) 37omap_otg_init(struct omap_usb_config *config)
40{ 38{
41 u32 syscon; 39 u32 syscon;
42 int status;
43 int alt_pingroup = 0; 40 int alt_pingroup = 0;
44 41
45 /* NOTE: no bus or clock setup (yet?) */ 42 /* NOTE: no bus or clock setup (yet?) */
@@ -104,6 +101,7 @@ omap_otg_init(struct omap_usb_config *config)
104#ifdef CONFIG_USB_GADGET_OMAP 101#ifdef CONFIG_USB_GADGET_OMAP
105 if (config->otg || config->register_dev) { 102 if (config->otg || config->register_dev) {
106 struct platform_device *udc_device = config->udc_device; 103 struct platform_device *udc_device = config->udc_device;
104 int status;
107 105
108 syscon &= ~DEV_IDLE_EN; 106 syscon &= ~DEV_IDLE_EN;
109 udc_device->dev.platform_data = config; 107 udc_device->dev.platform_data = config;
@@ -116,6 +114,7 @@ omap_otg_init(struct omap_usb_config *config)
116#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) 114#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
117 if (config->otg || config->register_host) { 115 if (config->otg || config->register_host) {
118 struct platform_device *ohci_device = config->ohci_device; 116 struct platform_device *ohci_device = config->ohci_device;
117 int status;
119 118
120 syscon &= ~HST_IDLE_EN; 119 syscon &= ~HST_IDLE_EN;
121 ohci_device->dev.platform_data = config; 120 ohci_device->dev.platform_data = config;
@@ -128,6 +127,7 @@ omap_otg_init(struct omap_usb_config *config)
128#ifdef CONFIG_USB_OTG 127#ifdef CONFIG_USB_OTG
129 if (config->otg) { 128 if (config->otg) {
130 struct platform_device *otg_device = config->otg_device; 129 struct platform_device *otg_device = config->otg_device;
130 int status;
131 131
132 syscon &= ~OTG_IDLE_EN; 132 syscon &= ~OTG_IDLE_EN;
133 otg_device->dev.platform_data = config; 133 otg_device->dev.platform_data = config;
@@ -138,8 +138,6 @@ omap_otg_init(struct omap_usb_config *config)
138#endif 138#endif
139 pr_debug("OTG_SYSCON_1 = %08x\n", omap_readl(OTG_SYSCON_1)); 139 pr_debug("OTG_SYSCON_1 = %08x\n", omap_readl(OTG_SYSCON_1));
140 omap_writel(syscon, OTG_SYSCON_1); 140 omap_writel(syscon, OTG_SYSCON_1);
141
142 status = 0;
143} 141}
144 142
145#else 143#else
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 8b928f9bc1c3..1013a341b0fd 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -272,16 +272,8 @@ struct platform_device s5p_device_fimc3 = {
272 272
273#ifdef CONFIG_S5P_DEV_G2D 273#ifdef CONFIG_S5P_DEV_G2D
274static struct resource s5p_g2d_resource[] = { 274static struct resource s5p_g2d_resource[] = {
275 [0] = { 275 [0] = DEFINE_RES_MEM(S5P_PA_G2D, SZ_4K),
276 .start = S5P_PA_G2D, 276 [1] = DEFINE_RES_IRQ(IRQ_2D),
277 .end = S5P_PA_G2D + SZ_4K - 1,
278 .flags = IORESOURCE_MEM,
279 },
280 [1] = {
281 .start = IRQ_2D,
282 .end = IRQ_2D,
283 .flags = IORESOURCE_IRQ,
284 },
285}; 277};
286 278
287struct platform_device s5p_device_g2d = { 279struct platform_device s5p_device_g2d = {
@@ -370,7 +362,6 @@ struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata = {
370 .max_width = 4, 362 .max_width = 4,
371 .host_caps = (MMC_CAP_4_BIT_DATA | 363 .host_caps = (MMC_CAP_4_BIT_DATA |
372 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), 364 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED),
373 .clk_type = S3C_SDHCI_CLK_DIV_INTERNAL,
374}; 365};
375 366
376struct platform_device s3c_device_hsmmc0 = { 367struct platform_device s3c_device_hsmmc0 = {
@@ -401,7 +392,6 @@ struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata = {
401 .max_width = 4, 392 .max_width = 4,
402 .host_caps = (MMC_CAP_4_BIT_DATA | 393 .host_caps = (MMC_CAP_4_BIT_DATA |
403 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), 394 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED),
404 .clk_type = S3C_SDHCI_CLK_DIV_INTERNAL,
405}; 395};
406 396
407struct platform_device s3c_device_hsmmc1 = { 397struct platform_device s3c_device_hsmmc1 = {
@@ -434,7 +424,6 @@ struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata = {
434 .max_width = 4, 424 .max_width = 4,
435 .host_caps = (MMC_CAP_4_BIT_DATA | 425 .host_caps = (MMC_CAP_4_BIT_DATA |
436 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), 426 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED),
437 .clk_type = S3C_SDHCI_CLK_DIV_INTERNAL,
438}; 427};
439 428
440struct platform_device s3c_device_hsmmc2 = { 429struct platform_device s3c_device_hsmmc2 = {
@@ -465,7 +454,6 @@ struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata = {
465 .max_width = 4, 454 .max_width = 4,
466 .host_caps = (MMC_CAP_4_BIT_DATA | 455 .host_caps = (MMC_CAP_4_BIT_DATA |
467 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), 456 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED),
468 .clk_type = S3C_SDHCI_CLK_DIV_INTERNAL,
469}; 457};
470 458
471struct platform_device s3c_device_hsmmc3 = { 459struct platform_device s3c_device_hsmmc3 = {
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h
index e834c5ef437c..151cc9195cf6 100644
--- a/arch/arm/plat-samsung/include/plat/sdhci.h
+++ b/arch/arm/plat-samsung/include/plat/sdhci.h
@@ -33,18 +33,12 @@ enum cd_types {
33 S3C_SDHCI_CD_PERMANENT, /* no CD line, card permanently wired to host */ 33 S3C_SDHCI_CD_PERMANENT, /* no CD line, card permanently wired to host */
34}; 34};
35 35
36enum clk_types {
37 S3C_SDHCI_CLK_DIV_INTERNAL, /* use mmc internal clock divider */
38 S3C_SDHCI_CLK_DIV_EXTERNAL, /* use external clock divider */
39};
40
41/** 36/**
42 * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI 37 * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI
43 * @max_width: The maximum number of data bits supported. 38 * @max_width: The maximum number of data bits supported.
44 * @host_caps: Standard MMC host capabilities bit field. 39 * @host_caps: Standard MMC host capabilities bit field.
45 * @host_caps2: The second standard MMC host capabilities bit field. 40 * @host_caps2: The second standard MMC host capabilities bit field.
46 * @cd_type: Type of Card Detection method (see cd_types enum above) 41 * @cd_type: Type of Card Detection method (see cd_types enum above)
47 * @clk_type: Type of clock divider method (see clk_types enum above)
48 * @ext_cd_init: Initialize external card detect subsystem. Called on 42 * @ext_cd_init: Initialize external card detect subsystem. Called on
49 * sdhci-s3c driver probe when cd_type == S3C_SDHCI_CD_EXTERNAL. 43 * sdhci-s3c driver probe when cd_type == S3C_SDHCI_CD_EXTERNAL.
50 * notify_func argument is a callback to the sdhci-s3c driver 44 * notify_func argument is a callback to the sdhci-s3c driver
@@ -69,7 +63,6 @@ struct s3c_sdhci_platdata {
69 unsigned int host_caps2; 63 unsigned int host_caps2;
70 unsigned int pm_caps; 64 unsigned int pm_caps;
71 enum cd_types cd_type; 65 enum cd_types cd_type;
72 enum clk_types clk_type;
73 66
74 int ext_cd_gpio; 67 int ext_cd_gpio;
75 bool ext_cd_gpio_invert; 68 bool ext_cd_gpio_invert;
diff --git a/arch/arm/plat-samsung/platformdata.c b/arch/arm/plat-samsung/platformdata.c
index fa78aa710ed1..b430e9946287 100644
--- a/arch/arm/plat-samsung/platformdata.c
+++ b/arch/arm/plat-samsung/platformdata.c
@@ -57,6 +57,4 @@ void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata *pd,
57 set->host_caps2 |= pd->host_caps2; 57 set->host_caps2 |= pd->host_caps2;
58 if (pd->pm_caps) 58 if (pd->pm_caps)
59 set->pm_caps |= pd->pm_caps; 59 set->pm_caps |= pd->pm_caps;
60 if (pd->clk_type)
61 set->clk_type = pd->clk_type;
62} 60}