mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
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. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAABAgAGBQJRbtBaAAoJEGFBu2jqvgRNpAgP/39XB7Q25C6H482ZhnUMawzF iJIq/4adtpwKr7Ib6xzGnyIzLfgvZq4b43lW0xPCQ3ArsaSlmwjjzhyZsQ5/K6VE zEsRI013yLQCP5sKNnXYnx534P56hxlhB3NnWLJ42iwIN44d2SkAM8cZKdSdUktO 1qPS7mIGtsCDVTnhlLJzUokfgrS3IWUygVgstlzHstCLLmJHtvij03i4/xflaRvZ MvkWNFasGonMEMxsBJGW8cLzv+ABdQP1rWM5SlfDyoz2XgYu9A2jZiQ026yFh2P6 X36SBRW75D4FRTEotWTbA7y8e78D8Cdtguo6omXRaiALumsJ6u7L6MquSsyfOJHC gh98jqR0xCgLtersgBG/tT3wWas+SLJH5THWW43TEpZjhTIwp00UV8geX6+wdHhZ X8fcI5MsDU3hggESJyilzWNXYz9Rvl6tuQKu6DcXGKCjYZPEBdVMzVm30qVysCYq 22Vgkg2MO6G5+4lWAEOYHJQg+IFNmNbWSQ2lO33QJ77tWVmkds8kamQRuFEFQWa1 wtRnXFeEr5jrkpzqTvA3ghywfKH9NdVZBmsoC1wepFL7cGvEJ0Oa67Dg1LW7mkHQ mqaqQfwtba83vbPMtI3aFJPCusXWxKE3+F9NcCtgdCF3TfVyGjxVnfzCHX1qQ52y lDh43Jgfzi7bfGLqILrp =U9X8 -----END PGP SIGNATURE----- Merge tag 'davinci-for-v3.10/board-2-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/boards 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
This commit is contained in:
commit
1556f4b4d0
@ -44,6 +44,7 @@ parameter is applicable:
|
|||||||
AVR32 AVR32 architecture is enabled.
|
AVR32 AVR32 architecture is enabled.
|
||||||
AX25 Appropriate AX.25 support is enabled.
|
AX25 Appropriate AX.25 support is enabled.
|
||||||
BLACKFIN Blackfin architecture is enabled.
|
BLACKFIN Blackfin architecture is enabled.
|
||||||
|
CMA Contiguous Memory Area support is enabled.
|
||||||
DRM Direct Rendering Management support is enabled.
|
DRM Direct Rendering Management support is enabled.
|
||||||
DYNAMIC_DEBUG Build in debug messages and enable them at runtime
|
DYNAMIC_DEBUG Build in debug messages and enable them at runtime
|
||||||
EDD BIOS Enhanced Disk Drive Services (EDD) is enabled
|
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
|
Useful for devices that are detected asynchronously
|
||||||
(e.g. USB and MMC devices).
|
(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
|
rw [KNL] Mount root device read-write on boot
|
||||||
|
|
||||||
S [KNL] Run init in single mode
|
S [KNL] Run init in single mode
|
||||||
|
@ -246,7 +246,6 @@ static struct davinci_mmc_config da830_evm_mmc_config = {
|
|||||||
.wires = 8,
|
.wires = 8,
|
||||||
.max_freq = 50000000,
|
.max_freq = 50000000,
|
||||||
.caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
|
.caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
|
||||||
.version = MMC_CTLR_VERSION_2,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void da830_evm_init_mmc(void)
|
static inline void da830_evm_init_mmc(void)
|
||||||
|
@ -396,7 +396,7 @@ enum da850_evm_ui_exp_pins {
|
|||||||
DA850_EVM_UI_EXP_PB1,
|
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_C] = "sel_c",
|
||||||
[DA850_EVM_UI_EXP_SEL_B] = "sel_b",
|
[DA850_EVM_UI_EXP_SEL_B] = "sel_b",
|
||||||
[DA850_EVM_UI_EXP_SEL_A] = "sel_a",
|
[DA850_EVM_UI_EXP_SEL_A] = "sel_a",
|
||||||
@ -560,7 +560,7 @@ enum da850_evm_bb_exp_pins {
|
|||||||
DA850_EVM_BB_EXP_USER_SW8
|
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_DEEP_SLEEP_EN] = "deep_sleep_en",
|
||||||
[DA850_EVM_BB_EXP_SW_RST] = "sw_rst",
|
[DA850_EVM_BB_EXP_SW_RST] = "sw_rst",
|
||||||
[DA850_EVM_BB_EXP_TP_23] = "tp_23",
|
[DA850_EVM_BB_EXP_TP_23] = "tp_23",
|
||||||
@ -797,7 +797,6 @@ static struct davinci_mmc_config da850_mmc_config = {
|
|||||||
.wires = 4,
|
.wires = 4,
|
||||||
.max_freq = 50000000,
|
.max_freq = 50000000,
|
||||||
.caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
|
.caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
|
||||||
.version = MMC_CTLR_VERSION_2,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const short da850_evm_mmcsd0_pins[] __initconst = {
|
static const short da850_evm_mmcsd0_pins[] __initconst = {
|
||||||
@ -1367,7 +1366,6 @@ static struct davinci_mmc_config da850_wl12xx_mmc_config = {
|
|||||||
.max_freq = 25000000,
|
.max_freq = 25000000,
|
||||||
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_NONREMOVABLE |
|
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_NONREMOVABLE |
|
||||||
MMC_CAP_POWER_OFF_CARD,
|
MMC_CAP_POWER_OFF_CARD,
|
||||||
.version = MMC_CTLR_VERSION_2,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const short da850_wl12xx_pins[] __initconst = {
|
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);
|
pr_warn("%s: SATA registration failed: %d\n", __func__, ret);
|
||||||
|
|
||||||
da850_evm_setup_mac_addr();
|
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
|
#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,
|
.init_late = davinci_init_late,
|
||||||
.dma_zone_size = SZ_128M,
|
.dma_zone_size = SZ_128M,
|
||||||
.restart = da8xx_restart,
|
.restart = da8xx_restart,
|
||||||
|
.reserve = da8xx_rproc_reserve_cma,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
@ -280,7 +280,6 @@ static struct davinci_mmc_config dm355evm_mmc_config = {
|
|||||||
.wires = 4,
|
.wires = 4,
|
||||||
.max_freq = 50000000,
|
.max_freq = 50000000,
|
||||||
.caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
|
.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
|
/* Don't connect anything to J10 unless you're only using USB host
|
||||||
|
@ -253,7 +253,6 @@ static struct davinci_mmc_config dm365evm_mmc_config = {
|
|||||||
.wires = 4,
|
.wires = 4,
|
||||||
.max_freq = 50000000,
|
.max_freq = 50000000,
|
||||||
.caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
|
.caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
|
||||||
.version = MMC_CTLR_VERSION_2,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void dm365evm_emac_configure(void)
|
static void dm365evm_emac_configure(void)
|
||||||
|
@ -570,7 +570,6 @@ static struct davinci_mmc_config dm6446evm_mmc_config = {
|
|||||||
.get_cd = dm6444evm_mmc_get_cd,
|
.get_cd = dm6444evm_mmc_get_cd,
|
||||||
.get_ro = dm6444evm_mmc_get_ro,
|
.get_ro = dm6444evm_mmc_get_ro,
|
||||||
.wires = 4,
|
.wires = 4,
|
||||||
.version = MMC_CTLR_VERSION_1
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct i2c_board_info __initdata i2c_info[] = {
|
static struct i2c_board_info __initdata i2c_info[] = {
|
||||||
|
@ -164,7 +164,6 @@ static void __init davinci_ntosd2_map_io(void)
|
|||||||
|
|
||||||
static struct davinci_mmc_config davinci_ntosd2_mmc_config = {
|
static struct davinci_mmc_config davinci_ntosd2_mmc_config = {
|
||||||
.wires = 4,
|
.wires = 4,
|
||||||
.version = MMC_CTLR_VERSION_1
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define HAS_ATA IS_ENABLED(CONFIG_BLK_DEV_PALMCHIP_BK3710)
|
#define HAS_ATA IS_ENABLED(CONFIG_BLK_DEV_PALMCHIP_BK3710)
|
||||||
|
@ -136,7 +136,6 @@ static struct davinci_mmc_config da850_mmc_config = {
|
|||||||
.wires = 4,
|
.wires = 4,
|
||||||
.max_freq = 50000000,
|
.max_freq = 50000000,
|
||||||
.caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
|
.caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
|
||||||
.version = MMC_CTLR_VERSION_2,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static __init void omapl138_hawk_mmc_init(void)
|
static __init void omapl138_hawk_mmc_init(void)
|
||||||
@ -311,6 +310,11 @@ static __init void omapl138_hawk_init(void)
|
|||||||
if (ret)
|
if (ret)
|
||||||
pr_warn("%s: watchdog registration failed: %d\n",
|
pr_warn("%s: watchdog registration failed: %d\n",
|
||||||
__func__, ret);
|
__func__, ret);
|
||||||
|
|
||||||
|
ret = da8xx_register_rproc();
|
||||||
|
if (ret)
|
||||||
|
pr_warn("%s: dsp/rproc registration failed: %d\n",
|
||||||
|
__func__, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_8250_CONSOLE
|
#ifdef CONFIG_SERIAL_8250_CONSOLE
|
||||||
@ -338,4 +342,5 @@ MACHINE_START(OMAPL138_HAWKBOARD, "AM18x/OMAP-L138 Hawkboard")
|
|||||||
.init_late = davinci_init_late,
|
.init_late = davinci_init_late,
|
||||||
.dma_zone_size = SZ_128M,
|
.dma_zone_size = SZ_128M,
|
||||||
.restart = da8xx_restart,
|
.restart = da8xx_restart,
|
||||||
|
.reserve = da8xx_rproc_reserve_cma,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
@ -85,7 +85,6 @@ static struct davinci_mmc_config mmc_config = {
|
|||||||
.wires = 4,
|
.wires = 4,
|
||||||
.max_freq = 50000000,
|
.max_freq = 50000000,
|
||||||
.caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
|
.caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
|
||||||
.version = MMC_CTLR_VERSION_1,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const short sdio1_pins[] __initconst = {
|
static const short sdio1_pins[] __initconst = {
|
||||||
|
@ -35,19 +35,26 @@ static void __clk_enable(struct clk *clk)
|
|||||||
{
|
{
|
||||||
if (clk->parent)
|
if (clk->parent)
|
||||||
__clk_enable(clk->parent);
|
__clk_enable(clk->parent);
|
||||||
if (clk->usecount++ == 0 && (clk->flags & CLK_PSC))
|
if (clk->usecount++ == 0) {
|
||||||
davinci_psc_config(clk->domain, clk->gpsc, clk->lpsc,
|
if (clk->flags & CLK_PSC)
|
||||||
true, clk->flags);
|
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)
|
static void __clk_disable(struct clk *clk)
|
||||||
{
|
{
|
||||||
if (WARN_ON(clk->usecount == 0))
|
if (WARN_ON(clk->usecount == 0))
|
||||||
return;
|
return;
|
||||||
if (--clk->usecount == 0 && !(clk->flags & CLK_PLL) &&
|
if (--clk->usecount == 0) {
|
||||||
(clk->flags & CLK_PSC))
|
if (!(clk->flags & CLK_PLL) && (clk->flags & CLK_PSC))
|
||||||
davinci_psc_config(clk->domain, clk->gpsc, clk->lpsc,
|
davinci_psc_config(clk->domain, clk->gpsc, clk->lpsc,
|
||||||
false, clk->flags);
|
false, clk->flags);
|
||||||
|
else if (clk->clk_disable)
|
||||||
|
clk->clk_disable(clk);
|
||||||
|
}
|
||||||
if (clk->parent)
|
if (clk->parent)
|
||||||
__clk_disable(clk->parent);
|
__clk_disable(clk->parent);
|
||||||
}
|
}
|
||||||
|
@ -104,6 +104,8 @@ struct clk {
|
|||||||
int (*set_rate) (struct clk *clk, unsigned long rate);
|
int (*set_rate) (struct clk *clk, unsigned long rate);
|
||||||
int (*round_rate) (struct clk *clk, unsigned long rate);
|
int (*round_rate) (struct clk *clk, unsigned long rate);
|
||||||
int (*reset) (struct clk *clk, bool reset);
|
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) */
|
/* Clock flags: SoC-specific flags start at BIT(16) */
|
||||||
|
@ -394,7 +394,7 @@ static struct clk_lookup da830_clks[] = {
|
|||||||
CLK(NULL, "tpcc", &tpcc_clk),
|
CLK(NULL, "tpcc", &tpcc_clk),
|
||||||
CLK(NULL, "tptc0", &tptc0_clk),
|
CLK(NULL, "tptc0", &tptc0_clk),
|
||||||
CLK(NULL, "tptc1", &tptc1_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, "uart0", &uart0_clk),
|
||||||
CLK(NULL, "uart1", &uart1_clk),
|
CLK(NULL, "uart1", &uart1_clk),
|
||||||
CLK(NULL, "uart2", &uart2_clk),
|
CLK(NULL, "uart2", &uart2_clk),
|
||||||
|
@ -383,6 +383,49 @@ static struct clk dsp_clk = {
|
|||||||
.flags = PSC_LRST | PSC_FORCE,
|
.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[] = {
|
static struct clk_lookup da850_clks[] = {
|
||||||
CLK(NULL, "ref", &ref_clk),
|
CLK(NULL, "ref", &ref_clk),
|
||||||
CLK(NULL, "pll0", &pll0_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_emac.1", NULL, &emac_clk),
|
||||||
CLK("davinci-mcasp.0", NULL, &mcasp_clk),
|
CLK("davinci-mcasp.0", NULL, &mcasp_clk),
|
||||||
CLK("da8xx_lcdc.0", "fck", &lcdc_clk),
|
CLK("da8xx_lcdc.0", "fck", &lcdc_clk),
|
||||||
CLK("davinci_mmc.0", NULL, &mmcsd0_clk),
|
CLK("da830-mmc.0", NULL, &mmcsd0_clk),
|
||||||
CLK("davinci_mmc.1", NULL, &mmcsd1_clk),
|
CLK("da830-mmc.1", NULL, &mmcsd1_clk),
|
||||||
CLK(NULL, "aemif", &aemif_clk),
|
CLK(NULL, "aemif", &aemif_clk),
|
||||||
CLK(NULL, "usb11", &usb11_clk),
|
CLK(NULL, "usb11", &usb11_clk),
|
||||||
CLK(NULL, "usb20", &usb20_clk),
|
CLK(NULL, "usb20", &usb20_clk),
|
||||||
@ -430,6 +473,9 @@ static struct clk_lookup da850_clks[] = {
|
|||||||
CLK("vpif", NULL, &vpif_clk),
|
CLK("vpif", NULL, &vpif_clk),
|
||||||
CLK("ahci", NULL, &sata_clk),
|
CLK("ahci", NULL, &sata_clk),
|
||||||
CLK("davinci-rproc.0", NULL, &dsp_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),
|
CLK(NULL, NULL, NULL),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#define DA8XX_NUM_UARTS 3
|
#define DA8XX_NUM_UARTS 3
|
||||||
|
|
||||||
void __init da8xx_uart_clk_enable(void)
|
static void __init da8xx_uart_clk_enable(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < DA8XX_NUM_UARTS; 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);
|
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-i2c", 0x01c22000, "i2c_davinci.1", NULL),
|
||||||
OF_DEV_AUXDATA("ti,davinci-wdt", 0x01c21000, "watchdog", NULL),
|
OF_DEV_AUXDATA("ti,davinci-wdt", 0x01c21000, "watchdog", NULL),
|
||||||
{}
|
{}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-contiguous.h>
|
||||||
#include <linux/serial_8250.h>
|
#include <linux/serial_8250.h>
|
||||||
#include <linux/ahci_platform.h>
|
#include <linux/ahci_platform.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
@ -664,7 +664,7 @@ static struct resource da8xx_mmcsd0_resources[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device da8xx_mmcsd0_device = {
|
static struct platform_device da8xx_mmcsd0_device = {
|
||||||
.name = "davinci_mmc",
|
.name = "da830-mmc",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.num_resources = ARRAY_SIZE(da8xx_mmcsd0_resources),
|
.num_resources = ARRAY_SIZE(da8xx_mmcsd0_resources),
|
||||||
.resource = da8xx_mmcsd0_resources,
|
.resource = da8xx_mmcsd0_resources,
|
||||||
@ -701,7 +701,7 @@ static struct resource da850_mmcsd1_resources[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device da850_mmcsd1_device = {
|
static struct platform_device da850_mmcsd1_device = {
|
||||||
.name = "davinci_mmc",
|
.name = "da830-mmc",
|
||||||
.id = 1,
|
.id = 1,
|
||||||
.num_resources = ARRAY_SIZE(da850_mmcsd1_resources),
|
.num_resources = ARRAY_SIZE(da850_mmcsd1_resources),
|
||||||
.resource = da850_mmcsd1_resources,
|
.resource = da850_mmcsd1_resources,
|
||||||
@ -714,6 +714,92 @@ int __init da850_register_mmcsd1(struct davinci_mmc_config *config)
|
|||||||
}
|
}
|
||||||
#endif
|
#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[] = {
|
static struct resource da8xx_rtc_resources[] = {
|
||||||
{
|
{
|
||||||
.start = DA8XX_RTC_BASE,
|
.start = DA8XX_RTC_BASE,
|
||||||
|
@ -218,7 +218,7 @@ static u64 mmc1_dma_mask = DMA_BIT_MASK(32);
|
|||||||
|
|
||||||
static struct platform_device mmc_devices[2] = {
|
static struct platform_device mmc_devices[2] = {
|
||||||
{
|
{
|
||||||
.name = "davinci_mmc",
|
.name = "dm6441-mmc",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &mmc0_dma_mask,
|
.dma_mask = &mmc0_dma_mask,
|
||||||
@ -228,7 +228,7 @@ static struct platform_device mmc_devices[2] = {
|
|||||||
.resource = mmc0_resources
|
.resource = mmc0_resources
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "davinci_mmc",
|
.name = "dm6441-mmc",
|
||||||
.id = 1,
|
.id = 1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &mmc1_dma_mask,
|
.dma_mask = &mmc1_dma_mask,
|
||||||
|
@ -150,7 +150,7 @@ static struct resource mmcsd0_resources[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device davinci_mmcsd0_device = {
|
static struct platform_device davinci_mmcsd0_device = {
|
||||||
.name = "davinci_mmc",
|
.name = "dm6441-mmc",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &mmcsd0_dma_mask,
|
.dma_mask = &mmcsd0_dma_mask,
|
||||||
@ -187,7 +187,7 @@ static struct resource mmcsd1_resources[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device davinci_mmcsd1_device = {
|
static struct platform_device davinci_mmcsd1_device = {
|
||||||
.name = "davinci_mmc",
|
.name = "dm6441-mmc",
|
||||||
.id = 1,
|
.id = 1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &mmcsd1_dma_mask,
|
.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 +
|
mmcsd1_resources[0].end = DM365_MMCSD1_BASE +
|
||||||
SZ_4K - 1;
|
SZ_4K - 1;
|
||||||
mmcsd1_resources[2].start = IRQ_DM365_SDIOINT1;
|
mmcsd1_resources[2].start = IRQ_DM365_SDIOINT1;
|
||||||
|
davinci_mmcsd1_device.name = "da830-mmc";
|
||||||
} else
|
} else
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -256,6 +257,7 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
|
|||||||
mmcsd0_resources[0].end = DM365_MMCSD0_BASE +
|
mmcsd0_resources[0].end = DM365_MMCSD0_BASE +
|
||||||
SZ_4K - 1;
|
SZ_4K - 1;
|
||||||
mmcsd0_resources[2].start = IRQ_DM365_SDIOINT0;
|
mmcsd0_resources[2].start = IRQ_DM365_SDIOINT0;
|
||||||
|
davinci_mmcsd0_device.name = "da830-mmc";
|
||||||
} else if (cpu_is_davinci_dm644x()) {
|
} else if (cpu_is_davinci_dm644x()) {
|
||||||
/* REVISIT: should this be in board-init code? */
|
/* REVISIT: should this be in board-init code? */
|
||||||
/* Power-on 3.3V IO cells */
|
/* Power-on 3.3V IO cells */
|
||||||
|
@ -361,8 +361,8 @@ static struct clk_lookup dm355_clks[] = {
|
|||||||
CLK("i2c_davinci.1", NULL, &i2c_clk),
|
CLK("i2c_davinci.1", NULL, &i2c_clk),
|
||||||
CLK("davinci-mcbsp.0", NULL, &asp0_clk),
|
CLK("davinci-mcbsp.0", NULL, &asp0_clk),
|
||||||
CLK("davinci-mcbsp.1", NULL, &asp1_clk),
|
CLK("davinci-mcbsp.1", NULL, &asp1_clk),
|
||||||
CLK("davinci_mmc.0", NULL, &mmcsd0_clk),
|
CLK("dm6441-mmc.0", NULL, &mmcsd0_clk),
|
||||||
CLK("davinci_mmc.1", NULL, &mmcsd1_clk),
|
CLK("dm6441-mmc.1", NULL, &mmcsd1_clk),
|
||||||
CLK("spi_davinci.0", NULL, &spi0_clk),
|
CLK("spi_davinci.0", NULL, &spi0_clk),
|
||||||
CLK("spi_davinci.1", NULL, &spi1_clk),
|
CLK("spi_davinci.1", NULL, &spi1_clk),
|
||||||
CLK("spi_davinci.2", NULL, &spi2_clk),
|
CLK("spi_davinci.2", NULL, &spi2_clk),
|
||||||
|
@ -454,8 +454,8 @@ static struct clk_lookup dm365_clks[] = {
|
|||||||
CLK(NULL, "uart0", &uart0_clk),
|
CLK(NULL, "uart0", &uart0_clk),
|
||||||
CLK(NULL, "uart1", &uart1_clk),
|
CLK(NULL, "uart1", &uart1_clk),
|
||||||
CLK("i2c_davinci.1", NULL, &i2c_clk),
|
CLK("i2c_davinci.1", NULL, &i2c_clk),
|
||||||
CLK("davinci_mmc.0", NULL, &mmcsd0_clk),
|
CLK("da830-mmc.0", NULL, &mmcsd0_clk),
|
||||||
CLK("davinci_mmc.1", NULL, &mmcsd1_clk),
|
CLK("da830-mmc.1", NULL, &mmcsd1_clk),
|
||||||
CLK("spi_davinci.0", NULL, &spi0_clk),
|
CLK("spi_davinci.0", NULL, &spi0_clk),
|
||||||
CLK("spi_davinci.1", NULL, &spi1_clk),
|
CLK("spi_davinci.1", NULL, &spi1_clk),
|
||||||
CLK("spi_davinci.2", NULL, &spi2_clk),
|
CLK("spi_davinci.2", NULL, &spi2_clk),
|
||||||
|
@ -310,7 +310,7 @@ static struct clk_lookup dm644x_clks[] = {
|
|||||||
CLK("i2c_davinci.1", NULL, &i2c_clk),
|
CLK("i2c_davinci.1", NULL, &i2c_clk),
|
||||||
CLK("palm_bk3710", NULL, &ide_clk),
|
CLK("palm_bk3710", NULL, &ide_clk),
|
||||||
CLK("davinci-mcbsp", NULL, &asp_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, "spi", &spi_clk),
|
||||||
CLK(NULL, "gpio", &gpio_clk),
|
CLK(NULL, "gpio", &gpio_clk),
|
||||||
CLK(NULL, "usb", &usb_clk),
|
CLK(NULL, "usb", &usb_clk),
|
||||||
|
@ -54,7 +54,10 @@ extern unsigned int da850_max_speed;
|
|||||||
#define DA8XX_SYSCFG0_BASE (IO_PHYS + 0x14000)
|
#define DA8XX_SYSCFG0_BASE (IO_PHYS + 0x14000)
|
||||||
#define DA8XX_SYSCFG0_VIRT(x) (da8xx_syscfg0_base + (x))
|
#define DA8XX_SYSCFG0_VIRT(x) (da8xx_syscfg0_base + (x))
|
||||||
#define DA8XX_JTAG_ID_REG 0x18
|
#define DA8XX_JTAG_ID_REG 0x18
|
||||||
|
#define DA8XX_HOST1CFG_REG 0x44
|
||||||
|
#define DA8XX_CHIPSIG_REG 0x174
|
||||||
#define DA8XX_CFGCHIP0_REG 0x17c
|
#define DA8XX_CFGCHIP0_REG 0x17c
|
||||||
|
#define DA8XX_CFGCHIP1_REG 0x180
|
||||||
#define DA8XX_CFGCHIP2_REG 0x184
|
#define DA8XX_CFGCHIP2_REG 0x184
|
||||||
#define DA8XX_CFGCHIP3_REG 0x188
|
#define DA8XX_CFGCHIP3_REG 0x188
|
||||||
|
|
||||||
@ -104,6 +107,8 @@ int __init da850_register_vpif_display
|
|||||||
int __init da850_register_vpif_capture
|
int __init da850_register_vpif_capture
|
||||||
(struct vpif_capture_config *capture_config);
|
(struct vpif_capture_config *capture_config);
|
||||||
void da8xx_restart(char mode, const char *cmd);
|
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 platform_device da8xx_serial_device;
|
||||||
extern struct emac_platform_data da8xx_emac_pdata;
|
extern struct emac_platform_data da8xx_emac_pdata;
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_DEBUG_DAVINCI_DMx_UART0)
|
#if defined(CONFIG_DEBUG_DAVINCI_DMx_UART0)
|
||||||
#define UART_BASE DAVINCI_UART0_BASE
|
#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)
|
#elif defined(CONFIG_DEBUG_DAVINCI_DA8XX_UART1)
|
||||||
#define UART_BASE DA8XX_UART1_BASE
|
#define UART_BASE DA8XX_UART1_BASE
|
||||||
#elif defined(CONFIG_DEBUG_DAVINCI_DA8XX_UART2)
|
#elif defined(CONFIG_DEBUG_DAVINCI_DA8XX_UART2)
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include <asm/delay.h>
|
#include <asm/delay.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
|
||||||
|
#include <mach/common.h>
|
||||||
#include <mach/da8xx.h>
|
#include <mach/da8xx.h>
|
||||||
#include <mach/sram.h>
|
#include <mach/sram.h>
|
||||||
#include <mach/pm.h>
|
#include <mach/pm.h>
|
||||||
|
@ -62,7 +62,7 @@ static int __init sram_init(void)
|
|||||||
phys_addr_t phys = davinci_soc_info.sram_dma;
|
phys_addr_t phys = davinci_soc_info.sram_dma;
|
||||||
unsigned len = davinci_soc_info.sram_len;
|
unsigned len = davinci_soc_info.sram_len;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
void *addr;
|
void __iomem *addr;
|
||||||
|
|
||||||
if (len) {
|
if (len) {
|
||||||
len = min_t(unsigned, len, SRAM_SIZE);
|
len = min_t(unsigned, len, SRAM_SIZE);
|
||||||
@ -75,7 +75,7 @@ static int __init sram_init(void)
|
|||||||
addr = ioremap(phys, len);
|
addr = ioremap(phys, len);
|
||||||
if (!addr)
|
if (!addr)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
status = gen_pool_add_virt(sram_pool, (unsigned)addr,
|
status = gen_pool_add_virt(sram_pool, (unsigned long) addr,
|
||||||
phys, len, -1);
|
phys, len, -1);
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
iounmap(addr);
|
iounmap(addr);
|
||||||
|
@ -272,7 +272,7 @@ static struct clk_lookup clks[] = {
|
|||||||
CLK("tnetv107x-keypad.0", NULL, &clk_keypad),
|
CLK("tnetv107x-keypad.0", NULL, &clk_keypad),
|
||||||
CLK(NULL, "clk_gpio", &clk_gpio),
|
CLK(NULL, "clk_gpio", &clk_gpio),
|
||||||
CLK(NULL, "clk_mdio", &clk_mdio),
|
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, "uart0", &clk_uart0),
|
||||||
CLK(NULL, "uart1", &clk_uart1),
|
CLK(NULL, "uart1", &clk_uart1),
|
||||||
CLK(NULL, "timer0", &clk_timer0),
|
CLK(NULL, "timer0", &clk_timer0),
|
||||||
@ -292,7 +292,7 @@ static struct clk_lookup clks[] = {
|
|||||||
CLK(NULL, "clk_system", &clk_system),
|
CLK(NULL, "clk_system", &clk_system),
|
||||||
CLK(NULL, "clk_imcop", &clk_imcop),
|
CLK(NULL, "clk_imcop", &clk_imcop),
|
||||||
CLK(NULL, "clk_spare", &clk_spare),
|
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_vrst", &clk_ddr2_vrst),
|
||||||
CLK(NULL, "clk_ddr2_vctl_rst", &clk_ddr2_vctl_rst),
|
CLK(NULL, "clk_ddr2_vctl_rst", &clk_ddr2_vctl_rst),
|
||||||
CLK(NULL, NULL, NULL),
|
CLK(NULL, NULL, NULL),
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include <mach/common.h>
|
#include <mach/common.h>
|
||||||
#include <mach/irqs.h>
|
#include <mach/irqs.h>
|
||||||
#include <mach/cputype.h>
|
#include <mach/cputype.h>
|
||||||
|
#include <mach/da8xx.h>
|
||||||
#include <linux/platform_data/usb-davinci.h>
|
#include <linux/platform_data/usb-davinci.h>
|
||||||
|
|
||||||
#define DAVINCI_USB_OTG_BASE 0x01c64000
|
#define DAVINCI_USB_OTG_BASE 0x01c64000
|
||||||
|
@ -1157,6 +1157,18 @@ static void __init init_mmcsd_host(struct mmc_davinci_host *host)
|
|||||||
mmc_davinci_reset_ctrl(host, 0);
|
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)
|
static int __init davinci_mmcsd_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct davinci_mmc_config *pdata = pdev->dev.platform_data;
|
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;
|
struct resource *r, *mem = NULL;
|
||||||
int ret = 0, irq = 0;
|
int ret = 0, irq = 0;
|
||||||
size_t mem_size;
|
size_t mem_size;
|
||||||
|
const struct platform_device_id *id_entry;
|
||||||
|
|
||||||
/* REVISIT: when we're fully converted, fail if pdata is NULL */
|
/* 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))
|
if (pdata && (pdata->wires == 8))
|
||||||
mmc->caps |= (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA);
|
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->ops = &mmc_davinci_ops;
|
||||||
mmc->f_min = 312500;
|
mmc->f_min = 312500;
|
||||||
@ -1408,6 +1423,7 @@ static struct platform_driver davinci_mmcsd_driver = {
|
|||||||
.pm = davinci_mmcsd_pm_ops,
|
.pm = davinci_mmcsd_pm_ops,
|
||||||
},
|
},
|
||||||
.remove = __exit_p(davinci_mmcsd_remove),
|
.remove = __exit_p(davinci_mmcsd_remove),
|
||||||
|
.id_table = davinci_mmc_devtype,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init davinci_mmcsd_init(void)
|
static int __init davinci_mmcsd_init(void)
|
||||||
|
@ -23,9 +23,6 @@ struct davinci_mmc_config {
|
|||||||
/* any additional host capabilities: OR'd in to mmc->f_caps */
|
/* any additional host capabilities: OR'd in to mmc->f_caps */
|
||||||
u32 caps;
|
u32 caps;
|
||||||
|
|
||||||
/* Version of the MMC/SD controller */
|
|
||||||
u8 version;
|
|
||||||
|
|
||||||
/* Number of sg segments */
|
/* Number of sg segments */
|
||||||
u8 nr_sg;
|
u8 nr_sg;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user