]> Pileus Git - ~andy/linux/blobdiff - arch/arm/mach-shmobile/board-bockw.c
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[~andy/linux] / arch / arm / mach-shmobile / board-bockw.c
index 330e84c14f8eed5da35eabcf5b27844d9c9be53c..38611526fe9a55953372afcd2662aa668b34e080 100644 (file)
@@ -196,6 +196,8 @@ static struct rcar_phy_platform_data usb_phy_platform_data __initdata =
 
 /* 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,
@@ -206,6 +208,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,
@@ -269,10 +277,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 = {                    \
@@ -288,6 +292,30 @@ static struct soc_camera_link iclink##idx##_ml86v7667 __initdata = {       \
 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),
@@ -548,11 +576,17 @@ static void __init bockw_init(void)
        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));