]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'next/soc' into for-next
authorKevin Hilman <khilman@linaro.org>
Fri, 11 Oct 2013 22:02:07 +0000 (15:02 -0700)
committerKevin Hilman <khilman@linaro.org>
Fri, 11 Oct 2013 22:02:53 +0000 (15:02 -0700)
* next/soc: (276 commits)
  ARM: keystone: Enable I2C and SPI bus support
  ARM: keystone: Select TI_EDMA to be able to enable SPI driver
  dma: Allow TI_EDMA selectable for ARCH_KEYSTONE
  ARM: dts: keystone: Add the SPI nodes
  ARM: dts: keystone: Add i2c device nodes
  ARM: keystone: add PM domain support for clock management
  ARM: keystone: Enable clock drivers
  ARM: dts: keystone: Add clock phandle to UART nodes
  ARM: dts: keystone: Add clock tree data to devicetree
  +Linux 3.12-rc4

Signed-off-by: Kevin Hilman <khilman@linaro.org>
240 files changed:
Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt
Documentation/devicetree/bindings/arm/vic.txt
Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt
Documentation/devicetree/bindings/pci/mvebu-pci.txt
Documentation/devicetree/bindings/usb/ux500-usb.txt
MAINTAINERS
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/arm-soc-for-next-contents.txt [new file with mode: 0644]
arch/arm/boot/compressed/Makefile
arch/arm/boot/compressed/head-shark.S [deleted file]
arch/arm/boot/compressed/ofw-shark.c [deleted file]
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/armada-370-xp.dtsi
arch/arm/boot/dts/armada-370.dtsi
arch/arm/boot/dts/armada-xp-matrix.dts [new file with mode: 0644]
arch/arm/boot/dts/armada-xp-mv78230.dtsi
arch/arm/boot/dts/armada-xp-mv78260.dtsi
arch/arm/boot/dts/armada-xp-mv78460.dtsi
arch/arm/boot/dts/armada-xp.dtsi
arch/arm/boot/dts/dove-cm-a510.dts
arch/arm/boot/dts/dove-cubox.dts
arch/arm/boot/dts/dove-d2plug.dts
arch/arm/boot/dts/dove-d3plug.dts [new file with mode: 0644]
arch/arm/boot/dts/dove-dove-db.dts
arch/arm/boot/dts/dove.dtsi
arch/arm/boot/dts/kirkwood-db-88f6281.dts
arch/arm/boot/dts/kirkwood-db-88f6282.dts
arch/arm/boot/dts/kirkwood-db.dtsi
arch/arm/boot/dts/kirkwood-dnskw.dtsi
arch/arm/boot/dts/kirkwood-dockstar.dts
arch/arm/boot/dts/kirkwood-goflexnet.dts
arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
arch/arm/boot/dts/kirkwood-ib62x0.dts
arch/arm/boot/dts/kirkwood-iconnect.dts
arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
arch/arm/boot/dts/kirkwood-km_kirkwood.dts
arch/arm/boot/dts/kirkwood-mplcec4.dts
arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
arch/arm/boot/dts/kirkwood-nsa310-common.dtsi
arch/arm/boot/dts/kirkwood-nsa310.dts
arch/arm/boot/dts/kirkwood-openblocks_a6.dts
arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
arch/arm/boot/dts/kirkwood-topkick.dts
arch/arm/boot/dts/kirkwood-ts219-6282.dts
arch/arm/boot/dts/kirkwood.dtsi
arch/arm/boot/dts/omap3-beagle-xm.dts
arch/arm/boot/dts/omap3.dtsi
arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
arch/arm/boot/dts/r8a7790.dtsi
arch/arm/boot/dts/r8a7791-koelsch.dts [new file with mode: 0644]
arch/arm/boot/dts/s3c6400.dtsi [new file with mode: 0644]
arch/arm/boot/dts/s3c6410-mini6410.dts [new file with mode: 0644]
arch/arm/boot/dts/s3c6410-smdk6410.dts [new file with mode: 0644]
arch/arm/boot/dts/s3c6410.dtsi [new file with mode: 0644]
arch/arm/boot/dts/s3c64xx-pinctrl.dtsi [new file with mode: 0644]
arch/arm/boot/dts/s3c64xx.dtsi [new file with mode: 0644]
arch/arm/boot/dts/ste-dbx5x0.dtsi
arch/arm/boot/dts/ste-href-stuib.dtsi [moved from arch/arm/boot/dts/ste-stuib.dtsi with 95% similarity]
arch/arm/boot/dts/ste-href-tvk1281618.dtsi [new file with mode: 0644]
arch/arm/boot/dts/ste-href.dtsi
arch/arm/boot/dts/ste-hrefprev60-stuib.dts [new file with mode: 0644]
arch/arm/boot/dts/ste-hrefprev60-tvk.dts [new file with mode: 0644]
arch/arm/boot/dts/ste-hrefprev60.dtsi [moved from arch/arm/boot/dts/ste-hrefprev60.dts with 60% similarity]
arch/arm/boot/dts/ste-hrefv60plus-stuib.dts [new file with mode: 0644]
arch/arm/boot/dts/ste-hrefv60plus-tvk.dts [new file with mode: 0644]
arch/arm/boot/dts/ste-hrefv60plus.dts [deleted file]
arch/arm/boot/dts/ste-hrefv60plus.dtsi [new file with mode: 0644]
arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
arch/arm/boot/dts/ste-snowball.dts
arch/arm/common/Makefile
arch/arm/common/via82c505.c [deleted file]
arch/arm/configs/bockw_defconfig
arch/arm/configs/koelsch_defconfig [new file with mode: 0644]
arch/arm/configs/lager_defconfig
arch/arm/configs/marzen_defconfig
arch/arm/configs/shark_defconfig [deleted file]
arch/arm/configs/u8500_defconfig
arch/arm/include/asm/mach/pci.h
arch/arm/include/asm/sched_clock.h [deleted file]
arch/arm/kernel/time.c
arch/arm/lib/Makefile
arch/arm/lib/io-shark.c [deleted file]
arch/arm/mach-bcm/board_bcm281xx.c
arch/arm/mach-bcm2835/bcm2835.c
arch/arm/mach-clps711x/common.c
arch/arm/mach-davinci/board-da830-evm.c
arch/arm/mach-davinci/board-da850-evm.c
arch/arm/mach-davinci/board-dm355-evm.c
arch/arm/mach-davinci/board-dm355-leopard.c
arch/arm/mach-davinci/board-dm365-evm.c
arch/arm/mach-davinci/board-dm644x-evm.c
arch/arm/mach-davinci/board-dm646x-evm.c
arch/arm/mach-davinci/board-neuros-osd2.c
arch/arm/mach-davinci/board-omapl138-hawk.c
arch/arm/mach-davinci/da830.c
arch/arm/mach-davinci/da850.c
arch/arm/mach-davinci/davinci.h
arch/arm/mach-davinci/devices-da8xx.c
arch/arm/mach-davinci/devices.c
arch/arm/mach-davinci/dm355.c
arch/arm/mach-davinci/dm365.c
arch/arm/mach-davinci/dm644x.c
arch/arm/mach-davinci/dm646x.c
arch/arm/mach-davinci/include/mach/da8xx.h
arch/arm/mach-davinci/include/mach/gpio-davinci.h [deleted file]
arch/arm/mach-davinci/include/mach/gpio.h [deleted file]
arch/arm/mach-dove/board-dt.c
arch/arm/mach-exynos/common.c
arch/arm/mach-exynos/common.h
arch/arm/mach-exynos/mach-exynos4-dt.c
arch/arm/mach-exynos/mach-exynos5-dt.c
arch/arm/mach-highbank/Kconfig
arch/arm/mach-highbank/highbank.c
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/clk-imx51-imx53.c
arch/arm/mach-imx/common.h
arch/arm/mach-imx/imx51-dt.c
arch/arm/mach-imx/mach-imx53.c
arch/arm/mach-imx/mach-imx6q.c
arch/arm/mach-imx/mach-imx6sl.c
arch/arm/mach-imx/mach-vf610.c
arch/arm/mach-kirkwood/board-dt.c
arch/arm/mach-mxs/mach-mxs.c
arch/arm/mach-nomadik/cpu-8815.c
arch/arm/mach-nspire/nspire.c
arch/arm/mach-omap2/Kconfig
arch/arm/mach-omap2/board-generic.c
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/gpmc-onenand.c
arch/arm/mach-omap2/mux.h
arch/arm/mach-omap2/timer.c
arch/arm/mach-prima2/common.c
arch/arm/mach-prima2/common.h
arch/arm/mach-rockchip/rockchip.c
arch/arm/mach-s3c64xx/Kconfig
arch/arm/mach-s3c64xx/Makefile
arch/arm/mach-s3c64xx/common.c
arch/arm/mach-s3c64xx/dma.c
arch/arm/mach-s3c64xx/irq-pm.c
arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c [new file with mode: 0644]
arch/arm/mach-s3c64xx/s3c6400.c
arch/arm/mach-s3c64xx/s3c6410.c
arch/arm/mach-shark/Makefile [deleted file]
arch/arm/mach-shark/Makefile.boot [deleted file]
arch/arm/mach-shark/core.c [deleted file]
arch/arm/mach-shark/dma.c [deleted file]
arch/arm/mach-shark/include/mach/debug-macro.S [deleted file]
arch/arm/mach-shark/include/mach/entry-macro.S [deleted file]
arch/arm/mach-shark/include/mach/framebuffer.h [deleted file]
arch/arm/mach-shark/include/mach/hardware.h [deleted file]
arch/arm/mach-shark/include/mach/irqs.h [deleted file]
arch/arm/mach-shark/include/mach/isa-dma.h [deleted file]
arch/arm/mach-shark/include/mach/memory.h [deleted file]
arch/arm/mach-shark/include/mach/timex.h [deleted file]
arch/arm/mach-shark/include/mach/uncompress.h [deleted file]
arch/arm/mach-shark/irq.c [deleted file]
arch/arm/mach-shark/leds.c [deleted file]
arch/arm/mach-shark/pci.c [deleted file]
arch/arm/mach-shmobile/Kconfig
arch/arm/mach-shmobile/Makefile
arch/arm/mach-shmobile/Makefile.boot
arch/arm/mach-shmobile/board-ape6evm.c
arch/arm/mach-shmobile/board-armadillo800eva.c
arch/arm/mach-shmobile/board-bockw.c
arch/arm/mach-shmobile/board-koelsch.c [new file with mode: 0644]
arch/arm/mach-shmobile/board-kzm9g.c
arch/arm/mach-shmobile/board-lager.c
arch/arm/mach-shmobile/board-marzen.c
arch/arm/mach-shmobile/include/mach/r8a7778.h
arch/arm/mach-shmobile/setup-r8a7778.c
arch/arm/mach-socfpga/Kconfig
arch/arm/mach-socfpga/socfpga.c
arch/arm/mach-spear/Kconfig
arch/arm/mach-sti/board-dt.c
arch/arm/mach-sunxi/sunxi.c
arch/arm/mach-tegra/Kconfig
arch/arm/mach-tegra/common.c
arch/arm/mach-tegra/pmc.c
arch/arm/mach-tegra/pmc.h
arch/arm/mach-tegra/tegra.c
arch/arm/mach-u300/Kconfig
arch/arm/mach-ux500/Kconfig
arch/arm/mach-ux500/Makefile
arch/arm/mach-ux500/board-mop500-audio.c
arch/arm/mach-ux500/board-mop500-sdi.c
arch/arm/mach-ux500/board-mop500-stuib.c [deleted file]
arch/arm/mach-ux500/board-mop500-u8500uib.c [deleted file]
arch/arm/mach-ux500/board-mop500-uib.c [deleted file]
arch/arm/mach-ux500/board-mop500.c
arch/arm/mach-ux500/board-mop500.h
arch/arm/mach-ux500/cpu-db8500.c
arch/arm/mach-ux500/cpu.c
arch/arm/mach-ux500/devices-common.c [deleted file]
arch/arm/mach-ux500/devices-common.h [deleted file]
arch/arm/mach-ux500/devices-db8500.c
arch/arm/mach-ux500/devices-db8500.h
arch/arm/mach-ux500/devices.h
arch/arm/mach-ux500/setup.h
arch/arm/mach-ux500/timer.c
arch/arm/mach-ux500/usb.c [deleted file]
arch/arm/mach-vexpress/Kconfig
arch/arm/mach-vexpress/v2m.c
arch/arm/mach-vt8500/Kconfig
arch/arm/mach-vt8500/common.h [deleted file]
arch/arm/mach-vt8500/vt8500.c
arch/arm/plat-samsung/init.c
drivers/block/Kconfig
drivers/clk/clk-bcm2835.c
drivers/clk/clk-highbank.c
drivers/clk/clk-nomadik.c
drivers/clk/clk-prima2.c
drivers/clk/clk-vt8500.c
drivers/clk/mxs/clk-imx23.c
drivers/clk/mxs/clk-imx28.c
drivers/clk/sunxi/clk-sunxi.c
drivers/clk/ux500/Makefile
drivers/clk/ux500/u8500_of_clk.c [new file with mode: 0644]
drivers/clk/ux500/u8540_clk.c
drivers/gpio/gpio-davinci.c
drivers/gpio/gpio-samsung.c
drivers/gpio/gpio-tnetv107x.c
drivers/ide/Kconfig
drivers/input/serio/Kconfig
drivers/irqchip/irq-armada-370-xp.c
drivers/irqchip/irq-vic.c
drivers/mfd/db8500-prcmu.c
drivers/mfd/dbx500-prcmu-regs.h
drivers/pci/host/Kconfig
drivers/pci/host/pci-mvebu.c
drivers/usb/musb/ux500.c
drivers/video/cyber2000fb.c
include/dt-bindings/mfd/dbx500-prcmu.h [new file with mode: 0644]
include/dt-bindings/pinctrl/omap.h
include/linux/clk/mxs.h
include/linux/clk/sunxi.h [deleted file]
include/linux/mfd/dbx500-prcmu.h
include/linux/platform_data/clk-nomadik.h [deleted file]
include/linux/platform_data/clk-ux500.h
include/linux/platform_data/gpio-davinci.h [new file with mode: 0644]

index 61df564c0d238613e55b3057192528db54151e8b..d74091a8a3bfd243490d83faedd452ec9a2c426c 100644 (file)
@@ -4,6 +4,8 @@ Marvell Armada 370 and Armada XP Interrupt Controller
 Required properties:
 - compatible: Should be "marvell,mpic"
 - interrupt-controller: Identifies the node as an interrupt controller.
+- msi-controller: Identifies the node as an PCI Message Signaled
+  Interrupt controller.
 - #interrupt-cells: The number of cells to define the interrupts. Should be 1.
   The cell is the IRQ number
 
@@ -24,6 +26,7 @@ Example:
               #address-cells = <1>;
               #size-cells = <1>;
               interrupt-controller;
+              msi-controller;
               reg = <0xd0020a00 0x1d0>,
                     <0xd0021070 0x58>;
         };
index 266716b2343723525278d34db2f1c4c05ae2826b..dd527216c5fbddfce790fe9bf4a2342f56e025f1 100644 (file)
@@ -18,6 +18,15 @@ Required properties:
 Optional properties:
 
 - interrupts : Interrupt source for parent controllers if the VIC is nested.
+- valid-mask : A one cell big bit mask of valid interrupt sources. Each bit
+  represents single interrupt source, starting from source 0 at LSb and ending
+  at source 31 at MSb. A bit that is set means that the source is wired and
+  clear means otherwise. If unspecified, defaults to all valid.
+- valid-wakeup-mask : A one cell big bit mask of interrupt sources that can be
+  configured as wake up source for the system. Order of bits is the same as for
+  valid-mask property. A set bit means that this interrupt source can be
+  configured as a wake up source for the system. If unspecied, defaults to all
+  interrupt sources configurable as wake up sources.
 
 Example:
 
@@ -26,4 +35,7 @@ Example:
                interrupt-controller;
                #interrupt-cells = <1>;
                reg = <0x60000 0x1000>;
+
+               valid-mask = <0xffffff7f>;
+               valid-wakeup-mask = <0x0000ff7f>;
        };
index cffc93d97f54800cb91d47cf50d666abe16e8758..fc2910fa7e45fdbbe41a0ccdd947e736ca2e0e75 100644 (file)
@@ -1,10 +1,10 @@
-* Gated Clock bindings for Marvell Orion SoCs
+* Gated Clock bindings for Marvell EBU SoCs
 
-Marvell Dove and Kirkwood allow some peripheral clocks to be gated to save
-some power. The clock consumer should specify the desired clock by having
-the clock ID in its "clocks" phandle cell. The clock ID is directly mapped to
-the corresponding clock gating control bit in HW to ease manual clock lookup
-in datasheet.
+Marvell Armada 370/XP, Dove and Kirkwood allow some peripheral clocks to be
+gated to save some power. The clock consumer should specify the desired clock
+by having the clock ID in its "clocks" phandle cell. The clock ID is directly
+mapped to the corresponding clock gating control bit in HW to ease manual clock
+lookup in datasheet.
 
 The following is a list of provided IDs for Armada 370:
 ID     Clock   Peripheral
@@ -94,6 +94,8 @@ ID    Clock   Peripheral
 
 Required properties:
 - compatible : shall be one of the following:
+       "marvell,armada-370-gating-clock" - for Armada 370 SoC clock gating
+       "marvell,armada-xp-gating-clock" - for Armada XP SoC clock gating
        "marvell,dove-gating-clock" - for Dove SoC clock gating
        "marvell,kirkwood-gating-clock" - for Kirkwood SoC clock gating
 - reg : shall be the register address of the Clock Gating Control register
index 9556e2fedf6deb77a1b49579521b7744f7318d1e..08c716b2c6b6c411a13a04055ec267ce3ac5e4f2 100644 (file)
@@ -5,6 +5,7 @@ Mandatory properties:
 - compatible: one of the following values:
     marvell,armada-370-pcie
     marvell,armada-xp-pcie
+    marvell,dove-pcie
     marvell,kirkwood-pcie
 - #address-cells, set to <3>
 - #size-cells, set to <2>
@@ -14,6 +15,8 @@ Mandatory properties:
 - ranges: ranges describing the MMIO registers to control the PCIe
   interfaces, and ranges describing the MBus windows needed to access
   the memory and I/O regions of each PCIe interface.
+- msi-parent: Link to the hardware entity that serves as the Message
+  Signaled Interrupt controller for this PCI controller.
 
 The ranges describing the MMIO registers have the following layout:
 
@@ -74,6 +77,8 @@ and the following optional properties:
 - marvell,pcie-lane: the physical PCIe lane number, for ports having
   multiple lanes. If this property is not found, we assume that the
   value is 0.
+- reset-gpios: optional gpio to PERST#
+- reset-delay-us: delay in us to wait after reset de-assertion
 
 Example:
 
@@ -86,6 +91,7 @@ pcie-controller {
        #size-cells = <2>;
 
        bus-range = <0x00 0xff>;
+       msi-parent = <&mpic>;
 
        ranges =
               <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000   /* Port 0.0 registers */
@@ -135,6 +141,10 @@ pcie-controller {
                interrupt-map = <0 0 0 0 &mpic 58>;
                marvell,pcie-port = <0>;
                marvell,pcie-lane = <0>;
+               /* low-active PERST# reset on GPIO 25 */
+               reset-gpios = <&gpio0 25 1>;
+               /* wait 20ms for device settle after reset deassertion */
+               reset-delay-us = <20000>;
                clocks = <&gateclk 5>;
                status = "disabled";
        };
index 330d6ec154016caf4bccd0a5bde0d36847412fcb..439a41c79afacd680a6c8309935ab37573cd6326 100644 (file)
@@ -15,7 +15,7 @@ Optional properties:
 Example:
 
 usb_per5@a03e0000 {
-       compatible = "stericsson,db8500-musb", "mentor,musb";
+       compatible = "stericsson,db8500-musb";
        reg = <0xa03e0000 0x10000>;
        interrupts = <0 23 0x4>;
        interrupt-names = "mc";
index 8a0cbf3cf2c8c01c5be662eef372eff4060daffc..d4dc915f3ef55437d4635f5d146aad0a8fd6d3f9 100644 (file)
@@ -1148,11 +1148,6 @@ F:       drivers/net/ethernet/i825xx/ether1*
 F:     drivers/net/ethernet/seeq/ether3*
 F:     drivers/scsi/arm/
 
-ARM/SHARK MACHINE SUPPORT
-M:     Alexander Schulz <alex@shark-linux.de>
-W:     http://www.shark-linux.de/shark.html
-S:     Maintained
-
 ARM/SAMSUNG ARM ARCHITECTURES
 M:     Ben Dooks <ben-linux@fluff.org>
 M:     Kukjin Kim <kgene.kim@samsung.com>
index 5ef81367a8e8897cc762be861baddd7b64f08b27..15187053652913c761baeedd722f0b2b9b9e4d1b 100644 (file)
@@ -358,7 +358,6 @@ config ARCH_AT91
        bool "Atmel AT91"
        select ARCH_REQUIRE_GPIOLIB
        select CLKDEV_LOOKUP
-       select HAVE_CLK
        select IRQ_DOMAIN
        select NEED_MACH_GPIO_H
        select NEED_MACH_IO_H if PCCARD
@@ -372,7 +371,6 @@ config ARCH_CLPS711X
        bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
        select ARCH_REQUIRE_GPIOLIB
        select AUTO_ZRELADDR
-       select CLKDEV_LOOKUP
        select CLKSRC_MMIO
        select COMMON_CLK
        select CPU_ARM720T
@@ -631,7 +629,6 @@ config ARCH_PXA
 config ARCH_MSM
        bool "Qualcomm MSM"
        select ARCH_REQUIRE_GPIOLIB
-       select CLKDEV_LOOKUP
        select CLKSRC_OF if OF
        select COMMON_CLK
        select GENERIC_CLOCKEVENTS
@@ -649,7 +646,6 @@ config ARCH_SHMOBILE
        select GENERIC_CLOCKEVENTS
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
-       select HAVE_CLK
        select HAVE_MACH_CLKDEV
        select HAVE_SMP
        select MIGHT_HAVE_CACHE_L2X0
@@ -706,7 +702,6 @@ config ARCH_S3C24XX
        select CLKSRC_SAMSUNG_PWM
        select GENERIC_CLOCKEVENTS
        select GPIO_SAMSUNG
-       select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select HAVE_S3C_RTC if RTC_CLASS
@@ -731,7 +726,6 @@ config ARCH_S3C64XX
        select CPU_V6
        select GENERIC_CLOCKEVENTS
        select GPIO_SAMSUNG
-       select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select HAVE_TCM
@@ -754,7 +748,6 @@ config ARCH_S5P64X0
        select CPU_V6
        select GENERIC_CLOCKEVENTS
        select GPIO_SAMSUNG
-       select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select HAVE_S3C_RTC if RTC_CLASS
@@ -773,7 +766,6 @@ config ARCH_S5PC100
        select CPU_V7
        select GENERIC_CLOCKEVENTS
        select GPIO_SAMSUNG
-       select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select HAVE_S3C_RTC if RTC_CLASS
@@ -793,7 +785,6 @@ config ARCH_S5PV210
        select CPU_V7
        select GENERIC_CLOCKEVENTS
        select GPIO_SAMSUNG
-       select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select HAVE_S3C_RTC if RTC_CLASS
@@ -810,11 +801,9 @@ config ARCH_EXYNOS
        select ARCH_REQUIRE_GPIOLIB
        select ARCH_SPARSEMEM_ENABLE
        select ARM_GIC
-       select CLKDEV_LOOKUP
        select COMMON_CLK
        select CPU_V7
        select GENERIC_CLOCKEVENTS
-       select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select HAVE_S3C_RTC if RTC_CLASS
@@ -824,20 +813,6 @@ config ARCH_EXYNOS
        help
          Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
 
-config ARCH_SHARK
-       bool "Shark"
-       select ARCH_USES_GETTIMEOFFSET
-       select CPU_SA110
-       select ISA
-       select ISA_DMA
-       select NEED_MACH_MEMORY_H
-       select PCI
-       select VIRT_TO_BUS
-       select ZONE_DMA
-       help
-         Support for the StrongARM based Digital DNARD machine, also known
-         as "Shark" (<http://www.shark-linux.de/shark.html>).
-
 config ARCH_DAVINCI
        bool "TI DaVinci"
        select ARCH_HAS_HOLES_MEMORYMODEL
@@ -847,7 +822,6 @@ config ARCH_DAVINCI
        select GENERIC_CLOCKEVENTS
        select GENERIC_IRQ_CHIP
        select HAVE_IDE
-       select NEED_MACH_GPIO_H
        select TI_PRIV_EDMA
        select USE_OF
        select ZONE_DMA
@@ -865,7 +839,6 @@ config ARCH_OMAP1
        select CLKSRC_MMIO
        select GENERIC_CLOCKEVENTS
        select GENERIC_IRQ_CHIP
-       select HAVE_CLK
        select HAVE_IDE
        select IRQ_DOMAIN
        select NEED_MACH_IO_H if PCCARD
@@ -1431,12 +1404,6 @@ config PCI_NANOENGINE
 config PCI_SYSCALL
        def_bool PCI
 
-# Select the host bridge type
-config PCI_HOST_VIA82C505
-       bool
-       depends on PCI && ARCH_SHARK
-       default y
-
 config PCI_HOST_ITE8152
        bool
        depends on PCI && MACH_ARMCORE
index a37a50f575a27af2c95abca5c473d6a60233d8b9..92a90fefddec669e9ce677114477910eb4dd5314 100644 (file)
@@ -188,7 +188,6 @@ machine-$(CONFIG_ARCH_S5P64X0)              += s5p64x0
 machine-$(CONFIG_ARCH_S5PC100)         += s5pc100
 machine-$(CONFIG_ARCH_S5PV210)         += s5pv210
 machine-$(CONFIG_ARCH_SA1100)          += sa1100
-machine-$(CONFIG_ARCH_SHARK)           += shark
 machine-$(CONFIG_ARCH_SHMOBILE)        += shmobile
 machine-$(CONFIG_ARCH_SHMOBILE_MULTI)  += shmobile
 machine-$(CONFIG_ARCH_SIRF)            += prima2
diff --git a/arch/arm/arm-soc-for-next-contents.txt b/arch/arm/arm-soc-for-next-contents.txt
new file mode 100644 (file)
index 0000000..ca7d80b
--- /dev/null
@@ -0,0 +1,61 @@
+
+
+next/cleanup
+       shark/removal
+                 git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git tags/del-shark-for-v3.13
+       cleanup/dt-clock
+               https://github.com/shesselba/linux-dove.git clk-of-init-v2_for-3.13
+       patch
+               ARM: drop explicit selection of HAVE_CLK and CLKDEV_LOOKUP
+       reneasas/initdata-cleanup
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-fixes5-for-v3.12
+       renesas/cleanup
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-cleanup-for-v3.13
+       patch
+               clk: nomadik: fix missing __init on nomadik_src_init
+       renesas/cleanup2
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-cleanup2-for-v3.13
+       patch
+               ARM: clps711x: Use linux/sched_clock.h
+               ARM: Remove temporary sched_clock.h header
+
+next/soc
+       samsung/s3c64xx-clk
+               http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git tags/samsung-clk-s3c64xx
+       patch
+               ARM: davinci: remove deprecated IRQF_DISABLED
+       renesas/soc
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc-for-v3.13
+       renesas/smp
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-smp-for-v3.13
+       renesas/soc2
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc2-for-v3.13
+       keystone/soc
+               git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git tags/keystone-soc-for-arm-soc
+
+next/drivers
+       davinci/gpio
+               git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci.git tags/davinci-for-v3.13/gpio
+       mvebu/drivers
+               git://git.infradead.org/linux-mvebu.git tags/drivers-3.13
+
+next/boards
+       renesas/boards
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git renesas-boards-for-v3.13
+       renesas/defconfig
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-defconfig-for-v3.13
+
+next/dt
+       samsung/s3c64xx-dt
+                 http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git tags/samsung-dt-s3c64xx
+       ux500/dt
+               git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git tags/ux500-dt-for-v3.13-2
+               patch "ARM: ux500: enable appended dtb in u8500_defconfig"
+       ux500/dt2
+               git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git tags/ux500-devicetree-2
+       renesas/dt
+               git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-dt-for-v3.13
+       mvebu/dt
+               git://git.infradead.org/linux-mvebu.git tags/dt-3.13
+               git://git.infradead.org/linux-mvebu.git tags/dt-3.13-2
+
index 7ac1610252baad07ce50c2a9381da25965952fdc..e7190bb5998e149906a4763e815712953c7421f5 100644 (file)
@@ -44,10 +44,6 @@ ifeq ($(CONFIG_ARCH_ACORN),y)
 OBJS           += ll_char_wr.o font.o
 endif
 
-ifeq ($(CONFIG_ARCH_SHARK),y)
-OBJS           += head-shark.o ofw-shark.o
-endif
-
 ifeq ($(CONFIG_ARCH_SA1100),y)
 OBJS           += head-sa1100.o
 endif
diff --git a/arch/arm/boot/compressed/head-shark.S b/arch/arm/boot/compressed/head-shark.S
deleted file mode 100644 (file)
index 92b5689..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/* The head-file for the Shark
- * by Alexander Schulz
- *
- * Does the following:
- * - get the memory layout from firmware. This can only be done as long as the mmu
- *   is still on.
- * - switch the mmu off, so we have physical addresses
- * - copy the kernel to 0x08508000. This is done to have a fixed address where the
- *   C-parts (misc.c) are executed. This address must be known at compile-time,
- *   but the load-address of the kernel depends on how much memory is installed.
- * - Jump to this location.
- * - Set r8 with 0, r7 with the architecture ID for head.S
- */
-
-#include <linux/linkage.h>
-
-#include <asm/assembler.h>
-       
-               .section        ".start", "ax"
-
-               .arch armv4
-               b       __beginning
-       
-__ofw_data:    .long   0                               @ the number of memory blocks
-               .space  128                             @ (startaddr,size) ...
-               .space  128                             @ bootargs
-               .align
-
-__beginning:   mov     r4, r0                          @ save the entry to the firmware
-
-               mov     r0, #0xC0                       @ disable irq and fiq
-               mov     r1, r0
-               mrs     r3, cpsr
-               bic     r2, r3, r0
-               eor     r2, r2, r1
-               msr     cpsr_c, r2
-
-               mov     r0, r4                          @ get the Memory layout from firmware
-               adr     r1, __ofw_data
-               add     r2, r1, #4
-               mov     lr, pc
-               b       ofw_init
-               mov     r1, #0
-
-               adr     r2, __mmu_off                   @ calculate physical address
-               sub     r2, r2, #0xf0000000             @ openprom maps us at f000 virt, 0e50 phys
-               adr     r0, __ofw_data
-               ldr     r0, [r0, #4]
-               add     r2, r2, r0
-               add     r2, r2, #0x00500000
-
-               mrc     p15, 0, r3, c1, c0
-               bic     r3, r3, #0xC                    @ Write Buffer and DCache
-               bic     r3, r3, #0x1000                 @ ICache
-               mcr     p15, 0, r3, c1, c0              @ disabled
-
-               mov     r0, #0
-               mcr     p15, 0, r0, c7, c7              @ flush I,D caches on v4
-               mcr     p15, 0, r0, c7, c10, 4          @ drain write buffer on v4
-               mcr     p15, 0, r0, c8, c7              @ flush I,D TLBs on v4
-
-               bic     r3, r3, #0x1                    @ MMU
-               mcr     p15, 0, r3, c1, c0              @ disabled
-
-               mov     pc, r2
-
-__copy_target: .long   0x08507FFC
-__copy_end:    .long   0x08607FFC
-               
-               .word   _start
-               .word   __bss_start
-
-               .align
-__temp_stack:  .space 128
-
-__mmu_off:
-               adr     r0, __ofw_data                  @ read the 1. entry of the memory map
-               ldr     r0, [r0, #4]
-               orr     r0, r0, #0x00600000
-               sub     r0, r0, #4
-       
-               ldr     r1, __copy_end
-               ldr     r3, __copy_target
-
-/* r0 = 0x0e600000 (current end of kernelcode)
- * r3 = 0x08508000 (where it should begin)
- * r1 = 0x08608000 (end of copying area, 1MB)
- * The kernel is compressed, so 1 MB should be enough.
- * copy the kernel to the beginning of physical memory
- * We start from the highest address, so we can copy
- * from 0x08500000 to 0x08508000 if we have only 8MB
- */
-
-/* As we get more 2.6-kernels it gets more and more
- * uncomfortable to be bound to kernel images of 1MB only.
- * So we add a loop here, to be able to copy some more.
- * Alexander Schulz 2005-07-17
- */
-
-               mov     r4, #3                          @ How many megabytes to copy
-
-
-__MoveCode:    sub     r4, r4, #1
-       
-__Copy:                ldr     r2, [r0], #-4
-               str     r2, [r1], #-4
-               teq     r1, r3
-               bne     __Copy
-
-               /* The firmware maps us in blocks of 1 MB, the next block is
-                  _below_ the last one. So our decrementing source pointer
-                  ist right here, but the destination pointer must be increased
-                  by 2 MB */
-               add     r1, r1, #0x00200000
-               add     r3, r3, #0x00100000
-
-               teq     r4, #0
-               bne     __MoveCode
-
-
-               /* and jump to it */
-               adr     r2, __go_on                     @ where we want to jump
-               adr     r0, __ofw_data                  @ read the 1. entry of the memory map
-               ldr     r0, [r0, #4]
-               sub     r2, r2, r0                      @ we are mapped add 0e50 now, sub that (-0e00)
-               sub     r2, r2, #0x00500000             @ -0050
-               ldr     r0, __copy_target               @ and add 0850 8000 instead
-               add     r0, r0, #4
-               add     r2, r2, r0
-               mov     pc, r2                          @ and jump there
-
-__go_on:
-               adr     sp, __temp_stack
-               add     sp, sp, #128
-               adr     r0, __ofw_data
-               mov     lr, pc
-               b       create_params
-       
-               mov     r8, #0
-               mov     r7, #15
diff --git a/arch/arm/boot/compressed/ofw-shark.c b/arch/arm/boot/compressed/ofw-shark.c
deleted file mode 100644 (file)
index 465c54b..0000000
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * linux/arch/arm/boot/compressed/ofw-shark.c
- *
- * by Alexander Schulz
- *
- * This file is used to get some basic information
- * about the memory layout of the shark we are running
- * on. Memory is usually divided in blocks a 8 MB.
- * And bootargs are copied from OpenFirmware.
- */
-
-
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <asm/setup.h>
-#include <asm/page.h>
-
-
-asmlinkage void
-create_params (unsigned long *buffer)
-{
-       /* Is there a better address? Also change in mach-shark/core.c */
-       struct tag *tag = (struct tag *) 0x08003000;
-       int j,i,m,k,nr_banks,size;
-       unsigned char *c;
-
-       k = 0;
-
-       /* Head of the taglist */
-       tag->hdr.tag  = ATAG_CORE;
-       tag->hdr.size = tag_size(tag_core);
-       tag->u.core.flags = 1;
-       tag->u.core.pagesize = PAGE_SIZE;
-       tag->u.core.rootdev = 0;
-
-       /* Build up one tagged block for each memory region */
-       size=0;
-       nr_banks=(unsigned int) buffer[0];
-       for (j=0;j<nr_banks;j++){
-               /* search the lowest address and put it into the next entry   */
-               /* not a fast sort algorithm, but there are at most 8 entries */
-               /* and this is used only once anyway                          */
-               m=0xffffffff;
-               for (i=0;i<(unsigned int) buffer[0];i++){
-                       if (buffer[2*i+1]<m) {
-                               m=buffer[2*i+1];
-                               k=i;
-                       }
-               }
-         
-               tag = tag_next(tag);
-               tag->hdr.tag = ATAG_MEM;
-               tag->hdr.size = tag_size(tag_mem32);
-               tag->u.mem.size = buffer[2*k+2];
-               tag->u.mem.start = buffer[2*k+1];
-
-               size += buffer[2*k+2];
-
-               buffer[2*k+1]=0xffffffff;                    /* mark as copied */
-       }
-       
-       /* The command line */
-       tag = tag_next(tag);
-       tag->hdr.tag = ATAG_CMDLINE;
-       
-       c=(unsigned char *)(&buffer[34]);
-       j=0;
-       while (*c) tag->u.cmdline.cmdline[j++]=*c++;
-
-       tag->u.cmdline.cmdline[j]=0;
-       tag->hdr.size = (j + 7 + sizeof(struct tag_header)) >> 2;
-
-       /* Hardware revision */
-       tag = tag_next(tag);
-       tag->hdr.tag = ATAG_REVISION;
-       tag->hdr.size = tag_size(tag_revision);
-       tag->u.revision.rev = ((unsigned char) buffer[33])-'0';
-
-       /* End of the taglist */
-       tag = tag_next(tag);
-       tag->hdr.tag = 0;
-       tag->hdr.size = 0;
-}
-
-
-typedef int (*ofw_handle_t)(void *);
-
-/* Everything below is called with a wrong MMU setting.
- * This means: no string constants, no initialization of
- * arrays, no global variables! This is ugly but I didn't
- * want to write this in assembler :-)
- */
-
-int
-of_decode_int(const unsigned char *p)
-{
-       unsigned int i = *p++ << 8;
-       i = (i + *p++) << 8;
-       i = (i + *p++) << 8;
-       return (i + *p);
-}
-  
-int
-OF_finddevice(ofw_handle_t openfirmware, char *name)
-{
-       unsigned int args[8];
-       char service[12];
-
-       service[0]='f';
-       service[1]='i';
-       service[2]='n';
-       service[3]='d';
-       service[4]='d';
-       service[5]='e';
-       service[6]='v';
-       service[7]='i';
-       service[8]='c';
-       service[9]='e';
-       service[10]='\0';
-
-       args[0]=(unsigned int)service;
-       args[1]=1;
-       args[2]=1;
-       args[3]=(unsigned int)name;
-
-       if (openfirmware(args) == -1)
-               return -1;
-       return args[4];
-}
-
-int
-OF_getproplen(ofw_handle_t openfirmware, int handle, char *prop)
-{
-       unsigned int args[8];
-       char service[12];
-
-       service[0]='g';
-       service[1]='e';
-       service[2]='t';
-       service[3]='p';
-       service[4]='r';
-       service[5]='o';
-       service[6]='p';
-       service[7]='l';
-       service[8]='e';
-       service[9]='n';
-       service[10]='\0';
-
-       args[0] = (unsigned int)service;
-       args[1] = 2;
-       args[2] = 1;
-       args[3] = (unsigned int)handle;
-       args[4] = (unsigned int)prop;
-
-       if (openfirmware(args) == -1)
-               return -1;
-       return args[5];
-}
-  
-int
-OF_getprop(ofw_handle_t openfirmware, int handle, char *prop, void *buf, unsigned int buflen)
-{
-       unsigned int args[8];
-       char service[8];
-
-       service[0]='g';
-       service[1]='e';
-       service[2]='t';
-       service[3]='p';
-       service[4]='r';
-       service[5]='o';
-       service[6]='p';
-       service[7]='\0';
-
-       args[0] = (unsigned int)service;
-       args[1] = 4;
-       args[2] = 1;
-       args[3] = (unsigned int)handle;
-       args[4] = (unsigned int)prop;
-       args[5] = (unsigned int)buf;
-       args[6] = buflen;
-
-       if (openfirmware(args) == -1)
-               return -1;
-       return args[7];
-}
-  
-asmlinkage void ofw_init(ofw_handle_t o, int *nomr, int *pointer)
-{
-       int phandle,i,mem_len,buffer[32];
-       char temp[15];
-  
-       temp[0]='/';
-       temp[1]='m';
-       temp[2]='e';
-       temp[3]='m';
-       temp[4]='o';
-       temp[5]='r';
-       temp[6]='y';
-       temp[7]='\0';
-
-       phandle=OF_finddevice(o,temp);
-
-       temp[0]='r';
-       temp[1]='e';
-       temp[2]='g';
-       temp[3]='\0';
-
-       mem_len = OF_getproplen(o,phandle, temp);
-       OF_getprop(o,phandle, temp, buffer, mem_len);
-       *nomr=mem_len >> 3;
-
-       for (i=0; i<=mem_len/4; i++) pointer[i]=of_decode_int((const unsigned char *)&buffer[i]);
-
-       temp[0]='/';
-       temp[1]='c';
-       temp[2]='h';
-       temp[3]='o';
-       temp[4]='s';
-       temp[5]='e';
-       temp[6]='n';
-       temp[7]='\0';
-
-       phandle=OF_finddevice(o,temp);
-
-       temp[0]='b';
-       temp[1]='o';
-       temp[2]='o';
-       temp[3]='t';
-       temp[4]='a';
-       temp[5]='r';
-       temp[6]='g';
-       temp[7]='s';
-       temp[8]='\0';
-
-       mem_len = OF_getproplen(o,phandle, temp);
-       OF_getprop(o,phandle, temp, buffer, mem_len);
-       if (mem_len > 128) mem_len=128;
-       for (i=0; i<=mem_len/4; i++) pointer[i+33]=buffer[i];
-       pointer[i+33]=0;
-
-       temp[0]='/';
-       temp[1]='\0';
-       phandle=OF_finddevice(o,temp);
-       temp[0]='b';
-       temp[1]='a';
-       temp[2]='n';
-       temp[3]='n';
-       temp[4]='e';
-       temp[5]='r';
-       temp[6]='-';
-       temp[7]='n';
-       temp[8]='a';
-       temp[9]='m';
-       temp[10]='e';
-       temp[11]='\0';
-       mem_len = OF_getproplen(o,phandle, temp);
-       OF_getprop(o,phandle, temp, buffer, mem_len);
-       * ((unsigned char *) &pointer[32]) = ((unsigned char *) buffer)[mem_len-2];
-}
index 802720e3e8fd5c72004c14cce0bc572a0355356a..7e775351c9cb2d2aedd751aa86d6d7d867c1dd1f 100644 (file)
@@ -51,6 +51,7 @@ dtb-$(CONFIG_ARCH_DAVINCI) += da850-enbw-cmc.dtb \
 dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \
        dove-cubox.dtb \
        dove-d2plug.dtb \
+       dove-d3plug.dtb \
        dove-dove-db.dtb
 dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \
        exynos4210-smdkv310.dtb \
@@ -112,6 +113,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
        armada-xp-axpwifiap.dtb \
        armada-xp-db.dtb \
        armada-xp-gp.dtb \
+       armada-xp-matrix.dtb \
        armada-xp-openblocks-ax3-4.dtb
 dtb-$(CONFIG_ARCH_MXC) += \
        imx25-karo-tx25.dtb \
@@ -192,11 +194,15 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
 dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb
 dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
 dtb-$(CONFIG_ARCH_U8500) += ste-snowball.dtb \
-       ste-hrefprev60.dtb \
-       ste-hrefv60plus.dtb \
+       ste-hrefprev60-stuib.dtb \
+       ste-hrefprev60-tvk.dtb \
+       ste-hrefv60plus-stuib.dtb \
+       ste-hrefv60plus-tvk.dtb \
        ste-ccu8540.dtb \
        ste-ccu9540.dtb
 dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb
+dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb \
+       s3c6410-smdk6410.dtb
 dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
        emev2-kzm9d-reference.dtb \
        r8a7740-armadillo800eva.dtb \
@@ -205,6 +211,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
        r8a7740-armadillo800eva-reference.dtb \
        r8a7779-marzen.dtb \
        r8a7779-marzen-reference.dtb \
+       r8a7791-koelsch.dtb \
        r8a7790-lager.dtb \
        r8a7790-lager-reference.dtb \
        sh73a0-kzm9g.dtb \
index 1de2dae0fdae6f6353169dc423d75e07d4f65f6f..534e1be80df201713718bf5f072061e3a5a1f8c1 100644 (file)
                                #interrupt-cells = <1>;
                                #size-cells = <1>;
                                interrupt-controller;
+                               msi-controller;
                        };
 
                        coherency-fabric@20200 {
 
                        i2c0: i2c@11000 {
                                compatible = "marvell,mv64xxx-i2c";
-                               reg = <0x11000 0x20>;
                                #address-cells = <1>;
                                #size-cells = <0>;
                                interrupts = <31>;
 
                        i2c1: i2c@11100 {
                                compatible = "marvell,mv64xxx-i2c";
-                               reg = <0x11100 0x20>;
                                #address-cells = <1>;
                                #size-cells = <0>;
                                interrupts = <32>;
index e134d7a90c9ab9a5d24bfb500ed9206875f8f033..7a4b82e71aaf399eec2dc461656826e2fdad738a 100644 (file)
@@ -44,6 +44,7 @@
                        #address-cells = <3>;
                        #size-cells = <2>;
 
+                       msi-parent = <&mpic>;
                        bus-range = <0x00 0xff>;
 
                        ranges =
                                };
                        };
 
+                       i2c0: i2c@11000 {
+                               reg = <0x11000 0x20>;
+                       };
+
+                       i2c1: i2c@11100 {
+                               reg = <0x11100 0x20>;
+                       };
+
                        usb@50000 {
                                clocks = <&coreclk 0>;
                        };
diff --git a/arch/arm/boot/dts/armada-xp-matrix.dts b/arch/arm/boot/dts/armada-xp-matrix.dts
new file mode 100644 (file)
index 0000000..e47c49e
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Device Tree file for Marvell Armada XP Matrix board
+ *
+ * Copyright (C) 2013 Marvell
+ *
+ * Lior Amsalem <alior@marvell.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+/dts-v1/;
+#include "armada-xp-mv78460.dtsi"
+
+/ {
+       model = "Marvell Armada XP Matrix Board";
+       compatible = "marvell,axp-matrix", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp";
+
+       chosen {
+               bootargs = "console=ttyS0,115200 earlyprintk";
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <0 0x00000000 0 0x80000000>; /* 2 GB */
+       };
+
+       soc {
+               ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
+                         MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>;
+
+               internal-regs {
+                       serial@12000 {
+                               clock-frequency = <250000000>;
+                               status = "okay";
+                       };
+                       serial@12100 {
+                               clock-frequency = <250000000>;
+                               status = "okay";
+                       };
+                       serial@12200 {
+                               clock-frequency = <250000000>;
+                               status = "okay";
+                       };
+                       serial@12300 {
+                               clock-frequency = <250000000>;
+                               status = "okay";
+                       };
+
+                       sata@a0000 {
+                               nr-ports = <2>;
+                               status = "okay";
+                       };
+
+                       ethernet@30000 {
+                               status = "okay";
+                               phy-mode = "sgmii";
+                       };
+
+                       pcie-controller {
+                               status = "okay";
+
+                               pcie@1,0 {
+                                       /* Port 0, Lane 0 */
+                                       status = "okay";
+                               };
+                       };
+
+                       usb@50000 {
+                               status = "okay";
+                       };
+               };
+       };
+};
index 0358a33cba489d40c97fda0a1bd7cb5769ade9b8..3f5e6121c730a21ae2079acff268da2be20518ef 100644 (file)
@@ -57,6 +57,7 @@
                        #address-cells = <3>;
                        #size-cells = <2>;
 
+                       msi-parent = <&mpic>;
                        bus-range = <0x00 0xff>;
 
                        ranges =
index 0e82c5062243f2d20f608bbc36d80faf37645abd..3e9fd1353f895d6778972e95518850268ef6eb4e 100644 (file)
@@ -58,6 +58,7 @@
                        #address-cells = <3>;
                        #size-cells = <2>;
 
+                       msi-parent = <&mpic>;
                        bus-range = <0x00 0xff>;
 
                        ranges =
index e82c1b80af171e3915b6e09f95bfb9078d0b0201..31ba6d8fbadf8803f28aca6312c8205c79c23aee 100644 (file)
@@ -74,6 +74,7 @@
                        #address-cells = <3>;
                        #size-cells = <2>;
 
+                       msi-parent = <&mpic>;
                        bus-range = <0x00 0xff>;
 
                        ranges =
index 3058522f5aad2929092f7f7bcc2dd78a9c62c22a..281c6447e87272c0df44f89da6489876b8c9ade8 100644 (file)
                                };
                        };
 
+                       i2c0: i2c@11000 {
+                               compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
+                               reg = <0x11000 0x100>;
+                       };
+
+                       i2c1: i2c@11100 {
+                               compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
+                               reg = <0x11100 0x100>;
+                       };
+
                        usb@50000 {
                                clocks = <&gateclk 18>;
                        };
index 61a8062e56de00f741ce83582257dcb9e1f7b630..50c0d69044979fef24292cfe4c8ef7c57b8b2760 100644 (file)
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-/include/ "dove.dtsi"
+#include "dove.dtsi"
 
 / {
        model = "Compulab CM-A510";
index 022646ef4b3842278f636ed23b6f8c030a1db623..4af59b6dce0f44038e2fc79789078248b0e5e1d1 100644 (file)
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-/include/ "dove.dtsi"
+#include "dove.dtsi"
 
 / {
        model = "SolidRun CuBox";
index e2222ce94f2f2494380d137f70267f942f231646..c11d3636c8e5635004aa5ae73ceb3ab450882dd2 100644 (file)
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-/include/ "dove.dtsi"
+#include "dove.dtsi"
 
 / {
        model = "Globalscale D2Plug";
diff --git a/arch/arm/boot/dts/dove-d3plug.dts b/arch/arm/boot/dts/dove-d3plug.dts
new file mode 100644 (file)
index 0000000..f5f59bb
--- /dev/null
@@ -0,0 +1,103 @@
+/dts-v1/;
+
+#include "dove.dtsi"
+
+/ {
+       model = "Globalscale D3Plug";
+       compatible = "globalscale,d3plug", "marvell,dove";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x40000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200n8 earlyprintk root=/dev/mmcblk0p2 rw rootwait";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-0 = <&pmx_gpio_0 &pmx_gpio_1 &pmx_gpio_2>;
+               pinctrl-names = "default";
+
+               wlan-act {
+                       label = "wlan-act";
+                       gpios = <&gpio0 0 1>;
+               };
+
+               wlan-ap {
+                       label = "wlan-ap";
+                       gpios = <&gpio0 1 1>;
+               };
+
+               status {
+                       label = "status";
+                       gpios = <&gpio0 2 1>;
+               };
+       };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               usb_power: regulator@1 {
+                       compatible = "regulator-fixed";
+                       reg = <1>;
+                       regulator-name = "USB Power";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       enable-active-high;
+                       regulator-always-on;
+                       regulator-boot-on;
+                       gpio = <&gpio0 8 0>;
+                       pinctrl-0 = <&pmx_gpio_8>;
+                       pinctrl-names = "default";
+               };
+       };
+};
+
+&uart0 { status = "okay"; };
+&sata0 { status = "okay"; };
+&i2c0 { status = "okay"; };
+
+/* Samsung M8G2F eMMC */
+&sdio0 {
+       status = "okay";
+       non-removable;
+       bus-width = <4>;
+};
+
+/* Marvell SD8787 WLAN/BT */
+&sdio1 {
+       status = "okay";
+       non-removable;
+};
+
+&spi0 {
+       status = "okay";
+
+       /* spi0.0: 2M Flash Macronix MX25L1605D */
+       spi-flash@0 {
+               compatible = "st,m25l1605d";
+               spi-max-frequency = <86000000>;
+               reg = <0>;
+       };
+};
+
+&pcie {
+       status = "okay";
+       /* Fresco Logic USB3.0 xHCI controller */
+       pcie-port@0 {
+               status = "okay";
+               reset-gpios = <&gpio0 26 1>;
+               reset-delay-us = <20000>;
+               pinctrl-0 = <&pmx_camera_gpio>;
+               pinctrl-names = "default";
+       };
+       /* Mini-PCIe slot */
+       pcie-port@1 {
+               status = "okay";
+               reset-gpios = <&gpio0 25 1>;
+       };
+};
index e5a920beab450546a3231941d11c756495b1c516..bb725dca3a1000f7f8de5a9e9cd79bc2d9be38df 100644 (file)
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-/include/ "dove.dtsi"
+#include "dove.dtsi"
 
 / {
        model = "Marvell DB-MV88AP510-BP Development Board";
index cc279166646fc4cb33751c8de2f1e19de2dd7440..499abadf86f0b1fd3367e14739d186507000170f 100644 (file)
@@ -1,8 +1,11 @@
 /include/ "skeleton.dtsi"
 
+#define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
+
 / {
        compatible = "marvell,dove";
        model = "Marvell Armada 88AP510 SoC";
+       interrupt-parent = <&intc>;
 
        aliases {
                gpio0 = &gpio0;
                marvell,tauros2-cache-features = <0>;
        };
 
-       soc@f1000000 {
-               compatible = "simple-bus";
-               #address-cells = <1>;
+       mbus {
+               compatible = "marvell,dove-mbus", "marvell,mbus", "simple-bus";
+               #address-cells = <2>;
                #size-cells = <1>;
-               interrupt-parent = <&intc>;
-
-               ranges = <0xc8000000 0xc8000000 0x0100000   /* CESA SRAM   1M */
-                         0xe0000000 0xe0000000 0x8000000   /* PCIe0 Mem 128M */
-                         0xe8000000 0xe8000000 0x8000000   /* PCIe1 Mem 128M */
-                         0xf0000000 0xf0000000 0x0100000   /* ScratchPad  1M */
-                         0x00000000 0xf1000000 0x1000000   /* SB/NB regs 16M */
-                         0xf2000000 0xf2000000 0x0100000   /* PCIe0 I/O   1M */
-                         0xf2100000 0xf2100000 0x0100000   /* PCIe0 I/O   1M */
-                         0xf8000000 0xf8000000 0x8000000>; /* BootROM   128M */
-
-               timer: timer@20300 {
-                       compatible = "marvell,orion-timer";
-                       reg = <0x20300 0x20>;
-                       interrupt-parent = <&bridge_intc>;
-                       interrupts = <1>, <2>;
-                       clocks = <&core_clk 0>;
-               };
-
-               intc: main-interrupt-ctrl@20200 {
-                       compatible = "marvell,orion-intc";
-                       interrupt-controller;
-                       #interrupt-cells = <1>;
-                       reg = <0x20200 0x10>, <0x20210 0x10>;
-               };
-
-               bridge_intc: bridge-interrupt-ctrl@20110 {
-                       compatible = "marvell,orion-bridge-intc";
-                       interrupt-controller;
-                       #interrupt-cells = <1>;
-                       reg = <0x20110 0x8>;
-                       interrupts = <0>;
-                       marvell,#interrupts = <5>;
-               };
-
-               core_clk: core-clocks@d0214 {
-                       compatible = "marvell,dove-core-clock";
-                       reg = <0xd0214 0x4>;
-                       #clock-cells = <1>;
-               };
-
-               gate_clk: clock-gating-ctrl@d0038 {
-                       compatible = "marvell,dove-gating-clock";
-                       reg = <0xd0038 0x4>;
-                       clocks = <&core_clk 0>;
-                       #clock-cells = <1>;
-               };
-
-               thermal: thermal-diode@d001c {
-                       compatible = "marvell,dove-thermal";
-                       reg = <0xd001c 0x0c>, <0xd005c 0x08>;
-               };
-
-               uart0: serial@12000 {
-                       compatible = "ns16550a";
-                       reg = <0x12000 0x100>;
-                       reg-shift = <2>;
-                       interrupts = <7>;
-                       clocks = <&core_clk 0>;
+               controller = <&mbusc>;
+               pcie-mem-aperture = <0xe0000000 0x10000000>; /* 256M MEM space */
+               pcie-io-aperture  = <0xf2000000 0x00200000>; /*   2M I/O space */
+
+               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x0100000   /* MBUS regs  1M */
+                         MBUS_ID(0xf0, 0x02) 0 0xf1800000 0x1000000   /* AXI  regs 16M */
+                         MBUS_ID(0x01, 0xfd) 0 0xf8000000 0x8000000   /* BootROM  128M */
+                         MBUS_ID(0x03, 0x01) 0 0xc8000000 0x0100000   /* CESA SRAM  1M */
+                         MBUS_ID(0x0d, 0x00) 0 0xf0000000 0x0100000>; /* PMU  SRAM  1M */
+
+               pcie: pcie-controller {
+                       compatible = "marvell,dove-pcie";
                        status = "disabled";
-               };
-
-               uart1: serial@12100 {
-                       compatible = "ns16550a";
-                       reg = <0x12100 0x100>;
-                       reg-shift = <2>;
-                       interrupts = <8>;
-                       clocks = <&core_clk 0>;
-                       pinctrl-0 = <&pmx_uart1>;
-                       pinctrl-names = "default";
-                       status = "disabled";
-               };
-
-               uart2: serial@12200 {
-                       compatible = "ns16550a";
-                       reg = <0x12000 0x100>;
-                       reg-shift = <2>;
-                       interrupts = <9>;
-                       clocks = <&core_clk 0>;
-                       status = "disabled";
-               };
-
-               uart3: serial@12300 {
-                       compatible = "ns16550a";
-                       reg = <0x12100 0x100>;
-                       reg-shift = <2>;
-                       interrupts = <10>;
-                       clocks = <&core_clk 0>;
-                       status = "disabled";
-               };
-
-               gpio0: gpio-ctrl@d0400 {
-                       compatible = "marvell,orion-gpio";
-                       #gpio-cells = <2>;
-                       gpio-controller;
-                       reg = <0xd0400 0x20>;
-                       ngpios = <32>;
-                       interrupt-controller;
-                       #interrupt-cells = <2>;
-                       interrupts = <12>, <13>, <14>, <60>;
-               };
-
-               gpio1: gpio-ctrl@d0420 {
-                       compatible = "marvell,orion-gpio";
-                       #gpio-cells = <2>;
-                       gpio-controller;
-                       reg = <0xd0420 0x20>;
-                       ngpios = <32>;
-                       interrupt-controller;
-                       #interrupt-cells = <2>;
-                       interrupts = <61>;
-               };
-
-               gpio2: gpio-ctrl@e8400 {
-                       compatible = "marvell,orion-gpio";
-                       #gpio-cells = <2>;
-                       gpio-controller;
-                       reg = <0xe8400 0x0c>;
-                       ngpios = <8>;
-               };
-
-               pinctrl: pin-ctrl@d0200 {
-                       compatible = "marvell,dove-pinctrl";
-                       reg = <0xd0200 0x10>;
-                       clocks = <&gate_clk 22>;
-
-                       pmx_gpio_0: pmx-gpio-0 {
-                               marvell,pins = "mpp0";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_1: pmx-gpio-1 {
-                               marvell,pins = "mpp1";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_2: pmx-gpio-2 {
-                               marvell,pins = "mpp2";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_3: pmx-gpio-3 {
-                               marvell,pins = "mpp3";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_4: pmx-gpio-4 {
-                               marvell,pins = "mpp4";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_5: pmx-gpio-5 {
-                               marvell,pins = "mpp5";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_6: pmx-gpio-6 {
-                               marvell,pins = "mpp6";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_7: pmx-gpio-7 {
-                               marvell,pins = "mpp7";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_8: pmx-gpio-8 {
-                               marvell,pins = "mpp8";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_9: pmx-gpio-9 {
-                               marvell,pins = "mpp9";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_10: pmx-gpio-10 {
-                               marvell,pins = "mpp10";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_11: pmx-gpio-11 {
-                               marvell,pins = "mpp11";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_12: pmx-gpio-12 {
-                               marvell,pins = "mpp12";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_13: pmx-gpio-13 {
-                               marvell,pins = "mpp13";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_14: pmx-gpio-14 {
-                               marvell,pins = "mpp14";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_15: pmx-gpio-15 {
-                               marvell,pins = "mpp15";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_16: pmx-gpio-16 {
-                               marvell,pins = "mpp16";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_17: pmx-gpio-17 {
-                               marvell,pins = "mpp17";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_18: pmx-gpio-18 {
-                               marvell,pins = "mpp18";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_19: pmx-gpio-19 {
-                               marvell,pins = "mpp19";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_20: pmx-gpio-20 {
-                               marvell,pins = "mpp20";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_gpio_21: pmx-gpio-21 {
-                               marvell,pins = "mpp21";
-                               marvell,function = "gpio";
+                       device_type = "pci";
+                       #address-cells = <3>;
+                       #size-cells = <2>;
+
+                       msi-parent = <&intc>;
+                       bus-range = <0x00 0xff>;
+
+                       ranges = <0x82000000 0x0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x2000
+                                 0x82000000 0x0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x2000
+                                 0x82000000 0x1 0x0 MBUS_ID(0x04, 0xe8) 0 1 0   /* Port 0.0 Mem */
+                                 0x81000000 0x1 0x0 MBUS_ID(0x04, 0xe0) 0 1 0   /* Port 0.0 I/O */
+                                 0x82000000 0x2 0x0 MBUS_ID(0x08, 0xe8) 0 1 0   /* Port 1.0 Mem */
+                                 0x81000000 0x2 0x0 MBUS_ID(0x08, 0xe0) 0 1 0>; /* Port 1.0 I/O */
+
+                       pcie-port@0 {
+                               device_type = "pci";
+                               status = "disabled";
+                               assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
+                               reg = <0x0800 0 0 0 0>;
+                               clocks = <&gate_clk 4>;
+                               marvell,pcie-port = <0>;
+
+                               #address-cells = <3>;
+                               #size-cells = <2>;
+                               ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0
+                                         0x81000000 0 0 0x81000000 0x1 0 1 0>;
+
+                               #interrupt-cells = <1>;
+                               interrupt-map-mask = <0 0 0 0>;
+                               interrupt-map = <0 0 0 0 &intc 16>;
+                       };
+
+                       pcie-port@1 {
+                               device_type = "pci";
+                               status = "disabled";
+                               assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
+                               reg = <0x1000 0 0 0 0>;
+                               clocks = <&gate_clk 5>;
+                               marvell,pcie-port = <1>;
+
+                               #address-cells = <3>;
+                               #size-cells = <2>;
+                               ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0
+                                         0x81000000 0 0 0x81000000 0x2 0 1 0>;
+
+                               #interrupt-cells = <1>;
+                               interrupt-map-mask = <0 0 0 0>;
+                               interrupt-map = <0 0 0 0 &intc 18>;
                        };
-
-                       pmx_camera: pmx-camera {
-                               marvell,pins = "mpp_camera";
-                               marvell,function = "camera";
-                       };
-
-                       pmx_camera_gpio: pmx-camera-gpio {
-                               marvell,pins = "mpp_camera";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_sdio0: pmx-sdio0 {
-                               marvell,pins = "mpp_sdio0";
-                               marvell,function = "sdio0";
-                       };
-
-                       pmx_sdio0_gpio: pmx-sdio0-gpio {
-                               marvell,pins = "mpp_sdio0";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_sdio1: pmx-sdio1 {
-                               marvell,pins = "mpp_sdio1";
-                               marvell,function = "sdio1";
-                       };
-
-                       pmx_sdio1_gpio: pmx-sdio1-gpio {
-                               marvell,pins = "mpp_sdio1";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_audio1_gpio: pmx-audio1-gpio {
-                               marvell,pins = "mpp_audio1";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_spi0: pmx-spi0 {
-                               marvell,pins = "mpp_spi0";
-                               marvell,function = "spi0";
-                       };
-
-                       pmx_spi0_gpio: pmx-spi0-gpio {
-                               marvell,pins = "mpp_spi0";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_uart1: pmx-uart1 {
-                               marvell,pins = "mpp_uart1";
-                               marvell,function = "uart1";
-                       };
-
-                       pmx_uart1_gpio: pmx-uart1-gpio {
-                               marvell,pins = "mpp_uart1";
-                               marvell,function = "gpio";
-                       };
-
-                       pmx_nand: pmx-nand {
-                               marvell,pins = "mpp_nand";
-                               marvell,function = "nand";
-                       };
-
-                       pmx_nand_gpo: pmx-nand-gpo {
-                               marvell,pins = "mpp_nand";
-                               marvell,function = "gpo";
-                       };
-               };
-
-               spi0: spi-ctrl@10600 {
-                       compatible = "marvell,orion-spi";
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       cell-index = <0>;
-                       interrupts = <6>;
-                       reg = <0x10600 0x28>;
-                       clocks = <&core_clk 0>;
-                       pinctrl-0 = <&pmx_spi0>;
-                       pinctrl-names = "default";
-                       status = "disabled";
                };
 
-               spi1: spi-ctrl@14600 {
-                       compatible = "marvell,orion-spi";
+               internal-regs {
+                       compatible = "simple-bus";
                        #address-cells = <1>;
-                       #size-cells = <0>;
-                       cell-index = <1>;
-                       interrupts = <5>;
-                       reg = <0x14600 0x28>;
-                       clocks = <&core_clk 0>;
-                       status = "disabled";
-               };
-
-               i2c0: i2c-ctrl@11000 {
-                       compatible = "marvell,mv64xxx-i2c";
-                       reg = <0x11000 0x20>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupts = <11>;
-                       clock-frequency = <400000>;
-                       timeout-ms = <1000>;
-                       clocks = <&core_clk 0>;
-                       status = "disabled";
-               };
-
-               ehci0: usb-host@50000 {
-                       compatible = "marvell,orion-ehci";
-                       reg = <0x50000 0x1000>;
-                       interrupts = <24>;
-                       clocks = <&gate_clk 0>;
-                       status = "okay";
-               };
-
-               ehci1: usb-host@51000 {
-                       compatible = "marvell,orion-ehci";
-                       reg = <0x51000 0x1000>;
-                       interrupts = <25>;
-                       clocks = <&gate_clk 1>;
-                       status = "okay";
-               };
-
-               sdio0: sdio-host@92000 {
-                       compatible = "marvell,dove-sdhci";
-                       reg = <0x92000 0x100>;
-                       interrupts = <35>, <37>;
-                       clocks = <&gate_clk 8>;
-                       pinctrl-0 = <&pmx_sdio0>;
-                       pinctrl-names = "default";
-                       status = "disabled";
-               };
-
-               sdio1: sdio-host@90000 {
-                       compatible = "marvell,dove-sdhci";
-                       reg = <0x90000 0x100>;
-                       interrupts = <36>, <38>;
-                       clocks = <&gate_clk 9>;
-                       pinctrl-0 = <&pmx_sdio1>;
-                       pinctrl-names = "default";
-                       status = "disabled";
-               };
-
-               sata0: sata-host@a0000 {
-                       compatible = "marvell,orion-sata";
-                       reg = <0xa0000 0x2400>;
-                       interrupts = <62>;
-                       clocks = <&gate_clk 3>;
-                       nr-ports = <1>;
-                       status = "disabled";
-               };
-
-               rtc: real-time-clock@d8500 {
-                       compatible = "marvell,orion-rtc";
-                       reg = <0xd8500 0x20>;
-               };
-
-               crypto: crypto-engine@30000 {
-                       compatible = "marvell,orion-crypto";
-                       reg = <0x30000 0x10000>,
-                             <0xc8000000 0x800>;
-                       reg-names = "regs", "sram";
-                       interrupts = <31>;
-                       clocks = <&gate_clk 15>;
-                       status = "okay";
-               };
-
-               xor0: dma-engine@60800 {
-                       compatible = "marvell,orion-xor";
-                       reg = <0x60800 0x100
-                              0x60a00 0x100>;
-                       clocks = <&gate_clk 23>;
-                       status = "okay";
-
-                       channel0 {
-                               interrupts = <39>;
-                               dmacap,memcpy;
-                               dmacap,xor;
-                       };
-
-                       channel1 {
-                               interrupts = <40>;
-                               dmacap,memset;
-                               dmacap,memcpy;
-                               dmacap,xor;
-                       };
-               };
-
-               xor1: dma-engine@60900 {
-                       compatible = "marvell,orion-xor";
-                       reg = <0x60900 0x100
-                              0x60b00 0x100>;
-                       clocks = <&gate_clk 24>;
-                       status = "okay";
-
-                       channel0 {
-                               interrupts = <42>;
-                               dmacap,memcpy;
-                               dmacap,xor;
-                       };
-
-                       channel1 {
-                               interrupts = <43>;
-                               dmacap,memset;
-                               dmacap,memcpy;
-                               dmacap,xor;
-                       };
-               };
-
-               mdio: mdio-bus@72004 {
-                       compatible = "marvell,orion-mdio";
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       reg = <0x72004 0x84>;
-                       interrupts = <30>;
-                       clocks = <&gate_clk 2>;
-                       status = "disabled";
-
-                       ethphy: ethernet-phy {
-                               device-type = "ethernet-phy";
-                               /* set phy address in board file */
-                       };
-               };
-
-               eth: ethernet-controller@72000 {
-                       compatible = "marvell,orion-eth";
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       reg = <0x72000 0x4000>;
-                       clocks = <&gate_clk 2>;
-                       marvell,tx-checksum-limit = <1600>;
-                       status = "disabled";
-
-                       ethernet-port@0 {
-                               device_type = "network";
-                               compatible = "marvell,orion-eth-port";
-                               reg = <0>;
-                               interrupts = <29>;
-                               /* overwrite MAC address in bootloader */
-                               local-mac-address = [00 00 00 00 00 00];
-                               phy-handle = <&ethphy>;
+                       #size-cells = <1>;
+                       ranges = <0x00000000 MBUS_ID(0xf0, 0x01) 0 0x0100000   /* MBUS regs  1M */
+                                 0x00800000 MBUS_ID(0xf0, 0x02) 0 0x1000000   /* AXI  regs 16M */
+                                 0xffffe000 MBUS_ID(0x03, 0x01) 0 0x0000800   /* CESA SRAM  2k */
+                                 0xfffff000 MBUS_ID(0x0d, 0x00) 0 0x0000800>; /* PMU  SRAM  2k */
+
+                       mbusc: mbus-ctrl@20000 {
+                               compatible = "marvell,mbus-controller";
+                               reg = <0x20000 0x80>, <0x800100 0x8>;
+                       };
+
+                       timer: timer@20300 {
+                               compatible = "marvell,orion-timer";
+                               reg = <0x20300 0x20>;
+                               interrupt-parent = <&bridge_intc>;
+                               interrupts = <1>, <2>;
+                               clocks = <&core_clk 0>;
+                       };
+
+                       intc: main-interrupt-ctrl@20200 {
+                               compatible = "marvell,orion-intc";
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                               reg = <0x20200 0x10>, <0x20210 0x10>;
+                       };
+
+                       bridge_intc: bridge-interrupt-ctrl@20110 {
+                               compatible = "marvell,orion-bridge-intc";
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                               reg = <0x20110 0x8>;
+                               interrupts = <0>;
+                               marvell,#interrupts = <5>;
+                       };
+
+                       core_clk: core-clocks@d0214 {
+                               compatible = "marvell,dove-core-clock";
+                               reg = <0xd0214 0x4>;
+                               #clock-cells = <1>;
+                       };
+
+                       gate_clk: clock-gating-ctrl@d0038 {
+                               compatible = "marvell,dove-gating-clock";
+                               reg = <0xd0038 0x4>;
+                               clocks = <&core_clk 0>;
+                               #clock-cells = <1>;
+                       };
+
+                       thermal: thermal-diode@d001c {
+                               compatible = "marvell,dove-thermal";
+                               reg = <0xd001c 0x0c>, <0xd005c 0x08>;
+                       };
+
+                       uart0: serial@12000 {
+                               compatible = "ns16550a";
+                               reg = <0x12000 0x100>;
+                               reg-shift = <2>;
+                               interrupts = <7>;
+                               clocks = <&core_clk 0>;
+                               status = "disabled";
+                       };
+
+                       uart1: serial@12100 {
+                               compatible = "ns16550a";
+                               reg = <0x12100 0x100>;
+                               reg-shift = <2>;
+                               interrupts = <8>;
+                               clocks = <&core_clk 0>;
+                               pinctrl-0 = <&pmx_uart1>;
+                               pinctrl-names = "default";
+                               status = "disabled";
+                       };
+
+                       uart2: serial@12200 {
+                               compatible = "ns16550a";
+                               reg = <0x12000 0x100>;
+                               reg-shift = <2>;
+                               interrupts = <9>;
+                               clocks = <&core_clk 0>;
+                               status = "disabled";
+                       };
+
+                       uart3: serial@12300 {
+                               compatible = "ns16550a";
+                               reg = <0x12100 0x100>;
+                               reg-shift = <2>;
+                               interrupts = <10>;
+                               clocks = <&core_clk 0>;
+                               status = "disabled";
+                       };
+
+                       gpio0: gpio-ctrl@d0400 {
+                               compatible = "marvell,orion-gpio";
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               reg = <0xd0400 0x20>;
+                               ngpios = <32>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               interrupts = <12>, <13>, <14>, <60>;
+                       };
+
+                       gpio1: gpio-ctrl@d0420 {
+                               compatible = "marvell,orion-gpio";
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               reg = <0xd0420 0x20>;
+                               ngpios = <32>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               interrupts = <61>;
+                       };
+
+                       gpio2: gpio-ctrl@e8400 {
+                               compatible = "marvell,orion-gpio";
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               reg = <0xe8400 0x0c>;
+                               ngpios = <8>;
+                       };
+
+                       pinctrl: pin-ctrl@d0200 {
+                               compatible = "marvell,dove-pinctrl";
+                               reg = <0xd0200 0x10>;
+                               clocks = <&gate_clk 22>;
+
+                               pmx_gpio_0: pmx-gpio-0 {
+                                       marvell,pins = "mpp0";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_1: pmx-gpio-1 {
+                                       marvell,pins = "mpp1";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_2: pmx-gpio-2 {
+                                       marvell,pins = "mpp2";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_3: pmx-gpio-3 {
+                                       marvell,pins = "mpp3";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_4: pmx-gpio-4 {
+                                       marvell,pins = "mpp4";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_5: pmx-gpio-5 {
+                                       marvell,pins = "mpp5";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_6: pmx-gpio-6 {
+                                       marvell,pins = "mpp6";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_7: pmx-gpio-7 {
+                                       marvell,pins = "mpp7";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_8: pmx-gpio-8 {
+                                       marvell,pins = "mpp8";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_9: pmx-gpio-9 {
+                                       marvell,pins = "mpp9";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_10: pmx-gpio-10 {
+                                       marvell,pins = "mpp10";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_11: pmx-gpio-11 {
+                                       marvell,pins = "mpp11";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_12: pmx-gpio-12 {
+                                       marvell,pins = "mpp12";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_13: pmx-gpio-13 {
+                                       marvell,pins = "mpp13";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_14: pmx-gpio-14 {
+                                       marvell,pins = "mpp14";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_15: pmx-gpio-15 {
+                                       marvell,pins = "mpp15";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_16: pmx-gpio-16 {
+                                       marvell,pins = "mpp16";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_17: pmx-gpio-17 {
+                                       marvell,pins = "mpp17";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_18: pmx-gpio-18 {
+                                       marvell,pins = "mpp18";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_19: pmx-gpio-19 {
+                                       marvell,pins = "mpp19";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_20: pmx-gpio-20 {
+                                       marvell,pins = "mpp20";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_gpio_21: pmx-gpio-21 {
+                                       marvell,pins = "mpp21";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_camera: pmx-camera {
+                                       marvell,pins = "mpp_camera";
+                                       marvell,function = "camera";
+                               };
+
+                               pmx_camera_gpio: pmx-camera-gpio {
+                                       marvell,pins = "mpp_camera";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_sdio0: pmx-sdio0 {
+                                       marvell,pins = "mpp_sdio0";
+                                       marvell,function = "sdio0";
+                               };
+
+                               pmx_sdio0_gpio: pmx-sdio0-gpio {
+                                       marvell,pins = "mpp_sdio0";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_sdio1: pmx-sdio1 {
+                                       marvell,pins = "mpp_sdio1";
+                                       marvell,function = "sdio1";
+                               };
+
+                               pmx_sdio1_gpio: pmx-sdio1-gpio {
+                                       marvell,pins = "mpp_sdio1";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_audio1_gpio: pmx-audio1-gpio {
+                                       marvell,pins = "mpp_audio1";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_spi0: pmx-spi0 {
+                                       marvell,pins = "mpp_spi0";
+                                       marvell,function = "spi0";
+                               };
+
+                               pmx_spi0_gpio: pmx-spi0-gpio {
+                                       marvell,pins = "mpp_spi0";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_uart1: pmx-uart1 {
+                                       marvell,pins = "mpp_uart1";
+                                       marvell,function = "uart1";
+                               };
+
+                               pmx_uart1_gpio: pmx-uart1-gpio {
+                                       marvell,pins = "mpp_uart1";
+                                       marvell,function = "gpio";
+                               };
+
+                               pmx_nand: pmx-nand {
+                                       marvell,pins = "mpp_nand";
+                                       marvell,function = "nand";
+                               };
+
+                               pmx_nand_gpo: pmx-nand-gpo {
+                                       marvell,pins = "mpp_nand";
+                                       marvell,function = "gpo";
+                               };
+                       };
+
+                       spi0: spi-ctrl@10600 {
+                               compatible = "marvell,orion-spi";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               cell-index = <0>;
+                               interrupts = <6>;
+                               reg = <0x10600 0x28>;
+                               clocks = <&core_clk 0>;
+                               pinctrl-0 = <&pmx_spi0>;
+                               pinctrl-names = "default";
+                               status = "disabled";
+                       };
+
+                       spi1: spi-ctrl@14600 {
+                               compatible = "marvell,orion-spi";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               cell-index = <1>;
+                               interrupts = <5>;
+                               reg = <0x14600 0x28>;
+                               clocks = <&core_clk 0>;
+                               status = "disabled";
+                       };
+
+                       i2c0: i2c-ctrl@11000 {
+                               compatible = "marvell,mv64xxx-i2c";
+                               reg = <0x11000 0x20>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               interrupts = <11>;
+                               clock-frequency = <400000>;
+                               timeout-ms = <1000>;
+                               clocks = <&core_clk 0>;
+                               status = "disabled";
+                       };
+
+                       ehci0: usb-host@50000 {
+                               compatible = "marvell,orion-ehci";
+                               reg = <0x50000 0x1000>;
+                               interrupts = <24>;
+                               clocks = <&gate_clk 0>;
+                               status = "okay";
+                       };
+
+                       ehci1: usb-host@51000 {
+                               compatible = "marvell,orion-ehci";
+                               reg = <0x51000 0x1000>;
+                               interrupts = <25>;
+                               clocks = <&gate_clk 1>;
+                               status = "okay";
+                       };
+
+                       sdio0: sdio-host@92000 {
+                               compatible = "marvell,dove-sdhci";
+                               reg = <0x92000 0x100>;
+                               interrupts = <35>, <37>;
+                               clocks = <&gate_clk 8>;
+                               pinctrl-0 = <&pmx_sdio0>;
+                               pinctrl-names = "default";
+                               status = "disabled";
+                       };
+
+                       sdio1: sdio-host@90000 {
+                               compatible = "marvell,dove-sdhci";
+                               reg = <0x90000 0x100>;
+                               interrupts = <36>, <38>;
+                               clocks = <&gate_clk 9>;
+                               pinctrl-0 = <&pmx_sdio1>;
+                               pinctrl-names = "default";
+                               status = "disabled";
+                       };
+
+                       sata0: sata-host@a0000 {
+                               compatible = "marvell,orion-sata";
+                               reg = <0xa0000 0x2400>;
+                               interrupts = <62>;
+                               clocks = <&gate_clk 3>;
+                               nr-ports = <1>;
+                               status = "disabled";
+                       };
+
+                       rtc: real-time-clock@d8500 {
+                               compatible = "marvell,orion-rtc";
+                               reg = <0xd8500 0x20>;
+                       };
+
+                       crypto: crypto-engine@30000 {
+                               compatible = "marvell,orion-crypto";
+                               reg = <0x30000 0x10000>,
+                                     <0xffffe000 0x800>;
+                               reg-names = "regs", "sram";
+                               interrupts = <31>;
+                               clocks = <&gate_clk 15>;
+                               status = "okay";
+                       };
+
+                       xor0: dma-engine@60800 {
+                               compatible = "marvell,orion-xor";
+                               reg = <0x60800 0x100
+                                      0x60a00 0x100>;
+                               clocks = <&gate_clk 23>;
+                               status = "okay";
+
+                               channel0 {
+                                       interrupts = <39>;
+                                       dmacap,memcpy;
+                                       dmacap,xor;
+                               };
+
+                               channel1 {
+                                       interrupts = <40>;
+                                       dmacap,memcpy;
+                                       dmacap,xor;
+                               };
+                       };
+
+                       xor1: dma-engine@60900 {
+                               compatible = "marvell,orion-xor";
+                               reg = <0x60900 0x100
+                                      0x60b00 0x100>;
+                               clocks = <&gate_clk 24>;
+                               status = "okay";
+
+                               channel0 {
+                                       interrupts = <42>;
+                                       dmacap,memcpy;
+                                       dmacap,xor;
+                               };
+
+                               channel1 {
+                                       interrupts = <43>;
+                                       dmacap,memcpy;
+                                       dmacap,xor;
+                               };
+                       };
+
+                       mdio: mdio-bus@72004 {
+                               compatible = "marvell,orion-mdio";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               reg = <0x72004 0x84>;
+                               interrupts = <30>;
+                               clocks = <&gate_clk 2>;
+                               status = "disabled";
+
+                               ethphy: ethernet-phy {
+                                       device-type = "ethernet-phy";
+                                       /* set phy address in board file */
+                               };
+                       };
+
+                       eth: ethernet-ctrl@72000 {
+                               compatible = "marvell,orion-eth";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               reg = <0x72000 0x4000>;
+                               clocks = <&gate_clk 2>;
+                               marvell,tx-checksum-limit = <1600>;
+                               status = "disabled";
+
+                               ethernet-port@0 {
+                                       device_type = "network";
+                                       compatible = "marvell,orion-eth-port";
+                                       reg = <0>;
+                                       interrupts = <29>;
+                                       /* overwrite MAC address in bootloader */
+                                       local-mac-address = [00 00 00 00 00 00];
+                                       phy-handle = <&ethphy>;
+                               };
                        };
                };
        };
index 72c4b0a0366ffcd656f16456c430b067ff814b5a..c39dd766c75a03caf11e0a79e71d3a25778fd33b 100644 (file)
@@ -19,7 +19,6 @@
        compatible = "marvell,db-88f6281-bp", "marvell,kirkwood-88f6281", "marvell,kirkwood";
 
        mbus {
-               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
                pcie-controller {
                        status = "okay";
 
index 36c411d349268e41e05d220f3d56e2d82553506e..701c6b6cdaa2ffd82b49ac2a0fe145e1e9d626a5 100644 (file)
@@ -19,7 +19,6 @@
        compatible = "marvell,db-88f6282-bp", "marvell,kirkwood-88f6282", "marvell,kirkwood";
 
        mbus {
-               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
                pcie-controller {
                        status = "okay";
 
index c0e2a587917474a37a515ff7c70e133ee193f0ba..053aa20fb30f88a0e13be1878e9d9d6ba241c4c2 100644 (file)
                        status = "ok";
                };
 
-               nand@3000000 {
-                       pinctrl-0 = <&pmx_nand>;
-                       pinctrl-names = "default";
-                       chip-delay = <25>;
-                       status = "okay";
-
-                       partition@0 {
-                               label = "uboot";
-                               reg = <0x0 0x100000>;
-                       };
-
-                       partition@100000 {
-                               label = "uImage";
-                               reg = <0x100000 0x400000>;
-                       };
-
-                       partition@500000 {
-                               label = "root";
-                               reg = <0x500000 0x1fb00000>;
-                       };
-               };
-
                sata@80000 {
                        nr-ports = <2>;
                        status = "okay";
        };
 };
 
+&nand {
+       pinctrl-0 = <&pmx_nand>;
+       pinctrl-names = "default";
+       chip-delay = <25>;
+       status = "okay";
+
+       partition@0 {
+               label = "uboot";
+               reg = <0x0 0x100000>;
+       };
+
+       partition@100000 {
+               label = "uImage";
+               reg = <0x100000 0x400000>;
+       };
+
+       partition@500000 {
+               label = "root";
+               reg = <0x500000 0x1fb00000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index d544f77a4ca465ccc268b90d5edc9c1ca9aee490..aefa375a550d3ac0e7615cd76ba50e83c99ac094 100644 (file)
                        status = "okay";
                        nr-ports = <2>;
                };
-
-               nand@3000000 {
-                       pinctrl-0 = <&pmx_nand>;
-                       pinctrl-names = "default";
-                       status = "okay";
-                       chip-delay = <35>;
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x100000>;
-                               read-only;
-                       };
-
-                       partition@100000 {
-                               label = "uImage";
-                               reg = <0x0100000 0x500000>;
-                       };
-
-                       partition@600000 {
-                               label = "ramdisk";
-                               reg = <0x0600000 0x500000>;
-                       };
-
-                       partition@b00000 {
-                               label = "image";
-                               reg = <0x0b00000 0x6600000>;
-                       };
-
-                       partition@7100000 {
-                               label = "mini firmware";
-                               reg = <0x7100000 0xa00000>;
-                       };
-
-                       partition@7b00000 {
-                               label = "config";
-                               reg = <0x7b00000 0x500000>;
-                       };
-               };
        };
 
        regulators {
        };
 };
 
+&nand {
+       pinctrl-0 = <&pmx_nand>;
+       pinctrl-names = "default";
+       status = "okay";
+       chip-delay = <35>;
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x0000000 0x100000>;
+               read-only;
+       };
+
+       partition@100000 {
+               label = "uImage";
+               reg = <0x0100000 0x500000>;
+       };
+
+       partition@600000 {
+               label = "ramdisk";
+               reg = <0x0600000 0x500000>;
+       };
+
+       partition@b00000 {
+               label = "image";
+               reg = <0x0b00000 0x6600000>;
+       };
+
+       partition@7100000 {
+               label = "mini firmware";
+               reg = <0x7100000 0xa00000>;
+       };
+
+       partition@7b00000 {
+               label = "config";
+               reg = <0x7b00000 0x500000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 59a2117c35a7fe2dc68f2b5f7171810dd60532d1..33ff368fbfa5696353353fc5151b4fefd7cc6198 100644 (file)
                serial@12000 {
                        status = "ok";
                };
-
-               nand@3000000 {
-                       status = "okay";
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x100000>;
-                               read-only;
-                       };
-
-                       partition@100000 {
-                               label = "uImage";
-                               reg = <0x0100000 0x400000>;
-                       };
-
-                       partition@500000 {
-                               label = "data";
-                               reg = <0x0500000 0xfb00000>;
-                       };
-               };
        };
        gpio-leds {
                compatible = "gpio-leds";
        };
 };
 
+&nand {
+       status = "okay";
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x0000000 0x100000>;
+               read-only;
+       };
+
+       partition@100000 {
+               label = "uImage";
+               reg = <0x0100000 0x400000>;
+       };
+
+       partition@500000 {
+               label = "data";
+               reg = <0x0500000 0xfb00000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 6f7c7d7ecf2acf74bcd5a11f2122c30aea72fb3a..a43bebb251102fbbfcde84e58f1955ce52f5de5b 100644 (file)
                        status = "ok";
                };
 
-               nand@3000000 {
-                       chip-delay = <40>;
-                       status = "okay";
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x100000>;
-                               read-only;
-                       };
-
-                       partition@100000 {
-                               label = "uImage";
-                               reg = <0x0100000 0x400000>;
-                       };
-
-                       partition@500000 {
-                               label = "pogoplug";
-                               reg = <0x0500000 0x2000000>;
-                       };
-
-                       partition@2500000 {
-                               label = "root";
-                               reg = <0x02500000 0xd800000>;
-                       };
-               };
                sata@80000 {
                        status = "okay";
                        nr-ports = <2>;
        };
 };
 
+&nand {
+       chip-delay = <40>;
+       status = "okay";
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x0000000 0x100000>;
+               read-only;
+       };
+
+       partition@100000 {
+               label = "uImage";
+               reg = <0x0100000 0x400000>;
+       };
+
+       partition@500000 {
+               label = "pogoplug";
+               reg = <0x0500000 0x2000000>;
+       };
+
+       partition@2500000 {
+               label = "root";
+               reg = <0x02500000 0xd800000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 6548b9dc685560887f3771156f74987e5842d918..d30a91a5047d6939c2dfdd69989bde39c359f9b7 100644 (file)
                        status = "ok";
                };
 
-               nand@3000000 {
-                       status = "okay";
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x00000000 0x00100000>;
-                               read-only;
-                       };
-
-                       partition@100000 {
-                               label = "uImage";
-                               reg = <0x00100000 0x00400000>;
-                       };
-
-                       partition@500000 {
-                               label = "data";
-                               reg = <0x00500000 0x1fb00000>;
-                       };
-               };
-
                sata@80000 {
                        status = "okay";
                        nr-ports = <1>;
        };
 };
 
+&nand {
+       status = "okay";
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x00000000 0x00100000>;
+               read-only;
+       };
+
+       partition@100000 {
+               label = "uImage";
+               reg = <0x00100000 0x00400000>;
+       };
+
+       partition@500000 {
+               label = "data";
+               reg = <0x00500000 0x1fb00000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index cb711a3bd9833f3061060783fe38357bbf65cce3..c5fb02f7ebc3e33107ac067d46a6394d6c21b27d 100644 (file)
@@ -5,7 +5,7 @@
 
 / {
        model = "RaidSonic ICY BOX IB-NAS62x0 (Rev B)";
-       compatible = "raidsonic,ib-nas6210-b", "raidsonic,ib-nas6220-b", "raidsonic,ib-nas6210", "raidsonic,ib-nas6220", "raidsonic,ib-nas62x0",  "marvell,kirkwood-88f6281", "marvell,kirkwood";
+       compatible = "raidsonic,ib-nas6210-b", "raidsonic,ib-nas6220-b", "raidsonic,ib-nas6210", "raidsonic,ib-nas6220", "raidsonic,ib-nas62x0", "marvell,kirkwood-88f6281", "marvell,kirkwood";
 
        memory {
                device_type = "memory";
@@ -43,6 +43,7 @@
                                marvell,function = "gpio";
                        };
                };
+
                serial@12000 {
                        status = "okay";
                };
                        status = "okay";
                        nr-ports = <2>;
                };
-
-               nand@3000000 {
-                       status = "okay";
-                       pinctrl-0 = <&pmx_nand>;
-                       pinctrl-names = "default";
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x100000>;
-                       };
-
-                       partition@100000 {
-                               label = "uImage";
-                               reg = <0x0100000 0x600000>;
-                       };
-
-                       partition@700000 {
-                               label = "root";
-                               reg = <0x0700000 0xf900000>;
-                       };
-
-               };
        };
 
        gpio_keys {
@@ -93,6 +72,7 @@
                        gpios = <&gpio0 28 1>;
                };
        };
+
        gpio-leds {
                compatible = "gpio-leds";
                pinctrl-0 = <&pmx_led_os_red &pmx_led_os_green
                        gpios = <&gpio0 27 0>;
                };
        };
+
        gpio_poweroff {
                compatible = "gpio-poweroff";
                pinctrl-0 = <&pmx_power_off>;
                pinctrl-names = "default";
                gpios = <&gpio0 24 0>;
        };
+};
+
+&nand {
+       status = "okay";
+       pinctrl-0 = <&pmx_nand>;
+       pinctrl-names = "default";
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x0000000 0xe0000>;
+       };
 
+       partition@e0000 {
+               label = "u-boot environment";
+               reg = <0xe0000 0x100000>;
+       };
+
+       partition@100000 {
+               label = "uImage";
+               reg = <0x0100000 0x600000>;
+       };
+
+       partition@700000 {
+               label = "root";
+               reg = <0x0700000 0xf900000>;
+       };
 
 };
 
 
 &eth0 {
        status = "okay";
+
        ethernet0-port@0 {
                phy-handle = <&ethphy0>;
        };
index 0323f017eeedecbc9ea3acc64d632b16b15103cd..4a62b206f680b4c1261a404ce16ce26fb498f6c0 100644 (file)
@@ -19,7 +19,6 @@
        };
 
        mbus {
-               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
                pcie-controller {
                        status = "okay";
 
                serial@12000 {
                        status = "ok";
                };
-
-               nand@3000000 {
-                       status = "okay";
-
-                       partition@0 {
-                               label = "uboot";
-                               reg = <0x0000000 0xc0000>;
-                       };
-
-                       partition@a0000 {
-                               label = "env";
-                               reg = <0xa0000 0x20000>;
-                       };
-
-                       partition@100000 {
-                               label = "zImage";
-                               reg = <0x100000 0x300000>;
-                       };
-
-                       partition@540000 {
-                               label = "initrd";
-                               reg = <0x540000 0x300000>;
-                       };
-
-                       partition@980000 {
-                               label = "boot";
-                               reg = <0x980000 0x1f400000>;
-                       };
-               };
        };
 
        gpio-leds {
        };
 };
 
+&nand {
+       status = "okay";
+
+       partition@0 {
+               label = "uboot";
+               reg = <0x0000000 0xc0000>;
+       };
+
+       partition@a0000 {
+               label = "env";
+               reg = <0xa0000 0x20000>;
+       };
+
+       partition@100000 {
+               label = "zImage";
+               reg = <0x100000 0x300000>;
+       };
+
+       partition@540000 {
+               label = "initrd";
+               reg = <0x540000 0x300000>;
+       };
+
+       partition@980000 {
+               label = "boot";
+               reg = <0x980000 0x1f400000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index df8447442b37b406332766ece95f83677ea53819..d15395d671ededf4caf501518bb1e33ffba0cba8 100644 (file)
                        status = "ok";
                };
 
-               nand@3000000 {
-                       status = "okay";
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x100000>;
-                               read-only;
-                       };
-
-                       partition@a0000 {
-                               label = "env";
-                               reg = <0xa0000 0x20000>;
-                               read-only;
-                       };
-
-                       partition@100000 {
-                               label = "uImage";
-                               reg = <0x100000 0x300000>;
-                       };
-
-                       partition@400000 {
-                               label = "uInitrd";
-                               reg = <0x540000 0x1000000>;
-                       };
-               };
                sata@80000 {
                        status = "okay";
                        nr-ports = <2>;
        };
 };
 
+&nand {
+       status = "okay";
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x0000000 0x100000>;
+               read-only;
+       };
+
+       partition@a0000 {
+               label = "env";
+               reg = <0xa0000 0x20000>;
+               read-only;
+       };
+
+       partition@100000 {
+               label = "uImage";
+               reg = <0x100000 0x300000>;
+       };
+
+       partition@400000 {
+               label = "uInitrd";
+               reg = <0x540000 0x1000000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 6899408482d24c1cf2229add5ba8f63fd07f8645..cd44f37e54b5b7fb81f6c53f966abc9e3e511c8e 100644 (file)
                serial@12000 {
                        status = "ok";
                };
-
-               nand@3000000 {
-                       pinctrl-0 = <&pmx_nand>;
-                       pinctrl-names = "default";
-                       status = "ok";
-                       chip-delay = <25>;
-               };
        };
 
        i2c@0 {
        };
 };
 
+&nand {
+       pinctrl-0 = <&pmx_nand>;
+       pinctrl-names = "default";
+       status = "ok";
+       chip-delay = <25>;
+};
+
 &mdio {
        status = "okay";
 
index ce2b94b513dbe1dc20478e7b8287864a13c1cb89..6c1ec2786e6e2f77c334292bab84b4e24d4cfef6 100644 (file)
@@ -17,7 +17,6 @@
         };
 
        mbus {
-               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
                pcie-controller {
                        status = "okay";
 
                         pinctrl-names = "default";
                 };
 
-                nand@3000000 {
-                        pinctrl-0 = <&pmx_nand>;
-                        pinctrl-names = "default";
-                        status = "okay";
-
-                        partition@0 {
-                                label = "uboot";
-                                reg = <0x0000000 0x100000>;
-                        };
-
-                        partition@100000 {
-                                label = "env";
-                                reg = <0x100000 0x80000>;
-                        };
-
-                        partition@180000 {
-                                label = "fdt";
-                                reg = <0x180000 0x80000>;
-                        };
-
-                        partition@200000 {
-                                label = "kernel";
-                                reg = <0x200000 0x400000>;
-                        };
-
-                        partition@600000 {
-                                label = "rootfs";
-                                reg = <0x600000 0x1fa00000>;
-                        };
-                };
-
                rtc@10300 {
                        status = "disabled";
                };
        };
 };
 
+&nand {
+       pinctrl-0 = <&pmx_nand>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       partition@0 {
+               label = "uboot";
+               reg = <0x0000000 0x100000>;
+       };
+
+       partition@100000 {
+               label = "env";
+               reg = <0x100000 0x80000>;
+       };
+
+       partition@180000 {
+               label = "fdt";
+               reg = <0x180000 0x80000>;
+       };
+
+       partition@200000 {
+               label = "kernel";
+               reg = <0x200000 0x400000>;
+       };
+
+       partition@600000 {
+               label = "rootfs";
+               reg = <0x600000 0x1fa00000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 874857ea9cb8c8a80fc812609a2b3cd368cb40df..e6a102cf424cd646d9e121acd2b821ea46bb81be 100644 (file)
@@ -17,7 +17,6 @@
        };
 
        mbus {
-               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
                pcie-controller {
                        status = "okay";
 
                        status = "okay";
                };
 
-               nand@3000000 {
-                       status = "okay";
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x180000>;
-                               read-only;
-                       };
-
-                       partition@180000 {
-                               label = "u-boot-env";
-                               reg = <0x180000 0x20000>;
-                       };
-
-                       partition@200000 {
-                               label = "uImage";
-                               reg = <0x0200000 0x600000>;
-                       };
-
-                       partition@800000 {
-                               label = "minirootfs";
-                               reg = <0x0800000 0x1000000>;
-                       };
-
-                       partition@1800000 {
-                               label = "jffs2";
-                               reg = <0x1800000 0x6800000>;
-                       };
-               };
-
                sata@80000 {
                        status = "okay";
                        nr-ports = <2>;
         };
 };
 
+&nand {
+       status = "okay";
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x0000000 0x180000>;
+               read-only;
+       };
+
+       partition@180000 {
+               label = "u-boot-env";
+               reg = <0x180000 0x20000>;
+       };
+
+       partition@200000 {
+               label = "uImage";
+               reg = <0x0200000 0x600000>;
+       };
+
+       partition@800000 {
+               label = "minirootfs";
+               reg = <0x0800000 0x1000000>;
+       };
+
+       partition@1800000 {
+               label = "jffs2";
+               reg = <0x1800000 0x6800000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 06267a91de38d7aa4bd1dc69f1e61bf39047faec..e3f915defd3da6174ad0e1829cf1be0c15e38f80 100644 (file)
                        nr-ports = <2>;
                };
 
-               nand@3000000 {
-                       status = "okay";
-                       chip-delay = <35>;
-
-                       partition@0 {
-                               label = "uboot";
-                               reg = <0x0000000 0x0100000>;
-                               read-only;
-                       };
-                       partition@100000 {
-                               label = "uboot_env";
-                               reg = <0x0100000 0x0080000>;
-                       };
-                       partition@180000 {
-                               label = "key_store";
-                               reg = <0x0180000 0x0080000>;
-                       };
-                       partition@200000 {
-                               label = "info";
-                               reg = <0x0200000 0x0080000>;
-                       };
-                       partition@280000 {
-                               label = "etc";
-                               reg = <0x0280000 0x0a00000>;
-                       };
-                       partition@c80000 {
-                               label = "kernel_1";
-                               reg = <0x0c80000 0x0a00000>;
-                       };
-                       partition@1680000 {
-                               label = "rootfs1";
-                               reg = <0x1680000 0x2fc0000>;
-                       };
-                       partition@4640000 {
-                               label = "kernel_2";
-                               reg = <0x4640000 0x0a00000>;
-                       };
-                       partition@5040000 {
-                               label = "rootfs2";
-                               reg = <0x5040000 0x2fc0000>;
-                       };
-               };
-
                pcie-controller {
                        status = "okay";
 
                };
        };
 };
+
+&nand {
+       status = "okay";
+       chip-delay = <35>;
+
+       partition@0 {
+               label = "uboot";
+               reg = <0x0000000 0x0100000>;
+               read-only;
+       };
+       partition@100000 {
+               label = "uboot_env";
+               reg = <0x0100000 0x0080000>;
+       };
+       partition@180000 {
+               label = "key_store";
+               reg = <0x0180000 0x0080000>;
+       };
+       partition@200000 {
+               label = "info";
+               reg = <0x0200000 0x0080000>;
+       };
+       partition@280000 {
+               label = "etc";
+               reg = <0x0280000 0x0a00000>;
+       };
+       partition@c80000 {
+               label = "kernel_1";
+               reg = <0x0c80000 0x0a00000>;
+       };
+       partition@1680000 {
+               label = "rootfs1";
+               reg = <0x1680000 0x2fc0000>;
+       };
+       partition@4640000 {
+               label = "kernel_2";
+               reg = <0x4640000 0x0a00000>;
+       };
+       partition@5040000 {
+               label = "rootfs2";
+               reg = <0x5040000 0x2fc0000>;
+       };
+};
index 7aeae0c2c1f498bd31fd6572b278dbe944eab107..b5418bcaeccead3b1313074c5ebf885d5f8f0e49 100644 (file)
@@ -15,7 +15,6 @@
        };
 
        mbus {
-               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
                pcie-controller {
                        status = "okay";
 
index 85ccf8d8abb133bf62289ddd6adb0ef218764eae..f0e3d213604c975b760173bc854d624d68e38ccd 100644 (file)
                        pinctrl-names = "default";
                };
 
-               nand@3000000 {
-                       chip-delay = <25>;
-                       status = "okay";
-                       pinctrl-0 = <&pmx_nand>;
-                       pinctrl-names = "default";
-
-                       partition@0 {
-                               label = "uboot";
-                               reg = <0x0 0x90000>;
-                       };
-
-                       partition@90000 {
-                               label = "env";
-                               reg = <0x90000 0x44000>;
-                       };
-
-                       partition@d4000 {
-                               label = "test";
-                               reg = <0xd4000 0x24000>;
-                       };
-
-                       partition@f4000 {
-                               label = "conf";
-                               reg = <0xf4000 0x400000>;
-                       };
-
-                       partition@4f4000 {
-                               label = "linux";
-                               reg = <0x4f4000 0x1d20000>;
-                       };
-
-                       partition@2214000 {
-                               label = "user";
-                               reg = <0x2214000 0x1dec000>;
-                       };
-               };
-
                sata@80000 {
                        nr-ports = <1>;
                        status = "okay";
        };
 };
 
+&nand {
+       chip-delay = <25>;
+       status = "okay";
+       pinctrl-0 = <&pmx_nand>;
+       pinctrl-names = "default";
+
+       partition@0 {
+               label = "uboot";
+               reg = <0x0 0x90000>;
+       };
+
+       partition@90000 {
+               label = "env";
+               reg = <0x90000 0x44000>;
+       };
+
+       partition@d4000 {
+               label = "test";
+               reg = <0xd4000 0x24000>;
+       };
+
+       partition@f4000 {
+               label = "conf";
+               reg = <0xf4000 0x400000>;
+       };
+
+       partition@4f4000 {
+               label = "linux";
+               reg = <0x4f4000 0x1d20000>;
+       };
+
+       partition@2214000 {
+               label = "user";
+               reg = <0x2214000 0x1dec000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 5696b630b70bb0c19fb0d4bc38b17342cd5a5228..1173d7fb31b23f9e11565a45592fcb99f17e41bf 100644 (file)
                        pinctrl-names = "default";
                        status = "okay";
                };
-
-               nand@3000000 {
-                       pinctrl-0 = <&pmx_nand>;
-                       pinctrl-names = "default";
-                       status = "okay";
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x100000>;
-                       };
-
-                       partition@100000 {
-                               label = "uImage";
-                               reg = <0x0100000 0x400000>;
-                       };
-
-                       partition@500000 {
-                               label = "root";
-                               reg = <0x0500000 0x1fb00000>;
-                       };
-               };
        };
 
        regulators {
        };
 };
 
+&nand {
+       pinctrl-0 = <&pmx_nand>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x0000000 0x100000>;
+       };
+
+       partition@100000 {
+               label = "uImage";
+               reg = <0x0100000 0x400000>;
+       };
+
+       partition@500000 {
+               label = "root";
+               reg = <0x0500000 0x1fb00000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 30842b4ff29394185f61d3cc702ddcd192000043..320da677b9847e94f0aba2bcc634bd90890686a6 100644 (file)
                        pinctrl-names = "default";
                };
 
-               nand@3000000 {
-                       status = "okay";
-                       pinctrl-0 = <&pmx_nand>;
-                       pinctrl-names = "default";
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0000000 0x180000>;
-                       };
-
-                       partition@180000 {
-                               label = "u-boot env";
-                               reg = <0x0180000 0x20000>;
-                       };
-
-                       partition@200000 {
-                               label = "uImage";
-                               reg = <0x0200000 0x600000>;
-                       };
-
-                       partition@800000 {
-                               label = "uInitrd";
-                               reg = <0x0800000 0x1000000>;
-                       };
-
-                       partition@1800000 {
-                               label = "rootfs";
-                               reg = <0x1800000 0xe800000>;
-                       };
-               };
-
                sata@80000 {
                        status = "okay";
                        nr-ports = <1>;
        };
 };
 
+&nand {
+       status = "okay";
+       pinctrl-0 = <&pmx_nand>;
+       pinctrl-names = "default";
+
+       partition@0 {
+               label = "u-boot";
+               reg = <0x0000000 0x180000>;
+       };
+
+       partition@180000 {
+               label = "u-boot env";
+               reg = <0x0180000 0x20000>;
+       };
+
+       partition@200000 {
+               label = "uImage";
+               reg = <0x0200000 0x600000>;
+       };
+
+       partition@800000 {
+               label = "uInitrd";
+               reg = <0x0800000 0x1000000>;
+       };
+
+       partition@1800000 {
+               label = "rootfs";
+               reg = <0x1800000 0xe800000>;
+       };
+};
+
 &mdio {
        status = "okay";
 
index 9efcd2dc79d3f74eaffb2b95bc9ff4fb9c7662db..345562f7589182975d27ae5e95b1e4319bc7f843 100644 (file)
@@ -6,7 +6,6 @@
 
 / {
        mbus {
-               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
                pcie-controller {
                        status = "okay";
 
index 1335b2e1bed4c66efe95ee2f679129d3856ccb43..8b73c80f1dad40995be65547ee5caa4a4fbffdaa 100644 (file)
                compatible = "marvell,kirkwood-mbus", "simple-bus";
                #address-cells = <2>;
                #size-cells = <1>;
+               /* If a board file needs to change this ranges it must replace it completely */
+               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000     /* internal-regs */
+                         MBUS_ID(0x01, 0x2f) 0 0xf4000000 0x10000      /* nand flash */
+                         MBUS_ID(0x03, 0x01) 0 0xf5000000 0x10000      /* crypto sram */
+                         >;
                controller = <&mbusc>;
                pcie-mem-aperture = <0xe0000000 0x10000000>; /* 256 MiB memory space */
                pcie-io-aperture  = <0xf2000000 0x100000>;   /*   1 MiB    I/O space */
+
+               crypto@0301 {
+                       compatible = "marvell,orion-crypto";
+                       reg = <MBUS_ID(0xf0, 0x01) 0x30000 0x10000>,
+                             <MBUS_ID(0x03, 0x01) 0 0x800>;
+                       reg-names = "regs", "sram";
+                       interrupts = <22>;
+                       clocks = <&gate_clk 17>;
+                       status = "okay";
+               };
+
+               nand: nand@012f {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       cle = <0>;
+                       ale = <1>;
+                       bank-width = <1>;
+                       compatible = "marvell,orion-nand";
+                       reg = <MBUS_ID(0x01, 0x2f) 0 0x400>;
+                       chip-delay = <25>;
+                       /* set partition map and/or chip-delay in board dts */
+                       clocks = <&gate_clk 7>;
+                       status = "disabled";
+               };
        };
 
        ocp@f1000000 {
                compatible = "simple-bus";
-               ranges = <0x00000000 0xf1000000 0x0100000
-                         0xf4000000 0xf4000000 0x0000400
-                         0xf5000000 0xf5000000 0x0000400>;
+               ranges = <0x00000000 0xf1000000 0x0100000>;
                #address-cells = <1>;
                #size-cells = <1>;
 
                        status = "okay";
                };
 
-               nand@3000000 {
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       cle = <0>;
-                       ale = <1>;
-                       bank-width = <1>;
-                       compatible = "marvell,orion-nand";
-                       reg = <0xf4000000 0x400>;
-                       chip-delay = <25>;
-                       /* set partition map and/or chip-delay in board dts */
-                       clocks = <&gate_clk 7>;
-                       status = "disabled";
-               };
-
                i2c@11000 {
                        compatible = "marvell,mv64xxx-i2c";
                        reg = <0x11000 0x20>;
                        status = "disabled";
                };
 
-               crypto@30000 {
-                       compatible = "marvell,orion-crypto";
-                       reg = <0x30000 0x10000>,
-                             <0xf5000000 0x800>;
-                       reg-names = "regs", "sram";
-                       interrupts = <22>;
-                       clocks = <&gate_clk 17>;
-                       status = "okay";
-               };
-
                mdio: mdio-bus@72004 {
                        compatible = "marvell,orion-mdio";
                        #address-cells = <1>;
index 0c514dc8460c2423299848748278a452638e535c..2816bf61267231fd7ec2dd11f87c6da9ed4b3311 100644 (file)
@@ -11,7 +11,7 @@
 
 / {
        model = "TI OMAP3 BeagleBoard xM";
-       compatible = "ti,omap3-beagle-xm", "ti,omap3-beagle", "ti,omap3";
+       compatible = "ti,omap3-beagle-xm", "ti,omap36xx", "ti,omap3";
 
        cpus {
                cpu@0 {
index 7d95cda1fae4f0349bdfb582de99be2baf36dbf6..b41bd57f43287a048b73bfefe35b262ee139600e 100644 (file)
                        #address-cells = <1>;
                        #size-cells = <0>;
                        pinctrl-single,register-width = <16>;
-                       pinctrl-single,function-mask = <0x7f1f>;
+                       pinctrl-single,function-mask = <0xff1f>;
                };
 
                omap3_pmx_wkup: pinmux@0x48002a00 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        pinctrl-single,register-width = <16>;
-                       pinctrl-single,function-mask = <0x7f1f>;
+                       pinctrl-single,function-mask = <0xff1f>;
                };
 
                gpio1: gpio@48310000 {
index f444624eb0974c881e5bac7de144183d366f42b6..2b49b05ae2f42ca0a769b7231e725b6ea9a52e22 100644 (file)
@@ -10,6 +10,7 @@
 
 /dts-v1/;
 /include/ "r8a73a4.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
        model = "APE6EVM";
                reg = <0 0x40000000 0 0x40000000>;
        };
 
+       vcc_mmc0: regulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "MMC0 Vcc";
+               regulator-min-microvolt = <2800000>;
+               regulator-max-microvolt = <2800000>;
+               regulator-always-on;
+       };
+
+       vcc_sdhi0: regulator@1 {
+               compatible = "regulator-fixed";
+
+               regulator-name = "SDHI0 Vcc";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+
+               gpio = <&pfc 76 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       /* Common 3.3V rail, used by several devices on APE6EVM */
+       ape6evm_fixed_3v3: regulator@2 {
+               compatible = "regulator-fixed";
+               regulator-name = "3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
+
        lbsc {
                compatible = "simple-bus";
                #address-cells = <1>;
                renesas,groups = "scifa0_data";
                renesas,function = "scifa0";
        };
+
+       mmc0_pins: mmcif {
+               renesas,groups = "mmc0_data8", "mmc0_ctrl";
+               renesas,function = "mmc0";
+       };
+
+       sdhi0_pins: sdhi0 {
+               renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd";
+               renesas,function = "sdhi0";
+       };
+
+       sdhi1_pins: sdhi1 {
+               renesas,groups = "sdhi1_data4", "sdhi1_ctrl";
+               renesas,function = "sdhi1";
+       };
+};
+
+&mmcif0 {
+       vmmc-supply = <&vcc_mmc0>;
+       bus-width = <8>;
+       non-removable;
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins>;
+       status = "okay";
+};
+
+&sdhi0 {
+       vmmc-supply = <&vcc_sdhi0>;
+       bus-width = <4>;
+       toshiba,mmc-wrprotect-disable;
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdhi0_pins>;
+       status = "okay";
+};
+
+&sdhi1 {
+       vmmc-supply = <&ape6evm_fixed_3v3>;
+       bus-width = <4>;
+       broken-cd;
+       toshiba,mmc-wrprotect-disable;
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdhi1_pins>;
+       status = "okay";
 };
index 413b4c29e782d7ded622563b8a458e28d382db19..28fc18c9601b861ea8f77d3a261af20270c86fa2 100644 (file)
                        reg = <0>;
                        clock-frequency = <1300000000>;
                };
+
+               cpu1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a15";
+                       reg = <1>;
+                       clock-frequency = <1300000000>;
+               };
+
+               cpu2: cpu@2 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a15";
+                       reg = <2>;
+                       clock-frequency = <1300000000>;
+               };
+
+               cpu3: cpu@3 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a15";
+                       reg = <3>;
+                       clock-frequency = <1300000000>;
+               };
+
+               cpu4: cpu@4 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0x100>;
+                       clock-frequency = <780000000>;
+               };
+
+               cpu5: cpu@5 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0x101>;
+                       clock-frequency = <780000000>;
+               };
+
+               cpu6: cpu@6 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0x102>;
+                       clock-frequency = <780000000>;
+               };
+
+               cpu7: cpu@7 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0x103>;
+                       clock-frequency = <780000000>;
+               };
        };
 
        gic: interrupt-controller@f1001000 {
diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
new file mode 100644 (file)
index 0000000..1ce5250
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Device Tree Source for the Koelsch board
+ *
+ * Copyright (C) 2013 Renesas Electronics Corporation
+ * Copyright (C) 2013 Renesas Solutions Corp.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/dts-v1/;
+/include/ "r8a7791.dtsi"
+
+/ {
+       model = "Koelsch";
+       compatible = "renesas,koelsch", "renesas,r8a7791";
+
+       chosen {
+               bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
+       };
+
+       memory@40000000 {
+               device_type = "memory";
+               reg = <0 0x40000000 0 0x80000000>;
+       };
+
+       lbsc {
+               #address-cells = <1>;
+               #size-cells = <1>;
+       };
+};
diff --git a/arch/arm/boot/dts/s3c6400.dtsi b/arch/arm/boot/dts/s3c6400.dtsi
new file mode 100644 (file)
index 0000000..a7d1c8e
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Samsung's S3C6400 SoC device tree source
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Samsung's S3C6400 SoC device nodes are listed in this file. S3C6400
+ * based board files can include this file and provide values for board specfic
+ * bindings.
+ *
+ * Note: This file does not include device nodes for all the controllers in
+ * S3C6400 SoC. As device tree coverage for S3C6400 increases, additional
+ * nodes can be added to this file.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include "s3c64xx.dtsi"
+
+/ {
+       compatible = "samsung,s3c6400";
+};
+
+&vic0 {
+       valid-mask = <0xfffffe1f>;
+       valid-wakeup-mask = <0x00200004>;
+};
+
+&vic1 {
+       valid-mask = <0xffffffff>;
+       valid-wakeup-mask = <0x53020000>;
+};
+
+&soc {
+       clocks: clock-controller@7e00f000 {
+               compatible = "samsung,s3c6400-clock";
+               reg = <0x7e00f000 0x1000>;
+               #clock-cells = <1>;
+       };
+};
diff --git a/arch/arm/boot/dts/s3c6410-mini6410.dts b/arch/arm/boot/dts/s3c6410-mini6410.dts
new file mode 100644 (file)
index 0000000..57e00f9
--- /dev/null
@@ -0,0 +1,228 @@
+/*
+ * Samsung's S3C6410 based Mini6410 board device tree source
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Device tree source file for FriendlyARM Mini6410 board which is based on
+ * Samsung's S3C6410 SoC.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+#include "s3c6410.dtsi"
+
+/ {
+       model = "FriendlyARM Mini6410 board based on S3C6410";
+       compatible = "friendlyarm,mini6410", "samsung,s3c6410";
+
+       memory {
+               reg = <0x50000000 0x10000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttySAC0,115200n8 earlyprintk rootwait root=/dev/mmcblk0p1";
+       };
+
+       clocks {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               fin_pll: oscillator@0 {
+                       compatible = "fixed-clock";
+                       reg = <0>;
+                       clock-frequency = <12000000>;
+                       clock-output-names = "fin_pll";
+                       #clock-cells = <0>;
+               };
+
+               xusbxti: oscillator@1 {
+                       compatible = "fixed-clock";
+                       reg = <1>;
+                       clock-output-names = "xusbxti";
+                       clock-frequency = <48000000>;
+                       #clock-cells = <0>;
+               };
+       };
+
+       srom-cs1@18000000 {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               reg = <0x18000000 0x8000000>;
+               ranges;
+
+               ethernet@18000000 {
+                       compatible = "davicom,dm9000";
+                       reg = <0x18000000 0x2 0x18000004 0x2>;
+                       interrupt-parent = <&gpn>;
+                       interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
+                       davicom,no-eeprom;
+               };
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&gpio_keys>;
+               autorepeat;
+
+               button-k1 {
+                       label = "K1";
+                       gpios = <&gpn 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <2>;
+                       debounce-interval = <20>;
+               };
+
+               button-k2 {
+                       label = "K2";
+                       gpios = <&gpn 1 GPIO_ACTIVE_LOW>;
+                       linux,code = <3>;
+                       debounce-interval = <20>;
+               };
+
+               button-k3 {
+                       label = "K3";
+                       gpios = <&gpn 2 GPIO_ACTIVE_LOW>;
+                       linux,code = <4>;
+                       debounce-interval = <20>;
+               };
+
+               button-k4 {
+                       label = "K4";
+                       gpios = <&gpn 3 GPIO_ACTIVE_LOW>;
+                       linux,code = <5>;
+                       debounce-interval = <20>;
+               };
+
+               button-k5 {
+                       label = "K5";
+                       gpios = <&gpn 4 GPIO_ACTIVE_LOW>;
+                       linux,code = <6>;
+                       debounce-interval = <20>;
+               };
+
+               button-k6 {
+                       label = "K6";
+                       gpios = <&gpn 5 GPIO_ACTIVE_LOW>;
+                       linux,code = <7>;
+                       debounce-interval = <20>;
+               };
+
+               button-k7 {
+                       label = "K7";
+                       gpios = <&gpl 11 GPIO_ACTIVE_LOW>;
+                       linux,code = <8>;
+                       debounce-interval = <20>;
+               };
+
+               button-k8 {
+                       label = "K8";
+                       gpios = <&gpl 12 GPIO_ACTIVE_LOW>;
+                       linux,code = <9>;
+                       debounce-interval = <20>;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&gpio_leds>;
+
+               led-1 {
+                       label = "LED1";
+                       gpios = <&gpk 4 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "heartbeat";
+               };
+
+               led-2 {
+                       label = "LED2";
+                       gpios = <&gpk 5 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "mmc0";
+               };
+
+               led-3 {
+                       label = "LED3";
+                       gpios = <&gpk 6 GPIO_ACTIVE_LOW>;
+               };
+
+               led-4 {
+                       label = "LED4";
+                       gpios = <&gpk 7 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       buzzer {
+               compatible = "pwm-beeper";
+               pwms = <&pwm 0 1000000 0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm0_out>;
+       };
+};
+
+&sdhci0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
+       bus-width = <4>;
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_data>;
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_data>, <&uart1_fctl>;
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_data>;
+       status = "okay";
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart3_data>;
+       status = "okay";
+};
+
+&pwm {
+       status = "okay";
+};
+
+&pinctrl0 {
+       gpio_leds: gpio-leds {
+               samsung,pins = "gpk-4", "gpk-5", "gpk-6", "gpk-7";
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       gpio_keys: gpio-keys {
+               samsung,pins = "gpn-0", "gpn-1", "gpn-2", "gpn-3",
+                               "gpn-4", "gpn-5", "gpl-11", "gpl-12";
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+};
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_bus>;
+       status = "okay";
+
+       eeprom@50 {
+               compatible = "atmel,24c08";
+               reg = <0x50>;
+               pagesize = <16>;
+       };
+};
diff --git a/arch/arm/boot/dts/s3c6410-smdk6410.dts b/arch/arm/boot/dts/s3c6410-smdk6410.dts
new file mode 100644 (file)
index 0000000..ecf35ec
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Samsung S3C6410 based SMDK6410 board device tree source.
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Device tree source file for SAMSUNG SMDK6410 board which is based on
+ * Samsung's S3C6410 SoC.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+#include "s3c6410.dtsi"
+
+/ {
+       model = "SAMSUNG SMDK6410 board based on S3C6410";
+       compatible = "samsung,mini6410", "samsung,s3c6410";
+
+       memory {
+               reg = <0x50000000 0x8000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttySAC0,115200n8 earlyprintk rootwait root=/dev/mmcblk0p1";
+       };
+
+       clocks {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               fin_pll: oscillator@0 {
+                       compatible = "fixed-clock";
+                       reg = <0>;
+                       clock-frequency = <12000000>;
+                       clock-output-names = "fin_pll";
+                       #clock-cells = <0>;
+               };
+
+               xusbxti: oscillator@1 {
+                       compatible = "fixed-clock";
+                       reg = <1>;
+                       clock-output-names = "xusbxti";
+                       clock-frequency = <48000000>;
+                       #clock-cells = <0>;
+               };
+       };
+
+       srom-cs1@18000000 {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               reg = <0x18000000 0x8000000>;
+               ranges;
+
+               ethernet@18000000 {
+                       compatible = "smsc,lan9115";
+                       reg = <0x18000000 0x10000>;
+                       interrupt-parent = <&gpn>;
+                       interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
+                       phy-mode = "mii";
+                       reg-io-width = <4>;
+                       smsc,force-internal-phy;
+               };
+       };
+};
+
+&sdhci0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
+       bus-width = <4>;
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_data>, <&uart0_fctl>;
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_data>;
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_data>;
+       status = "okay";
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart3_data>;
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/s3c6410.dtsi b/arch/arm/boot/dts/s3c6410.dtsi
new file mode 100644 (file)
index 0000000..eb4226b
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Samsung's S3C6410 SoC device tree source
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Samsung's S3C6410 SoC device nodes are listed in this file. S3C6410
+ * based board files can include this file and provide values for board specfic
+ * bindings.
+ *
+ * Note: This file does not include device nodes for all the controllers in
+ * S3C6410 SoC. As device tree coverage for S3C6410 increases, additional
+ * nodes can be added to this file.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include "s3c64xx.dtsi"
+
+/ {
+       compatible = "samsung,s3c6410";
+
+       aliases {
+               i2c1 = &i2c1;
+       };
+};
+
+&vic0 {
+       valid-mask = <0xffffff7f>;
+       valid-wakeup-mask = <0x00200004>;
+};
+
+&vic1 {
+       valid-mask = <0xffffffff>;
+       valid-wakeup-mask = <0x53020000>;
+};
+
+&soc {
+       clocks: clock-controller@7e00f000 {
+               compatible = "samsung,s3c6410-clock";
+               reg = <0x7e00f000 0x1000>;
+               #clock-cells = <1>;
+       };
+
+       i2c1: i2c@7f00f000 {
+               compatible = "samsung,s3c2440-i2c";
+               reg = <0x7f00f000 0x1000>;
+               interrupt-parent = <&vic0>;
+               interrupts = <5>;
+               clock-names = "i2c";
+               clocks = <&clocks PCLK_IIC1>;
+               status = "disabled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+       };
+};
diff --git a/arch/arm/boot/dts/s3c64xx-pinctrl.dtsi b/arch/arm/boot/dts/s3c64xx-pinctrl.dtsi
new file mode 100644 (file)
index 0000000..b1197d8
--- /dev/null
@@ -0,0 +1,687 @@
+/*
+ * Samsung's S3C64xx SoC series common device tree source
+ * - pin control-related definitions
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Samsung's S3C64xx SoCs pin banks, pin-mux and pin-config options are
+ * listed as device tree nodes in this file.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#define PIN_PULL_NONE  0
+#define PIN_PULL_DOWN  1
+#define PIN_PULL_UP    2
+
+&pinctrl0 {
+       /*
+        * Pin banks
+        */
+
+       gpa: gpa {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpb: gpb {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpc: gpc {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpd: gpd {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpe: gpe {
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
+
+       gpf: gpf {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpg: gpg {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gph: gph {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpi: gpi {
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
+
+       gpj: gpj {
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
+
+       gpk: gpk {
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
+
+       gpl: gpl {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpm: gpm {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpn: gpn {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpo: gpo {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpp: gpp {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       gpq: gpq {
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+
+       /*
+        * Pin groups
+        */
+
+       uart0_data: uart0-data {
+               samsung,pins = "gpa-0", "gpa-1";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       uart0_fctl: uart0-fctl {
+               samsung,pins = "gpa-2", "gpa-3";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       uart1_data: uart1-data {
+               samsung,pins = "gpa-4", "gpa-5";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       uart1_fctl: uart1-fctl {
+               samsung,pins = "gpa-6", "gpa-7";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       uart2_data: uart2-data {
+               samsung,pins = "gpb-0", "gpb-1";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       uart3_data: uart3-data {
+               samsung,pins = "gpb-2", "gpb-3";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       ext_dma_0: ext-dma-0 {
+               samsung,pins = "gpb-0", "gpb-1";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       ext_dma_1: ext-dma-1 {
+               samsung,pins = "gpb-2", "gpb-3";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       irda_data_0: irda-data-0 {
+               samsung,pins = "gpb-0", "gpb-1";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       irda_data_1: irda-data-1 {
+               samsung,pins = "gpb-2", "gpb-3";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       irda_sdbw: irda-sdbw {
+               samsung,pins = "gpb-4";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       i2c0_bus: i2c0-bus {
+               samsung,pins = "gpb-5", "gpb-6";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_UP>;
+       };
+
+       i2c1_bus: i2c1-bus {
+               /* S3C6410-only */
+               samsung,pins = "gpb-2", "gpb-3";
+               samsung,pin-function = <6>;
+               samsung,pin-pud = <PIN_PULL_UP>;
+       };
+
+       spi0_bus: spi0-bus {
+               samsung,pins = "gpc-0", "gpc-1", "gpc-2";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_UP>;
+       };
+
+       spi0_cs: spi0-cs {
+               samsung,pins = "gpc-3";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       spi1_bus: spi1-bus {
+               samsung,pins = "gpc-4", "gpc-5", "gpc-6";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_UP>;
+       };
+
+       spi1_cs: spi1-cs {
+               samsung,pins = "gpc-7";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd0_cmd: sd0-cmd {
+               samsung,pins = "gpg-1";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd0_clk: sd0-clk {
+               samsung,pins = "gpg-0";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd0_bus1: sd0-bus1 {
+               samsung,pins = "gpg-2";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd0_bus4: sd0-bus4 {
+               samsung,pins = "gpg-2", "gpg-3", "gpg-4", "gpg-5";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd0_cd: sd0-cd {
+               samsung,pins = "gpg-6";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_UP>;
+       };
+
+       sd1_cmd: sd1-cmd {
+               samsung,pins = "gph-1";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd1_clk: sd1-clk {
+               samsung,pins = "gph-0";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd1_bus1: sd1-bus1 {
+               samsung,pins = "gph-2";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd1_bus4: sd1-bus4 {
+               samsung,pins = "gph-2", "gph-3", "gph-4", "gph-5";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd1_bus8: sd1-bus8 {
+               samsung,pins = "gph-2", "gph-3", "gph-4", "gph-5",
+                               "gph-6", "gph-7", "gph-8", "gph-9";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd1_cd: sd1-cd {
+               samsung,pins = "gpg-6";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_UP>;
+       };
+
+       sd2_cmd: sd2-cmd {
+               samsung,pins = "gpc-4";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd2_clk: sd2-clk {
+               samsung,pins = "gpc-5";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd2_bus1: sd2-bus1 {
+               samsung,pins = "gph-6";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       sd2_bus4: sd2-bus4 {
+               samsung,pins = "gph-6", "gph-7", "gph-8", "gph-9";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       i2s0_bus: i2s0-bus {
+               samsung,pins = "gpd-0", "gpd-2", "gpd-3", "gpd-4";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       i2s0_cdclk: i2s0-cdclk {
+               samsung,pins = "gpd-1";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       i2s1_bus: i2s1-bus {
+               samsung,pins = "gpe-0", "gpe-2", "gpe-3", "gpe-4";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       i2s1_cdclk: i2s1-cdclk {
+               samsung,pins = "gpe-1";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       i2s2_bus: i2s2-bus {
+               /* S3C6410-only */
+               samsung,pins = "gpc-4", "gpc-5", "gpc-6", "gph-6",
+                               "gph-8", "gph-9";
+               samsung,pin-function = <5>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       i2s2_cdclk: i2s2-cdclk {
+               /* S3C6410-only */
+               samsung,pins = "gph-7";
+               samsung,pin-function = <5>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       pcm0_bus: pcm0-bus {
+               samsung,pins = "gpd-0", "gpd-2", "gpd-3", "gpd-4";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       pcm0_extclk: pcm0-extclk {
+               samsung,pins = "gpd-1";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       pcm1_bus: pcm1-bus {
+               samsung,pins = "gpe-0", "gpe-2", "gpe-3", "gpe-4";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       pcm1_extclk: pcm1-extclk {
+               samsung,pins = "gpe-1";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       ac97_bus_0: ac97-bus-0 {
+               samsung,pins = "gpd-0", "gpd-1", "gpd-2", "gpd-3", "gpd-4";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       ac97_bus_1: ac97-bus-1 {
+               samsung,pins = "gpe-0", "gpe-1", "gpe-2", "gpe-3", "gpe-4";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       cam_port: cam-port {
+               samsung,pins = "gpf-0", "gpf-1", "gpf-2", "gpf-4",
+                               "gpf-5", "gpf-6", "gpf-7", "gpf-8",
+                               "gpf-9", "gpf-10", "gpf-11", "gpf-12";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       cam_rst: cam-rst {
+               samsung,pins = "gpf-3";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       cam_field: cam-field {
+               /* S3C6410-only */
+               samsung,pins = "gpb-4";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       pwm_extclk: pwm-extclk {
+               samsung,pins = "gpf-13";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       pwm0_out: pwm0-out {
+               samsung,pins = "gpf-14";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       pwm1_out: pwm1-out {
+               samsung,pins = "gpf-15";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       clkout0: clkout-0 {
+               samsung,pins = "gpf-14";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col0_0: keypad-col0-0 {
+               samsung,pins = "gph-0";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col1_0: keypad-col1-0 {
+               samsung,pins = "gph-1";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col2_0: keypad-col2-0 {
+               samsung,pins = "gph-2";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col3_0: keypad-col3-0 {
+               samsung,pins = "gph-3";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col4_0: keypad-col4-0 {
+               samsung,pins = "gph-4";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col5_0: keypad-col5-0 {
+               samsung,pins = "gph-5";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col6_0: keypad-col6-0 {
+               samsung,pins = "gph-6";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col7_0: keypad-col7-0 {
+               samsung,pins = "gph-7";
+               samsung,pin-function = <4>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col0_1: keypad-col0-1 {
+               samsung,pins = "gpl-0";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col1_1: keypad-col1-1 {
+               samsung,pins = "gpl-1";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col2_1: keypad-col2-1 {
+               samsung,pins = "gpl-2";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col3_1: keypad-col3-1 {
+               samsung,pins = "gpl-3";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col4_1: keypad-col4-1 {
+               samsung,pins = "gpl-4";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col5_1: keypad-col5-1 {
+               samsung,pins = "gpl-5";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col6_1: keypad-col6-1 {
+               samsung,pins = "gpl-6";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_col7_1: keypad-col7-1 {
+               samsung,pins = "gpl-7";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row0_0: keypad-row0-0 {
+               samsung,pins = "gpk-8";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row1_0: keypad-row1-0 {
+               samsung,pins = "gpk-9";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row2_0: keypad-row2-0 {
+               samsung,pins = "gpk-10";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row3_0: keypad-row3-0 {
+               samsung,pins = "gpk-11";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row4_0: keypad-row4-0 {
+               samsung,pins = "gpk-12";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row5_0: keypad-row5-0 {
+               samsung,pins = "gpk-13";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row6_0: keypad-row6-0 {
+               samsung,pins = "gpk-14";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row7_0: keypad-row7-0 {
+               samsung,pins = "gpk-15";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row0_1: keypad-row0-1 {
+               samsung,pins = "gpn-0";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row1_1: keypad-row1-1 {
+               samsung,pins = "gpn-1";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row2_1: keypad-row2-1 {
+               samsung,pins = "gpn-2";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row3_1: keypad-row3-1 {
+               samsung,pins = "gpn-3";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row4_1: keypad-row4-1 {
+               samsung,pins = "gpn-4";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row5_1: keypad-row5-1 {
+               samsung,pins = "gpn-5";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row6_1: keypad-row6-1 {
+               samsung,pins = "gpn-6";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       keypad_row7_1: keypad-row7-1 {
+               samsung,pins = "gpn-7";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       lcd_ctrl: lcd-ctrl {
+               samsung,pins = "gpj-8", "gpj-9", "gpj-10", "gpj-11";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       lcd_data16: lcd-data-width16 {
+               samsung,pins = "gpi-3", "gpi-4", "gpi-5", "gpi-6",
+                               "gpi-7", "gpi-10", "gpi-11", "gpi-12",
+                               "gpi-13", "gpi-14", "gpi-15", "gpj-3",
+                               "gpj-4", "gpj-5", "gpj-6", "gpj-7";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       lcd_data18: lcd-data-width18 {
+               samsung,pins = "gpi-2", "gpi-3", "gpi-4", "gpi-5",
+                               "gpi-6", "gpi-7", "gpi-10", "gpi-11",
+                               "gpi-12", "gpi-13", "gpi-14", "gpi-15",
+                               "gpj-2", "gpj-3", "gpj-4", "gpj-5",
+                               "gpj-6", "gpj-7";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       lcd_data24: lcd-data-width24 {
+               samsung,pins = "gpi-0", "gpi-1", "gpi-2", "gpi-3",
+                               "gpi-4", "gpi-5", "gpi-6", "gpi-7",
+                               "gpi-8", "gpi-9", "gpi-10", "gpi-11",
+                               "gpi-12", "gpi-13", "gpi-14", "gpi-15",
+                               "gpj-0", "gpj-1", "gpj-2", "gpj-3",
+                               "gpj-4", "gpj-5", "gpj-6", "gpj-7";
+               samsung,pin-function = <2>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+
+       hsi_bus: hsi-bus {
+               samsung,pins = "gpk-0", "gpk-1", "gpk-2", "gpk-3",
+                               "gpk-4", "gpk-5", "gpk-6", "gpk-7";
+               samsung,pin-function = <3>;
+               samsung,pin-pud = <PIN_PULL_NONE>;
+       };
+};
diff --git a/arch/arm/boot/dts/s3c64xx.dtsi b/arch/arm/boot/dts/s3c64xx.dtsi
new file mode 100644 (file)
index 0000000..4e3be4d
--- /dev/null
@@ -0,0 +1,199 @@
+/*
+ * Samsung's S3C64xx SoC series common device tree source
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Samsung's S3C64xx SoC series device nodes are listed in this file.
+ * Particular SoCs from S3C64xx series can include this file and provide
+ * values for SoCs specfic bindings.
+ *
+ * Note: This file does not include device nodes for all the controllers in
+ * S3C64xx SoCs. As device tree coverage for S3C64xx increases, additional
+ * nodes can be added to this file.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include "skeleton.dtsi"
+#include <dt-bindings/clock/samsung,s3c64xx-clock.h>
+
+/ {
+       aliases {
+               i2c0 = &i2c0;
+               pinctrl0 = &pinctrl0;
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,arm1176jzf-s", "arm,arm1176";
+                       reg = <0x0>;
+               };
+       };
+
+       soc: soc {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               vic0: interrupt-controller@71200000 {
+                       compatible = "arm,pl192-vic";
+                       interrupt-controller;
+                       reg = <0x71200000 0x1000>;
+                       #interrupt-cells = <1>;
+               };
+
+               vic1: interrupt-controller@71300000 {
+                       compatible = "arm,pl192-vic";
+                       interrupt-controller;
+                       reg = <0x71300000 0x1000>;
+                       #interrupt-cells = <1>;
+               };
+
+               sdhci0: sdhci@7c200000 {
+                       compatible = "samsung,s3c6410-sdhci";
+                       reg = <0x7c200000 0x100>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <24>;
+                       clock-names = "hsmmc", "mmc_busclk.0", "mmc_busclk.2";
+                       clocks = <&clocks HCLK_HSMMC0>, <&clocks HCLK_HSMMC0>,
+                                       <&clocks SCLK_MMC0>;
+                       status = "disabled";
+               };
+
+               sdhci1: sdhci@7c300000 {
+                       compatible = "samsung,s3c6410-sdhci";
+                       reg = <0x7c300000 0x100>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <25>;
+                       clock-names = "hsmmc", "mmc_busclk.0", "mmc_busclk.2";
+                       clocks = <&clocks HCLK_HSMMC1>, <&clocks HCLK_HSMMC1>,
+                                       <&clocks SCLK_MMC1>;
+                       status = "disabled";
+               };
+
+               sdhci2: sdhci@7c400000 {
+                       compatible = "samsung,s3c6410-sdhci";
+                       reg = <0x7c400000 0x100>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <17>;
+                       clock-names = "hsmmc", "mmc_busclk.0", "mmc_busclk.2";
+                       clocks = <&clocks HCLK_HSMMC2>, <&clocks HCLK_HSMMC2>,
+                                       <&clocks SCLK_MMC2>;
+                       status = "disabled";
+               };
+
+               watchdog: watchdog@7e004000 {
+                       compatible = "samsung,s3c2410-wdt";
+                       reg = <0x7e004000 0x1000>;
+                       interrupt-parent = <&vic0>;
+                       interrupts = <26>;
+                       clock-names = "watchdog";
+                       clocks = <&clocks PCLK_WDT>;
+                       status = "disabled";
+               };
+
+               i2c0: i2c@7f004000 {
+                       compatible = "samsung,s3c2440-i2c";
+                       reg = <0x7f004000 0x1000>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <18>;
+                       clock-names = "i2c";
+                       clocks = <&clocks PCLK_IIC0>;
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               uart0: serial@7f005000 {
+                       compatible = "samsung,s3c6400-uart";
+                       reg = <0x7f005000 0x100>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <5>;
+                       clock-names = "uart", "clk_uart_baud2",
+                                       "clk_uart_baud3";
+                       clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>,
+                                       <&clocks SCLK_UART>;
+                       status = "disabled";
+               };
+
+               uart1: serial@7f005400 {
+                       compatible = "samsung,s3c6400-uart";
+                       reg = <0x7f005400 0x100>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <6>;
+                       clock-names = "uart", "clk_uart_baud2",
+                                       "clk_uart_baud3";
+                       clocks = <&clocks PCLK_UART1>, <&clocks PCLK_UART1>,
+                                       <&clocks SCLK_UART>;
+                       status = "disabled";
+               };
+
+               uart2: serial@7f005800 {
+                       compatible = "samsung,s3c6400-uart";
+                       reg = <0x7f005800 0x100>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <7>;
+                       clock-names = "uart", "clk_uart_baud2",
+                                       "clk_uart_baud3";
+                       clocks = <&clocks PCLK_UART2>, <&clocks PCLK_UART2>,
+                                       <&clocks SCLK_UART>;
+                       status = "disabled";
+               };
+
+               uart3: serial@7f005c00 {
+                       compatible = "samsung,s3c6400-uart";
+                       reg = <0x7f005c00 0x100>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <8>;
+                       clock-names = "uart", "clk_uart_baud2",
+                                       "clk_uart_baud3";
+                       clocks = <&clocks PCLK_UART3>, <&clocks PCLK_UART3>,
+                                       <&clocks SCLK_UART>;
+                       status = "disabled";
+               };
+
+               pwm: pwm@7f006000 {
+                       compatible = "samsung,s3c6400-pwm";
+                       reg = <0x7f006000 0x1000>;
+                       interrupt-parent = <&vic0>;
+                       interrupts = <23>, <24>, <25>, <27>, <28>;
+                       clock-names = "timers";
+                       clocks = <&clocks PCLK_PWM>;
+                       samsung,pwm-outputs = <0>, <1>;
+                       #pwm-cells = <3>;
+                       status = "disabled";
+               };
+
+               pinctrl0: pinctrl@7f008000 {
+                       compatible = "samsung,s3c64xx-pinctrl";
+                       reg = <0x7f008000 0x1000>;
+                       interrupt-parent = <&vic1>;
+                       interrupts = <21>;
+
+                       pctrl_int_map: pinctrl-interrupt-map {
+                               interrupt-map = <0 &vic0 0>,
+                                               <1 &vic0 1>,
+                                               <2 &vic1 0>,
+                                               <3 &vic1 1>;
+                               #address-cells = <0>;
+                               #size-cells = <0>;
+                               #interrupt-cells = <1>;
+                       };
+
+                       wakeup-interrupt-controller {
+                               compatible = "samsung,s3c64xx-wakeup-eint";
+                               interrupts = <0>, <1>, <2>, <3>;
+                               interrupt-parent = <&pctrl_int_map>;
+                       };
+               };
+       };
+};
+
+#include "s3c64xx-pinctrl.dtsi"
index 1c1091eedadec293f619d5843f46506e31f14ffb..2ef30c1c19975c767d562f86cce7bf7daedfb4bd 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/mfd/dbx500-prcmu.h>
 #include "skeleton.dtsi"
 
 / {
                        interrupts = <0 7 IRQ_TYPE_LEVEL_HIGH>;
                };
 
+
+               clocks {
+                       compatible = "stericsson,u8500-clks";
+
+                       prcmu_clk: prcmu-clock {
+                               #clock-cells = <1>;
+                       };
+
+                       prcc_pclk: prcc-periph-clock {
+                               #clock-cells = <2>;
+                       };
+
+                       prcc_kclk: prcc-kernel-clock {
+                               #clock-cells = <2>;
+                       };
+
+                       rtc_clk: rtc32k-clock {
+                               #clock-cells = <0>;
+                       };
+
+                       smp_twd_clk: smp-twd-clock {
+                               #clock-cells = <0>;
+                       };
+               };
+
+               mtu@a03c6000 {
+                       /* Nomadik System Timer */
+                       compatible = "st,nomadik-mtu";
+                       reg = <0xa03c6000 0x1000>;
+                       interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>;
+
+                       clocks = <&prcmu_clk PRCMU_TIMCLK>, <&prcc_pclk 6 6>;
+                       clock-names = "timclk", "apb_pclk";
+               };
+
                timer@a0410600 {
                        compatible = "arm,cortex-a9-twd-timer";
                        reg = <0xa0410600 0x20>;
                        interrupts = <1 13 0x304>; /* IRQ level high per-CPU */
+
+                       clocks = <&smp_twd_clk>;
                };
 
                rtc@80154000 {
                        compatible = "arm,rtc-pl031", "arm,primecell";
                        reg = <0x80154000 0x1000>;
                        interrupts = <0 18 IRQ_TYPE_LEVEL_HIGH>;
+
+                       clocks = <&rtc_clk>;
+                       clock-names = "apb_pclk";
                };
 
                gpio0: gpio@8012e000 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <0>;
+
+                       clocks = <&prcc_pclk 1 9>;
                };
 
                gpio1: gpio@8012e080 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <1>;
+
+                       clocks = <&prcc_pclk 1 9>;
                };
 
                gpio2: gpio@8000e000 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <2>;
+
+                       clocks = <&prcc_pclk 3 8>;
                };
 
                gpio3: gpio@8000e080 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <3>;
+
+                       clocks = <&prcc_pclk 3 8>;
                };
 
                gpio4: gpio@8000e100 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <4>;
+
+                       clocks = <&prcc_pclk 3 8>;
                };
 
                gpio5: gpio@8000e180 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <5>;
+
+                       clocks = <&prcc_pclk 3 8>;
                };
 
                gpio6: gpio@8011e000 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <6>;
+
+                       clocks = <&prcc_pclk 2 1>;
                };
 
                gpio7: gpio@8011e080 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <7>;
+
+                       clocks = <&prcc_pclk 2 1>;
                };
 
                gpio8: gpio@a03fe000 {
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio-bank = <8>;
+
+                       clocks = <&prcc_pclk 6 1>;
                };
 
                pinctrl {
                };
 
                usb_per5@a03e0000 {
-                       compatible = "stericsson,db8500-musb",
-                               "mentor,musb";
+                       compatible = "stericsson,db8500-musb";
                        reg = <0xa03e0000 0x10000>;
                        interrupts = <0 23 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "mc";
                                    "iep_6_14", "oep_6_14",
                                    "iep_7_15", "oep_7_15",
                                    "iep_8",    "oep_8";
+
+                       clocks = <&prcc_pclk 5 0>;
                };
 
                dma: dma-controller@801C0000 {
 
                        #dma-cells = <3>;
                        memcpy-channels = <56 57 58 59 60>;
+
+                       clocks = <&prcmu_clk PRCMU_DMACLK>;
                };
 
                prcmu: prcmu@80157000 {
                                reg = <0x80157450 0xC>;
                        };
 
+                       cpufreq {
+                               compatible = "stericsson,cpufreq-ux500";
+                               clocks = <&prcmu_clk PRCMU_ARMSS>;
+                               clock-names = "armss";
+                               status = "disabled";
+                       };
+
                        thermal@801573c0 {
                                compatible = "stericsson,db8500-thermal";
                                reg = <0x801573c0 0x40>;
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x80004000 0x1000>;
                        interrupts = <0 21 IRQ_TYPE_LEVEL_HIGH>;
-                       arm,primecell-periphid = <0x180024>;
 
                        #address-cells = <1>;
                        #size-cells = <0>;
                        v-i2c-supply = <&db8500_vape_reg>;
 
                        clock-frequency = <400000>;
+                       clocks = <&prcc_kclk 3 3>, <&prcc_pclk 3 3>;
+                       clock-names = "i2cclk", "apb_pclk";
                };
 
                i2c@80122000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x80122000 0x1000>;
                        interrupts = <0 22 IRQ_TYPE_LEVEL_HIGH>;
-                       arm,primecell-periphid = <0x180024>;
 
                        #address-cells = <1>;
                        #size-cells = <0>;
                        v-i2c-supply = <&db8500_vape_reg>;
 
                        clock-frequency = <400000>;
+
+                       clocks = <&prcc_kclk 1 2>, <&prcc_pclk 1 2>;
+                       clock-names = "i2cclk", "apb_pclk";
                };
 
                i2c@80128000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x80128000 0x1000>;
                        interrupts = <0 55 IRQ_TYPE_LEVEL_HIGH>;
-                       arm,primecell-periphid = <0x180024>;
 
                        #address-cells = <1>;
                        #size-cells = <0>;
                        v-i2c-supply = <&db8500_vape_reg>;
 
                        clock-frequency = <400000>;
+
+                       clocks = <&prcc_kclk 1 6>, <&prcc_pclk 1 6>;
+                       clock-names = "i2cclk", "apb_pclk";
                };
 
                i2c@80110000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x80110000 0x1000>;
                        interrupts = <0 12 IRQ_TYPE_LEVEL_HIGH>;
-                       arm,primecell-periphid = <0x180024>;
 
                        #address-cells = <1>;
                        #size-cells = <0>;
                        v-i2c-supply = <&db8500_vape_reg>;
 
                        clock-frequency = <400000>;
+
+                       clocks = <&prcc_kclk 2 0>, <&prcc_pclk 2 0>;
+                       clock-names = "i2cclk", "apb_pclk";
                };
 
                i2c@8012a000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x8012a000 0x1000>;
                        interrupts = <0 51 IRQ_TYPE_LEVEL_HIGH>;
-                       arm,primecell-periphid = <0x180024>;
 
                        #address-cells = <1>;
                        #size-cells = <0>;
                        v-i2c-supply = <&db8500_vape_reg>;
 
                        clock-frequency = <400000>;
+
+                       clocks = <&prcc_kclk 1 9>, <&prcc_pclk 1 9>;
+                       clock-names = "i2cclk", "apb_pclk";
                };
 
                ssp@80002000 {
                               <&dma 13 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
 
+                       clocks = <&prcc_kclk 1 0>, <&prcc_pclk 1 0>;
+                       clock-names = "uart", "apb_pclk";
+
                        status = "disabled";
                };
 
                               <&dma 12 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
 
+                       clocks = <&prcc_kclk 1 1>, <&prcc_pclk 1 1>;
+                       clock-names = "uart", "apb_pclk";
+
                        status = "disabled";
                };
 
                               <&dma 11 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
 
+                       clocks = <&prcc_kclk 3 6>, <&prcc_pclk 3 6>;
+                       clock-names = "uart", "apb_pclk";
+
                        status = "disabled";
                };
 
                               <&dma 29 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
 
+                       clocks = <&prcc_kclk 1 5>, <&prcc_pclk 1 5>;
+                       clock-names = "sdi", "apb_pclk";
+
                        status = "disabled";
                };
 
                               <&dma 32 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
 
+                       clocks = <&prcc_kclk 2 4>, <&prcc_pclk 2 6>;
+                       clock-names = "sdi", "apb_pclk";
+
                        status = "disabled";
                };
 
                               <&dma 28 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
 
+                       clocks = <&prcc_kclk 3 4>, <&prcc_pclk 3 4>;
+                       clock-names = "sdi", "apb_pclk";
+
                        status = "disabled";
                };
 
                        compatible = "arm,pl18x", "arm,primecell";
                        reg = <0x80119000 0x1000>;
                        interrupts = <0 59 IRQ_TYPE_LEVEL_HIGH>;
+
+                       clocks = <&prcc_kclk 2 5>, <&prcc_pclk 2 7>;
+                       clock-names = "sdi", "apb_pclk";
+
                        status = "disabled";
                };
 
                               <&dma 42 0 0x0>; /* Logical - MemToDev */
                        dma-names = "rx", "tx";
 
+                       clocks = <&prcc_kclk 2 2>, <&prcc_pclk 2 4>;
+                       clock-names = "sdi", "apb_pclk";
+
                        status = "disabled";
                };
 
                        compatible = "arm,pl18x", "arm,primecell";
                        reg = <0x80008000 0x1000>;
                        interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
+
+                       clocks = <&prcc_kclk 3 7>, <&prcc_pclk 3 7>;
+                       clock-names = "sdi", "apb_pclk";
+
                        status = "disabled";
                };
 
                        reg = <0x80123000 0x1000>;
                        interrupts = <0 31 IRQ_TYPE_LEVEL_HIGH>;
                        v-ape-supply = <&db8500_vape_reg>;
+
+                       clocks = <&prcc_kclk 1 3>, <&prcc_pclk 1 3>;
+                       clock-names = "msp", "apb_pclk";
+
                        status = "disabled";
                };
 
                        reg = <0x80124000 0x1000>;
                        interrupts = <0 62 IRQ_TYPE_LEVEL_HIGH>;
                        v-ape-supply = <&db8500_vape_reg>;
+
+                       clocks = <&prcc_kclk 1 4>, <&prcc_pclk 1 4>;
+                       clock-names = "msp", "apb_pclk";
+
                        status = "disabled";
                };
 
                        reg = <0x80117000 0x1000>;
                        interrupts = <0 98 IRQ_TYPE_LEVEL_HIGH>;
                        v-ape-supply = <&db8500_vape_reg>;
+
+                       clocks = <&prcc_kclk 2 3>, <&prcc_pclk 2 5>;
+                       clock-names = "msp", "apb_pclk";
+
                        status = "disabled";
                };
 
                        reg = <0x80125000 0x1000>;
                        interrupts = <0 62 IRQ_TYPE_LEVEL_HIGH>;
                        v-ape-supply = <&db8500_vape_reg>;
+
+                       clocks = <&prcc_kclk 1 10>, <&prcc_pclk 1 11>;
+                       clock-names = "msp", "apb_pclk";
+
                        status = "disabled";
                };
 
                cpufreq-cooling {
                        compatible = "stericsson,db8500-cpufreq-cooling";
                        status = "disabled";
-                };
+               };
 
                vmmci: regulator-gpio {
                        compatible = "regulator-gpio";
                        interrupts = <0 15 IRQ_TYPE_LEVEL_HIGH>;
 
                        v-ape-supply = <&db8500_vape_reg>;
+                       clocks = <&prcc_pclk 6 1>;
                };
 
                hash@a03c2000 {
                        reg = <0xa03c2000 0x1000>;
 
                        v-ape-supply = <&db8500_vape_reg>;
+                       clocks = <&prcc_pclk 6 2>;
                };
        };
 };
similarity index 95%
rename from arch/arm/boot/dts/ste-stuib.dtsi
rename to arch/arm/boot/dts/ste-href-stuib.dtsi
index 524e33240ad418e739e7dfd7a6d41cce642b3261..76704ec0ffcc89bf3fd0d7e90726c6cc1502807b 100644 (file)
@@ -57,7 +57,6 @@
                        bu21013_tp@5c {
                                compatible = "rohm,bu21013_tp";
                                reg = <0x5c>;
-                               touch-gpio = <&gpio2 20 0x4>;
                                avdd-supply = <&ab8500_ldo_aux1_reg>;
 
                                rohm,touch-max-x = <384>;
@@ -68,7 +67,6 @@
                        bu21013_tp@5d {
                                compatible = "rohm,bu21013_tp";
                                reg = <0x5d>;
-                               touch-gpio = <&gpio2 20 0x4>;
                                avdd-supply = <&ab8500_ldo_aux1_reg>;
 
                                rohm,touch-max-x = <384>;
diff --git a/arch/arm/boot/dts/ste-href-tvk1281618.dtsi b/arch/arm/boot/dts/ste-href-tvk1281618.dtsi
new file mode 100644 (file)
index 0000000..76d3ef1
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2012 ST-Ericsson AB
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * Device Tree for the TVK1281618 UIB
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+       soc {
+               /* Add Synaptics touch screen, TC35892 keypad etc here */
+               i2c@80004000 {
+                       tc3589x@44 {
+                               compatible = "tc3589x";
+                               reg = <0x44>;
+                               interrupt-parent = <&gpio6>;
+                               interrupts = <26 IRQ_TYPE_EDGE_RISING>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+
+                               tc3589x_gpio {
+                                       compatible = "tc3589x-gpio";
+                                       interrupts = <0 IRQ_TYPE_EDGE_RISING>;
+
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       gpio-controller;
+                                       #gpio-cells = <2>;
+                               };
+                       };
+               };
+       };
+};
index 370e03f5e7b2c8bcd416dd871b89c44e5e9ddfb8..aa3f02060fdd43114570eceedbf1ef54dc49a01f 100644 (file)
                        status = "okay";
                };
 
-               i2c@80004000 {
-                       tc3589x@42 {
-                               compatible = "tc3589x";
-                               reg = <0x42>;
-                               interrupt-parent = <&gpio6>;
-                               interrupts = <25 IRQ_TYPE_EDGE_RISING>;
-
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-
-                               tc3589x_gpio: tc3589x_gpio {
-                                       compatible = "tc3589x-gpio";
-                                       interrupts = <0 IRQ_TYPE_EDGE_RISING>;
-
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                                       gpio-controller;
-                                       #gpio-cells = <2>;
-                               };
-                       };
-               };
-
                i2c@80128000 {
                        lp5521@33 {
                                compatible = "national,lp5521";
@@ -72,6 +50,7 @@
                                chan0 {
                                        led-cur = /bits/ 8 <0x2f>;
                                        max-cur = /bits/ 8 <0x5f>;
+                                       linux,default-trigger = "heartbeat";
                                };
                                chan1 {
                                        led-cur = /bits/ 8 <0x2f>;
                        };
                        bh1780@29 {
                                compatible = "rohm,bh1780gli";
-                               reg = <0x33>;
+                               reg = <0x29>;
                        };
                };
 
                };
 
                prcmu@80157000 {
-                       db8500-prcmu-regulators {
-                               db8500_vape_reg: db8500_vape {
-                                       regulator-name = "db8500-vape";
-                               };
-
-                               db8500_varm_reg: db8500_varm {
-                                       regulator-name = "db8500-varm";
-                               };
-
-                               db8500_vmodem_reg: db8500_vmodem {
-                                       regulator-name = "db8500-vmodem";
-                               };
-
-                               db8500_vpll_reg: db8500_vpll {
-                                       regulator-name = "db8500-vpll";
-                               };
-
-                               db8500_vsmps1_reg: db8500_vsmps1 {
-                                       regulator-name = "db8500-vsmps1";
-                               };
-
-                               db8500_vsmps2_reg: db8500_vsmps2 {
-                                       regulator-name = "db8500-vsmps2";
-                               };
-
-                               db8500_vsmps3_reg: db8500_vsmps3 {
-                                       regulator-name = "db8500-vsmps3";
-                               };
-
-                               db8500_vrf1_reg: db8500_vrf1 {
-                                       regulator-name = "db8500-vrf1";
-                               };
-
-                               db8500_sva_mmdsp_reg: db8500_sva_mmdsp {
-                                       regulator-name = "db8500-sva-mmdsp";
-                               };
-
-                               db8500_sva_mmdsp_ret_reg: db8500_sva_mmdsp_ret {
-                                       regulator-name = "db8500-sva-mmdsp-ret";
-                               };
-
-                               db8500_sva_pipe_reg: db8500_sva_pipe {
-                                       regulator-name = "db8500_sva_pipe";
-                               };
-
-                               db8500_sia_mmdsp_reg: db8500_sia_mmdsp {
-                                       regulator-name = "db8500_sia_mmdsp";
-                               };
-
-                               db8500_sia_mmdsp_ret_reg: db8500_sia_mmdsp_ret {
-                                       regulator-name = "db8500-sia-mmdsp-ret";
-                               };
-
-                               db8500_sia_pipe_reg: db8500_sia_pipe {
-                                       regulator-name = "db8500-sia-pipe";
-                               };
-
-                               db8500_sga_reg: db8500_sga {
-                                       regulator-name = "db8500-sga";
-                               };
-
-                               db8500_b2r2_mcde_reg: db8500_b2r2_mcde {
-                                       regulator-name = "db8500-b2r2-mcde";
-                               };
-
-                               db8500_esram12_reg: db8500_esram12 {
-                                       regulator-name = "db8500-esram12";
-                               };
-
-                               db8500_esram12_ret_reg: db8500_esram12_ret {
-                                       regulator-name = "db8500-esram12-ret";
-                               };
-
-                               db8500_esram34_reg: db8500_esram34 {
-                                       regulator-name = "db8500-esram34";
+                       ab8500 {
+                               ab8500-gpio {
+                                       compatible = "stericsson,ab8500-gpio";
                                };
 
-                               db8500_esram34_ret_reg: db8500_esram34_ret {
-                                       regulator-name = "db8500-esram34-ret";
-                               };
-                       };
-
-                       ab8500 {
                                ab8500-regulators {
                                        ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
                                                regulator-name = "V-DISPLAY";
diff --git a/arch/arm/boot/dts/ste-hrefprev60-stuib.dts b/arch/arm/boot/dts/ste-hrefprev60-stuib.dts
new file mode 100644 (file)
index 0000000..2b1cb5b
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2012 ST-Ericsson AB
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "ste-hrefprev60.dtsi"
+#include "ste-href-stuib.dtsi"
+
+/ {
+       model = "ST-Ericsson HREF (pre-v60) and ST UIB";
+       compatible = "st-ericsson,mop500", "st-ericsson,u8500";
+
+       soc {
+               /* Reset line for the BU21013 touchscreen */
+               i2c@80110000 {
+                       /* Only one of these will be used */
+                       bu21013_tp@5c {
+                               touch-gpio = <&gpio2 12 0x4>;
+                               reset-gpio = <&tc3589x_gpio 13 0x4>;
+                       };
+                       bu21013_tp@5d {
+                               touch-gpio = <&gpio2 12 0x4>;
+                               reset-gpio = <&tc3589x_gpio 13 0x4>;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/ste-hrefprev60-tvk.dts b/arch/arm/boot/dts/ste-hrefprev60-tvk.dts
new file mode 100644 (file)
index 0000000..59523f8
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2012 ST-Ericsson AB
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "ste-hrefprev60.dtsi"
+#include "ste-href-tvk1281618.dtsi"
+
+/ {
+       model = "ST-Ericsson HREF (pre-v60) and TVK1281618 UIB";
+       compatible = "st-ericsson,mop500", "st-ericsson,u8500";
+};
similarity index 60%
rename from arch/arm/boot/dts/ste-hrefprev60.dts
rename to arch/arm/boot/dts/ste-hrefprev60.dtsi
index d8d3b99ab00752be80d78ddf4709a9a888cee4e6..b2cd7bc2752f2a6ea67e0849593410cc61dd176a 100644 (file)
@@ -7,17 +7,14 @@
  *
  * http://www.opensource.org/licenses/gpl-license.html
  * http://www.gnu.org/copyleft/gpl.html
+ *
+ * Device Tree for the HREF+ prior to the v60 variant.
  */
 
-/dts-v1/;
 #include "ste-dbx5x0.dtsi"
 #include "ste-href.dtsi"
-#include "ste-stuib.dtsi"
 
 / {
-       model = "ST-Ericsson HREF (pre-v60) platform with Device Tree";
-       compatible = "st-ericsson,mop500", "st-ericsson,u8500";
-
        gpio_keys {
                button@1 {
                        gpios = <&tc3589x_gpio 7 0x4>;
        };
 
        soc {
-               prcmu@80157000 {
-                       ab8500@5 {
-                               ab8500-gpio {
-                                       compatible = "stericsson,ab8500-gpio";
-                               };
-                       };
-               };
-
                i2c@80004000 {
                        tps61052@33 {
                                compatible = "tps61052";
                                reg = <0x33>;
                        };
-               };
 
-               i2c@80110000 {
-                       bu21013_tp@5c {
-                               reset-gpio = <&tc3589x_gpio 13 0x4>;
+                       tc3589x@42 {
+                               compatible = "tc3589x";
+                               reg = <0x42>;
+                               interrupt-parent = <&gpio6>;
+                               interrupts = <25 IRQ_TYPE_EDGE_RISING>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+
+                               tc3589x_gpio: tc3589x_gpio {
+                                       compatible = "tc3589x-gpio";
+                                       interrupts = <0 IRQ_TYPE_EDGE_RISING>;
+
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       gpio-controller;
+                                       #gpio-cells = <2>;
+                               };
                        };
                };
 
diff --git a/arch/arm/boot/dts/ste-hrefv60plus-stuib.dts b/arch/arm/boot/dts/ste-hrefv60plus-stuib.dts
new file mode 100644 (file)
index 0000000..8c6a2de
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2012 ST-Ericsson AB
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * Device Tree for the HREF version 60 or later with the ST UIB
+ */
+
+/dts-v1/;
+#include "ste-hrefv60plus.dtsi"
+#include "ste-href-stuib.dtsi"
+
+/ {
+       model = "ST-Ericsson HREF (v60+) and ST UIB";
+       compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500";
+
+       soc {
+               /* Reset line for the BU21013 touchscreen */
+               i2c@80110000 {
+                       /* Only one of these will be used */
+                       bu21013_tp@5c {
+                               touch-gpio = <&gpio2 20 0x4>;
+                               reset-gpio = <&gpio4 17 0x4>;
+                       };
+                       bu21013_tp@5d {
+                               touch-gpio = <&gpio2 20 0x4>;
+                               reset-gpio = <&gpio4 17 0x4>;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/ste-hrefv60plus-tvk.dts b/arch/arm/boot/dts/ste-hrefv60plus-tvk.dts
new file mode 100644 (file)
index 0000000..d53cccd
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2012 ST-Ericsson AB
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * Device Tree for the HREF version 60 or later with the TVK1281618 UIB
+ */
+
+/dts-v1/;
+#include "ste-hrefv60plus.dtsi"
+#include "ste-href-tvk1281618.dtsi"
+
+/ {
+       model = "ST-Ericsson HREF (v60+) and TVK1281618 UIB";
+       compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500";
+};
diff --git a/arch/arm/boot/dts/ste-hrefv60plus.dts b/arch/arm/boot/dts/ste-hrefv60plus.dts
deleted file mode 100644 (file)
index 6e52ebb..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright 2012 ST-Ericsson AB
- *
- * The code contained herein is licensed under the GNU General Public
- * License. You may obtain a copy of the GNU General Public License
- * Version 2 or later at the following locations:
- *
- * http://www.opensource.org/licenses/gpl-license.html
- * http://www.gnu.org/copyleft/gpl.html
- */
-
-/dts-v1/;
-#include "ste-dbx5x0.dtsi"
-#include "ste-href.dtsi"
-#include "ste-stuib.dtsi"
-
-/ {
-       model = "ST-Ericsson HREF (v60+) platform with Device Tree";
-       compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500";
-
-       gpio_keys {
-               button@1 {
-                       gpios = <&gpio6 25 0x4>;
-               };
-       };
-
-       soc {
-               i2c@80110000 {
-                       bu21013_tp@0x5c {
-                               reset-gpio = <&gpio4 15 0x4>;
-                       };
-               };
-
-               // External Micro SD slot
-               sdi0_per1@80126000 {
-                       arm,primecell-periphid = <0x10480180>;
-                       max-frequency = <100000000>;
-                       bus-width = <4>;
-                       mmc-cap-sd-highspeed;
-                       mmc-cap-mmc-highspeed;
-                       vmmc-supply = <&ab8500_ldo_aux3_reg>;
-
-                       cd-gpios  = <&tc3589x_gpio 3 0x4>;
-
-                       status = "okay";
-               };
-
-               // WLAN SDIO channel
-               sdi1_per2@80118000 {
-                       arm,primecell-periphid = <0x10480180>;
-                       max-frequency = <100000000>;
-                       bus-width = <4>;
-
-                       status = "okay";
-               };
-
-               // PoP:ed eMMC
-               sdi2_per3@80005000 {
-                       arm,primecell-periphid = <0x10480180>;
-                       max-frequency = <100000000>;
-                       bus-width = <8>;
-                       mmc-cap-mmc-highspeed;
-
-                       status = "okay";
-               };
-
-               // On-board eMMC
-               sdi4_per2@80114000 {
-                       arm,primecell-periphid = <0x10480180>;
-                       max-frequency = <100000000>;
-                       bus-width = <8>;
-                       mmc-cap-mmc-highspeed;
-                       vmmc-supply = <&ab8500_ldo_aux2_reg>;
-
-                       status = "okay";
-               };
-
-               prcmu@80157000 {
-                       db8500-prcmu-regulators {
-                               db8500_vape_reg: db8500_vape {
-                                       regulator-name = "db8500-vape";
-                               };
-
-                               db8500_varm_reg: db8500_varm {
-                                       regulator-name = "db8500-varm";
-                               };
-
-                               db8500_vmodem_reg: db8500_vmodem {
-                                       regulator-name = "db8500-vmodem";
-                               };
-
-                               db8500_vpll_reg: db8500_vpll {
-                                       regulator-name = "db8500-vpll";
-                               };
-
-                               db8500_vsmps1_reg: db8500_vsmps1 {
-                                       regulator-name = "db8500-vsmps1";
-                               };
-
-                               db8500_vsmps2_reg: db8500_vsmps2 {
-                                       regulator-name = "db8500-vsmps2";
-                               };
-
-                               db8500_vsmps3_reg: db8500_vsmps3 {
-                                       regulator-name = "db8500-vsmps3";
-                               };
-
-                               db8500_vrf1_reg: db8500_vrf1 {
-                                       regulator-name = "db8500-vrf1";
-                               };
-
-                               db8500_sva_mmdsp_reg: db8500_sva_mmdsp {
-                                       regulator-name = "db8500-sva-mmdsp";
-                               };
-
-                               db8500_sva_mmdsp_ret_reg: db8500_sva_mmdsp_ret {
-                                       regulator-name = "db8500-sva-mmdsp-ret";
-                               };
-
-                               db8500_sva_pipe_reg: db8500_sva_pipe {
-                                       regulator-name = "db8500_sva_pipe";
-                               };
-
-                               db8500_sia_mmdsp_reg: db8500_sia_mmdsp {
-                                       regulator-name = "db8500_sia_mmdsp";
-                               };
-
-                               db8500_sia_mmdsp_ret_reg: db8500_sia_mmdsp_ret {
-                                       regulator-name = "db8500-sia-mmdsp-ret";
-                               };
-
-                               db8500_sia_pipe_reg: db8500_sia_pipe {
-                                       regulator-name = "db8500-sia-pipe";
-                               };
-
-                               db8500_sga_reg: db8500_sga {
-                                       regulator-name = "db8500-sga";
-                               };
-
-                               db8500_b2r2_mcde_reg: db8500_b2r2_mcde {
-                                       regulator-name = "db8500-b2r2-mcde";
-                               };
-
-                               db8500_esram12_reg: db8500_esram12 {
-                                       regulator-name = "db8500-esram12";
-                               };
-
-                               db8500_esram12_ret_reg: db8500_esram12_ret {
-                                       regulator-name = "db8500-esram12-ret";
-                               };
-
-                               db8500_esram34_reg: db8500_esram34 {
-                                       regulator-name = "db8500-esram34";
-                               };
-
-                               db8500_esram34_ret_reg: db8500_esram34_ret {
-                                       regulator-name = "db8500-esram34-ret";
-                               };
-                       };
-
-                       ab8500 {
-                               ab8500-regulators {
-                                       ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
-                                               regulator-name = "V-DISPLAY";
-                                       };
-
-                                       ab8500_ldo_aux2_reg: ab8500_ldo_aux2 {
-                                               regulator-name = "V-eMMC1";
-                                       };
-
-                                       ab8500_ldo_aux3_reg: ab8500_ldo_aux3 {
-                                               regulator-name = "V-MMC-SD";
-                                       };
-
-                                       ab8500_ldo_intcore_reg: ab8500_ldo_intcore {
-                                               regulator-name = "V-INTCORE";
-                                       };
-
-                                       ab8500_ldo_tvout_reg: ab8500_ldo_tvout {
-                                               regulator-name = "V-TVOUT";
-                                       };
-
-                                       ab8500_ldo_usb_reg: ab8500_ldo_usb {
-                                               regulator-name = "dummy";
-                                       };
-
-                                       ab8500_ldo_audio_reg: ab8500_ldo_audio {
-                                               regulator-name = "V-AUD";
-                                       };
-
-                                       ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 {
-                                               regulator-name = "V-AMIC1";
-                                       };
-
-                                       ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 {
-                                               regulator-name = "V-AMIC2";
-                                       };
-
-                                       ab8500_ldo_dmic_reg: ab8500_ldo_dmic {
-                                               regulator-name = "V-DMIC";
-                                       };
-
-                                       ab8500_ldo_ana_reg: ab8500_ldo_ana {
-                                               regulator-name = "V-CSI/DSI";
-                                       };
-                               };
-                       };
-               };
-       };
-};
diff --git a/arch/arm/boot/dts/ste-hrefv60plus.dtsi b/arch/arm/boot/dts/ste-hrefv60plus.dtsi
new file mode 100644 (file)
index 0000000..aed511b
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2012 ST-Ericsson AB
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#include "ste-dbx5x0.dtsi"
+#include "ste-href.dtsi"
+
+/ {
+       model = "ST-Ericsson HREF (v60+) platform with Device Tree";
+       compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500";
+
+       gpio_keys {
+               button@1 {
+                       gpios = <&gpio5 25 0x4>;
+               };
+       };
+
+       soc {
+               // External Micro SD slot
+               sdi0_per1@80126000 {
+                       arm,primecell-periphid = <0x10480180>;
+                       max-frequency = <100000000>;
+                       bus-width = <4>;
+                       mmc-cap-sd-highspeed;
+                       mmc-cap-mmc-highspeed;
+                       vmmc-supply = <&ab8500_ldo_aux3_reg>;
+
+                       cd-gpios  = <&gpio2 31 0x4>; // 95
+
+                       status = "okay";
+               };
+
+               // WLAN SDIO channel
+               sdi1_per2@80118000 {
+                       arm,primecell-periphid = <0x10480180>;
+                       max-frequency = <100000000>;
+                       bus-width = <4>;
+
+                       status = "okay";
+               };
+
+               // PoP:ed eMMC
+               sdi2_per3@80005000 {
+                       arm,primecell-periphid = <0x10480180>;
+                       max-frequency = <100000000>;
+                       bus-width = <8>;
+                       mmc-cap-mmc-highspeed;
+
+                       status = "okay";
+               };
+
+               // On-board eMMC
+               sdi4_per2@80114000 {
+                       arm,primecell-periphid = <0x10480180>;
+                       max-frequency = <100000000>;
+                       bus-width = <8>;
+                       mmc-cap-mmc-highspeed;
+                       vmmc-supply = <&ab8500_ldo_aux2_reg>;
+
+                       status = "okay";
+               };
+       };
+};
index 9169d3025f39ed5fd2475f43f0d3cd261e71894d..79425e3836cec4e957ef6e9b21dd7f70e83fa394 100644 (file)
                reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
                clocks = <&hclksmc>;
                status = "okay";
+               timings = /bits/ 8 <0 0 0 0x10 0x0a 0>;
 
                partition@0 {
                label = "X-Loader(NAND)";
                pinctrl-0 = <&i2c0_default_mux>, <&i2c0_default_mode>;
 
                stw4811@2d {
-                          compatible = "st,stw4811";
-                          reg = <0x2d>;
+                       compatible = "st,stw4811";
+                       reg = <0x2d>;
+                       vmmc_regulator: vmmc {
+                               compatible = "st,stw481x-vmmc";
+                               regulator-name = "VMMC";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                       };
                };
        };
 
                        cd-inverted;
                        pinctrl-names = "default";
                        pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>;
+                       vmmc-supply = <&vmmc_regulator>;
                };
        };
 };
index f1fc128e249dd7d0dfbd337aeb40fc0dbdcc2c69..f0b39f835914beda02952a3cd9eb8860e38599ba 100644 (file)
                                vdd33a-supply = <&en_3v3_reg>;
                                vddvario-supply = <&db8500_vape_reg>;
 
-
                                reg-shift = <1>;
                                reg-io-width = <2>;
                                smsc,force-internal-phy;
                                smsc,irq-active-high;
                                smsc,irq-push-pull;
+
+                               clocks = <&prcc_pclk 3 0>;
                        };
                };
 
                };
 
                prcmu@80157000 {
-                       db8500-prcmu-regulators {
-                               db8500_vape_reg: db8500_vape {
-                                       regulator-name = "db8500-vape";
-                               };
-
-                               db8500_varm_reg: db8500_varm {
-                                       regulator-name = "db8500-varm";
-                               };
-
-                               db8500_vmodem_reg: db8500_vmodem {
-                                       regulator-name = "db8500-vmodem";
-                               };
-
-                               db8500_vpll_reg: db8500_vpll {
-                                       regulator-name = "db8500-vpll";
-                               };
-
-                               db8500_vsmps1_reg: db8500_vsmps1 {
-                                       regulator-name = "db8500-vsmps1";
-                               };
-
-                               db8500_vsmps2_reg: db8500_vsmps2 {
-                                       regulator-name = "db8500-vsmps2";
-                               };
-
-                               db8500_vsmps3_reg: db8500_vsmps3 {
-                                       regulator-name = "db8500-vsmps3";
-                               };
-
-                               db8500_vrf1_reg: db8500_vrf1 {
-                                       regulator-name = "db8500-vrf1";
-                               };
-
-                               db8500_sva_mmdsp_reg: db8500_sva_mmdsp {
-                                       regulator-name = "db8500-sva-mmdsp";
-                               };
-
-                               db8500_sva_mmdsp_ret_reg: db8500_sva_mmdsp_ret {
-                                       regulator-name = "db8500-sva-mmdsp-ret";
-                               };
-
-                               db8500_sva_pipe_reg: db8500_sva_pipe {
-                                       regulator-name = "db8500_sva_pipe";
-                               };
-
-                               db8500_sia_mmdsp_reg: db8500_sia_mmdsp {
-                                       regulator-name = "db8500_sia_mmdsp";
-                               };
-
-                               db8500_sia_mmdsp_ret_reg: db8500_sia_mmdsp_ret {
-                                       regulator-name = "db8500-sia-mmdsp-ret";
-                               };
-
-                               db8500_sia_pipe_reg: db8500_sia_pipe {
-                                       regulator-name = "db8500-sia-pipe";
-                               };
-
-                               db8500_sga_reg: db8500_sga {
-                                       regulator-name = "db8500-sga";
-                               };
-
-                               db8500_b2r2_mcde_reg: db8500_b2r2_mcde {
-                                       regulator-name = "db8500-b2r2-mcde";
-                               };
-
-                               db8500_esram12_reg: db8500_esram12 {
-                                       regulator-name = "db8500-esram12";
-                               };
-
-                               db8500_esram12_ret_reg: db8500_esram12_ret {
-                                       regulator-name = "db8500-esram12-ret";
-                               };
-
-                               db8500_esram34_reg: db8500_esram34 {
-                                       regulator-name = "db8500-esram34";
-                               };
-
-                               db8500_esram34_ret_reg: db8500_esram34_ret {
-                                       regulator-name = "db8500-esram34-ret";
-                               };
+                       cpufreq {
+                               status = "okay";
                        };
 
                        thermal@801573c0 {
index 8c60f473e97625cb8c0bb068375da7368d1ff6fe..eaa9cf4705a7179dcb7221aa5f2a29a6c1883b78 100644 (file)
@@ -6,7 +6,6 @@ obj-y                           += firmware.o
 
 obj-$(CONFIG_ICST)             += icst.o
 obj-$(CONFIG_SA1111)           += sa1111.o
-obj-$(CONFIG_PCI_HOST_VIA82C505) += via82c505.o
 obj-$(CONFIG_DMABOUNCE)                += dmabounce.o
 obj-$(CONFIG_SHARP_LOCOMO)     += locomo.o
 obj-$(CONFIG_SHARP_PARAM)      += sharpsl_param.o
diff --git a/arch/arm/common/via82c505.c b/arch/arm/common/via82c505.c
deleted file mode 100644 (file)
index 6cb362e..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/interrupt.h>
-#include <linux/mm.h>
-#include <linux/init.h>
-#include <linux/ioport.h>
-#include <linux/io.h>
-
-
-#include <asm/mach/pci.h>
-
-#define MAX_SLOTS              7
-
-#define CONFIG_CMD(bus, devfn, where)   (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3))
-
-static int
-via82c505_read_config(struct pci_bus *bus, unsigned int devfn, int where,
-                     int size, u32 *value)
-{
-       outl(CONFIG_CMD(bus,devfn,where),0xCF8);
-       switch (size) {
-       case 1:
-               *value=inb(0xCFC + (where&3));
-               break;
-       case 2:
-               *value=inw(0xCFC + (where&2));
-               break;
-       case 4:
-               *value=inl(0xCFC);
-               break;
-       }
-       return PCIBIOS_SUCCESSFUL;
-}
-
-static int
-via82c505_write_config(struct pci_bus *bus, unsigned int devfn, int where,
-                      int size, u32 value)
-{
-       outl(CONFIG_CMD(bus,devfn,where),0xCF8);
-       switch (size) {
-       case 1:
-               outb(value, 0xCFC + (where&3));
-               break;
-       case 2:
-               outw(value, 0xCFC + (where&2));
-               break;
-       case 4:
-               outl(value, 0xCFC);
-               break;
-       }
-       return PCIBIOS_SUCCESSFUL;
-}
-
-struct pci_ops via82c505_ops = {
-       .read   = via82c505_read_config,
-       .write  = via82c505_write_config,
-};
-
-void __init via82c505_preinit(void)
-{
-       printk(KERN_DEBUG "PCI: VIA 82c505\n");
-       if (!request_region(0xA8,2,"via config")) {
-               printk(KERN_WARNING"VIA 82c505: Unable to request region 0xA8\n");
-               return;
-       }
-       if (!request_region(0xCF8,8,"pci config")) {
-               printk(KERN_WARNING"VIA 82c505: Unable to request region 0xCF8\n");
-               release_region(0xA8, 2);
-               return;
-       }
-
-       /* Enable compatible Mode */
-       outb(0x96,0xA8);
-       outb(0x18,0xA9);
-       outb(0x93,0xA8);
-       outb(0xd0,0xA9);
-
-}
-
-int __init via82c505_setup(int nr, struct pci_sys_data *sys)
-{
-       return (nr == 0);
-}
index e7e94948d19478729aeb60a8167c6a7cf2a8e7a7..b38cd107f82dfe5b1efffb4075e04fc39f9f41c5 100644 (file)
@@ -91,6 +91,10 @@ CONFIG_VIDEO_RCAR_VIN=y
 CONFIG_VIDEO_ML86V7667=y
 CONFIG_SPI=y
 CONFIG_SPI_SH_HSPI=y
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_SOC=y
+CONFIG_SND_SOC_RCAR=y
 CONFIG_USB=y
 CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/arch/arm/configs/koelsch_defconfig b/arch/arm/configs/koelsch_defconfig
new file mode 100644 (file)
index 0000000..825c16d
--- /dev/null
@@ -0,0 +1,54 @@
+CONFIG_SYSVIPC=y
+CONFIG_NO_HZ=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_EMBEDDED=y
+CONFIG_PERF_EVENTS=y
+CONFIG_SLAB=y
+# CONFIG_BLOCK is not set
+CONFIG_ARCH_SHMOBILE=y
+CONFIG_ARCH_R8A7791=y
+CONFIG_MACH_KOELSCH=y
+# CONFIG_SWP_EMULATE is not set
+CONFIG_CPU_BPREDICT_DISABLE=y
+CONFIG_PL310_ERRATA_588369=y
+CONFIG_ARM_ERRATA_754322=y
+CONFIG_SMP=y
+CONFIG_SCHED_MC=y
+CONFIG_NR_CPUS=8
+CONFIG_AEABI=y
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_KEXEC=y
+CONFIG_AUTO_ZRELADDR=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_PM_RUNTIME=y
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_SERIAL_SH_SCI=y
+CONFIG_SERIAL_SH_SCI_NR_UARTS=20
+CONFIG_SERIAL_SH_SCI_CONSOLE=y
+# CONFIG_HWMON is not set
+CONFIG_THERMAL=y
+CONFIG_RCAR_THERMAL=y
+# CONFIG_HID is not set
+# CONFIG_USB_SUPPORT is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+# CONFIG_IOMMU_SUPPORT is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_INOTIFY_USER is not set
+CONFIG_TMPFS=y
+CONFIG_CONFIGFS_FS=y
+# CONFIG_MISC_FILESYSTEMS is not set
+# CONFIG_ENABLE_WARN_DEPRECATED is not set
+# CONFIG_ENABLE_MUST_CHECK is not set
+# CONFIG_ARM_UNWIND is not set
index e777ef22b8016559a71ef6ac4d59dec9eb29918b..35bff5e0d57a26b799e4554497859dcf1f029e9b 100644 (file)
@@ -89,6 +89,8 @@ CONFIG_THERMAL=y
 CONFIG_RCAR_THERMAL=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_DRM=y
+CONFIG_DRM_RCAR_DU=y
 # CONFIG_USB_SUPPORT is not set
 CONFIG_MMC=y
 CONFIG_MMC_SDHI=y
index 000e9205b2b93ca0aed76dbcbf60f6eb815524b6..5cc6360340b1c683dfe5b31c15a54c61e457963a 100644 (file)
@@ -92,6 +92,8 @@ CONFIG_SOC_CAMERA=y
 CONFIG_VIDEO_RCAR_VIN=y
 # CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
 CONFIG_VIDEO_ADV7180=y
+CONFIG_DRM=y
+CONFIG_DRM_RCAR_DU=y
 CONFIG_USB=y
 CONFIG_USB_RCAR_PHY=y
 CONFIG_MMC=y
diff --git a/arch/arm/configs/shark_defconfig b/arch/arm/configs/shark_defconfig
deleted file mode 100644 (file)
index e319b2c..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-CONFIG_EXPERIMENTAL=y
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SYSVIPC=y
-CONFIG_LOG_BUF_SHIFT=14
-CONFIG_SYSFS_DEPRECATED_V2=y
-CONFIG_SLAB=y
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-# CONFIG_BLK_DEV_BSG is not set
-CONFIG_ARCH_SHARK=y
-CONFIG_LEDS=y
-CONFIG_LEDS_TIMER=y
-CONFIG_ZBOOT_ROM_TEXT=0x0
-CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_FPE_NWFPE=y
-CONFIG_NET=y
-CONFIG_PACKET=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
-# CONFIG_INET_XFRM_MODE_TUNNEL is not set
-# CONFIG_INET_XFRM_MODE_BEET is not set
-# CONFIG_INET_LRO is not set
-# CONFIG_INET_DIAG is not set
-# CONFIG_IPV6 is not set
-CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-# CONFIG_STANDALONE is not set
-# CONFIG_FIRMWARE_IN_KERNEL is not set
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_RAM=y
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDECD=m
-CONFIG_SCSI=m
-CONFIG_BLK_DEV_SD=m
-CONFIG_CHR_DEV_ST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_CHR_DEV_SG=m
-CONFIG_NETDEVICES=y
-CONFIG_NET_ETHERNET=y
-CONFIG_NET_PCI=y
-CONFIG_CS89x0=y
-# CONFIG_SERIO_SERPORT is not set
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_PRINTER=m
-# CONFIG_HWMON is not set
-CONFIG_FB=y
-CONFIG_FB_CYBER2000=y
-# CONFIG_VGA_CONSOLE is not set
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_SOUND=m
-CONFIG_SOUND_PRIME=m
-CONFIG_SOUND_OSS=m
-CONFIG_SOUND_SB=m
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_CMOS=y
-CONFIG_EXT2_FS=y
-CONFIG_EXT3_FS=y
-CONFIG_ISO9660_FS=m
-CONFIG_JOLIET=y
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-CONFIG_NFSD=m
-CONFIG_PARTITION_ADVANCED=y
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_ISO8859_1=m
-# CONFIG_ENABLE_MUST_CHECK is not set
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_SCHED_DEBUG is not set
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
-CONFIG_DEBUG_USER=y
index a0025dc13021af11af524e08e8466c826f802a4a..ac632cc38f249767bcedfc1232a4e4b8e6bc70d9 100644 (file)
@@ -1,4 +1,3 @@
-CONFIG_HIGHMEM=y
 # CONFIG_SWAP is not set
 CONFIG_SYSVIPC=y
 CONFIG_NO_HZ=y
@@ -16,6 +15,9 @@ CONFIG_SMP=y
 CONFIG_NR_CPUS=2
 CONFIG_PREEMPT=y
 CONFIG_AEABI=y
+CONFIG_HIGHMEM=y
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_ARM_ATAG_DTB_COMPAT=y
 CONFIG_CMDLINE="root=/dev/ram0 console=ttyAMA2,115200n8"
 CONFIG_CPU_FREQ=y
 CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
@@ -68,8 +70,8 @@ CONFIG_CPU_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_MFD_STMPE=y
 CONFIG_MFD_TC3589X=y
-CONFIG_REGULATOR_GPIO=y
 CONFIG_REGULATOR_AB8500=y
+CONFIG_REGULATOR_GPIO=y
 CONFIG_SOUND=y
 CONFIG_SND=y
 CONFIG_SND_SOC=y
@@ -78,10 +80,8 @@ CONFIG_SND_SOC_UX500_MACH_MOP500=y
 CONFIG_USB=y
 CONFIG_USB_MUSB_HDRC=y
 CONFIG_USB_MUSB_UX500=y
-CONFIG_USB_PHY=y
 CONFIG_AB8500_USB=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MUSB_HDRC=y
 CONFIG_USB_ETH=m
 CONFIG_MMC=y
 CONFIG_MMC_UNSAFE_RESUME=y
@@ -116,12 +116,12 @@ CONFIG_NFS_FS=y
 CONFIG_ROOT_NFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
+CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_SCHED_DEBUG is not set
 # CONFIG_DEBUG_PREEMPT is not set
-CONFIG_DEBUG_INFO=y
 # CONFIG_FTRACE is not set
 CONFIG_DEBUG_USER=y
 CONFIG_CRYPTO_DEV_UX500=y
index 454d642a407017e879f1e23a54d82ed6bf0faf7b..7fc42784becbf2ee4e4779d06b9345be6c8ccf06 100644 (file)
@@ -106,8 +106,4 @@ extern int dc21285_setup(int nr, struct pci_sys_data *);
 extern void dc21285_preinit(void);
 extern void dc21285_postinit(void);
 
-extern struct pci_ops via82c505_ops;
-extern int via82c505_setup(int nr, struct pci_sys_data *);
-extern void via82c505_init(void *sysdata);
-
 #endif /* __ASM_MACH_PCI_H */
diff --git a/arch/arm/include/asm/sched_clock.h b/arch/arm/include/asm/sched_clock.h
deleted file mode 100644 (file)
index 2389b71..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/* You shouldn't include this file. Use linux/sched_clock.h instead.
- * Temporary file until all asm/sched_clock.h users are gone
- */
-#include <linux/sched_clock.h>
index 98aee3258398663b1147e38372215c8fbfe8267e..829a96d4a179337019f1790ab2e50577f8cc3524 100644 (file)
  *  This file contains the ARM-specific time handling details:
  *  reading the RTC at bootup, etc...
  */
+#include <linux/clk-provider.h>
+#include <linux/clocksource.h>
+#include <linux/errno.h>
 #include <linux/export.h>
-#include <linux/kernel.h>
-#include <linux/interrupt.h>
-#include <linux/time.h>
 #include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+#include <linux/kernel.h>
+#include <linux/profile.h>
 #include <linux/sched.h>
+#include <linux/sched_clock.h>
 #include <linux/smp.h>
+#include <linux/time.h>
 #include <linux/timex.h>
-#include <linux/errno.h>
-#include <linux/profile.h>
 #include <linux/timer.h>
-#include <linux/clocksource.h>
-#include <linux/irq.h>
-#include <linux/sched_clock.h>
 
-#include <asm/thread_info.h>
-#include <asm/stacktrace.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
+#include <asm/stacktrace.h>
+#include <asm/thread_info.h>
 
 #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \
     defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE)
@@ -116,8 +117,12 @@ int __init register_persistent_clock(clock_access_fn read_boot,
 
 void __init time_init(void)
 {
-       if (machine_desc->init_time)
+       if (machine_desc->init_time) {
                machine_desc->init_time();
-       else
+       } else {
+#ifdef CONFIG_COMMON_CLK
+               of_clk_init(NULL);
+#endif
                clocksource_of_init();
+       }
 }
index bd454b09133e38274d6af8fbe6ba2a36fab7dab7..47d7338561de3c93c19a1345226e7078f779b6c6 100644 (file)
@@ -41,7 +41,6 @@ else
 endif
 
 lib-$(CONFIG_ARCH_RPC)         += ecard.o io-acorn.o floppydma.o
-lib-$(CONFIG_ARCH_SHARK)       += io-shark.o
 
 $(obj)/csumpartialcopy.o:      $(obj)/csumpartialcopygeneric.S
 $(obj)/csumpartialcopyuser.o:  $(obj)/csumpartialcopygeneric.S
diff --git a/arch/arm/lib/io-shark.c b/arch/arm/lib/io-shark.c
deleted file mode 100644 (file)
index 8242539..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- *  linux/arch/arm/lib/io-shark.c
- *
- *  by Alexander Schulz
- *
- * derived from:
- * linux/arch/arm/lib/io-ebsa.S
- * Copyright (C) 1995, 1996 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
index 8d9f931164bb8544aa046f01d2938bb9703cb183..26b2390492b801927f6376a725db237a4cc82416 100644 (file)
@@ -68,7 +68,6 @@ static void __init board_init(void)
 static const char * const bcm11351_dt_compat[] = { "brcm,bcm11351", NULL, };
 
 DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor")
-       .init_time = clocksource_of_init,
        .init_machine = board_init,
        .restart = bcm_kona_restart,
        .dt_compat = bcm11351_dt_compat,
index 40686d7ef500223765a1a08f6beccfad9a2847f6..d50135be0c20988e176b3c2a647c7ef1fb9f6e6c 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/of_address.h>
 #include <linux/of_platform.h>
 #include <linux/clk/bcm2835.h>
-#include <linux/clocksource.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -134,7 +133,6 @@ DT_MACHINE_START(BCM2835, "BCM2835")
        .init_irq = bcm2835_init_irq,
        .handle_irq = bcm2835_handle_irq,
        .init_machine = bcm2835_init,
-       .init_time = clocksource_of_init,
        .restart = bcm2835_restart,
        .dt_compat = bcm2835_compat
 MACHINE_END
index 4ca2f3ca2de42efe618530332885492e4e223385..134641d688bb12f201dd2d0cedcd166890a8ce71 100644 (file)
 #include <linux/clockchips.h>
 #include <linux/clocksource.h>
 #include <linux/clk-provider.h>
+#include <linux/sched_clock.h>
 
 #include <asm/exception.h>
 #include <asm/mach/irq.h>
 #include <asm/mach/map.h>
 #include <asm/mach/time.h>
-#include <asm/sched_clock.h>
 #include <asm/system_misc.h>
 
 #include <mach/hardware.h>
index 30a44e2df47ec22e0e6043b6a718620701f19cbf..40f15f133c55c3646d5eeac3ef3eec7764cae760 100644 (file)
 #include <linux/mtd/partitions.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/flash.h>
+#include <linux/platform_data/gpio-davinci.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/mtd-davinci-aemif.h>
+#include <linux/platform_data/spi-davinci.h>
+#include <linux/platform_data/usb-davinci.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
+#include <mach/common.h>
 #include <mach/cp_intc.h>
 #include <mach/mux.h>
-#include <linux/platform_data/mtd-davinci.h>
 #include <mach/da8xx.h>
-#include <linux/platform_data/usb-davinci.h>
-#include <linux/platform_data/mtd-davinci-aemif.h>
-#include <linux/platform_data/spi-davinci.h>
 
 #define DA830_EVM_PHY_ID               ""
 /*
@@ -591,6 +593,10 @@ static __init void da830_evm_init(void)
        struct davinci_soc_info *soc_info = &davinci_soc_info;
        int ret;
 
+       ret = da830_register_gpio();
+       if (ret)
+               pr_warn("da830_evm_init: GPIO init failed: %d\n", ret);
+
        ret = da830_register_edma(da830_edma_rsv);
        if (ret)
                pr_warning("da830_evm_init: edma registration failed: %d\n",
index dd1fb24521aa85b16baa9d200b40d28774591cfc..df16cb88a26b643814af5385affb94a7a8220882 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
+#include <linux/platform_data/gpio-davinci.h>
 #include <linux/platform_data/mtd-davinci.h>
 #include <linux/platform_data/mtd-davinci-aemif.h>
 #include <linux/platform_data/spi-davinci.h>
@@ -38,6 +39,7 @@
 #include <linux/spi/flash.h>
 #include <linux/wl12xx.h>
 
+#include <mach/common.h>
 #include <mach/cp_intc.h>
 #include <mach/da8xx.h>
 #include <mach/mux.h>
@@ -1437,6 +1439,10 @@ static __init void da850_evm_init(void)
 {
        int ret;
 
+       ret = da850_register_gpio();
+       if (ret)
+               pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
+
        ret = pmic_tps65070_init();
        if (ret)
                pr_warn("%s: TPS65070 PMIC init failed: %d\n", __func__, ret);
index 42b23a3194a05d9052026e2f14c4a0fe5a9cc67e..ecdc7d44fa70aef07279f552e98a6354ed6c3900 100644 (file)
 #include <media/tvp514x.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/eeprom.h>
+#include <linux/platform_data/gpio-davinci.h>
+#include <linux/platform_data/i2c-davinci.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/mmc-davinci.h>
+#include <linux/platform_data/usb-davinci.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
-#include <linux/platform_data/i2c-davinci.h>
 #include <mach/serial.h>
-#include <linux/platform_data/mtd-davinci.h>
-#include <linux/platform_data/mmc-davinci.h>
-#include <linux/platform_data/usb-davinci.h>
+#include <mach/common.h>
 
 #include "davinci.h"
 
@@ -375,6 +377,11 @@ static struct spi_board_info dm355_evm_spi_info[] __initconst = {
 static __init void dm355_evm_init(void)
 {
        struct clk *aemif;
+       int ret;
+
+       ret = dm355_gpio_register();
+       if (ret)
+               pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
 
        gpio_request(1, "dm9000");
        gpio_direction_input(1);
index 65a984c52df6fce12732ee0ff1b09902bb23d81a..43bacbf153140f7a9e6be87ed5e8b3cbe4012570 100644 (file)
 #include <linux/clk.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/eeprom.h>
+#include <linux/platform_data/i2c-davinci.h>
+#include <linux/platform_data/mmc-davinci.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/usb-davinci.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
-#include <linux/platform_data/i2c-davinci.h>
+#include <mach/common.h>
 #include <mach/serial.h>
-#include <linux/platform_data/mtd-davinci.h>
-#include <linux/platform_data/mmc-davinci.h>
-#include <linux/platform_data/usb-davinci.h>
 
 #include "davinci.h"
 
@@ -234,6 +235,11 @@ static struct spi_board_info dm355_leopard_spi_info[] __initconst = {
 static __init void dm355_leopard_init(void)
 {
        struct clk *aemif;
+       int ret;
+
+       ret = dm355_gpio_register();
+       if (ret)
+               pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
 
        gpio_request(9, "dm9000");
        gpio_direction_input(9);
index 4078ba93776b24ef9438f0dcc73c2f42dd859bd9..f4a6c18912ea50abaac233fedf26cef69af06724 100644 (file)
@@ -743,6 +743,12 @@ static struct spi_board_info dm365_evm_spi_info[] __initconst = {
 
 static __init void dm365_evm_init(void)
 {
+       int ret;
+
+       ret = dm365_gpio_register();
+       if (ret)
+               pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
+
        evm_init_i2c();
        davinci_serial_init(dm365_serial_device);
 
index 40bb9b5b87e829c2d4b741625141a58732921d9f..9cc32c283b8b90af050de90411a9b1d168b3b050 100644 (file)
@@ -754,9 +754,14 @@ static int davinci_phy_fixup(struct phy_device *phydev)
 
 static __init void davinci_evm_init(void)
 {
+       int ret;
        struct clk *aemif_clk;
        struct davinci_soc_info *soc_info = &davinci_soc_info;
 
+       ret = dm644x_gpio_register();
+       if (ret)
+               pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
+
        aemif_clk = clk_get(NULL, "aemif");
        clk_prepare_enable(aemif_clk);
 
index 2bc3651d56cc8f52757b3703c14daadf2360abeb..44b20191a9fed5359ed0b24344e0aeb15430d210 100644 (file)
 #include <linux/mtd/partitions.h>
 #include <linux/clk.h>
 #include <linux/export.h>
+#include <linux/platform_data/gpio-davinci.h>
+#include <linux/platform_data/i2c-davinci.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/mtd-davinci-aemif.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
 #include <mach/common.h>
+#include <mach/irqs.h>
 #include <mach/serial.h>
-#include <linux/platform_data/i2c-davinci.h>
-#include <linux/platform_data/mtd-davinci.h>
 #include <mach/clock.h>
 #include <mach/cdce949.h>
-#include <linux/platform_data/mtd-davinci-aemif.h>
 
 #include "davinci.h"
 #include "clock.h"
@@ -786,8 +788,13 @@ static struct edma_rsv_info dm646x_edma_rsv[] = {
 
 static __init void evm_init(void)
 {
+       int ret;
        struct davinci_soc_info *soc_info = &davinci_soc_info;
 
+       ret = dm646x_gpio_register();
+       if (ret)
+               pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
+
        evm_init_i2c();
        davinci_serial_init(dm646x_serial_device);
        dm646x_init_mcasp0(&dm646x_evm_snd_data[0]);
index 46f336fca80384541257e667383d85080b718b1b..bb680af98374e2177702529fd179b0d78d377828 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
 #include <linux/mtd/partitions.h>
+#include <linux/platform_data/gpio-davinci.h>
+#include <linux/platform_data/i2c-davinci.h>
+#include <linux/platform_data/mmc-davinci.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/usb-davinci.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
 #include <mach/common.h>
-#include <linux/platform_data/i2c-davinci.h>
 #include <mach/serial.h>
 #include <mach/mux.h>
-#include <linux/platform_data/mtd-davinci.h>
-#include <linux/platform_data/mmc-davinci.h>
-#include <linux/platform_data/usb-davinci.h>
 
 #include "davinci.h"
 
@@ -169,9 +170,14 @@ static struct davinci_mmc_config davinci_ntosd2_mmc_config = {
 
 static __init void davinci_ntosd2_init(void)
 {
+       int ret;
        struct clk *aemif_clk;
        struct davinci_soc_info *soc_info = &davinci_soc_info;
 
+       ret = dm644x_gpio_register();
+       if (ret)
+               pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
+
        aemif_clk = clk_get(NULL, "aemif");
        clk_prepare_enable(aemif_clk);
 
index e0de2da41b5cc3d88a94e06c8dc8f4bcfd918d32..2aac51d0e85325361d9406e2d5abd6b8f8b9383b 100644 (file)
 #include <linux/init.h>
 #include <linux/console.h>
 #include <linux/gpio.h>
+#include <linux/platform_data/gpio-davinci.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
+#include <mach/common.h>
 #include <mach/cp_intc.h>
 #include <mach/da8xx.h>
 #include <mach/mux.h>
@@ -290,6 +292,10 @@ static __init void omapl138_hawk_init(void)
 {
        int ret;
 
+       ret = da850_register_gpio();
+       if (ret)
+               pr_warn("%s: GPIO init failed: %d\n", __func__, ret);
+
        davinci_serial_init(da8xx_serial_device);
 
        omapl138_hawk_config_emac();
index d6c746e35ad9fe196e947994de330fefda3e1962..0813b5167e059e1c7c32d82374bbdb6470eb9370 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/gpio.h>
 #include <linux/init.h>
 #include <linux/clk.h>
+#include <linux/platform_data/gpio-davinci.h>
 
 #include <asm/mach/map.h>
 
@@ -20,7 +21,6 @@
 #include <mach/common.h>
 #include <mach/time.h>
 #include <mach/da8xx.h>
-#include <mach/gpio-davinci.h>
 
 #include "clock.h"
 #include "mux.h"
@@ -1151,6 +1151,16 @@ static struct davinci_id da830_ids[] = {
        },
 };
 
+static struct davinci_gpio_platform_data da830_gpio_platform_data = {
+       .ngpio = 128,
+       .intc_irq_num = DA830_N_CP_INTC_IRQ,
+};
+
+int __init da830_register_gpio(void)
+{
+       return da8xx_register_gpio(&da830_gpio_platform_data);
+}
+
 static struct davinci_timer_instance da830_timer_instance[2] = {
        {
                .base           = DA8XX_TIMER64P0_BASE,
@@ -1196,10 +1206,6 @@ static struct davinci_soc_info davinci_soc_info_da830 = {
        .intc_irq_prios         = da830_default_priorities,
        .intc_irq_num           = DA830_N_CP_INTC_IRQ,
        .timer_info             = &da830_timer_info,
-       .gpio_type              = GPIO_TYPE_DAVINCI,
-       .gpio_base              = DA8XX_GPIO_BASE,
-       .gpio_num               = 128,
-       .gpio_irq               = IRQ_DA8XX_GPIO0,
        .emac_pdata             = &da8xx_emac_pdata,
 };
 
index f56e5fbfa2fd20ebd0a8fd18adaee48463e632b2..352984e1528a4ab08cdd2e52b072e841e6a895e1 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/platform_device.h>
 #include <linux/cpufreq.h>
 #include <linux/regulator/consumer.h>
+#include <linux/platform_data/gpio-davinci.h>
 
 #include <asm/mach/map.h>
 
@@ -28,7 +29,6 @@
 #include <mach/da8xx.h>
 #include <mach/cpufreq.h>
 #include <mach/pm.h>
-#include <mach/gpio-davinci.h>
 
 #include "clock.h"
 #include "mux.h"
@@ -1281,6 +1281,16 @@ int __init da850_register_vpif_capture(struct vpif_capture_config
        return platform_device_register(&da850_vpif_capture_dev);
 }
 
+static struct davinci_gpio_platform_data da850_gpio_platform_data = {
+       .ngpio = 144,
+       .intc_irq_num = DA850_N_CP_INTC_IRQ,
+};
+
+int __init da850_register_gpio(void)
+{
+       return da8xx_register_gpio(&da850_gpio_platform_data);
+}
+
 static struct davinci_soc_info davinci_soc_info_da850 = {
        .io_desc                = da850_io_desc,
        .io_desc_num            = ARRAY_SIZE(da850_io_desc),
@@ -1298,10 +1308,6 @@ static struct davinci_soc_info davinci_soc_info_da850 = {
        .intc_irq_prios         = da850_default_priorities,
        .intc_irq_num           = DA850_N_CP_INTC_IRQ,
        .timer_info             = &da850_timer_info,
-       .gpio_type              = GPIO_TYPE_DAVINCI,
-       .gpio_base              = DA8XX_GPIO_BASE,
-       .gpio_num               = 144,
-       .gpio_irq               = IRQ_DA8XX_GPIO0,
        .emac_pdata             = &da8xx_emac_pdata,
        .sram_dma               = DA8XX_SHARED_RAM_BASE,
        .sram_len               = SZ_128K,
index 2ab5d577186f4177fd06c414b31d25c21d295f8f..2eebc433880223b0ed2c5fe18c56aa11807cd699 100644 (file)
@@ -53,6 +53,9 @@ extern void __iomem *davinci_sysmod_base;
 #define DAVINCI_SYSMOD_VIRT(x) (davinci_sysmod_base + (x))
 void davinci_map_sysmod(void);
 
+#define DAVINCI_GPIO_BASE 0x01C67000
+int davinci_gpio_register(struct resource *res, int size, void *pdata);
+
 /* DM355 base addresses */
 #define DM355_ASYNC_EMIF_CONTROL_BASE  0x01e10000
 #define DM355_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
@@ -82,6 +85,7 @@ void dm355_init_spi0(unsigned chipselect_mask,
                const struct spi_board_info *info, unsigned len);
 void dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata);
 int dm355_init_video(struct vpfe_config *, struct vpbe_config *);
+int dm355_gpio_register(void);
 
 /* DM365 function declarations */
 void dm365_init(void);
@@ -92,11 +96,13 @@ void dm365_init_rtc(void);
 void dm365_init_spi0(unsigned chipselect_mask,
                        const struct spi_board_info *info, unsigned len);
 int dm365_init_video(struct vpfe_config *, struct vpbe_config *);
+int dm365_gpio_register(void);
 
 /* DM644x function declarations */
 void dm644x_init(void);
 void dm644x_init_asp(struct snd_platform_data *pdata);
 int dm644x_init_video(struct vpfe_config *, struct vpbe_config *);
+int dm644x_gpio_register(void);
 
 /* DM646x function declarations */
 void dm646x_init(void);
@@ -106,6 +112,7 @@ int dm646x_init_edma(struct edma_rsv_info *rsv);
 void dm646x_video_init(void);
 void dm646x_setup_vpif(struct vpif_display_config *,
                       struct vpif_capture_config *);
+int dm646x_gpio_register(void);
 
 extern struct platform_device dm365_serial_device[];
 extern struct platform_device dm355_serial_device[];
index 2e473fefd71ebc2049d490f554da0f8a70d2578b..c46eccbbd51226f5ae6ab5a16e1c89668c35fa1d 100644 (file)
@@ -665,6 +665,32 @@ int __init da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata)
        return platform_device_register(&da8xx_lcdc_device);
 }
 
+static struct resource da8xx_gpio_resources[] = {
+       { /* registers */
+               .start  = DA8XX_GPIO_BASE,
+               .end    = DA8XX_GPIO_BASE + SZ_4K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       { /* interrupt */
+               .start  = IRQ_DA8XX_GPIO0,
+               .end    = IRQ_DA8XX_GPIO8,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device da8xx_gpio_device = {
+       .name           = "davinci_gpio",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(da8xx_gpio_resources),
+       .resource       = da8xx_gpio_resources,
+};
+
+int __init da8xx_register_gpio(void *pdata)
+{
+       da8xx_gpio_device.dev.platform_data = pdata;
+       return platform_device_register(&da8xx_gpio_device);
+}
+
 static struct resource da8xx_mmcsd0_resources[] = {
        {               /* registers */
                .start  = DA8XX_MMCSD0_BASE,
index 111573c0aad144dacea6674a842ec15b2bfd110a..3996e98f52fbe0c4e8601bb2dc1b8d0932a8ffd9 100644 (file)
@@ -318,6 +318,19 @@ static void davinci_init_wdt(void)
        platform_device_register(&davinci_wdt_device);
 }
 
+static struct platform_device davinci_gpio_device = {
+       .name   = "davinci_gpio",
+       .id     = -1,
+};
+
+int davinci_gpio_register(struct resource *res, int size, void *pdata)
+{
+       davinci_gpio_device.resource = res;
+       davinci_gpio_device.num_resources = size;
+       davinci_gpio_device.dev.platform_data = pdata;
+       return platform_device_register(&davinci_gpio_device);
+}
+
 /*-------------------------------------------------------------------------*/
 
 /*-------------------------------------------------------------------------*/
index 3eaa5f6b2160593517463c2b18c211bbad93605e..ef9ff1fb6f52a2533378ba37563c06e877b32ea3 100644 (file)
 #include <linux/serial_8250.h>
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
-
 #include <linux/spi/spi.h>
+#include <linux/platform_data/edma.h>
+#include <linux/platform_data/gpio-davinci.h>
+#include <linux/platform_data/spi-davinci.h>
 
 #include <asm/mach/map.h>
 
@@ -25,9 +27,6 @@
 #include <mach/time.h>
 #include <mach/serial.h>
 #include <mach/common.h>
-#include <linux/platform_data/spi-davinci.h>
-#include <mach/gpio-davinci.h>
-#include <linux/platform_data/edma.h>
 
 #include "davinci.h"
 #include "clock.h"
@@ -886,6 +885,30 @@ static struct platform_device dm355_vpbe_dev = {
        },
 };
 
+static struct resource dm355_gpio_resources[] = {
+       {       /* registers */
+               .start  = DAVINCI_GPIO_BASE,
+               .end    = DAVINCI_GPIO_BASE + SZ_4K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       {       /* interrupt */
+               .start  = IRQ_DM355_GPIOBNK0,
+               .end    = IRQ_DM355_GPIOBNK6,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct davinci_gpio_platform_data dm355_gpio_platform_data = {
+       .ngpio          = 104,
+       .intc_irq_num   = DAVINCI_N_AINTC_IRQ,
+};
+
+int __init dm355_gpio_register(void)
+{
+       return davinci_gpio_register(dm355_gpio_resources,
+                                    sizeof(dm355_gpio_resources),
+                                    &dm355_gpio_platform_data);
+}
 /*----------------------------------------------------------------------*/
 
 static struct map_desc dm355_io_desc[] = {
@@ -1005,10 +1028,6 @@ static struct davinci_soc_info davinci_soc_info_dm355 = {
        .intc_irq_prios         = dm355_default_priorities,
        .intc_irq_num           = DAVINCI_N_AINTC_IRQ,
        .timer_info             = &dm355_timer_info,
-       .gpio_type              = GPIO_TYPE_DAVINCI,
-       .gpio_base              = DAVINCI_GPIO_BASE,
-       .gpio_num               = 104,
-       .gpio_irq               = IRQ_DM355_GPIOBNK0,
        .sram_dma               = 0x00010000,
        .sram_len               = SZ_32K,
 };
index c29e324eb0bb75012d227da960e96fd60c2141f9..1511a0680f9a1d399cf3094b538c3c52caa06547 100644 (file)
@@ -19,6 +19,9 @@
 #include <linux/dma-mapping.h>
 #include <linux/spi/spi.h>
 #include <linux/platform_data/edma.h>
+#include <linux/platform_data/gpio-davinci.h>
+#include <linux/platform_data/keyscan-davinci.h>
+#include <linux/platform_data/spi-davinci.h>
 
 #include <asm/mach/map.h>
 
@@ -29,9 +32,6 @@
 #include <mach/time.h>
 #include <mach/serial.h>
 #include <mach/common.h>
-#include <linux/platform_data/keyscan-davinci.h>
-#include <linux/platform_data/spi-davinci.h>
-#include <mach/gpio-davinci.h>
 
 #include "davinci.h"
 #include "clock.h"
@@ -698,6 +698,32 @@ void __init dm365_init_spi0(unsigned chipselect_mask,
        platform_device_register(&dm365_spi0_device);
 }
 
+static struct resource dm365_gpio_resources[] = {
+       {       /* registers */
+               .start  = DAVINCI_GPIO_BASE,
+               .end    = DAVINCI_GPIO_BASE + SZ_4K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       {       /* interrupt */
+               .start  = IRQ_DM365_GPIO0,
+               .end    = IRQ_DM365_GPIO7,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct davinci_gpio_platform_data dm365_gpio_platform_data = {
+       .ngpio          = 104,
+       .intc_irq_num   = DAVINCI_N_AINTC_IRQ,
+       .gpio_unbanked  = 8,
+};
+
+int __init dm365_gpio_register(void)
+{
+       return davinci_gpio_register(dm365_gpio_resources,
+                                    sizeof(dm365_gpio_resources),
+                                    &dm365_gpio_platform_data);
+}
+
 static struct emac_platform_data dm365_emac_pdata = {
        .ctrl_reg_offset        = DM365_EMAC_CNTRL_OFFSET,
        .ctrl_mod_reg_offset    = DM365_EMAC_CNTRL_MOD_OFFSET,
@@ -1105,11 +1131,6 @@ static struct davinci_soc_info davinci_soc_info_dm365 = {
        .intc_irq_prios         = dm365_default_priorities,
        .intc_irq_num           = DAVINCI_N_AINTC_IRQ,
        .timer_info             = &dm365_timer_info,
-       .gpio_type              = GPIO_TYPE_DAVINCI,
-       .gpio_base              = DAVINCI_GPIO_BASE,
-       .gpio_num               = 104,
-       .gpio_irq               = IRQ_DM365_GPIO0,
-       .gpio_unbanked          = 8,    /* really 16 ... skip muxed GPIOs */
        .emac_pdata             = &dm365_emac_pdata,
        .sram_dma               = 0x00010000,
        .sram_len               = SZ_32K,
index 4f74682293d6f162125ac176c54721e2260bf9d8..143a3217e8efb8fde1aa417700c45840d242aac0 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/serial_8250.h>
 #include <linux/platform_device.h>
 #include <linux/platform_data/edma.h>
+#include <linux/platform_data/gpio-davinci.h>
 
 #include <asm/mach/map.h>
 
@@ -23,7 +24,6 @@
 #include <mach/time.h>
 #include <mach/serial.h>
 #include <mach/common.h>
-#include <mach/gpio-davinci.h>
 
 #include "davinci.h"
 #include "clock.h"
@@ -771,6 +771,30 @@ static struct platform_device dm644x_vpbe_dev = {
        },
 };
 
+static struct resource dm644_gpio_resources[] = {
+       {       /* registers */
+               .start  = DAVINCI_GPIO_BASE,
+               .end    = DAVINCI_GPIO_BASE + SZ_4K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       {       /* interrupt */
+               .start  = IRQ_GPIOBNK0,
+               .end    = IRQ_GPIOBNK4,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct davinci_gpio_platform_data dm644_gpio_platform_data = {
+       .ngpio          = 71,
+       .intc_irq_num   = DAVINCI_N_AINTC_IRQ,
+};
+
+int __init dm644x_gpio_register(void)
+{
+       return davinci_gpio_register(dm644_gpio_resources,
+                                    sizeof(dm644_gpio_resources),
+                                    &dm644_gpio_platform_data);
+}
 /*----------------------------------------------------------------------*/
 
 static struct map_desc dm644x_io_desc[] = {
@@ -897,10 +921,6 @@ static struct davinci_soc_info davinci_soc_info_dm644x = {
        .intc_irq_prios         = dm644x_default_priorities,
        .intc_irq_num           = DAVINCI_N_AINTC_IRQ,
        .timer_info             = &dm644x_timer_info,
-       .gpio_type              = GPIO_TYPE_DAVINCI,
-       .gpio_base              = DAVINCI_GPIO_BASE,
-       .gpio_num               = 71,
-       .gpio_irq               = IRQ_GPIOBNK0,
        .emac_pdata             = &dm644x_emac_pdata,
        .sram_dma               = 0x00008000,
        .sram_len               = SZ_16K,
index 68f8d1f1aca1620d864307a28f449de956e287e6..2a73f299c1d094615236359d6ac27959cdd16295 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/serial_8250.h>
 #include <linux/platform_device.h>
 #include <linux/platform_data/edma.h>
+#include <linux/platform_data/gpio-davinci.h>
 
 #include <asm/mach/map.h>
 
@@ -24,7 +25,6 @@
 #include <mach/time.h>
 #include <mach/serial.h>
 #include <mach/common.h>
-#include <mach/gpio-davinci.h>
 
 #include "davinci.h"
 #include "clock.h"
@@ -748,6 +748,30 @@ static struct platform_device vpif_capture_dev = {
        .num_resources  = ARRAY_SIZE(vpif_capture_resource),
 };
 
+static struct resource dm646x_gpio_resources[] = {
+       {       /* registers */
+               .start  = DAVINCI_GPIO_BASE,
+               .end    = DAVINCI_GPIO_BASE + SZ_4K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       {       /* interrupt */
+               .start  = IRQ_DM646X_GPIOBNK0,
+               .end    = IRQ_DM646X_GPIOBNK2,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct davinci_gpio_platform_data dm646x_gpio_platform_data = {
+       .ngpio          = 43,
+       .intc_irq_num   = DAVINCI_N_AINTC_IRQ,
+};
+
+int __init dm646x_gpio_register(void)
+{
+       return davinci_gpio_register(dm646x_gpio_resources,
+                                    sizeof(dm646x_gpio_resources),
+                                    &dm646x_gpio_platform_data);
+}
 /*----------------------------------------------------------------------*/
 
 static struct map_desc dm646x_io_desc[] = {
@@ -874,10 +898,6 @@ static struct davinci_soc_info davinci_soc_info_dm646x = {
        .intc_irq_prios         = dm646x_default_priorities,
        .intc_irq_num           = DAVINCI_N_AINTC_IRQ,
        .timer_info             = &dm646x_timer_info,
-       .gpio_type              = GPIO_TYPE_DAVINCI,
-       .gpio_base              = DAVINCI_GPIO_BASE,
-       .gpio_num               = 43, /* Only 33 usable */
-       .gpio_irq               = IRQ_DM646X_GPIOBNK0,
        .emac_pdata             = &dm646x_emac_pdata,
        .sram_dma               = 0x10010000,
        .sram_len               = SZ_32K,
index aae53072c0eb602d536c1a0891258625347fc0df..39e58b48e826dc4350f54a0aa170444855723815 100644 (file)
@@ -97,6 +97,7 @@ int da8xx_register_mmcsd0(struct davinci_mmc_config *config);
 int da850_register_mmcsd1(struct davinci_mmc_config *config);
 void da8xx_register_mcasp(int id, struct snd_platform_data *pdata);
 int da8xx_register_rtc(void);
+int da8xx_register_gpio(void *pdata);
 int da850_register_cpufreq(char *async_clk);
 int da8xx_register_cpuidle(void);
 void __iomem *da8xx_get_mem_ctlr(void);
@@ -110,6 +111,8 @@ int da850_register_vpif_capture
 void da8xx_restart(enum reboot_mode mode, const char *cmd);
 void da8xx_rproc_reserve_cma(void);
 int da8xx_register_rproc(void);
+int da850_register_gpio(void);
+int da830_register_gpio(void);
 
 extern struct platform_device da8xx_serial_device[];
 extern struct emac_platform_data da8xx_emac_pdata;
diff --git a/arch/arm/mach-davinci/include/mach/gpio-davinci.h b/arch/arm/mach-davinci/include/mach/gpio-davinci.h
deleted file mode 100644 (file)
index 1fdd1fd..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * TI DaVinci GPIO Support
- *
- * Copyright (c) 2006 David Brownell
- * Copyright (c) 2007, MontaVista Software, Inc. <source@mvista.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#ifndef        __DAVINCI_DAVINCI_GPIO_H
-#define        __DAVINCI_DAVINCI_GPIO_H
-
-#include <linux/io.h>
-#include <linux/spinlock.h>
-
-#include <asm-generic/gpio.h>
-
-#include <mach/irqs.h>
-#include <mach/common.h>
-
-#define DAVINCI_GPIO_BASE 0x01C67000
-
-enum davinci_gpio_type {
-       GPIO_TYPE_DAVINCI = 0,
-       GPIO_TYPE_TNETV107X,
-};
-
-/*
- * basic gpio routines
- *
- * board-specific init should be done by arch/.../.../board-XXX.c (maybe
- * initializing banks together) rather than boot loaders; kexec() won't
- * go through boot loaders.
- *
- * the gpio clock will be turned on when gpios are used, and you may also
- * need to pay attention to PINMUX registers to be sure those pins are
- * used as gpios, not with other peripherals.
- *
- * On-chip GPIOs are numbered 0..(DAVINCI_N_GPIO-1).  For documentation,
- * and maybe for later updates, code may write GPIO(N).  These may be
- * all 1.8V signals, all 3.3V ones, or a mix of the two.  A given chip
- * may not support all the GPIOs in that range.
- *
- * GPIOs can also be on external chips, numbered after the ones built-in
- * to the DaVinci chip.  For now, they won't be usable as IRQ sources.
- */
-#define        GPIO(X)         (X)             /* 0 <= X <= (DAVINCI_N_GPIO - 1) */
-
-/* Convert GPIO signal to GPIO pin number */
-#define GPIO_TO_PIN(bank, gpio)        (16 * (bank) + (gpio))
-
-struct davinci_gpio_controller {
-       struct gpio_chip        chip;
-       int                     irq_base;
-       spinlock_t              lock;
-       void __iomem            *regs;
-       void __iomem            *set_data;
-       void __iomem            *clr_data;
-       void __iomem            *in_data;
-};
-
-/* The __gpio_to_controller() and __gpio_mask() functions inline to constants
- * with constant parameters; or in outlined code they execute at runtime.
- *
- * You'd access the controller directly when reading or writing more than
- * one gpio value at a time, and to support wired logic where the value
- * being driven by the cpu need not match the value read back.
- *
- * These are NOT part of the cross-platform GPIO interface
- */
-static inline struct davinci_gpio_controller *
-__gpio_to_controller(unsigned gpio)
-{
-       struct davinci_gpio_controller *ctlrs = davinci_soc_info.gpio_ctlrs;
-       int index = gpio / 32;
-
-       if (!ctlrs || index >= davinci_soc_info.gpio_ctlrs_num)
-               return NULL;
-
-       return ctlrs + index;
-}
-
-static inline u32 __gpio_mask(unsigned gpio)
-{
-       return 1 << (gpio % 32);
-}
-
-#endif /* __DAVINCI_DAVINCI_GPIO_H */
diff --git a/arch/arm/mach-davinci/include/mach/gpio.h b/arch/arm/mach-davinci/include/mach/gpio.h
deleted file mode 100644 (file)
index 960e9de..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * TI DaVinci GPIO Support
- *
- * Copyright (c) 2006 David Brownell
- * Copyright (c) 2007, MontaVista Software, Inc. <source@mvista.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#ifndef        __DAVINCI_GPIO_H
-#define        __DAVINCI_GPIO_H
-
-#include <asm-generic/gpio.h>
-
-#define __ARM_GPIOLIB_COMPLEX
-
-/* The inline versions use the static inlines in the driver header */
-#include "gpio-davinci.h"
-
-/*
- * The get/set/clear functions will inline when called with constant
- * parameters referencing built-in GPIOs, for low-overhead bitbanging.
- *
- * gpio_set_value() will inline only on traditional Davinci style controllers
- * with distinct set/clear registers.
- *
- * Otherwise, calls with variable parameters or referencing external
- * GPIOs (e.g. on GPIO expander chips) use outlined functions.
- */
-static inline void gpio_set_value(unsigned gpio, int value)
-{
-       if (__builtin_constant_p(value) && gpio < davinci_soc_info.gpio_num) {
-               struct davinci_gpio_controller *ctlr;
-               u32                             mask;
-
-               ctlr = __gpio_to_controller(gpio);
-
-               if (ctlr->set_data != ctlr->clr_data) {
-                       mask = __gpio_mask(gpio);
-                       if (value)
-                               __raw_writel(mask, ctlr->set_data);
-                       else
-                               __raw_writel(mask, ctlr->clr_data);
-                       return;
-               }
-       }
-
-       __gpio_set_value(gpio, value);
-}
-
-/* Returns zero or nonzero; works for gpios configured as inputs OR
- * as outputs, at least for built-in GPIOs.
- *
- * NOTE: for built-in GPIOs, changes in reported values are synchronized
- * to the GPIO clock.  This is easily seen after calling gpio_set_value()
- * and then immediately gpio_get_value(), where the gpio_get_value() will
- * return the old value until the GPIO clock ticks and the new value gets
- * latched.
- */
-static inline int gpio_get_value(unsigned gpio)
-{
-       struct davinci_gpio_controller *ctlr;
-
-       if (!__builtin_constant_p(gpio) || gpio >= davinci_soc_info.gpio_num)
-               return __gpio_get_value(gpio);
-
-       ctlr = __gpio_to_controller(gpio);
-       return __gpio_mask(gpio) & __raw_readl(ctlr->in_data);
-}
-
-static inline int gpio_cansleep(unsigned gpio)
-{
-       if (__builtin_constant_p(gpio) && gpio < davinci_soc_info.gpio_num)
-               return 0;
-       else
-               return __gpio_cansleep(gpio);
-}
-
-static inline int irq_to_gpio(unsigned irq)
-{
-       /* don't support the reverse mapping */
-       return -ENOSYS;
-}
-
-#endif                         /* __DAVINCI_GPIO_H */
index 49f72a848423a62d3ff44943cfae84751aee09c0..49fa9abd09daec9097c81d58d2633feccd8ec6f4 100644 (file)
 
 #include <linux/init.h>
 #include <linux/clk-provider.h>
-#include <linux/clocksource.h>
-#include <linux/irqchip.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
-#include <linux/platform_data/usb-ehci-orion.h>
 #include <asm/hardware/cache-tauros2.h>
 #include <asm/mach/arch.h>
 #include <mach/dove.h>
 #include <mach/pm.h>
 #include <plat/common.h>
-#include <plat/irq.h>
 #include "common.h"
 
-/*
- * There are still devices that doesn't even know about DT,
- * get clock gates here and add a clock lookup.
- */
-static void __init dove_legacy_clk_init(void)
-{
-       struct device_node *np = of_find_compatible_node(NULL, NULL,
-                                        "marvell,dove-gating-clock");
-       struct of_phandle_args clkspec;
-
-       clkspec.np = np;
-       clkspec.args_count = 1;
-
-       clkspec.args[0] = CLOCK_GATING_BIT_PCIE0;
-       orion_clkdev_add("0", "pcie",
-                        of_clk_get_from_provider(&clkspec));
-
-       clkspec.args[0] = CLOCK_GATING_BIT_PCIE1;
-       orion_clkdev_add("1", "pcie",
-                        of_clk_get_from_provider(&clkspec));
-}
-
-static void __init dove_dt_time_init(void)
-{
-       of_clk_init(NULL);
-       clocksource_of_init();
-}
-
-static void __init dove_dt_init_early(void)
-{
-       mvebu_mbus_init("marvell,dove-mbus",
-                       BRIDGE_WINS_BASE, BRIDGE_WINS_SZ,
-                       DOVE_MC_WINS_BASE, DOVE_MC_WINS_SZ);
-}
-
 static void __init dove_dt_init(void)
 {
        pr_info("Dove 88AP510 SoC\n");
@@ -65,14 +26,7 @@ static void __init dove_dt_init(void)
 #ifdef CONFIG_CACHE_TAUROS2
        tauros2_init(0);
 #endif
-       dove_setup_cpu_wins();
-
-       /* Setup clocks for legacy devices */
-       dove_legacy_clk_init();
-
-       /* Internal devices not ported to DT yet */
-       dove_pcie_init(1, 1);
-
+       BUG_ON(mvebu_mbus_dt_init());
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
@@ -83,8 +37,6 @@ static const char * const dove_dt_board_compat[] = {
 
 DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)")
        .map_io         = dove_map_io,
-       .init_early     = dove_dt_init_early,
-       .init_time      = dove_dt_time_init,
        .init_machine   = dove_dt_init,
        .restart        = dove_restart,
        .dt_compat      = dove_dt_board_compat,
index ba95e5db25011a0801c2ef1f7c27270b713280ee..a4e7ba82881025db51b05045a310f9c761e7dcf3 100644 (file)
@@ -26,8 +26,6 @@
 #include <linux/export.h>
 #include <linux/irqdomain.h>
 #include <linux/of_address.h>
-#include <linux/clocksource.h>
-#include <linux/clk-provider.h>
 #include <linux/irqchip/arm-gic.h>
 #include <linux/irqchip/chained_irq.h>
 
@@ -367,12 +365,6 @@ static void __init exynos5_map_io(void)
                iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc));
 }
 
-void __init exynos_init_time(void)
-{
-       of_clk_init(NULL);
-       clocksource_of_init();
-}
-
 struct bus_type exynos_subsys = {
        .name           = "exynos-core",
        .dev_name       = "exynos-core",
index 8646a141ae467b8175aed00d0acf39ae73f02097..f0fa2050d08d044288480c1b077cf1110e92cb62 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/of.h>
 
 void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
-void exynos_init_time(void);
 
 struct map_desc;
 void exynos_init_io(void);
index 0099c6c13bbaa9504dccd6fa760c21273de41d3f..6858d73dcf48dcae9a3407f425eb6e37b17ccc7b 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/of_fdt.h>
 #include <linux/serial_core.h>
 #include <linux/memblock.h>
-#include <linux/clocksource.h>
 
 #include <asm/mach/arch.h>
 #include <plat/mfc.h>
@@ -54,7 +53,6 @@ DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)")
        .init_early     = exynos_firmware_init,
        .init_machine   = exynos4_dt_machine_init,
        .init_late      = exynos_init_late,
-       .init_time      = exynos_init_time,
        .dt_compat      = exynos4_dt_compat,
        .restart        = exynos4_restart,
        .reserve        = exynos4_reserve,
index f874b773ca134e231df3e21d3c5c5f65caac33a9..bac21054cec80062deb805c8ccbb76a324e55905 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/of_fdt.h>
 #include <linux/memblock.h>
 #include <linux/io.h>
-#include <linux/clocksource.h>
 
 #include <asm/mach/arch.h>
 #include <mach/regs-pmu.h>
@@ -76,7 +75,6 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)")
        .map_io         = exynos_init_io,
        .init_machine   = exynos5_dt_machine_init,
        .init_late      = exynos_init_late,
-       .init_time      = exynos_init_time,
        .dt_compat      = exynos5_dt_compat,
        .restart        = exynos5_restart,
        .reserve        = exynos5_reserve,
index 8e8437dea3ce7742da2cd8cae56df82efa2dfe93..616408d76be545e75f9e36f1591b58451a520d9c 100644 (file)
@@ -12,7 +12,6 @@ config ARCH_HIGHBANK
        select ARM_GIC
        select ARM_TIMER_SP804
        select CACHE_L2X0
-       select CLKDEV_LOOKUP
        select COMMON_CLK
        select CPU_V7
        select GENERIC_CLOCKEVENTS
index 8e63ccdb0de3c9c80923e46eadec91e6e9e1689e..e6d6eacea9d027d90ed35b9b057c62869cb2a181 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/of_platform.h>
 #include <linux/of_address.h>
 #include <linux/amba/bus.h>
-#include <linux/clk-provider.h>
 
 #include <asm/cacheflush.h>
 #include <asm/cputype.h>
@@ -83,20 +82,6 @@ static void __init highbank_init_irq(void)
        }
 }
 
-static void __init highbank_timer_init(void)
-{
-       struct device_node *np;
-
-       /* Map system registers */
-       np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
-       sregs_base = of_iomap(np, 0);
-       WARN_ON(!sregs_base);
-
-       of_clk_init(NULL);
-
-       clocksource_of_init();
-}
-
 static void highbank_power_off(void)
 {
        highbank_set_pwr_shutdown();
@@ -155,6 +140,13 @@ static struct notifier_block highbank_platform_nb = {
 
 static void __init highbank_init(void)
 {
+       struct device_node *np;
+
+       /* Map system registers */
+       np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
+       sregs_base = of_iomap(np, 0);
+       WARN_ON(!sregs_base);
+
        pm_power_off = highbank_power_off;
        highbank_pm_init();
 
@@ -176,7 +168,6 @@ DT_MACHINE_START(HIGHBANK, "Highbank")
 #endif
        .smp            = smp_ops(highbank_smp_ops),
        .init_irq       = highbank_init_irq,
-       .init_time      = highbank_timer_init,
        .init_machine   = highbank_init,
        .dt_compat      = highbank_match,
        .restart        = highbank_restart,
index 29a8af6922a87eeb445eacc6971c3aaa15f6bcf9..a91909b956017326e02101e528a59e34cde72905 100644 (file)
@@ -4,8 +4,8 @@ config ARCH_MXC
        select ARM_CPU_SUSPEND if PM
        select ARM_PATCH_PHYS_VIRT
        select AUTO_ZRELADDR if !ZBOOT_ROM
-       select CLKDEV_LOOKUP
        select CLKSRC_MMIO
+       select COMMON_CLK
        select GENERIC_ALLOCATOR
        select GENERIC_CLOCKEVENTS
        select GENERIC_IRQ_CHIP
@@ -92,14 +92,12 @@ config MACH_MX27
 config SOC_IMX1
        bool
        select ARCH_MX1
-       select COMMON_CLK
        select CPU_ARM920T
        select IMX_HAVE_IOMUX_V1
        select MXC_AVIC
 
 config SOC_IMX21
        bool
-       select COMMON_CLK
        select CPU_ARM926T
        select IMX_HAVE_IOMUX_V1
        select MXC_AVIC
@@ -108,7 +106,6 @@ config SOC_IMX25
        bool
        select ARCH_MX25
        select ARCH_MXC_IOMUX_V3
-       select COMMON_CLK
        select CPU_ARM926T
        select MXC_AVIC
 
@@ -116,7 +113,6 @@ config SOC_IMX27
        bool
        select ARCH_HAS_CPUFREQ
        select ARCH_HAS_OPP
-       select COMMON_CLK
        select CPU_ARM926T
        select IMX_HAVE_IOMUX_V1
        select MACH_MX27
@@ -124,7 +120,6 @@ config SOC_IMX27
 
 config SOC_IMX31
        bool
-       select COMMON_CLK
        select CPU_V6
        select IMX_HAVE_PLATFORM_MXC_RNGA
        select MXC_AVIC
@@ -133,7 +128,6 @@ config SOC_IMX31
 config SOC_IMX35
        bool
        select ARCH_MXC_IOMUX_V3
-       select COMMON_CLK
        select CPU_V6K
        select HAVE_EPIT
        select MXC_AVIC
@@ -144,7 +138,6 @@ config SOC_IMX5
        select ARCH_HAS_CPUFREQ
        select ARCH_HAS_OPP
        select ARCH_MXC_IOMUX_V3
-       select COMMON_CLK
        select CPU_V7
        select MXC_TZIC
 
@@ -791,7 +784,6 @@ config SOC_IMX6Q
        select ARM_ERRATA_764369 if SMP
        select ARM_ERRATA_775420
        select ARM_GIC
-       select COMMON_CLK
        select CPU_V7
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
index 7c0dc4540aa4785270784e3f62ce2b643fd95664..ceaac9cd7b4230859143d951af389908744b7cc2 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 #include <linux/clkdev.h>
+#include <linux/clk-provider.h>
 #include <linux/of.h>
 #include <linux/err.h>
 
@@ -131,8 +132,6 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
 {
        int i;
 
-       of_clk_init(NULL);
-
        clk[dummy] = imx_clk_fixed("dummy", 0);
        clk[ckil] = imx_obtain_fixed_clock("ckil", rate_ckil);
        clk[osc] = imx_obtain_fixed_clock("osc", rate_osc);
@@ -465,12 +464,16 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
        return 0;
 }
 
-int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
-                       unsigned long rate_ckih1, unsigned long rate_ckih2)
+static void __init mx51_clocks_init_dt(struct device_node *np)
+{
+       mx51_clocks_init(0, 0, 0, 0);
+}
+CLK_OF_DECLARE(imx51_ccm, "fsl,imx51-ccm", mx51_clocks_init_dt);
+
+static void __init mx53_clocks_init(struct device_node *np)
 {
        int i;
        unsigned long r;
-       struct device_node *np;
 
        clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE);
        clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE);
@@ -529,12 +532,11 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
                        pr_err("i.MX53 clk %d: register failed with %ld\n",
                                i, PTR_ERR(clk[i]));
 
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx53-ccm");
        clk_data.clks = clk;
        clk_data.clk_num = ARRAY_SIZE(clk);
        of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
 
-       mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2);
+       mx5_clocks_common_init(0, 0, 0, 0);
 
        clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0");
        clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2");
@@ -566,16 +568,5 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
 
        r = clk_round_rate(clk[usboh3_per_gate], 54000000);
        clk_set_rate(clk[usboh3_per_gate], r);
-
-       return 0;
-}
-
-int __init mx51_clocks_init_dt(void)
-{
-       return mx51_clocks_init(0, 0, 0, 0);
-}
-
-int __init mx53_clocks_init_dt(void)
-{
-       return mx53_clocks_init(0, 0, 0, 0);
 }
+CLK_OF_DECLARE(imx53_ccm, "fsl,imx53-ccm", mx53_clocks_init);
index 4517fd760bfc6d0c55a160f7fa22f8f3e1ae778c..28e8ca0871e8fd77295218a1386baee463d648e2 100644 (file)
@@ -63,13 +63,9 @@ extern int mx31_clocks_init(unsigned long fref);
 extern int mx35_clocks_init(void);
 extern int mx51_clocks_init(unsigned long ckil, unsigned long osc,
                        unsigned long ckih1, unsigned long ckih2);
-extern int mx53_clocks_init(unsigned long ckil, unsigned long osc,
-                       unsigned long ckih1, unsigned long ckih2);
 extern int mx25_clocks_init_dt(void);
 extern int mx27_clocks_init_dt(void);
 extern int mx31_clocks_init_dt(void);
-extern int mx51_clocks_init_dt(void);
-extern int mx53_clocks_init_dt(void);
 extern struct platform_device *mxc_register_gpio(char *name, int id,
        resource_size_t iobase, resource_size_t iosize, int irq, int irq_high);
 extern void mxc_set_cpu_type(unsigned int type);
index 53e43e579dd79afbb755360d7ff8f8936dcc4d86..bece8a65e6f01893e9e58df0799b580b8c356365 100644 (file)
@@ -34,17 +34,11 @@ static const char *imx51_dt_board_compat[] __initdata = {
        NULL
 };
 
-static void __init imx51_timer_init(void)
-{
-       mx51_clocks_init_dt();
-}
-
 DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
        .map_io         = mx51_map_io,
        .init_early     = imx51_init_early,
        .init_irq       = mx51_init_irq,
        .handle_irq     = imx51_handle_irq,
-       .init_time      = imx51_timer_init,
        .init_machine   = imx51_dt_init,
        .init_late      = imx51_init_late,
        .dt_compat      = imx51_dt_board_compat,
index 98c58944015a596db1431e770f5a5c9765300227..c9c4d8d96931daf05794c4bab73facedb9fb943c 100644 (file)
@@ -36,17 +36,11 @@ static const char *imx53_dt_board_compat[] __initdata = {
        NULL
 };
 
-static void __init imx53_timer_init(void)
-{
-       mx53_clocks_init_dt();
-}
-
 DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)")
        .map_io         = mx53_map_io,
        .init_early     = imx53_init_early,
        .init_irq       = mx53_init_irq,
        .handle_irq     = imx53_handle_irq,
-       .init_time      = imx53_timer_init,
        .init_machine   = imx53_dt_init,
        .init_late      = imx53_init_late,
        .dt_compat      = imx53_dt_board_compat,
index 90372a21087f9ef38535479ccc35aac9e37977dc..3be0fa0e979602580f5cf7639520a61c187cfceb 100644 (file)
@@ -11,9 +11,7 @@
  */
 
 #include <linux/clk.h>
-#include <linux/clk-provider.h>
 #include <linux/clkdev.h>
-#include <linux/clocksource.h>
 #include <linux/cpu.h>
 #include <linux/delay.h>
 #include <linux/export.h>
@@ -192,6 +190,9 @@ static void __init imx6q_1588_init(void)
 
 static void __init imx6q_init_machine(void)
 {
+       imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q",
+                             imx6q_revision());
+
        imx6q_enet_phy_init();
 
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
@@ -293,14 +294,6 @@ static void __init imx6q_init_irq(void)
        irqchip_init();
 }
 
-static void __init imx6q_timer_init(void)
-{
-       of_clk_init(NULL);
-       clocksource_of_init();
-       imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q",
-                             imx6q_revision());
-}
-
 static const char *imx6q_dt_compat[] __initdata = {
        "fsl,imx6dl",
        "fsl,imx6q",
@@ -311,7 +304,6 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad/DualLite (Device Tree)")
        .smp            = smp_ops(imx_smp_ops),
        .map_io         = imx6q_map_io,
        .init_irq       = imx6q_init_irq,
-       .init_time      = imx6q_timer_init,
        .init_machine   = imx6q_init_machine,
        .init_late      = imx6q_init_late,
        .dt_compat      = imx6q_dt_compat,
index 0d75dc54f71508fa48cf3a3096931aed8db31bce..c70bd7c649746fdab1022a2c67af0df84d230267 100644 (file)
@@ -7,7 +7,6 @@
  *
  */
 
-#include <linux/clk-provider.h>
 #include <linux/irqchip.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
@@ -31,11 +30,6 @@ static void __init imx6sl_init_irq(void)
        irqchip_init();
 }
 
-static void __init imx6sl_timer_init(void)
-{
-       of_clk_init(NULL);
-}
-
 static const char *imx6sl_dt_compat[] __initdata = {
        "fsl,imx6sl",
        NULL,
@@ -44,7 +38,6 @@ static const char *imx6sl_dt_compat[] __initdata = {
 DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)")
        .map_io         = debug_ll_io_init,
        .init_irq       = imx6sl_init_irq,
-       .init_time      = imx6sl_timer_init,
        .init_machine   = imx6sl_init_machine,
        .dt_compat      = imx6sl_dt_compat,
        .restart        = mxc_restart,
index 816991deb9b86ef9ba61139cf2ae17257f9b89a5..af0cb8a9dc4898827b1c569506b761fb4b476787 100644 (file)
@@ -8,9 +8,7 @@
  */
 
 #include <linux/of_platform.h>
-#include <linux/clocksource.h>
 #include <linux/irqchip.h>
-#include <linux/clk-provider.h>
 #include <asm/mach/arch.h>
 #include <asm/hardware/cache-l2x0.h>
 
@@ -28,12 +26,6 @@ static void __init vf610_init_irq(void)
        irqchip_init();
 }
 
-static void __init vf610_init_time(void)
-{
-       of_clk_init(NULL);
-       clocksource_of_init();
-}
-
 static const char *vf610_dt_compat[] __initdata = {
        "fsl,vf610",
        NULL,
@@ -41,7 +33,6 @@ static const char *vf610_dt_compat[] __initdata = {
 
 DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)")
        .init_irq       = vf610_init_irq,
-       .init_time      = vf610_init_time,
        .init_machine   = vf610_init_machine,
        .dt_compat      = vf610_dt_compat,
        .restart        = mxc_restart,
index 82d3ad8e87cf91395c0c706b48ef7df684e1e644..ce723100ac35bca7569e10b64c950e6dd623ae00 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/clk-provider.h>
-#include <linux/clocksource.h>
 #include <linux/dma-mapping.h>
 #include <linux/irqchip.h>
 #include <linux/kexec.h>
@@ -66,12 +65,6 @@ static void __init kirkwood_legacy_clk_init(void)
        clk_prepare_enable(clk);
 }
 
-static void __init kirkwood_dt_time_init(void)
-{
-       of_clk_init(NULL);
-       clocksource_of_init();
-}
-
 static void __init kirkwood_dt_init_early(void)
 {
        mvebu_mbus_init("marvell,kirkwood-mbus",
@@ -92,7 +85,6 @@ static void __init kirkwood_dt_init(void)
        writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG);
 
        BUG_ON(mvebu_mbus_dt_init());
-       kirkwood_setup_wins();
 
        kirkwood_l2_init();
 
@@ -122,7 +114,6 @@ DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)")
        /* Maintainer: Jason Cooper <jason@lakedaemon.net> */
        .map_io         = kirkwood_map_io,
        .init_early     = kirkwood_dt_init_early,
-       .init_time      = kirkwood_dt_time_init,
        .init_machine   = kirkwood_dt_init,
        .restart        = kirkwood_restart,
        .dt_compat      = kirkwood_dt_board_compat,
index 98f6e2adb53eaf39722f4988f43ce9d96c86ba50..cc511a4890a3a94c98e529843400b043b93e4614 100644 (file)
@@ -13,8 +13,6 @@
 #include <linux/clk.h>
 #include <linux/clk/mxs.h>
 #include <linux/clkdev.h>
-#include <linux/clocksource.h>
-#include <linux/clk-provider.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/gpio.h>
@@ -490,16 +488,6 @@ static void mxs_restart(enum reboot_mode mode, const char *cmd)
        soft_restart(0);
 }
 
-static void __init mxs_timer_init(void)
-{
-       if (of_machine_is_compatible("fsl,imx23"))
-               mx23_clocks_init();
-       else
-               mx28_clocks_init();
-       of_clk_init(NULL);
-       clocksource_of_init();
-}
-
 static const char *mxs_dt_compat[] __initdata = {
        "fsl,imx28",
        "fsl,imx23",
@@ -508,7 +496,6 @@ static const char *mxs_dt_compat[] __initdata = {
 
 DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)")
        .handle_irq     = icoll_handle_irq,
-       .init_time      = mxs_timer_init,
        .init_machine   = mxs_machine_init,
        .init_late      = mxs_pm_init,
        .dt_compat      = mxs_dt_compat,
index 13e0df9c11cebb0794d108d06cf95b16d98e6628..cce2c9dfb5d13d73b92076bd675415de6ff85bc6 100644 (file)
 #include <linux/slab.h>
 #include <linux/irq.h>
 #include <linux/dma-mapping.h>
-#include <linux/platform_data/clk-nomadik.h>
-#include <linux/clocksource.h>
 #include <linux/of_irq.h>
 #include <linux/of_gpio.h>
 #include <linux/of_address.h>
 #include <linux/of_platform.h>
-#include <linux/mtd/fsmc.h>
 #include <linux/gpio.h>
-#include <linux/amba/mmci.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -113,50 +109,6 @@ static void cpu8815_restart(enum reboot_mode mode, const char *cmd)
        writel(1, srcbase + 0x18);
 }
 
-/* Initial value for SRC control register: all timers use MXTAL/8 source */
-#define SRC_CR_INIT_MASK       0x00007fff
-#define SRC_CR_INIT_VAL                0x2aaa8000
-
-static void __init cpu8815_timer_init_of(void)
-{
-       struct device_node *mtu;
-       void __iomem *base;
-       int irq;
-       u32 src_cr;
-
-       /* We need this to be up now */
-       nomadik_clk_init();
-
-       mtu = of_find_node_by_path("/mtu@101e2000");
-       if (!mtu)
-               return;
-       base = of_iomap(mtu, 0);
-       if (WARN_ON(!base))
-               return;
-       irq = irq_of_parse_and_map(mtu, 0);
-
-       pr_info("Remapped MTU @ %p, irq: %d\n", base, irq);
-
-       /* Configure timer sources in "system reset controller" ctrl reg */
-       src_cr = readl(base);
-       src_cr &= SRC_CR_INIT_MASK;
-       src_cr |= SRC_CR_INIT_VAL;
-       writel(src_cr, base);
-
-       clocksource_of_init();
-}
-
-static struct fsmc_nand_timings cpu8815_nand_timings = {
-       .thiz   = 0,
-       .thold  = 0x10,
-       .twait  = 0x0A,
-       .tset   = 0,
-};
-
-static struct fsmc_nand_platform_data cpu8815_nand_data = {
-       .nand_timings = &cpu8815_nand_timings,
-};
-
 /*
  * The SMSC911x IRQ is connected to a GPIO pin, but the driver expects
  * to simply request an IRQ passed as a resource. So the GPIO pin needs
@@ -189,15 +141,6 @@ static int __init cpu8815_eth_init(void)
 }
 device_initcall(cpu8815_eth_init);
 
-/*
- * TODO:
- * cannot be set from device tree, convert to a proper DT
- * binding.
- */
-static struct mmci_platform_data mmcsd_plat_data = {
-       .ocr_mask = MMC_VDD_29_30,
-};
-
 /*
  * This GPIO pin turns on a line that is used to detect card insertion
  * on this board.
@@ -232,24 +175,13 @@ static int __init cpu8815_mmcsd_init(void)
 }
 device_initcall(cpu8815_mmcsd_init);
 
-
-/* These are mostly to get the right device names for the clock lookups */
-static struct of_dev_auxdata cpu8815_auxdata_lookup[] __initdata = {
-       OF_DEV_AUXDATA("stericsson,fsmc-nand", NOMADIK_FSMC_BASE,
-               NULL, &cpu8815_nand_data),
-       OF_DEV_AUXDATA("arm,primecell", NOMADIK_SDI_BASE,
-               NULL, &mmcsd_plat_data),
-       { /* sentinel */ },
-};
-
 static void __init cpu8815_init_of(void)
 {
 #ifdef CONFIG_CACHE_L2X0
        /* At full speed latency must be >=2, so 0x249 in low bits */
        l2x0_of_init(0x00730249, 0xfe000fff);
 #endif
-       of_platform_populate(NULL, of_default_bus_match_table,
-                       cpu8815_auxdata_lookup, NULL);
+       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 static const char * cpu8815_board_compat[] = {
@@ -259,7 +191,6 @@ static const char * cpu8815_board_compat[] = {
 
 DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815")
        .map_io         = cpu8815_map_io,
-       .init_time      = cpu8815_timer_init_of,
        .init_machine   = cpu8815_init_of,
        .restart        = cpu8815_restart,
        .dt_compat      = cpu8815_board_compat,
index 99e26092a9f7d63b5b096e71895a7eebdf915290..4b2ed2e8352f4fd1433e8ac0e41da26d2b3bdbe5 100644 (file)
 #include <linux/of_platform.h>
 #include <linux/irqchip.h>
 #include <linux/irqchip/arm-vic.h>
-#include <linux/clk-provider.h>
 #include <linux/clkdev.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/clcd.h>
-#include <linux/clocksource.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
@@ -65,12 +63,6 @@ static void __init nspire_init(void)
                        nspire_auxdata, NULL);
 }
 
-static void __init nspire_init_time(void)
-{
-       of_clk_init(NULL);
-       clocksource_of_init();
-}
-
 static void nspire_restart(char mode, const char *cmd)
 {
        void __iomem *base = ioremap(NSPIRE_MISC_PHYS_BASE, SZ_4K);
@@ -83,7 +75,6 @@ static void nspire_restart(char mode, const char *cmd)
 DT_MACHINE_START(NSPIRE, "TI-NSPIRE")
        .dt_compat      = nspire_dt_match,
        .map_io         = nspire_map_io,
-       .init_time      = nspire_init_time,
        .init_machine   = nspire_init,
        .restart        = nspire_restart,
 MACHINE_END
index b5fb5f7992dfed4972be5a927934b9ccfa26ae9f..c94624429680e06b8666737d399b8e18b8a753ea 100644 (file)
@@ -8,7 +8,6 @@ config ARCH_OMAP2
        select CPU_V6
        select MULTI_IRQ_HANDLER
        select SOC_HAS_OMAP2_SDRC
-       select COMMON_CLK
 
 config ARCH_OMAP3
        bool "TI OMAP3"
@@ -22,7 +21,6 @@ config ARCH_OMAP3
        select PM_OPP if PM
        select PM_RUNTIME if CPU_IDLE
        select SOC_HAS_OMAP2_SDRC
-       select COMMON_CLK
        select USB_ARCH_HAS_EHCI if USB_SUPPORT
 
 config ARCH_OMAP4
@@ -45,7 +43,6 @@ config ARCH_OMAP4
        select PM_OPP if PM
        select PM_RUNTIME if CPU_IDLE
        select USB_ARCH_HAS_EHCI if USB_SUPPORT
-       select COMMON_CLK
        select ARM_ERRATA_754322
        select ARM_ERRATA_775420
 
@@ -59,7 +56,6 @@ config SOC_OMAP5
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if LOCAL_TIMERS
        select HAVE_SMP
-       select COMMON_CLK
        select HAVE_ARM_ARCH_TIMER
        select ARM_ERRATA_798181 if SMP
 
@@ -70,7 +66,6 @@ config SOC_AM33XX
        select ARM_CPU_SUSPEND if PM
        select CPU_V7
        select MULTI_IRQ_HANDLER
-       select COMMON_CLK
 
 config SOC_AM43XX
        bool "TI AM43x"
@@ -79,7 +74,6 @@ config SOC_AM43XX
        select ARCH_OMAP2PLUS
        select MULTI_IRQ_HANDLER
        select ARM_GIC
-       select COMMON_CLK
        select MACH_OMAP_GENERIC
 
 config ARCH_OMAP2PLUS
@@ -89,11 +83,10 @@ config ARCH_OMAP2PLUS
        select ARCH_HAS_HOLES_MEMORYMODEL
        select ARCH_OMAP
        select ARCH_REQUIRE_GPIOLIB
-       select CLKDEV_LOOKUP
        select CLKSRC_MMIO
+       select COMMON_CLK
        select GENERIC_CLOCKEVENTS
        select GENERIC_IRQ_CHIP
-       select HAVE_CLK
        select OMAP_DM_TIMER
        select PINCTRL
        select PROC_DEVICETREE if PROC_FS
index 39c78387ddecb1b287ebfe732d7de0f3c62ca4db..87162e1b94a59104a2bca07114da5d8a02816fba 100644 (file)
@@ -129,6 +129,24 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
        .restart        = omap3xxx_restart,
 MACHINE_END
 
+static const char *omap36xx_boards_compat[] __initdata = {
+       "ti,omap36xx",
+       NULL,
+};
+
+DT_MACHINE_START(OMAP36XX_DT, "Generic OMAP36xx (Flattened Device Tree)")
+       .reserve        = omap_reserve,
+       .map_io         = omap3_map_io,
+       .init_early     = omap3630_init_early,
+       .init_irq       = omap_intc_of_init,
+       .handle_irq     = omap3_intc_handle_irq,
+       .init_machine   = omap_generic_init,
+       .init_late      = omap3_init_late,
+       .init_time      = omap3_sync32k_timer_init,
+       .dt_compat      = omap36xx_boards_compat,
+       .restart        = omap3xxx_restart,
+MACHINE_END
+
 static const char *omap3_gp_boards_compat[] __initdata = {
        "ti,omap3-beagle",
        "timll,omap3-devkit8000",
index c3270c0f1fce47724b0aba71d8f1ea388b94f445..f6fe388af9895ef8c8b2859f9177a146a30fb965 100644 (file)
@@ -167,38 +167,47 @@ static struct lp55xx_led_config rx51_lp5523_led_config[] = {
                .name           = "lp5523:kb1",
                .chan_nr        = 0,
                .led_current    = 50,
+               .max_current    = 100,
        }, {
                .name           = "lp5523:kb2",
                .chan_nr        = 1,
                .led_current    = 50,
+               .max_current    = 100,
        }, {
                .name           = "lp5523:kb3",
                .chan_nr        = 2,
                .led_current    = 50,
+               .max_current    = 100,
        }, {
                .name           = "lp5523:kb4",
                .chan_nr        = 3,
                .led_current    = 50,
+               .max_current    = 100,
        }, {
                .name           = "lp5523:b",
                .chan_nr        = 4,
                .led_current    = 50,
+               .max_current    = 100,
        }, {
                .name           = "lp5523:g",
                .chan_nr        = 5,
                .led_current    = 50,
+               .max_current    = 100,
        }, {
                .name           = "lp5523:r",
                .chan_nr        = 6,
                .led_current    = 50,
+               .max_current    = 100,
        }, {
                .name           = "lp5523:kb5",
                .chan_nr        = 7,
                .led_current    = 50,
+               .max_current    = 100,
        }, {
                .name           = "lp5523:kb6",
                .chan_nr        = 8,
                .led_current    = 50,
+               .max_current    = 100,
        }
 };
 
index 64b5a83469822ad53693c2ae8ffdd3b227fa2a7b..8b6876c98ce1a320c793e7485c35d23bd3a5b923 100644 (file)
@@ -272,9 +272,19 @@ static int omap2_onenand_setup_async(void __iomem *onenand_base)
        struct gpmc_timings t;
        int ret;
 
-       if (gpmc_onenand_data->of_node)
+       if (gpmc_onenand_data->of_node) {
                gpmc_read_settings_dt(gpmc_onenand_data->of_node,
                                      &onenand_async);
+               if (onenand_async.sync_read || onenand_async.sync_write) {
+                       if (onenand_async.sync_write)
+                               gpmc_onenand_data->flags |=
+                                       ONENAND_SYNC_READWRITE;
+                       else
+                               gpmc_onenand_data->flags |= ONENAND_SYNC_READ;
+                       onenand_async.sync_read = false;
+                       onenand_async.sync_write = false;
+               }
+       }
 
        omap2_onenand_set_async_mode(onenand_base);
 
index 5d2080ef7923585c1313f598a40961c3b241d1ce..16f78a990d04cafbd7dd1fcaa81b7d7dd061e979 100644 (file)
@@ -28,7 +28,7 @@
 #define OMAP_PULL_UP                   (1 << 4)
 #define OMAP_ALTELECTRICALSEL          (1 << 5)
 
-/* 34xx specific mux bit defines */
+/* omap3/4/5 specific mux bit defines */
 #define OMAP_INPUT_EN                  (1 << 8)
 #define OMAP_OFF_EN                    (1 << 9)
 #define OMAP_OFFOUT_EN                 (1 << 10)
@@ -36,8 +36,6 @@
 #define OMAP_OFF_PULL_EN               (1 << 12)
 #define OMAP_OFF_PULL_UP               (1 << 13)
 #define OMAP_WAKEUP_EN                 (1 << 14)
-
-/* 44xx specific mux bit defines */
 #define OMAP_WAKEUP_EVENT              (1 << 15)
 
 /* Active pin states */
index fa74a0625da1a033335ea5fb76d6738889a9a1aa..ead48fa5715e16fb197dfa4fac56b0f71069bd20 100644 (file)
@@ -628,7 +628,7 @@ void __init omap4_local_timer_init(void)
 #endif /* CONFIG_HAVE_ARM_TWD */
 #endif /* CONFIG_ARCH_OMAP4 */
 
-#ifdef CONFIG_SOC_OMAP5
+#if defined(CONFIG_SOC_OMAP5) || defined(CONFIG_SOC_DRA7XX)
 void __init omap5_realtime_timer_init(void)
 {
        omap4_sync32k_timer_init();
@@ -636,7 +636,7 @@ void __init omap5_realtime_timer_init(void)
 
        clocksource_of_init();
 }
-#endif /* CONFIG_SOC_OMAP5 */
+#endif /* CONFIG_SOC_OMAP5 || CONFIG_SOC_DRA7XX */
 
 /**
  * omap_timer_init - build and register timer device with an
index e110b6d4ae8cd0fc81a654ac4af1113758836515..d49aff74de98a778c14dfc495718adfc6e15fdb6 100644 (file)
@@ -6,7 +6,6 @@
  * Licensed under GPLv2 or later.
  */
 
-#include <linux/clocksource.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <asm/sizes.h>
@@ -21,13 +20,6 @@ void __init sirfsoc_init_late(void)
        sirfsoc_pm_init();
 }
 
-static __init void sirfsoc_init_time(void)
-{
-       /* initialize clocking early, we want to set the OS timer */
-       sirfsoc_of_clk_init();
-       clocksource_of_init();
-}
-
 static __init void sirfsoc_map_io(void)
 {
        sirfsoc_map_lluart();
@@ -43,7 +35,6 @@ static const char *atlas6_dt_match[] __initdata = {
 DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)")
        /* Maintainer: Barry Song <baohua.song@csr.com> */
        .map_io         = sirfsoc_map_io,
-       .init_time      = sirfsoc_init_time,
        .init_late      = sirfsoc_init_late,
        .dt_compat      = atlas6_dt_match,
        .restart        = sirfsoc_restart,
@@ -59,7 +50,6 @@ static const char *prima2_dt_match[] __initdata = {
 DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
        /* Maintainer: Barry Song <baohua.song@csr.com> */
        .map_io         = sirfsoc_map_io,
-       .init_time      = sirfsoc_init_time,
        .dma_zone_size  = SZ_256M,
        .init_late      = sirfsoc_init_late,
        .dt_compat      = prima2_dt_match,
@@ -77,7 +67,6 @@ DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)")
        /* Maintainer: Barry Song <baohua.song@csr.com> */
        .smp            = smp_ops(sirfsoc_smp_ops),
        .map_io         = sirfsoc_map_io,
-       .init_time      = sirfsoc_init_time,
        .init_late      = sirfsoc_init_late,
        .dt_compat      = marco_dt_match,
        .restart        = sirfsoc_restart,
index a6304858474aa202c1d23860aee61329f713831b..4b768060a858e98c51a085e192cf0e6c43a3c198 100644 (file)
@@ -23,7 +23,6 @@ extern void sirfsoc_secondary_startup(void);
 extern void sirfsoc_cpu_die(unsigned int cpu);
 
 extern void __init sirfsoc_of_irq_init(void);
-extern void __init sirfsoc_of_clk_init(void);
 extern void sirfsoc_restart(enum reboot_mode, const char *);
 extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs);
 
index 724d2d81f976131d43a43704f009d948af0025eb..82c0b0709712465774b2824eef96a8572edb7f51 100644 (file)
 #include <linux/init.h>
 #include <linux/of_platform.h>
 #include <linux/irqchip.h>
-#include <linux/dw_apb_timer.h>
-#include <linux/clk-provider.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/hardware/cache-l2x0.h>
 
-static void __init rockchip_timer_init(void)
-{
-       of_clk_init(NULL);
-       clocksource_of_init();
-}
-
 static void __init rockchip_dt_init(void)
 {
        l2x0_of_init(0, ~0UL);
@@ -47,6 +39,5 @@ static const char * const rockchip_board_dt_compat[] = {
 
 DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)")
        .init_machine   = rockchip_dt_init,
-       .init_time      = rockchip_timer_init,
        .dt_compat      = rockchip_board_dt_compat,
 MACHINE_END
index 041da5172423742277e778fdbb861dfee98c7e1a..bd14e3a37128ef9c1b84559a5c31a74eb1c06752 100644 (file)
@@ -306,3 +306,19 @@ config MACH_WLF_CRAGG_6410
        select SAMSUNG_GPIO_EXTRA128
        help
          Machine support for the Wolfson Cragganmore S3C6410 variant.
+
+config MACH_S3C64XX_DT
+       bool "Samsung S3C6400/S3C6410 machine using Device Tree"
+       select CLKSRC_OF
+       select CPU_S3C6400
+       select CPU_S3C6410
+       select PINCTRL
+       select PINCTRL_S3C64XX
+       select USE_OF
+       help
+         Machine support for Samsung S3C6400/S3C6410 machines with Device Tree
+         enabled.
+         Select this if a fdt blob is available for your S3C64XX SoC based
+         board.
+         Note: This is under development and not all peripherals can be
+         supported with this machine file.
index 645a8fe55f8d4ed166efffc1f7368e01615cc0da..6faedcffce040d0cfc041c9d3b559ff1be94a207 100644 (file)
@@ -57,3 +57,4 @@ obj-$(CONFIG_MACH_SMARTQ7)            += mach-smartq7.o
 obj-$(CONFIG_MACH_SMDK6400)            += mach-smdk6400.o
 obj-$(CONFIG_MACH_SMDK6410)            += mach-smdk6410.o
 obj-$(CONFIG_MACH_WLF_CRAGG_6410)      += mach-crag6410.o mach-crag6410-module.o
+obj-$(CONFIG_MACH_S3C64XX_DT)          += mach-s3c64xx-dt.o
index 7d3cb58f1856912c1119b95bdcd1ea4ea41e3718..7a3ce4c39e5fecd3470b06344295d766869b702e 100644 (file)
  * published by the Free Software Foundation.
  */
 
+/*
+ * NOTE: Code in this file is not used when booting with Device Tree support.
+ */
+
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/module.h>
@@ -203,6 +207,10 @@ void __init s3c64xx_init_io(struct map_desc *mach_desc, int size)
 
 static __init int s3c64xx_dev_init(void)
 {
+       /* Not applicable when using DT. */
+       if (of_have_populated_dt())
+               return 0;
+
        subsys_system_register(&s3c64xx_subsys, NULL);
        return device_register(&s3c64xx_dev);
 }
@@ -404,6 +412,10 @@ static int __init s3c64xx_init_irq_eint(void)
 {
        int irq;
 
+       /* On DT-enabled systems EINTs are handled by pinctrl-s3c64xx driver. */
+       if (of_have_populated_dt())
+               return -ENODEV;
+
        for (irq = IRQ_EINT(0); irq <= IRQ_EINT(27); irq++) {
                irq_set_chip_and_handler(irq, &s3c_irq_eint, handle_level_irq);
                irq_set_chip_data(irq, (void *)eint_irq_to_bit(irq));
index c511dfaae1488a317e933532e4281d61a4a2b88e..7e22c2113816a4c6bb897dc0c54a74e876da3f86 100644 (file)
  * published by the Free Software Foundation.
 */
 
+/*
+ * NOTE: Code in this file is not used when booting with Device Tree support.
+ */
+
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
@@ -24,6 +28,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/amba/pl080.h>
+#include <linux/of.h>
 
 #include <mach/dma.h>
 #include <mach/map.h>
@@ -726,6 +731,10 @@ static int __init s3c64xx_dma_init(void)
 {
        int ret;
 
+       /* This driver is not supported when booting with device tree. */
+       if (of_have_populated_dt())
+               return -ENODEV;
+
        printk(KERN_INFO "%s: Registering DMA channels\n", __func__);
 
        dma_pool = dma_pool_create("DMA-LLI", NULL, sizeof(struct pl080s_lli), 16, 0);
index c3da1b68d03e0b352490b0df0e5ee8f1741ad87f..1649c0d1c1b80ff6a40f83ceb84881e354a54b1f 100644 (file)
  * published by the Free Software Foundation.
  */
 
+/*
+ * NOTE: Code in this file is not used when booting with Device Tree support.
+ */
+
 #include <linux/kernel.h>
 #include <linux/syscore_ops.h>
 #include <linux/interrupt.h>
 #include <linux/serial_core.h>
 #include <linux/irq.h>
 #include <linux/io.h>
+#include <linux/of.h>
 
 #include <mach/map.h>
 
@@ -101,6 +106,10 @@ static struct syscore_ops s3c64xx_irq_syscore_ops = {
 
 static __init int s3c64xx_syscore_init(void)
 {
+       /* Appropriate drivers (pinctrl, uart) handle this when using DT. */
+       if (of_have_populated_dt())
+               return 0;
+
        register_syscore_ops(&s3c64xx_irq_syscore_ops);
 
        return 0;
diff --git a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
new file mode 100644 (file)
index 0000000..7eb9a10
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Samsung's S3C64XX flattened device tree enabled machine
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/clk-provider.h>
+#include <linux/irqchip.h>
+#include <linux/of_platform.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/system_misc.h>
+
+#include <plat/cpu.h>
+#include <plat/watchdog-reset.h>
+
+#include <mach/map.h>
+
+#include "common.h"
+
+/*
+ * IO mapping for shared system controller IP.
+ *
+ * FIXME: Make remaining drivers use dynamic mapping.
+ */
+static struct map_desc s3c64xx_dt_iodesc[] __initdata = {
+       {
+               .virtual        = (unsigned long)S3C_VA_SYS,
+               .pfn            = __phys_to_pfn(S3C64XX_PA_SYSCON),
+               .length         = SZ_4K,
+               .type           = MT_DEVICE,
+       },
+};
+
+static void __init s3c64xx_dt_map_io(void)
+{
+       debug_ll_io_init();
+       iotable_init(s3c64xx_dt_iodesc, ARRAY_SIZE(s3c64xx_dt_iodesc));
+
+       s3c64xx_init_cpu();
+
+       if (!soc_is_s3c64xx())
+               panic("SoC is not S3C64xx!");
+}
+
+static void __init s3c64xx_dt_init_irq(void)
+{
+       of_clk_init(NULL);
+       samsung_wdt_reset_of_init();
+       irqchip_init();
+};
+
+static void __init s3c64xx_dt_init_machine(void)
+{
+       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+}
+
+static void s3c64xx_dt_restart(enum reboot_mode mode, const char *cmd)
+{
+       if (mode != REBOOT_SOFT)
+               samsung_wdt_reset();
+
+       /* if all else fails, or mode was for soft, jump to 0 */
+       soft_restart(0);
+}
+
+static char const *s3c64xx_dt_compat[] __initdata = {
+       "samsung,s3c6400",
+       "samsung,s3c6410",
+       NULL
+};
+
+DT_MACHINE_START(S3C6400_DT, "Samsung S3C64xx (Flattened Device Tree)")
+       /* Maintainer: Tomasz Figa <tomasz.figa@gmail.com> */
+       .dt_compat      = s3c64xx_dt_compat,
+       .map_io         = s3c64xx_dt_map_io,
+       .init_irq       = s3c64xx_dt_init_irq,
+       .init_machine   = s3c64xx_dt_init_machine,
+       .restart        = s3c64xx_dt_restart,
+MACHINE_END
index 331fe8e581457ae0ce37dbfc769cd741d0b7c21e..3db0c98222f7686574be92d880f1ee25e5369e3f 100644 (file)
@@ -9,6 +9,10 @@
  * published by the Free Software Foundation.
 */
 
+/*
+ * NOTE: Code in this file is not used when booting with Device Tree support.
+ */
+
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
@@ -20,6 +24,7 @@
 #include <linux/device.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -76,6 +81,10 @@ static struct device s3c6400_dev = {
 
 static int __init s3c6400_core_init(void)
 {
+       /* Not applicable when using DT. */
+       if (of_have_populated_dt())
+               return 0;
+
        return subsys_system_register(&s3c6400_subsys, NULL);
 }
 
index 7e6fa125584ac721aecb2c0c38f3011662ea1560..72b2278953a896a6dad6ad892e3a1438fd62d882 100644 (file)
  * published by the Free Software Foundation.
 */
 
+/*
+ * NOTE: Code in this file is not used when booting with Device Tree support.
+ */
+
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
@@ -21,6 +25,7 @@
 #include <linux/device.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -79,6 +84,10 @@ static struct device s3c6410_dev = {
 
 static int __init s3c6410_core_init(void)
 {
+       /* Not applicable when using DT. */
+       if (of_have_populated_dt())
+               return 0;
+
        return subsys_system_register(&s3c6410_subsys, NULL);
 }
 
diff --git a/arch/arm/mach-shark/Makefile b/arch/arm/mach-shark/Makefile
deleted file mode 100644 (file)
index 2965718..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Makefile for the linux kernel.
-#
-
-# Object file lists.
-
-obj-y                  := core.o dma.o irq.o pci.o leds.o
-obj-m                  :=
-obj-n                  :=
-obj-                   :=
diff --git a/arch/arm/mach-shark/Makefile.boot b/arch/arm/mach-shark/Makefile.boot
deleted file mode 100644 (file)
index e40e24e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-   zreladdr-y  += 0x08008000
-
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c
deleted file mode 100644 (file)
index 1d32c5e..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- *  linux/arch/arm/mach-shark/arch.c
- *
- *  Architecture specific stuff.
- */
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/sched.h>
-#include <linux/serial_8250.h>
-#include <linux/io.h>
-#include <linux/cpu.h>
-#include <linux/reboot.h>
-
-#include <asm/setup.h>
-#include <asm/mach-types.h>
-#include <asm/param.h>
-#include <asm/system_misc.h>
-
-#include <asm/mach/map.h>
-#include <asm/mach/arch.h>
-#include <asm/mach/time.h>
-
-#define ROMCARD_SIZE            0x08000000
-#define ROMCARD_START           0x10000000
-
-static void shark_restart(enum reboot_mode mode, const char *cmd)
-{
-        short temp;
-        /* Reset the Machine via pc[3] of the sequoia chipset */
-        outw(0x09,0x24);
-        temp=inw(0x26);
-        temp = temp | (1<<3) | (1<<10);
-        outw(0x09,0x24);
-        outw(temp,0x26);
-}
-
-static struct plat_serial8250_port serial_platform_data[] = {
-       {
-               .iobase         = 0x3f8,
-               .irq            = 4,
-               .uartclk        = 1843200,
-               .regshift       = 0,
-               .iotype         = UPIO_PORT,
-               .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
-       },
-       {
-               .iobase         = 0x2f8,
-               .irq            = 3,
-               .uartclk        = 1843200,
-               .regshift       = 0,
-               .iotype         = UPIO_PORT,
-               .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
-       },
-       { },
-};
-
-static struct platform_device serial_device = {
-       .name                   = "serial8250",
-       .id                     = PLAT8250_DEV_PLATFORM,
-       .dev                    = {
-               .platform_data  = serial_platform_data,
-       },
-};
-
-static struct resource rtc_resources[] = {
-       [0] = {
-               .start  = 0x70,
-               .end    = 0x73,
-               .flags  = IORESOURCE_IO,
-       },
-       [1] = {
-               .start  = IRQ_ISA_RTC_ALARM,
-               .end    = IRQ_ISA_RTC_ALARM,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device rtc_device = {
-       .name           = "rtc_cmos",
-       .id             = -1,
-       .resource       = rtc_resources,
-       .num_resources  = ARRAY_SIZE(rtc_resources),
-};
-
-static int __init shark_init(void)
-{
-       int ret;
-
-       if (machine_is_shark())
-       {
-               ret = platform_device_register(&rtc_device);
-               if (ret) printk(KERN_ERR "Unable to register RTC device: %d\n", ret);
-               ret = platform_device_register(&serial_device);
-               if (ret) printk(KERN_ERR "Unable to register Serial device: %d\n", ret);
-       }
-       return 0;
-}
-
-arch_initcall(shark_init);
-
-extern void shark_init_irq(void);
-
-#define IRQ_TIMER 0
-#define HZ_TIME ((1193180 + HZ/2) / HZ)
-
-static irqreturn_t
-shark_timer_interrupt(int irq, void *dev_id)
-{
-       timer_tick();
-       return IRQ_HANDLED;
-}
-
-static struct irqaction shark_timer_irq = {
-       .name           = "Shark Timer Tick",
-       .flags          = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
-       .handler        = shark_timer_interrupt,
-};
-
-/*
- * Set up timer interrupt, and return the current time in seconds.
- */
-static void __init shark_timer_init(void)
-{
-       outb(0x34, 0x43);               /* binary, mode 0, LSB/MSB, Ch 0 */
-       outb(HZ_TIME & 0xff, 0x40);     /* LSB of count */
-       outb(HZ_TIME >> 8, 0x40);
-
-       setup_irq(IRQ_TIMER, &shark_timer_irq);
-}
-
-static void shark_init_early(void)
-{
-       cpu_idle_poll_ctrl(true);
-}
-
-MACHINE_START(SHARK, "Shark")
-       /* Maintainer: Alexander Schulz */
-       .atag_offset    = 0x3000,
-       .init_early     = shark_init_early,
-       .init_irq       = shark_init_irq,
-       .init_time      = shark_timer_init,
-       .dma_zone_size  = SZ_4M,
-       .restart        = shark_restart,
-MACHINE_END
diff --git a/arch/arm/mach-shark/dma.c b/arch/arm/mach-shark/dma.c
deleted file mode 100644 (file)
index 10b5b8b..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- *  linux/arch/arm/mach-shark/dma.c
- *
- *  by Alexander Schulz
- *
- *  derived from:
- *  arch/arm/kernel/dma-ebsa285.c
- *  Copyright (C) 1998 Phil Blundell
- */
-
-#include <linux/init.h>
-
-#include <asm/dma.h>
-#include <asm/mach/dma.h>
-
-static int __init shark_dma_init(void)
-{
-#ifdef CONFIG_ISA_DMA
-       isa_init_dma();
-#endif
-       return 0;
-}
-core_initcall(shark_dma_init);
diff --git a/arch/arm/mach-shark/include/mach/debug-macro.S b/arch/arm/mach-shark/include/mach/debug-macro.S
deleted file mode 100644 (file)
index d129119..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* arch/arm/mach-shark/include/mach/debug-macro.S
- *
- * Debugging macro include header
- *
- *  Copyright (C) 1994-1999 Russell King
- *  Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
-*/
-
-               .macro  addruart, rp, rv, tmp
-               mov     \rp, #0x3f8
-               orr     \rv, \rp, #0xfe000000
-               orr     \rv, \rv, #0x00e00000
-               orr     \rp, \rp, #0x40000000
-               .endm
-
-               .macro  senduart,rd,rx
-               strb    \rd, [\rx]
-               .endm
-
-               .macro waituart,rd,rx
-               .endm
-
-               .macro  busyuart,rd,rx
-               mov     \rd, #0
-1001:          add     \rd, \rd, #1
-               teq     \rd, #0x10000
-               bne     1001b
-               .endm
-
diff --git a/arch/arm/mach-shark/include/mach/entry-macro.S b/arch/arm/mach-shark/include/mach/entry-macro.S
deleted file mode 100644 (file)
index c9e49f0..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/entry-macro.S
- *
- * Low-level IRQ helper macros for Shark platform
- *
- * This file is licensed under  the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-               .macro  get_irqnr_preamble, base, tmp
-               mov     \base, #0xfe000000
-               orr     \base, \base, #0x00e00000
-               .endm
-
-               .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
-
-               mov     \irqstat, #0x0C
-               strb    \irqstat, [\base, #0x20]        @outb(0x0C, 0x20) /* Poll command */
-               ldrb    \irqnr, [\base, #0x20]          @irq = inb(0x20) & 7
-               and     \irqstat, \irqnr, #0x80
-               teq     \irqstat, #0
-               beq     43f
-               and     \irqnr, \irqnr, #7
-               teq     \irqnr, #2
-               bne     44f
-43:            mov     \irqstat, #0x0C
-               strb    \irqstat, [\base, #0xa0]        @outb(0x0C, 0xA0) /* Poll command */
-               ldrb    \irqnr, [\base, #0xa0]          @irq = (inb(0xA0) & 7) + 8
-               and     \irqstat, \irqnr, #0x80
-               teq     \irqstat, #0
-               beq     44f
-               and     \irqnr, \irqnr, #7
-               add     \irqnr, \irqnr, #8
-44:            teq     \irqstat, #0
-               .endm
-
diff --git a/arch/arm/mach-shark/include/mach/framebuffer.h b/arch/arm/mach-shark/include/mach/framebuffer.h
deleted file mode 100644 (file)
index 84a5bf6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/framebuffer.h
- *
- * by Alexander Schulz
- *
- */
-
-#ifndef __ASM_ARCH_FRAMEBUFFER_H
-#define __ASM_ARCH_FRAMEBUFFER_H
-
-/* defines for the Framebuffer */
-#define FB_START               0x06000000
-#define FB_SIZE                        0x01000000
-
-#endif
-
diff --git a/arch/arm/mach-shark/include/mach/hardware.h b/arch/arm/mach-shark/include/mach/hardware.h
deleted file mode 100644 (file)
index 663f952..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/hardware.h
- *
- * by Alexander Schulz
- *
- * derived from:
- * arch/arm/mach-ebsa110/include/mach/hardware.h
- * Copyright (C) 1996-1999 Russell King.
- */
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H
-
-#define UNCACHEABLE_ADDR        0xdf010000
-
-#endif
-
diff --git a/arch/arm/mach-shark/include/mach/irqs.h b/arch/arm/mach-shark/include/mach/irqs.h
deleted file mode 100644 (file)
index c8e8a4e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/irqs.h
- *
- * by Alexander Schulz
- */
-
-#define NR_IRQS                        16
-
-#define IRQ_ISA_KEYBOARD        1
-#define IRQ_ISA_RTC_ALARM       8
-#define I8042_KBD_IRQ           1
-#define I8042_AUX_IRQ          12
-#define IRQ_HARDDISK            14
diff --git a/arch/arm/mach-shark/include/mach/isa-dma.h b/arch/arm/mach-shark/include/mach/isa-dma.h
deleted file mode 100644 (file)
index 96c43b8..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/isa-dma.h
- *
- * by Alexander Schulz
- */
-#ifndef __ASM_ARCH_DMA_H
-#define __ASM_ARCH_DMA_H
-
-#define MAX_DMA_CHANNELS       8
-#define DMA_ISA_CASCADE         4
-
-#endif /* _ASM_ARCH_DMA_H */
-
diff --git a/arch/arm/mach-shark/include/mach/memory.h b/arch/arm/mach-shark/include/mach/memory.h
deleted file mode 100644 (file)
index 1cf8d69..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/memory.h
- *
- * by Alexander Schulz
- *
- * derived from:
- * arch/arm/mach-ebsa110/include/mach/memory.h
- * Copyright (c) 1996-1999 Russell King.
- */
-#ifndef __ASM_ARCH_MEMORY_H
-#define __ASM_ARCH_MEMORY_H
-
-#include <asm/sizes.h>
-
-/*
- * Physical DRAM offset.
- */
-#define PLAT_PHYS_OFFSET     UL(0x08000000)
-
-/*
- * Cache flushing area
- */
-#define FLUSH_BASE_PHYS                0x80000000
-#define FLUSH_BASE             0xdf000000
-
-#endif
diff --git a/arch/arm/mach-shark/include/mach/timex.h b/arch/arm/mach-shark/include/mach/timex.h
deleted file mode 100644 (file)
index bb6eeae..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/timex.h
- *
- * by Alexander Schulz
- */
-
-#define CLOCK_TICK_RATE 1193180
diff --git a/arch/arm/mach-shark/include/mach/uncompress.h b/arch/arm/mach-shark/include/mach/uncompress.h
deleted file mode 100644 (file)
index a168435..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/uncompress.h
- * by Alexander Schulz
- *
- * derived from:
- * arch/arm/mach-footbridge/include/mach/uncompress.h
- * Copyright (C) 1996,1997,1998 Russell King
- */
-
-#define SERIAL_BASE ((volatile unsigned char *)0x400003f8)
-
-static inline void putc(int c)
-{
-       volatile int t;
-
-       SERIAL_BASE[0] = c;
-       t=0x10000;
-       while (t--);
-}
-
-static inline void flush(void)
-{
-}
-
-#ifdef DEBUG
-static void putn(unsigned long z)
-{
-       int i;
-       char x;
-
-       putc('0');
-       putc('x');
-       for (i=0;i<8;i++) {
-               x='0'+((z>>((7-i)*4))&0xf);
-               if (x>'9') x=x-'0'+'A'-10;
-               putc(x);
-       }
-}
-
-static void putr()
-{
-       putc('\n');
-       putc('\r');
-}
-#endif
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
diff --git a/arch/arm/mach-shark/irq.c b/arch/arm/mach-shark/irq.c
deleted file mode 100644 (file)
index 5dce13e..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- *  linux/arch/arm/mach-shark/irq.c
- *
- * by Alexander Schulz
- *
- * derived from linux/arch/ppc/kernel/i8259.c and:
- * arch/arm/mach-ebsa110/include/mach/irq.h
- * Copyright (C) 1996-1998 Russell King
- */
-
-#include <linux/init.h>
-#include <linux/fs.h>
-#include <linux/interrupt.h>
-#include <linux/io.h>
-
-#include <asm/irq.h>
-#include <asm/mach/irq.h>
-
-/*
- * 8259A PIC functions to handle ISA devices:
- */
-
-/*
- * This contains the irq mask for both 8259A irq controllers,
- * Let through the cascade-interrupt no. 2 (ff-(1<<2)==fb)
- */
-static unsigned char cached_irq_mask[2] = { 0xfb, 0xff };
-
-/*
- * These have to be protected by the irq controller spinlock
- * before being called.
- */
-static void shark_disable_8259A_irq(struct irq_data *d)
-{
-       unsigned int mask;
-       if (d->irq<8) {
-         mask = 1 << d->irq;
-         cached_irq_mask[0] |= mask;
-         outb(cached_irq_mask[1],0xA1);
-       } else {
-         mask = 1 << (d->irq-8);
-         cached_irq_mask[1] |= mask;
-         outb(cached_irq_mask[0],0x21);
-       }
-}
-
-static void shark_enable_8259A_irq(struct irq_data *d)
-{
-       unsigned int mask;
-       if (d->irq<8) {
-         mask = ~(1 << d->irq);
-         cached_irq_mask[0] &= mask;
-         outb(cached_irq_mask[0],0x21);
-       } else {
-         mask = ~(1 << (d->irq-8));
-         cached_irq_mask[1] &= mask;
-         outb(cached_irq_mask[1],0xA1);
-       }
-}
-
-static void shark_ack_8259A_irq(struct irq_data *d){}
-
-static irqreturn_t bogus_int(int irq, void *dev_id)
-{
-       printk("Got interrupt %i!\n",irq);
-       return IRQ_NONE;
-}
-
-static struct irqaction cascade;
-
-static struct irq_chip fb_chip = {
-       .name           = "XT-PIC",
-       .irq_ack        = shark_ack_8259A_irq,
-       .irq_mask       = shark_disable_8259A_irq,
-       .irq_unmask     = shark_enable_8259A_irq,
-};
-
-void __init shark_init_irq(void)
-{
-       int irq;
-
-       for (irq = 0; irq < NR_IRQS; irq++) {
-               irq_set_chip_and_handler(irq, &fb_chip, handle_edge_irq);
-               set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
-       }
-
-       /* init master interrupt controller */
-       outb(0x11, 0x20); /* Start init sequence, edge triggered (level: 0x19)*/
-       outb(0x00, 0x21); /* Vector base */
-       outb(0x04, 0x21); /* Cascade (slave) on IRQ2 */
-       outb(0x03, 0x21); /* Select 8086 mode , auto eoi*/
-       outb(0x0A, 0x20);
-       /* init slave interrupt controller */
-       outb(0x11, 0xA0); /* Start init sequence, edge triggered */
-       outb(0x08, 0xA1); /* Vector base */
-       outb(0x02, 0xA1); /* Cascade (slave) on IRQ2 */
-       outb(0x03, 0xA1); /* Select 8086 mode, auto eoi */
-       outb(0x0A, 0xA0);
-       outb(cached_irq_mask[1],0xA1);
-       outb(cached_irq_mask[0],0x21);
-       //request_region(0x20,0x2,"pic1");
-       //request_region(0xA0,0x2,"pic2");
-
-       cascade.handler = bogus_int;
-       cascade.name = "cascade";
-       setup_irq(2,&cascade);
-}
-
diff --git a/arch/arm/mach-shark/leds.c b/arch/arm/mach-shark/leds.c
deleted file mode 100644 (file)
index 081c778..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * DIGITAL Shark LED control routines.
- *
- * Driver for the 3 user LEDs found on the Shark
- * Based on Versatile and RealView machine LED code
- *
- * License terms: GNU General Public License (GPL) version 2
- * Author: Bryan Wu <bryan.wu@canonical.com>
- */
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/io.h>
-#include <linux/ioport.h>
-#include <linux/slab.h>
-#include <linux/leds.h>
-
-#include <asm/mach-types.h>
-
-#if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS)
-struct shark_led {
-       struct led_classdev cdev;
-       u8 mask;
-};
-
-/*
- * The triggers lines up below will only be used if the
- * LED triggers are compiled in.
- */
-static const struct {
-       const char *name;
-       const char *trigger;
-} shark_leds[] = {
-       { "shark:amber0", "default-on", },      /* Bit 5 */
-       { "shark:green", "heartbeat", },        /* Bit 6 */
-       { "shark:amber1", "cpu0" },             /* Bit 7 */
-};
-
-static u16 led_reg_read(void)
-{
-       outw(0x09, 0x24);
-       return inw(0x26);
-}
-
-static void led_reg_write(u16 value)
-{
-       outw(0x09, 0x24);
-       outw(value, 0x26);
-}
-
-static void shark_led_set(struct led_classdev *cdev,
-                             enum led_brightness b)
-{
-       struct shark_led *led = container_of(cdev,
-                                                struct shark_led, cdev);
-       u16 reg = led_reg_read();
-
-       if (b != LED_OFF)
-               reg |= led->mask;
-       else
-               reg &= ~led->mask;
-
-       led_reg_write(reg);
-}
-
-static enum led_brightness shark_led_get(struct led_classdev *cdev)
-{
-       struct shark_led *led = container_of(cdev,
-                                                struct shark_led, cdev);
-       u16 reg = led_reg_read();
-
-       return (reg & led->mask) ? LED_FULL : LED_OFF;
-}
-
-static int __init shark_leds_init(void)
-{
-       int i;
-       u16 reg;
-
-       if (!machine_is_shark())
-               return -ENODEV;
-
-       for (i = 0; i < ARRAY_SIZE(shark_leds); i++) {
-               struct shark_led *led;
-
-               led = kzalloc(sizeof(*led), GFP_KERNEL);
-               if (!led)
-                       break;
-
-               led->cdev.name = shark_leds[i].name;
-               led->cdev.brightness_set = shark_led_set;
-               led->cdev.brightness_get = shark_led_get;
-               led->cdev.default_trigger = shark_leds[i].trigger;
-
-               /* Count in 5 bits offset */
-               led->mask = BIT(i + 5);
-
-               if (led_classdev_register(NULL, &led->cdev) < 0) {
-                       kfree(led);
-                       break;
-               }
-       }
-
-       /* Make LEDs independent of power-state */
-       request_region(0x24, 4, "led_reg");
-       reg = led_reg_read();
-       reg |= 1 << 10;
-       led_reg_write(reg);
-
-       return 0;
-}
-
-/*
- * Since we may have triggers on any subsystem, defer registration
- * until after subsystem_init.
- */
-fs_initcall(shark_leds_init);
-#endif
diff --git a/arch/arm/mach-shark/pci.c b/arch/arm/mach-shark/pci.c
deleted file mode 100644 (file)
index 6d91a91..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *  linux/arch/arm/mach-shark/pci.c
- *
- *  PCI bios-type initialisation for PCI machines
- *
- *  Bits taken from various places.
- */
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/init.h>
-#include <linux/io.h>
-#include <video/vga.h>
-
-#include <asm/irq.h>
-#include <asm/mach/pci.h>
-#include <asm/mach-types.h>
-
-#define IO_START       0x40000000
-
-static int __init shark_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
-{
-       if (dev->bus->number == 0)
-               if (dev->devfn == 0)
-                       return 255;
-               else
-                       return 11;
-       else
-               return 255;
-}
-
-extern void __init via82c505_preinit(void);
-
-static struct hw_pci shark_pci __initdata = {
-       .setup          = via82c505_setup,
-       .map_irq        = shark_map_irq,
-       .nr_controllers = 1,
-       .ops            = &via82c505_ops,
-       .preinit        = via82c505_preinit,
-};
-
-static int __init shark_pci_init(void)
-{
-       if (!machine_is_shark())
-               return -ENODEV;
-
-       pcibios_min_io = 0x6000;
-       pcibios_min_mem = 0x50000000;
-       vga_base = 0xe8000000;
-
-       pci_ioremap_io(0, IO_START);
-
-       pci_common_init(&shark_pci);
-
-       return 0;
-}
-
-subsys_initcall(shark_pci_init);
index 5dd5f9f7897a8365f59eb9e19378d5df0d82bb8f..6e7d0a9b0be9c50be7573d18a3533f3d8e54e50e 100644 (file)
@@ -174,6 +174,8 @@ config MACH_BOCKW
        select RENESAS_INTC_IRQPIN
        select REGULATOR_FIXED_VOLTAGE if REGULATOR
        select USE_OF
+       select SND_SOC_AK4554 if SND_SIMPLE_CARD
+       select SND_SOC_AK4642 if SND_SIMPLE_CARD
 
 config MACH_BOCKW_REFERENCE
        bool "BOCK-W  - Reference Device Tree Implementation"
@@ -225,6 +227,11 @@ config MACH_LAGER_REFERENCE
 
           This is intended to aid developers
 
+config MACH_KOELSCH
+       bool "Koelsch board"
+       depends on ARCH_R8A7791
+       select USE_OF
+
 config MACH_KZM9D
        bool "KZM9D board"
        depends on ARCH_EMEV2
index f2d40edadcc9587eee67afb40af5cd60bfaac567..663f8941153a5b9b237fceaa9aed7a0ba76ad8ed 100644 (file)
@@ -66,6 +66,7 @@ obj-$(CONFIG_MACH_LAGER)      += board-lager.o
 obj-$(CONFIG_MACH_LAGER_REFERENCE)     += board-lager-reference.o
 obj-$(CONFIG_MACH_ARMADILLO800EVA)     += board-armadillo800eva.o
 obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE)   += board-armadillo800eva-reference.o
+obj-$(CONFIG_MACH_KOELSCH)     += board-koelsch.o
 obj-$(CONFIG_MACH_KZM9D)       += board-kzm9d.o
 obj-$(CONFIG_MACH_KZM9D_REFERENCE)     += board-kzm9d-reference.o
 obj-$(CONFIG_MACH_KZM9G)       += board-kzm9g.o
index 6a504fe7d86c45cb1c9c43a746bfe5beecfca7bb..60e29e6c112625ab9b7fe17039bbf3cd4168a87a 100644 (file)
@@ -6,6 +6,7 @@ loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000
 loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000
 loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000
 loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000
+loadaddr-$(CONFIG_MACH_KOELSCH) += 0x40008000
 loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000
 loadaddr-$(CONFIG_MACH_KZM9D_REFERENCE) += 0x40008000
 loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000
index d36e23f5d8b730594d0dd8edfc949b3454225a91..3016f2f8e006e81f8359e3ae7f3e8fd4d1c2d4cb 100644 (file)
@@ -86,7 +86,7 @@ static struct gpio_keys_button gpio_buttons[] = {
        GPIO_KEY(KEY_VOLUMEDOWN,        329,    "S21"),
 };
 
-static struct __initdata gpio_keys_platform_data ape6evm_keys_pdata = {
+static struct gpio_keys_platform_data ape6evm_keys_pdata __initdata = {
        .buttons        = gpio_buttons,
        .nbuttons       = ARRAY_SIZE(gpio_buttons),
 };
@@ -113,22 +113,56 @@ static const struct smsc911x_platform_config lan9220_data __initconst = {
 };
 
 /*
- * On APE6EVM power is supplied to MMCIF by a tps80032 regulator. For now we
- * model a VDD supply to MMCIF, using a fixed 3.3V regulator. Also use the
- * static power supply for SDHI0 and SDHI1, whereas SDHI0's VccQ is also
- * supplied by the same tps80032 regulator and thus can also be adjusted
- * dynamically.
+ * MMC0 power supplies:
+ * Both Vcc and VccQ to eMMC on APE6EVM are supplied by a tps80032 voltage
+ * regulator. Until support for it is added to this file we simulate the
+ * Vcc supply by a fixed always-on regulator
  */
-static struct regulator_consumer_supply fixed3v3_power_consumers[] =
+static struct regulator_consumer_supply vcc_mmc0_consumers[] =
 {
        REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
+};
+
+/*
+ * SDHI0 power supplies:
+ * Vcc to SDHI0 on APE6EVM is supplied by a GPIO-switchable regulator. VccQ is
+ * provided by the same tps80032 regulator as both MMC0 voltages - see comment
+ * above
+ */
+static struct regulator_consumer_supply vcc_sdhi0_consumers[] =
+{
        REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
+};
+
+static struct regulator_init_data vcc_sdhi0_init_data = {
+       .constraints = {
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(vcc_sdhi0_consumers),
+       .consumer_supplies      = vcc_sdhi0_consumers,
+};
+
+static const struct fixed_voltage_config vcc_sdhi0_info __initconst = {
+       .supply_name = "SDHI0 Vcc",
+       .microvolts = 3300000,
+       .gpio = 76,
+       .enable_high = 1,
+       .init_data = &vcc_sdhi0_init_data,
+};
+
+/*
+ * SDHI1 power supplies:
+ * Vcc and VccQ to SDHI1 on APE6EVM are both fixed at 3.3V
+ */
+static struct regulator_consumer_supply vcc_sdhi1_consumers[] =
+{
        REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
 };
 
 /* MMCIF */
 static const struct sh_mmcif_plat_data mmcif0_pdata __initconst = {
        .caps           = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
+       .ccs_unsupported = true,
 };
 
 static const struct resource mmcif0_resources[] __initconst = {
@@ -215,14 +249,19 @@ static void __init ape6evm_add_standard_devices(void)
        platform_device_register_resndata(&platform_bus, "smsc911x", -1,
                                          lan9220_res, ARRAY_SIZE(lan9220_res),
                                          &lan9220_data, sizeof(lan9220_data));
-       regulator_register_always_on(1, "fixed-3.3V", fixed3v3_power_consumers,
-                                    ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
+
+       regulator_register_always_on(1, "MMC0 Vcc", vcc_mmc0_consumers,
+                                    ARRAY_SIZE(vcc_mmc0_consumers), 2800000);
        platform_device_register_resndata(&platform_bus, "sh_mmcif", 0,
                                          mmcif0_resources, ARRAY_SIZE(mmcif0_resources),
                                          &mmcif0_pdata, sizeof(mmcif0_pdata));
+       platform_device_register_data(&platform_bus, "reg-fixed-voltage", 2,
+                                     &vcc_sdhi0_info, sizeof(vcc_sdhi0_info));
        platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 0,
                                          sdhi0_resources, ARRAY_SIZE(sdhi0_resources),
                                          &sdhi0_pdata, sizeof(sdhi0_pdata));
+       regulator_register_always_on(3, "SDHI1 Vcc", vcc_sdhi1_consumers,
+                                    ARRAY_SIZE(vcc_sdhi1_consumers), 3300000);
        platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 1,
                                          sdhi1_resources, ARRAY_SIZE(sdhi1_resources),
                                          &sdhi1_pdata, sizeof(sdhi1_pdata));
index 7f8f6076d3609e82382bb98f116df3bfc59049ed..8bc8e4c5884767f381c09da79ffcf2b52e2ffdc9 100644 (file)
@@ -823,6 +823,7 @@ static struct sh_mmcif_plat_data sh_mmcif_plat = {
        .caps           = MMC_CAP_4_BIT_DATA |
                          MMC_CAP_8_BIT_DATA |
                          MMC_CAP_NONREMOVABLE,
+       .ccs_unsupported = true,
        .slave_id_tx    = SHDMA_SLAVE_MMCIF_TX,
        .slave_id_rx    = SHDMA_SLAVE_MMCIF_RX,
 };
index 6b9faf3908f72b2f23bd3a1a3b07887c6581bc9b..3644b40329d2e01487042956757f8a0473481331 100644 (file)
 #include <linux/smsc911x.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/flash.h>
+#include <linux/usb/renesas_usbhs.h>
 #include <media/soc_camera.h>
 #include <mach/common.h>
 #include <mach/irqs.h>
 #include <mach/r8a7778.h>
 #include <asm/mach/arch.h>
+#include <sound/rcar_snd.h>
+#include <sound/simple_card.h>
+
+#define FPGA   0x18200000
+#define IRQ0MR 0x30
+#define COMCTLR        0x101c
+static void __iomem *fpga;
 
 /*
  *     CN9(Upper side) SCIF/RCAN selection
  * SW19        (MMC)   1 pin
  */
 
+/*
+ *     SSI settings
+ *
+ * SW45: 1-4 side      (SSI5 out, ROUT/LOUT CN19 Mid)
+ * SW46: 1101          (SSI6 Recorde)
+ * SW47: 1110          (SSI5 Playback)
+ * SW48: 11            (Recorde power)
+ * SW49: 1             (SSI slave mode)
+ * SW50: 1111          (SSI7, SSI8)
+ * SW51: 1111          (SSI3, SSI4)
+ * SW54: 1pin          (ak4554 FPGA control)
+ * SW55: 1             (CLKB is 24.5760MHz)
+ * SW60: 1pin          (ak4554 FPGA control)
+ * SW61: 3pin          (use X11 clock)
+ * SW78: 3-6           (ak4642 connects I2C0)
+ *
+ * You can use sound as
+ *
+ * hw0: CN19: SSI56-AK4643
+ * hw1: CN21: SSI3-AK4554(playback)
+ * hw2: CN21: SSI4-AK4554(capture)
+ * hw3: CN20: SSI7-AK4554(playback)
+ * hw4: CN20: SSI8-AK4554(capture)
+ *
+ * this command is required when playback on hw0.
+ *
+ * # amixer set "LINEOUT Mixer DACL" on
+ */
+
+/*
+ * USB
+ *
+ * USB1 (CN29) can be Host/Function
+ *
+ *             Host    Func
+ * SW98                1       2
+ * SW99                1       3
+ */
+
 /* Dummy supplies, where voltage doesn't matter */
 static struct regulator_consumer_supply dummy_supplies[] = {
        REGULATOR_SUPPLY("vddvario", "smsc911x"),
@@ -81,13 +128,71 @@ static struct resource smsc911x_resources[] __initdata = {
        DEFINE_RES_IRQ(irq_pin(0)), /* IRQ 0 */
 };
 
+#if IS_ENABLED(CONFIG_USB_RENESAS_USBHS_UDC)
+/*
+ * When USB1 is Func
+ */
+static int usbhsf_get_id(struct platform_device *pdev)
+{
+       return USBHS_GADGET;
+}
+
+#define SUSPMODE       0x102
+static int usbhsf_power_ctrl(struct platform_device *pdev,
+                            void __iomem *base, int enable)
+{
+       enable = !!enable;
+
+       r8a7778_usb_phy_power(enable);
+
+       iowrite16(enable << 14, base + SUSPMODE);
+
+       return 0;
+}
+
+static struct resource usbhsf_resources[] __initdata = {
+       DEFINE_RES_MEM(0xffe60000, 0x110),
+       DEFINE_RES_IRQ(gic_iid(0x4f)),
+};
+
+static struct renesas_usbhs_platform_info usbhs_info __initdata = {
+       .platform_callback = {
+               .get_id         = usbhsf_get_id,
+               .power_ctrl     = usbhsf_power_ctrl,
+       },
+       .driver_param = {
+               .buswait_bwait  = 4,
+       },
+};
+
+#define USB_PHY_SETTING {.port1_func = 1, .ovc_pin[1].active_high = 1,}
+#define USB1_DEVICE    "renesas_usbhs"
+#define ADD_USB_FUNC_DEVICE_IF_POSSIBLE()                      \
+       platform_device_register_resndata(                      \
+               &platform_bus, "renesas_usbhs", -1,             \
+               usbhsf_resources,                               \
+               ARRAY_SIZE(usbhsf_resources),                   \
+               &usbhs_info, sizeof(struct renesas_usbhs_platform_info))
+
+#else
+/*
+ * When USB1 is Host
+ */
+#define USB_PHY_SETTING { }
+#define USB1_DEVICE    "ehci-platform"
+#define ADD_USB_FUNC_DEVICE_IF_POSSIBLE()
+
+#endif
+
 /* USB */
 static struct resource usb_phy_resources[] __initdata = {
        DEFINE_RES_MEM(0xffe70800, 0x100),
        DEFINE_RES_MEM(0xffe76000, 0x100),
 };
 
-static struct rcar_phy_platform_data usb_phy_platform_data __initdata;
+static struct rcar_phy_platform_data usb_phy_platform_data __initdata =
+       USB_PHY_SETTING;
+
 
 /* SDHI */
 static struct sh_mobile_sdhi_info sdhi0_info __initdata = {
@@ -101,6 +206,12 @@ static struct resource sdhi0_resources[] __initdata = {
        DEFINE_RES_IRQ(gic_iid(0x77)),
 };
 
+/* Ether */
+static struct resource ether_resources[] __initdata = {
+       DEFINE_RES_MEM(0xfde00000, 0x400),
+       DEFINE_RES_IRQ(gic_iid(0x89)),
+};
+
 static struct sh_eth_plat_data ether_platform_data __initdata = {
        .phy            = 0x01,
        .edmac_endian   = EDMAC_LITTLE_ENDIAN,
@@ -118,7 +229,9 @@ static struct sh_eth_plat_data ether_platform_data __initdata = {
 static struct i2c_board_info i2c0_devices[] = {
        {
                I2C_BOARD_INFO("rx8581", 0x51),
-       },
+       }, {
+               I2C_BOARD_INFO("ak4643", 0x12),
+       }
 };
 
 /* HSPI*/
@@ -162,10 +275,6 @@ static struct sh_mmcif_plat_data sh_mmcif_plat __initdata = {
                          MMC_CAP_NEEDS_POLL,
 };
 
-static struct rcar_vin_platform_data vin_platform_data __initdata = {
-       .flags  = RCAR_VIN_BT656,
-};
-
 /* In the default configuration both decoders reside on I2C bus 0 */
 #define BOCKW_CAMERA(idx)                                              \
 static struct i2c_board_info camera##idx##_info = {                    \
@@ -181,7 +290,237 @@ static struct soc_camera_link iclink##idx##_ml86v7667 __initdata = {      \
 BOCKW_CAMERA(0);
 BOCKW_CAMERA(1);
 
+/* Sound */
+static struct resource rsnd_resources[] __initdata = {
+       [RSND_GEN1_SRU] = DEFINE_RES_MEM(0xffd90000, 0x1000),
+       [RSND_GEN1_SSI] = DEFINE_RES_MEM(0xffd91000, 0x1240),
+       [RSND_GEN1_ADG] = DEFINE_RES_MEM(0xfffe0000, 0x24),
+};
+
+static struct rsnd_ssi_platform_info rsnd_ssi[] = {
+       RSND_SSI_UNUSED, /* SSI 0 */
+       RSND_SSI_UNUSED, /* SSI 1 */
+       RSND_SSI_UNUSED, /* SSI 2 */
+       RSND_SSI_SET(1, 0, gic_iid(0x85), RSND_SSI_PLAY),
+       RSND_SSI_SET(2, 0, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE | RSND_SSI_CLK_FROM_ADG),
+       RSND_SSI_SET(0, 0, gic_iid(0x86), RSND_SSI_PLAY),
+       RSND_SSI_SET(0, 0, gic_iid(0x86), 0),
+       RSND_SSI_SET(3, 0, gic_iid(0x86), RSND_SSI_PLAY),
+       RSND_SSI_SET(4, 0, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE | RSND_SSI_CLK_FROM_ADG),
+};
+
+static struct rsnd_scu_platform_info rsnd_scu[9] = {
+       /* no member at this point */
+};
+
+enum {
+       AK4554_34 = 0,
+       AK4643_56,
+       AK4554_78,
+       SOUND_MAX,
+};
+
+static int rsnd_codec_power(int id, int enable)
+{
+       static int sound_user[SOUND_MAX] = {0, 0, 0};
+       int *usr = NULL;
+       u32 bit;
+
+       switch (id) {
+       case 3:
+       case 4:
+               usr = sound_user + AK4554_34;
+               bit = (1 << 10);
+               break;
+       case 5:
+       case 6:
+               usr = sound_user + AK4643_56;
+               bit = (1 << 6);
+               break;
+       case 7:
+       case 8:
+               usr = sound_user + AK4554_78;
+               bit = (1 << 7);
+               break;
+       }
+
+       if (!usr)
+               return -EIO;
+
+       if (enable) {
+               if (*usr == 0) {
+                       u32 val = ioread16(fpga + COMCTLR);
+                       val &= ~bit;
+                       iowrite16(val, fpga + COMCTLR);
+               }
+
+               (*usr)++;
+       } else {
+               if (*usr == 0)
+                       return 0;
+
+               (*usr)--;
+
+               if (*usr == 0) {
+                       u32 val = ioread16(fpga + COMCTLR);
+                       val |= bit;
+                       iowrite16(val, fpga + COMCTLR);
+               }
+       }
+
+       return 0;
+}
+
+static int rsnd_start(int id)
+{
+       return rsnd_codec_power(id, 1);
+}
+
+static int rsnd_stop(int id)
+{
+       return rsnd_codec_power(id, 0);
+}
+
+static struct rcar_snd_info rsnd_info = {
+       .flags          = RSND_GEN1,
+       .ssi_info       = rsnd_ssi,
+       .ssi_info_nr    = ARRAY_SIZE(rsnd_ssi),
+       .scu_info       = rsnd_scu,
+       .scu_info_nr    = ARRAY_SIZE(rsnd_scu),
+       .start          = rsnd_start,
+       .stop           = rsnd_stop,
+};
+
+static struct asoc_simple_card_info rsnd_card_info[] = {
+       /* SSI5, SSI6 */
+       {
+               .name           = "AK4643",
+               .card           = "SSI56-AK4643",
+               .codec          = "ak4642-codec.0-0012",
+               .platform       = "rcar_sound",
+               .daifmt         = SND_SOC_DAIFMT_LEFT_J,
+               .cpu_dai = {
+                       .name   = "rsnd-dai.0",
+                       .fmt    = SND_SOC_DAIFMT_CBS_CFS,
+               },
+               .codec_dai = {
+                       .name   = "ak4642-hifi",
+                       .fmt    = SND_SOC_DAIFMT_CBM_CFM,
+                       .sysclk = 11289600,
+               },
+       },
+       /* SSI3 */
+       {
+               .name           = "AK4554",
+               .card           = "SSI3-AK4554(playback)",
+               .codec          = "ak4554-adc-dac.0",
+               .platform       = "rcar_sound",
+               .cpu_dai = {
+                       .name   = "rsnd-dai.1",
+                       .fmt    = SND_SOC_DAIFMT_CBM_CFM |
+                                 SND_SOC_DAIFMT_RIGHT_J,
+               },
+               .codec_dai = {
+                       .name   = "ak4554-hifi",
+               },
+       },
+       /* SSI4 */
+       {
+               .name           = "AK4554",
+               .card           = "SSI4-AK4554(capture)",
+               .codec          = "ak4554-adc-dac.0",
+               .platform       = "rcar_sound",
+               .cpu_dai = {
+                       .name   = "rsnd-dai.2",
+                       .fmt    = SND_SOC_DAIFMT_CBM_CFM |
+                                 SND_SOC_DAIFMT_LEFT_J,
+               },
+               .codec_dai = {
+                       .name   = "ak4554-hifi",
+               },
+       },
+       /* SSI7 */
+       {
+               .name           = "AK4554",
+               .card           = "SSI7-AK4554(playback)",
+               .codec          = "ak4554-adc-dac.1",
+               .platform       = "rcar_sound",
+               .cpu_dai = {
+                       .name   = "rsnd-dai.3",
+                       .fmt    = SND_SOC_DAIFMT_CBM_CFM |
+                                 SND_SOC_DAIFMT_RIGHT_J,
+               },
+               .codec_dai = {
+                       .name   = "ak4554-hifi",
+               },
+       },
+       /* SSI8 */
+       {
+               .name           = "AK4554",
+               .card           = "SSI8-AK4554(capture)",
+               .codec          = "ak4554-adc-dac.1",
+               .platform       = "rcar_sound",
+               .cpu_dai = {
+                       .name   = "rsnd-dai.4",
+                       .fmt    = SND_SOC_DAIFMT_CBM_CFM |
+                                 SND_SOC_DAIFMT_LEFT_J,
+               },
+               .codec_dai = {
+                       .name   = "ak4554-hifi",
+               },
+       }
+};
+
+/* VIN */
+static struct rcar_vin_platform_data vin_platform_data __initdata = {
+       .flags  = RCAR_VIN_BT656,
+};
+
+#define R8A7778_VIN(idx)                                               \
+static struct resource vin##idx##_resources[] __initdata = {           \
+       DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000),            \
+       DEFINE_RES_IRQ(gic_iid(0x5a)),                                  \
+};                                                                     \
+                                                                       \
+static struct platform_device_info vin##idx##_info __initdata = {      \
+       .parent         = &platform_bus,                                \
+       .name           = "r8a7778-vin",                                \
+       .id             = idx,                                          \
+       .res            = vin##idx##_resources,                         \
+       .num_res        = ARRAY_SIZE(vin##idx##_resources),             \
+       .dma_mask       = DMA_BIT_MASK(32),                             \
+       .data           = &vin_platform_data,                           \
+       .size_data      = sizeof(vin_platform_data),                    \
+}
+R8A7778_VIN(0);
+R8A7778_VIN(1);
+
 static const struct pinctrl_map bockw_pinctrl_map[] = {
+       /* AUDIO */
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "audio_clk_a", "audio_clk"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "audio_clk_b", "audio_clk"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi34_ctrl", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi3_data", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi4_data", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi5_ctrl", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi5_data", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi6_ctrl", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi6_data", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi78_ctrl", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi7_data", "ssi"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778",
+                                 "ssi8_data", "ssi"),
        /* Ether */
        PIN_MAP_MUX_GROUP_DEFAULT("r8a777x-ether", "pfc-r8a7778",
                                  "ether_rmii", "ether"),
@@ -201,7 +540,7 @@ static const struct pinctrl_map bockw_pinctrl_map[] = {
        /* USB */
        PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform", "pfc-r8a7778",
                                  "usb0", "usb0"),
-       PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform", "pfc-r8a7778",
+       PIN_MAP_MUX_GROUP_DEFAULT(USB1_DEVICE, "pfc-r8a7778",
                                  "usb1", "usb1"),
        /* SDHI0 */
        PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
@@ -224,22 +563,28 @@ static const struct pinctrl_map bockw_pinctrl_map[] = {
                                  "vin1_data8", "vin1"),
 };
 
-#define FPGA   0x18200000
-#define IRQ0MR 0x30
 #define PFC    0xfffc0000
 #define PUPR4  0x110
 static void __init bockw_init(void)
 {
        void __iomem *base;
+       struct clk *clk;
+       int i;
 
        r8a7778_clock_init();
        r8a7778_init_irq_extpin(1);
        r8a7778_add_standard_devices();
-       r8a7778_add_ether_device(&ether_platform_data);
-       r8a7778_add_vin_device(0, &vin_platform_data);
+
+       platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1,
+                                         ether_resources,
+                                         ARRAY_SIZE(ether_resources),
+                                         &ether_platform_data,
+                                         sizeof(ether_platform_data));
+
+       platform_device_register_full(&vin0_info);
        /* VIN1 has a pin conflict with Ether */
        if (!IS_ENABLED(CONFIG_SH_ETH))
-               r8a7778_add_vin_device(1, &vin_platform_data);
+               platform_device_register_full(&vin1_info);
        platform_device_register_data(&platform_bus, "soc-camera-pdrv", 0,
                                      &iclink0_ml86v7667,
                                      sizeof(iclink0_ml86v7667));
@@ -269,8 +614,8 @@ static void __init bockw_init(void)
 
 
        /* for SMSC */
-       base = ioremap_nocache(FPGA, SZ_1M);
-       if (base) {
+       fpga = ioremap_nocache(FPGA, SZ_1M);
+       if (fpga) {
                /*
                 * CAUTION
                 *
@@ -278,10 +623,9 @@ static void __init bockw_init(void)
                 * it should be cared in the future
                 * Now, it is assuming IRQ0 was used only from SMSC.
                 */
-               u16 val = ioread16(base + IRQ0MR);
+               u16 val = ioread16(fpga + IRQ0MR);
                val &= ~(1 << 4); /* enable SMSC911x */
-               iowrite16(val, base + IRQ0MR);
-               iounmap(base);
+               iowrite16(val, fpga + IRQ0MR);
 
                regulator_register_fixed(0, dummy_supplies,
                                         ARRAY_SIZE(dummy_supplies));
@@ -308,6 +652,42 @@ static void __init bockw_init(void)
                        sdhi0_resources, ARRAY_SIZE(sdhi0_resources),
                        &sdhi0_info, sizeof(struct sh_mobile_sdhi_info));
        }
+
+       /* for Audio */
+       clk = clk_get(NULL, "audio_clk_b");
+       clk_set_rate(clk, 24576000);
+       clk_put(clk);
+       rsnd_codec_power(5, 1); /* enable ak4642 */
+
+       platform_device_register_simple(
+               "ak4554-adc-dac", 0, NULL, 0);
+
+       platform_device_register_simple(
+               "ak4554-adc-dac", 1, NULL, 0);
+
+       platform_device_register_resndata(
+               &platform_bus, "rcar_sound", -1,
+               rsnd_resources, ARRAY_SIZE(rsnd_resources),
+               &rsnd_info, sizeof(rsnd_info));
+
+       for (i = 0; i < ARRAY_SIZE(rsnd_card_info); i++) {
+               struct platform_device_info cardinfo = {
+                       .parent         = &platform_bus,
+                       .name           = "asoc-simple-card",
+                       .id             = i,
+                       .data           = &rsnd_card_info[i],
+                       .size_data      = sizeof(struct asoc_simple_card_info),
+                       .dma_mask       = ~0,
+               };
+
+               platform_device_register_full(&cardinfo);
+       }
+}
+
+static void __init bockw_init_late(void)
+{
+       r8a7778_init_late();
+       ADD_USB_FUNC_DEVICE_IF_POSSIBLE();
 }
 
 static const char *bockw_boards_compat_dt[] __initdata = {
@@ -320,5 +700,5 @@ DT_MACHINE_START(BOCKW_DT, "bockw")
        .init_irq       = r8a7778_init_irq_dt,
        .init_machine   = bockw_init,
        .dt_compat      = bockw_boards_compat_dt,
-       .init_late      = r8a7778_init_late,
+       .init_late      = bockw_init_late,
 MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
new file mode 100644 (file)
index 0000000..cc2d5e8
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Koelsch board support
+ *
+ * Copyright (C) 2013  Renesas Electronics Corporation
+ * Copyright (C) 2013  Renesas Solutions Corp.
+ * Copyright (C) 2013  Magnus Damm
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <mach/common.h>
+#include <mach/r8a7791.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+
+static void __init koelsch_add_standard_devices(void)
+{
+       r8a7791_clock_init();
+       r8a7791_add_dt_devices();
+}
+
+static const char * const koelsch_boards_compat_dt[] __initconst = {
+       "renesas,koelsch",
+       NULL,
+};
+
+DT_MACHINE_START(KOELSCH_DT, "koelsch")
+       .init_early     = r8a7791_init_early,
+       .init_machine   = koelsch_add_standard_devices,
+       .dt_compat      = koelsch_boards_compat_dt,
+MACHINE_END
index f1994968d303eac3bf022501c2d8007343b261e0..fe689b7fdc9e715ecd724edcc746913010627fb4 100644 (file)
@@ -366,6 +366,7 @@ static struct resource sh_mmcif_resources[] = {
 static struct sh_mmcif_plat_data sh_mmcif_platdata = {
        .ocr            = MMC_VDD_165_195,
        .caps           = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
+       .ccs_unsupported = true,
        .slave_id_tx    = SHDMA_SLAVE_MMCIF_TX,
        .slave_id_rx    = SHDMA_SLAVE_MMCIF_RX,
 };
index 4e040e4d1102cd6100a2cf1119f586e58c11226d..a8d3ce646fb900514fa983964bf8d70d0e88c278 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/mmc/sh_mmcif.h>
 #include <linux/pinctrl/machine.h>
 #include <linux/platform_data/gpio-rcar.h>
+#include <linux/platform_data/rcar-du.h>
 #include <linux/platform_device.h>
 #include <linux/phy.h>
 #include <linux/regulator/fixed.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
+/* DU */
+static struct rcar_du_encoder_data lager_du_encoders[] = {
+       {
+               .type = RCAR_DU_ENCODER_VGA,
+               .output = RCAR_DU_OUTPUT_DPAD0,
+       }, {
+               .type = RCAR_DU_ENCODER_NONE,
+               .output = RCAR_DU_OUTPUT_LVDS1,
+               .connector.lvds.panel = {
+                       .width_mm = 210,
+                       .height_mm = 158,
+                       .mode = {
+                               .clock = 65000,
+                               .hdisplay = 1024,
+                               .hsync_start = 1048,
+                               .hsync_end = 1184,
+                               .htotal = 1344,
+                               .vdisplay = 768,
+                               .vsync_start = 771,
+                               .vsync_end = 777,
+                               .vtotal = 806,
+                               .flags = 0,
+                       },
+               },
+       },
+};
+
+static const struct rcar_du_platform_data lager_du_pdata __initconst = {
+       .encoders = lager_du_encoders,
+       .num_encoders = ARRAY_SIZE(lager_du_encoders),
+};
+
+static const struct resource du_resources[] __initconst = {
+       DEFINE_RES_MEM(0xfeb00000, 0x70000),
+       DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"),
+       DEFINE_RES_MEM_NAMED(0xfeb94000, 0x1c, "lvds.1"),
+       DEFINE_RES_IRQ(gic_spi(256)),
+       DEFINE_RES_IRQ(gic_spi(268)),
+       DEFINE_RES_IRQ(gic_spi(269)),
+};
+
+static void __init lager_add_du_device(void)
+{
+       struct platform_device_info info = {
+               .name = "rcar-du-r8a7790",
+               .id = -1,
+               .res = du_resources,
+               .num_res = ARRAY_SIZE(du_resources),
+               .data = &lager_du_pdata,
+               .size_data = sizeof(lager_du_pdata),
+               .dma_mask = DMA_BIT_MASK(32),
+       };
+
+       platform_device_register_full(&info);
+}
+
 /* LEDS */
 static struct gpio_led lager_leds[] = {
        {
@@ -56,7 +113,7 @@ static struct gpio_led lager_leds[] = {
        },
 };
 
-static __initdata struct gpio_led_platform_data lager_leds_pdata = {
+static const struct gpio_led_platform_data lager_leds_pdata __initconst = {
        .leds           = lager_leds,
        .num_leds       = ARRAY_SIZE(lager_leds),
 };
@@ -72,7 +129,7 @@ static struct gpio_keys_button gpio_buttons[] = {
        GPIO_KEY(KEY_1,         RCAR_GP_PIN(1, 14),     "SW2-pin1"),
 };
 
-static __initdata struct gpio_keys_platform_data lager_keys_pdata = {
+static const struct gpio_keys_platform_data lager_keys_pdata __initconst = {
        .buttons        = gpio_buttons,
        .nbuttons       = ARRAY_SIZE(gpio_buttons),
 };
@@ -84,29 +141,38 @@ static struct regulator_consumer_supply fixed3v3_power_consumers[] =
 };
 
 /* MMCIF */
-static struct sh_mmcif_plat_data mmcif1_pdata __initdata = {
+static const struct sh_mmcif_plat_data mmcif1_pdata __initconst = {
        .caps           = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
+       .clk_ctrl2_present = true,
+       .ccs_unsupported = true,
 };
 
-static struct resource mmcif1_resources[] __initdata = {
+static const struct resource mmcif1_resources[] __initconst = {
        DEFINE_RES_MEM_NAMED(0xee220000, 0x80, "MMCIF1"),
        DEFINE_RES_IRQ(gic_spi(170)),
 };
 
 /* Ether */
-static struct sh_eth_plat_data ether_pdata __initdata = {
+static const struct sh_eth_plat_data ether_pdata __initconst = {
        .phy                    = 0x1,
        .edmac_endian           = EDMAC_LITTLE_ENDIAN,
        .phy_interface          = PHY_INTERFACE_MODE_RMII,
        .ether_link_active_low  = 1,
 };
 
-static struct resource ether_resources[] __initdata = {
+static const struct resource ether_resources[] __initconst = {
        DEFINE_RES_MEM(0xee700000, 0x400),
        DEFINE_RES_IRQ(gic_spi(162)),
 };
 
 static const struct pinctrl_map lager_pinctrl_map[] = {
+       /* DU (CN10: ARGB0, CN13: LVDS) */
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790",
+                                 "du_rgb666", "du"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790",
+                                 "du_sync_1", "du"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790",
+                                 "du_clk_out_0", "du"),
        /* SCIF0 (CN19: DEBUG SERIAL0) */
        PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
                                  "scif0_data", "scif0"),
@@ -154,6 +220,8 @@ static void __init lager_add_standard_devices(void)
                                          ether_resources,
                                          ARRAY_SIZE(ether_resources),
                                          &ether_pdata, sizeof(ether_pdata));
+
+       lager_add_du_device();
 }
 
 /*
@@ -180,7 +248,7 @@ static void __init lager_init(void)
        phy_register_fixup_for_id("r8a7790-ether-ff:01", lager_ksz8041_fixup);
 }
 
-static const char *lager_boards_compat_dt[] __initdata = {
+static const char * const lager_boards_compat_dt[] __initconst = {
        "renesas,lager",
        NULL,
 };
index 3f5044fda4e30ec20610c677188f9647430f1bf0..434b213cc738b87cae04406f4307e8d7400d6417 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/pinctrl/machine.h>
 #include <linux/platform_data/gpio-rcar.h>
+#include <linux/platform_data/rcar-du.h>
 #include <linux/platform_data/usb-rcar-phy.h>
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
@@ -169,6 +170,63 @@ static struct platform_device hspi_device = {
        .num_resources  = ARRAY_SIZE(hspi_resources),
 };
 
+/*
+ * DU
+ *
+ * The panel only specifies the [hv]display and [hv]total values. The position
+ * and width of the sync pulses don't matter, they're copied from VESA timings.
+ */
+static struct rcar_du_encoder_data du_encoders[] = {
+       {
+               .type = RCAR_DU_ENCODER_VGA,
+               .output = RCAR_DU_OUTPUT_DPAD0,
+       }, {
+               .type = RCAR_DU_ENCODER_LVDS,
+               .output = RCAR_DU_OUTPUT_DPAD1,
+               .connector.lvds.panel = {
+                       .width_mm = 210,
+                       .height_mm = 158,
+                       .mode = {
+                               .clock = 65000,
+                               .hdisplay = 1024,
+                               .hsync_start = 1048,
+                               .hsync_end = 1184,
+                               .htotal = 1344,
+                               .vdisplay = 768,
+                               .vsync_start = 771,
+                               .vsync_end = 777,
+                               .vtotal = 806,
+                               .flags = 0,
+                       },
+               },
+       },
+};
+
+static const struct rcar_du_platform_data du_pdata __initconst = {
+       .encoders = du_encoders,
+       .num_encoders = ARRAY_SIZE(du_encoders),
+};
+
+static const struct resource du_resources[] __initconst = {
+       DEFINE_RES_MEM(0xfff80000, 0x40000),
+       DEFINE_RES_IRQ(gic_iid(0x3f)),
+};
+
+static void __init marzen_add_du_device(void)
+{
+       struct platform_device_info info = {
+               .name = "rcar-du-r8a7779",
+               .id = -1,
+               .res = du_resources,
+               .num_res = ARRAY_SIZE(du_resources),
+               .data = &du_pdata,
+               .size_data = sizeof(du_pdata),
+               .dma_mask = DMA_BIT_MASK(32),
+       };
+
+       platform_device_register_full(&info);
+}
+
 /* LEDS */
 static struct gpio_led marzen_leds[] = {
        {
@@ -237,6 +295,19 @@ static struct platform_device *marzen_devices[] __initdata = {
 };
 
 static const struct pinctrl_map marzen_pinctrl_map[] = {
+       /* DU (CN10: ARGB0, CN13: LVDS) */
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779",
+                                 "du0_rgb888", "du0"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779",
+                                 "du0_sync_1", "du0"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779",
+                                 "du0_clk_out_0", "du0"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779",
+                                 "du1_rgb666", "du1"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779",
+                                 "du1_sync_1", "du1"),
+       PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779",
+                                 "du1_clk_out", "du1"),
        /* HSPI0 */
        PIN_MAP_MUX_GROUP_DEFAULT("sh-hspi.0", "pfc-r8a7779",
                                  "hspi0", "hspi0"),
@@ -297,6 +368,7 @@ static void __init marzen_init(void)
        r8a7779_add_vin_device(1, &vin_platform_data);
        r8a7779_add_vin_device(3, &vin_platform_data);
        platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices));
+       marzen_add_du_device();
 }
 
 static const char *marzen_boards_compat_dt[] __initdata = {
index dbe221a484d5da01d61edba3a00e0aa3fae44c85..441886c9714baddffb609247b872fca7054c514a 100644 (file)
@@ -31,9 +31,6 @@ enum {
 
 extern void r8a7778_add_standard_devices(void);
 extern void r8a7778_add_standard_devices_dt(void);
-extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata);
-extern void r8a7778_add_vin_device(int id,
-                                  struct rcar_vin_platform_data *pdata);
 extern void r8a7778_add_dt_devices(void);
 
 extern void r8a7778_init_late(void);
index 16d49aa8b5dbedb48265d7394b6f7fc1208b468b..03fcc5974ef92170c5002bf857ddb35e95a49d57 100644 (file)
@@ -192,20 +192,6 @@ static struct platform_device_info hci##_info __initdata = {       \
 USB_PLATFORM_INFO(ehci);
 USB_PLATFORM_INFO(ohci);
 
-/* Ether */
-static struct resource ether_resources[] __initdata = {
-       DEFINE_RES_MEM(0xfde00000, 0x400),
-       DEFINE_RES_IRQ(gic_iid(0x89)),
-};
-
-void __init r8a7778_add_ether_device(struct sh_eth_plat_data *pdata)
-{
-       platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1,
-                                         ether_resources,
-                                         ARRAY_SIZE(ether_resources),
-                                         pdata, sizeof(*pdata));
-}
-
 /* PFC/GPIO */
 static struct resource pfc_resources[] __initdata = {
        DEFINE_RES_MEM(0xfffc0000, 0x118),
@@ -290,7 +276,7 @@ static struct resource hspi_resources[] __initdata = {
        DEFINE_RES_IRQ(gic_iid(0x75)),
 };
 
-void __init r8a7778_register_hspi(int id)
+static void __init r8a7778_register_hspi(int id)
 {
        BUG_ON(id < 0 || id > 2);
 
@@ -299,40 +285,6 @@ void __init r8a7778_register_hspi(int id)
                hspi_resources + (2 * id), 2);
 }
 
-/* VIN */
-#define R8A7778_VIN(idx)                                               \
-static struct resource vin##idx##_resources[] __initdata = {           \
-       DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000),            \
-       DEFINE_RES_IRQ(gic_iid(0x5a)),                                  \
-};                                                                     \
-                                                                       \
-static struct platform_device_info vin##idx##_info __initdata = {      \
-       .parent         = &platform_bus,                                \
-       .name           = "r8a7778-vin",                                \
-       .id             = idx,                                          \
-       .res            = vin##idx##_resources,                         \
-       .num_res        = ARRAY_SIZE(vin##idx##_resources),             \
-       .dma_mask       = DMA_BIT_MASK(32),                             \
-}
-
-R8A7778_VIN(0);
-R8A7778_VIN(1);
-
-static struct platform_device_info *vin_info_table[] __initdata = {
-       &vin0_info,
-       &vin1_info,
-};
-
-void __init r8a7778_add_vin_device(int id, struct rcar_vin_platform_data *pdata)
-{
-       BUG_ON(id < 0 || id > 1);
-
-       vin_info_table[id]->data = pdata;
-       vin_info_table[id]->size_data = sizeof(*pdata);
-
-       platform_device_register_full(vin_info_table[id]);
-}
-
 void __init r8a7778_add_dt_devices(void)
 {
        int i;
index dd86db467521956f6a1d06f5a157f77ce7ac4e5e..037100a1563aca5f52dd2e68f42c711dc71484c2 100644 (file)
@@ -4,7 +4,6 @@ config ARCH_SOCFPGA
        select ARM_AMBA
        select ARM_GIC
        select CACHE_L2X0
-       select CLKDEV_LOOKUP
        select COMMON_CLK
        select CPU_V7
        select DW_APB_TIMER_OF
index bfce9641e32f76299aa8555b997fe2e55fb142ad..dd0d49cdbe097c09fb15d0a652f2aa6d10e60db9 100644 (file)
@@ -14,7 +14,6 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
-#include <linux/clk-provider.h>
 #include <linux/irqchip.h>
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
@@ -107,7 +106,6 @@ static void __init socfpga_cyclone5_init(void)
 {
        l2x0_of_init(0, ~0UL);
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-       of_clk_init(NULL);
        socfpga_init_clocks();
 }
 
index df0d59afeb402a63ba2dad7bd86a81e12211e1b3..ac1710e64d9afbda6e9cb9f68ac1302eb38b4661 100644 (file)
@@ -7,11 +7,9 @@ menuconfig PLAT_SPEAR
        default PLAT_SPEAR_SINGLE
        select ARCH_REQUIRE_GPIOLIB
        select ARM_AMBA
-       select CLKDEV_LOOKUP
        select CLKSRC_MMIO
        select COMMON_CLK
        select GENERIC_CLOCKEVENTS
-       select HAVE_CLK
 
 if PLAT_SPEAR
 
index 8fe6f0c464809691c4be22c040ce4d3a3b72c22e..1217fb598cfdc7dacd877e9df8a8fee3dc83ba43 100644 (file)
@@ -7,9 +7,8 @@
  * published by the Free Software Foundation.
  */
 
-#include <linux/clk-provider.h>
-#include <linux/clocksource.h>
 #include <linux/irq.h>
+#include <linux/of_platform.h>
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach/arch.h>
 
@@ -28,11 +27,10 @@ void __init stih41x_l2x0_init(void)
        l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK);
 }
 
-static void __init stih41x_timer_init(void)
+static void __init stih41x_machine_init(void)
 {
-       of_clk_init(NULL);
-       clocksource_of_init();
        stih41x_l2x0_init();
+       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 static const char *stih41x_dt_match[] __initdata = {
@@ -42,7 +40,7 @@ static const char *stih41x_dt_match[] __initdata = {
 };
 
 DT_MACHINE_START(STM, "STiH415/416 SoC with Flattened Device Tree")
-       .init_time      = stih41x_timer_init,
+       .init_machine   = stih41x_machine_init,
        .smp            = smp_ops(sti_smp_ops),
        .dt_compat      = stih41x_dt_match,
 MACHINE_END
index e79fb3469341d1f6907d39b66aa7c08be5f80940..90dda622851073bb2c78453ae20edd7e463ebf16 100644 (file)
@@ -10,7 +10,6 @@
  * warranty of any kind, whether express or implied.
  */
 
-#include <linux/clocksource.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
@@ -20,8 +19,6 @@
 #include <linux/io.h>
 #include <linux/reboot.h>
 
-#include <linux/clk/sunxi.h>
-
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/system_misc.h>
@@ -116,12 +113,6 @@ static void sunxi_setup_restart(void)
        arm_pm_restart = of_id->data;
 }
 
-static void __init sunxi_timer_init(void)
-{
-       sunxi_init_clocks();
-       clocksource_of_init();
-}
-
 static void __init sunxi_dt_init(void)
 {
        sunxi_setup_restart();
@@ -140,6 +131,5 @@ static const char * const sunxi_board_dt_compat[] = {
 
 DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
        .init_machine   = sunxi_dt_init,
-       .init_time      = sunxi_timer_init,
        .dt_compat      = sunxi_board_dt_compat,
 MACHINE_END
index 67a76f2dfb9f62b99351e0e7ecb4d8c877b08d4b..0c2f44aed404532833daf9ea82f4e624ede77825 100644 (file)
@@ -3,7 +3,6 @@ config ARCH_TEGRA
        select ARCH_HAS_CPUFREQ
        select ARCH_REQUIRE_GPIOLIB
        select ARM_GIC
-       select CLKDEV_LOOKUP
        select CLKSRC_MMIO
        select CLKSRC_OF
        select COMMON_CLK
@@ -11,7 +10,6 @@ config ARCH_TEGRA
        select GENERIC_CLOCKEVENTS
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
-       select HAVE_CLK
        select HAVE_SMP
        select MIGHT_HAVE_CACHE_L2X0
        select MIGHT_HAVE_PCI
index 94a119a35af83e013754f1b1e90b6472b8878bc1..58dc91c56ccb03a450ff69ff46f2172f4e7eb606 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/delay.h>
 #include <linux/reboot.h>
 #include <linux/irqchip.h>
-#include <linux/clk-provider.h>
 
 #include <asm/hardware/cache-l2x0.h>
 
@@ -61,8 +60,7 @@ u32 tegra_uart_config[4] = {
 #ifdef CONFIG_OF
 void __init tegra_dt_init_irq(void)
 {
-       of_clk_init(NULL);
-       tegra_pmc_init();
+       tegra_pmc_init_irq();
        tegra_init_irq();
        irqchip_init();
        tegra_legacy_irq_syscore_init();
index 8acb881f7cfe5c8025f4c133cb5a1a60d2ec9181..7916ff91f969fbd5166bddfb7422fade116aa468 100644 (file)
@@ -285,13 +285,10 @@ static const struct of_device_id matches[] __initconst = {
        { }
 };
 
-static void __init tegra_pmc_parse_dt(void)
+void __init tegra_pmc_init_irq(void)
 {
        struct device_node *np;
-       u32 prop;
-       enum tegra_suspend_mode suspend_mode;
-       u32 core_good_time[2] = {0, 0};
-       u32 lp0_vec[2] = {0, 0};
+       u32 val;
 
        np = of_find_matching_node(NULL, matches);
        BUG_ON(!np);
@@ -300,6 +297,26 @@ static void __init tegra_pmc_parse_dt(void)
 
        tegra_pmc_invert_interrupt = of_property_read_bool(np,
                                     "nvidia,invert-interrupt");
+
+       val = tegra_pmc_readl(PMC_CTRL);
+       if (tegra_pmc_invert_interrupt)
+               val |= PMC_CTRL_INTR_LOW;
+       else
+               val &= ~PMC_CTRL_INTR_LOW;
+       tegra_pmc_writel(val, PMC_CTRL);
+}
+
+void __init tegra_pmc_init(void)
+{
+       struct device_node *np;
+       u32 prop;
+       enum tegra_suspend_mode suspend_mode;
+       u32 core_good_time[2] = {0, 0};
+       u32 lp0_vec[2] = {0, 0};
+
+       np = of_find_matching_node(NULL, matches);
+       BUG_ON(!np);
+
        tegra_pclk = of_clk_get_by_name(np, "pclk");
        WARN_ON(IS_ERR(tegra_pclk));
 
@@ -365,17 +382,3 @@ static void __init tegra_pmc_parse_dt(void)
 
        pmc_pm_data.suspend_mode = suspend_mode;
 }
-
-void __init tegra_pmc_init(void)
-{
-       u32 val;
-
-       tegra_pmc_parse_dt();
-
-       val = tegra_pmc_readl(PMC_CTRL);
-       if (tegra_pmc_invert_interrupt)
-               val |= PMC_CTRL_INTR_LOW;
-       else
-               val &= ~PMC_CTRL_INTR_LOW;
-       tegra_pmc_writel(val, PMC_CTRL);
-}
index 549f8c7b762c970530d434c35345c2e2f45472e9..4d5f8f32225ccd39576f15f62efeb4806411e185 100644 (file)
@@ -39,6 +39,7 @@ bool tegra_pmc_cpu_is_powered(int cpuid);
 int tegra_pmc_cpu_power_on(int cpuid);
 int tegra_pmc_cpu_remove_clamping(int cpuid);
 
+void tegra_pmc_init_irq(void);
 void tegra_pmc_init(void);
 
 #endif
index 5b8605547a09113a65daaf65b902d9a6098fe522..2e2192807830c2a076ead399a5fb4c4fdf9b9aff 100644 (file)
@@ -16,7 +16,6 @@
  *
  */
 
-#include <linux/clocksource.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
@@ -44,6 +43,7 @@
 #include "common.h"
 #include "fuse.h"
 #include "iomap.h"
+#include "pmc.h"
 
 static void __init tegra_dt_init(void)
 {
@@ -51,6 +51,8 @@ static void __init tegra_dt_init(void)
        struct soc_device *soc_dev;
        struct device *parent = NULL;
 
+       tegra_pmc_init();
+
        tegra_clocks_apply_init_table();
 
        soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
@@ -119,7 +121,6 @@ DT_MACHINE_START(TEGRA_DT, "NVIDIA Tegra SoC (Flattened Device Tree)")
        .smp            = smp_ops(tegra_smp_ops),
        .init_early     = tegra_init_early,
        .init_irq       = tegra_dt_init_irq,
-       .init_time      = clocksource_of_init,
        .init_machine   = tegra_dt_init,
        .init_late      = tegra_dt_init_late,
        .restart        = tegra_assert_system_reset,
index a1659863bfd5cb650338d6d8919ab0b145da1d57..8e23071bd1b34ff2a47f729c60721a6fa4a9ec5b 100644 (file)
@@ -5,7 +5,6 @@ config ARCH_U300
        select ARM_AMBA
        select ARM_PATCH_PHYS_VIRT
        select ARM_VIC
-       select CLKDEV_LOOKUP
        select CLKSRC_MMIO
        select CLKSRC_OF
        select COMMON_CLK
index 99a28d62829742d9103764c47abcb5ff24894fbf..c67f8ad5ccd5d89eb087fbbf3a4ff75cc5039775 100644 (file)
@@ -1,37 +1,32 @@
 config ARCH_U8500
        bool "ST-Ericsson U8500 Series" if ARCH_MULTI_V7
        depends on MMU
+       select AB8500_CORE
+       select ABX500_CORE
        select ARCH_HAS_CPUFREQ
        select ARCH_REQUIRE_GPIOLIB
        select ARM_AMBA
-       select CLKDEV_LOOKUP
+       select ARM_ERRATA_754322
+       select ARM_ERRATA_764369 if SMP
+       select ARM_GIC
+       select CACHE_L2X0
+       select CLKSRC_NOMADIK_MTU
+       select COMMON_CLK
        select CPU_V7
        select GENERIC_CLOCKEVENTS
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
        select HAVE_SMP
        select MIGHT_HAVE_CACHE_L2X0
+       select PINCTRL
+       select PINCTRL_ABX500
+       select PINCTRL_NOMADIK
+       select PL310_ERRATA_753970 if CACHE_PL310
        help
          Support for ST-Ericsson's Ux500 architecture
 
 if ARCH_U8500
 
-config UX500_SOC_COMMON
-       bool
-       default y
-       select ABX500_CORE
-       select AB8500_CORE
-       select ARM_ERRATA_754322
-       select ARM_ERRATA_764369 if SMP
-       select ARM_GIC
-       select CACHE_L2X0
-       select CLKSRC_NOMADIK_MTU
-       select COMMON_CLK
-       select PINCTRL
-       select PINCTRL_NOMADIK
-       select PINCTRL_ABX500
-       select PL310_ERRATA_753970 if CACHE_PL310
-
 config UX500_SOC_DB8500
        bool
        select CPU_FREQ_TABLE if CPU_FREQ
index fe1f3e26b88b114b2c47ecb082b358a6a220bea7..616b96e86ad4fb067395ad4d2411cb8befcb92b8 100644 (file)
@@ -2,14 +2,11 @@
 # Makefile for the linux kernel, U8500 machine.
 #
 
-obj-y                          := cpu.o devices.o devices-common.o \
-                                  id.o usb.o timer.o pm.o
+obj-y                          := cpu.o devices.o id.o timer.o pm.o
 obj-$(CONFIG_CACHE_L2X0)       += cache-l2x0.o
 obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o
 obj-$(CONFIG_MACH_MOP500)      += board-mop500.o board-mop500-sdi.o \
                                board-mop500-regulators.o \
-                               board-mop500-uib.o board-mop500-stuib.o \
-                               board-mop500-u8500uib.o \
                                board-mop500-pins.o \
                                board-mop500-audio.o
 obj-$(CONFIG_SMP)              += platsmp.o headsmp.o
index ec0807247e60cb1a40d1f4f8dbdb23b266932b31..154e15f59702c1010af74cce8fed51077c78e111 100644 (file)
@@ -68,40 +68,6 @@ static struct stedma40_chan_cfg msp2_dma_tx = {
        .phy_channel = 1,
 };
 
-static struct platform_device *db8500_add_msp_i2s(struct device *parent,
-                       int id,
-                       resource_size_t base, int irq,
-                       struct msp_i2s_platform_data *pdata)
-{
-       struct platform_device *pdev;
-       struct resource res[] = {
-               DEFINE_RES_MEM(base, SZ_4K),
-               DEFINE_RES_IRQ(irq),
-       };
-
-       pr_info("Register platform-device 'ux500-msp-i2s', id %d, irq %d\n",
-               id, irq);
-       pdev = platform_device_register_resndata(parent, "ux500-msp-i2s", id,
-                                               res, ARRAY_SIZE(res),
-                                               pdata, sizeof(*pdata));
-       if (!pdev) {
-               pr_err("Failed to register platform-device 'ux500-msp-i2s.%d'!\n",
-                       id);
-               return NULL;
-       }
-
-       return pdev;
-}
-
-/* Platform device for ASoC MOP500 machine */
-static struct platform_device snd_soc_mop500 = {
-       .name = "snd-soc-mop500",
-       .id = 0,
-       .dev = {
-               .platform_data = NULL,
-       },
-};
-
 struct msp_i2s_platform_data msp2_platform_data = {
        .id = MSP_I2S_2,
        .msp_i2s_dma_rx = &msp2_dma_rx,
@@ -113,19 +79,3 @@ struct msp_i2s_platform_data msp3_platform_data = {
        .msp_i2s_dma_rx = &msp1_dma_rx,
        .msp_i2s_dma_tx = NULL,
 };
-
-void mop500_audio_init(struct device *parent)
-{
-       pr_info("%s: Register platform-device 'snd-soc-mop500'.\n", __func__);
-       platform_device_register(&snd_soc_mop500);
-
-       pr_info("Initialize MSP I2S-devices.\n");
-       db8500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0,
-                          &msp0_platform_data);
-       db8500_add_msp_i2s(parent, 1, U8500_MSP1_BASE, IRQ_DB8500_MSP1,
-                          &msp1_platform_data);
-       db8500_add_msp_i2s(parent, 2, U8500_MSP2_BASE, IRQ_DB8500_MSP2,
-                          &msp2_platform_data);
-       db8500_add_msp_i2s(parent, 3, U8500_MSP3_BASE, IRQ_DB8500_MSP1,
-                          &msp3_platform_data);
-}
index b3e61a38e5c8aee776c5eff883b770d80529fe10..26600a1c53190ad3ae3724456a17dd7b8a35009d 100644 (file)
@@ -65,18 +65,6 @@ struct mmci_platform_data mop500_sdi0_data = {
 #endif
 };
 
-static void sdi0_configure(struct device *parent)
-{
-       /* Add the device, force v2 to subrevision 1 */
-       db8500_add_sdi0(parent, &mop500_sdi0_data, U8500_SDI_V2_PERIPHID);
-}
-
-void mop500_sdi_tc35892_init(struct device *parent)
-{
-       mop500_sdi0_data.gpio_cd = GPIO_SDMMC_CD;
-       sdi0_configure(parent);
-}
-
 /*
  * SDI1 (SDIO WLAN)
  */
@@ -178,42 +166,3 @@ struct mmci_platform_data mop500_sdi4_data = {
        .dma_tx_param   = &mop500_sdi4_dma_cfg_tx,
 #endif
 };
-
-void __init mop500_sdi_init(struct device *parent)
-{
-       /* PoP:ed eMMC */
-       db8500_add_sdi2(parent, &mop500_sdi2_data, U8500_SDI_V2_PERIPHID);
-       /* On-board eMMC */
-       db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
-
-       /*
-        * On boards with the TC35892 GPIO expander, sdi0 will finally
-        * be added when the TC35892 initializes and calls
-        * mop500_sdi_tc35892_init() above.
-        */
-}
-
-void __init snowball_sdi_init(struct device *parent)
-{
-       /* On Snowball MMC_CAP_SD_HIGHSPEED isn't supported (Hardware issue?) */
-       mop500_sdi0_data.capabilities &= ~MMC_CAP_SD_HIGHSPEED;
-       /* On-board eMMC */
-       db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
-       /* External Micro SD slot */
-       mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO;
-       mop500_sdi0_data.cd_invert = true;
-       sdi0_configure(parent);
-}
-
-void __init hrefv60_sdi_init(struct device *parent)
-{
-       /* PoP:ed eMMC */
-       db8500_add_sdi2(parent, &mop500_sdi2_data, U8500_SDI_V2_PERIPHID);
-       /* On-board eMMC */
-       db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
-       /* External Micro SD slot */
-       mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO;
-       sdi0_configure(parent);
-       /* WLAN SDIO channel */
-       db8500_add_sdi1(parent, &mop500_sdi1_data, U8500_SDI_V2_PERIPHID);
-}
diff --git a/arch/arm/mach-ux500/board-mop500-stuib.c b/arch/arm/mach-ux500/board-mop500-stuib.c
deleted file mode 100644 (file)
index 7e1f294..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * License terms: GNU General Public License (GPL), version 2
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/mfd/stmpe.h>
-#include <linux/input/bu21013.h>
-#include <linux/gpio.h>
-#include <linux/interrupt.h>
-#include <linux/i2c.h>
-#include <linux/input/matrix_keypad.h>
-#include <asm/mach-types.h>
-
-#include "board-mop500.h"
-
-/* STMPE/SKE keypad use this key layout */
-static const unsigned int mop500_keymap[] = {
-       KEY(2, 5, KEY_END),
-       KEY(4, 1, KEY_POWER),
-       KEY(3, 5, KEY_VOLUMEDOWN),
-       KEY(1, 3, KEY_3),
-       KEY(5, 2, KEY_RIGHT),
-       KEY(5, 0, KEY_9),
-
-       KEY(0, 5, KEY_MENU),
-       KEY(7, 6, KEY_ENTER),
-       KEY(4, 5, KEY_0),
-       KEY(6, 7, KEY_2),
-       KEY(3, 4, KEY_UP),
-       KEY(3, 3, KEY_DOWN),
-
-       KEY(6, 4, KEY_SEND),
-       KEY(6, 2, KEY_BACK),
-       KEY(4, 2, KEY_VOLUMEUP),
-       KEY(5, 5, KEY_1),
-       KEY(4, 3, KEY_LEFT),
-       KEY(3, 2, KEY_7),
-};
-
-static const struct matrix_keymap_data mop500_keymap_data = {
-       .keymap         = mop500_keymap,
-       .keymap_size    = ARRAY_SIZE(mop500_keymap),
-};
-/*
- * STMPE1601
- */
-static struct stmpe_keypad_platform_data stmpe1601_keypad_data = {
-       .debounce_ms    = 64,
-       .scan_count     = 8,
-       .no_autorepeat  = true,
-       .keymap_data    = &mop500_keymap_data,
-};
-
-static struct stmpe_platform_data stmpe1601_data = {
-       .id             = 1,
-       .blocks         = STMPE_BLOCK_KEYPAD,
-       .irq_trigger    = IRQF_TRIGGER_FALLING,
-       .irq_base       = MOP500_STMPE1601_IRQ(0),
-       .keypad         = &stmpe1601_keypad_data,
-       .autosleep      = true,
-       .autosleep_timeout = 1024,
-};
-
-static struct i2c_board_info __initdata mop500_i2c0_devices_stuib[] = {
-       {
-               I2C_BOARD_INFO("stmpe1601", 0x40),
-               .irq = NOMADIK_GPIO_TO_IRQ(218),
-               .platform_data = &stmpe1601_data,
-               .flags = I2C_CLIENT_WAKE,
-       },
-};
-
-/*
- * BU21013 ROHM touchscreen interface on the STUIBs
- */
-
-#define TOUCH_GPIO_PIN  84
-
-#define TOUCH_XMAX     384
-#define TOUCH_YMAX     704
-
-#define PRCMU_CLOCK_OCR                0x1CC
-#define TSC_EXT_CLOCK_9_6MHZ   0x840000
-
-static struct bu21013_platform_device tsc_plat_device = {
-       .touch_pin = TOUCH_GPIO_PIN,
-       .touch_x_max = TOUCH_XMAX,
-       .touch_y_max = TOUCH_YMAX,
-       .ext_clk = false,
-       .x_flip = false,
-       .y_flip = true,
-};
-
-static struct i2c_board_info __initdata u8500_i2c3_devices_stuib[] = {
-       {
-               I2C_BOARD_INFO("bu21013_tp", 0x5C),
-               .platform_data = &tsc_plat_device,
-       },
-       {
-               I2C_BOARD_INFO("bu21013_tp", 0x5D),
-               .platform_data = &tsc_plat_device,
-       },
-};
-
-void __init mop500_stuib_init(void)
-{
-       if (machine_is_hrefv60())
-               tsc_plat_device.cs_pin = HREFV60_TOUCH_RST_GPIO;
-       else
-               tsc_plat_device.cs_pin = GPIO_BU21013_CS;
-
-       mop500_uib_i2c_add(0, mop500_i2c0_devices_stuib,
-                       ARRAY_SIZE(mop500_i2c0_devices_stuib));
-
-       mop500_uib_i2c_add(3, u8500_i2c3_devices_stuib,
-                       ARRAY_SIZE(u8500_i2c3_devices_stuib));
-}
diff --git a/arch/arm/mach-ux500/board-mop500-u8500uib.c b/arch/arm/mach-ux500/board-mop500-u8500uib.c
deleted file mode 100644 (file)
index d397c19..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * Board data for the U8500 UIB, also known as the New UIB
- * License terms: GNU General Public License (GPL), version 2
- */
-#include <linux/gpio.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/i2c.h>
-#include <linux/interrupt.h>
-#include <linux/mfd/tc3589x.h>
-#include <linux/input/matrix_keypad.h>
-
-#include "irqs.h"
-
-#include "board-mop500.h"
-
-static struct i2c_board_info __initdata mop500_i2c3_devices_u8500[] = {
-       {
-               I2C_BOARD_INFO("synaptics_rmi4_i2c", 0x4B),
-               .irq = NOMADIK_GPIO_TO_IRQ(84),
-       },
-};
-
-/*
- * TC35893
- */
-static const unsigned int u8500_keymap[] = {
-       KEY(3, 1, KEY_END),
-       KEY(4, 1, KEY_POWER),
-       KEY(6, 4, KEY_VOLUMEDOWN),
-       KEY(4, 2, KEY_EMAIL),
-       KEY(3, 3, KEY_RIGHT),
-       KEY(2, 5, KEY_BACKSPACE),
-
-       KEY(6, 7, KEY_MENU),
-       KEY(5, 0, KEY_ENTER),
-       KEY(4, 3, KEY_0),
-       KEY(3, 4, KEY_DOT),
-       KEY(5, 2, KEY_UP),
-       KEY(3, 5, KEY_DOWN),
-
-       KEY(4, 5, KEY_SEND),
-       KEY(0, 5, KEY_BACK),
-       KEY(6, 2, KEY_VOLUMEUP),
-       KEY(1, 3, KEY_SPACE),
-       KEY(7, 6, KEY_LEFT),
-       KEY(5, 5, KEY_SEARCH),
-};
-
-static struct matrix_keymap_data u8500_keymap_data = {
-       .keymap         = u8500_keymap,
-       .keymap_size    = ARRAY_SIZE(u8500_keymap),
-};
-
-static struct tc3589x_keypad_platform_data tc35893_data = {
-       .krow = TC_KPD_ROWS,
-       .kcol = TC_KPD_COLUMNS,
-       .debounce_period = TC_KPD_DEBOUNCE_PERIOD,
-       .settle_time = TC_KPD_SETTLE_TIME,
-       .irqtype = IRQF_TRIGGER_FALLING,
-       .enable_wakeup = true,
-       .keymap_data    = &u8500_keymap_data,
-       .no_autorepeat  = true,
-};
-
-static struct tc3589x_platform_data tc3589x_keypad_data = {
-       .block = TC3589x_BLOCK_KEYPAD,
-       .keypad = &tc35893_data,
-       .irq_base = MOP500_EGPIO_IRQ_BASE,
-};
-
-static struct i2c_board_info __initdata mop500_i2c0_devices_u8500[] = {
-       {
-               I2C_BOARD_INFO("tc3589x", 0x44),
-               .platform_data = &tc3589x_keypad_data,
-               .irq = NOMADIK_GPIO_TO_IRQ(218),
-               .flags = I2C_CLIENT_WAKE,
-       },
-};
-
-
-void __init mop500_u8500uib_init(void)
-{
-       mop500_uib_i2c_add(3, mop500_i2c3_devices_u8500,
-                       ARRAY_SIZE(mop500_i2c3_devices_u8500));
-
-       mop500_uib_i2c_add(0, mop500_i2c0_devices_u8500,
-                       ARRAY_SIZE(mop500_i2c0_devices_u8500));
-
-}
diff --git a/arch/arm/mach-ux500/board-mop500-uib.c b/arch/arm/mach-ux500/board-mop500-uib.c
deleted file mode 100644 (file)
index bdaa422..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
- * License terms: GNU General Public License (GPL), version 2
- */
-
-#define pr_fmt(fmt)    "mop500-uib: " fmt
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/i2c.h>
-
-#include "board-mop500.h"
-#include "id.h"
-
-enum mop500_uib {
-       STUIB,
-       U8500UIB,
-};
-
-struct uib {
-       const char *name;
-       const char *option;
-       void (*init)(void);
-};
-
-static struct uib __initdata mop500_uibs[] = {
-       [STUIB] = {
-               .name   = "ST-UIB",
-               .option = "stuib",
-               .init   = mop500_stuib_init,
-       },
-       [U8500UIB] = {
-               .name   = "U8500-UIB",
-               .option = "u8500uib",
-               .init   = mop500_u8500uib_init,
-       },
-};
-
-static struct uib *mop500_uib;
-
-static int __init mop500_uib_setup(char *str)
-{
-       int i;
-
-       for (i = 0; i < ARRAY_SIZE(mop500_uibs); i++) {
-               struct uib *uib = &mop500_uibs[i];
-
-               if (!strcmp(str, uib->option)) {
-                       mop500_uib = uib;
-                       break;
-               }
-       }
-
-       if (i == ARRAY_SIZE(mop500_uibs))
-               pr_err("invalid uib= option (%s)\n", str);
-
-       return 1;
-}
-__setup("uib=", mop500_uib_setup);
-
-/*
- * The UIBs are detected after the I2C host controllers are registered, so
- * i2c_register_board_info() can't be used.
- */
-void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info,
-               unsigned n)
-{
-       struct i2c_adapter *adap;
-       struct i2c_client *client;
-       int i;
-
-       adap = i2c_get_adapter(busnum);
-       if (!adap) {
-               pr_err("failed to get adapter i2c%d\n", busnum);
-               return;
-       }
-
-       for (i = 0; i < n; i++) {
-               client = i2c_new_device(adap, &info[i]);
-               if (!client)
-                       pr_err("failed to register %s to i2c%d\n",
-                                       info[i].type, busnum);
-       }
-
-       i2c_put_adapter(adap);
-}
-
-static void __init __mop500_uib_init(struct uib *uib, const char *why)
-{
-       pr_info("%s (%s)\n", uib->name, why);
-       uib->init();
-}
-
-/*
- * Detect the UIB attached based on the presence or absence of i2c devices.
- */
-int __init mop500_uib_init(void)
-{
-       struct uib *uib = mop500_uib;
-       struct i2c_adapter *i2c0;
-       int ret;
-
-       if (!cpu_is_u8500_family())
-               return -ENODEV;
-
-       if (uib) {
-               __mop500_uib_init(uib, "from uib= boot argument");
-               return 0;
-       }
-
-       i2c0 = i2c_get_adapter(0);
-       if (!i2c0) {
-               __mop500_uib_init(&mop500_uibs[STUIB],
-                               "fallback, could not get i2c0");
-               return -ENODEV;
-       }
-
-       /* U8500-UIB has the TC35893 at 0x44 on I2C0, the ST-UIB doesn't. */
-       ret = i2c_smbus_xfer(i2c0, 0x44, 0, I2C_SMBUS_WRITE, 0,
-                       I2C_SMBUS_QUICK, NULL);
-       i2c_put_adapter(i2c0);
-
-       if (ret == 0)
-               uib = &mop500_uibs[U8500UIB];
-       else
-               uib = &mop500_uibs[STUIB];
-
-       __mop500_uib_init(uib, "detected");
-
-       return 0;
-}
index ad0806eff7624da302513909ab41a3af400ed820..514d40b625a4604c16c179b9562aa54b84f4d27e 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/io.h>
-#include <linux/i2c.h>
-#include <linux/platform_data/i2c-nomadik.h>
 #include <linux/platform_data/db8500_thermal.h>
-#include <linux/gpio.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/pl022.h>
-#include <linux/amba/serial.h>
-#include <linux/spi/spi.h>
 #include <linux/mfd/abx500/ab8500.h>
 #include <linux/regulator/ab8500.h>
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/driver.h>
-#include <linux/regulator/gpio-regulator.h>
-#include <linux/mfd/tc3589x.h>
 #include <linux/mfd/tps6105x.h>
-#include <linux/mfd/abx500/ab8500-gpio.h>
-#include <linux/mfd/abx500/ab8500-codec.h>
 #include <linux/platform_data/leds-lp55xx.h>
 #include <linux/input.h>
-#include <linux/smsc911x.h>
-#include <linux/gpio_keys.h>
 #include <linux/delay.h>
 #include <linux/leds.h>
 #include <linux/pinctrl/consumer.h>
@@ -46,7 +35,6 @@
 #include "setup.h"
 #include "devices.h"
 #include "irqs.h"
-#include <linux/platform_data/crypto-ux500.h>
 
 #include "ste-dma40-db8500.h"
 #include "db8500-regs.h"
 #include "board-mop500.h"
 #include "board-mop500-regulators.h"
 
-static struct gpio_led snowball_led_array[] = {
-       {
-               .name = "user_led",
-               .default_trigger = "heartbeat",
-               .gpio = 142,
-       },
-};
-
-static struct gpio_led_platform_data snowball_led_data = {
-       .leds = snowball_led_array,
-       .num_leds = ARRAY_SIZE(snowball_led_array),
-};
-
-static struct platform_device snowball_led_dev = {
-       .name = "leds-gpio",
-       .dev = {
-               .platform_data = &snowball_led_data,
-       },
-};
-
-static struct fixed_voltage_config snowball_gpio_en_3v3_data = {
-       .supply_name            = "EN-3V3",
-       .gpio                   = SNOWBALL_EN_3V3_ETH_GPIO,
-       .microvolts             = 3300000,
-       .enable_high            = 1,
-       .init_data              = &gpio_en_3v3_regulator,
-       .startup_delay          = 5000, /* 1200us */
-};
-
-static struct platform_device snowball_gpio_en_3v3_regulator_dev = {
-       .name   = "reg-fixed-voltage",
-       .id     = 1,
-       .dev    = {
-               .platform_data  = &snowball_gpio_en_3v3_data,
-       },
-};
-
-/* Dynamically populated. */
-static struct gpio sdi0_reg_gpios[] = {
-       { 0, GPIOF_OUT_INIT_LOW, "mmci_vsel" },
-};
-
-static struct gpio_regulator_state sdi0_reg_states[] = {
-       { .value = 2900000, .gpios = (0 << 0) },
-       { .value = 1800000, .gpios = (1 << 0) },
-};
-
-static struct gpio_regulator_config sdi0_reg_info = {
-       .supply_name            = "ext-mmc-level-shifter",
-       .gpios                  = sdi0_reg_gpios,
-       .nr_gpios               = ARRAY_SIZE(sdi0_reg_gpios),
-       .states                 = sdi0_reg_states,
-       .nr_states              = ARRAY_SIZE(sdi0_reg_states),
-       .type                   = REGULATOR_VOLTAGE,
-       .enable_high            = 1,
-       .enabled_at_boot        = 0,
-       .init_data              = &sdi0_reg_init_data,
-       .startup_delay          = 100,
-};
-
-static struct platform_device sdi0_regulator = {
-       .name = "gpio-regulator",
-       .id   = -1,
-       .dev  = {
-               .platform_data = &sdi0_reg_info,
-       },
-};
-
-static struct abx500_gpio_platform_data ab8500_gpio_pdata = {
-       .gpio_base              = MOP500_AB8500_PIN_GPIO(1),
-};
-
-/* ab8500-codec */
-static struct ab8500_codec_platform_data ab8500_codec_pdata = {
-       .amics =  {
-               .mic1_type = AMIC_TYPE_DIFFERENTIAL,
-               .mic2_type = AMIC_TYPE_DIFFERENTIAL,
-               .mic1a_micbias = AMIC_MICBIAS_VAMIC1,
-               .mic1b_micbias = AMIC_MICBIAS_VAMIC1,
-               .mic2_micbias = AMIC_MICBIAS_VAMIC2
-       },
-       .ear_cmv = EAR_CMV_0_95V
-};
-
-static struct gpio_keys_button snowball_key_array[] = {
-       {
-               .gpio           = 32,
-               .type           = EV_KEY,
-               .code           = KEY_1,
-               .desc           = "userpb",
-               .active_low     = 1,
-               .debounce_interval = 50,
-               .wakeup         = 1,
-       },
-       {
-               .gpio           = 151,
-               .type           = EV_KEY,
-               .code           = KEY_2,
-               .desc           = "extkb1",
-               .active_low     = 1,
-               .debounce_interval = 50,
-               .wakeup         = 1,
-       },
-       {
-               .gpio           = 152,
-               .type           = EV_KEY,
-               .code           = KEY_3,
-               .desc           = "extkb2",
-               .active_low     = 1,
-               .debounce_interval = 50,
-               .wakeup         = 1,
-       },
-       {
-               .gpio           = 161,
-               .type           = EV_KEY,
-               .code           = KEY_4,
-               .desc           = "extkb3",
-               .active_low     = 1,
-               .debounce_interval = 50,
-               .wakeup         = 1,
-       },
-       {
-               .gpio           = 162,
-               .type           = EV_KEY,
-               .code           = KEY_5,
-               .desc           = "extkb4",
-               .active_low     = 1,
-               .debounce_interval = 50,
-               .wakeup         = 1,
-       },
-};
-
-static struct gpio_keys_platform_data snowball_key_data = {
-       .buttons        = snowball_key_array,
-       .nbuttons       = ARRAY_SIZE(snowball_key_array),
-};
-
-static struct platform_device snowball_key_dev = {
-       .name           = "gpio-keys",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &snowball_key_data,
-       }
-};
-
-static struct smsc911x_platform_config snowball_sbnet_cfg = {
-       .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
-       .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
-       .flags = SMSC911X_USE_16BIT | SMSC911X_FORCE_INTERNAL_PHY,
-       .shift = 1,
-};
-
-static struct resource sbnet_res[] = {
-       {
-               .name = "smsc911x-memory",
-               .start = (0x5000 << 16),
-               .end  =  (0x5000 << 16) + 0xffff,
-               .flags = IORESOURCE_MEM,
-       },
-       {
-               .start = NOMADIK_GPIO_TO_IRQ(140),
-               .end = NOMADIK_GPIO_TO_IRQ(140),
-               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
-       },
-};
-
-static struct platform_device snowball_sbnet_dev = {
-       .name           = "smsc911x",
-       .num_resources  = ARRAY_SIZE(sbnet_res),
-       .resource       = sbnet_res,
-       .dev            = {
-               .platform_data = &snowball_sbnet_cfg,
-       },
-};
-
 struct ab8500_platform_data ab8500_platdata = {
        .irq_base       = MOP500_AB8500_IRQ_BASE,
        .regulator      = &ab8500_regulator_plat_data,
-       .gpio           = &ab8500_gpio_pdata,
-       .codec          = &ab8500_codec_pdata,
-};
-
-static struct platform_device u8500_cpufreq_cooling_device = {
-       .name           = "db8500-cpufreq-cooling",
-};
-
-/*
- * TPS61052
- */
-
-static struct tps6105x_platform_data mop500_tps61052_data = {
-       .mode = TPS6105X_MODE_VOLTAGE,
-       .regulator_data = &tps61052_regulator,
-};
-
-/*
- * TC35892
- */
-
-static void mop500_tc35892_init(struct tc3589x *tc3589x, unsigned int base)
-{
-       struct device *parent = NULL;
-#if 0
-       /* FIXME: Is the sdi actually part of tc3589x? */
-       parent = tc3589x->dev;
-#endif
-       mop500_sdi_tc35892_init(parent);
-}
-
-static struct tc3589x_gpio_platform_data mop500_tc35892_gpio_data = {
-       .gpio_base      = MOP500_EGPIO(0),
-       .setup          = mop500_tc35892_init,
-};
-
-static struct tc3589x_platform_data mop500_tc35892_data = {
-       .block          = TC3589x_BLOCK_GPIO,
-       .gpio           = &mop500_tc35892_gpio_data,
-       .irq_base       = MOP500_EGPIO_IRQ_BASE,
-};
-
-static struct lp55xx_led_config lp5521_pri_led[] = {
-       [0] = {
-              .chan_nr = 0,
-              .led_current = 0x2f,
-              .max_current = 0x5f,
-       },
-       [1] = {
-              .chan_nr = 1,
-              .led_current = 0x2f,
-              .max_current = 0x5f,
-       },
-       [2] = {
-              .chan_nr = 2,
-              .led_current = 0x2f,
-              .max_current = 0x5f,
-       },
-};
-
-static struct lp55xx_platform_data __initdata lp5521_pri_data = {
-       .label = "lp5521_pri",
-       .led_config     = &lp5521_pri_led[0],
-       .num_channels   = 3,
-       .clock_mode     = LP55XX_CLOCK_EXT,
-};
-
-static struct lp55xx_led_config lp5521_sec_led[] = {
-       [0] = {
-              .chan_nr = 0,
-              .led_current = 0x2f,
-              .max_current = 0x5f,
-       },
-       [1] = {
-              .chan_nr = 1,
-              .led_current = 0x2f,
-              .max_current = 0x5f,
-       },
-       [2] = {
-              .chan_nr = 2,
-              .led_current = 0x2f,
-              .max_current = 0x5f,
-       },
-};
-
-static struct lp55xx_platform_data __initdata lp5521_sec_data = {
-       .label = "lp5521_sec",
-       .led_config     = &lp5521_sec_led[0],
-       .num_channels   = 3,
-       .clock_mode     = LP55XX_CLOCK_EXT,
-};
-
-/* I2C0 devices only available on the first HREF/MOP500 */
-static struct i2c_board_info __initdata mop500_i2c0_devices[] = {
-       {
-               I2C_BOARD_INFO("tc3589x", 0x42),
-               .irq            = NOMADIK_GPIO_TO_IRQ(217),
-               .platform_data  = &mop500_tc35892_data,
-       },
-       {
-               I2C_BOARD_INFO("tps61052", 0x33),
-               .platform_data  = &mop500_tps61052_data,
-       },
-};
-
-static struct i2c_board_info __initdata mop500_i2c2_devices[] = {
-       {
-               /* lp5521 LED driver, 1st device */
-               I2C_BOARD_INFO("lp5521", 0x33),
-               .platform_data = &lp5521_pri_data,
-       },
-       {
-               /* lp5521 LED driver, 2st device */
-               I2C_BOARD_INFO("lp5521", 0x34),
-               .platform_data = &lp5521_sec_data,
-       },
-       {
-               /* Light sensor Rohm BH1780GLI */
-               I2C_BOARD_INFO("bh1780", 0x29),
-       },
-};
-
-static int __init mop500_i2c_board_init(void)
-{
-       if (machine_is_u8500())
-               mop500_uib_i2c_add(0, mop500_i2c0_devices,
-                                  ARRAY_SIZE(mop500_i2c0_devices));
-       mop500_uib_i2c_add(2, mop500_i2c2_devices,
-                          ARRAY_SIZE(mop500_i2c2_devices));
-       return 0;
-}
-device_initcall(mop500_i2c_board_init);
-
-static void __init mop500_i2c_init(struct device *parent)
-{
-       db8500_add_i2c0(parent, NULL);
-       db8500_add_i2c1(parent, NULL);
-       db8500_add_i2c2(parent, NULL);
-       db8500_add_i2c3(parent, NULL);
-}
-
-static struct gpio_keys_button mop500_gpio_keys[] = {
-       {
-               .desc                   = "SFH7741 Proximity Sensor",
-               .type                   = EV_SW,
-               .code                   = SW_FRONT_PROXIMITY,
-               .active_low             = 0,
-               .can_disable            = 1,
-       }
-};
-
-static struct regulator *prox_regulator;
-static int mop500_prox_activate(struct device *dev);
-static void mop500_prox_deactivate(struct device *dev);
-
-static struct gpio_keys_platform_data mop500_gpio_keys_data = {
-       .buttons        = mop500_gpio_keys,
-       .nbuttons       = ARRAY_SIZE(mop500_gpio_keys),
-       .enable         = mop500_prox_activate,
-       .disable        = mop500_prox_deactivate,
-};
-
-static struct platform_device mop500_gpio_keys_device = {
-       .name   = "gpio-keys",
-       .id     = 0,
-       .dev    = {
-               .platform_data  = &mop500_gpio_keys_data,
-       },
-};
-
-static int mop500_prox_activate(struct device *dev)
-{
-       prox_regulator = regulator_get(&mop500_gpio_keys_device.dev,
-                                               "vcc");
-       if (IS_ERR(prox_regulator)) {
-               dev_err(&mop500_gpio_keys_device.dev,
-                       "no regulator\n");
-               return PTR_ERR(prox_regulator);
-       }
-
-       return regulator_enable(prox_regulator);
-}
-
-static void mop500_prox_deactivate(struct device *dev)
-{
-       regulator_disable(prox_regulator);
-       regulator_put(prox_regulator);
-}
-
-static struct cryp_platform_data u8500_cryp1_platform_data = {
-               .mem_to_engine = {
-                               .dir = DMA_MEM_TO_DEV,
-                               .dev_type = DB8500_DMA_DEV48_CAC1,
-                               .mode = STEDMA40_MODE_LOGICAL,
-               },
-               .engine_to_mem = {
-                               .dir = DMA_DEV_TO_MEM,
-                               .dev_type = DB8500_DMA_DEV48_CAC1,
-                               .mode = STEDMA40_MODE_LOGICAL,
-               }
-};
-
-static struct stedma40_chan_cfg u8500_hash_dma_cfg_tx = {
-               .dir = DMA_MEM_TO_DEV,
-               .dev_type = DB8500_DMA_DEV50_HAC1_TX,
-               .mode = STEDMA40_MODE_LOGICAL,
-};
-
-static struct hash_platform_data u8500_hash1_platform_data = {
-               .mem_to_engine = &u8500_hash_dma_cfg_tx,
-               .dma_filter = stedma40_filter,
-};
-
-/* add any platform devices here - TODO */
-static struct platform_device *mop500_platform_devs[] __initdata = {
-       &mop500_gpio_keys_device,
-       &sdi0_regulator,
 };
 
 #ifdef CONFIG_STE_DMA40
@@ -480,236 +76,3 @@ struct pl022_ssp_controller ssp0_plat = {
         */
        .num_chipselect = 5,
 };
-
-static void __init mop500_spi_init(struct device *parent)
-{
-       db8500_add_ssp0(parent, &ssp0_plat);
-}
-
-#ifdef CONFIG_STE_DMA40
-static struct stedma40_chan_cfg uart0_dma_cfg_rx = {
-       .mode = STEDMA40_MODE_LOGICAL,
-       .dir = DMA_DEV_TO_MEM,
-       .dev_type = DB8500_DMA_DEV13_UART0,
-};
-
-static struct stedma40_chan_cfg uart0_dma_cfg_tx = {
-       .mode = STEDMA40_MODE_LOGICAL,
-       .dir = DMA_MEM_TO_DEV,
-       .dev_type = DB8500_DMA_DEV13_UART0,
-};
-
-static struct stedma40_chan_cfg uart1_dma_cfg_rx = {
-       .mode = STEDMA40_MODE_LOGICAL,
-       .dir = DMA_DEV_TO_MEM,
-       .dev_type = DB8500_DMA_DEV12_UART1,
-};
-
-static struct stedma40_chan_cfg uart1_dma_cfg_tx = {
-       .mode = STEDMA40_MODE_LOGICAL,
-       .dir = DMA_MEM_TO_DEV,
-       .dev_type = DB8500_DMA_DEV12_UART1,
-};
-
-static struct stedma40_chan_cfg uart2_dma_cfg_rx = {
-       .mode = STEDMA40_MODE_LOGICAL,
-       .dir = DMA_DEV_TO_MEM,
-       .dev_type = DB8500_DMA_DEV11_UART2,
-};
-
-static struct stedma40_chan_cfg uart2_dma_cfg_tx = {
-       .mode = STEDMA40_MODE_LOGICAL,
-       .dir = DMA_MEM_TO_DEV,
-       .dev_type = DB8500_DMA_DEV11_UART2,
-};
-#endif
-
-struct amba_pl011_data uart0_plat = {
-#ifdef CONFIG_STE_DMA40
-       .dma_filter = stedma40_filter,
-       .dma_rx_param = &uart0_dma_cfg_rx,
-       .dma_tx_param = &uart0_dma_cfg_tx,
-#endif
-};
-
-struct amba_pl011_data uart1_plat = {
-#ifdef CONFIG_STE_DMA40
-       .dma_filter = stedma40_filter,
-       .dma_rx_param = &uart1_dma_cfg_rx,
-       .dma_tx_param = &uart1_dma_cfg_tx,
-#endif
-};
-
-struct amba_pl011_data uart2_plat = {
-#ifdef CONFIG_STE_DMA40
-       .dma_filter = stedma40_filter,
-       .dma_rx_param = &uart2_dma_cfg_rx,
-       .dma_tx_param = &uart2_dma_cfg_tx,
-#endif
-};
-
-static void __init mop500_uart_init(struct device *parent)
-{
-       db8500_add_uart0(parent, &uart0_plat);
-       db8500_add_uart1(parent, &uart1_plat);
-       db8500_add_uart2(parent, &uart2_plat);
-}
-
-static void __init u8500_cryp1_hash1_init(struct device *parent)
-{
-       db8500_add_cryp1(parent, &u8500_cryp1_platform_data);
-       db8500_add_hash1(parent, &u8500_hash1_platform_data);
-}
-
-static struct platform_device *snowball_platform_devs[] __initdata = {
-       &snowball_led_dev,
-       &snowball_key_dev,
-       &snowball_sbnet_dev,
-       &snowball_gpio_en_3v3_regulator_dev,
-       &u8500_cpufreq_cooling_device,
-       &sdi0_regulator,
-};
-
-static void __init mop500_init_machine(void)
-{
-       struct device *parent = NULL;
-       int i;
-
-       platform_device_register(&db8500_prcmu_device);
-       mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
-
-       sdi0_reg_info.enable_gpio = GPIO_SDMMC_EN;
-       sdi0_reg_info.gpios[0].gpio = GPIO_SDMMC_1V8_3V_SEL;
-
-       mop500_pinmaps_init();
-       parent = u8500_init_devices();
-
-       for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
-               mop500_platform_devs[i]->dev.parent = parent;
-
-       platform_add_devices(mop500_platform_devs,
-                       ARRAY_SIZE(mop500_platform_devs));
-
-       mop500_i2c_init(parent);
-       mop500_sdi_init(parent);
-       mop500_spi_init(parent);
-       mop500_audio_init(parent);
-       mop500_uart_init(parent);
-       u8500_cryp1_hash1_init(parent);
-
-       /* This board has full regulator constraints */
-       regulator_has_full_constraints();
-}
-
-
-static void __init snowball_init_machine(void)
-{
-       struct device *parent = NULL;
-       int i;
-
-       platform_device_register(&db8500_prcmu_device);
-
-       sdi0_reg_info.enable_gpio = SNOWBALL_SDMMC_EN_GPIO;
-       sdi0_reg_info.gpios[0].gpio = SNOWBALL_SDMMC_1V8_3V_GPIO;
-
-       snowball_pinmaps_init();
-       parent = u8500_init_devices();
-
-       for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
-               snowball_platform_devs[i]->dev.parent = parent;
-
-       platform_add_devices(snowball_platform_devs,
-                       ARRAY_SIZE(snowball_platform_devs));
-
-       mop500_i2c_init(parent);
-       snowball_sdi_init(parent);
-       mop500_spi_init(parent);
-       mop500_audio_init(parent);
-       mop500_uart_init(parent);
-
-       u8500_cryp1_hash1_init(parent);
-
-       /* This board has full regulator constraints */
-       regulator_has_full_constraints();
-}
-
-static void __init hrefv60_init_machine(void)
-{
-       struct device *parent = NULL;
-       int i;
-
-       platform_device_register(&db8500_prcmu_device);
-       /*
-        * The HREFv60 board removed a GPIO expander and routed
-        * all these GPIO pins to the internal GPIO controller
-        * instead.
-        */
-       mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
-
-       sdi0_reg_info.enable_gpio = HREFV60_SDMMC_EN_GPIO;
-       sdi0_reg_info.gpios[0].gpio = HREFV60_SDMMC_1V8_3V_GPIO;
-
-       hrefv60_pinmaps_init();
-       parent = u8500_init_devices();
-
-       for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
-               mop500_platform_devs[i]->dev.parent = parent;
-
-       platform_add_devices(mop500_platform_devs,
-                       ARRAY_SIZE(mop500_platform_devs));
-
-       mop500_i2c_init(parent);
-       hrefv60_sdi_init(parent);
-       mop500_spi_init(parent);
-       mop500_audio_init(parent);
-       mop500_uart_init(parent);
-
-       /* This board has full regulator constraints */
-       regulator_has_full_constraints();
-}
-
-MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
-       /* Maintainer: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> */
-       .atag_offset    = 0x100,
-       .smp            = smp_ops(ux500_smp_ops),
-       .map_io         = u8500_map_io,
-       .init_irq       = ux500_init_irq,
-       /* we re-use nomadik timer here */
-       .init_time      = ux500_timer_init,
-       .init_machine   = mop500_init_machine,
-       .init_late      = ux500_init_late,
-       .restart        = ux500_restart,
-MACHINE_END
-
-MACHINE_START(U8520, "ST-Ericsson U8520 Platform HREFP520")
-       .atag_offset    = 0x100,
-       .map_io         = u8500_map_io,
-       .init_irq       = ux500_init_irq,
-       .init_time      = ux500_timer_init,
-       .init_machine   = mop500_init_machine,
-       .init_late      = ux500_init_late,
-       .restart        = ux500_restart,
-MACHINE_END
-
-MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
-       .atag_offset    = 0x100,
-       .smp            = smp_ops(ux500_smp_ops),
-       .map_io         = u8500_map_io,
-       .init_irq       = ux500_init_irq,
-       .init_time      = ux500_timer_init,
-       .init_machine   = hrefv60_init_machine,
-       .init_late      = ux500_init_late,
-       .restart        = ux500_restart,
-MACHINE_END
-
-MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
-       .atag_offset    = 0x100,
-       .smp            = smp_ops(ux500_smp_ops),
-       .map_io         = u8500_map_io,
-       .init_irq       = ux500_init_irq,
-       /* we re-use nomadik timer here */
-       .init_time      = ux500_timer_init,
-       .init_machine   = snowball_init_machine,
-       .init_late      = NULL,
-       .restart        = ux500_restart,
-MACHINE_END
index d6fab166cbf113b36e52306c8fc62632a984be89..511d6febbe9996ac7f4831ba6d878435765c2869 100644 (file)
@@ -79,7 +79,6 @@
 #define SNOWBALL_EN_3V3_ETH_GPIO       MOP500_AB8500_PIN_GPIO(26)      /* GPIO26 */
 
 struct device;
-struct i2c_board_info;
 extern struct mmci_platform_data mop500_sdi0_data;
 extern struct mmci_platform_data mop500_sdi1_data;
 extern struct mmci_platform_data mop500_sdi2_data;
@@ -88,25 +87,10 @@ extern struct msp_i2s_platform_data msp0_platform_data;
 extern struct msp_i2s_platform_data msp1_platform_data;
 extern struct msp_i2s_platform_data msp2_platform_data;
 extern struct msp_i2s_platform_data msp3_platform_data;
-extern struct arm_pmu_platdata db8500_pmu_platdata;
-extern struct amba_pl011_data uart0_plat;
-extern struct amba_pl011_data uart1_plat;
-extern struct amba_pl011_data uart2_plat;
 extern struct pl022_ssp_controller ssp0_plat;
-extern struct stedma40_platform_data dma40_plat_data;
 
-extern void mop500_sdi_init(struct device *parent);
-extern void snowball_sdi_init(struct device *parent);
-extern void hrefv60_sdi_init(struct device *parent);
-extern void mop500_sdi_tc35892_init(struct device *parent);
-void __init mop500_u8500uib_init(void);
-void __init mop500_stuib_init(void);
 void __init mop500_pinmaps_init(void);
 void __init snowball_pinmaps_init(void);
 void __init hrefv60_pinmaps_init(void);
-void mop500_audio_init(struct device *parent);
 
-int __init mop500_uib_init(void);
-void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info,
-               unsigned n);
 #endif
index 301c3460d96af48f8bed5f3f89378cad8893c486..2e85c1e72535138a1b90c543ec3e95e2b36a6fa6 100644 (file)
@@ -32,7 +32,6 @@
 #include "irqs.h"
 
 #include "devices-db8500.h"
-#include "ste-dma40-db8500.h"
 #include "db8500-regs.h"
 #include "board-mop500.h"
 #include "id.h"
@@ -93,14 +92,6 @@ void __init u8500_map_io(void)
                iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc));
 }
 
-static struct resource db8500_pmu_resources[] = {
-       [0] = {
-               .start          = IRQ_DB8500_PMU,
-               .end            = IRQ_DB8500_PMU,
-               .flags          = IORESOURCE_IRQ,
-       },
-};
-
 /*
  * The PMU IRQ lines of two cores are wired together into a single interrupt.
  * Bounce the interrupt to the other core if it's not ours.
@@ -125,54 +116,6 @@ struct arm_pmu_platdata db8500_pmu_platdata = {
        .handle_irq             = db8500_pmu_handler,
 };
 
-static struct platform_device db8500_pmu_device = {
-       .name                   = "arm-pmu",
-       .id                     = -1,
-       .num_resources          = ARRAY_SIZE(db8500_pmu_resources),
-       .resource               = db8500_pmu_resources,
-       .dev.platform_data      = &db8500_pmu_platdata,
-};
-
-static struct platform_device *platform_devs[] __initdata = {
-       &u8500_dma40_device,
-       &db8500_pmu_device,
-};
-
-static resource_size_t __initdata db8500_gpio_base[] = {
-       U8500_GPIOBANK0_BASE,
-       U8500_GPIOBANK1_BASE,
-       U8500_GPIOBANK2_BASE,
-       U8500_GPIOBANK3_BASE,
-       U8500_GPIOBANK4_BASE,
-       U8500_GPIOBANK5_BASE,
-       U8500_GPIOBANK6_BASE,
-       U8500_GPIOBANK7_BASE,
-       U8500_GPIOBANK8_BASE,
-};
-
-static void __init db8500_add_gpios(struct device *parent)
-{
-       struct nmk_gpio_platform_data pdata = {
-               .supports_sleepmode = true,
-       };
-
-       dbx500_add_gpios(parent, db8500_gpio_base,
-                        ARRAY_SIZE(db8500_gpio_base),
-                        IRQ_DB8500_GPIO0, &pdata);
-       dbx500_add_pinctrl(parent, "pinctrl-db8500", U8500_PRCMU_BASE);
-}
-
-static int usb_db8500_dma_cfg[] = {
-       DB8500_DMA_DEV38_USB_OTG_IEP_AND_OEP_1_9,
-       DB8500_DMA_DEV37_USB_OTG_IEP_AND_OEP_2_10,
-       DB8500_DMA_DEV36_USB_OTG_IEP_AND_OEP_3_11,
-       DB8500_DMA_DEV19_USB_OTG_IEP_AND_OEP_4_12,
-       DB8500_DMA_DEV18_USB_OTG_IEP_AND_OEP_5_13,
-       DB8500_DMA_DEV17_USB_OTG_IEP_AND_OEP_6_14,
-       DB8500_DMA_DEV16_USB_OTG_IEP_AND_OEP_7_15,
-       DB8500_DMA_DEV39_USB_OTG_IEP_AND_OEP_8
-};
-
 static const char *db8500_read_soc_id(void)
 {
        void __iomem *uid = __io_address(U8500_BB_UID_BASE);
@@ -192,60 +135,22 @@ static struct device * __init db8500_soc_device_init(void)
        return ux500_soc_device_init(soc_id);
 }
 
-/*
- * This function is called from the board init
- */
-struct device * __init u8500_init_devices(void)
-{
-       struct device *parent;
-       int i;
-
-       parent = db8500_soc_device_init();
-
-       db8500_add_rtc(parent);
-       db8500_add_gpios(parent);
-       db8500_add_usb(parent, usb_db8500_dma_cfg, usb_db8500_dma_cfg);
-
-       for (i = 0; i < ARRAY_SIZE(platform_devs); i++)
-               platform_devs[i]->dev.parent = parent;
-
-       platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));
-
-       return parent;
-}
-
 #ifdef CONFIG_MACH_UX500_DT
 static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
        /* Requires call-back bindings. */
        OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata),
        /* Requires DMA bindings. */
-       OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", NULL),
-       OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", NULL),
-       OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", NULL),
-       OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0",  &ssp0_plat),
-       OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0",  NULL),
-       OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1",  NULL),
-       OF_DEV_AUXDATA("arm,pl18x", 0x80005000, "sdi2",  NULL),
-       OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4",  NULL),
-       /* Requires clock name bindings. */
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e000, "gpio.0", NULL),
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e080, "gpio.1", NULL),
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e000, "gpio.2", NULL),
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e080, "gpio.3", NULL),
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e100, "gpio.4", NULL),
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e180, "gpio.5", NULL),
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e000, "gpio.6", NULL),
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e080, "gpio.7", NULL),
-       OF_DEV_AUXDATA("st,nomadik-gpio", 0xa03fe000, "gpio.8", NULL),
-       OF_DEV_AUXDATA("st,nomadik-i2c", 0x80004000, "nmk-i2c.0", NULL),
-       OF_DEV_AUXDATA("st,nomadik-i2c", 0x80122000, "nmk-i2c.1", NULL),
-       OF_DEV_AUXDATA("st,nomadik-i2c", 0x80128000, "nmk-i2c.2", NULL),
-       OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL),
-       OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
-       OF_DEV_AUXDATA("stericsson,db8500-musb", 0xa03e0000, "musb-ux500.0", NULL),
+       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000,
+                      "ux500-msp-i2s.0", &msp0_platform_data),
+       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000,
+                      "ux500-msp-i2s.1", &msp1_platform_data),
+       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80117000,
+                      "ux500-msp-i2s.2", &msp2_platform_data),
+       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000,
+                      "ux500-msp-i2s.3", &msp3_platform_data),
+       /* Requires non-DT:able platform data. */
        OF_DEV_AUXDATA("stericsson,db8500-prcmu", 0x80157000, "db8500-prcmu",
                        &db8500_prcmu_pdata),
-       OF_DEV_AUXDATA("smsc,lan9115", 0x50000000, "smsc911x.0", NULL),
        OF_DEV_AUXDATA("stericsson,ux500-cryp", 0xa03cb000, "cryp1", NULL),
        OF_DEV_AUXDATA("stericsson,ux500-hash", 0xa03c2000, "hash1", NULL),
        OF_DEV_AUXDATA("stericsson,snd-soc-mop500", 0, "snd-soc-mop500.0",
@@ -253,17 +158,6 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
        /* Requires device name bindings. */
        OF_DEV_AUXDATA("stericsson,db8500-pinctrl", U8500_PRCMU_BASE,
                "pinctrl-db8500", NULL),
-       /* Requires clock name and DMA bindings. */
-       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000,
-               "ux500-msp-i2s.0", &msp0_platform_data),
-       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000,
-               "ux500-msp-i2s.1", &msp1_platform_data),
-       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80117000,
-               "ux500-msp-i2s.2", &msp2_platform_data),
-       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000,
-               "ux500-msp-i2s.3", &msp3_platform_data),
-       /* Requires clock name bindings and channel address lookup table. */
-       OF_DEV_AUXDATA("stericsson,db8500-dma40", 0x801C0000, "dma40.0", NULL),
        {},
 };
 
index 5d7eebcabc63a12e6a699ecbe047099d95482496..f84d4397896b39705e0227dac27555542c1d9cc0 100644 (file)
@@ -78,9 +78,17 @@ void __init ux500_init_irq(void)
        if (cpu_is_u8500_family()) {
                prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1);
                ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1);
-               u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE,
-                              U8500_CLKRST3_BASE, U8500_CLKRST5_BASE,
-                              U8500_CLKRST6_BASE);
+
+               if (of_have_populated_dt())
+                       u8500_of_clk_init(U8500_CLKRST1_BASE,
+                                         U8500_CLKRST2_BASE,
+                                         U8500_CLKRST3_BASE,
+                                         U8500_CLKRST5_BASE,
+                                         U8500_CLKRST6_BASE);
+               else
+                       u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE,
+                                      U8500_CLKRST3_BASE, U8500_CLKRST5_BASE,
+                                      U8500_CLKRST6_BASE);
        } else if (cpu_is_u9540()) {
                prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1);
                ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1);
@@ -96,11 +104,6 @@ void __init ux500_init_irq(void)
        }
 }
 
-void __init ux500_init_late(void)
-{
-       mop500_uib_init();
-}
-
 static const char * __init ux500_get_machine(void)
 {
        return kasprintf(GFP_KERNEL, "DB%4x", dbx500_partnumber());
diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c
deleted file mode 100644 (file)
index f71b3d7..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
- * License terms: GNU General Public License (GPL), version 2.
- */
-
-#include <linux/kernel.h>
-#include <linux/dma-mapping.h>
-#include <linux/err.h>
-#include <linux/irq.h>
-#include <linux/slab.h>
-#include <linux/platform_device.h>
-#include <linux/platform_data/pinctrl-nomadik.h>
-
-#include "irqs.h"
-
-#include "devices-common.h"
-
-static struct platform_device *
-dbx500_add_gpio(struct device *parent, int id, resource_size_t addr, int irq,
-               struct nmk_gpio_platform_data *pdata)
-{
-       struct resource resources[] = {
-               {
-                       .start  = addr,
-                       .end    = addr + 127,
-                       .flags  = IORESOURCE_MEM,
-               },
-               {
-                       .start  = irq,
-                       .end    = irq,
-                       .flags  = IORESOURCE_IRQ,
-               }
-       };
-
-       return platform_device_register_resndata(
-               parent,
-               "gpio",
-               id,
-               resources,
-               ARRAY_SIZE(resources),
-               pdata,
-               sizeof(*pdata));
-}
-
-void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num,
-                     int irq, struct nmk_gpio_platform_data *pdata)
-{
-       int first = 0;
-       int i;
-
-       for (i = 0; i < num; i++, first += 32, irq++) {
-               pdata->first_gpio = first;
-               pdata->first_irq = NOMADIK_GPIO_TO_IRQ(first);
-               pdata->num_gpio = 32;
-
-               dbx500_add_gpio(parent, i, base[i], irq, pdata);
-       }
-}
diff --git a/arch/arm/mach-ux500/devices-common.h b/arch/arm/mach-ux500/devices-common.h
deleted file mode 100644 (file)
index 96fa4ac..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
- * License terms: GNU General Public License (GPL), version 2.
- */
-
-#ifndef __DEVICES_COMMON_H
-#define __DEVICES_COMMON_H
-
-#include <linux/platform_device.h>
-#include <linux/dma-mapping.h>
-#include <linux/sys_soc.h>
-#include <linux/amba/bus.h>
-#include <linux/platform_data/i2c-nomadik.h>
-#include <linux/platform_data/crypto-ux500.h>
-
-struct spi_master_cntlr;
-
-static inline struct amba_device *
-dbx500_add_msp_spi(struct device *parent, const char *name,
-                  resource_size_t base, int irq,
-                  struct spi_master_cntlr *pdata)
-{
-       return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0,
-                                  pdata, 0);
-}
-
-static inline struct amba_device *
-dbx500_add_spi(struct device *parent, const char *name, resource_size_t base,
-              int irq, struct spi_master_cntlr *pdata,
-              u32 periphid)
-{
-       return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0,
-                                  pdata, periphid);
-}
-
-struct mmci_platform_data;
-
-static inline struct amba_device *
-dbx500_add_sdi(struct device *parent, const char *name, resource_size_t base,
-              int irq, struct mmci_platform_data *pdata, u32 periphid)
-{
-       return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0,
-                                  pdata, periphid);
-}
-
-struct amba_pl011_data;
-
-static inline struct amba_device *
-dbx500_add_uart(struct device *parent, const char *name, resource_size_t base,
-               int irq, struct amba_pl011_data *pdata)
-{
-       return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, pdata, 0);
-}
-
-struct nmk_i2c_controller;
-
-static inline struct amba_device *
-dbx500_add_i2c(struct device *parent, int id, resource_size_t base, int irq,
-              struct nmk_i2c_controller *data)
-{
-       /* Conjure a name similar to what the platform device used to have */
-       char name[16];
-
-       snprintf(name, sizeof(name), "nmk-i2c.%d", id);
-       return amba_apb_device_add(parent, name, base, SZ_4K, irq, 0, data, 0);
-}
-
-static inline struct amba_device *
-dbx500_add_rtc(struct device *parent, resource_size_t base, int irq)
-{
-       return amba_apb_device_add(parent, "rtc-pl031", base, SZ_4K, irq,
-                               0, NULL, 0);
-}
-
-struct cryp_platform_data;
-
-static inline struct platform_device *
-dbx500_add_cryp1(struct device *parent, int id, resource_size_t base, int irq,
-               struct cryp_platform_data *pdata)
-{
-       struct resource res[] = {
-                       DEFINE_RES_MEM(base, SZ_4K),
-                       DEFINE_RES_IRQ(irq),
-       };
-
-       struct platform_device_info pdevinfo = {
-                       .parent = parent,
-                       .name = "cryp1",
-                       .id = id,
-                       .res = res,
-                       .num_res = ARRAY_SIZE(res),
-                       .data = pdata,
-                       .size_data = sizeof(*pdata),
-                       .dma_mask = DMA_BIT_MASK(32),
-       };
-
-       return platform_device_register_full(&pdevinfo);
-}
-
-struct hash_platform_data;
-
-static inline struct platform_device *
-dbx500_add_hash1(struct device *parent, int id, resource_size_t base,
-               struct hash_platform_data *pdata)
-{
-       struct resource res[] = {
-                       DEFINE_RES_MEM(base, SZ_4K),
-       };
-
-       struct platform_device_info pdevinfo = {
-                       .parent = parent,
-                       .name = "hash1",
-                       .id = id,
-                       .res = res,
-                       .num_res = ARRAY_SIZE(res),
-                       .data = pdata,
-                       .size_data = sizeof(*pdata),
-                       .dma_mask = DMA_BIT_MASK(32),
-       };
-
-       return platform_device_register_full(&pdevinfo);
-}
-
-struct nmk_gpio_platform_data;
-
-void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num,
-                     int irq, struct nmk_gpio_platform_data *pdata);
-
-static inline void
-dbx500_add_pinctrl(struct device *parent, const char *name,
-                  resource_size_t base)
-{
-       struct resource res[] = {
-               DEFINE_RES_MEM(base, SZ_8K),
-       };
-       struct platform_device_info pdevinfo = {
-               .parent = parent,
-               .name = name,
-               .id = -1,
-               .res = res,
-               .num_res = ARRAY_SIZE(res),
-       };
-
-       platform_device_register_full(&pdevinfo);
-}
-
-#endif
index bc316062e0c23661c118429036207e50911ffebb..c59f89d058ff4499c6d7dd33b6464d086a8fdd0b 100644 (file)
@@ -9,10 +9,8 @@
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
-#include <linux/gpio.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/pl022.h>
-#include <linux/platform_data/dma-ste-dma40.h>
 #include <linux/mfd/dbx500-prcmu.h>
 
 #include "setup.h"
 
 #include "db8500-regs.h"
 #include "devices-db8500.h"
-#include "ste-dma40-db8500.h"
-
-static struct resource dma40_resources[] = {
-       [0] = {
-               .start = U8500_DMA_BASE,
-               .end   = U8500_DMA_BASE + SZ_4K - 1,
-               .flags = IORESOURCE_MEM,
-               .name  = "base",
-       },
-       [1] = {
-               .start = U8500_DMA_LCPA_BASE,
-               .end   = U8500_DMA_LCPA_BASE + 2 * SZ_1K - 1,
-               .flags = IORESOURCE_MEM,
-               .name  = "lcpa",
-       },
-       [2] = {
-               .start = IRQ_DB8500_DMA,
-               .end   = IRQ_DB8500_DMA,
-               .flags = IORESOURCE_IRQ,
-       }
-};
-
-struct stedma40_platform_data dma40_plat_data = {
-       .disabled_channels = {-1},
-};
-
-struct platform_device u8500_dma40_device = {
-       .dev = {
-               .platform_data = &dma40_plat_data,
-               .coherent_dma_mask = DMA_BIT_MASK(32),
-       },
-       .name = "dma40",
-       .id = 0,
-       .num_resources = ARRAY_SIZE(dma40_resources),
-       .resource = dma40_resources
-};
-
-struct resource keypad_resources[] = {
-       [0] = {
-               .start = U8500_SKE_BASE,
-               .end = U8500_SKE_BASE + SZ_4K - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start = IRQ_DB8500_KB,
-               .end = IRQ_DB8500_KB,
-               .flags = IORESOURCE_IRQ,
-       },
-};
-
-struct platform_device u8500_ske_keypad_device = {
-       .name = "nmk-ske-keypad",
-       .id = -1,
-       .num_resources = ARRAY_SIZE(keypad_resources),
-       .resource = keypad_resources,
-};
 
 struct prcmu_pdata db8500_prcmu_pdata = {
        .ab_platdata    = &ab8500_platdata,
@@ -84,39 +26,3 @@ struct prcmu_pdata db8500_prcmu_pdata = {
        .version_offset = DB8500_PRCMU_FW_VERSION_OFFSET,
        .legacy_offset  = DB8500_PRCMU_LEGACY_OFFSET,
 };
-
-static struct resource db8500_prcmu_res[] = {
-       {
-               .name  = "prcmu",
-               .start = U8500_PRCMU_BASE,
-               .end   = U8500_PRCMU_BASE + SZ_8K - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       {
-               .name  = "prcmu-tcdm",
-               .start = U8500_PRCMU_TCDM_BASE,
-               .end   = U8500_PRCMU_TCDM_BASE + SZ_4K - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       {
-               .name  = "irq",
-               .start = IRQ_DB8500_PRCMU1,
-               .end   = IRQ_DB8500_PRCMU1,
-               .flags = IORESOURCE_IRQ,
-       },
-       {
-               .name  = "prcmu-tcpm",
-               .start = U8500_PRCMU_TCPM_BASE,
-               .end   = U8500_PRCMU_TCPM_BASE + SZ_32K - 1,
-               .flags = IORESOURCE_MEM,
-       },
-};
-
-struct platform_device db8500_prcmu_device = {
-       .name                   = "db8500-prcmu",
-       .resource               = db8500_prcmu_res,
-       .num_resources          = ARRAY_SIZE(db8500_prcmu_res),
-       .dev = {
-               .platform_data = &db8500_prcmu_pdata,
-       },
-};
index 321998320f98536abf4ef603b498d430ab0e1ac0..b8ffc9979bb2db763738a2cf8f39cf441edd3887 100644 (file)
 #ifndef __DEVICES_DB8500_H
 #define __DEVICES_DB8500_H
 
-#include <linux/platform_data/usb-musb-ux500.h>
 #include "irqs.h"
 #include "db8500-regs.h"
-#include "devices-common.h"
 
-struct ske_keypad_platform_data;
-struct pl022_ssp_controller;
 struct platform_device;
 
 extern struct ab8500_platform_data ab8500_platdata;
 extern struct prcmu_pdata db8500_prcmu_pdata;
-extern struct platform_device db8500_prcmu_device;
 
-static inline struct platform_device *
-db8500_add_ske_keypad(struct device *parent,
-                     struct ske_keypad_platform_data *pdata,
-                     size_t size)
-{
-       struct resource resources[] = {
-               DEFINE_RES_MEM(U8500_SKE_BASE, SZ_4K),
-               DEFINE_RES_IRQ(IRQ_DB8500_KB),
-       };
-
-       return platform_device_register_resndata(parent, "nmk-ske-keypad", -1,
-                                                resources, 2, pdata, size);
-}
-
-static inline struct amba_device *
-db8500_add_ssp(struct device *parent, const char *name, resource_size_t base,
-              int irq, struct pl022_ssp_controller *pdata)
-{
-       return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, pdata, 0);
-}
-
-#define db8500_add_i2c0(parent, pdata) \
-       dbx500_add_i2c(parent, 0, U8500_I2C0_BASE, IRQ_DB8500_I2C0, pdata)
-#define db8500_add_i2c1(parent, pdata) \
-       dbx500_add_i2c(parent, 1, U8500_I2C1_BASE, IRQ_DB8500_I2C1, pdata)
-#define db8500_add_i2c2(parent, pdata) \
-       dbx500_add_i2c(parent, 2, U8500_I2C2_BASE, IRQ_DB8500_I2C2, pdata)
-#define db8500_add_i2c3(parent, pdata) \
-       dbx500_add_i2c(parent, 3, U8500_I2C3_BASE, IRQ_DB8500_I2C3, pdata)
-#define db8500_add_i2c4(parent, pdata) \
-       dbx500_add_i2c(parent, 4, U8500_I2C4_BASE, IRQ_DB8500_I2C4, pdata)
-
-#define db8500_add_msp0_spi(parent, pdata) \
-       dbx500_add_msp_spi(parent, "msp0", U8500_MSP0_BASE, \
-                          IRQ_DB8500_MSP0, pdata)
-#define db8500_add_msp1_spi(parent, pdata) \
-       dbx500_add_msp_spi(parent, "msp1", U8500_MSP1_BASE, \
-                          IRQ_DB8500_MSP1, pdata)
-#define db8500_add_msp2_spi(parent, pdata) \
-       dbx500_add_msp_spi(parent, "msp2", U8500_MSP2_BASE, \
-                          IRQ_DB8500_MSP2, pdata)
-#define db8500_add_msp3_spi(parent, pdata) \
-       dbx500_add_msp_spi(parent, "msp3", U8500_MSP3_BASE, \
-                          IRQ_DB8500_MSP1, pdata)
-
-#define db8500_add_rtc(parent) \
-       dbx500_add_rtc(parent, U8500_RTC_BASE, IRQ_DB8500_RTC);
-
-#define db8500_add_usb(parent, rx_cfg, tx_cfg) \
-       ux500_add_usb(parent, U8500_USBOTG_BASE, \
-                     IRQ_DB8500_USBOTG, rx_cfg, tx_cfg)
-
-#define db8500_add_sdi0(parent, pdata, pid) \
-       dbx500_add_sdi(parent, "sdi0", U8500_SDI0_BASE, \
-                      IRQ_DB8500_SDMMC0, pdata, pid)
-#define db8500_add_sdi1(parent, pdata, pid) \
-       dbx500_add_sdi(parent, "sdi1", U8500_SDI1_BASE, \
-                      IRQ_DB8500_SDMMC1, pdata, pid)
-#define db8500_add_sdi2(parent, pdata, pid) \
-       dbx500_add_sdi(parent, "sdi2", U8500_SDI2_BASE, \
-                      IRQ_DB8500_SDMMC2, pdata, pid)
-#define db8500_add_sdi3(parent, pdata, pid) \
-       dbx500_add_sdi(parent, "sdi3", U8500_SDI3_BASE, \
-                      IRQ_DB8500_SDMMC3, pdata, pid)
-#define db8500_add_sdi4(parent, pdata, pid) \
-       dbx500_add_sdi(parent, "sdi4", U8500_SDI4_BASE, \
-                      IRQ_DB8500_SDMMC4, pdata, pid)
-#define db8500_add_sdi5(parent, pdata, pid) \
-       dbx500_add_sdi(parent, "sdi5", U8500_SDI5_BASE, \
-                      IRQ_DB8500_SDMMC5, pdata, pid)
-
-#define db8500_add_ssp0(parent, pdata) \
-       db8500_add_ssp(parent, "ssp0", U8500_SSP0_BASE, \
-                      IRQ_DB8500_SSP0, pdata)
-#define db8500_add_ssp1(parent, pdata) \
-       db8500_add_ssp(parent, "ssp1", U8500_SSP1_BASE, \
-                      IRQ_DB8500_SSP1, pdata)
-
-#define db8500_add_spi0(parent, pdata) \
-       dbx500_add_spi(parent, "spi0", U8500_SPI0_BASE, \
-                      IRQ_DB8500_SPI0, pdata, 0)
-#define db8500_add_spi1(parent, pdata) \
-       dbx500_add_spi(parent, "spi1", U8500_SPI1_BASE, \
-                      IRQ_DB8500_SPI1, pdata, 0)
-#define db8500_add_spi2(parent, pdata) \
-       dbx500_add_spi(parent, "spi2", U8500_SPI2_BASE, \
-                      IRQ_DB8500_SPI2, pdata, 0)
-#define db8500_add_spi3(parent, pdata) \
-       dbx500_add_spi(parent, "spi3", U8500_SPI3_BASE, \
-                      IRQ_DB8500_SPI3, pdata, 0)
-
-#define db8500_add_uart0(parent, pdata) \
-       dbx500_add_uart(parent, "uart0", U8500_UART0_BASE, \
-                       IRQ_DB8500_UART0, pdata)
-#define db8500_add_uart1(parent, pdata) \
-       dbx500_add_uart(parent, "uart1", U8500_UART1_BASE, \
-                       IRQ_DB8500_UART1, pdata)
-#define db8500_add_uart2(parent, pdata) \
-       dbx500_add_uart(parent, "uart2", U8500_UART2_BASE, \
-                       IRQ_DB8500_UART2, pdata)
-
-#define db8500_add_cryp1(parent, pdata) \
-       dbx500_add_cryp1(parent, -1, U8500_CRYP1_BASE, IRQ_DB8500_CRYP1, pdata)
-#define db8500_add_hash1(parent, pdata) \
-       dbx500_add_hash1(parent, -1, U8500_HASH1_BASE, pdata)
 #endif
index cbc6f1e4104ddc2c9b8c0bd7c3b96f662167f24f..5bca7c605cd6c1a0cc5bffb54df3f006ff338a52 100644 (file)
 struct platform_device;
 struct amba_device;
 
-extern struct platform_device u8500_gpio_devs[];
-
 extern struct amba_device ux500_pl031_device;
 
-extern struct platform_device ux500_hash1_device;
-extern struct platform_device ux500_cryp1_device;
-
-extern struct platform_device u8500_dma40_device;
-extern struct platform_device ux500_ske_keypad_device;
-
 #endif
index 656324aad18e229d67a3abaf36af2c04d6c85c3c..bdb356498a748563091d7563525db015500dbfc1 100644 (file)
@@ -24,7 +24,6 @@ extern void __init u8500_map_io(void);
 extern struct device * __init u8500_init_devices(void);
 
 extern void __init ux500_init_irq(void);
-extern void __init ux500_init_late(void);
 
 extern struct device *ux500_soc_device_init(const char *soc_id);
 
index b6bd0efcbe64465bed83d2814e01f57483a03c92..05a4ff78b3bd9e73deaf4c0e814f79cdae8e971e 100644 (file)
@@ -97,8 +97,8 @@ dt_fail:
         * sched_clock with higher rating then MTU since is always-on.
         *
         */
-
-       nmdk_timer_init(mtu_timer_base, IRQ_MTU0);
+       if (!of_have_populated_dt())
+               nmdk_timer_init(mtu_timer_base, IRQ_MTU0);
        clksrc_dbx500_prcmu_init(prcmu_timer_base);
        ux500_twd_init();
 }
diff --git a/arch/arm/mach-ux500/usb.c b/arch/arm/mach-ux500/usb.c
deleted file mode 100644 (file)
index b7bd8d3..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2011
- *
- * Author: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
- * License terms: GNU General Public License (GPL) version 2
- */
-#include <linux/platform_device.h>
-#include <linux/usb/musb.h>
-#include <linux/dma-mapping.h>
-#include <linux/platform_data/usb-musb-ux500.h>
-#include <linux/platform_data/dma-ste-dma40.h>
-
-#include "db8500-regs.h"
-
-#define MUSB_DMA40_RX_CH { \
-               .mode = STEDMA40_MODE_LOGICAL, \
-               .dir = DMA_DEV_TO_MEM, \
-       }
-
-#define MUSB_DMA40_TX_CH { \
-               .mode = STEDMA40_MODE_LOGICAL, \
-               .dir = DMA_MEM_TO_DEV, \
-       }
-
-static struct stedma40_chan_cfg musb_dma_rx_ch[UX500_MUSB_DMA_NUM_RX_TX_CHANNELS]
-       = {
-       MUSB_DMA40_RX_CH,
-       MUSB_DMA40_RX_CH,
-       MUSB_DMA40_RX_CH,
-       MUSB_DMA40_RX_CH,
-       MUSB_DMA40_RX_CH,
-       MUSB_DMA40_RX_CH,
-       MUSB_DMA40_RX_CH,
-       MUSB_DMA40_RX_CH
-};
-
-static struct stedma40_chan_cfg musb_dma_tx_ch[UX500_MUSB_DMA_NUM_RX_TX_CHANNELS]
-       = {
-       MUSB_DMA40_TX_CH,
-       MUSB_DMA40_TX_CH,
-       MUSB_DMA40_TX_CH,
-       MUSB_DMA40_TX_CH,
-       MUSB_DMA40_TX_CH,
-       MUSB_DMA40_TX_CH,
-       MUSB_DMA40_TX_CH,
-       MUSB_DMA40_TX_CH,
-};
-
-static void *ux500_dma_rx_param_array[UX500_MUSB_DMA_NUM_RX_TX_CHANNELS] = {
-       &musb_dma_rx_ch[0],
-       &musb_dma_rx_ch[1],
-       &musb_dma_rx_ch[2],
-       &musb_dma_rx_ch[3],
-       &musb_dma_rx_ch[4],
-       &musb_dma_rx_ch[5],
-       &musb_dma_rx_ch[6],
-       &musb_dma_rx_ch[7]
-};
-
-static void *ux500_dma_tx_param_array[UX500_MUSB_DMA_NUM_RX_TX_CHANNELS] = {
-       &musb_dma_tx_ch[0],
-       &musb_dma_tx_ch[1],
-       &musb_dma_tx_ch[2],
-       &musb_dma_tx_ch[3],
-       &musb_dma_tx_ch[4],
-       &musb_dma_tx_ch[5],
-       &musb_dma_tx_ch[6],
-       &musb_dma_tx_ch[7]
-};
-
-static struct ux500_musb_board_data musb_board_data = {
-       .dma_rx_param_array = ux500_dma_rx_param_array,
-       .dma_tx_param_array = ux500_dma_tx_param_array,
-       .dma_filter = stedma40_filter,
-};
-
-static struct musb_hdrc_platform_data musb_platform_data = {
-       .mode = MUSB_OTG,
-       .board_data = &musb_board_data,
-};
-
-static struct resource usb_resources[] = {
-       [0] = {
-               .name   = "usb-mem",
-               .flags  =  IORESOURCE_MEM,
-       },
-
-       [1] = {
-               .name   = "mc", /* hard-coded in musb */
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-struct platform_device ux500_musb_device = {
-       .name = "musb-ux500",
-       .id = 0,
-       .dev = {
-               .platform_data = &musb_platform_data,
-               .coherent_dma_mask = DMA_BIT_MASK(32),
-       },
-       .num_resources = ARRAY_SIZE(usb_resources),
-       .resource = usb_resources,
-};
-
-static inline void ux500_usb_dma_update_rx_ch_config(int *dev_type)
-{
-       u32 idx;
-
-       for (idx = 0; idx < UX500_MUSB_DMA_NUM_RX_TX_CHANNELS; idx++)
-               musb_dma_rx_ch[idx].dev_type = dev_type[idx];
-}
-
-static inline void ux500_usb_dma_update_tx_ch_config(int *dev_type)
-{
-       u32 idx;
-
-       for (idx = 0; idx < UX500_MUSB_DMA_NUM_RX_TX_CHANNELS; idx++)
-               musb_dma_tx_ch[idx].dev_type = dev_type[idx];
-}
-
-void ux500_add_usb(struct device *parent, resource_size_t base, int irq,
-                  int *dma_rx_cfg, int *dma_tx_cfg)
-{
-       ux500_musb_device.resource[0].start = base;
-       ux500_musb_device.resource[0].end = base + SZ_64K - 1;
-       ux500_musb_device.resource[1].start = irq;
-       ux500_musb_device.resource[1].end = irq;
-
-       ux500_usb_dma_update_rx_ch_config(dma_rx_cfg);
-       ux500_usb_dma_update_tx_ch_config(dma_tx_cfg);
-
-       ux500_musb_device.dev.parent = parent;
-
-       platform_device_register(&ux500_musb_device);
-}
index 36579544780493706381c22008c64577bc04fde2..d7e7422527cac791938e4006873bad4fc8883d64 100644 (file)
@@ -4,14 +4,12 @@ config ARCH_VEXPRESS
        select ARM_AMBA
        select ARM_GIC
        select ARM_TIMER_SP804
-       select CLKDEV_LOOKUP
        select COMMON_CLK
        select COMMON_CLK_VERSATILE
        select CPU_V7
        select GENERIC_CLOCKEVENTS
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
-       select HAVE_CLK
        select HAVE_PATA_PLATFORM
        select HAVE_SMP
        select ICST
index 95a469e23e378078af77ffcd9eecc9b29e5ff264..4f8b8cb17ff50560c751058b2f44980294482428 100644 (file)
@@ -1,12 +1,10 @@
 /*
  * Versatile Express V2M Motherboard Support
  */
-#include <linux/clocksource.h>
 #include <linux/device.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/mmci.h>
 #include <linux/io.h>
-#include <linux/clocksource.h>
 #include <linux/smp.h>
 #include <linux/init.h>
 #include <linux/of_address.h>
@@ -22,7 +20,6 @@
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/vexpress.h>
-#include <linux/clk-provider.h>
 #include <linux/clkdev.h>
 
 #include <asm/mach-types.h>
@@ -422,16 +419,8 @@ void __init v2m_dt_init_early(void)
                        pr_warning("vexpress: DT HBI (%x) is not matching "
                                        "hardware (%x)!\n", dt_hbi, hbi);
        }
-}
-
-static void __init v2m_dt_timer_init(void)
-{
-       of_clk_init(NULL);
 
-       clocksource_of_init();
-
-       versatile_sched_clock_init(vexpress_get_24mhz_clock_base(),
-                               24000000);
+       versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), 24000000);
 }
 
 static const struct of_device_id v2m_dt_bus_match[] __initconst = {
@@ -458,6 +447,5 @@ DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express")
        .smp_init       = smp_init_ops(vexpress_smp_init_ops),
        .map_io         = v2m_dt_map_io,
        .init_early     = v2m_dt_init_early,
-       .init_time      = v2m_dt_timer_init,
        .init_machine   = v2m_dt_init,
 MACHINE_END
index 9b252934b2065f60f21888f5bc76ffd7c609326e..927be93b692ec37fff6e5944649d1237c25617d8 100644 (file)
@@ -5,7 +5,6 @@ config ARCH_VT8500
        select CLKDEV_LOOKUP
        select CLKSRC_OF
        select GENERIC_CLOCKEVENTS
-       select HAVE_CLK
        select VT8500_TIMER
        select PINCTRL
        help
diff --git a/arch/arm/mach-vt8500/common.h b/arch/arm/mach-vt8500/common.h
deleted file mode 100644 (file)
index 087787a..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/* linux/arch/arm/mach-vt8500/dt_common.h
- *
- * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __ARCH_ARM_MACH_VT8500_DT_COMMON_H
-#define __ARCH_ARM_MACH_VT8500_DT_COMMON_H
-
-#include <linux/of.h>
-
-/* defined in drivers/clk/clk-vt8500.c */
-void __init vtwm_clk_init(void __iomem *pmc_base);
-
-#endif
index eefaa60d6614c72ca20608fd2636bf18cc12b65f..4a73464cb11b4f449aa15c55628a0f35bab06d3a 100644 (file)
@@ -18,7 +18,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/clocksource.h>
 #include <linux/io.h>
 #include <linux/pm.h>
 #include <linux/reboot.h>
@@ -33,8 +32,6 @@
 #include <linux/of_irq.h>
 #include <linux/of_platform.h>
 
-#include "common.h"
-
 #define LEGACY_GPIO_BASE       0xD8110000
 #define LEGACY_PMC_BASE                0xD8130000
 
@@ -162,8 +159,6 @@ void __init vt8500_init(void)
        else
                pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__);
 
-       vtwm_clk_init(pmc_base);
-
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
@@ -180,7 +175,6 @@ DT_MACHINE_START(WMT_DT, "VIA/Wondermedia SoC (Device Tree Support)")
        .dt_compat      = vt8500_dt_compat,
        .map_io         = vt8500_map_io,
        .init_machine   = vt8500_init,
-       .init_time      = clocksource_of_init,
        .restart        = vt8500_restart,
 MACHINE_END
 
index 50a3ea0037db10d2032e2ce020688b6fa74614b0..aa9511b6914a40c92e1cb99c2b544740a8407c24 100644 (file)
  * published by the Free Software Foundation.
 */
 
+/*
+ * NOTE: Code in this file is not used on S3C64xx when booting with
+ * Device Tree support.
+ */
+
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 #include <mach/hardware.h>
 
@@ -148,8 +154,12 @@ static int __init s3c_arch_init(void)
 
        // do the correct init for cpu
 
-       if (cpu == NULL)
+       if (cpu == NULL) {
+               /* Not needed when booting with device tree. */
+               if (of_have_populated_dt())
+                       return 0;
                panic("s3c_arch_init: NULL cpu\n");
+       }
 
        ret = (cpu->init)();
        if (ret != 0)
index e07a5fd58ad7463f8775f7334fd692c7e51df2ad..e67fa16e19381573215d44d87e9e19a71698d79e 100644 (file)
@@ -505,7 +505,7 @@ config VIRTIO_BLK
 config BLK_DEV_HD
        bool "Very old hard disk (MFM/RLL/IDE) driver"
        depends on HAVE_IDE
-       depends on !ARM || ARCH_RPC || ARCH_SHARK || BROKEN
+       depends on !ARM || ARCH_RPC || BROKEN
        help
          This is a very old hard disk driver that lacks the enhanced
          functionality of the newer ones.
index 5fb4ff53d0887eca089a7a853b29a11df9cab6a5..6b950ca8b71108fdf3f32dd5ea6503eb1e5dc7ed 100644 (file)
 #include <linux/clk-provider.h>
 #include <linux/clkdev.h>
 #include <linux/clk/bcm2835.h>
-#include <linux/clk-provider.h>
 #include <linux/of.h>
 
-static const struct of_device_id clk_match[] __initconst = {
-       { .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
-       { }
-};
-
 /*
  * These are fixed clocks. They're probably not all root clocks and it may
  * be possible to turn them on and off but until this is mapped out better
@@ -63,6 +57,4 @@ void __init bcm2835_init_clocks(void)
        ret = clk_register_clkdev(clk, NULL, "20215000.uart");
        if (ret)
                pr_err("uart1_pclk alias not registered\n");
-
-       of_clk_init(clk_match);
 }
index 2e08cb00193685eb80e617c386dcb0b31871c122..2e7e9d9798cb20901cc2dd234c33ef6d306dc966 100644 (file)
@@ -20,8 +20,7 @@
 #include <linux/clk-provider.h>
 #include <linux/io.h>
 #include <linux/of.h>
-
-extern void __iomem *sregs_base;
+#include <linux/of_address.h>
 
 #define HB_PLL_LOCK_500                0x20000000
 #define HB_PLL_LOCK            0x10000000
@@ -280,6 +279,7 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk
        const char *clk_name = node->name;
        const char *parent_name;
        struct clk_init_data init;
+       struct device_node *srnp;
        int rc;
 
        rc = of_property_read_u32(node, "reg", &reg);
@@ -290,7 +290,11 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk
        if (WARN_ON(!hb_clk))
                return NULL;
 
-       hb_clk->reg = sregs_base + reg;
+       /* Map system registers */
+       srnp = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
+       hb_clk->reg = of_iomap(srnp, 0);
+       BUG_ON(!hb_clk->reg);
+       hb_clk->reg += reg;
 
        of_property_read_string(node, "clock-output-names", &clk_name);
 
index 51410c2ac2cb617b9a98b9c0fd869e1ddd541870..6a934a5296bd4ca2867146dc06272ea1003e238e 100644 (file)
  */
 
 #define SRC_CR                 0x00U
+#define SRC_CR_T0_ENSEL                BIT(15)
+#define SRC_CR_T1_ENSEL                BIT(17)
+#define SRC_CR_T2_ENSEL                BIT(19)
+#define SRC_CR_T3_ENSEL                BIT(21)
+#define SRC_CR_T4_ENSEL                BIT(23)
+#define SRC_CR_T5_ENSEL                BIT(25)
+#define SRC_CR_T6_ENSEL                BIT(27)
+#define SRC_CR_T7_ENSEL                BIT(29)
 #define SRC_XTALCR             0x0CU
 #define SRC_XTALCR_XTALTIMEN   BIT(20)
 #define SRC_XTALCR_SXTALDIS    BIT(19)
@@ -54,6 +62,79 @@ static DEFINE_SPINLOCK(src_lock);
 /* Base address of the SRC */
 static void __iomem *src_base;
 
+static int nomadik_clk_reboot_handler(struct notifier_block *this,
+                               unsigned long code,
+                               void *unused)
+{
+       u32 val;
+
+       /* The main chrystal need to be enabled for reboot to work */
+       val = readl(src_base + SRC_XTALCR);
+       val &= ~SRC_XTALCR_MXTALOVER;
+       val |= SRC_XTALCR_MXTALEN;
+       pr_crit("force-enabling MXTALO\n");
+       writel(val, src_base + SRC_XTALCR);
+       return NOTIFY_OK;
+}
+
+static struct notifier_block nomadik_clk_reboot_notifier = {
+       .notifier_call = nomadik_clk_reboot_handler,
+};
+
+static const struct of_device_id nomadik_src_match[] __initconst = {
+       { .compatible = "stericsson,nomadik-src" },
+       { /* sentinel */ }
+};
+
+static void __init nomadik_src_init(void)
+{
+       struct device_node *np;
+       u32 val;
+
+       np = of_find_matching_node(NULL, nomadik_src_match);
+       if (!np) {
+               pr_crit("no matching node for SRC, aborting clock init\n");
+               return;
+       }
+       src_base = of_iomap(np, 0);
+       if (!src_base) {
+               pr_err("%s: must have src parent node with REGS (%s)\n",
+                      __func__, np->name);
+               return;
+       }
+
+       /* Set all timers to use the 2.4 MHz TIMCLK */
+       val = readl(src_base + SRC_CR);
+       val |= SRC_CR_T0_ENSEL;
+       val |= SRC_CR_T1_ENSEL;
+       val |= SRC_CR_T2_ENSEL;
+       val |= SRC_CR_T3_ENSEL;
+       val |= SRC_CR_T4_ENSEL;
+       val |= SRC_CR_T5_ENSEL;
+       val |= SRC_CR_T6_ENSEL;
+       val |= SRC_CR_T7_ENSEL;
+       writel(val, src_base + SRC_CR);
+
+       val = readl(src_base + SRC_XTALCR);
+       pr_info("SXTALO is %s\n",
+               (val & SRC_XTALCR_SXTALDIS) ? "disabled" : "enabled");
+       pr_info("MXTAL is %s\n",
+               (val & SRC_XTALCR_MXTALSTAT) ? "enabled" : "disabled");
+       if (of_property_read_bool(np, "disable-sxtalo")) {
+               /* The machine uses an external oscillator circuit */
+               val |= SRC_XTALCR_SXTALDIS;
+               pr_info("disabling SXTALO\n");
+       }
+       if (of_property_read_bool(np, "disable-mxtalo")) {
+               /* Disable this too: also run by external oscillator */
+               val |= SRC_XTALCR_MXTALOVER;
+               val &= ~SRC_XTALCR_MXTALEN;
+               pr_info("disabling MXTALO\n");
+       }
+       writel(val, src_base + SRC_XTALCR);
+       register_reboot_notifier(&nomadik_clk_reboot_notifier);
+}
+
 /**
  * struct clk_pll1 - Nomadik PLL1 clock
  * @hw: corresponding clock hardware entry
@@ -431,6 +512,9 @@ static void __init of_nomadik_pll_setup(struct device_node *np)
        const char *parent_name;
        u32 pll_id;
 
+       if (!src_base)
+               nomadik_src_init();
+
        if (of_property_read_u32(np, "pll-id", &pll_id)) {
                pr_err("%s: PLL \"%s\" missing pll-id property\n",
                        __func__, clk_name);
@@ -441,6 +525,8 @@ static void __init of_nomadik_pll_setup(struct device_node *np)
        if (!IS_ERR(clk))
                of_clk_add_provider(np, of_clk_src_simple_get, clk);
 }
+CLK_OF_DECLARE(nomadik_pll_clk,
+       "st,nomadik-pll-clock", of_nomadik_pll_setup);
 
 static void __init of_nomadik_hclk_setup(struct device_node *np)
 {
@@ -448,6 +534,9 @@ static void __init of_nomadik_hclk_setup(struct device_node *np)
        const char *clk_name = np->name;
        const char *parent_name;
 
+       if (!src_base)
+               nomadik_src_init();
+
        parent_name = of_clk_get_parent_name(np, 0);
        /*
         * The HCLK divides PLL1 with 1 (passthru), 2, 3 or 4.
@@ -460,6 +549,8 @@ static void __init of_nomadik_hclk_setup(struct device_node *np)
        if (!IS_ERR(clk))
                of_clk_add_provider(np, of_clk_src_simple_get, clk);
 }
+CLK_OF_DECLARE(nomadik_hclk_clk,
+       "st,nomadik-hclk-clock", of_nomadik_hclk_setup);
 
 static void __init of_nomadik_src_clk_setup(struct device_node *np)
 {
@@ -468,6 +559,9 @@ static void __init of_nomadik_src_clk_setup(struct device_node *np)
        const char *parent_name;
        u32 clk_id;
 
+       if (!src_base)
+               nomadik_src_init();
+
        if (of_property_read_u32(np, "clock-id", &clk_id)) {
                pr_err("%s: SRC clock \"%s\" missing clock-id property\n",
                        __func__, clk_name);
@@ -478,89 +572,5 @@ static void __init of_nomadik_src_clk_setup(struct device_node *np)
        if (!IS_ERR(clk))
                of_clk_add_provider(np, of_clk_src_simple_get, clk);
 }
-
-static const struct of_device_id nomadik_src_match[] __initconst = {
-       { .compatible = "stericsson,nomadik-src" },
-       { /* sentinel */ }
-};
-
-static const struct of_device_id nomadik_src_clk_match[] __initconst = {
-       {
-               .compatible = "fixed-clock",
-               .data = of_fixed_clk_setup,
-       },
-       {
-               .compatible = "fixed-factor-clock",
-               .data = of_fixed_factor_clk_setup,
-       },
-       {
-               .compatible = "st,nomadik-pll-clock",
-               .data = of_nomadik_pll_setup,
-       },
-       {
-               .compatible = "st,nomadik-hclk-clock",
-               .data = of_nomadik_hclk_setup,
-       },
-       {
-               .compatible = "st,nomadik-src-clock",
-               .data = of_nomadik_src_clk_setup,
-       },
-       { /* sentinel */ }
-};
-
-static int nomadik_clk_reboot_handler(struct notifier_block *this,
-                               unsigned long code,
-                               void *unused)
-{
-       u32 val;
-
-       /* The main chrystal need to be enabled for reboot to work */
-       val = readl(src_base + SRC_XTALCR);
-       val &= ~SRC_XTALCR_MXTALOVER;
-       val |= SRC_XTALCR_MXTALEN;
-       pr_crit("force-enabling MXTALO\n");
-       writel(val, src_base + SRC_XTALCR);
-       return NOTIFY_OK;
-}
-
-static struct notifier_block nomadik_clk_reboot_notifier = {
-       .notifier_call = nomadik_clk_reboot_handler,
-};
-
-void __init nomadik_clk_init(void)
-{
-       struct device_node *np;
-       u32 val;
-
-       np = of_find_matching_node(NULL, nomadik_src_match);
-       if (!np) {
-               pr_crit("no matching node for SRC, aborting clock init\n");
-               return;
-       }
-       src_base = of_iomap(np, 0);
-       if (!src_base) {
-               pr_err("%s: must have src parent node with REGS (%s)\n",
-                      __func__, np->name);
-               return;
-       }
-       val = readl(src_base + SRC_XTALCR);
-       pr_info("SXTALO is %s\n",
-               (val & SRC_XTALCR_SXTALDIS) ? "disabled" : "enabled");
-       pr_info("MXTAL is %s\n",
-               (val & SRC_XTALCR_MXTALSTAT) ? "enabled" : "disabled");
-       if (of_property_read_bool(np, "disable-sxtalo")) {
-               /* The machine uses an external oscillator circuit */
-               val |= SRC_XTALCR_SXTALDIS;
-               pr_info("disabling SXTALO\n");
-       }
-       if (of_property_read_bool(np, "disable-mxtalo")) {
-               /* Disable this too: also run by external oscillator */
-               val |= SRC_XTALCR_MXTALOVER;
-               val &= ~SRC_XTALCR_MXTALEN;
-               pr_info("disabling MXTALO\n");
-       }
-       writel(val, src_base + SRC_XTALCR);
-       register_reboot_notifier(&nomadik_clk_reboot_notifier);
-
-       of_clk_init(nomadik_src_clk_match);
-}
+CLK_OF_DECLARE(nomadik_src_clk,
+       "st,nomadik-src-clock", of_nomadik_src_clk_setup);
index 5ab95f1ad579288c516dc782b14a2b5a871ad7dc..6c15e3316137b87177753f3bd2b04d154d2f3f7a 100644 (file)
@@ -1015,16 +1015,6 @@ static struct clk_std clk_usb1 = {
        },
 };
 
-static struct of_device_id clkc_ids[] = {
-       { .compatible = "sirf,prima2-clkc" },
-       {},
-};
-
-static struct of_device_id rsc_ids[] = {
-       { .compatible = "sirf,prima2-rsc" },
-       {},
-};
-
 enum prima2_clk_index {
        /* 0    1     2      3      4      5      6       7         8      9 */
        rtc,    osc,   pll1,  pll2,  pll3,  mem,   sys,   security, dsp,   gps,
@@ -1082,24 +1072,16 @@ static struct clk_hw *prima2_clk_hw_array[maxclk] __initdata = {
 static struct clk *prima2_clks[maxclk];
 static struct clk_onecell_data clk_data;
 
-void __init sirfsoc_of_clk_init(void)
+static void __init sirfsoc_clk_init(struct device_node *np)
 {
-       struct device_node *np;
+       struct device_node *rscnp;
        int i;
 
-       np = of_find_matching_node(NULL, rsc_ids);
-       if (!np)
-               panic("unable to find compatible rsc node in dtb\n");
-
-       sirfsoc_rsc_vbase = of_iomap(np, 0);
+       rscnp = of_find_compatible_node(NULL, NULL, "sirf,prima2-rsc");
+       sirfsoc_rsc_vbase = of_iomap(rscnp, 0);
        if (!sirfsoc_rsc_vbase)
                panic("unable to map rsc registers\n");
-
-       of_node_put(np);
-
-       np = of_find_matching_node(NULL, clkc_ids);
-       if (!np)
-               return;
+       of_node_put(rscnp);
 
        sirfsoc_clk_vbase = of_iomap(np, 0);
        if (!sirfsoc_clk_vbase)
@@ -1124,3 +1106,4 @@ void __init sirfsoc_of_clk_init(void)
 
        of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
 }
+CLK_OF_DECLARE(sirfsoc_clk, "sirf,prima2-clkc", sirfsoc_clk_init);
index 82306f5fb9c2497f82bcfafe403cdbc091b3dc66..7fd5c5e9e25dbbd72a94cd0923ddf9d0a18d1c36 100644 (file)
 
 #include <linux/io.h>
 #include <linux/of.h>
+#include <linux/of_address.h>
 #include <linux/slab.h>
 #include <linux/bitops.h>
 #include <linux/clkdev.h>
 #include <linux/clk-provider.h>
 
+#define LEGACY_PMC_BASE                0xD8130000
+
 /* All clocks share the same lock as none can be changed concurrently */
 static DEFINE_SPINLOCK(_lock);
 
@@ -53,6 +56,21 @@ struct clk_pll {
 
 static void __iomem *pmc_base;
 
+static __init void vtwm_set_pmc_base(void)
+{
+       struct device_node *np =
+               of_find_compatible_node(NULL, NULL, "via,vt8500-pmc");
+
+       if (np)
+               pmc_base = of_iomap(np, 0);
+       else
+               pmc_base = ioremap(LEGACY_PMC_BASE, 0x1000);
+       of_node_put(np);
+
+       if (!pmc_base)
+               pr_err("%s:of_iomap(pmc) failed\n", __func__);
+}
+
 #define to_clk_device(_hw) container_of(_hw, struct clk_device, hw)
 
 #define VT8500_PMC_BUSY_MASK           0x18
@@ -222,6 +240,9 @@ static __init void vtwm_device_clk_init(struct device_node *node)
        int rc;
        int clk_init_flags = 0;
 
+       if (!pmc_base)
+               vtwm_set_pmc_base();
+
        dev_clk = kzalloc(sizeof(*dev_clk), GFP_KERNEL);
        if (WARN_ON(!dev_clk))
                return;
@@ -636,6 +657,9 @@ static __init void vtwm_pll_clk_init(struct device_node *node, int pll_type)
        struct clk_init_data init;
        int rc;
 
+       if (!pmc_base)
+               vtwm_set_pmc_base();
+
        rc = of_property_read_u32(node, "reg", &reg);
        if (WARN_ON(rc))
                return;
@@ -694,13 +718,3 @@ static void __init wm8850_pll_init(struct device_node *node)
        vtwm_pll_clk_init(node, PLL_TYPE_WM8850);
 }
 CLK_OF_DECLARE(wm8850_pll, "wm,wm8850-pll-clock", wm8850_pll_init);
-
-void __init vtwm_clk_init(void __iomem *base)
-{
-       if (!base)
-               return;
-
-       pmc_base = base;
-
-       of_clk_init(NULL);
-}
index c396fe3615891501e6f7a21ca6c3bfe88d81acec..9fc9359f51335e60451e9073469f0a6a34ed6730 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/clk.h>
 #include <linux/clk/mxs.h>
 #include <linux/clkdev.h>
+#include <linux/clk-provider.h>
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
@@ -100,16 +101,16 @@ static enum imx23_clk clks_init_on[] __initdata = {
        cpu, hbus, xbus, emi, uart,
 };
 
-int __init mx23_clocks_init(void)
+static void __init mx23_clocks_init(struct device_node *np)
 {
-       struct device_node *np;
+       struct device_node *dcnp;
        u32 i;
 
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx23-digctl");
-       digctrl = of_iomap(np, 0);
+       dcnp = of_find_compatible_node(NULL, NULL, "fsl,imx23-digctl");
+       digctrl = of_iomap(dcnp, 0);
        WARN_ON(!digctrl);
+       of_node_put(dcnp);
 
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx23-clkctrl");
        clkctrl = of_iomap(np, 0);
        WARN_ON(!clkctrl);
 
@@ -162,7 +163,7 @@ int __init mx23_clocks_init(void)
                if (IS_ERR(clks[i])) {
                        pr_err("i.MX23 clk %d: register failed with %ld\n",
                                i, PTR_ERR(clks[i]));
-                       return PTR_ERR(clks[i]);
+                       return;
                }
 
        clk_data.clks = clks;
@@ -172,5 +173,5 @@ int __init mx23_clocks_init(void)
        for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
                clk_prepare_enable(clks[clks_init_on[i]]);
 
-       return 0;
 }
+CLK_OF_DECLARE(imx23_clkctrl, "fsl,imx23-clkctrl", mx23_clocks_init);
index 4faf0afc44cd5a2ebe0761af3e8d1250ed6c2b77..a6c35010e4e5b1a61f8e802896bc15ad623bc74a 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/clk.h>
 #include <linux/clk/mxs.h>
 #include <linux/clkdev.h>
+#include <linux/clk-provider.h>
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
@@ -154,16 +155,16 @@ static enum imx28_clk clks_init_on[] __initdata = {
        cpu, hbus, xbus, emi, uart,
 };
 
-int __init mx28_clocks_init(void)
+static void __init mx28_clocks_init(struct device_node *np)
 {
-       struct device_node *np;
+       struct device_node *dcnp;
        u32 i;
 
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx28-digctl");
-       digctrl = of_iomap(np, 0);
+       dcnp = of_find_compatible_node(NULL, NULL, "fsl,imx28-digctl");
+       digctrl = of_iomap(dcnp, 0);
        WARN_ON(!digctrl);
+       of_node_put(dcnp);
 
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx28-clkctrl");
        clkctrl = of_iomap(np, 0);
        WARN_ON(!clkctrl);
 
@@ -239,7 +240,7 @@ int __init mx28_clocks_init(void)
                if (IS_ERR(clks[i])) {
                        pr_err("i.MX28 clk %d: register failed with %ld\n",
                                i, PTR_ERR(clks[i]));
-                       return PTR_ERR(clks[i]);
+                       return;
                }
 
        clk_data.clks = clks;
@@ -250,6 +251,5 @@ int __init mx28_clocks_init(void)
 
        for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
                clk_prepare_enable(clks[clks_init_on[i]]);
-
-       return 0;
 }
+CLK_OF_DECLARE(imx28_clkctrl, "fsl,imx28-clkctrl", mx28_clocks_init);
index 34ee69f4d50c5bd574ceeed4893b0bb9f67a3686..9bbd035145409b9908ca25fecfd412d5e7345840 100644 (file)
@@ -16,7 +16,6 @@
 
 #include <linux/clk-provider.h>
 #include <linux/clkdev.h>
-#include <linux/clk/sunxi.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 
@@ -617,11 +616,8 @@ static void __init of_sunxi_table_clock_setup(const struct of_device_id *clk_mat
        }
 }
 
-void __init sunxi_init_clocks(void)
+static void __init sunxi_init_clocks(struct device_node *np)
 {
-       /* Register all the simple and basic clocks on DT */
-       of_clk_init(NULL);
-
        /* Register factor clocks */
        of_sunxi_table_clock_setup(clk_factors_match, sunxi_factors_clk_setup);
 
@@ -634,3 +630,8 @@ void __init sunxi_init_clocks(void)
        /* Register gate clocks */
        of_sunxi_table_clock_setup(clk_gates_match, sunxi_gates_clk_setup);
 }
+CLK_OF_DECLARE(sun4i_a10_clk_init, "allwinner,sun4i-a10", sunxi_init_clocks);
+CLK_OF_DECLARE(sun5i_a10s_clk_init, "allwinner,sun5i-a10s", sunxi_init_clocks);
+CLK_OF_DECLARE(sun5i_a13_clk_init, "allwinner,sun5i-a13", sunxi_init_clocks);
+CLK_OF_DECLARE(sun6i_a31_clk_init, "allwinner,sun6i-a31", sunxi_init_clocks);
+CLK_OF_DECLARE(sun7i_a20_clk_init, "allwinner,sun7i-a20", sunxi_init_clocks);
index c6a806ed0e8c85439d3c3753bcc133c24ed0cdb7..521483f0ba335f67a5bf7dc96e26adf3ca89fbcf 100644 (file)
@@ -8,6 +8,7 @@ obj-y += clk-prcmu.o
 obj-y += clk-sysctrl.o
 
 # Clock definitions
+obj-y += u8500_of_clk.o
 obj-y += u8500_clk.o
 obj-y += u9540_clk.o
 obj-y += u8540_clk.o
diff --git a/drivers/clk/ux500/u8500_of_clk.c b/drivers/clk/ux500/u8500_of_clk.c
new file mode 100644 (file)
index 0000000..b768b50
--- /dev/null
@@ -0,0 +1,559 @@
+/*
+ * Clock definitions for u8500 platform.
+ *
+ * Copyright (C) 2012 ST-Ericsson SA
+ * Author: Ulf Hansson <ulf.hansson@linaro.org>
+ *
+ * License terms: GNU General Public License (GPL) version 2
+ */
+
+#include <linux/of.h>
+#include <linux/clk.h>
+#include <linux/clkdev.h>
+#include <linux/clk-provider.h>
+#include <linux/mfd/dbx500-prcmu.h>
+#include <linux/platform_data/clk-ux500.h>
+#include "clk.h"
+
+#define PRCC_NUM_PERIPH_CLUSTERS 6
+#define PRCC_PERIPHS_PER_CLUSTER 32
+
+static struct clk *prcmu_clk[PRCMU_NUM_CLKS];
+static struct clk *prcc_pclk[(PRCC_NUM_PERIPH_CLUSTERS + 1) * PRCC_PERIPHS_PER_CLUSTER];
+static struct clk *prcc_kclk[(PRCC_NUM_PERIPH_CLUSTERS + 1) * PRCC_PERIPHS_PER_CLUSTER];
+
+#define PRCC_SHOW(clk, base, bit) \
+       clk[(base * PRCC_PERIPHS_PER_CLUSTER) + bit]
+#define PRCC_PCLK_STORE(clk, base, bit)        \
+       prcc_pclk[(base * PRCC_PERIPHS_PER_CLUSTER) + bit] = clk
+#define PRCC_KCLK_STORE(clk, base, bit)        \
+       prcc_kclk[(base * PRCC_PERIPHS_PER_CLUSTER) + bit] = clk
+
+struct clk *ux500_twocell_get(struct of_phandle_args *clkspec, void *data)
+{
+       struct clk **clk_data = data;
+       unsigned int base, bit;
+
+       if (clkspec->args_count != 2)
+               return  ERR_PTR(-EINVAL);
+
+       base = clkspec->args[0];
+       bit = clkspec->args[1];
+
+       if (base != 1 && base != 2 && base != 3 && base != 5 && base != 6) {
+               pr_err("%s: invalid PRCC base %d\n", __func__, base);
+               return ERR_PTR(-EINVAL);
+       }
+
+       return PRCC_SHOW(clk_data, base, bit);
+}
+
+static const struct of_device_id u8500_clk_of_match[] = {
+       { .compatible = "stericsson,u8500-clks", },
+       { },
+};
+
+void u8500_of_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
+                      u32 clkrst5_base, u32 clkrst6_base)
+{
+       struct prcmu_fw_version *fw_version;
+       struct device_node *np = NULL;
+       struct device_node *child = NULL;
+       const char *sgaclk_parent = NULL;
+       struct clk *clk, *rtc_clk, *twd_clk;
+
+       if (of_have_populated_dt())
+               np = of_find_matching_node(NULL, u8500_clk_of_match);
+       if (!np) {
+               pr_err("Either DT or U8500 Clock node not found\n");
+               return;
+       }
+
+       /* Clock sources */
+       clk = clk_reg_prcmu_gate("soc0_pll", NULL, PRCMU_PLLSOC0,
+                               CLK_IS_ROOT|CLK_IGNORE_UNUSED);
+       prcmu_clk[PRCMU_PLLSOC0] = clk;
+
+       clk = clk_reg_prcmu_gate("soc1_pll", NULL, PRCMU_PLLSOC1,
+                               CLK_IS_ROOT|CLK_IGNORE_UNUSED);
+       prcmu_clk[PRCMU_PLLSOC1] = clk;
+
+       clk = clk_reg_prcmu_gate("ddr_pll", NULL, PRCMU_PLLDDR,
+                               CLK_IS_ROOT|CLK_IGNORE_UNUSED);
+       prcmu_clk[PRCMU_PLLDDR] = clk;
+
+       /* FIXME: Add sys, ulp and int clocks here. */
+
+       rtc_clk = clk_register_fixed_rate(NULL, "rtc32k", "NULL",
+                               CLK_IS_ROOT|CLK_IGNORE_UNUSED,
+                               32768);
+
+       /* PRCMU clocks */
+       fw_version = prcmu_get_fw_version();
+       if (fw_version != NULL) {
+               switch (fw_version->project) {
+               case PRCMU_FW_PROJECT_U8500_C2:
+               case PRCMU_FW_PROJECT_U8520:
+               case PRCMU_FW_PROJECT_U8420:
+                       sgaclk_parent = "soc0_pll";
+                       break;
+               default:
+                       break;
+               }
+       }
+
+       if (sgaclk_parent)
+               clk = clk_reg_prcmu_gate("sgclk", sgaclk_parent,
+                                       PRCMU_SGACLK, 0);
+       else
+               clk = clk_reg_prcmu_gate("sgclk", NULL,
+                                       PRCMU_SGACLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_SGACLK] = clk;
+
+       clk = clk_reg_prcmu_gate("uartclk", NULL, PRCMU_UARTCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_UARTCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("msp02clk", NULL, PRCMU_MSP02CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_MSP02CLK] = clk;
+
+       clk = clk_reg_prcmu_gate("msp1clk", NULL, PRCMU_MSP1CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_MSP1CLK] = clk;
+
+       clk = clk_reg_prcmu_gate("i2cclk", NULL, PRCMU_I2CCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_I2CCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("slimclk", NULL, PRCMU_SLIMCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_SLIMCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("per1clk", NULL, PRCMU_PER1CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_PER1CLK] = clk;
+
+       clk = clk_reg_prcmu_gate("per2clk", NULL, PRCMU_PER2CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_PER2CLK] = clk;
+
+       clk = clk_reg_prcmu_gate("per3clk", NULL, PRCMU_PER3CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_PER3CLK] = clk;
+
+       clk = clk_reg_prcmu_gate("per5clk", NULL, PRCMU_PER5CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_PER5CLK] = clk;
+
+       clk = clk_reg_prcmu_gate("per6clk", NULL, PRCMU_PER6CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_PER6CLK] = clk;
+
+       clk = clk_reg_prcmu_gate("per7clk", NULL, PRCMU_PER7CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_PER7CLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("lcdclk", NULL, PRCMU_LCDCLK, 0,
+                               CLK_IS_ROOT|CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_LCDCLK] = clk;
+
+       clk = clk_reg_prcmu_opp_gate("bmlclk", NULL, PRCMU_BMLCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_BMLCLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("hsitxclk", NULL, PRCMU_HSITXCLK, 0,
+                               CLK_IS_ROOT|CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_HSITXCLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("hsirxclk", NULL, PRCMU_HSIRXCLK, 0,
+                               CLK_IS_ROOT|CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_HSIRXCLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("hdmiclk", NULL, PRCMU_HDMICLK, 0,
+                               CLK_IS_ROOT|CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_HDMICLK] = clk;
+
+       clk = clk_reg_prcmu_gate("apeatclk", NULL, PRCMU_APEATCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_APEATCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("apetraceclk", NULL, PRCMU_APETRACECLK,
+                               CLK_IS_ROOT);
+       prcmu_clk[PRCMU_APETRACECLK] = clk;
+
+       clk = clk_reg_prcmu_gate("mcdeclk", NULL, PRCMU_MCDECLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_MCDECLK] = clk;
+
+       clk = clk_reg_prcmu_opp_gate("ipi2cclk", NULL, PRCMU_IPI2CCLK,
+                               CLK_IS_ROOT);
+       prcmu_clk[PRCMU_IPI2CCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("dsialtclk", NULL, PRCMU_DSIALTCLK,
+                               CLK_IS_ROOT);
+       prcmu_clk[PRCMU_DSIALTCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("dmaclk", NULL, PRCMU_DMACLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_DMACLK] = clk;
+
+       clk = clk_reg_prcmu_gate("b2r2clk", NULL, PRCMU_B2R2CLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_B2R2CLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("tvclk", NULL, PRCMU_TVCLK, 0,
+                               CLK_IS_ROOT|CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_TVCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("sspclk", NULL, PRCMU_SSPCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_SSPCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("rngclk", NULL, PRCMU_RNGCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_RNGCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("uiccclk", NULL, PRCMU_UICCCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_UICCCLK] = clk;
+
+       clk = clk_reg_prcmu_gate("timclk", NULL, PRCMU_TIMCLK, CLK_IS_ROOT);
+       prcmu_clk[PRCMU_TIMCLK] = clk;
+
+       clk = clk_reg_prcmu_opp_volt_scalable("sdmmcclk", NULL, PRCMU_SDMMCCLK,
+                                       100000000,
+                                       CLK_IS_ROOT|CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_SDMMCCLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("dsi_pll", "hdmiclk",
+                               PRCMU_PLLDSI, 0, CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_PLLDSI] = clk;
+
+       clk = clk_reg_prcmu_scalable("dsi0clk", "dsi_pll",
+                               PRCMU_DSI0CLK, 0, CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_DSI0CLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("dsi1clk", "dsi_pll",
+                               PRCMU_DSI1CLK, 0, CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_DSI1CLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("dsi0escclk", "tvclk",
+                               PRCMU_DSI0ESCCLK, 0, CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_DSI0ESCCLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("dsi1escclk", "tvclk",
+                               PRCMU_DSI1ESCCLK, 0, CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_DSI1ESCCLK] = clk;
+
+       clk = clk_reg_prcmu_scalable("dsi2escclk", "tvclk",
+                               PRCMU_DSI2ESCCLK, 0, CLK_SET_RATE_GATE);
+       prcmu_clk[PRCMU_DSI2ESCCLK] = clk;
+
+       clk = clk_reg_prcmu_scalable_rate("armss", NULL,
+                               PRCMU_ARMSS, 0, CLK_IS_ROOT|CLK_IGNORE_UNUSED);
+       prcmu_clk[PRCMU_ARMSS] = clk;
+
+       twd_clk = clk_register_fixed_factor(NULL, "smp_twd", "armss",
+                               CLK_IGNORE_UNUSED, 1, 2);
+
+       /*
+        * FIXME: Add special handled PRCMU clocks here:
+        * 1. clkout0yuv, use PRCMU as parent + need regulator + pinctrl.
+        * 2. ab9540_clkout1yuv, see clkout0yuv
+        */
+
+       /* PRCC P-clocks */
+       clk = clk_reg_prcc_pclk("p1_pclk0", "per1clk", clkrst1_base,
+                               BIT(0), 0);
+       PRCC_PCLK_STORE(clk, 1, 0);
+
+       clk = clk_reg_prcc_pclk("p1_pclk1", "per1clk", clkrst1_base,
+                               BIT(1), 0);
+       PRCC_PCLK_STORE(clk, 1, 1);
+
+       clk = clk_reg_prcc_pclk("p1_pclk2", "per1clk", clkrst1_base,
+                               BIT(2), 0);
+       PRCC_PCLK_STORE(clk, 1, 2);
+
+       clk = clk_reg_prcc_pclk("p1_pclk3", "per1clk", clkrst1_base,
+                               BIT(3), 0);
+       PRCC_PCLK_STORE(clk, 1, 3);
+
+       clk = clk_reg_prcc_pclk("p1_pclk4", "per1clk", clkrst1_base,
+                               BIT(4), 0);
+       PRCC_PCLK_STORE(clk, 1, 4);
+
+       clk = clk_reg_prcc_pclk("p1_pclk5", "per1clk", clkrst1_base,
+                               BIT(5), 0);
+       PRCC_PCLK_STORE(clk, 1, 5);
+
+       clk = clk_reg_prcc_pclk("p1_pclk6", "per1clk", clkrst1_base,
+                               BIT(6), 0);
+       PRCC_PCLK_STORE(clk, 1, 6);
+
+       clk = clk_reg_prcc_pclk("p1_pclk7", "per1clk", clkrst1_base,
+                               BIT(7), 0);
+       PRCC_PCLK_STORE(clk, 1, 7);
+
+       clk = clk_reg_prcc_pclk("p1_pclk8", "per1clk", clkrst1_base,
+                               BIT(8), 0);
+       PRCC_PCLK_STORE(clk, 1, 8);
+
+       clk = clk_reg_prcc_pclk("p1_pclk9", "per1clk", clkrst1_base,
+                               BIT(9), 0);
+       PRCC_PCLK_STORE(clk, 1, 9);
+
+       clk = clk_reg_prcc_pclk("p1_pclk10", "per1clk", clkrst1_base,
+                               BIT(10), 0);
+       PRCC_PCLK_STORE(clk, 1, 10);
+
+       clk = clk_reg_prcc_pclk("p1_pclk11", "per1clk", clkrst1_base,
+                               BIT(11), 0);
+       PRCC_PCLK_STORE(clk, 1, 11);
+
+       clk = clk_reg_prcc_pclk("p2_pclk0", "per2clk", clkrst2_base,
+                               BIT(0), 0);
+       PRCC_PCLK_STORE(clk, 2, 0);
+
+       clk = clk_reg_prcc_pclk("p2_pclk1", "per2clk", clkrst2_base,
+                               BIT(1), 0);
+       PRCC_PCLK_STORE(clk, 2, 1);
+
+       clk = clk_reg_prcc_pclk("p2_pclk2", "per2clk", clkrst2_base,
+                               BIT(2), 0);
+       PRCC_PCLK_STORE(clk, 2, 2);
+
+       clk = clk_reg_prcc_pclk("p2_pclk3", "per2clk", clkrst2_base,
+                               BIT(3), 0);
+       PRCC_PCLK_STORE(clk, 2, 3);
+
+       clk = clk_reg_prcc_pclk("p2_pclk4", "per2clk", clkrst2_base,
+                               BIT(4), 0);
+       PRCC_PCLK_STORE(clk, 2, 4);
+
+       clk = clk_reg_prcc_pclk("p2_pclk5", "per2clk", clkrst2_base,
+                               BIT(5), 0);
+       PRCC_PCLK_STORE(clk, 2, 5);
+
+       clk = clk_reg_prcc_pclk("p2_pclk6", "per2clk", clkrst2_base,
+                               BIT(6), 0);
+       PRCC_PCLK_STORE(clk, 2, 6);
+
+       clk = clk_reg_prcc_pclk("p2_pclk7", "per2clk", clkrst2_base,
+                               BIT(7), 0);
+       PRCC_PCLK_STORE(clk, 2, 7);
+
+       clk = clk_reg_prcc_pclk("p2_pclk8", "per2clk", clkrst2_base,
+                               BIT(8), 0);
+       PRCC_PCLK_STORE(clk, 2, 8);
+
+       clk = clk_reg_prcc_pclk("p2_pclk9", "per2clk", clkrst2_base,
+                               BIT(9), 0);
+       PRCC_PCLK_STORE(clk, 2, 9);
+
+       clk = clk_reg_prcc_pclk("p2_pclk10", "per2clk", clkrst2_base,
+                               BIT(10), 0);
+       PRCC_PCLK_STORE(clk, 2, 10);
+
+       clk = clk_reg_prcc_pclk("p2_pclk11", "per2clk", clkrst2_base,
+                               BIT(11), 0);
+       PRCC_PCLK_STORE(clk, 2, 1);
+
+       clk = clk_reg_prcc_pclk("p2_pclk12", "per2clk", clkrst2_base,
+                               BIT(12), 0);
+       PRCC_PCLK_STORE(clk, 2, 12);
+
+       clk = clk_reg_prcc_pclk("p3_pclk0", "per3clk", clkrst3_base,
+                               BIT(0), 0);
+       PRCC_PCLK_STORE(clk, 3, 0);
+
+       clk = clk_reg_prcc_pclk("p3_pclk1", "per3clk", clkrst3_base,
+                               BIT(1), 0);
+       PRCC_PCLK_STORE(clk, 3, 1);
+
+       clk = clk_reg_prcc_pclk("p3_pclk2", "per3clk", clkrst3_base,
+                               BIT(2), 0);
+       PRCC_PCLK_STORE(clk, 3, 2);
+
+       clk = clk_reg_prcc_pclk("p3_pclk3", "per3clk", clkrst3_base,
+                               BIT(3), 0);
+       PRCC_PCLK_STORE(clk, 3, 3);
+
+       clk = clk_reg_prcc_pclk("p3_pclk4", "per3clk", clkrst3_base,
+                               BIT(4), 0);
+       PRCC_PCLK_STORE(clk, 3, 4);
+
+       clk = clk_reg_prcc_pclk("p3_pclk5", "per3clk", clkrst3_base,
+                               BIT(5), 0);
+       PRCC_PCLK_STORE(clk, 3, 5);
+
+       clk = clk_reg_prcc_pclk("p3_pclk6", "per3clk", clkrst3_base,
+                               BIT(6), 0);
+       PRCC_PCLK_STORE(clk, 3, 6);
+
+       clk = clk_reg_prcc_pclk("p3_pclk7", "per3clk", clkrst3_base,
+                               BIT(7), 0);
+       PRCC_PCLK_STORE(clk, 3, 7);
+
+       clk = clk_reg_prcc_pclk("p3_pclk8", "per3clk", clkrst3_base,
+                               BIT(8), 0);
+       PRCC_PCLK_STORE(clk, 3, 8);
+
+       clk = clk_reg_prcc_pclk("p5_pclk0", "per5clk", clkrst5_base,
+                               BIT(0), 0);
+       PRCC_PCLK_STORE(clk, 5, 0);
+
+       clk = clk_reg_prcc_pclk("p5_pclk1", "per5clk", clkrst5_base,
+                               BIT(1), 0);
+       PRCC_PCLK_STORE(clk, 5, 1);
+
+       clk = clk_reg_prcc_pclk("p6_pclk0", "per6clk", clkrst6_base,
+                               BIT(0), 0);
+       PRCC_PCLK_STORE(clk, 6, 0);
+
+       clk = clk_reg_prcc_pclk("p6_pclk1", "per6clk", clkrst6_base,
+                               BIT(1), 0);
+       PRCC_PCLK_STORE(clk, 6, 1);
+
+       clk = clk_reg_prcc_pclk("p6_pclk2", "per6clk", clkrst6_base,
+                               BIT(2), 0);
+       PRCC_PCLK_STORE(clk, 6, 2);
+
+       clk = clk_reg_prcc_pclk("p6_pclk3", "per6clk", clkrst6_base,
+                               BIT(3), 0);
+       PRCC_PCLK_STORE(clk, 6, 3);
+
+       clk = clk_reg_prcc_pclk("p6_pclk4", "per6clk", clkrst6_base,
+                               BIT(4), 0);
+       PRCC_PCLK_STORE(clk, 6, 4);
+
+       clk = clk_reg_prcc_pclk("p6_pclk5", "per6clk", clkrst6_base,
+                               BIT(5), 0);
+       PRCC_PCLK_STORE(clk, 6, 5);
+
+       clk = clk_reg_prcc_pclk("p6_pclk6", "per6clk", clkrst6_base,
+                               BIT(6), 0);
+       PRCC_PCLK_STORE(clk, 6, 6);
+
+       clk = clk_reg_prcc_pclk("p6_pclk7", "per6clk", clkrst6_base,
+                               BIT(7), 0);
+       PRCC_PCLK_STORE(clk, 6, 7);
+
+       /* PRCC K-clocks
+        *
+        * FIXME: Some drivers requires PERPIH[n| to be automatically enabled
+        * by enabling just the K-clock, even if it is not a valid parent to
+        * the K-clock. Until drivers get fixed we might need some kind of
+        * "parent muxed join".
+        */
+
+       /* Periph1 */
+       clk = clk_reg_prcc_kclk("p1_uart0_kclk", "uartclk",
+                       clkrst1_base, BIT(0), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 0);
+
+       clk = clk_reg_prcc_kclk("p1_uart1_kclk", "uartclk",
+                       clkrst1_base, BIT(1), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 1);
+
+       clk = clk_reg_prcc_kclk("p1_i2c1_kclk", "i2cclk",
+                       clkrst1_base, BIT(2), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 2);
+
+       clk = clk_reg_prcc_kclk("p1_msp0_kclk", "msp02clk",
+                       clkrst1_base, BIT(3), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 3);
+
+       clk = clk_reg_prcc_kclk("p1_msp1_kclk", "msp1clk",
+                       clkrst1_base, BIT(4), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 4);
+
+       clk = clk_reg_prcc_kclk("p1_sdi0_kclk", "sdmmcclk",
+                       clkrst1_base, BIT(5), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 5);
+
+       clk = clk_reg_prcc_kclk("p1_i2c2_kclk", "i2cclk",
+                       clkrst1_base, BIT(6), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 6);
+
+       clk = clk_reg_prcc_kclk("p1_slimbus0_kclk", "slimclk",
+                       clkrst1_base, BIT(8), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 8);
+
+       clk = clk_reg_prcc_kclk("p1_i2c4_kclk", "i2cclk",
+                       clkrst1_base, BIT(9), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 9);
+
+       clk = clk_reg_prcc_kclk("p1_msp3_kclk", "msp1clk",
+                       clkrst1_base, BIT(10), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 1, 10);
+
+       /* Periph2 */
+       clk = clk_reg_prcc_kclk("p2_i2c3_kclk", "i2cclk",
+                       clkrst2_base, BIT(0), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 2, 0);
+
+       clk = clk_reg_prcc_kclk("p2_sdi4_kclk", "sdmmcclk",
+                       clkrst2_base, BIT(2), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 2, 2);
+
+       clk = clk_reg_prcc_kclk("p2_msp2_kclk", "msp02clk",
+                       clkrst2_base, BIT(3), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 2, 3);
+
+       clk = clk_reg_prcc_kclk("p2_sdi1_kclk", "sdmmcclk",
+                       clkrst2_base, BIT(4), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 2, 4);
+
+       clk = clk_reg_prcc_kclk("p2_sdi3_kclk", "sdmmcclk",
+                       clkrst2_base, BIT(5), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 2, 5);
+
+       /* Note that rate is received from parent. */
+       clk = clk_reg_prcc_kclk("p2_ssirx_kclk", "hsirxclk",
+                       clkrst2_base, BIT(6),
+                       CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT);
+       PRCC_KCLK_STORE(clk, 2, 6);
+
+       clk = clk_reg_prcc_kclk("p2_ssitx_kclk", "hsitxclk",
+                       clkrst2_base, BIT(7),
+                       CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT);
+       PRCC_KCLK_STORE(clk, 2, 7);
+
+       /* Periph3 */
+       clk = clk_reg_prcc_kclk("p3_ssp0_kclk", "sspclk",
+                       clkrst3_base, BIT(1), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 3, 1);
+
+       clk = clk_reg_prcc_kclk("p3_ssp1_kclk", "sspclk",
+                       clkrst3_base, BIT(2), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 3, 2);
+
+       clk = clk_reg_prcc_kclk("p3_i2c0_kclk", "i2cclk",
+                       clkrst3_base, BIT(3), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 3, 3);
+
+       clk = clk_reg_prcc_kclk("p3_sdi2_kclk", "sdmmcclk",
+                       clkrst3_base, BIT(4), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 3, 4);
+
+       clk = clk_reg_prcc_kclk("p3_ske_kclk", "rtc32k",
+                       clkrst3_base, BIT(5), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 3, 5);
+
+       clk = clk_reg_prcc_kclk("p3_uart2_kclk", "uartclk",
+                       clkrst3_base, BIT(6), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 3, 6);
+
+       clk = clk_reg_prcc_kclk("p3_sdi5_kclk", "sdmmcclk",
+                       clkrst3_base, BIT(7), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 3, 7);
+
+       /* Periph6 */
+       clk = clk_reg_prcc_kclk("p3_rng_kclk", "rngclk",
+                       clkrst6_base, BIT(0), CLK_SET_RATE_GATE);
+       PRCC_KCLK_STORE(clk, 6, 0);
+
+       for_each_child_of_node(np, child) {
+               static struct clk_onecell_data clk_data;
+
+               if (!of_node_cmp(child->name, "prcmu-clock")) {
+                       clk_data.clks = prcmu_clk;
+                       clk_data.clk_num = ARRAY_SIZE(prcmu_clk);
+                       of_clk_add_provider(child, of_clk_src_onecell_get, &clk_data);
+               }
+               if (!of_node_cmp(child->name, "prcc-periph-clock"))
+                       of_clk_add_provider(child, ux500_twocell_get, prcc_pclk);
+
+               if (!of_node_cmp(child->name, "prcc-kernel-clock"))
+                       of_clk_add_provider(child, ux500_twocell_get, prcc_kclk);
+
+               if (!of_node_cmp(child->name, "rtc32k-clock"))
+                       of_clk_add_provider(child, of_clk_src_simple_get, rtc_clk);
+
+               if (!of_node_cmp(child->name, "smp-twd-clock"))
+                       of_clk_add_provider(child, of_clk_src_simple_get, twd_clk);
+       }
+}
index f26258869deb22d4f2fd760b2139395ae25c9b0f..20c8add90d110db1575e0ccb5695499581853af5 100644 (file)
@@ -83,7 +83,7 @@ void u8540_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
        clk_register_clkdev(clk, NULL, "lcd");
        clk_register_clkdev(clk, "lcd", "mcde");
 
-       clk = clk_reg_prcmu_opp_gate("bmlclk", NULL, PRCMU_BML8580CLK,
+       clk = clk_reg_prcmu_opp_gate("bmlclk", NULL, PRCMU_BMLCLK,
                                CLK_IS_ROOT);
        clk_register_clkdev(clk, NULL, "bml");
 
index 17df6db5dca7df56729af877b561d99f8892a15e..8847adf392b7ecf823f9f603314c76001367203f 100644 (file)
@@ -15,8 +15,9 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/io.h>
-
-#include <asm/mach/irq.h>
+#include <linux/irq.h>
+#include <linux/platform_device.h>
+#include <linux/platform_data/gpio-davinci.h>
 
 struct davinci_gpio_regs {
        u32     dir;
@@ -31,13 +32,14 @@ struct davinci_gpio_regs {
        u32     intstat;
 };
 
+#define BINTEN 0x8 /* GPIO Interrupt Per-Bank Enable Register */
+
 #define chip2controller(chip)  \
        container_of(chip, struct davinci_gpio_controller, chip)
 
-static struct davinci_gpio_controller chips[DIV_ROUND_UP(DAVINCI_N_GPIO, 32)];
 static void __iomem *gpio_base;
 
-static struct davinci_gpio_regs __iomem __init *gpio2regs(unsigned gpio)
+static struct davinci_gpio_regs __iomem *gpio2regs(unsigned gpio)
 {
        void __iomem *ptr;
 
@@ -65,7 +67,7 @@ static inline struct davinci_gpio_regs __iomem *irq2regs(int irq)
        return g;
 }
 
-static int __init davinci_gpio_irq_setup(void);
+static int davinci_gpio_irq_setup(struct platform_device *pdev);
 
 /*--------------------------------------------------------------------------*/
 
@@ -131,33 +133,53 @@ davinci_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
        __raw_writel((1 << offset), value ? &g->set_data : &g->clr_data);
 }
 
-static int __init davinci_gpio_setup(void)
+static int davinci_gpio_probe(struct platform_device *pdev)
 {
        int i, base;
        unsigned ngpio;
-       struct davinci_soc_info *soc_info = &davinci_soc_info;
-       struct davinci_gpio_regs *regs;
-
-       if (soc_info->gpio_type != GPIO_TYPE_DAVINCI)
-               return 0;
+       struct davinci_gpio_controller *chips;
+       struct davinci_gpio_platform_data *pdata;
+       struct davinci_gpio_regs __iomem *regs;
+       struct device *dev = &pdev->dev;
+       struct resource *res;
+
+       pdata = dev->platform_data;
+       if (!pdata) {
+               dev_err(dev, "No platform data found\n");
+               return -EINVAL;
+       }
 
        /*
         * The gpio banks conceptually expose a segmented bitmap,
         * and "ngpio" is one more than the largest zero-based
         * bit index that's valid.
         */
-       ngpio = soc_info->gpio_num;
+       ngpio = pdata->ngpio;
        if (ngpio == 0) {
-               pr_err("GPIO setup:  how many GPIOs?\n");
+               dev_err(dev, "How many GPIOs?\n");
                return -EINVAL;
        }
 
        if (WARN_ON(DAVINCI_N_GPIO < ngpio))
                ngpio = DAVINCI_N_GPIO;
 
-       gpio_base = ioremap(soc_info->gpio_base, SZ_4K);
-       if (WARN_ON(!gpio_base))
+       chips = devm_kzalloc(dev,
+                            ngpio * sizeof(struct davinci_gpio_controller),
+                            GFP_KERNEL);
+       if (!chips) {
+               dev_err(dev, "Memory allocation failed\n");
                return -ENOMEM;
+       }
+
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       if (!res) {
+               dev_err(dev, "Invalid memory resource\n");
+               return -EBUSY;
+       }
+
+       gpio_base = devm_ioremap_resource(dev, res);
+       if (IS_ERR(gpio_base))
+               return PTR_ERR(gpio_base);
 
        for (i = 0, base = 0; base < ngpio; i++, base += 32) {
                chips[i].chip.label = "DaVinci";
@@ -183,13 +205,10 @@ static int __init davinci_gpio_setup(void)
                gpiochip_add(&chips[i].chip);
        }
 
-       soc_info->gpio_ctlrs = chips;
-       soc_info->gpio_ctlrs_num = DIV_ROUND_UP(ngpio, 32);
-
-       davinci_gpio_irq_setup();
+       platform_set_drvdata(pdev, chips);
+       davinci_gpio_irq_setup(pdev);
        return 0;
 }
-pure_initcall(davinci_gpio_setup);
 
 /*--------------------------------------------------------------------------*/
 /*
@@ -302,13 +321,14 @@ static int gpio_to_irq_banked(struct gpio_chip *chip, unsigned offset)
 
 static int gpio_to_irq_unbanked(struct gpio_chip *chip, unsigned offset)
 {
-       struct davinci_soc_info *soc_info = &davinci_soc_info;
+       struct davinci_gpio_controller *d = chip2controller(chip);
 
-       /* NOTE:  we assume for now that only irqs in the first gpio_chip
+       /*
+        * NOTE:  we assume for now that only irqs in the first gpio_chip
         * can provide direct-mapped IRQs to AINTC (up to 32 GPIOs).
         */
-       if (offset < soc_info->gpio_unbanked)
-               return soc_info->gpio_irq + offset;
+       if (offset < d->irq_base)
+               return d->gpio_irq + offset;
        else
                return -ENODEV;
 }
@@ -317,12 +337,11 @@ static int gpio_irq_type_unbanked(struct irq_data *data, unsigned trigger)
 {
        struct davinci_gpio_controller *d;
        struct davinci_gpio_regs __iomem *g;
-       struct davinci_soc_info *soc_info = &davinci_soc_info;
        u32 mask;
 
        d = (struct davinci_gpio_controller *)data->handler_data;
        g = (struct davinci_gpio_regs __iomem *)d->regs;
-       mask = __gpio_mask(data->irq - soc_info->gpio_irq);
+       mask = __gpio_mask(data->irq - d->gpio_irq);
 
        if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))
                return -EINVAL;
@@ -343,24 +362,33 @@ static int gpio_irq_type_unbanked(struct irq_data *data, unsigned trigger)
  * (dm6446) can be set appropriately for GPIOV33 pins.
  */
 
-static int __init davinci_gpio_irq_setup(void)
+static int davinci_gpio_irq_setup(struct platform_device *pdev)
 {
        unsigned        gpio, irq, bank;
        struct clk      *clk;
        u32             binten = 0;
        unsigned        ngpio, bank_irq;
-       struct davinci_soc_info *soc_info = &davinci_soc_info;
-       struct davinci_gpio_regs        __iomem *g;
+       struct device *dev = &pdev->dev;
+       struct resource *res;
+       struct davinci_gpio_controller *chips = platform_get_drvdata(pdev);
+       struct davinci_gpio_platform_data *pdata = dev->platform_data;
+       struct davinci_gpio_regs __iomem *g;
 
-       ngpio = soc_info->gpio_num;
+       ngpio = pdata->ngpio;
+       res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+       if (!res) {
+               dev_err(dev, "Invalid IRQ resource\n");
+               return -EBUSY;
+       }
 
-       bank_irq = soc_info->gpio_irq;
-       if (bank_irq == 0) {
-               printk(KERN_ERR "Don't know first GPIO bank IRQ.\n");
-               return -EINVAL;
+       bank_irq = res->start;
+
+       if (!bank_irq) {
+               dev_err(dev, "Invalid IRQ resource\n");
+               return -ENODEV;
        }
 
-       clk = clk_get(NULL, "gpio");
+       clk = devm_clk_get(dev, "gpio");
        if (IS_ERR(clk)) {
                printk(KERN_ERR "Error %ld getting gpio clock?\n",
                       PTR_ERR(clk));
@@ -368,16 +396,17 @@ static int __init davinci_gpio_irq_setup(void)
        }
        clk_prepare_enable(clk);
 
-       /* Arrange gpio_to_irq() support, handling either direct IRQs or
+       /*
+        * Arrange gpio_to_irq() support, handling either direct IRQs or
         * banked IRQs.  Having GPIOs in the first GPIO bank use direct
         * IRQs, while the others use banked IRQs, would need some setup
         * tweaks to recognize hardware which can do that.
         */
        for (gpio = 0, bank = 0; gpio < ngpio; bank++, gpio += 32) {
                chips[bank].chip.to_irq = gpio_to_irq_banked;
-               chips[bank].irq_base = soc_info->gpio_unbanked
+               chips[bank].irq_base = pdata->gpio_unbanked
                        ? -EINVAL
-                       : (soc_info->intc_irq_num + gpio);
+                       : (pdata->intc_irq_num + gpio);
        }
 
        /*
@@ -385,7 +414,7 @@ static int __init davinci_gpio_irq_setup(void)
         * controller only handling trigger modes.  We currently assume no
         * IRQ mux conflicts; gpio_irq_type_unbanked() is only for GPIOs.
         */
-       if (soc_info->gpio_unbanked) {
+       if (pdata->gpio_unbanked) {
                static struct irq_chip_type gpio_unbanked;
 
                /* pass "bank 0" GPIO IRQs to AINTC */
@@ -405,7 +434,7 @@ static int __init davinci_gpio_irq_setup(void)
                __raw_writel(~0, &g->set_rising);
 
                /* set the direct IRQs up to use that irqchip */
-               for (gpio = 0; gpio < soc_info->gpio_unbanked; gpio++, irq++) {
+               for (gpio = 0; gpio < pdata->gpio_unbanked; gpio++, irq++) {
                        irq_set_chip(irq, &gpio_unbanked.chip);
                        irq_set_handler_data(irq, &chips[gpio / 32]);
                        irq_set_status_flags(irq, IRQ_TYPE_EDGE_BOTH);
@@ -450,12 +479,31 @@ static int __init davinci_gpio_irq_setup(void)
        }
 
 done:
-       /* BINTEN -- per-bank interrupt enable. genirq would also let these
+       /*
+        * BINTEN -- per-bank interrupt enable. genirq would also let these
         * bits be set/cleared dynamically.
         */
-       __raw_writel(binten, gpio_base + 0x08);
+       __raw_writel(binten, gpio_base + BINTEN);
 
        printk(KERN_INFO "DaVinci: %d gpio irqs\n", irq - gpio_to_irq(0));
 
        return 0;
 }
+
+static struct platform_driver davinci_gpio_driver = {
+       .probe          = davinci_gpio_probe,
+       .driver         = {
+               .name   = "davinci_gpio",
+               .owner  = THIS_MODULE,
+       },
+};
+
+/**
+ * GPIO driver registration needs to be done before machine_init functions
+ * access GPIO. Hence davinci_gpio_drv_reg() is a postcore_initcall.
+ */
+static int __init davinci_gpio_drv_reg(void)
+{
+       return platform_driver_register(&davinci_gpio_driver);
+}
+postcore_initcall(davinci_gpio_drv_reg);
index 358a21c2d811bc6637960ed167ae8e95260ecfca..29b5d6777dc541dc9c55e1bdf1df93237117b364 100644 (file)
@@ -2082,34 +2082,14 @@ static __init int samsung_gpiolib_init(void)
        int i, nr_chips;
        int group = 0;
 
-#if defined(CONFIG_PINCTRL_EXYNOS) || defined(CONFIG_PINCTRL_EXYNOS5440)
        /*
-       * This gpio driver includes support for device tree support and there
-       * are platforms using it. In order to maintain compatibility with those
-       * platforms, and to allow non-dt Exynos4210 platforms to use this
-       * gpiolib support, a check is added to find out if there is a active
-       * pin-controller driver support available. If it is available, this
-       * gpiolib support is ignored and the gpiolib support available in
-       * pin-controller driver is used. This is a temporary check and will go
-       * away when all of the Exynos4210 platforms have switched to using
-       * device tree and the pin-ctrl driver.
-       */
-       struct device_node *pctrl_np;
-       static const struct of_device_id exynos_pinctrl_ids[] = {
-               { .compatible = "samsung,s3c2412-pinctrl", },
-               { .compatible = "samsung,s3c2416-pinctrl", },
-               { .compatible = "samsung,s3c2440-pinctrl", },
-               { .compatible = "samsung,s3c2450-pinctrl", },
-               { .compatible = "samsung,exynos4210-pinctrl", },
-               { .compatible = "samsung,exynos4x12-pinctrl", },
-               { .compatible = "samsung,exynos5250-pinctrl", },
-               { .compatible = "samsung,exynos5440-pinctrl", },
-               { }
-       };
-       for_each_matching_node(pctrl_np, exynos_pinctrl_ids)
-               if (pctrl_np && of_device_is_available(pctrl_np))
-                       return -ENODEV;
-#endif
+        * Currently there are two drivers that can provide GPIO support for
+        * Samsung SoCs. For device tree enabled platforms, the new
+        * pinctrl-samsung driver is used, providing both GPIO and pin control
+        * interfaces. For legacy (non-DT) platforms this driver is used.
+        */
+       if (of_have_populated_dt())
+               return -ENODEV;
 
        samsung_gpiolib_set_cfg(samsung_gpio_cfgs, ARRAY_SIZE(samsung_gpio_cfgs));
 
index 3fa3e2867e19b8dfcbd3ca2275b0fbd194cb0693..58445bb69106c71ab648263e731e12151e48c911 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/gpio.h>
+#include <linux/platform_data/gpio-davinci.h>
 
 #include <mach/common.h>
 #include <mach/tnetv107x.h>
index 02906ca99b41c4583ca6c3adb18f309ec88ffad5..3f7f59cc8b5ff36a807a4315eb6469999ea95869 100644 (file)
@@ -197,8 +197,8 @@ comment "IDE chipset support/bugfixes"
 
 config IDE_GENERIC
        tristate "generic/default IDE chipset support"
-       depends on ALPHA || X86 || IA64 || M32R || MIPS || ARCH_RPC || ARCH_SHARK
-       default ARM && (ARCH_RPC || ARCH_SHARK)
+       depends on ALPHA || X86 || IA64 || M32R || MIPS || ARCH_RPC
+       default ARM && ARCH_RPC
        help
          This is the generic IDE driver.  This driver attaches to the
          fixed legacy ports (e.g. on PCs 0x1f0/0x170, 0x1e8/0x168 and
index 33b3e88fe4a2312f0047a4a700a2733c9ef81ee4..1de1e5f8f7956dad40a745a08c7d4026f1370e28 100644 (file)
@@ -21,7 +21,7 @@ if SERIO
 config SERIO_I8042
        tristate "i8042 PC Keyboard controller" if EXPERT || !X86
        default y
-       depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && \
+       depends on !PARISC && (!ARM || FOOTBRIDGE_HOST) && \
                   (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN && !S390 && \
                   !ARC
        help
index bb328a366122851b0d28308e13079dfb3ad146d2..433cc8568dec803c78957d12e9bb9b15d7e4ff00 100644 (file)
 #include <linux/io.h>
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
+#include <linux/of_pci.h>
 #include <linux/irqdomain.h>
+#include <linux/slab.h>
+#include <linux/msi.h>
 #include <asm/mach/arch.h>
 #include <asm/exception.h>
 #include <asm/smp_plat.h>
 #define IPI_DOORBELL_START                      (0)
 #define IPI_DOORBELL_END                        (8)
 #define IPI_DOORBELL_MASK                       0xFF
+#define PCI_MSI_DOORBELL_START                  (16)
+#define PCI_MSI_DOORBELL_NR                     (16)
+#define PCI_MSI_DOORBELL_END                    (32)
+#define PCI_MSI_DOORBELL_MASK                   0xFFFF0000
 
 static DEFINE_RAW_SPINLOCK(irq_controller_lock);
 
 static void __iomem *per_cpu_int_base;
 static void __iomem *main_int_base;
 static struct irq_domain *armada_370_xp_mpic_domain;
+#ifdef CONFIG_PCI_MSI
+static struct irq_domain *armada_370_xp_msi_domain;
+static DECLARE_BITMAP(msi_used, PCI_MSI_DOORBELL_NR);
+static DEFINE_MUTEX(msi_used_lock);
+static phys_addr_t msi_doorbell_addr;
+#endif
 
 /*
  * In SMP mode:
@@ -87,6 +100,144 @@ static void armada_370_xp_irq_unmask(struct irq_data *d)
                                ARMADA_370_XP_INT_CLEAR_MASK_OFFS);
 }
 
+#ifdef CONFIG_PCI_MSI
+
+static int armada_370_xp_alloc_msi(void)
+{
+       int hwirq;
+
+       mutex_lock(&msi_used_lock);
+       hwirq = find_first_zero_bit(&msi_used, PCI_MSI_DOORBELL_NR);
+       if (hwirq >= PCI_MSI_DOORBELL_NR)
+               hwirq = -ENOSPC;
+       else
+               set_bit(hwirq, msi_used);
+       mutex_unlock(&msi_used_lock);
+
+       return hwirq;
+}
+
+static void armada_370_xp_free_msi(int hwirq)
+{
+       mutex_lock(&msi_used_lock);
+       if (!test_bit(hwirq, msi_used))
+               pr_err("trying to free unused MSI#%d\n", hwirq);
+       else
+               clear_bit(hwirq, msi_used);
+       mutex_unlock(&msi_used_lock);
+}
+
+static int armada_370_xp_setup_msi_irq(struct msi_chip *chip,
+                                      struct pci_dev *pdev,
+                                      struct msi_desc *desc)
+{
+       struct msi_msg msg;
+       irq_hw_number_t hwirq;
+       int virq;
+
+       hwirq = armada_370_xp_alloc_msi();
+       if (hwirq < 0)
+               return hwirq;
+
+       virq = irq_create_mapping(armada_370_xp_msi_domain, hwirq);
+       if (!virq) {
+               armada_370_xp_free_msi(hwirq);
+               return -EINVAL;
+       }
+
+       irq_set_msi_desc(virq, desc);
+
+       msg.address_lo = msi_doorbell_addr;
+       msg.address_hi = 0;
+       msg.data = 0xf00 | (hwirq + 16);
+
+       write_msi_msg(virq, &msg);
+       return 0;
+}
+
+static void armada_370_xp_teardown_msi_irq(struct msi_chip *chip,
+                                          unsigned int irq)
+{
+       struct irq_data *d = irq_get_irq_data(irq);
+       irq_dispose_mapping(irq);
+       armada_370_xp_free_msi(d->hwirq);
+}
+
+static struct irq_chip armada_370_xp_msi_irq_chip = {
+       .name = "armada_370_xp_msi_irq",
+       .irq_enable = unmask_msi_irq,
+       .irq_disable = mask_msi_irq,
+       .irq_mask = mask_msi_irq,
+       .irq_unmask = unmask_msi_irq,
+};
+
+static int armada_370_xp_msi_map(struct irq_domain *domain, unsigned int virq,
+                                irq_hw_number_t hw)
+{
+       irq_set_chip_and_handler(virq, &armada_370_xp_msi_irq_chip,
+                                handle_simple_irq);
+       set_irq_flags(virq, IRQF_VALID);
+
+       return 0;
+}
+
+static const struct irq_domain_ops armada_370_xp_msi_irq_ops = {
+       .map = armada_370_xp_msi_map,
+};
+
+static int armada_370_xp_msi_init(struct device_node *node,
+                                 phys_addr_t main_int_phys_base)
+{
+       struct msi_chip *msi_chip;
+       u32 reg;
+       int ret;
+
+       msi_doorbell_addr = main_int_phys_base +
+               ARMADA_370_XP_SW_TRIG_INT_OFFS;
+
+       msi_chip = kzalloc(sizeof(*msi_chip), GFP_KERNEL);
+       if (!msi_chip)
+               return -ENOMEM;
+
+       msi_chip->setup_irq = armada_370_xp_setup_msi_irq;
+       msi_chip->teardown_irq = armada_370_xp_teardown_msi_irq;
+       msi_chip->of_node = node;
+
+       armada_370_xp_msi_domain =
+               irq_domain_add_linear(NULL, PCI_MSI_DOORBELL_NR,
+                                     &armada_370_xp_msi_irq_ops,
+                                     NULL);
+       if (!armada_370_xp_msi_domain) {
+               kfree(msi_chip);
+               return -ENOMEM;
+       }
+
+       ret = of_pci_msi_chip_add(msi_chip);
+       if (ret < 0) {
+               irq_domain_remove(armada_370_xp_msi_domain);
+               kfree(msi_chip);
+               return ret;
+       }
+
+       reg = readl(per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_MSK_OFFS)
+               | PCI_MSI_DOORBELL_MASK;
+
+       writel(reg, per_cpu_int_base +
+              ARMADA_370_XP_IN_DRBEL_MSK_OFFS);
+
+       /* Unmask IPI interrupt */
+       writel(1, per_cpu_int_base + ARMADA_370_XP_INT_CLEAR_MASK_OFFS);
+
+       return 0;
+}
+#else
+static inline int armada_370_xp_msi_init(struct device_node *node,
+                                        phys_addr_t main_int_phys_base)
+{
+       return 0;
+}
+#endif
+
 #ifdef CONFIG_SMP
 static int armada_xp_set_affinity(struct irq_data *d,
                                  const struct cpumask *mask_val, bool force)
@@ -214,12 +365,39 @@ armada_370_xp_handle_irq(struct pt_regs *regs)
                if (irqnr > 1022)
                        break;
 
-               if (irqnr > 0) {
+               if (irqnr > 1) {
                        irqnr = irq_find_mapping(armada_370_xp_mpic_domain,
                                        irqnr);
                        handle_IRQ(irqnr, regs);
                        continue;
                }
+
+#ifdef CONFIG_PCI_MSI
+               /* MSI handling */
+               if (irqnr == 1) {
+                       u32 msimask, msinr;
+
+                       msimask = readl_relaxed(per_cpu_int_base +
+                                               ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS)
+                               & PCI_MSI_DOORBELL_MASK;
+
+                       writel(~PCI_MSI_DOORBELL_MASK, per_cpu_int_base +
+                              ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS);
+
+                       for (msinr = PCI_MSI_DOORBELL_START;
+                            msinr < PCI_MSI_DOORBELL_END; msinr++) {
+                               int irq;
+
+                               if (!(msimask & BIT(msinr)))
+                                       continue;
+
+                               irq = irq_find_mapping(armada_370_xp_msi_domain,
+                                                      msinr - 16);
+                               handle_IRQ(irq, regs);
+                       }
+               }
+#endif
+
 #ifdef CONFIG_SMP
                /* IPI Handling */
                if (irqnr == 0) {
@@ -248,12 +426,25 @@ armada_370_xp_handle_irq(struct pt_regs *regs)
 static int __init armada_370_xp_mpic_of_init(struct device_node *node,
                                             struct device_node *parent)
 {
+       struct resource main_int_res, per_cpu_int_res;
        u32 control;
 
-       main_int_base = of_iomap(node, 0);
-       per_cpu_int_base = of_iomap(node, 1);
+       BUG_ON(of_address_to_resource(node, 0, &main_int_res));
+       BUG_ON(of_address_to_resource(node, 1, &per_cpu_int_res));
+
+       BUG_ON(!request_mem_region(main_int_res.start,
+                                  resource_size(&main_int_res),
+                                  node->full_name));
+       BUG_ON(!request_mem_region(per_cpu_int_res.start,
+                                  resource_size(&per_cpu_int_res),
+                                  node->full_name));
 
+       main_int_base = ioremap(main_int_res.start,
+                               resource_size(&main_int_res));
        BUG_ON(!main_int_base);
+
+       per_cpu_int_base = ioremap(per_cpu_int_res.start,
+                                  resource_size(&per_cpu_int_res));
        BUG_ON(!per_cpu_int_base);
 
        control = readl(main_int_base + ARMADA_370_XP_INT_CONTROL);
@@ -262,8 +453,7 @@ static int __init armada_370_xp_mpic_of_init(struct device_node *node,
                irq_domain_add_linear(node, (control >> 2) & 0x3ff,
                                &armada_370_xp_mpic_irq_ops, NULL);
 
-       if (!armada_370_xp_mpic_domain)
-               panic("Unable to add Armada_370_Xp MPIC irq domain (DT)\n");
+       BUG_ON(!armada_370_xp_mpic_domain);
 
        irq_set_default_host(armada_370_xp_mpic_domain);
 
@@ -280,6 +470,8 @@ static int __init armada_370_xp_mpic_of_init(struct device_node *node,
 
 #endif
 
+       armada_370_xp_msi_init(node, main_int_res.start);
+
        set_handle_irq(armada_370_xp_handle_irq);
 
        return 0;
index 2bbb00404cf5001df2c6f8654de6d467d58f3b6d..8e21ae0bab4658a2ee2beb15a07a7a396411261f 100644 (file)
@@ -469,6 +469,8 @@ void __init vic_init(void __iomem *base, unsigned int irq_start,
 int __init vic_of_init(struct device_node *node, struct device_node *parent)
 {
        void __iomem *regs;
+       u32 interrupt_mask = ~0;
+       u32 wakeup_mask = ~0;
 
        if (WARN(parent, "non-root VICs are not supported"))
                return -EINVAL;
@@ -477,10 +479,13 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent)
        if (WARN_ON(!regs))
                return -EIO;
 
+       of_property_read_u32(node, "valid-mask", &interrupt_mask);
+       of_property_read_u32(node, "valid-wakeup-mask", &wakeup_mask);
+
        /*
         * Passing 0 as first IRQ makes the simple domain allocate descriptors
         */
-       __vic_init(regs, 0, ~0, ~0, node);
+       __vic_init(regs, 0, interrupt_mask, wakeup_mask, node);
 
        return 0;
 }
index 53f371dcbb6e96550537b108fffbba1c00af3015..b9ce60c301de026bba38daf276e83773c44379ec 100644 (file)
@@ -480,7 +480,6 @@ static struct clk_mgt clk_mgt[PRCMU_NUM_REG_CLOCKS] = {
        CLK_MGT_ENTRY(PER6CLK, PLL_DIV, true),
        CLK_MGT_ENTRY(PER7CLK, PLL_DIV, true),
        CLK_MGT_ENTRY(LCDCLK, PLL_FIX, true),
-       CLK_MGT_ENTRY(BML8580CLK, PLL_DIV, true),
        CLK_MGT_ENTRY(BMLCLK, PLL_DIV, true),
        CLK_MGT_ENTRY(HSITXCLK, PLL_DIV, true),
        CLK_MGT_ENTRY(HSIRXCLK, PLL_DIV, true),
index 4f6f0fa5d3b7768d4265b632f4e1620be22c347b..7cc32a8ff01c01b06e8d29ae44134253d81828ba 100644 (file)
@@ -32,7 +32,6 @@
 #define PRCM_PER7CLK_MGT       (0x040)
 #define PRCM_LCDCLK_MGT                (0x044)
 #define PRCM_BMLCLK_MGT                (0x04C)
-#define PRCM_BML8580CLK_MGT    (0x108)
 #define PRCM_HSITXCLK_MGT      (0x050)
 #define PRCM_HSIRXCLK_MGT      (0x054)
 #define PRCM_HDMICLK_MGT       (0x058)
index 3d950481112634fc847d61fef187efc86503a189..43186feb4294598b570727e5382263fbffbb1d0d 100644 (file)
@@ -3,7 +3,7 @@ menu "PCI host controller drivers"
 
 config PCI_MVEBU
        bool "Marvell EBU PCIe controller"
-       depends on ARCH_MVEBU || ARCH_KIRKWOOD
+       depends on ARCH_MVEBU || ARCH_DOVE || ARCH_KIRKWOOD
        depends on OF
 
 config PCIE_DW
index 729d5a101d621ece6d36b425ad213a48a57a859f..77f8a7c5859771aaad870d36d362411155731bcb 100644 (file)
@@ -9,13 +9,17 @@
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/clk.h>
+#include <linux/delay.h>
+#include <linux/gpio.h>
 #include <linux/module.h>
 #include <linux/mbus.h>
+#include <linux/msi.h>
 #include <linux/slab.h>
 #include <linux/platform_device.h>
 #include <linux/of_address.h>
-#include <linux/of_pci.h>
 #include <linux/of_irq.h>
+#include <linux/of_gpio.h>
+#include <linux/of_pci.h>
 #include <linux/of_platform.h>
 
 /*
@@ -103,6 +107,7 @@ struct mvebu_pcie_port;
 struct mvebu_pcie {
        struct platform_device *pdev;
        struct mvebu_pcie_port *ports;
+       struct msi_chip *msi;
        struct resource io;
        struct resource realio;
        struct resource mem;
@@ -124,6 +129,9 @@ struct mvebu_pcie_port {
        unsigned int io_target;
        unsigned int io_attr;
        struct clk *clk;
+       int reset_gpio;
+       int reset_active_low;
+       char *reset_name;
        struct mvebu_sw_pci_bridge bridge;
        struct device_node *dn;
        struct mvebu_pcie *pcie;
@@ -163,7 +171,7 @@ static void mvebu_pcie_set_local_dev_nr(struct mvebu_pcie_port *port, int nr)
  * BAR[0,2] -> disabled, BAR[1] -> covers all DRAM banks
  * WIN[0-3] -> DRAM bank[0-3]
  */
-static void __init mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)
+static void mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)
 {
        const struct mbus_dram_target_info *dram;
        u32 size;
@@ -215,7 +223,7 @@ static void __init mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)
               port->base + PCIE_BAR_CTRL_OFF(1));
 }
 
-static void __init mvebu_pcie_setup_hw(struct mvebu_pcie_port *port)
+static void mvebu_pcie_setup_hw(struct mvebu_pcie_port *port)
 {
        u16 cmd;
        u32 mask;
@@ -626,7 +634,7 @@ static struct pci_ops mvebu_pcie_ops = {
        .write = mvebu_pcie_wr_conf,
 };
 
-static int __init mvebu_pcie_setup(int nr, struct pci_sys_data *sys)
+static int mvebu_pcie_setup(int nr, struct pci_sys_data *sys)
 {
        struct mvebu_pcie *pcie = sys_to_pcie(sys);
        int i;
@@ -645,7 +653,7 @@ static int __init mvebu_pcie_setup(int nr, struct pci_sys_data *sys)
        return 1;
 }
 
-static int __init mvebu_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+static int mvebu_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        struct of_irq oirq;
        int ret;
@@ -673,6 +681,12 @@ static struct pci_bus *mvebu_pcie_scan_bus(int nr, struct pci_sys_data *sys)
        return bus;
 }
 
+void mvebu_pcie_add_bus(struct pci_bus *bus)
+{
+       struct mvebu_pcie *pcie = sys_to_pcie(bus->sysdata);
+       bus->msi = pcie->msi;
+}
+
 resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev,
                                          const struct resource *res,
                                          resource_size_t start,
@@ -696,7 +710,7 @@ resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev,
                return start;
 }
 
-static void __init mvebu_pcie_enable(struct mvebu_pcie *pcie)
+static void mvebu_pcie_enable(struct mvebu_pcie *pcie)
 {
        struct hw_pci hw;
 
@@ -709,6 +723,7 @@ static void __init mvebu_pcie_enable(struct mvebu_pcie *pcie)
        hw.map_irq        = mvebu_pcie_map_irq;
        hw.ops            = &mvebu_pcie_ops;
        hw.align_resource = mvebu_pcie_align_resource;
+       hw.add_bus        = mvebu_pcie_add_bus;
 
        pci_common_init(&hw);
 }
@@ -718,10 +733,8 @@ static void __init mvebu_pcie_enable(struct mvebu_pcie *pcie)
  * <...> property for one that matches the given port/lane. Once
  * found, maps it.
  */
-static void __iomem * __init
-mvebu_pcie_map_registers(struct platform_device *pdev,
-                        struct device_node *np,
-                        struct mvebu_pcie_port *port)
+static void __iomem *mvebu_pcie_map_registers(struct platform_device *pdev,
+                     struct device_node *np, struct mvebu_pcie_port *port)
 {
        struct resource regs;
        int ret = 0;
@@ -777,7 +790,22 @@ static int mvebu_get_tgt_attr(struct device_node *np, int devfn,
        return -ENOENT;
 }
 
-static int __init mvebu_pcie_probe(struct platform_device *pdev)
+static void mvebu_pcie_msi_enable(struct mvebu_pcie *pcie)
+{
+       struct device_node *msi_node;
+
+       msi_node = of_parse_phandle(pcie->pdev->dev.of_node,
+                                   "msi-parent", 0);
+       if (!msi_node)
+               return;
+
+       pcie->msi = of_pci_find_msi_chip_by_node(msi_node);
+
+       if (pcie->msi)
+               pcie->msi->dev = &pcie->pdev->dev;
+}
+
+static int mvebu_pcie_probe(struct platform_device *pdev)
 {
        struct mvebu_pcie *pcie;
        struct device_node *np = pdev->dev.of_node;
@@ -790,6 +818,7 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        pcie->pdev = pdev;
+       platform_set_drvdata(pdev, pcie);
 
        /* Get the PCIe memory and I/O aperture */
        mvebu_mbus_get_pcie_mem_aperture(&pcie->mem);
@@ -818,13 +847,14 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev)
                return ret;
        }
 
+       i = 0;
        for_each_child_of_node(pdev->dev.of_node, child) {
                if (!of_device_is_available(child))
                        continue;
-               pcie->nports++;
+               i++;
        }
 
-       pcie->ports = devm_kzalloc(&pdev->dev, pcie->nports *
+       pcie->ports = devm_kzalloc(&pdev->dev, i *
                                   sizeof(struct mvebu_pcie_port),
                                   GFP_KERNEL);
        if (!pcie->ports)
@@ -833,6 +863,7 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev)
        i = 0;
        for_each_child_of_node(pdev->dev.of_node, child) {
                struct mvebu_pcie_port *port = &pcie->ports[i];
+               enum of_gpio_flags flags;
 
                if (!of_device_is_available(child))
                        continue;
@@ -873,11 +904,47 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev)
                        continue;
                }
 
+               port->reset_gpio = of_get_named_gpio_flags(child,
+                                                  "reset-gpios", 0, &flags);
+               if (gpio_is_valid(port->reset_gpio)) {
+                       u32 reset_udelay = 20000;
+
+                       port->reset_active_low = flags & OF_GPIO_ACTIVE_LOW;
+                       port->reset_name = kasprintf(GFP_KERNEL,
+                                    "pcie%d.%d-reset", port->port, port->lane);
+                       of_property_read_u32(child, "reset-delay-us",
+                                            &reset_udelay);
+
+                       ret = devm_gpio_request_one(&pdev->dev,
+                           port->reset_gpio, GPIOF_DIR_OUT, port->reset_name);
+                       if (ret) {
+                               if (ret == -EPROBE_DEFER)
+                                       return ret;
+                               continue;
+                       }
+
+                       gpio_set_value(port->reset_gpio,
+                                      (port->reset_active_low) ? 1 : 0);
+                       msleep(reset_udelay/1000);
+               }
+
+               port->clk = of_clk_get_by_name(child, NULL);
+               if (IS_ERR(port->clk)) {
+                       dev_err(&pdev->dev, "PCIe%d.%d: cannot get clock\n",
+                              port->port, port->lane);
+                       continue;
+               }
+
+               ret = clk_prepare_enable(port->clk);
+               if (ret)
+                       continue;
+
                port->base = mvebu_pcie_map_registers(pdev, child, port);
                if (IS_ERR(port->base)) {
                        dev_err(&pdev->dev, "PCIe%d.%d: cannot map registers\n",
                                port->port, port->lane);
                        port->base = NULL;
+                       clk_disable_unprepare(port->clk);
                        continue;
                }
 
@@ -893,25 +960,14 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev)
                                 port->port, port->lane);
                }
 
-               port->clk = of_clk_get_by_name(child, NULL);
-               if (IS_ERR(port->clk)) {
-                       dev_err(&pdev->dev, "PCIe%d.%d: cannot get clock\n",
-                              port->port, port->lane);
-                       iounmap(port->base);
-                       port->haslink = 0;
-                       continue;
-               }
-
                port->dn = child;
-
-               clk_prepare_enable(port->clk);
                spin_lock_init(&port->conf_lock);
-
                mvebu_sw_pci_bridge_init(port);
-
                i++;
        }
 
+       pcie->nports = i;
+       mvebu_pcie_msi_enable(pcie);
        mvebu_pcie_enable(pcie);
 
        return 0;
@@ -920,6 +976,7 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev)
 static const struct of_device_id mvebu_pcie_of_match_table[] = {
        { .compatible = "marvell,armada-xp-pcie", },
        { .compatible = "marvell,armada-370-pcie", },
+       { .compatible = "marvell,dove-pcie", },
        { .compatible = "marvell,kirkwood-pcie", },
        {},
 };
@@ -931,16 +988,12 @@ static struct platform_driver mvebu_pcie_driver = {
                .name = "mvebu-pcie",
                .of_match_table =
                   of_match_ptr(mvebu_pcie_of_match_table),
+               /* driver unloading/unbinding currently not supported */
+               .suppress_bind_attrs = true,
        },
+       .probe = mvebu_pcie_probe,
 };
-
-static int __init mvebu_pcie_init(void)
-{
-       return platform_driver_probe(&mvebu_pcie_driver,
-                                    mvebu_pcie_probe);
-}
-
-subsys_initcall(mvebu_pcie_init);
+module_platform_driver(mvebu_pcie_driver);
 
 MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>");
 MODULE_DESCRIPTION("Marvell EBU PCIe driver");
index 59256b12f7469fe9170ec0fa7db0bee3cbbed6da..c844499e44792caaf492f5c310bc2b00245a9445 100644 (file)
@@ -259,7 +259,7 @@ static int ux500_probe(struct platform_device *pdev)
                goto err1;
        }
 
-       clk = clk_get(&pdev->dev, "usb");
+       clk = clk_get(&pdev->dev, NULL);
        if (IS_ERR(clk)) {
                dev_err(&pdev->dev, "failed to get clock\n");
                ret = PTR_ERR(clk);
index 57886787ead020687d1f05d40230d62c1db096fa..1c446bc48b42fdefca1861de934271840901e61c 100644 (file)
@@ -1641,67 +1641,6 @@ static void cyberpro_common_resume(struct cfb_info *cfb)
        cyber2000fb_set_par(&cfb->fb);
 }
 
-#ifdef CONFIG_ARCH_SHARK
-
-#include <mach/framebuffer.h>
-
-static int cyberpro_vl_probe(void)
-{
-       struct cfb_info *cfb;
-       int err = -ENOMEM;
-
-       if (!request_mem_region(FB_START, FB_SIZE, "CyberPro2010"))
-               return err;
-
-       cfb = cyberpro_alloc_fb_info(ID_CYBERPRO_2010, "CyberPro2010");
-       if (!cfb)
-               goto failed_release;
-
-       cfb->irq = -1;
-       cfb->region = ioremap(FB_START, FB_SIZE);
-       if (!cfb->region)
-               goto failed_ioremap;
-
-       cfb->regs = cfb->region + MMIO_OFFSET;
-       cfb->fb.device = NULL;
-       cfb->fb.fix.mmio_start = FB_START + MMIO_OFFSET;
-       cfb->fb.fix.smem_start = FB_START;
-
-       /*
-        * Bring up the hardware.  This is expected to enable access
-        * to the linear memory region, and allow access to the memory
-        * mapped registers.  Also, mem_ctl1 and mem_ctl2 must be
-        * initialised.
-        */
-       cyber2000fb_writeb(0x18, 0x46e8, cfb);
-       cyber2000fb_writeb(0x01, 0x102, cfb);
-       cyber2000fb_writeb(0x08, 0x46e8, cfb);
-       cyber2000fb_writeb(EXT_BIU_MISC, 0x3ce, cfb);
-       cyber2000fb_writeb(EXT_BIU_MISC_LIN_ENABLE, 0x3cf, cfb);
-
-       cfb->mclk_mult = 0xdb;
-       cfb->mclk_div  = 0x54;
-
-       err = cyberpro_common_probe(cfb);
-       if (err)
-               goto failed;
-
-       if (int_cfb_info == NULL)
-               int_cfb_info = cfb;
-
-       return 0;
-
-failed:
-       iounmap(cfb->region);
-failed_ioremap:
-       cyberpro_free_fb_info(cfb);
-failed_release:
-       release_mem_region(FB_START, FB_SIZE);
-
-       return err;
-}
-#endif /* CONFIG_ARCH_SHARK */
-
 /*
  * PCI specific support.
  */
@@ -1948,28 +1887,19 @@ static int __init cyber2000fb_init(void)
        cyber2000fb_setup(option);
 #endif
 
-#ifdef CONFIG_ARCH_SHARK
-       err = cyberpro_vl_probe();
-       if (!err)
-               ret = 0;
-#endif
-#ifdef CONFIG_PCI
        err = pci_register_driver(&cyberpro_driver);
        if (!err)
                ret = 0;
-#endif
 
        return ret ? err : 0;
 }
 module_init(cyber2000fb_init);
 
-#ifndef CONFIG_ARCH_SHARK
 static void __exit cyberpro_exit(void)
 {
        pci_unregister_driver(&cyberpro_driver);
 }
 module_exit(cyberpro_exit);
-#endif
 
 MODULE_AUTHOR("Russell King");
 MODULE_DESCRIPTION("CyberPro 2000, 2010 and 5000 framebuffer driver");
diff --git a/include/dt-bindings/mfd/dbx500-prcmu.h b/include/dt-bindings/mfd/dbx500-prcmu.h
new file mode 100644 (file)
index 0000000..552a2d1
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * This header provides constants for the PRCMU bindings.
+ *
+ */
+
+#ifndef _DT_BINDINGS_MFD_PRCMU_H
+#define _DT_BINDINGS_MFD_PRCMU_H
+
+/*
+ * Clock identifiers.
+ */
+#define ARMCLK                 0
+#define PRCMU_ACLK             1
+#define PRCMU_SVAMMCSPCLK      2
+#define PRCMU_SDMMCHCLK        2  /* DBx540 only. */
+#define PRCMU_SIACLK           3
+#define PRCMU_SIAMMDSPCLK      3  /* DBx540 only. */
+#define PRCMU_SGACLK           4
+#define PRCMU_UARTCLK          5
+#define PRCMU_MSP02CLK                 6
+#define PRCMU_MSP1CLK          7
+#define PRCMU_I2CCLK           8
+#define PRCMU_SDMMCCLK                 9
+#define PRCMU_SLIMCLK          10
+#define PRCMU_CAMCLK           10 /* DBx540 only. */
+#define PRCMU_PER1CLK          11
+#define PRCMU_PER2CLK          12
+#define PRCMU_PER3CLK          13
+#define PRCMU_PER5CLK          14
+#define PRCMU_PER6CLK          15
+#define PRCMU_PER7CLK          16
+#define PRCMU_LCDCLK           17
+#define PRCMU_BMLCLK           18
+#define PRCMU_HSITXCLK                 19
+#define PRCMU_HSIRXCLK                 20
+#define PRCMU_HDMICLK          21
+#define PRCMU_APEATCLK                 22
+#define PRCMU_APETRACECLK      23
+#define PRCMU_MCDECLK                  24
+#define PRCMU_IPI2CCLK         25
+#define PRCMU_DSIALTCLK        26
+#define PRCMU_DMACLK           27
+#define PRCMU_B2R2CLK                  28
+#define PRCMU_TVCLK            29
+#define SPARE_UNIPROCLK        30
+#define PRCMU_SSPCLK           31
+#define PRCMU_RNGCLK           32
+#define PRCMU_UICCCLK                  33
+#define PRCMU_G1CLK             34 /* DBx540 only. */
+#define PRCMU_HVACLK            35 /* DBx540 only. */
+#define PRCMU_SPARE1CLK                36
+#define PRCMU_SPARE2CLK                37
+
+#define PRCMU_NUM_REG_CLOCKS   38
+
+#define PRCMU_RTCCLK           PRCMU_NUM_REG_CLOCKS
+#define PRCMU_SYSCLK           39
+#define PRCMU_CDCLK            40
+#define PRCMU_TIMCLK           41
+#define PRCMU_PLLSOC0                  42
+#define PRCMU_PLLSOC1                  43
+#define PRCMU_ARMSS            44
+#define PRCMU_PLLDDR           45
+
+/* DSI Clocks */
+#define PRCMU_PLLDSI           46
+#define PRCMU_DSI0CLK          47
+#define PRCMU_DSI1CLK                  48
+#define PRCMU_DSI0ESCCLK       49
+#define PRCMU_DSI1ESCCLK       50
+#define PRCMU_DSI2ESCCLK       51
+
+/* LCD DSI PLL - Ux540 only */
+#define PRCMU_PLLDSI_LCD        52
+#define PRCMU_DSI0CLK_LCD       53
+#define PRCMU_DSI1CLK_LCD       54
+#define PRCMU_DSI0ESCCLK_LCD    55
+#define PRCMU_DSI1ESCCLK_LCD    56
+#define PRCMU_DSI2ESCCLK_LCD    57
+
+#define PRCMU_NUM_CLKS         58
+
+#endif
index edbd250809cb6d415e893a2d26a9d6db302925fd..bed35e36fd2748515ed75f47c9d642462223c852 100644 (file)
@@ -23,7 +23,7 @@
 #define PULL_UP                        (1 << 4)
 #define ALTELECTRICALSEL       (1 << 5)
 
-/* 34xx specific mux bit defines */
+/* omap3/4/5 specific mux bit defines */
 #define INPUT_EN               (1 << 8)
 #define OFF_EN                 (1 << 9)
 #define OFFOUT_EN              (1 << 10)
@@ -31,8 +31,6 @@
 #define OFF_PULL_EN            (1 << 12)
 #define OFF_PULL_UP            (1 << 13)
 #define WAKEUP_EN              (1 << 14)
-
-/* 44xx specific mux bit defines */
 #define WAKEUP_EVENT           (1 << 15)
 
 /* Active pin states */
index 90c30dc3efc773abe3a8bdf9c18620209738b1ba..5138a90e018c981ce5fa8291351a2bb84303fd2e 100644 (file)
@@ -9,8 +9,6 @@
 #ifndef __LINUX_CLK_MXS_H
 #define __LINUX_CLK_MXS_H
 
-int mx23_clocks_init(void);
-int mx28_clocks_init(void);
 int mxs_saif_clkmux_select(unsigned int clkmux);
 
 #endif
diff --git a/include/linux/clk/sunxi.h b/include/linux/clk/sunxi.h
deleted file mode 100644 (file)
index e074fdd..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2012 Maxime Ripard
- *
- * Maxime Ripard <maxime.ripard@free-electrons.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef __LINUX_CLK_SUNXI_H_
-#define __LINUX_CLK_SUNXI_H_
-
-void __init sunxi_init_clocks(void);
-
-#endif
index ca0790fba2f5d60abbe975fa3547c363c525f443..060e11256fbcf8866afc23d900134d4040c7a59a 100644 (file)
@@ -12,6 +12,8 @@
 #include <linux/notifier.h>
 #include <linux/err.h>
 
+#include <dt-bindings/mfd/dbx500-prcmu.h> /* For clock identifiers */
+
 /* Offset for the firmware version within the TCPM */
 #define DB8500_PRCMU_FW_VERSION_OFFSET 0xA4
 #define DBX540_PRCMU_FW_VERSION_OFFSET 0xA8
@@ -94,74 +96,6 @@ enum prcmu_wakeup_index {
 #define PRCMU_CLKSRC_ARMCLKFIX         0x46
 #define PRCMU_CLKSRC_HDMICLK           0x47
 
-/*
- * Clock identifiers.
- */
-enum prcmu_clock {
-       PRCMU_SGACLK,
-       PRCMU_UARTCLK,
-       PRCMU_MSP02CLK,
-       PRCMU_MSP1CLK,
-       PRCMU_I2CCLK,
-       PRCMU_SDMMCCLK,
-       PRCMU_SPARE1CLK,
-       PRCMU_SLIMCLK,
-       PRCMU_PER1CLK,
-       PRCMU_PER2CLK,
-       PRCMU_PER3CLK,
-       PRCMU_PER5CLK,
-       PRCMU_PER6CLK,
-       PRCMU_PER7CLK,
-       PRCMU_LCDCLK,
-       PRCMU_BMLCLK,
-       PRCMU_HSITXCLK,
-       PRCMU_HSIRXCLK,
-       PRCMU_HDMICLK,
-       PRCMU_APEATCLK,
-       PRCMU_APETRACECLK,
-       PRCMU_MCDECLK,
-       PRCMU_IPI2CCLK,
-       PRCMU_DSIALTCLK,
-       PRCMU_DMACLK,
-       PRCMU_B2R2CLK,
-       PRCMU_TVCLK,
-       PRCMU_SSPCLK,
-       PRCMU_RNGCLK,
-       PRCMU_UICCCLK,
-       PRCMU_PWMCLK,
-       PRCMU_IRDACLK,
-       PRCMU_IRRCCLK,
-       PRCMU_SIACLK,
-       PRCMU_SVACLK,
-       PRCMU_ACLK,
-       PRCMU_HVACLK, /* Ux540 only */
-       PRCMU_G1CLK, /* Ux540 only */
-       PRCMU_SDMMCHCLK,
-       PRCMU_CAMCLK,
-       PRCMU_BML8580CLK,
-       PRCMU_NUM_REG_CLOCKS,
-       PRCMU_SYSCLK = PRCMU_NUM_REG_CLOCKS,
-       PRCMU_CDCLK,
-       PRCMU_TIMCLK,
-       PRCMU_PLLSOC0,
-       PRCMU_PLLSOC1,
-       PRCMU_ARMSS,
-       PRCMU_PLLDDR,
-       PRCMU_PLLDSI,
-       PRCMU_DSI0CLK,
-       PRCMU_DSI1CLK,
-       PRCMU_DSI0ESCCLK,
-       PRCMU_DSI1ESCCLK,
-       PRCMU_DSI2ESCCLK,
-       /* LCD DSI PLL - Ux540 only */
-       PRCMU_PLLDSI_LCD,
-       PRCMU_DSI0CLK_LCD,
-       PRCMU_DSI1CLK_LCD,
-       PRCMU_DSI0ESCCLK_LCD,
-       PRCMU_DSI1ESCCLK_LCD,
-       PRCMU_DSI2ESCCLK_LCD,
-};
-
 /**
  * enum prcmu_wdog_id - PRCMU watchdog IDs
  * @PRCMU_WDOG_ALL: use all timers
diff --git a/include/linux/platform_data/clk-nomadik.h b/include/linux/platform_data/clk-nomadik.h
deleted file mode 100644 (file)
index 5713c87..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Minimal platform data header */
-void nomadik_clk_init(void);
index 9d98f3aaa16c7637b42a8de33530aab4df9137ac..97baf831e07114c04b5e3d4163738da98b0ba5be 100644 (file)
@@ -10,6 +10,9 @@
 #ifndef __CLK_UX500_H
 #define __CLK_UX500_H
 
+void u8500_of_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
+                      u32 clkrst5_base, u32 clkrst6_base);
+
 void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
                    u32 clkrst5_base, u32 clkrst6_base);
 void u9540_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
diff --git a/include/linux/platform_data/gpio-davinci.h b/include/linux/platform_data/gpio-davinci.h
new file mode 100644 (file)
index 0000000..6efd202
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * DaVinci GPIO Platform Related Defines
+ *
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __DAVINCI_GPIO_PLATFORM_H
+#define __DAVINCI_GPIO_PLATFORM_H
+
+#include <linux/io.h>
+#include <linux/spinlock.h>
+
+#include <asm-generic/gpio.h>
+
+enum davinci_gpio_type {
+       GPIO_TYPE_TNETV107X = 0,
+};
+
+struct davinci_gpio_platform_data {
+       u32     ngpio;
+       u32     gpio_unbanked;
+       u32     intc_irq_num;
+};
+
+
+struct davinci_gpio_controller {
+       struct gpio_chip        chip;
+       int                     irq_base;
+       /* Serialize access to GPIO registers */
+       spinlock_t              lock;
+       void __iomem            *regs;
+       void __iomem            *set_data;
+       void __iomem            *clr_data;
+       void __iomem            *in_data;
+       int                     gpio_unbanked;
+       unsigned                gpio_irq;
+};
+
+/*
+ * basic gpio routines
+ */
+#define        GPIO(X)         (X)     /* 0 <= X <= (DAVINCI_N_GPIO - 1) */
+
+/* Convert GPIO signal to GPIO pin number */
+#define GPIO_TO_PIN(bank, gpio)        (16 * (bank) + (gpio))
+
+static inline u32 __gpio_mask(unsigned gpio)
+{
+       return 1 << (gpio % 32);
+}
+#endif