]> Git Repo - linux.git/commitdiff
Merge tag 'boards-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
authorLinus Torvalds <[email protected]>
Mon, 11 Nov 2013 07:57:16 +0000 (16:57 +0900)
committerLinus Torvalds <[email protected]>
Mon, 11 Nov 2013 07:57:16 +0000 (16:57 +0900)
Pull ARM SoC board updates from Olof Johansson:
 "Board-related updates.  This branch is getting smaller and smaller,
  which is the whole idea so that's reassuring.

  Right now by far most of the code is related to shmobile updates, and
  they are now switching over to removal of board code and migration to
  multiplatform, so we'll see their board code base shrink in the near
  future too, I hope.

  In addition to that is some defconfig updates, some display updates
  for OMAP and a bit of new board support for Rockchip boards"

* tag 'boards-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (56 commits)
  ARM: rockchip: add support for rk3188 and Radxa Rock board
  ARM: rockchip: add dts for bqcurie2 tablet
  ARM: rockchip: enable arm-global-timer
  ARM: rockchip: move shared dt properties to common source file
  ARM: OMAP2+: display: Create omap_vout device inside omap_display_init
  ARM: OMAP2+: display: Create omapvrfb and omapfb devices inside omap_display_init
  ARM: OMAP2+: display: Create omapdrm device inside omap_display_init
  ARM: OMAP2+: drm: Don't build device for DMM
  ARM: tegra: defconfig updates
  RX-51: Add support for OMAP3 ROM Random Number Generator
  ARM: OMAP3: RX-51: ARM errata 430973 workaround
  ARM: OMAP3: Add secure function omap_smc3() which calling instruction smc #1
  ARM: shmobile: marzen: enable INTC IRQ
  ARM: shmobile: bockw: add SMSC support on reference
  ARM: shmobile: Use SMP on Koelsch
  ARM: shmobile: Remove KZM9D reference DTS
  ARM: shmobile: Let KZM9D multiplatform boot with KZM9D DTB
  ARM: shmobile: Remove non-multiplatform KZM9D reference support
  ARM: shmobile: Use KZM9D without reference for multiplatform
  ARM: shmobile: Sync KZM9D DTS with KZM9D reference DTS
  ...

1  2 
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/rk3066a.dtsi
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/omap-secure.h
arch/arm/mach-rockchip/Kconfig
arch/arm/mach-shmobile/board-ape6evm.c
arch/arm/mach-shmobile/board-bockw.c
arch/arm/mach-shmobile/board-lager.c

index c485157b0b5be91ec087d00c723a9a08956ab1d7,6ff3139b4d8a9748d193e11ec610f7f6bdd82525..7662b71628cdbf7ef09e54d1f989cb07c28accca
@@@ -103,8 -103,8 +103,8 @@@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood
        kirkwood-ts219-6282.dtb \
        kirkwood-openblocks_a6.dtb
  dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb
 -dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
 -      msm8960-cdp.dtb
 +dtb-$(CONFIG_ARCH_MSM) += qcom-msm8660-surf.dtb \
 +      qcom-msm8960-cdp.dtb
  dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
        armada-370-mirabox.dtb \
        armada-370-netgear-rn102.dtb \
@@@ -198,13 -198,14 +198,14 @@@ dtb-$(CONFIG_ARCH_U8500) += ste-snowbal
        ste-ccu9540.dtb
  dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb
  dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
-       emev2-kzm9d-reference.dtb \
+       r7s72100-genmai.dtb \
        r8a7740-armadillo800eva.dtb \
        r8a7778-bockw.dtb \
        r8a7778-bockw-reference.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 \
        r8a73a4-ape6evm.dtb \
        r8a73a4-ape6evm-reference.dtb \
        sh7372-mackerel.dtb
- dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d-reference.dtb
+ dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb
  dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_cyclone5.dtb \
        socfpga_vt.dtb
  dtb-$(CONFIG_ARCH_SPEAR13XX) += spear1310-evb.dtb \
index 98f3597a6a3570c7dd19adbbef1febf93b0db8ea,2218c64410de6c27c93d3acb15bd748be633dca2..be5d2b09a363d15c66c648ab5079c9d1312226ce
   */
  
  #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/interrupt-controller/irq.h>
- #include <dt-bindings/interrupt-controller/arm-gic.h>
  #include <dt-bindings/pinctrl/rockchip.h>
- #include "skeleton.dtsi"
+ #include "rk3xxx.dtsi"
  #include "rk3066a-clocks.dtsi"
  
  / {
        compatible = "rockchip,rk3066a";
-       interrupt-parent = <&gic>;
  
        cpus {
                #address-cells = <1>;
        };
  
        soc {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               compatible = "simple-bus";
-               ranges;
-               gic: interrupt-controller@1013d000 {
-                       compatible = "arm,cortex-a9-gic";
-                       interrupt-controller;
-                       #interrupt-cells = <3>;
-                       reg = <0x1013d000 0x1000>,
-                             <0x1013c100 0x0100>;
-               };
-               L2: l2-cache-controller@10138000 {
-                       compatible = "arm,pl310-cache";
-                       reg = <0x10138000 0x1000>;
-                       cache-unified;
-                       cache-level = <2>;
-               };
-               local-timer@1013c600 {
-                       compatible = "arm,cortex-a9-twd-timer";
-                       reg = <0x1013c600 0x20>;
-                       interrupts = <GIC_PPI 13 0x304>;
-                       clocks = <&dummy150m>;
-               };
                timer@20038000 {
                        compatible = "snps,dw-apb-timer-osc";
                        reg = <0x20038000 0x100>;
                                uart0_xfer: uart0-xfer {
                                        rockchip,pins = <RK_GPIO1 0 RK_FUNC_1 &pcfg_pull_default>,
                                                        <RK_GPIO1 1 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
  
                                uart0_cts: uart0-cts {
                                        rockchip,pins = <RK_GPIO1 2 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
  
                                uart0_rts: uart0-rts {
                                        rockchip,pins = <RK_GPIO1 3 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
                        };
  
                                uart1_xfer: uart1-xfer {
                                        rockchip,pins = <RK_GPIO1 4 RK_FUNC_1 &pcfg_pull_default>,
                                                        <RK_GPIO1 5 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
  
                                uart1_cts: uart1-cts {
                                        rockchip,pins = <RK_GPIO1 6 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
  
                                uart1_rts: uart1-rts {
                                        rockchip,pins = <RK_GPIO1 7 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
                        };
  
                                uart2_xfer: uart2-xfer {
                                        rockchip,pins = <RK_GPIO1 8 RK_FUNC_1 &pcfg_pull_default>,
                                                        <RK_GPIO1 9 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
                                /* no rts / cts for uart2 */
                        };
                                uart3_xfer: uart3-xfer {
                                        rockchip,pins = <RK_GPIO3 27 RK_FUNC_1 &pcfg_pull_default>,
                                                        <RK_GPIO3 28 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
  
                                uart3_cts: uart3-cts {
                                        rockchip,pins = <RK_GPIO3 29 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
  
                                uart3_rts: uart3-rts {
                                        rockchip,pins = <RK_GPIO3 30 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
                        };
  
                        sd0 {
                                sd0_clk: sd0-clk {
                                        rockchip,pins = <RK_GPIO3 8 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
  
                                sd0_cmd: sd0-cmd {
                                        rockchip,pins = <RK_GPIO3 9 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
  
                                sd0_cd: sd0-cd {
                                        rockchip,pins = <RK_GPIO3 14 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
  
                                sd0_wp: sd0-wp {
                                        rockchip,pins = <RK_GPIO3 15 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
  
                                sd0_bus1: sd0-bus-width1 {
                                        rockchip,pins = <RK_GPIO3 10 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
  
                                sd0_bus4: sd0-bus-width4 {
                                                        <RK_GPIO3 11 RK_FUNC_1 &pcfg_pull_default>,
                                                        <RK_GPIO3 12 RK_FUNC_1 &pcfg_pull_default>,
                                                        <RK_GPIO3 13 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
                        };
  
                        sd1 {
                                sd1_clk: sd1-clk {
                                        rockchip,pins = <RK_GPIO3 21 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
  
                                sd1_cmd: sd1-cmd {
                                        rockchip,pins = <RK_GPIO3 16 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
  
                                sd1_cd: sd1-cd {
                                        rockchip,pins = <RK_GPIO3 22 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
  
                                sd1_wp: sd1-wp {
                                        rockchip,pins = <RK_GPIO3 23 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
  
                                sd1_bus1: sd1-bus-width1 {
                                        rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
  
                                sd1_bus4: sd1-bus-width4 {
                                                        <RK_GPIO3 18 RK_FUNC_1 &pcfg_pull_default>,
                                                        <RK_GPIO3 19 RK_FUNC_1 &pcfg_pull_default>,
                                                        <RK_GPIO3 20 RK_FUNC_1 &pcfg_pull_default>;
 -                                      rockchip,config = <&pcfg_pull_default>;
                                };
                        };
                };
-               uart0: serial@10124000 {
-                       compatible = "snps,dw-apb-uart";
-                       reg = <0x10124000 0x400>;
-                       interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
-                       reg-shift = <2>;
-                       reg-io-width = <1>;
-                       clocks = <&clk_gates1 8>;
-                       status = "disabled";
-               };
-               uart1: serial@10126000 {
-                       compatible = "snps,dw-apb-uart";
-                       reg = <0x10126000 0x400>;
-                       interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
-                       reg-shift = <2>;
-                       reg-io-width = <1>;
-                       clocks = <&clk_gates1 10>;
-                       status = "disabled";
-               };
-               uart2: serial@20064000 {
-                       compatible = "snps,dw-apb-uart";
-                       reg = <0x20064000 0x400>;
-                       interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
-                       reg-shift = <2>;
-                       reg-io-width = <1>;
-                       clocks = <&clk_gates1 12>;
-                       status = "disabled";
-               };
-               uart3: serial@20068000 {
-                       compatible = "snps,dw-apb-uart";
-                       reg = <0x20068000 0x400>;
-                       interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
-                       reg-shift = <2>;
-                       reg-io-width = <1>;
-                       clocks = <&clk_gates1 14>;
-                       status = "disabled";
-               };
-               dwmmc@10214000 {
-                       compatible = "rockchip,rk2928-dw-mshc";
-                       reg = <0x10214000 0x1000>;
-                       interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       clocks = <&clk_gates5 10>, <&clk_gates2 11>;
-                       clock-names = "biu", "ciu";
-                       status = "disabled";
-               };
-               dwmmc@10218000 {
-                       compatible = "rockchip,rk2928-dw-mshc";
-                       reg = <0x10218000 0x1000>;
-                       interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       clocks = <&clk_gates5 11>, <&clk_gates2 13>;
-                       clock-names = "biu", "ciu";
-                       status = "disabled";
-               };
        };
  };
index cb7b527d61bd40641eee6f8a02e5fe3b1c86ef54,e59bec01dd25696ed15705061f9869eac1a3d41b..9b7619f2c1acf94eb269ccdd5268b0900a2e2976
@@@ -8,7 -8,7 +8,7 @@@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) :
  # Common support
  obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \
         common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
-        omap_device.o sram.o
+        omap_device.o sram.o drm.o
  
  omap-2-3-common                               = irq.o
  hwmod-common                          = omap_hwmod.o omap_hwmod_reset.o \
@@@ -112,13 -112,13 +112,13 @@@ obj-$(CONFIG_ARCH_OMAP2)                += prm2xxx_3x
  obj-$(CONFIG_ARCH_OMAP3)              += prm2xxx_3xxx.o prm3xxx.o cm3xxx.o
  obj-$(CONFIG_ARCH_OMAP3)              += vc3xxx_data.o vp3xxx_data.o
  obj-$(CONFIG_SOC_AM33XX)              += prm33xx.o cm33xx.o
 -obj-$(CONFIG_SOC_AM43XX)              += prm33xx.o cm33xx.o
  omap-prcm-4-5-common                  =  cminst44xx.o cm44xx.o prm44xx.o \
                                           prcm_mpu44xx.o prminst44xx.o \
                                           vc44xx_data.o vp44xx_data.o
  obj-$(CONFIG_ARCH_OMAP4)              += $(omap-prcm-4-5-common)
  obj-$(CONFIG_SOC_OMAP5)                       += $(omap-prcm-4-5-common)
  obj-$(CONFIG_SOC_DRA7XX)              += $(omap-prcm-4-5-common)
 +obj-$(CONFIG_SOC_AM43XX)              += $(omap-prcm-4-5-common)
  
  # OMAP voltage domains
  voltagedomain-common                  := voltage.o vc.o vp.o
@@@ -146,7 -146,6 +146,7 @@@ obj-$(CONFIG_ARCH_OMAP4)           += powerdomai
  obj-$(CONFIG_SOC_AM33XX)              += $(powerdomain-common)
  obj-$(CONFIG_SOC_AM33XX)              += powerdomains33xx_data.o
  obj-$(CONFIG_SOC_AM43XX)              += $(powerdomain-common)
 +obj-$(CONFIG_SOC_AM43XX)              += powerdomains43xx_data.o
  obj-$(CONFIG_SOC_OMAP5)                       += $(powerdomain-common)
  obj-$(CONFIG_SOC_OMAP5)                       += powerdomains54xx_data.o
  obj-$(CONFIG_SOC_DRA7XX)              += $(powerdomain-common)
@@@ -166,7 -165,6 +166,7 @@@ obj-$(CONFIG_ARCH_OMAP4)           += clockdomai
  obj-$(CONFIG_SOC_AM33XX)              += $(clockdomain-common)
  obj-$(CONFIG_SOC_AM33XX)              += clockdomains33xx_data.o
  obj-$(CONFIG_SOC_AM43XX)              += $(clockdomain-common)
 +obj-$(CONFIG_SOC_AM43XX)              += clockdomains43xx_data.o
  obj-$(CONFIG_SOC_OMAP5)                       += $(clockdomain-common)
  obj-$(CONFIG_SOC_OMAP5)                       += clockdomains54xx_data.o
  obj-$(CONFIG_SOC_DRA7XX)              += $(clockdomain-common)
@@@ -212,11 -210,6 +212,11 @@@ obj-$(CONFIG_ARCH_OMAP3)         += omap_hwmod
  obj-$(CONFIG_ARCH_OMAP3)              += omap_hwmod_2xxx_3xxx_interconnect_data.o
  obj-$(CONFIG_ARCH_OMAP3)              += omap_hwmod_3xxx_data.o
  obj-$(CONFIG_SOC_AM33XX)              += omap_hwmod_33xx_data.o
 +obj-$(CONFIG_SOC_AM33XX)              += omap_hwmod_33xx_43xx_interconnect_data.o
 +obj-$(CONFIG_SOC_AM33XX)              += omap_hwmod_33xx_43xx_ipblock_data.o
 +obj-$(CONFIG_SOC_AM43XX)              += omap_hwmod_43xx_data.o
 +obj-$(CONFIG_SOC_AM43XX)              += omap_hwmod_33xx_43xx_interconnect_data.o
 +obj-$(CONFIG_SOC_AM43XX)              += omap_hwmod_33xx_43xx_ipblock_data.o
  obj-$(CONFIG_ARCH_OMAP4)              += omap_hwmod_44xx_data.o
  obj-$(CONFIG_SOC_OMAP5)                       += omap_hwmod_54xx_data.o
  obj-$(CONFIG_SOC_DRA7XX)              += omap_hwmod_7xx_data.o
@@@ -235,10 -228,6 +235,6 @@@ endi
  # OMAP2420 MSDI controller integration support ("MMC")
  obj-$(CONFIG_SOC_OMAP2420)            += msdi.o
  
- ifneq ($(CONFIG_DRM_OMAP),)
- obj-y                                 += drm.o
- endif
  # Specific board support
  obj-$(CONFIG_MACH_OMAP_GENERIC)               += board-generic.o
  obj-$(CONFIG_MACH_OMAP_H4)            += board-h4.o
index f6fe388af9895ef8c8b2859f9177a146a30fb965,497d2604c7c5a761aff2450f083932e1af42e0f2..5c0d0e12042099876be304992f66bc6934fb7ea4
@@@ -57,6 -57,8 +57,8 @@@
  #include "common-board-devices.h"
  #include "gpmc.h"
  #include "gpmc-onenand.h"
+ #include "soc.h"
+ #include "omap-secure.h"
  
  #define SYSTEM_REV_B_USES_VAUX3       0x1699
  #define SYSTEM_REV_S_USES_VAUX3 0x8
@@@ -167,47 -169,38 +169,47 @@@ static struct lp55xx_led_config rx51_lp
                .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,
        }
  };
  
@@@ -1298,6 -1291,22 +1300,22 @@@ static void __init rx51_init_twl4030_hw
        platform_device_register(&madc_hwmon);
  }
  
+ static struct platform_device omap3_rom_rng_device = {
+       .name           = "omap3-rom-rng",
+       .id             = -1,
+       .dev    = {
+               .platform_data  = rx51_secure_rng_call,
+       },
+ };
+ static void __init rx51_init_omap3_rom_rng(void)
+ {
+       if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
+               pr_info("RX-51: Registring OMAP3 HWRNG device\n");
+               platform_device_register(&omap3_rom_rng_device);
+       }
+ }
  void __init rx51_peripherals_init(void)
  {
        rx51_i2c_init();
  
        rx51_charger_init();
        rx51_init_twl4030_hwmon();
+       rx51_init_omap3_rom_rng();
  }
  
index a5ee09d20ac983bc64f00e55f192063a8b86b695,f6cabb0033fcc9345b26f1b15958ae9ec3ee710b..8cc7d331437d844a3b0ba5b3d2afb844b2de5d06
@@@ -3,6 -3,8 +3,8 @@@
   *
   * Copyright (C) 2011 Texas Instruments, Inc.
   *    Santosh Shilimkar <[email protected]>
+  * Copyright (C) 2012 Ivaylo Dimitrov <[email protected]>
+  * Copyright (C) 2013 Pali Rohár <[email protected]>
   *
   * 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
  #define OMAP4_MON_L2X0_AUXCTRL_INDEX  0x109
  #define OMAP4_MON_L2X0_PREFETCH_INDEX 0x113
  
 +#define OMAP5_DRA7_MON_SET_CNTFRQ_INDEX       0x109
 +
  /* Secure PPA(Primary Protected Application) APIs */
  #define OMAP4_PPA_L2_POR_INDEX                0x23
  #define OMAP4_PPA_CPU_ACTRL_SMP_INDEX 0x25
  
+ /* Secure RX-51 PPA (Primary Protected Application) APIs */
+ #define RX51_PPA_HWRNG                        29
+ #define RX51_PPA_L2_INVAL             40
+ #define RX51_PPA_WRITE_ACR            42
  #ifndef __ASSEMBLER__
  
  extern u32 omap_secure_dispatcher(u32 idx, u32 flag, u32 nargs,
                                u32 arg1, u32 arg2, u32 arg3, u32 arg4);
  extern u32 omap_smc2(u32 id, u32 falg, u32 pargs);
+ extern u32 omap_smc3(u32 id, u32 process, u32 flag, u32 pargs);
  extern phys_addr_t omap_secure_ram_mempool_base(void);
  extern int omap_secure_ram_reserve_memblock(void);
  
+ extern u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs,
+                                 u32 arg1, u32 arg2, u32 arg3, u32 arg4);
+ extern u32 rx51_secure_update_aux_cr(u32 set_bits, u32 clear_bits);
+ extern u32 rx51_secure_rng_call(u32 ptr, u32 count, u32 flag);
  #ifdef CONFIG_OMAP4_ERRATA_I688
  extern int omap_barrier_reserve_memblock(void);
  #else
  static inline void omap_barrier_reserve_memblock(void)
  { }
  #endif
 +
 +void set_cntfreq(void);
  #endif /* __ASSEMBLER__ */
  #endif /* OMAP_ARCH_OMAP_SECURE_H */
index a8487337344a963f11cbe17672f5d92a70a264ff,6fef4647b6fe462a65e6b285081a8ef21b50d0c2..cf073dea5784b3c0fa125f1931305c55706f81e3
@@@ -5,11 -5,14 +5,13 @@@ config ARCH_ROCKCHI
        select ARCH_REQUIRE_GPIOLIB
        select ARM_GIC
        select CACHE_L2X0
 -      select HAVE_ARM_TWD if LOCAL_TIMERS
 +      select HAVE_ARM_TWD if SMP
        select HAVE_SMP
 -      select LOCAL_TIMERS if SMP
        select COMMON_CLK
        select GENERIC_CLOCKEVENTS
        select DW_APB_TIMER_OF
+       select ARM_GLOBAL_TIMER
+       select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
        help
          Support for Rockchip's Cortex-A9 Single-to-Quad-Core-SoCs
          containing the RK2928, RK30xx and RK31xx series.
index 1e9313a419ef499a2e58df161270ef6eca61619c,2de4b097aa1bf2419e4c74cb1fcd594bd8503651..0fa068e30a3001992952a41230cf9ca609793c72
@@@ -86,7 -86,7 +86,7 @@@ static struct gpio_keys_button gpio_but
        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,58 +113,58 @@@ static const struct smsc911x_platform_c
  };
  
  /*
-  * 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,
+       .slave_id_tx    = SHDMA_SLAVE_MMCIF0_TX,
+       .slave_id_rx    = SHDMA_SLAVE_MMCIF0_RX,
+       .ccs_unsupported = true,
  };
  
  static const struct resource mmcif0_resources[] __initconst = {
@@@ -215,14 -251,19 +251,19 @@@ static void __init ape6evm_add_standard
        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 f2bf61bf2521ce2b8426f26bce1b78fc1e776999,421cf1c229dc97c574823eb7d8da51a6bf1bd2f4..38611526fe9a55953372afcd2662aa668b34e080
  #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,16 -128,76 +128,76 @@@ static struct resource smsc911x_resourc
        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 = {
+       .dma_slave_tx   = HPBDMA_SLAVE_SDHI0_TX,
+       .dma_slave_rx   = HPBDMA_SLAVE_SDHI0_RX,
        .tmio_caps      = MMC_CAP_SD_HIGHSPEED,
        .tmio_ocr_mask  = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
        .tmio_flags     = TMIO_MMC_HAS_IDLE_WAIT,
@@@ -101,12 -208,6 +208,12 @@@ static struct resource sdhi0_resources[
        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,
  static struct i2c_board_info i2c0_devices[] = {
        {
                I2C_BOARD_INFO("rx8581", 0x51),
-       },
+       }, {
+               I2C_BOARD_INFO("ak4643", 0x12),
+       }
  };
  
  /* HSPI*/
@@@ -168,6 -271,10 +277,6 @@@ static struct sh_mmcif_plat_data sh_mmc
                          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 = {                   \
@@@ -183,31 -290,213 +292,237 @@@ static struct soc_camera_link iclink##i
  BOCKW_CAMERA(0);
  BOCKW_CAMERA(1);
  
 +/* 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);
 +
+ /* 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",
+               },
+       }
+ };
  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"),
        /* 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",
                                  "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));
  
  
        /* for SMSC */
-       base = ioremap_nocache(FPGA, SZ_1M);
-       if (base) {
+       fpga = ioremap_nocache(FPGA, SZ_1M);
+       if (fpga) {
                /*
                 * CAUTION
                 *
                 * 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));
                        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 = {
@@@ -352,5 -670,5 +702,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
index fd6146ca7a5af23630fe4a67cf7371af796fcd21,32183a39354b2cf0275da0b867cfac12d18a7711..a8d3ce646fb900514fa983964bf8d70d0e88c278
@@@ -28,6 -28,7 +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[] = {
        {
        },
  };
  
 -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 +129,7 @@@ static struct gpio_keys_button gpio_but
        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 +141,38 @@@ static struct regulator_consumer_suppl
  };
  
  /* 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 +220,8 @@@ static void __init lager_add_standard_d
                                          ether_resources,
                                          ARRAY_SIZE(ether_resources),
                                          &ether_pdata, sizeof(ether_pdata));
+       lager_add_du_device();
  }
  
  /*
@@@ -180,7 -248,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,
  };
This page took 0.119039 seconds and 4 git commands to generate.