]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge tag 'davinci-for-v3.10/board-2-v2' of git://git.kernel.org/pub/scm/linux/kernel...
authorOlof Johansson <olof@lixom.net>
Thu, 18 Apr 2013 06:54:41 +0000 (23:54 -0700)
committerOlof Johansson <olof@lixom.net>
Thu, 18 Apr 2013 06:54:41 +0000 (23:54 -0700)
From Sekhar Nori:
v3.10 board updates for DaVinci

This set of patches enables remoteproc support
on DA850 EVM and fixes some sparse warnings for
the same board.

* tag 'davinci-for-v3.10/board-2-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci:
  ARM: davinci: da850 evm: fix const qualifier placement
  ARM: davinci: da850 board: add remoteproc support
  ARM: davinci: ensure global variables are declared
  ARM: davinci: sram.c: fix incorrect type in assignment
  ARM: davinci: da8xx dt: make file local symbols static
  ARM: davinci: da8xx: add remoteproc support
  ARM: davinci: remove test for undefined Kconfig macro
  ARM: davinci: mmc: derive version information from device name
  ARM: davinci: da850: add ECAP & EHRPWM clock nodes
  ARM: davinci: clk framework support for enable/disable functionality

28 files changed:
Documentation/kernel-parameters.txt
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-dm365-evm.c
arch/arm/mach-davinci/board-dm644x-evm.c
arch/arm/mach-davinci/board-neuros-osd2.c
arch/arm/mach-davinci/board-omapl138-hawk.c
arch/arm/mach-davinci/board-tnetv107x-evm.c
arch/arm/mach-davinci/clock.c
arch/arm/mach-davinci/clock.h
arch/arm/mach-davinci/da830.c
arch/arm/mach-davinci/da850.c
arch/arm/mach-davinci/da8xx-dt.c
arch/arm/mach-davinci/devices-da8xx.c
arch/arm/mach-davinci/devices-tnetv107x.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/include/mach/da8xx.h
arch/arm/mach-davinci/include/mach/debug-macro.S
arch/arm/mach-davinci/pm.c
arch/arm/mach-davinci/sram.c
arch/arm/mach-davinci/tnetv107x.c
arch/arm/mach-davinci/usb.c
drivers/mmc/host/davinci_mmc.c
include/linux/platform_data/mmc-davinci.h

index 4609e81dbc37fc2dbfa005ff607890df3a8bbc6b..4a6d96214eedfad0c9382cd1c493239fb3298aaa 100644 (file)
@@ -44,6 +44,7 @@ parameter is applicable:
        AVR32   AVR32 architecture is enabled.
        AX25    Appropriate AX.25 support is enabled.
        BLACKFIN Blackfin architecture is enabled.
+       CMA     Contiguous Memory Area support is enabled.
        DRM     Direct Rendering Management support is enabled.
        DYNAMIC_DEBUG Build in debug messages and enable them at runtime
        EDD     BIOS Enhanced Disk Drive Services (EDD) is enabled
@@ -2663,6 +2664,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
                        Useful for devices that are detected asynchronously
                        (e.g. USB and MMC devices).
 
+       rproc_mem=nn[KMG][@address]
+                       [KNL,ARM,CMA] Remoteproc physical memory block.
+                       Memory area to be used by remote processor image,
+                       managed by CMA.
+
        rw              [KNL] Mount root device read-write on boot
 
        S               [KNL] Run init in single mode
index b348e44978b0bb3591f126d2d19407eb6f8f13ec..1332de8c52c99dce492c57612e778229ec6a64bd 100644 (file)
@@ -246,7 +246,6 @@ static struct davinci_mmc_config da830_evm_mmc_config = {
        .wires                  = 8,
        .max_freq               = 50000000,
        .caps                   = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
-       .version                = MMC_CTLR_VERSION_2,
 };
 
 static inline void da830_evm_init_mmc(void)
index a74dec7566471ab442e9a4d2e0304c1a6aeea523..8a24b6c6339f4005c11611f0d2ec2980bbfaa0c8 100644 (file)
@@ -396,7 +396,7 @@ enum da850_evm_ui_exp_pins {
        DA850_EVM_UI_EXP_PB1,
 };
 
-static const char const *da850_evm_ui_exp[] = {
+static const char * const da850_evm_ui_exp[] = {
        [DA850_EVM_UI_EXP_SEL_C]        = "sel_c",
        [DA850_EVM_UI_EXP_SEL_B]        = "sel_b",
        [DA850_EVM_UI_EXP_SEL_A]        = "sel_a",
@@ -560,7 +560,7 @@ enum da850_evm_bb_exp_pins {
        DA850_EVM_BB_EXP_USER_SW8
 };
 
-static const char const *da850_evm_bb_exp[] = {
+static const char * const da850_evm_bb_exp[] = {
        [DA850_EVM_BB_EXP_DEEP_SLEEP_EN]        = "deep_sleep_en",
        [DA850_EVM_BB_EXP_SW_RST]               = "sw_rst",
        [DA850_EVM_BB_EXP_TP_23]                = "tp_23",
@@ -797,7 +797,6 @@ static struct davinci_mmc_config da850_mmc_config = {
        .wires          = 4,
        .max_freq       = 50000000,
        .caps           = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
-       .version        = MMC_CTLR_VERSION_2,
 };
 
 static const short da850_evm_mmcsd0_pins[] __initconst = {
@@ -1367,7 +1366,6 @@ static struct davinci_mmc_config da850_wl12xx_mmc_config = {
        .max_freq       = 25000000,
        .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_NONREMOVABLE |
                          MMC_CAP_POWER_OFF_CARD,
-       .version        = MMC_CTLR_VERSION_2,
 };
 
 static const short da850_wl12xx_pins[] __initconst = {
@@ -1574,6 +1572,11 @@ static __init void da850_evm_init(void)
                pr_warn("%s: SATA registration failed: %d\n", __func__, ret);
 
        da850_evm_setup_mac_addr();
+
+       ret = da8xx_register_rproc();
+       if (ret)
+               pr_warn("%s: dsp/rproc registration failed: %d\n",
+                       __func__, ret);
 }
 
 #ifdef CONFIG_SERIAL_8250_CONSOLE
@@ -1601,4 +1604,5 @@ MACHINE_START(DAVINCI_DA850_EVM, "DaVinci DA850/OMAP-L138/AM18x EVM")
        .init_late      = davinci_init_late,
        .dma_zone_size  = SZ_128M,
        .restart        = da8xx_restart,
+       .reserve        = da8xx_rproc_reserve_cma,
 MACHINE_END
index 147b8e1a4407f794052de4579ba6630f195f982b..bfdf8b979a64d1e0219738a2a020bb5f0b6527a3 100644 (file)
@@ -280,7 +280,6 @@ static struct davinci_mmc_config dm355evm_mmc_config = {
        .wires          = 4,
        .max_freq       = 50000000,
        .caps           = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
-       .version        = MMC_CTLR_VERSION_1,
 };
 
 /* Don't connect anything to J10 unless you're only using USB host
index c2d4958a0cb6a632a4d1b7b5f5bc8c56dafbc424..4cfdd9109e19fe362252f83d21bcf1595b131aee 100644 (file)
@@ -253,7 +253,6 @@ static struct davinci_mmc_config dm365evm_mmc_config = {
        .wires          = 4,
        .max_freq       = 50000000,
        .caps           = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
-       .version        = MMC_CTLR_VERSION_2,
 };
 
 static void dm365evm_emac_configure(void)
index a042f27fb6bc03c4d2efca0376e2ce4dd18fe807..fc8e38e31b89b372cd854e39fe30810d50e9a4a5 100644 (file)
@@ -570,7 +570,6 @@ static struct davinci_mmc_config dm6446evm_mmc_config = {
        .get_cd         = dm6444evm_mmc_get_cd,
        .get_ro         = dm6444evm_mmc_get_ro,
        .wires          = 4,
-       .version        = MMC_CTLR_VERSION_1
 };
 
 static struct i2c_board_info __initdata i2c_info[] =  {
index ea6728be53ba136ae171218e604e20b605bf0ceb..2bc112adf565495aed9505bfc23a401e53341d52 100644 (file)
@@ -164,7 +164,6 @@ static void __init davinci_ntosd2_map_io(void)
 
 static struct davinci_mmc_config davinci_ntosd2_mmc_config = {
        .wires          = 4,
-       .version        = MMC_CTLR_VERSION_1
 };
 
 #define HAS_ATA                IS_ENABLED(CONFIG_BLK_DEV_PALMCHIP_BK3710)
index 5a2bd44da54d8493f5da9bbbb52ab663fb729bdc..b8c20de10ca2b07b276d03bd1f3d37ae9a9701e2 100644 (file)
@@ -136,7 +136,6 @@ static struct davinci_mmc_config da850_mmc_config = {
        .wires          = 4,
        .max_freq       = 50000000,
        .caps           = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
-       .version        = MMC_CTLR_VERSION_2,
 };
 
 static __init void omapl138_hawk_mmc_init(void)
@@ -311,6 +310,11 @@ static __init void omapl138_hawk_init(void)
        if (ret)
                pr_warn("%s: watchdog registration failed: %d\n",
                        __func__, ret);
+
+       ret = da8xx_register_rproc();
+       if (ret)
+               pr_warn("%s: dsp/rproc registration failed: %d\n",
+                       __func__, ret);
 }
 
 #ifdef CONFIG_SERIAL_8250_CONSOLE
@@ -338,4 +342,5 @@ MACHINE_START(OMAPL138_HAWKBOARD, "AM18x/OMAP-L138 Hawkboard")
        .init_late      = davinci_init_late,
        .dma_zone_size  = SZ_128M,
        .restart        = da8xx_restart,
+       .reserve        = da8xx_rproc_reserve_cma,
 MACHINE_END
index 4f416023d4e2d1d09f8ab1bf18d6e4663066ad8f..ba798370fc96d1b8f338a20903bd5e0891280b80 100644 (file)
@@ -85,7 +85,6 @@ static struct davinci_mmc_config mmc_config = {
        .wires          = 4,
        .max_freq       = 50000000,
        .caps           = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
-       .version        = MMC_CTLR_VERSION_1,
 };
 
 static const short sdio1_pins[] __initconst = {
index d458558ee84a436a0506835c3ca9bdfa722798de..dc9a470ff9c57afe9855bfaf592a27a62b3888a6 100644 (file)
@@ -35,19 +35,26 @@ static void __clk_enable(struct clk *clk)
 {
        if (clk->parent)
                __clk_enable(clk->parent);
-       if (clk->usecount++ == 0 && (clk->flags & CLK_PSC))
-               davinci_psc_config(clk->domain, clk->gpsc, clk->lpsc,
-                               true, clk->flags);
+       if (clk->usecount++ == 0) {
+               if (clk->flags & CLK_PSC)
+                       davinci_psc_config(clk->domain, clk->gpsc, clk->lpsc,
+                                          true, clk->flags);
+               else if (clk->clk_enable)
+                       clk->clk_enable(clk);
+       }
 }
 
 static void __clk_disable(struct clk *clk)
 {
        if (WARN_ON(clk->usecount == 0))
                return;
-       if (--clk->usecount == 0 && !(clk->flags & CLK_PLL) &&
-           (clk->flags & CLK_PSC))
-               davinci_psc_config(clk->domain, clk->gpsc, clk->lpsc,
-                               false, clk->flags);
+       if (--clk->usecount == 0) {
+               if (!(clk->flags & CLK_PLL) && (clk->flags & CLK_PSC))
+                       davinci_psc_config(clk->domain, clk->gpsc, clk->lpsc,
+                                          false, clk->flags);
+               else if (clk->clk_disable)
+                       clk->clk_disable(clk);
+       }
        if (clk->parent)
                __clk_disable(clk->parent);
 }
index 8694b395fc92602a60355bb35bd414f0137b041c..1e4e836173a14cab56650945cd2fcd41e18cf014 100644 (file)
@@ -104,6 +104,8 @@ struct clk {
        int (*set_rate) (struct clk *clk, unsigned long rate);
        int (*round_rate) (struct clk *clk, unsigned long rate);
        int (*reset) (struct clk *clk, bool reset);
+       void (*clk_enable) (struct clk *clk);
+       void (*clk_disable) (struct clk *clk);
 };
 
 /* Clock flags: SoC-specific flags start at BIT(16) */
index 678a54a64daee17b09cf096cf4bcb2f31199383b..abbaf0270be6550795b824e36b6fda2de933c3aa 100644 (file)
@@ -394,7 +394,7 @@ static struct clk_lookup da830_clks[] = {
        CLK(NULL,               "tpcc",         &tpcc_clk),
        CLK(NULL,               "tptc0",        &tptc0_clk),
        CLK(NULL,               "tptc1",        &tptc1_clk),
-       CLK("davinci_mmc.0",    NULL,           &mmcsd_clk),
+       CLK("da830-mmc.0",      NULL,           &mmcsd_clk),
        CLK(NULL,               "uart0",        &uart0_clk),
        CLK(NULL,               "uart1",        &uart1_clk),
        CLK(NULL,               "uart2",        &uart2_clk),
index 0c4a26ddebba03ec3f082ea96735551bf474d819..4d6933848abfaeaab005ed972916fb0cfb69b5da 100644 (file)
@@ -383,6 +383,49 @@ static struct clk dsp_clk = {
        .flags          = PSC_LRST | PSC_FORCE,
 };
 
+static struct clk ehrpwm_clk = {
+       .name           = "ehrpwm",
+       .parent         = &pll0_sysclk2,
+       .lpsc           = DA8XX_LPSC1_PWM,
+       .gpsc           = 1,
+       .flags          = DA850_CLK_ASYNC3,
+};
+
+#define DA8XX_EHRPWM_TBCLKSYNC BIT(12)
+
+static void ehrpwm_tblck_enable(struct clk *clk)
+{
+       u32 val;
+
+       val = readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP1_REG));
+       val |= DA8XX_EHRPWM_TBCLKSYNC;
+       writel(val, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP1_REG));
+}
+
+static void ehrpwm_tblck_disable(struct clk *clk)
+{
+       u32 val;
+
+       val = readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP1_REG));
+       val &= ~DA8XX_EHRPWM_TBCLKSYNC;
+       writel(val, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP1_REG));
+}
+
+static struct clk ehrpwm_tbclk = {
+       .name           = "ehrpwm_tbclk",
+       .parent         = &ehrpwm_clk,
+       .clk_enable     = ehrpwm_tblck_enable,
+       .clk_disable    = ehrpwm_tblck_disable,
+};
+
+static struct clk ecap_clk = {
+       .name           = "ecap",
+       .parent         = &pll0_sysclk2,
+       .lpsc           = DA8XX_LPSC1_ECAP,
+       .gpsc           = 1,
+       .flags          = DA850_CLK_ASYNC3,
+};
+
 static struct clk_lookup da850_clks[] = {
        CLK(NULL,               "ref",          &ref_clk),
        CLK(NULL,               "pll0",         &pll0_clk),
@@ -420,8 +463,8 @@ static struct clk_lookup da850_clks[] = {
        CLK("davinci_emac.1",   NULL,           &emac_clk),
        CLK("davinci-mcasp.0",  NULL,           &mcasp_clk),
        CLK("da8xx_lcdc.0",     "fck",          &lcdc_clk),
-       CLK("davinci_mmc.0",    NULL,           &mmcsd0_clk),
-       CLK("davinci_mmc.1",    NULL,           &mmcsd1_clk),
+       CLK("da830-mmc.0",      NULL,           &mmcsd0_clk),
+       CLK("da830-mmc.1",      NULL,           &mmcsd1_clk),
        CLK(NULL,               "aemif",        &aemif_clk),
        CLK(NULL,               "usb11",        &usb11_clk),
        CLK(NULL,               "usb20",        &usb20_clk),
@@ -430,6 +473,9 @@ static struct clk_lookup da850_clks[] = {
        CLK("vpif",             NULL,           &vpif_clk),
        CLK("ahci",             NULL,           &sata_clk),
        CLK("davinci-rproc.0",  NULL,           &dsp_clk),
+       CLK("ehrpwm",           "fck",          &ehrpwm_clk),
+       CLK("ehrpwm",           "tbclk",        &ehrpwm_tbclk),
+       CLK("ecap",             "fck",          &ecap_clk),
        CLK(NULL,               NULL,           NULL),
 };
 
index 6b7a0a27fbd165147790d5ff8979858732f6e6cc..57e14a8774db589b573dc87b742e2f18af701886 100644 (file)
@@ -20,7 +20,7 @@
 
 #define DA8XX_NUM_UARTS        3
 
-void __init da8xx_uart_clk_enable(void)
+static void __init da8xx_uart_clk_enable(void)
 {
        int i;
        for (i = 0; i < DA8XX_NUM_UARTS; i++)
@@ -37,7 +37,7 @@ static void __init da8xx_init_irq(void)
        of_irq_init(da8xx_irq_match);
 }
 
-struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
+static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
        OF_DEV_AUXDATA("ti,davinci-i2c", 0x01c22000, "i2c_davinci.1", NULL),
        OF_DEV_AUXDATA("ti,davinci-wdt", 0x01c21000, "watchdog", NULL),
        {}
index fc50243b1481ca471efca2271b0f7b93ba7d7f7e..bf572525175d44896813c3f03d9f2833e1352b54 100644 (file)
@@ -12,7 +12,7 @@
  */
 #include <linux/init.h>
 #include <linux/platform_device.h>
-#include <linux/dma-mapping.h>
+#include <linux/dma-contiguous.h>
 #include <linux/serial_8250.h>
 #include <linux/ahci_platform.h>
 #include <linux/clk.h>
@@ -664,7 +664,7 @@ static struct resource da8xx_mmcsd0_resources[] = {
 };
 
 static struct platform_device da8xx_mmcsd0_device = {
-       .name           = "davinci_mmc",
+       .name           = "da830-mmc",
        .id             = 0,
        .num_resources  = ARRAY_SIZE(da8xx_mmcsd0_resources),
        .resource       = da8xx_mmcsd0_resources,
@@ -701,7 +701,7 @@ static struct resource da850_mmcsd1_resources[] = {
 };
 
 static struct platform_device da850_mmcsd1_device = {
-       .name           = "davinci_mmc",
+       .name           = "da830-mmc",
        .id             = 1,
        .num_resources  = ARRAY_SIZE(da850_mmcsd1_resources),
        .resource       = da850_mmcsd1_resources,
@@ -714,6 +714,92 @@ int __init da850_register_mmcsd1(struct davinci_mmc_config *config)
 }
 #endif
 
+static struct resource da8xx_rproc_resources[] = {
+       { /* DSP boot address */
+               .start          = DA8XX_SYSCFG0_BASE + DA8XX_HOST1CFG_REG,
+               .end            = DA8XX_SYSCFG0_BASE + DA8XX_HOST1CFG_REG + 3,
+               .flags          = IORESOURCE_MEM,
+       },
+       { /* DSP interrupt registers */
+               .start          = DA8XX_SYSCFG0_BASE + DA8XX_CHIPSIG_REG,
+               .end            = DA8XX_SYSCFG0_BASE + DA8XX_CHIPSIG_REG + 7,
+               .flags          = IORESOURCE_MEM,
+       },
+       { /* dsp irq */
+               .start          = IRQ_DA8XX_CHIPINT0,
+               .end            = IRQ_DA8XX_CHIPINT0,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device da8xx_dsp = {
+       .name   = "davinci-rproc",
+       .dev    = {
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
+       },
+       .num_resources  = ARRAY_SIZE(da8xx_rproc_resources),
+       .resource       = da8xx_rproc_resources,
+};
+
+#if IS_ENABLED(CONFIG_DA8XX_REMOTEPROC)
+
+static phys_addr_t rproc_base __initdata;
+static unsigned long rproc_size __initdata;
+
+static int __init early_rproc_mem(char *p)
+{
+       char *endp;
+
+       if (p == NULL)
+               return 0;
+
+       rproc_size = memparse(p, &endp);
+       if (*endp == '@')
+               rproc_base = memparse(endp + 1, NULL);
+
+       return 0;
+}
+early_param("rproc_mem", early_rproc_mem);
+
+void __init da8xx_rproc_reserve_cma(void)
+{
+       int ret;
+
+       if (!rproc_base || !rproc_size) {
+               pr_err("%s: 'rproc_mem=nn@address' badly specified\n"
+                      "    'nn' and 'address' must both be non-zero\n",
+                      __func__);
+
+               return;
+       }
+
+       pr_info("%s: reserving 0x%lx @ 0x%lx...\n",
+               __func__, rproc_size, (unsigned long)rproc_base);
+
+       ret = dma_declare_contiguous(&da8xx_dsp.dev, rproc_size, rproc_base, 0);
+       if (ret)
+               pr_err("%s: dma_declare_contiguous failed %d\n", __func__, ret);
+}
+
+#else
+
+void __init da8xx_rproc_reserve_cma(void)
+{
+}
+
+#endif
+
+int __init da8xx_register_rproc(void)
+{
+       int ret;
+
+       ret = platform_device_register(&da8xx_dsp);
+       if (ret)
+               pr_err("%s: can't register DSP device: %d\n", __func__, ret);
+
+       return ret;
+};
+
 static struct resource da8xx_rtc_resources[] = {
        {
                .start          = DA8XX_RTC_BASE,
index 773ab07a71a0536351ab2ba00338f769f159237e..cfb194df18edb7f72deaf907858905781bac210f 100644 (file)
@@ -218,7 +218,7 @@ static u64 mmc1_dma_mask = DMA_BIT_MASK(32);
 
 static struct platform_device mmc_devices[2] = {
        {
-               .name           = "davinci_mmc",
+               .name           = "dm6441-mmc",
                .id             = 0,
                .dev            = {
                        .dma_mask               = &mmc0_dma_mask,
@@ -228,7 +228,7 @@ static struct platform_device mmc_devices[2] = {
                .resource       = mmc0_resources
        },
        {
-               .name           = "davinci_mmc",
+               .name           = "dm6441-mmc",
                .id             = 1,
                .dev            = {
                        .dma_mask               = &mmc1_dma_mask,
index df135deed08a318843cffc957750517a2cfd5df1..a7068a3aa9d39e2e5bd519f93a6c06ee06e0b1a9 100644 (file)
@@ -150,7 +150,7 @@ static struct resource mmcsd0_resources[] = {
 };
 
 static struct platform_device davinci_mmcsd0_device = {
-       .name = "davinci_mmc",
+       .name = "dm6441-mmc",
        .id = 0,
        .dev = {
                .dma_mask = &mmcsd0_dma_mask,
@@ -187,7 +187,7 @@ static struct resource mmcsd1_resources[] = {
 };
 
 static struct platform_device davinci_mmcsd1_device = {
-       .name = "davinci_mmc",
+       .name = "dm6441-mmc",
        .id = 1,
        .dev = {
                .dma_mask = &mmcsd1_dma_mask,
@@ -235,6 +235,7 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
                        mmcsd1_resources[0].end = DM365_MMCSD1_BASE +
                                                        SZ_4K - 1;
                        mmcsd1_resources[2].start = IRQ_DM365_SDIOINT1;
+                       davinci_mmcsd1_device.name = "da830-mmc";
                } else
                        break;
 
@@ -256,6 +257,7 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
                        mmcsd0_resources[0].end = DM365_MMCSD0_BASE +
                                                        SZ_4K - 1;
                        mmcsd0_resources[2].start = IRQ_DM365_SDIOINT0;
+                       davinci_mmcsd0_device.name = "da830-mmc";
                } else if (cpu_is_davinci_dm644x()) {
                        /* REVISIT: should this be in board-init code? */
                        /* Power-on 3.3V IO cells */
index b49c3b77d55e5ac3e9884762a2fcdab28c03453b..87e6104f45e657eaec9026d22120aba25de93b7b 100644 (file)
@@ -361,8 +361,8 @@ static struct clk_lookup dm355_clks[] = {
        CLK("i2c_davinci.1", NULL, &i2c_clk),
        CLK("davinci-mcbsp.0", NULL, &asp0_clk),
        CLK("davinci-mcbsp.1", NULL, &asp1_clk),
-       CLK("davinci_mmc.0", NULL, &mmcsd0_clk),
-       CLK("davinci_mmc.1", NULL, &mmcsd1_clk),
+       CLK("dm6441-mmc.0", NULL, &mmcsd0_clk),
+       CLK("dm6441-mmc.1", NULL, &mmcsd1_clk),
        CLK("spi_davinci.0", NULL, &spi0_clk),
        CLK("spi_davinci.1", NULL, &spi1_clk),
        CLK("spi_davinci.2", NULL, &spi2_clk),
index 6c3980540be0525a9e3d7a5c699ed2221d378a35..2791df9187b3f8acfd18ead5ad3e238ad8d9414d 100644 (file)
@@ -454,8 +454,8 @@ static struct clk_lookup dm365_clks[] = {
        CLK(NULL, "uart0", &uart0_clk),
        CLK(NULL, "uart1", &uart1_clk),
        CLK("i2c_davinci.1", NULL, &i2c_clk),
-       CLK("davinci_mmc.0", NULL, &mmcsd0_clk),
-       CLK("davinci_mmc.1", NULL, &mmcsd1_clk),
+       CLK("da830-mmc.0", NULL, &mmcsd0_clk),
+       CLK("da830-mmc.1", NULL, &mmcsd1_clk),
        CLK("spi_davinci.0", NULL, &spi0_clk),
        CLK("spi_davinci.1", NULL, &spi1_clk),
        CLK("spi_davinci.2", NULL, &spi2_clk),
index db1dd92e00af44c13f7f55f0ae364f08be1035c4..ab6bf54c65c7c7451f1457d99bdd556a4dee1bbf 100644 (file)
@@ -310,7 +310,7 @@ static struct clk_lookup dm644x_clks[] = {
        CLK("i2c_davinci.1", NULL, &i2c_clk),
        CLK("palm_bk3710", NULL, &ide_clk),
        CLK("davinci-mcbsp", NULL, &asp_clk),
-       CLK("davinci_mmc.0", NULL, &mmcsd_clk),
+       CLK("dm6441-mmc.0", NULL, &mmcsd_clk),
        CLK(NULL, "spi", &spi_clk),
        CLK(NULL, "gpio", &gpio_clk),
        CLK(NULL, "usb", &usb_clk),
index de439b7b9af190810407dc95ccca5a50693ccda2..2e1c9eae0a5846932bf237d9b35a9155397e3744 100644 (file)
@@ -54,7 +54,10 @@ extern unsigned int da850_max_speed;
 #define DA8XX_SYSCFG0_BASE     (IO_PHYS + 0x14000)
 #define DA8XX_SYSCFG0_VIRT(x)  (da8xx_syscfg0_base + (x))
 #define DA8XX_JTAG_ID_REG      0x18
+#define DA8XX_HOST1CFG_REG     0x44
+#define DA8XX_CHIPSIG_REG      0x174
 #define DA8XX_CFGCHIP0_REG     0x17c
+#define DA8XX_CFGCHIP1_REG     0x180
 #define DA8XX_CFGCHIP2_REG     0x184
 #define DA8XX_CFGCHIP3_REG     0x188
 
@@ -104,6 +107,8 @@ int __init da850_register_vpif_display
 int __init da850_register_vpif_capture
                        (struct vpif_capture_config *capture_config);
 void da8xx_restart(char mode, const char *cmd);
+void da8xx_rproc_reserve_cma(void);
+int da8xx_register_rproc(void);
 
 extern struct platform_device da8xx_serial_device;
 extern struct emac_platform_data da8xx_emac_pdata;
index 34290d14754b41b827208528c1a317e5d5fa62b3..b18b8ebc650881b4f45a10f8facb14cbb8984377 100644 (file)
@@ -24,8 +24,6 @@
 
 #if defined(CONFIG_DEBUG_DAVINCI_DMx_UART0)
 #define UART_BASE      DAVINCI_UART0_BASE
-#elif defined(CONFIG_DEBUG_DAVINCI_DA8XX_UART0)
-#define UART_BASE      DA8XX_UART0_BASE
 #elif defined(CONFIG_DEBUG_DAVINCI_DA8XX_UART1)
 #define UART_BASE      DA8XX_UART1_BASE
 #elif defined(CONFIG_DEBUG_DAVINCI_DA8XX_UART2)
index eb8360b33aa9d4528a73562c585186949fe38657..a508fe587af731f7122fd0e1a745b99a12130874 100644 (file)
@@ -19,6 +19,7 @@
 #include <asm/delay.h>
 #include <asm/io.h>
 
+#include <mach/common.h>
 #include <mach/da8xx.h>
 #include <mach/sram.h>
 #include <mach/pm.h>
index c5f7ee5cc80ab3b6b6c2226798b233a8f59f1d0c..f18928b073f55de40cfab4d96ea7dd85c606d778 100644 (file)
@@ -62,7 +62,7 @@ static int __init sram_init(void)
        phys_addr_t phys = davinci_soc_info.sram_dma;
        unsigned len = davinci_soc_info.sram_len;
        int status = 0;
-       void *addr;
+       void __iomem *addr;
 
        if (len) {
                len = min_t(unsigned, len, SRAM_SIZE);
@@ -75,7 +75,7 @@ static int __init sram_init(void)
                addr = ioremap(phys, len);
                if (!addr)
                        return -ENOMEM;
-               status = gen_pool_add_virt(sram_pool, (unsigned)addr,
+               status = gen_pool_add_virt(sram_pool, (unsigned long) addr,
                                           phys, len, -1);
                if (status < 0)
                        iounmap(addr);
index dc1a209b9b66624fdfa8f748e237b682e3cec18a..3b2a70d43efac247b65a055f949d7df5814e79a8 100644 (file)
@@ -272,7 +272,7 @@ static struct clk_lookup clks[] = {
        CLK("tnetv107x-keypad.0", NULL,                 &clk_keypad),
        CLK(NULL,               "clk_gpio",             &clk_gpio),
        CLK(NULL,               "clk_mdio",             &clk_mdio),
-       CLK("davinci_mmc.0",    NULL,                   &clk_sdio0),
+       CLK("dm6441-mmc.0",     NULL,                   &clk_sdio0),
        CLK(NULL,               "uart0",                &clk_uart0),
        CLK(NULL,               "uart1",                &clk_uart1),
        CLK(NULL,               "timer0",               &clk_timer0),
@@ -292,7 +292,7 @@ static struct clk_lookup clks[] = {
        CLK(NULL,               "clk_system",           &clk_system),
        CLK(NULL,               "clk_imcop",            &clk_imcop),
        CLK(NULL,               "clk_spare",            &clk_spare),
-       CLK("davinci_mmc.1",    NULL,                   &clk_sdio1),
+       CLK("dm6441-mmc.1",     NULL,                   &clk_sdio1),
        CLK(NULL,               "clk_ddr2_vrst",        &clk_ddr2_vrst),
        CLK(NULL,               "clk_ddr2_vctl_rst",    &clk_ddr2_vctl_rst),
        CLK(NULL,               NULL,                   NULL),
index 5764d65ca25de8d97418fc834b88802eb8d0ae99..b0a6b522575f1e51c646f52bd7426a3fd81eef89 100644 (file)
@@ -10,6 +10,7 @@
 #include <mach/common.h>
 #include <mach/irqs.h>
 #include <mach/cputype.h>
+#include <mach/da8xx.h>
 #include <linux/platform_data/usb-davinci.h>
 
 #define DAVINCI_USB_OTG_BASE   0x01c64000
index 20636772c09bd2aa2b794f44c3029e1f57559578..b5f1c019ecad97d1f1403db2e2ce01508202e606 100644 (file)
@@ -1157,6 +1157,18 @@ static void __init init_mmcsd_host(struct mmc_davinci_host *host)
        mmc_davinci_reset_ctrl(host, 0);
 }
 
+static struct platform_device_id davinci_mmc_devtype[] = {
+       {
+               .name   = "dm6441-mmc",
+               .driver_data = MMC_CTLR_VERSION_1,
+       }, {
+               .name   = "da830-mmc",
+               .driver_data = MMC_CTLR_VERSION_2,
+       },
+       {},
+};
+MODULE_DEVICE_TABLE(platform, davinci_mmc_devtype);
+
 static int __init davinci_mmcsd_probe(struct platform_device *pdev)
 {
        struct davinci_mmc_config *pdata = pdev->dev.platform_data;
@@ -1165,6 +1177,7 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
        struct resource *r, *mem = NULL;
        int ret = 0, irq = 0;
        size_t mem_size;
+       const struct platform_device_id *id_entry;
 
        /* REVISIT:  when we're fully converted, fail if pdata is NULL */
 
@@ -1237,7 +1250,9 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
        if (pdata && (pdata->wires == 8))
                mmc->caps |= (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA);
 
-       host->version = pdata->version;
+       id_entry = platform_get_device_id(pdev);
+       if (id_entry)
+               host->version = id_entry->driver_data;
 
        mmc->ops = &mmc_davinci_ops;
        mmc->f_min = 312500;
@@ -1408,6 +1423,7 @@ static struct platform_driver davinci_mmcsd_driver = {
                .pm     = davinci_mmcsd_pm_ops,
        },
        .remove         = __exit_p(davinci_mmcsd_remove),
+       .id_table       = davinci_mmc_devtype,
 };
 
 static int __init davinci_mmcsd_init(void)
index 5ba6b22ce338e791188b053301e6e768b1556294..9cea4ee377b5bedca8a95f64aa226e3870b962b9 100644 (file)
@@ -23,9 +23,6 @@ struct davinci_mmc_config {
        /* any additional host capabilities: OR'd in to mmc->f_caps */
        u32     caps;
 
-       /* Version of the MMC/SD controller */
-       u8      version;
-
        /* Number of sg segments */
        u8      nr_sg;
 };