Merge branches 'devel-iommu-mailbox', 'devel-mcbsp', 'devel-board' and 'devel-hsmmc' into omap-for-linus
Conflicts: arch/arm/mach-omap2/omap_hwmod_44xx_data.c
This commit is contained in:
commit
b2833a0578
54 changed files with 2629 additions and 1202 deletions
|
@ -10,6 +10,7 @@
|
|||
*
|
||||
* Multichannel mode not supported.
|
||||
*/
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/clk.h>
|
||||
|
@ -78,100 +79,288 @@ static struct omap_mcbsp_ops omap1_mcbsp_ops = {
|
|||
};
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
|
||||
struct resource omap7xx_mcbsp_res[][6] = {
|
||||
{
|
||||
{
|
||||
.start = OMAP7XX_MCBSP1_BASE,
|
||||
.end = OMAP7XX_MCBSP1_BASE + SZ_256,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.name = "rx",
|
||||
.start = INT_7XX_McBSP1RX,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.name = "tx",
|
||||
.start = INT_7XX_McBSP1TX,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.name = "rx",
|
||||
.start = OMAP_DMA_MCBSP1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.name = "tx",
|
||||
.start = OMAP_DMA_MCBSP1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
.start = OMAP7XX_MCBSP2_BASE,
|
||||
.end = OMAP7XX_MCBSP2_BASE + SZ_256,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.name = "rx",
|
||||
.start = INT_7XX_McBSP2RX,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.name = "tx",
|
||||
.start = INT_7XX_McBSP2TX,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.name = "rx",
|
||||
.start = OMAP_DMA_MCBSP3_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.name = "tx",
|
||||
.start = OMAP_DMA_MCBSP3_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_mcbsp_platform_data omap7xx_mcbsp_pdata[] = {
|
||||
{
|
||||
.phys_base = OMAP7XX_MCBSP1_BASE,
|
||||
.dma_rx_sync = OMAP_DMA_MCBSP1_RX,
|
||||
.dma_tx_sync = OMAP_DMA_MCBSP1_TX,
|
||||
.rx_irq = INT_7XX_McBSP1RX,
|
||||
.tx_irq = INT_7XX_McBSP1TX,
|
||||
.ops = &omap1_mcbsp_ops,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP7XX_MCBSP2_BASE,
|
||||
.dma_rx_sync = OMAP_DMA_MCBSP3_RX,
|
||||
.dma_tx_sync = OMAP_DMA_MCBSP3_TX,
|
||||
.rx_irq = INT_7XX_McBSP2RX,
|
||||
.tx_irq = INT_7XX_McBSP2TX,
|
||||
.ops = &omap1_mcbsp_ops,
|
||||
},
|
||||
};
|
||||
#define OMAP7XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap7xx_mcbsp_pdata)
|
||||
#define OMAP7XX_MCBSP_REG_NUM (OMAP_MCBSP_REG_XCERH / sizeof(u16) + 1)
|
||||
#define OMAP7XX_MCBSP_RES_SZ ARRAY_SIZE(omap7xx_mcbsp_res[1])
|
||||
#define OMAP7XX_MCBSP_COUNT ARRAY_SIZE(omap7xx_mcbsp_res)
|
||||
#else
|
||||
#define omap7xx_mcbsp_res NULL
|
||||
#define omap7xx_mcbsp_pdata NULL
|
||||
#define OMAP7XX_MCBSP_PDATA_SZ 0
|
||||
#define OMAP7XX_MCBSP_REG_NUM 0
|
||||
#define OMAP7XX_MCBSP_RES_SZ 0
|
||||
#define OMAP7XX_MCBSP_COUNT 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
struct resource omap15xx_mcbsp_res[][6] = {
|
||||
{
|
||||
{
|
||||
.start = OMAP1510_MCBSP1_BASE,
|
||||
.end = OMAP1510_MCBSP1_BASE + SZ_256,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.name = "rx",
|
||||
.start = INT_McBSP1RX,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.name = "tx",
|
||||
.start = INT_McBSP1TX,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.name = "rx",
|
||||
.start = OMAP_DMA_MCBSP1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.name = "tx",
|
||||
.start = OMAP_DMA_MCBSP1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
.start = OMAP1510_MCBSP2_BASE,
|
||||
.end = OMAP1510_MCBSP2_BASE + SZ_256,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.name = "rx",
|
||||
.start = INT_1510_SPI_RX,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.name = "tx",
|
||||
.start = INT_1510_SPI_TX,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.name = "rx",
|
||||
.start = OMAP_DMA_MCBSP2_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.name = "tx",
|
||||
.start = OMAP_DMA_MCBSP2_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
.start = OMAP1510_MCBSP3_BASE,
|
||||
.end = OMAP1510_MCBSP3_BASE + SZ_256,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.name = "rx",
|
||||
.start = INT_McBSP3RX,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.name = "tx",
|
||||
.start = INT_McBSP3TX,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.name = "rx",
|
||||
.start = OMAP_DMA_MCBSP3_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.name = "tx",
|
||||
.start = OMAP_DMA_MCBSP3_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = {
|
||||
{
|
||||
.phys_base = OMAP1510_MCBSP1_BASE,
|
||||
.dma_rx_sync = OMAP_DMA_MCBSP1_RX,
|
||||
.dma_tx_sync = OMAP_DMA_MCBSP1_TX,
|
||||
.rx_irq = INT_McBSP1RX,
|
||||
.tx_irq = INT_McBSP1TX,
|
||||
.ops = &omap1_mcbsp_ops,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP1510_MCBSP2_BASE,
|
||||
.dma_rx_sync = OMAP_DMA_MCBSP2_RX,
|
||||
.dma_tx_sync = OMAP_DMA_MCBSP2_TX,
|
||||
.rx_irq = INT_1510_SPI_RX,
|
||||
.tx_irq = INT_1510_SPI_TX,
|
||||
.ops = &omap1_mcbsp_ops,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP1510_MCBSP3_BASE,
|
||||
.dma_rx_sync = OMAP_DMA_MCBSP3_RX,
|
||||
.dma_tx_sync = OMAP_DMA_MCBSP3_TX,
|
||||
.rx_irq = INT_McBSP3RX,
|
||||
.tx_irq = INT_McBSP3TX,
|
||||
.ops = &omap1_mcbsp_ops,
|
||||
},
|
||||
};
|
||||
#define OMAP15XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap15xx_mcbsp_pdata)
|
||||
#define OMAP15XX_MCBSP_REG_NUM (OMAP_MCBSP_REG_XCERH / sizeof(u16) + 1)
|
||||
#define OMAP15XX_MCBSP_RES_SZ ARRAY_SIZE(omap15xx_mcbsp_res[1])
|
||||
#define OMAP15XX_MCBSP_COUNT ARRAY_SIZE(omap15xx_mcbsp_res)
|
||||
#else
|
||||
#define omap15xx_mcbsp_res NULL
|
||||
#define omap15xx_mcbsp_pdata NULL
|
||||
#define OMAP15XX_MCBSP_PDATA_SZ 0
|
||||
#define OMAP15XX_MCBSP_REG_NUM 0
|
||||
#define OMAP15XX_MCBSP_RES_SZ 0
|
||||
#define OMAP15XX_MCBSP_COUNT 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP16XX
|
||||
struct resource omap16xx_mcbsp_res[][6] = {
|
||||
{
|
||||
{
|
||||
.start = OMAP1610_MCBSP1_BASE,
|
||||
.end = OMAP1610_MCBSP1_BASE + SZ_256,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.name = "rx",
|
||||
.start = INT_McBSP1RX,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.name = "tx",
|
||||
.start = INT_McBSP1TX,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.name = "rx",
|
||||
.start = OMAP_DMA_MCBSP1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.name = "tx",
|
||||
.start = OMAP_DMA_MCBSP1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
.start = OMAP1610_MCBSP2_BASE,
|
||||
.end = OMAP1610_MCBSP2_BASE + SZ_256,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.name = "rx",
|
||||
.start = INT_1610_McBSP2_RX,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.name = "tx",
|
||||
.start = INT_1610_McBSP2_TX,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.name = "rx",
|
||||
.start = OMAP_DMA_MCBSP2_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.name = "tx",
|
||||
.start = OMAP_DMA_MCBSP2_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
.start = OMAP1610_MCBSP3_BASE,
|
||||
.end = OMAP1610_MCBSP3_BASE + SZ_256,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.name = "rx",
|
||||
.start = INT_McBSP3RX,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.name = "tx",
|
||||
.start = INT_McBSP3TX,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.name = "rx",
|
||||
.start = OMAP_DMA_MCBSP3_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
{
|
||||
.name = "tx",
|
||||
.start = OMAP_DMA_MCBSP3_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
|
||||
{
|
||||
.phys_base = OMAP1610_MCBSP1_BASE,
|
||||
.dma_rx_sync = OMAP_DMA_MCBSP1_RX,
|
||||
.dma_tx_sync = OMAP_DMA_MCBSP1_TX,
|
||||
.rx_irq = INT_McBSP1RX,
|
||||
.tx_irq = INT_McBSP1TX,
|
||||
.ops = &omap1_mcbsp_ops,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP1610_MCBSP2_BASE,
|
||||
.dma_rx_sync = OMAP_DMA_MCBSP2_RX,
|
||||
.dma_tx_sync = OMAP_DMA_MCBSP2_TX,
|
||||
.rx_irq = INT_1610_McBSP2_RX,
|
||||
.tx_irq = INT_1610_McBSP2_TX,
|
||||
.ops = &omap1_mcbsp_ops,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP1610_MCBSP3_BASE,
|
||||
.dma_rx_sync = OMAP_DMA_MCBSP3_RX,
|
||||
.dma_tx_sync = OMAP_DMA_MCBSP3_TX,
|
||||
.rx_irq = INT_McBSP3RX,
|
||||
.tx_irq = INT_McBSP3TX,
|
||||
.ops = &omap1_mcbsp_ops,
|
||||
},
|
||||
};
|
||||
#define OMAP16XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap16xx_mcbsp_pdata)
|
||||
#define OMAP16XX_MCBSP_REG_NUM (OMAP_MCBSP_REG_XCERH / sizeof(u16) + 1)
|
||||
#define OMAP16XX_MCBSP_RES_SZ ARRAY_SIZE(omap16xx_mcbsp_res[1])
|
||||
#define OMAP16XX_MCBSP_COUNT ARRAY_SIZE(omap16xx_mcbsp_res)
|
||||
#else
|
||||
#define omap16xx_mcbsp_res NULL
|
||||
#define omap16xx_mcbsp_pdata NULL
|
||||
#define OMAP16XX_MCBSP_PDATA_SZ 0
|
||||
#define OMAP16XX_MCBSP_REG_NUM 0
|
||||
#define OMAP16XX_MCBSP_RES_SZ 0
|
||||
#define OMAP16XX_MCBSP_COUNT 0
|
||||
#endif
|
||||
|
||||
static int __init omap1_mcbsp_init(void)
|
||||
|
@ -179,16 +368,12 @@ static int __init omap1_mcbsp_init(void)
|
|||
if (!cpu_class_is_omap1())
|
||||
return -ENODEV;
|
||||
|
||||
if (cpu_is_omap7xx()) {
|
||||
omap_mcbsp_count = OMAP7XX_MCBSP_PDATA_SZ;
|
||||
omap_mcbsp_cache_size = OMAP7XX_MCBSP_REG_NUM * sizeof(u16);
|
||||
} else if (cpu_is_omap15xx()) {
|
||||
omap_mcbsp_count = OMAP15XX_MCBSP_PDATA_SZ;
|
||||
omap_mcbsp_cache_size = OMAP15XX_MCBSP_REG_NUM * sizeof(u16);
|
||||
} else if (cpu_is_omap16xx()) {
|
||||
omap_mcbsp_count = OMAP16XX_MCBSP_PDATA_SZ;
|
||||
omap_mcbsp_cache_size = OMAP16XX_MCBSP_REG_NUM * sizeof(u16);
|
||||
}
|
||||
if (cpu_is_omap7xx())
|
||||
omap_mcbsp_count = OMAP7XX_MCBSP_COUNT;
|
||||
else if (cpu_is_omap15xx())
|
||||
omap_mcbsp_count = OMAP15XX_MCBSP_COUNT;
|
||||
else if (cpu_is_omap16xx())
|
||||
omap_mcbsp_count = OMAP16XX_MCBSP_COUNT;
|
||||
|
||||
mcbsp_ptr = kzalloc(omap_mcbsp_count * sizeof(struct omap_mcbsp *),
|
||||
GFP_KERNEL);
|
||||
|
@ -196,16 +381,22 @@ static int __init omap1_mcbsp_init(void)
|
|||
return -ENOMEM;
|
||||
|
||||
if (cpu_is_omap7xx())
|
||||
omap_mcbsp_register_board_cfg(omap7xx_mcbsp_pdata,
|
||||
OMAP7XX_MCBSP_PDATA_SZ);
|
||||
omap_mcbsp_register_board_cfg(omap7xx_mcbsp_res[0],
|
||||
OMAP7XX_MCBSP_RES_SZ,
|
||||
omap7xx_mcbsp_pdata,
|
||||
OMAP7XX_MCBSP_COUNT);
|
||||
|
||||
if (cpu_is_omap15xx())
|
||||
omap_mcbsp_register_board_cfg(omap15xx_mcbsp_pdata,
|
||||
OMAP15XX_MCBSP_PDATA_SZ);
|
||||
omap_mcbsp_register_board_cfg(omap15xx_mcbsp_res[0],
|
||||
OMAP15XX_MCBSP_RES_SZ,
|
||||
omap15xx_mcbsp_pdata,
|
||||
OMAP15XX_MCBSP_COUNT);
|
||||
|
||||
if (cpu_is_omap16xx())
|
||||
omap_mcbsp_register_board_cfg(omap16xx_mcbsp_pdata,
|
||||
OMAP16XX_MCBSP_PDATA_SZ);
|
||||
omap_mcbsp_register_board_cfg(omap16xx_mcbsp_res[0],
|
||||
OMAP16XX_MCBSP_RES_SZ,
|
||||
omap16xx_mcbsp_pdata,
|
||||
OMAP16XX_MCBSP_COUNT);
|
||||
|
||||
return omap_mcbsp_init();
|
||||
}
|
||||
|
|
|
@ -142,14 +142,12 @@ static struct omap_board_config_kernel sdp2430_config[] __initdata = {
|
|||
|
||||
static void __init omap_2430sdp_init_early(void)
|
||||
{
|
||||
omap_board_config = sdp2430_config;
|
||||
omap_board_config_size = ARRAY_SIZE(sdp2430_config);
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(NULL, NULL);
|
||||
}
|
||||
|
||||
static struct regulator_consumer_supply sdp2430_vmmc1_supplies[] = {
|
||||
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"),
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
|
||||
};
|
||||
|
||||
/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
|
||||
|
@ -246,6 +244,9 @@ static void __init omap_2430sdp_init(void)
|
|||
|
||||
omap2430_mux_init(board_mux, OMAP_PACKAGE_ZAC);
|
||||
|
||||
omap_board_config = sdp2430_config;
|
||||
omap_board_config_size = ARRAY_SIZE(sdp2430_config);
|
||||
|
||||
omap2430_i2c_init();
|
||||
|
||||
platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
|
||||
|
|
|
@ -315,9 +315,6 @@ static struct omap_board_config_kernel sdp3430_config[] __initdata = {
|
|||
|
||||
static void __init omap_3430sdp_init_early(void)
|
||||
{
|
||||
omap_board_config = sdp3430_config;
|
||||
omap_board_config_size = ARRAY_SIZE(sdp3430_config);
|
||||
omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL);
|
||||
}
|
||||
|
@ -410,15 +407,15 @@ static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {
|
|||
};
|
||||
|
||||
static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = {
|
||||
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"),
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply sdp3430_vsim_supplies[] = {
|
||||
REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.0"),
|
||||
REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply sdp3430_vmmc2_supplies[] = {
|
||||
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"),
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -555,9 +552,7 @@ static struct regulator_init_data sdp3430_vpll2 = {
|
|||
.consumer_supplies = sdp3430_vpll2_supplies,
|
||||
};
|
||||
|
||||
static struct twl4030_codec_audio_data sdp3430_audio = {
|
||||
.audio_mclk = 26000000,
|
||||
};
|
||||
static struct twl4030_codec_audio_data sdp3430_audio;
|
||||
|
||||
static struct twl4030_codec_data sdp3430_codec = {
|
||||
.audio_mclk = 26000000,
|
||||
|
@ -788,6 +783,9 @@ static struct omap_musb_board_data musb_board_data = {
|
|||
static void __init omap_3430sdp_init(void)
|
||||
{
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
|
||||
omap_board_config = sdp3430_config;
|
||||
omap_board_config_size = ARRAY_SIZE(sdp3430_config);
|
||||
omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
|
||||
omap3430_i2c_init();
|
||||
omap_display_init(&sdp3430_dss_data);
|
||||
if (omap_rev() > OMAP3430_REV_ES1_0)
|
||||
|
|
|
@ -72,8 +72,6 @@ static struct omap_board_config_kernel sdp_config[] __initdata = {
|
|||
|
||||
static void __init omap_sdp_init_early(void)
|
||||
{
|
||||
omap_board_config = sdp_config;
|
||||
omap_board_config_size = ARRAY_SIZE(sdp_config);
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params,
|
||||
h8mbx00u0mer0em_sdrc_params);
|
||||
|
@ -206,6 +204,8 @@ static struct flash_partitions sdp_flash_partitions[] = {
|
|||
static void __init omap_sdp_init(void)
|
||||
{
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
|
||||
omap_board_config = sdp_config;
|
||||
omap_board_config_size = ARRAY_SIZE(sdp_config);
|
||||
zoom_peripherals_init();
|
||||
zoom_display_init();
|
||||
board_smc91x_init();
|
||||
|
|
|
@ -325,8 +325,6 @@ static struct omap_board_config_kernel sdp4430_config[] __initdata = {
|
|||
|
||||
static void __init omap_4430sdp_init_early(void)
|
||||
{
|
||||
omap_board_config = sdp4430_config;
|
||||
omap_board_config_size = ARRAY_SIZE(sdp4430_config);
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(NULL, NULL);
|
||||
#ifdef CONFIG_OMAP_32K_TIMER
|
||||
|
@ -348,11 +346,6 @@ static struct twl4030_usb_data omap4_usbphy_data = {
|
|||
};
|
||||
|
||||
static struct omap2_hsmmc_info mmc[] = {
|
||||
{
|
||||
.mmc = 1,
|
||||
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
|
||||
.gpio_wp = -EINVAL,
|
||||
},
|
||||
{
|
||||
.mmc = 2,
|
||||
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
|
||||
|
@ -361,19 +354,24 @@ static struct omap2_hsmmc_info mmc[] = {
|
|||
.nonremovable = true,
|
||||
.ocr_mask = MMC_VDD_29_30,
|
||||
},
|
||||
{
|
||||
.mmc = 1,
|
||||
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
|
||||
.gpio_wp = -EINVAL,
|
||||
},
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
|
||||
{
|
||||
.supply = "vmmc",
|
||||
.dev_name = "mmci-omap-hs.1",
|
||||
.dev_name = "omap_hsmmc.1",
|
||||
},
|
||||
};
|
||||
static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
|
||||
{
|
||||
.supply = "vmmc",
|
||||
.dev_name = "mmci-omap-hs.0",
|
||||
.dev_name = "omap_hsmmc.0",
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -640,6 +638,9 @@ static void __init omap_4430sdp_init(void)
|
|||
package = OMAP_PACKAGE_CBL;
|
||||
omap4_mux_init(board_mux, package);
|
||||
|
||||
omap_board_config = sdp4430_config;
|
||||
omap_board_config_size = ARRAY_SIZE(sdp4430_config);
|
||||
|
||||
omap4_i2c_init();
|
||||
omap_sfh7741prox_init();
|
||||
platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
|
||||
|
|
|
@ -51,9 +51,6 @@ static struct omap_board_mux board_mux[] __initdata = {
|
|||
|
||||
static void __init am3517_crane_init_early(void)
|
||||
{
|
||||
omap_board_config = am3517_crane_config;
|
||||
omap_board_config_size = ARRAY_SIZE(am3517_crane_config);
|
||||
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(NULL, NULL);
|
||||
}
|
||||
|
@ -76,6 +73,9 @@ static void __init am3517_crane_init(void)
|
|||
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
|
||||
omap_serial_init();
|
||||
|
||||
omap_board_config = am3517_crane_config;
|
||||
omap_board_config_size = ARRAY_SIZE(am3517_crane_config);
|
||||
|
||||
/* Configure GPIO for EHCI port */
|
||||
if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) {
|
||||
pr_err("Can not configure mux for GPIO_USB_NRESET %d\n",
|
||||
|
|
|
@ -381,13 +381,8 @@ static struct omap_dss_board_info am3517_evm_dss_data = {
|
|||
/*
|
||||
* Board initialization
|
||||
*/
|
||||
static struct omap_board_config_kernel am3517_evm_config[] __initdata = {
|
||||
};
|
||||
|
||||
static void __init am3517_evm_init_early(void)
|
||||
{
|
||||
omap_board_config = am3517_evm_config;
|
||||
omap_board_config_size = ARRAY_SIZE(am3517_evm_config);
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(NULL, NULL);
|
||||
}
|
||||
|
@ -481,8 +476,13 @@ static void am3517_evm_hecc_init(struct ti_hecc_platform_data *pdata)
|
|||
platform_device_register(&am3517_hecc_device);
|
||||
}
|
||||
|
||||
static struct omap_board_config_kernel am3517_evm_config[] __initdata = {
|
||||
};
|
||||
|
||||
static void __init am3517_evm_init(void)
|
||||
{
|
||||
omap_board_config = am3517_evm_config;
|
||||
omap_board_config_size = ARRAY_SIZE(am3517_evm_config);
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
|
||||
|
||||
am3517_evm_i2c_init();
|
||||
|
|
|
@ -276,8 +276,6 @@ static struct omap_board_config_kernel apollon_config[] __initdata = {
|
|||
|
||||
static void __init omap_apollon_init_early(void)
|
||||
{
|
||||
omap_board_config = apollon_config;
|
||||
omap_board_config_size = ARRAY_SIZE(apollon_config);
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(NULL, NULL);
|
||||
}
|
||||
|
@ -319,6 +317,8 @@ static void __init omap_apollon_init(void)
|
|||
u32 v;
|
||||
|
||||
omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
|
||||
omap_board_config = apollon_config;
|
||||
omap_board_config_size = ARRAY_SIZE(apollon_config);
|
||||
|
||||
apollon_init_smc91x();
|
||||
apollon_led_init();
|
||||
|
|
|
@ -668,14 +668,8 @@ static void __init cm_t35_init_i2c(void)
|
|||
ARRAY_SIZE(cm_t35_i2c_boardinfo));
|
||||
}
|
||||
|
||||
static struct omap_board_config_kernel cm_t35_config[] __initdata = {
|
||||
};
|
||||
|
||||
static void __init cm_t35_init_early(void)
|
||||
{
|
||||
omap_board_config = cm_t35_config;
|
||||
omap_board_config_size = ARRAY_SIZE(cm_t35_config);
|
||||
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
|
||||
mt46h32m32lf6_sdrc_params);
|
||||
|
@ -785,8 +779,13 @@ static struct omap_musb_board_data musb_board_data = {
|
|||
.power = 100,
|
||||
};
|
||||
|
||||
static struct omap_board_config_kernel cm_t35_config[] __initdata = {
|
||||
};
|
||||
|
||||
static void __init cm_t35_init(void)
|
||||
{
|
||||
omap_board_config = cm_t35_config;
|
||||
omap_board_config_size = ARRAY_SIZE(cm_t35_config);
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
|
||||
omap_serial_init();
|
||||
cm_t35_init_i2c();
|
||||
|
|
|
@ -256,9 +256,6 @@ static struct omap_board_config_kernel cm_t3517_config[] __initdata = {
|
|||
|
||||
static void __init cm_t3517_init_early(void)
|
||||
{
|
||||
omap_board_config = cm_t3517_config;
|
||||
omap_board_config_size = ARRAY_SIZE(cm_t3517_config);
|
||||
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(NULL, NULL);
|
||||
}
|
||||
|
@ -293,6 +290,8 @@ static void __init cm_t3517_init(void)
|
|||
{
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
|
||||
omap_serial_init();
|
||||
omap_board_config = cm_t3517_config;
|
||||
omap_board_config_size = ARRAY_SIZE(cm_t3517_config);
|
||||
cm_t3517_init_leds();
|
||||
cm_t3517_init_nand();
|
||||
cm_t3517_init_rtc();
|
||||
|
|
|
@ -140,7 +140,7 @@ static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev)
|
|||
}
|
||||
|
||||
static struct regulator_consumer_supply devkit8000_vmmc1_supply =
|
||||
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
|
||||
|
||||
|
||||
/* ads7846 on SPI */
|
||||
|
@ -342,9 +342,7 @@ static struct twl4030_usb_data devkit8000_usb_data = {
|
|||
.usb_mode = T2_USB_MODE_ULPI,
|
||||
};
|
||||
|
||||
static struct twl4030_codec_audio_data devkit8000_audio_data = {
|
||||
.audio_mclk = 26000000,
|
||||
};
|
||||
static struct twl4030_codec_audio_data devkit8000_audio_data;
|
||||
|
||||
static struct twl4030_codec_data devkit8000_codec_data = {
|
||||
.audio_mclk = 26000000,
|
||||
|
|
|
@ -154,7 +154,7 @@ __init board_nand_init(struct mtd_partition *nand_parts,
|
|||
}
|
||||
#else
|
||||
void
|
||||
__init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs)
|
||||
__init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs, int nand_type)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */
|
||||
|
|
|
@ -35,8 +35,6 @@ static struct omap_board_config_kernel generic_config[] = {
|
|||
|
||||
static void __init omap_generic_init_early(void)
|
||||
{
|
||||
omap_board_config = generic_config;
|
||||
omap_board_config_size = ARRAY_SIZE(generic_config);
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(NULL, NULL);
|
||||
}
|
||||
|
@ -44,6 +42,8 @@ static void __init omap_generic_init_early(void)
|
|||
static void __init omap_generic_init(void)
|
||||
{
|
||||
omap_serial_init();
|
||||
omap_board_config = generic_config;
|
||||
omap_board_config_size = ARRAY_SIZE(generic_config);
|
||||
}
|
||||
|
||||
static void __init omap_generic_map_io(void)
|
||||
|
|
|
@ -292,8 +292,6 @@ static struct omap_board_config_kernel h4_config[] __initdata = {
|
|||
|
||||
static void __init omap_h4_init_early(void)
|
||||
{
|
||||
omap_board_config = h4_config;
|
||||
omap_board_config_size = ARRAY_SIZE(h4_config);
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(NULL, NULL);
|
||||
}
|
||||
|
@ -334,6 +332,9 @@ static void __init omap_h4_init(void)
|
|||
{
|
||||
omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAF);
|
||||
|
||||
omap_board_config = h4_config;
|
||||
omap_board_config_size = ARRAY_SIZE(h4_config);
|
||||
|
||||
/*
|
||||
* Make sure the serial ports are muxed on at this point.
|
||||
* You have to mux them off in device drivers later on
|
||||
|
|
|
@ -250,7 +250,7 @@ static inline void __init igep2_init_smsc911x(void) { }
|
|||
#endif
|
||||
|
||||
static struct regulator_consumer_supply igep2_vmmc1_supply =
|
||||
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
|
||||
|
||||
/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
|
||||
static struct regulator_init_data igep2_vmmc1 = {
|
||||
|
@ -268,7 +268,7 @@ static struct regulator_init_data igep2_vmmc1 = {
|
|||
};
|
||||
|
||||
static struct regulator_consumer_supply igep2_vio_supply =
|
||||
REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1");
|
||||
REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
|
||||
|
||||
static struct regulator_init_data igep2_vio = {
|
||||
.constraints = {
|
||||
|
@ -286,7 +286,7 @@ static struct regulator_init_data igep2_vio = {
|
|||
};
|
||||
|
||||
static struct regulator_consumer_supply igep2_vmmc2_supply =
|
||||
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
|
||||
|
||||
static struct regulator_init_data igep2_vmmc2 = {
|
||||
.constraints = {
|
||||
|
@ -521,9 +521,7 @@ static void __init igep2_init_early(void)
|
|||
m65kxxxxam_sdrc_params);
|
||||
}
|
||||
|
||||
static struct twl4030_codec_audio_data igep2_audio_data = {
|
||||
.audio_mclk = 26000000,
|
||||
};
|
||||
static struct twl4030_codec_audio_data igep2_audio_data;
|
||||
|
||||
static struct twl4030_codec_data igep2_codec_data = {
|
||||
.audio_mclk = 26000000,
|
||||
|
|
|
@ -142,7 +142,7 @@ static void __init igep3_flash_init(void) {}
|
|||
#endif
|
||||
|
||||
static struct regulator_consumer_supply igep3_vmmc1_supply =
|
||||
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
|
||||
|
||||
/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
|
||||
static struct regulator_init_data igep3_vmmc1 = {
|
||||
|
@ -160,7 +160,7 @@ static struct regulator_init_data igep3_vmmc1 = {
|
|||
};
|
||||
|
||||
static struct regulator_consumer_supply igep3_vio_supply =
|
||||
REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1");
|
||||
REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
|
||||
|
||||
static struct regulator_init_data igep3_vio = {
|
||||
.constraints = {
|
||||
|
@ -178,7 +178,7 @@ static struct regulator_init_data igep3_vio = {
|
|||
};
|
||||
|
||||
static struct regulator_consumer_supply igep3_vmmc2_supply =
|
||||
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
|
||||
|
||||
static struct regulator_init_data igep3_vmmc2 = {
|
||||
.constraints = {
|
||||
|
|
|
@ -290,8 +290,6 @@ static struct omap_board_config_kernel ldp_config[] __initdata = {
|
|||
|
||||
static void __init omap_ldp_init_early(void)
|
||||
{
|
||||
omap_board_config = ldp_config;
|
||||
omap_board_config_size = ARRAY_SIZE(ldp_config);
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(NULL, NULL);
|
||||
}
|
||||
|
@ -329,6 +327,26 @@ static struct regulator_init_data ldp_vmmc1 = {
|
|||
.consumer_supplies = &ldp_vmmc1_supply,
|
||||
};
|
||||
|
||||
/* ads7846 on SPI */
|
||||
static struct regulator_consumer_supply ldp_vaux1_supplies[] = {
|
||||
REGULATOR_SUPPLY("vcc", "spi1.0"),
|
||||
};
|
||||
|
||||
/* VAUX1 */
|
||||
static struct regulator_init_data ldp_vaux1 = {
|
||||
.constraints = {
|
||||
.min_uV = 3000000,
|
||||
.max_uV = 3000000,
|
||||
.apply_uV = true,
|
||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
| REGULATOR_MODE_STANDBY,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = ARRAY_SIZE(ldp_vaux1_supplies),
|
||||
.consumer_supplies = ldp_vaux1_supplies,
|
||||
};
|
||||
|
||||
static struct twl4030_platform_data ldp_twldata = {
|
||||
.irq_base = TWL4030_IRQ_BASE,
|
||||
.irq_end = TWL4030_IRQ_END,
|
||||
|
@ -337,6 +355,7 @@ static struct twl4030_platform_data ldp_twldata = {
|
|||
.madc = &ldp_madc_data,
|
||||
.usb = &ldp_usb_data,
|
||||
.vmmc1 = &ldp_vmmc1,
|
||||
.vaux1 = &ldp_vaux1,
|
||||
.gpio = &ldp_gpio_data,
|
||||
.keypad = &ldp_kp_twl4030_data,
|
||||
};
|
||||
|
@ -422,6 +441,8 @@ static struct mtd_partition ldp_nand_partitions[] = {
|
|||
static void __init omap_ldp_init(void)
|
||||
{
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
|
||||
omap_board_config = ldp_config;
|
||||
omap_board_config_size = ARRAY_SIZE(ldp_config);
|
||||
ldp_init_smsc911x();
|
||||
omap_i2c_init();
|
||||
platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices));
|
||||
|
|
|
@ -536,7 +536,7 @@ static void __init n8x0_mmc_init(void)
|
|||
}
|
||||
|
||||
mmc_data[0] = &mmc1_data;
|
||||
omap2_init_mmc(mmc_data, OMAP24XX_NR_MMC);
|
||||
omap242x_init_mmc(mmc_data);
|
||||
}
|
||||
#else
|
||||
|
||||
|
|
|
@ -427,9 +427,7 @@ static struct twl4030_usb_data beagle_usb_data = {
|
|||
.usb_mode = T2_USB_MODE_ULPI,
|
||||
};
|
||||
|
||||
static struct twl4030_codec_audio_data beagle_audio_data = {
|
||||
.audio_mclk = 26000000,
|
||||
};
|
||||
static struct twl4030_codec_audio_data beagle_audio_data;
|
||||
|
||||
static struct twl4030_codec_data beagle_codec_data = {
|
||||
.audio_mclk = 26000000,
|
||||
|
|
|
@ -534,9 +534,7 @@ static struct twl4030_madc_platform_data omap3evm_madc_data = {
|
|||
.irq_line = 1,
|
||||
};
|
||||
|
||||
static struct twl4030_codec_audio_data omap3evm_audio_data = {
|
||||
.audio_mclk = 26000000,
|
||||
};
|
||||
static struct twl4030_codec_audio_data omap3evm_audio_data;
|
||||
|
||||
static struct twl4030_codec_data omap3evm_codec_data = {
|
||||
.audio_mclk = 26000000,
|
||||
|
@ -604,7 +602,7 @@ static struct regulator_init_data omap3evm_vio = {
|
|||
#define OMAP3EVM_WLAN_IRQ_GPIO (149)
|
||||
|
||||
static struct regulator_consumer_supply omap3evm_vmmc2_supply =
|
||||
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
|
||||
|
||||
/* VMMC2 for driving the WL12xx module */
|
||||
static struct regulator_init_data omap3evm_vmmc2 = {
|
||||
|
@ -729,8 +727,6 @@ static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
|
|||
|
||||
static void __init omap3_evm_init_early(void)
|
||||
{
|
||||
omap_board_config = omap3_evm_config;
|
||||
omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL);
|
||||
}
|
||||
|
@ -836,6 +832,9 @@ static void __init omap3_evm_init(void)
|
|||
else
|
||||
omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB);
|
||||
|
||||
omap_board_config = omap3_evm_config;
|
||||
omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
|
||||
|
||||
omap3_evm_i2c_init();
|
||||
|
||||
omap_display_init(&omap3_evm_dss_data);
|
||||
|
|
|
@ -333,13 +333,13 @@ static struct twl4030_gpio_platform_data omap3pandora_gpio_data = {
|
|||
};
|
||||
|
||||
static struct regulator_consumer_supply pandora_vmmc1_supply =
|
||||
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
|
||||
|
||||
static struct regulator_consumer_supply pandora_vmmc2_supply =
|
||||
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
|
||||
|
||||
static struct regulator_consumer_supply pandora_vmmc3_supply =
|
||||
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.2");
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2");
|
||||
|
||||
static struct regulator_consumer_supply pandora_vdda_dac_supply =
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss");
|
||||
|
@ -516,9 +516,7 @@ static struct twl4030_usb_data omap3pandora_usb_data = {
|
|||
.usb_mode = T2_USB_MODE_ULPI,
|
||||
};
|
||||
|
||||
static struct twl4030_codec_audio_data omap3pandora_audio_data = {
|
||||
.audio_mclk = 26000000,
|
||||
};
|
||||
static struct twl4030_codec_audio_data omap3pandora_audio_data;
|
||||
|
||||
static struct twl4030_codec_data omap3pandora_codec_data = {
|
||||
.audio_mclk = 26000000,
|
||||
|
|
|
@ -431,9 +431,7 @@ static struct twl4030_madc_platform_data omap3stalker_madc_data = {
|
|||
.irq_line = 1,
|
||||
};
|
||||
|
||||
static struct twl4030_codec_audio_data omap3stalker_audio_data = {
|
||||
.audio_mclk = 26000000,
|
||||
};
|
||||
static struct twl4030_codec_audio_data omap3stalker_audio_data;
|
||||
|
||||
static struct twl4030_codec_data omap3stalker_codec_data = {
|
||||
.audio_mclk = 26000000,
|
||||
|
@ -581,8 +579,6 @@ static struct omap_board_config_kernel omap3_stalker_config[] __initdata = {
|
|||
|
||||
static void __init omap3_stalker_init_early(void)
|
||||
{
|
||||
omap_board_config = omap3_stalker_config;
|
||||
omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL);
|
||||
}
|
||||
|
@ -629,6 +625,8 @@ static struct omap_musb_board_data musb_board_data = {
|
|||
static void __init omap3_stalker_init(void)
|
||||
{
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
|
||||
omap_board_config = omap3_stalker_config;
|
||||
omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
|
||||
|
||||
omap3_stalker_i2c_init();
|
||||
|
||||
|
|
|
@ -252,9 +252,7 @@ static struct twl4030_usb_data touchbook_usb_data = {
|
|||
.usb_mode = T2_USB_MODE_ULPI,
|
||||
};
|
||||
|
||||
static struct twl4030_codec_audio_data touchbook_audio_data = {
|
||||
.audio_mclk = 26000000,
|
||||
};
|
||||
static struct twl4030_codec_audio_data touchbook_audio_data;
|
||||
|
||||
static struct twl4030_codec_data touchbook_codec_data = {
|
||||
.audio_mclk = 26000000,
|
||||
|
@ -417,9 +415,6 @@ static struct omap_board_mux board_mux[] __initdata = {
|
|||
|
||||
static void __init omap3_touchbook_init_early(void)
|
||||
{
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
|
||||
omap_board_config = omap3_touchbook_config;
|
||||
omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config);
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
|
||||
mt46h32m32lf6_sdrc_params);
|
||||
|
@ -514,6 +509,10 @@ static struct omap_musb_board_data musb_board_data = {
|
|||
|
||||
static void __init omap3_touchbook_init(void)
|
||||
{
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
|
||||
omap_board_config = omap3_touchbook_config;
|
||||
omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config);
|
||||
|
||||
pm_power_off = omap3_touchbook_poweroff;
|
||||
|
||||
omap3_touchbook_i2c_init();
|
||||
|
|
|
@ -50,6 +50,16 @@
|
|||
#define GPIO_WIFI_PMENA 43
|
||||
#define GPIO_WIFI_IRQ 53
|
||||
|
||||
/* wl127x BT, FM, GPS connectivity chip */
|
||||
static int wl1271_gpios[] = {46, -1, -1};
|
||||
static struct platform_device wl1271_device = {
|
||||
.name = "kim",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &wl1271_gpios,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_led gpio_leds[] = {
|
||||
{
|
||||
.name = "pandaboard::status1",
|
||||
|
@ -78,6 +88,7 @@ static struct platform_device leds_gpio = {
|
|||
|
||||
static struct platform_device *panda_devices[] __initdata = {
|
||||
&leds_gpio,
|
||||
&wl1271_device,
|
||||
};
|
||||
|
||||
static void __init omap4_panda_init_early(void)
|
||||
|
@ -180,13 +191,13 @@ static struct omap2_hsmmc_info mmc[] = {
|
|||
static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = {
|
||||
{
|
||||
.supply = "vmmc",
|
||||
.dev_name = "mmci-omap-hs.0",
|
||||
.dev_name = "omap_hsmmc.0",
|
||||
},
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply omap4_panda_vmmc5_supply = {
|
||||
.supply = "vmmc",
|
||||
.dev_name = "mmci-omap-hs.4",
|
||||
.dev_name = "omap_hsmmc.4",
|
||||
};
|
||||
|
||||
static struct regulator_init_data panda_vmmc5 = {
|
||||
|
|
|
@ -358,9 +358,7 @@ static struct regulator_init_data overo_vmmc1 = {
|
|||
.consumer_supplies = &overo_vmmc1_supply,
|
||||
};
|
||||
|
||||
static struct twl4030_codec_audio_data overo_audio_data = {
|
||||
.audio_mclk = 26000000,
|
||||
};
|
||||
static struct twl4030_codec_audio_data overo_audio_data;
|
||||
|
||||
static struct twl4030_codec_data overo_codec_data = {
|
||||
.audio_mclk = 26000000,
|
||||
|
@ -411,8 +409,6 @@ static struct omap_board_config_kernel overo_config[] __initdata = {
|
|||
|
||||
static void __init overo_init_early(void)
|
||||
{
|
||||
omap_board_config = overo_config;
|
||||
omap_board_config_size = ARRAY_SIZE(overo_config);
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
|
||||
mt46h32m32lf6_sdrc_params);
|
||||
|
@ -448,6 +444,8 @@ static struct omap_musb_board_data musb_board_data = {
|
|||
static void __init overo_init(void)
|
||||
{
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
|
||||
omap_board_config = overo_config;
|
||||
omap_board_config_size = ARRAY_SIZE(overo_config);
|
||||
overo_i2c_init();
|
||||
platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices));
|
||||
omap_serial_init();
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "sdram-nokia.h"
|
||||
|
||||
static struct regulator_consumer_supply rm680_vemmc_consumers[] = {
|
||||
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"),
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
|
||||
};
|
||||
|
||||
/* Fixed regulator for internal eMMC */
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
|
||||
#include <sound/tlv320aic3x.h>
|
||||
#include <sound/tpa6130a2-plat.h>
|
||||
#include <media/radio-si4713.h>
|
||||
#include <media/si4713.h>
|
||||
|
||||
#include <../drivers/staging/iio/light/tsl2563.h>
|
||||
|
||||
|
@ -47,6 +49,8 @@
|
|||
|
||||
#define RX51_WL1251_POWER_GPIO 87
|
||||
#define RX51_WL1251_IRQ_GPIO 42
|
||||
#define RX51_FMTX_RESET_GPIO 163
|
||||
#define RX51_FMTX_IRQ 53
|
||||
|
||||
/* list all spi devices here */
|
||||
enum {
|
||||
|
@ -331,13 +335,13 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
|
|||
};
|
||||
|
||||
static struct regulator_consumer_supply rx51_vmmc1_supply =
|
||||
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
|
||||
|
||||
static struct regulator_consumer_supply rx51_vaux3_supply =
|
||||
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
|
||||
|
||||
static struct regulator_consumer_supply rx51_vsim_supply =
|
||||
REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1");
|
||||
REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
|
||||
|
||||
static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {
|
||||
/* tlv320aic3x analog supplies */
|
||||
|
@ -348,7 +352,7 @@ static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {
|
|||
/* tpa6130a2 */
|
||||
REGULATOR_SUPPLY("Vdd", "2-0060"),
|
||||
/* Keep vmmc as last item. It is not iterated for newer boards */
|
||||
REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"),
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply rx51_vio_supplies[] = {
|
||||
|
@ -357,10 +361,14 @@ static struct regulator_consumer_supply rx51_vio_supplies[] = {
|
|||
REGULATOR_SUPPLY("DVDD", "2-0018"),
|
||||
REGULATOR_SUPPLY("IOVDD", "2-0019"),
|
||||
REGULATOR_SUPPLY("DVDD", "2-0019"),
|
||||
/* Si4713 IO supply */
|
||||
REGULATOR_SUPPLY("vio", "2-0063"),
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply rx51_vaux1_consumers[] = {
|
||||
REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
|
||||
/* Si4713 supply */
|
||||
REGULATOR_SUPPLY("vdd", "2-0063"),
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply rx51_vdac_supply[] = {
|
||||
|
@ -511,6 +519,41 @@ static struct regulator_init_data rx51_vio = {
|
|||
.consumer_supplies = rx51_vio_supplies,
|
||||
};
|
||||
|
||||
static struct si4713_platform_data rx51_si4713_i2c_data __initdata_or_module = {
|
||||
.gpio_reset = RX51_FMTX_RESET_GPIO,
|
||||
};
|
||||
|
||||
static struct i2c_board_info rx51_si4713_board_info __initdata_or_module = {
|
||||
I2C_BOARD_INFO("si4713", SI4713_I2C_ADDR_BUSEN_HIGH),
|
||||
.platform_data = &rx51_si4713_i2c_data,
|
||||
};
|
||||
|
||||
static struct radio_si4713_platform_data rx51_si4713_data __initdata_or_module = {
|
||||
.i2c_bus = 2,
|
||||
.subdev_board_info = &rx51_si4713_board_info,
|
||||
};
|
||||
|
||||
static struct platform_device rx51_si4713_dev __initdata_or_module = {
|
||||
.name = "radio-si4713",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &rx51_si4713_data,
|
||||
},
|
||||
};
|
||||
|
||||
static __init void rx51_init_si4713(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = gpio_request_one(RX51_FMTX_IRQ, GPIOF_DIR_IN, "si4713 irq");
|
||||
if (err) {
|
||||
printk(KERN_ERR "Cannot request si4713 irq gpio. %d\n", err);
|
||||
return;
|
||||
}
|
||||
rx51_si4713_board_info.irq = gpio_to_irq(RX51_FMTX_IRQ);
|
||||
platform_device_register(&rx51_si4713_dev);
|
||||
}
|
||||
|
||||
static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n)
|
||||
{
|
||||
/* FIXME this gpio setup is just a placeholder for now */
|
||||
|
@ -699,6 +742,14 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = {
|
|||
.resource_config = twl4030_rconfig,
|
||||
};
|
||||
|
||||
struct twl4030_codec_vibra_data rx51_vibra_data __initdata = {
|
||||
.coexist = 0,
|
||||
};
|
||||
|
||||
struct twl4030_codec_data rx51_codec_data __initdata = {
|
||||
.audio_mclk = 26000000,
|
||||
.vibra = &rx51_vibra_data,
|
||||
};
|
||||
|
||||
static struct twl4030_platform_data rx51_twldata __initdata = {
|
||||
.irq_base = TWL4030_IRQ_BASE,
|
||||
|
@ -710,6 +761,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
|
|||
.madc = &rx51_madc_data,
|
||||
.usb = &rx51_usb_data,
|
||||
.power = &rx51_t2scripts_data,
|
||||
.codec = &rx51_codec_data,
|
||||
|
||||
.vaux1 = &rx51_vaux1,
|
||||
.vaux2 = &rx51_vaux2,
|
||||
|
@ -921,6 +973,7 @@ void __init rx51_peripherals_init(void)
|
|||
board_smc91x_init();
|
||||
rx51_add_gpio_keys();
|
||||
rx51_init_wl1251();
|
||||
rx51_init_si4713();
|
||||
spi_register_board_info(rx51_peripherals_spi_board_info,
|
||||
ARRAY_SIZE(rx51_peripherals_spi_board_info));
|
||||
|
||||
|
|
|
@ -102,9 +102,6 @@ static void __init rx51_init_early(void)
|
|||
{
|
||||
struct omap_sdrc_params *sdrc_params;
|
||||
|
||||
omap_board_config = rx51_config;
|
||||
omap_board_config_size = ARRAY_SIZE(rx51_config);
|
||||
omap3_pm_init_cpuidle(rx51_cpuidle_params);
|
||||
omap2_init_common_infrastructure();
|
||||
sdrc_params = nokia_get_sdram_timings();
|
||||
omap2_init_common_devices(sdrc_params, sdrc_params);
|
||||
|
@ -127,6 +124,9 @@ static struct omap_musb_board_data musb_board_data = {
|
|||
static void __init rx51_init(void)
|
||||
{
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
|
||||
omap_board_config = rx51_config;
|
||||
omap_board_config_size = ARRAY_SIZE(rx51_config);
|
||||
omap3_pm_init_cpuidle(rx51_cpuidle_params);
|
||||
omap_serial_init();
|
||||
usb_musb_init(&musb_board_data);
|
||||
rx51_peripherals_init();
|
||||
|
|
|
@ -29,8 +29,6 @@ static struct omap_board_config_kernel ti8168_evm_config[] __initdata = {
|
|||
|
||||
static void __init ti8168_init_early(void)
|
||||
{
|
||||
omap_board_config = ti8168_evm_config;
|
||||
omap_board_config_size = ARRAY_SIZE(ti8168_evm_config);
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(NULL, NULL);
|
||||
}
|
||||
|
@ -43,6 +41,8 @@ static void __init ti8168_evm_init_irq(void)
|
|||
static void __init ti8168_evm_init(void)
|
||||
{
|
||||
omap_serial_init();
|
||||
omap_board_config = ti8168_evm_config;
|
||||
omap_board_config_size = ARRAY_SIZE(ti8168_evm_config);
|
||||
}
|
||||
|
||||
static void __init ti8168_evm_map_io(void)
|
||||
|
|
|
@ -118,7 +118,7 @@ static struct regulator_consumer_supply zoom_vmmc2_supply = {
|
|||
|
||||
static struct regulator_consumer_supply zoom_vmmc3_supply = {
|
||||
.supply = "vmmc",
|
||||
.dev_name = "mmci-omap-hs.2",
|
||||
.dev_name = "omap_hsmmc.2",
|
||||
};
|
||||
|
||||
/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
|
||||
|
@ -322,9 +322,7 @@ static struct twl4030_madc_platform_data zoom_madc_data = {
|
|||
.irq_line = 1,
|
||||
};
|
||||
|
||||
static struct twl4030_codec_audio_data zoom_audio_data = {
|
||||
.audio_mclk = 26000000,
|
||||
};
|
||||
static struct twl4030_codec_audio_data zoom_audio_data;
|
||||
|
||||
static struct twl4030_codec_data zoom_codec_data = {
|
||||
.audio_mclk = 26000000,
|
||||
|
|
|
@ -1984,15 +1984,15 @@ static struct omap_clk omap2430_clks[] = {
|
|||
CLK(NULL, "pka_ick", &pka_ick, CK_243X),
|
||||
CLK(NULL, "usb_fck", &usb_fck, CK_243X),
|
||||
CLK("musb-omap2430", "ick", &usbhs_ick, CK_243X),
|
||||
CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_243X),
|
||||
CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_243X),
|
||||
CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_243X),
|
||||
CLK("mmci-omap-hs.1", "fck", &mmchs2_fck, CK_243X),
|
||||
CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_243X),
|
||||
CLK("omap_hsmmc.0", "fck", &mmchs1_fck, CK_243X),
|
||||
CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_243X),
|
||||
CLK("omap_hsmmc.1", "fck", &mmchs2_fck, CK_243X),
|
||||
CLK(NULL, "gpio5_ick", &gpio5_ick, CK_243X),
|
||||
CLK(NULL, "gpio5_fck", &gpio5_fck, CK_243X),
|
||||
CLK(NULL, "mdm_intc_ick", &mdm_intc_ick, CK_243X),
|
||||
CLK("mmci-omap-hs.0", "mmchsdb_fck", &mmchsdb1_fck, CK_243X),
|
||||
CLK("mmci-omap-hs.1", "mmchsdb_fck", &mmchsdb2_fck, CK_243X),
|
||||
CLK("omap_hsmmc.0", "mmchsdb_fck", &mmchsdb1_fck, CK_243X),
|
||||
CLK("omap_hsmmc.1", "mmchsdb_fck", &mmchsdb2_fck, CK_243X),
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -3290,10 +3290,10 @@ static struct omap_clk omap3xxx_clks[] = {
|
|||
CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX),
|
||||
CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX),
|
||||
CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX),
|
||||
CLK("mmci-omap-hs.2", "fck", &mmchs3_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
|
||||
CLK("mmci-omap-hs.1", "fck", &mmchs2_fck, CK_3XXX),
|
||||
CLK("omap_hsmmc.2", "fck", &mmchs3_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
|
||||
CLK("omap_hsmmc.1", "fck", &mmchs2_fck, CK_3XXX),
|
||||
CLK(NULL, "mspro_fck", &mspro_fck, CK_34XX | CK_36XX),
|
||||
CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_3XXX),
|
||||
CLK("omap_hsmmc.0", "fck", &mmchs1_fck, CK_3XXX),
|
||||
CLK("omap_i2c.3", "fck", &i2c3_fck, CK_3XXX),
|
||||
CLK("omap_i2c.2", "fck", &i2c2_fck, CK_3XXX),
|
||||
CLK("omap_i2c.1", "fck", &i2c1_fck, CK_3XXX),
|
||||
|
@ -3323,13 +3323,13 @@ static struct omap_clk omap3xxx_clks[] = {
|
|||
CLK(NULL, "core_l4_ick", &core_l4_ick, CK_3XXX),
|
||||
CLK(NULL, "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
|
||||
CLK("ehci-omap.0", "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
|
||||
CLK("mmci-omap-hs.2", "ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
|
||||
CLK("omap_hsmmc.2", "ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
|
||||
CLK(NULL, "icr_ick", &icr_ick, CK_34XX | CK_36XX),
|
||||
CLK("omap-aes", "ick", &aes2_ick, CK_34XX | CK_36XX),
|
||||
CLK("omap-sham", "ick", &sha12_ick, CK_34XX | CK_36XX),
|
||||
CLK(NULL, "des2_ick", &des2_ick, CK_34XX | CK_36XX),
|
||||
CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_3XXX),
|
||||
CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_3XXX),
|
||||
CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_3XXX),
|
||||
CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_3XXX),
|
||||
CLK(NULL, "mspro_ick", &mspro_ick, CK_34XX | CK_36XX),
|
||||
CLK("omap_hdq.0", "ick", &hdq_ick, CK_3XXX),
|
||||
CLK("omap2_mcspi.4", "ick", &mcspi4_ick, CK_3XXX),
|
||||
|
|
|
@ -3158,11 +3158,11 @@ static struct omap_clk omap44xx_clks[] = {
|
|||
CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_443X),
|
||||
CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_443X),
|
||||
CLK("omap2_mcspi.4", "fck", &mcspi4_fck, CK_443X),
|
||||
CLK("mmci-omap-hs.0", "fck", &mmc1_fck, CK_443X),
|
||||
CLK("mmci-omap-hs.1", "fck", &mmc2_fck, CK_443X),
|
||||
CLK("mmci-omap-hs.2", "fck", &mmc3_fck, CK_443X),
|
||||
CLK("mmci-omap-hs.3", "fck", &mmc4_fck, CK_443X),
|
||||
CLK("mmci-omap-hs.4", "fck", &mmc5_fck, CK_443X),
|
||||
CLK("omap_hsmmc.0", "fck", &mmc1_fck, CK_443X),
|
||||
CLK("omap_hsmmc.1", "fck", &mmc2_fck, CK_443X),
|
||||
CLK("omap_hsmmc.2", "fck", &mmc3_fck, CK_443X),
|
||||
CLK("omap_hsmmc.3", "fck", &mmc4_fck, CK_443X),
|
||||
CLK("omap_hsmmc.4", "fck", &mmc5_fck, CK_443X),
|
||||
CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X),
|
||||
CLK(NULL, "ocp2scp_usb_phy_ick", &ocp2scp_usb_phy_ick, CK_443X),
|
||||
CLK(NULL, "ocp_wp_noc_ick", &ocp_wp_noc_ick, CK_443X),
|
||||
|
@ -3245,11 +3245,11 @@ static struct omap_clk omap44xx_clks[] = {
|
|||
CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X),
|
||||
CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X),
|
||||
CLK("omap_i2c.4", "ick", &dummy_ck, CK_443X),
|
||||
CLK("mmci-omap-hs.0", "ick", &dummy_ck, CK_443X),
|
||||
CLK("mmci-omap-hs.1", "ick", &dummy_ck, CK_443X),
|
||||
CLK("mmci-omap-hs.2", "ick", &dummy_ck, CK_443X),
|
||||
CLK("mmci-omap-hs.3", "ick", &dummy_ck, CK_443X),
|
||||
CLK("mmci-omap-hs.4", "ick", &dummy_ck, CK_443X),
|
||||
CLK("omap_hsmmc.0", "ick", &dummy_ck, CK_443X),
|
||||
CLK("omap_hsmmc.1", "ick", &dummy_ck, CK_443X),
|
||||
CLK("omap_hsmmc.2", "ick", &dummy_ck, CK_443X),
|
||||
CLK("omap_hsmmc.3", "ick", &dummy_ck, CK_443X),
|
||||
CLK("omap_hsmmc.4", "ick", &dummy_ck, CK_443X),
|
||||
CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_443X),
|
||||
CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_443X),
|
||||
CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_443X),
|
||||
|
|
|
@ -184,95 +184,29 @@ int __init omap4_keyboard_init(struct omap4_keypad_platform_data
|
|||
}
|
||||
|
||||
#if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE)
|
||||
|
||||
#define MBOX_REG_SIZE 0x120
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP2
|
||||
static struct resource omap2_mbox_resources[] = {
|
||||
{
|
||||
.start = OMAP24XX_MAILBOX_BASE,
|
||||
.end = OMAP24XX_MAILBOX_BASE + MBOX_REG_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
static struct omap_device_pm_latency mbox_latencies[] = {
|
||||
[0] = {
|
||||
.activate_func = omap_device_enable_hwmods,
|
||||
.deactivate_func = omap_device_idle_hwmods,
|
||||
.flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
|
||||
},
|
||||
{
|
||||
.start = INT_24XX_MAIL_U0_MPU,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
.name = "dsp",
|
||||
},
|
||||
{
|
||||
.start = INT_24XX_MAIL_U3_MPU,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
.name = "iva",
|
||||
},
|
||||
};
|
||||
static int omap2_mbox_resources_sz = ARRAY_SIZE(omap2_mbox_resources);
|
||||
#else
|
||||
#define omap2_mbox_resources NULL
|
||||
#define omap2_mbox_resources_sz 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP3
|
||||
static struct resource omap3_mbox_resources[] = {
|
||||
{
|
||||
.start = OMAP34XX_MAILBOX_BASE,
|
||||
.end = OMAP34XX_MAILBOX_BASE + MBOX_REG_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = INT_24XX_MAIL_U0_MPU,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
.name = "dsp",
|
||||
},
|
||||
};
|
||||
static int omap3_mbox_resources_sz = ARRAY_SIZE(omap3_mbox_resources);
|
||||
#else
|
||||
#define omap3_mbox_resources NULL
|
||||
#define omap3_mbox_resources_sz 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP4
|
||||
|
||||
#define OMAP4_MBOX_REG_SIZE 0x130
|
||||
static struct resource omap4_mbox_resources[] = {
|
||||
{
|
||||
.start = OMAP44XX_MAILBOX_BASE,
|
||||
.end = OMAP44XX_MAILBOX_BASE +
|
||||
OMAP4_MBOX_REG_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = OMAP44XX_IRQ_MAIL_U0,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
.name = "mbox",
|
||||
},
|
||||
};
|
||||
static int omap4_mbox_resources_sz = ARRAY_SIZE(omap4_mbox_resources);
|
||||
#else
|
||||
#define omap4_mbox_resources NULL
|
||||
#define omap4_mbox_resources_sz 0
|
||||
#endif
|
||||
|
||||
static struct platform_device mbox_device = {
|
||||
.name = "omap-mailbox",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static inline void omap_init_mbox(void)
|
||||
{
|
||||
if (cpu_is_omap24xx()) {
|
||||
mbox_device.resource = omap2_mbox_resources;
|
||||
mbox_device.num_resources = omap2_mbox_resources_sz;
|
||||
} else if (cpu_is_omap34xx()) {
|
||||
mbox_device.resource = omap3_mbox_resources;
|
||||
mbox_device.num_resources = omap3_mbox_resources_sz;
|
||||
} else if (cpu_is_omap44xx()) {
|
||||
mbox_device.resource = omap4_mbox_resources;
|
||||
mbox_device.num_resources = omap4_mbox_resources_sz;
|
||||
} else {
|
||||
pr_err("%s: platform not supported\n", __func__);
|
||||
struct omap_hwmod *oh;
|
||||
struct omap_device *od;
|
||||
|
||||
oh = omap_hwmod_lookup("mailbox");
|
||||
if (!oh) {
|
||||
pr_err("%s: unable to find hwmod\n", __func__);
|
||||
return;
|
||||
}
|
||||
platform_device_register(&mbox_device);
|
||||
|
||||
od = omap_device_build("omap-mailbox", -1, oh, NULL, 0,
|
||||
mbox_latencies, ARRAY_SIZE(mbox_latencies), 0);
|
||||
WARN(IS_ERR(od), "%s: could not build device, err %ld\n",
|
||||
__func__, PTR_ERR(od));
|
||||
}
|
||||
#else
|
||||
static inline void omap_init_mbox(void) { }
|
||||
|
@ -544,117 +478,10 @@ static inline void omap_init_aes(void) { }
|
|||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
|
||||
#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
|
||||
|
||||
#define MMCHS_SYSCONFIG 0x0010
|
||||
#define MMCHS_SYSCONFIG_SWRESET (1 << 1)
|
||||
#define MMCHS_SYSSTATUS 0x0014
|
||||
#define MMCHS_SYSSTATUS_RESETDONE (1 << 0)
|
||||
|
||||
static struct platform_device dummy_pdev = {
|
||||
.dev = {
|
||||
.bus = &platform_bus_type,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* omap_hsmmc_reset() - Full reset of each HS-MMC controller
|
||||
*
|
||||
* Ensure that each MMC controller is fully reset. Controllers
|
||||
* left in an unknown state (by bootloader) may prevent retention
|
||||
* or OFF-mode. This is especially important in cases where the
|
||||
* MMC driver is not enabled, _or_ built as a module.
|
||||
*
|
||||
* In order for reset to work, interface, functional and debounce
|
||||
* clocks must be enabled. The debounce clock comes from func_32k_clk
|
||||
* and is not under SW control, so we only enable i- and f-clocks.
|
||||
**/
|
||||
static void __init omap_hsmmc_reset(void)
|
||||
{
|
||||
u32 i, nr_controllers;
|
||||
struct clk *iclk, *fclk;
|
||||
|
||||
if (cpu_is_omap242x())
|
||||
return;
|
||||
|
||||
nr_controllers = cpu_is_omap44xx() ? OMAP44XX_NR_MMC :
|
||||
(cpu_is_omap34xx() ? OMAP34XX_NR_MMC : OMAP24XX_NR_MMC);
|
||||
|
||||
for (i = 0; i < nr_controllers; i++) {
|
||||
u32 v, base = 0;
|
||||
struct device *dev = &dummy_pdev.dev;
|
||||
|
||||
switch (i) {
|
||||
case 0:
|
||||
base = OMAP2_MMC1_BASE;
|
||||
break;
|
||||
case 1:
|
||||
base = OMAP2_MMC2_BASE;
|
||||
break;
|
||||
case 2:
|
||||
base = OMAP3_MMC3_BASE;
|
||||
break;
|
||||
case 3:
|
||||
if (!cpu_is_omap44xx())
|
||||
return;
|
||||
base = OMAP4_MMC4_BASE;
|
||||
break;
|
||||
case 4:
|
||||
if (!cpu_is_omap44xx())
|
||||
return;
|
||||
base = OMAP4_MMC5_BASE;
|
||||
break;
|
||||
}
|
||||
|
||||
if (cpu_is_omap44xx())
|
||||
base += OMAP4_MMC_REG_OFFSET;
|
||||
|
||||
dummy_pdev.id = i;
|
||||
dev_set_name(&dummy_pdev.dev, "mmci-omap-hs.%d", i);
|
||||
iclk = clk_get(dev, "ick");
|
||||
if (IS_ERR(iclk))
|
||||
goto err1;
|
||||
if (clk_enable(iclk))
|
||||
goto err2;
|
||||
|
||||
fclk = clk_get(dev, "fck");
|
||||
if (IS_ERR(fclk))
|
||||
goto err3;
|
||||
if (clk_enable(fclk))
|
||||
goto err4;
|
||||
|
||||
omap_writel(MMCHS_SYSCONFIG_SWRESET, base + MMCHS_SYSCONFIG);
|
||||
v = omap_readl(base + MMCHS_SYSSTATUS);
|
||||
while (!(omap_readl(base + MMCHS_SYSSTATUS) &
|
||||
MMCHS_SYSSTATUS_RESETDONE))
|
||||
cpu_relax();
|
||||
|
||||
clk_disable(fclk);
|
||||
clk_put(fclk);
|
||||
clk_disable(iclk);
|
||||
clk_put(iclk);
|
||||
}
|
||||
return;
|
||||
|
||||
err4:
|
||||
clk_put(fclk);
|
||||
err3:
|
||||
clk_disable(iclk);
|
||||
err2:
|
||||
clk_put(iclk);
|
||||
err1:
|
||||
printk(KERN_WARNING "%s: Unable to enable clocks for MMC%d, "
|
||||
"cannot reset.\n", __func__, i);
|
||||
}
|
||||
#else
|
||||
static inline void omap_hsmmc_reset(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \
|
||||
defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
|
||||
|
||||
static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
|
||||
int controller_nr)
|
||||
static inline void omap242x_mmc_mux(struct omap_mmc_platform_data
|
||||
*mmc_controller)
|
||||
{
|
||||
if ((mmc_controller->slots[0].switch_pin > 0) && \
|
||||
(mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
|
||||
|
@ -665,163 +492,44 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
|
|||
omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
|
||||
if (cpu_is_omap2420() && controller_nr == 0) {
|
||||
omap_mux_init_signal("sdmmc_cmd", 0);
|
||||
omap_mux_init_signal("sdmmc_clki", 0);
|
||||
omap_mux_init_signal("sdmmc_clko", 0);
|
||||
omap_mux_init_signal("sdmmc_dat0", 0);
|
||||
omap_mux_init_signal("sdmmc_dat_dir0", 0);
|
||||
omap_mux_init_signal("sdmmc_cmd_dir", 0);
|
||||
if (mmc_controller->slots[0].caps & MMC_CAP_4_BIT_DATA) {
|
||||
omap_mux_init_signal("sdmmc_dat1", 0);
|
||||
omap_mux_init_signal("sdmmc_dat2", 0);
|
||||
omap_mux_init_signal("sdmmc_dat3", 0);
|
||||
omap_mux_init_signal("sdmmc_dat_dir1", 0);
|
||||
omap_mux_init_signal("sdmmc_dat_dir2", 0);
|
||||
omap_mux_init_signal("sdmmc_dat_dir3", 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Use internal loop-back in MMC/SDIO Module Input Clock
|
||||
* selection
|
||||
*/
|
||||
if (mmc_controller->slots[0].internal_clock) {
|
||||
u32 v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
|
||||
v |= (1 << 24);
|
||||
omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0);
|
||||
}
|
||||
omap_mux_init_signal("sdmmc_cmd", 0);
|
||||
omap_mux_init_signal("sdmmc_clki", 0);
|
||||
omap_mux_init_signal("sdmmc_clko", 0);
|
||||
omap_mux_init_signal("sdmmc_dat0", 0);
|
||||
omap_mux_init_signal("sdmmc_dat_dir0", 0);
|
||||
omap_mux_init_signal("sdmmc_cmd_dir", 0);
|
||||
if (mmc_controller->slots[0].caps & MMC_CAP_4_BIT_DATA) {
|
||||
omap_mux_init_signal("sdmmc_dat1", 0);
|
||||
omap_mux_init_signal("sdmmc_dat2", 0);
|
||||
omap_mux_init_signal("sdmmc_dat3", 0);
|
||||
omap_mux_init_signal("sdmmc_dat_dir1", 0);
|
||||
omap_mux_init_signal("sdmmc_dat_dir2", 0);
|
||||
omap_mux_init_signal("sdmmc_dat_dir3", 0);
|
||||
}
|
||||
|
||||
if (cpu_is_omap34xx()) {
|
||||
if (controller_nr == 0) {
|
||||
omap_mux_init_signal("sdmmc1_clk",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_cmd",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_dat0",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
if (mmc_controller->slots[0].caps &
|
||||
(MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
|
||||
omap_mux_init_signal("sdmmc1_dat1",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_dat2",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_dat3",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
}
|
||||
if (mmc_controller->slots[0].caps &
|
||||
MMC_CAP_8_BIT_DATA) {
|
||||
omap_mux_init_signal("sdmmc1_dat4",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_dat5",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_dat6",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_dat7",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
}
|
||||
}
|
||||
if (controller_nr == 1) {
|
||||
/* MMC2 */
|
||||
omap_mux_init_signal("sdmmc2_clk",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc2_cmd",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc2_dat0",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
|
||||
/*
|
||||
* For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed
|
||||
* in the board-*.c files
|
||||
*/
|
||||
if (mmc_controller->slots[0].caps &
|
||||
(MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
|
||||
omap_mux_init_signal("sdmmc2_dat1",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc2_dat2",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc2_dat3",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
}
|
||||
if (mmc_controller->slots[0].caps &
|
||||
MMC_CAP_8_BIT_DATA) {
|
||||
omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc2_dat6.sdmmc2_dat6",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc2_dat7.sdmmc2_dat7",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* For MMC3 the pins need to be muxed in the board-*.c files
|
||||
*/
|
||||
/*
|
||||
* Use internal loop-back in MMC/SDIO Module Input Clock
|
||||
* selection
|
||||
*/
|
||||
if (mmc_controller->slots[0].internal_clock) {
|
||||
u32 v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
|
||||
v |= (1 << 24);
|
||||
omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0);
|
||||
}
|
||||
}
|
||||
|
||||
void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
|
||||
int nr_controllers)
|
||||
void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data)
|
||||
{
|
||||
int i;
|
||||
char *name;
|
||||
char *name = "mmci-omap";
|
||||
|
||||
for (i = 0; i < nr_controllers; i++) {
|
||||
unsigned long base, size;
|
||||
unsigned int irq = 0;
|
||||
if (!mmc_data[0]) {
|
||||
pr_err("%s fails: Incomplete platform data\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mmc_data[i])
|
||||
continue;
|
||||
|
||||
omap2_mmc_mux(mmc_data[i], i);
|
||||
|
||||
switch (i) {
|
||||
case 0:
|
||||
base = OMAP2_MMC1_BASE;
|
||||
irq = INT_24XX_MMC_IRQ;
|
||||
break;
|
||||
case 1:
|
||||
base = OMAP2_MMC2_BASE;
|
||||
irq = INT_24XX_MMC2_IRQ;
|
||||
break;
|
||||
case 2:
|
||||
if (!cpu_is_omap44xx() && !cpu_is_omap34xx())
|
||||
return;
|
||||
base = OMAP3_MMC3_BASE;
|
||||
irq = INT_34XX_MMC3_IRQ;
|
||||
break;
|
||||
case 3:
|
||||
if (!cpu_is_omap44xx())
|
||||
return;
|
||||
base = OMAP4_MMC4_BASE;
|
||||
irq = OMAP44XX_IRQ_MMC4;
|
||||
break;
|
||||
case 4:
|
||||
if (!cpu_is_omap44xx())
|
||||
return;
|
||||
base = OMAP4_MMC5_BASE;
|
||||
irq = OMAP44XX_IRQ_MMC5;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
||||
if (cpu_is_omap2420()) {
|
||||
size = OMAP2420_MMC_SIZE;
|
||||
name = "mmci-omap";
|
||||
} else if (cpu_is_omap44xx()) {
|
||||
if (i < 3)
|
||||
irq += OMAP44XX_IRQ_GIC_START;
|
||||
size = OMAP4_HSMMC_SIZE;
|
||||
name = "mmci-omap-hs";
|
||||
} else {
|
||||
size = OMAP3_HSMMC_SIZE;
|
||||
name = "mmci-omap-hs";
|
||||
}
|
||||
omap_mmc_add(name, i, base, size, irq, mmc_data[i]);
|
||||
};
|
||||
omap242x_mmc_mux(mmc_data[0]);
|
||||
omap_mmc_add(name, 0, OMAP2_MMC1_BASE, OMAP2420_MMC_SIZE,
|
||||
INT_24XX_MMC_IRQ, mmc_data[0]);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -895,7 +603,6 @@ static int __init omap2_init_devices(void)
|
|||
* please keep these calls, and their implementations above,
|
||||
* in alphabetical order so they're easier to sort through.
|
||||
*/
|
||||
omap_hsmmc_reset();
|
||||
omap_init_audio();
|
||||
omap_init_camera();
|
||||
omap_init_mbox();
|
||||
|
|
|
@ -16,7 +16,10 @@
|
|||
#include <mach/hardware.h>
|
||||
#include <plat/mmc.h>
|
||||
#include <plat/omap-pm.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/omap_device.h>
|
||||
|
||||
#include "mux.h"
|
||||
#include "hsmmc.h"
|
||||
#include "control.h"
|
||||
|
||||
|
@ -28,10 +31,6 @@ static u16 control_mmc1;
|
|||
|
||||
#define HSMMC_NAME_LEN 9
|
||||
|
||||
static struct hsmmc_controller {
|
||||
char name[HSMMC_NAME_LEN + 1];
|
||||
} hsmmc[OMAP34XX_NR_MMC];
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM)
|
||||
|
||||
static int hsmmc_get_context_loss(struct device *dev)
|
||||
|
@ -204,13 +203,284 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata;
|
||||
static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
|
||||
int controller_nr)
|
||||
{
|
||||
if ((mmc_controller->slots[0].switch_pin > 0) && \
|
||||
(mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
|
||||
omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
if ((mmc_controller->slots[0].gpio_wp > 0) && \
|
||||
(mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
|
||||
omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
if (cpu_is_omap34xx()) {
|
||||
if (controller_nr == 0) {
|
||||
omap_mux_init_signal("sdmmc1_clk",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_cmd",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_dat0",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
if (mmc_controller->slots[0].caps &
|
||||
(MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
|
||||
omap_mux_init_signal("sdmmc1_dat1",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_dat2",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_dat3",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
}
|
||||
if (mmc_controller->slots[0].caps &
|
||||
MMC_CAP_8_BIT_DATA) {
|
||||
omap_mux_init_signal("sdmmc1_dat4",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_dat5",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_dat6",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc1_dat7",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
}
|
||||
}
|
||||
if (controller_nr == 1) {
|
||||
/* MMC2 */
|
||||
omap_mux_init_signal("sdmmc2_clk",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc2_cmd",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc2_dat0",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
|
||||
/*
|
||||
* For 8 wire configurations, Lines DAT4, 5, 6 and 7
|
||||
* need to be muxed in the board-*.c files
|
||||
*/
|
||||
if (mmc_controller->slots[0].caps &
|
||||
(MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
|
||||
omap_mux_init_signal("sdmmc2_dat1",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc2_dat2",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc2_dat3",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
}
|
||||
if (mmc_controller->slots[0].caps &
|
||||
MMC_CAP_8_BIT_DATA) {
|
||||
omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc2_dat6.sdmmc2_dat6",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_signal("sdmmc2_dat7.sdmmc2_dat7",
|
||||
OMAP_PIN_INPUT_PULLUP);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* For MMC3 the pins need to be muxed in the board-*.c files
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
|
||||
struct omap_mmc_platform_data *mmc)
|
||||
{
|
||||
char *hc_name;
|
||||
|
||||
hc_name = kzalloc(sizeof(char) * (HSMMC_NAME_LEN + 1), GFP_KERNEL);
|
||||
if (!hc_name) {
|
||||
pr_err("Cannot allocate memory for controller slot name\n");
|
||||
kfree(hc_name);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (c->name)
|
||||
strncpy(hc_name, c->name, HSMMC_NAME_LEN);
|
||||
else
|
||||
snprintf(hc_name, (HSMMC_NAME_LEN + 1), "mmc%islot%i",
|
||||
c->mmc, 1);
|
||||
mmc->slots[0].name = hc_name;
|
||||
mmc->nr_slots = 1;
|
||||
mmc->slots[0].caps = c->caps;
|
||||
mmc->slots[0].internal_clock = !c->ext_clock;
|
||||
mmc->dma_mask = 0xffffffff;
|
||||
if (cpu_is_omap44xx())
|
||||
mmc->reg_offset = OMAP4_MMC_REG_OFFSET;
|
||||
else
|
||||
mmc->reg_offset = 0;
|
||||
|
||||
mmc->get_context_loss_count = hsmmc_get_context_loss;
|
||||
|
||||
mmc->slots[0].switch_pin = c->gpio_cd;
|
||||
mmc->slots[0].gpio_wp = c->gpio_wp;
|
||||
|
||||
mmc->slots[0].remux = c->remux;
|
||||
mmc->slots[0].init_card = c->init_card;
|
||||
|
||||
if (c->cover_only)
|
||||
mmc->slots[0].cover = 1;
|
||||
|
||||
if (c->nonremovable)
|
||||
mmc->slots[0].nonremovable = 1;
|
||||
|
||||
if (c->power_saving)
|
||||
mmc->slots[0].power_saving = 1;
|
||||
|
||||
if (c->no_off)
|
||||
mmc->slots[0].no_off = 1;
|
||||
|
||||
if (c->vcc_aux_disable_is_sleep)
|
||||
mmc->slots[0].vcc_aux_disable_is_sleep = 1;
|
||||
|
||||
/*
|
||||
* NOTE: MMC slots should have a Vcc regulator set up.
|
||||
* This may be from a TWL4030-family chip, another
|
||||
* controllable regulator, or a fixed supply.
|
||||
*
|
||||
* temporary HACK: ocr_mask instead of fixed supply
|
||||
*/
|
||||
mmc->slots[0].ocr_mask = c->ocr_mask;
|
||||
|
||||
if (cpu_is_omap3517() || cpu_is_omap3505())
|
||||
mmc->slots[0].set_power = nop_mmc_set_power;
|
||||
else
|
||||
mmc->slots[0].features |= HSMMC_HAS_PBIAS;
|
||||
|
||||
if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0))
|
||||
mmc->slots[0].features |= HSMMC_HAS_UPDATED_RESET;
|
||||
|
||||
switch (c->mmc) {
|
||||
case 1:
|
||||
if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
|
||||
/* on-chip level shifting via PBIAS0/PBIAS1 */
|
||||
if (cpu_is_omap44xx()) {
|
||||
mmc->slots[0].before_set_reg =
|
||||
omap4_hsmmc1_before_set_reg;
|
||||
mmc->slots[0].after_set_reg =
|
||||
omap4_hsmmc1_after_set_reg;
|
||||
} else {
|
||||
mmc->slots[0].before_set_reg =
|
||||
omap_hsmmc1_before_set_reg;
|
||||
mmc->slots[0].after_set_reg =
|
||||
omap_hsmmc1_after_set_reg;
|
||||
}
|
||||
}
|
||||
|
||||
/* OMAP3630 HSMMC1 supports only 4-bit */
|
||||
if (cpu_is_omap3630() &&
|
||||
(c->caps & MMC_CAP_8_BIT_DATA)) {
|
||||
c->caps &= ~MMC_CAP_8_BIT_DATA;
|
||||
c->caps |= MMC_CAP_4_BIT_DATA;
|
||||
mmc->slots[0].caps = c->caps;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (c->ext_clock)
|
||||
c->transceiver = 1;
|
||||
if (c->transceiver && (c->caps & MMC_CAP_8_BIT_DATA)) {
|
||||
c->caps &= ~MMC_CAP_8_BIT_DATA;
|
||||
c->caps |= MMC_CAP_4_BIT_DATA;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
case 3:
|
||||
if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
|
||||
/* off-chip level shifting, or none */
|
||||
mmc->slots[0].before_set_reg = hsmmc23_before_set_reg;
|
||||
mmc->slots[0].after_set_reg = NULL;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
mmc->slots[0].before_set_reg = NULL;
|
||||
mmc->slots[0].after_set_reg = NULL;
|
||||
break;
|
||||
default:
|
||||
pr_err("MMC%d configuration not supported!\n", c->mmc);
|
||||
kfree(hc_name);
|
||||
return -ENODEV;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct omap_device_pm_latency omap_hsmmc_latency[] = {
|
||||
[0] = {
|
||||
.deactivate_func = omap_device_idle_hwmods,
|
||||
.activate_func = omap_device_enable_hwmods,
|
||||
.flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
|
||||
},
|
||||
/*
|
||||
* XXX There should also be an entry here to power off/on the
|
||||
* MMC regulators/PBIAS cells, etc.
|
||||
*/
|
||||
};
|
||||
|
||||
#define MAX_OMAP_MMC_HWMOD_NAME_LEN 16
|
||||
|
||||
void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr)
|
||||
{
|
||||
struct omap_hwmod *oh;
|
||||
struct omap_device *od;
|
||||
struct omap_device_pm_latency *ohl;
|
||||
char oh_name[MAX_OMAP_MMC_HWMOD_NAME_LEN];
|
||||
struct omap_mmc_platform_data *mmc_data;
|
||||
struct omap_mmc_dev_attr *mmc_dev_attr;
|
||||
char *name;
|
||||
int l;
|
||||
int ohl_cnt = 0;
|
||||
|
||||
mmc_data = kzalloc(sizeof(struct omap_mmc_platform_data), GFP_KERNEL);
|
||||
if (!mmc_data) {
|
||||
pr_err("Cannot allocate memory for mmc device!\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (omap_hsmmc_pdata_init(hsmmcinfo, mmc_data) < 0) {
|
||||
pr_err("%s fails!\n", __func__);
|
||||
goto done;
|
||||
}
|
||||
omap_hsmmc_mux(mmc_data, (ctrl_nr - 1));
|
||||
|
||||
name = "omap_hsmmc";
|
||||
ohl = omap_hsmmc_latency;
|
||||
ohl_cnt = ARRAY_SIZE(omap_hsmmc_latency);
|
||||
|
||||
l = snprintf(oh_name, MAX_OMAP_MMC_HWMOD_NAME_LEN,
|
||||
"mmc%d", ctrl_nr);
|
||||
WARN(l >= MAX_OMAP_MMC_HWMOD_NAME_LEN,
|
||||
"String buffer overflow in MMC%d device setup\n", ctrl_nr);
|
||||
oh = omap_hwmod_lookup(oh_name);
|
||||
if (!oh) {
|
||||
pr_err("Could not look up %s\n", oh_name);
|
||||
kfree(mmc_data->slots[0].name);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (oh->dev_attr != NULL) {
|
||||
mmc_dev_attr = oh->dev_attr;
|
||||
mmc_data->controller_flags = mmc_dev_attr->flags;
|
||||
}
|
||||
|
||||
od = omap_device_build(name, ctrl_nr - 1, oh, mmc_data,
|
||||
sizeof(struct omap_mmc_platform_data), ohl, ohl_cnt, false);
|
||||
if (IS_ERR(od)) {
|
||||
WARN(1, "Cant build omap_device for %s:%s.\n", name, oh->name);
|
||||
kfree(mmc_data->slots[0].name);
|
||||
goto done;
|
||||
}
|
||||
/*
|
||||
* return device handle to board setup code
|
||||
* required to populate for regulator framework structure
|
||||
*/
|
||||
hsmmcinfo->dev = &od->pdev.dev;
|
||||
|
||||
done:
|
||||
kfree(mmc_data);
|
||||
}
|
||||
|
||||
void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
|
||||
{
|
||||
struct omap2_hsmmc_info *c;
|
||||
int nr_hsmmc = ARRAY_SIZE(hsmmc_data);
|
||||
int i;
|
||||
u32 reg;
|
||||
|
||||
if (!cpu_is_omap44xx()) {
|
||||
|
@ -236,147 +506,9 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
|
|||
omap4_ctrl_pad_writel(reg, control_mmc1);
|
||||
}
|
||||
|
||||
for (c = controllers; c->mmc; c++) {
|
||||
struct hsmmc_controller *hc = hsmmc + c->mmc - 1;
|
||||
struct omap_mmc_platform_data *mmc = hsmmc_data[c->mmc - 1];
|
||||
for (; controllers->mmc; controllers++)
|
||||
omap_init_hsmmc(controllers, controllers->mmc);
|
||||
|
||||
if (!c->mmc || c->mmc > nr_hsmmc) {
|
||||
pr_debug("MMC%d: no such controller\n", c->mmc);
|
||||
continue;
|
||||
}
|
||||
if (mmc) {
|
||||
pr_debug("MMC%d: already configured\n", c->mmc);
|
||||
continue;
|
||||
}
|
||||
|
||||
mmc = kzalloc(sizeof(struct omap_mmc_platform_data),
|
||||
GFP_KERNEL);
|
||||
if (!mmc) {
|
||||
pr_err("Cannot allocate memory for mmc device!\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (c->name)
|
||||
strncpy(hc->name, c->name, HSMMC_NAME_LEN);
|
||||
else
|
||||
snprintf(hc->name, ARRAY_SIZE(hc->name),
|
||||
"mmc%islot%i", c->mmc, 1);
|
||||
mmc->slots[0].name = hc->name;
|
||||
mmc->nr_slots = 1;
|
||||
mmc->slots[0].caps = c->caps;
|
||||
mmc->slots[0].internal_clock = !c->ext_clock;
|
||||
mmc->dma_mask = 0xffffffff;
|
||||
if (cpu_is_omap44xx())
|
||||
mmc->reg_offset = OMAP4_MMC_REG_OFFSET;
|
||||
else
|
||||
mmc->reg_offset = 0;
|
||||
|
||||
mmc->get_context_loss_count = hsmmc_get_context_loss;
|
||||
|
||||
mmc->slots[0].switch_pin = c->gpio_cd;
|
||||
mmc->slots[0].gpio_wp = c->gpio_wp;
|
||||
|
||||
mmc->slots[0].remux = c->remux;
|
||||
mmc->slots[0].init_card = c->init_card;
|
||||
|
||||
if (c->cover_only)
|
||||
mmc->slots[0].cover = 1;
|
||||
|
||||
if (c->nonremovable)
|
||||
mmc->slots[0].nonremovable = 1;
|
||||
|
||||
if (c->power_saving)
|
||||
mmc->slots[0].power_saving = 1;
|
||||
|
||||
if (c->no_off)
|
||||
mmc->slots[0].no_off = 1;
|
||||
|
||||
if (c->vcc_aux_disable_is_sleep)
|
||||
mmc->slots[0].vcc_aux_disable_is_sleep = 1;
|
||||
|
||||
/* NOTE: MMC slots should have a Vcc regulator set up.
|
||||
* This may be from a TWL4030-family chip, another
|
||||
* controllable regulator, or a fixed supply.
|
||||
*
|
||||
* temporary HACK: ocr_mask instead of fixed supply
|
||||
*/
|
||||
mmc->slots[0].ocr_mask = c->ocr_mask;
|
||||
|
||||
if (cpu_is_omap3517() || cpu_is_omap3505())
|
||||
mmc->slots[0].set_power = nop_mmc_set_power;
|
||||
else
|
||||
mmc->slots[0].features |= HSMMC_HAS_PBIAS;
|
||||
|
||||
if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0))
|
||||
mmc->slots[0].features |= HSMMC_HAS_UPDATED_RESET;
|
||||
|
||||
switch (c->mmc) {
|
||||
case 1:
|
||||
if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
|
||||
/* on-chip level shifting via PBIAS0/PBIAS1 */
|
||||
if (cpu_is_omap44xx()) {
|
||||
mmc->slots[0].before_set_reg =
|
||||
omap4_hsmmc1_before_set_reg;
|
||||
mmc->slots[0].after_set_reg =
|
||||
omap4_hsmmc1_after_set_reg;
|
||||
} else {
|
||||
mmc->slots[0].before_set_reg =
|
||||
omap_hsmmc1_before_set_reg;
|
||||
mmc->slots[0].after_set_reg =
|
||||
omap_hsmmc1_after_set_reg;
|
||||
}
|
||||
}
|
||||
|
||||
/* Omap3630 HSMMC1 supports only 4-bit */
|
||||
if (cpu_is_omap3630() &&
|
||||
(c->caps & MMC_CAP_8_BIT_DATA)) {
|
||||
c->caps &= ~MMC_CAP_8_BIT_DATA;
|
||||
c->caps |= MMC_CAP_4_BIT_DATA;
|
||||
mmc->slots[0].caps = c->caps;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (c->ext_clock)
|
||||
c->transceiver = 1;
|
||||
if (c->transceiver && (c->caps & MMC_CAP_8_BIT_DATA)) {
|
||||
c->caps &= ~MMC_CAP_8_BIT_DATA;
|
||||
c->caps |= MMC_CAP_4_BIT_DATA;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
case 3:
|
||||
if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
|
||||
/* off-chip level shifting, or none */
|
||||
mmc->slots[0].before_set_reg = hsmmc23_before_set_reg;
|
||||
mmc->slots[0].after_set_reg = NULL;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
mmc->slots[0].before_set_reg = NULL;
|
||||
mmc->slots[0].after_set_reg = NULL;
|
||||
break;
|
||||
default:
|
||||
pr_err("MMC%d configuration not supported!\n", c->mmc);
|
||||
kfree(mmc);
|
||||
continue;
|
||||
}
|
||||
hsmmc_data[c->mmc - 1] = mmc;
|
||||
}
|
||||
|
||||
omap2_init_mmc(hsmmc_data, OMAP34XX_NR_MMC);
|
||||
|
||||
/* pass the device nodes back to board setup code */
|
||||
for (c = controllers; c->mmc; c++) {
|
||||
struct omap_mmc_platform_data *mmc = hsmmc_data[c->mmc - 1];
|
||||
|
||||
if (!c->mmc || c->mmc > nr_hsmmc)
|
||||
continue;
|
||||
c->dev = mmc->dev;
|
||||
}
|
||||
|
||||
done:
|
||||
for (i = 0; i < nr_hsmmc; i++)
|
||||
kfree(hsmmc_data[i]);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -145,35 +145,32 @@ static void omap2_iommu_set_twl(struct iommu *obj, bool on)
|
|||
|
||||
static u32 omap2_iommu_fault_isr(struct iommu *obj, u32 *ra)
|
||||
{
|
||||
int i;
|
||||
u32 stat, da;
|
||||
const char *err_msg[] = {
|
||||
"tlb miss",
|
||||
"translation fault",
|
||||
"emulation miss",
|
||||
"table walk fault",
|
||||
"multi hit fault",
|
||||
};
|
||||
u32 errs = 0;
|
||||
|
||||
stat = iommu_read_reg(obj, MMU_IRQSTATUS);
|
||||
stat &= MMU_IRQ_MASK;
|
||||
if (!stat)
|
||||
if (!stat) {
|
||||
*ra = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
da = iommu_read_reg(obj, MMU_FAULT_AD);
|
||||
*ra = da;
|
||||
|
||||
dev_err(obj->dev, "%s:\tda:%08x ", __func__, da);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(err_msg); i++) {
|
||||
if (stat & (1 << i))
|
||||
printk("%s ", err_msg[i]);
|
||||
}
|
||||
printk("\n");
|
||||
|
||||
if (stat & MMU_IRQ_TLBMISS)
|
||||
errs |= OMAP_IOMMU_ERR_TLB_MISS;
|
||||
if (stat & MMU_IRQ_TRANSLATIONFAULT)
|
||||
errs |= OMAP_IOMMU_ERR_TRANS_FAULT;
|
||||
if (stat & MMU_IRQ_EMUMISS)
|
||||
errs |= OMAP_IOMMU_ERR_EMU_MISS;
|
||||
if (stat & MMU_IRQ_TABLEWALKFAULT)
|
||||
errs |= OMAP_IOMMU_ERR_TBLWALK_FAULT;
|
||||
if (stat & MMU_IRQ_MULTIHITFAULT)
|
||||
errs |= OMAP_IOMMU_ERR_MULTIHIT_FAULT;
|
||||
iommu_write_reg(obj, stat, MMU_IRQSTATUS);
|
||||
|
||||
return stat;
|
||||
return errs;
|
||||
}
|
||||
|
||||
static void omap2_tlb_read_cr(struct iommu *obj, struct cr_regs *cr)
|
||||
|
|
|
@ -14,12 +14,11 @@
|
|||
#include <linux/err.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <plat/mailbox.h>
|
||||
#include <mach/irqs.h>
|
||||
|
||||
#define MAILBOX_REVISION 0x000
|
||||
#define MAILBOX_SYSCONFIG 0x010
|
||||
#define MAILBOX_SYSSTATUS 0x014
|
||||
#define MAILBOX_MESSAGE(m) (0x040 + 4 * (m))
|
||||
#define MAILBOX_FIFOSTATUS(m) (0x080 + 4 * (m))
|
||||
#define MAILBOX_MSGSTATUS(m) (0x0c0 + 4 * (m))
|
||||
|
@ -33,17 +32,6 @@
|
|||
#define MAILBOX_IRQ_NEWMSG(m) (1 << (2 * (m)))
|
||||
#define MAILBOX_IRQ_NOTFULL(m) (1 << (2 * (m) + 1))
|
||||
|
||||
/* SYSCONFIG: register bit definition */
|
||||
#define AUTOIDLE (1 << 0)
|
||||
#define SOFTRESET (1 << 1)
|
||||
#define SMARTIDLE (2 << 3)
|
||||
#define OMAP4_SOFTRESET (1 << 0)
|
||||
#define OMAP4_NOIDLE (1 << 2)
|
||||
#define OMAP4_SMARTIDLE (2 << 2)
|
||||
|
||||
/* SYSSTATUS: register bit definition */
|
||||
#define RESETDONE (1 << 0)
|
||||
|
||||
#define MBOX_REG_SIZE 0x120
|
||||
|
||||
#define OMAP4_MBOX_REG_SIZE 0x130
|
||||
|
@ -70,8 +58,6 @@ struct omap_mbox2_priv {
|
|||
unsigned long irqdisable;
|
||||
};
|
||||
|
||||
static struct clk *mbox_ick_handle;
|
||||
|
||||
static void omap2_mbox_enable_irq(struct omap_mbox *mbox,
|
||||
omap_mbox_type_t irq);
|
||||
|
||||
|
@ -89,53 +75,13 @@ static inline void mbox_write_reg(u32 val, size_t ofs)
|
|||
static int omap2_mbox_startup(struct omap_mbox *mbox)
|
||||
{
|
||||
u32 l;
|
||||
unsigned long timeout;
|
||||
|
||||
mbox_ick_handle = clk_get(NULL, "mailboxes_ick");
|
||||
if (IS_ERR(mbox_ick_handle)) {
|
||||
printk(KERN_ERR "Could not get mailboxes_ick: %ld\n",
|
||||
PTR_ERR(mbox_ick_handle));
|
||||
return PTR_ERR(mbox_ick_handle);
|
||||
}
|
||||
clk_enable(mbox_ick_handle);
|
||||
|
||||
if (cpu_is_omap44xx()) {
|
||||
mbox_write_reg(OMAP4_SOFTRESET, MAILBOX_SYSCONFIG);
|
||||
timeout = jiffies + msecs_to_jiffies(20);
|
||||
do {
|
||||
l = mbox_read_reg(MAILBOX_SYSCONFIG);
|
||||
if (!(l & OMAP4_SOFTRESET))
|
||||
break;
|
||||
} while (!time_after(jiffies, timeout));
|
||||
|
||||
if (l & OMAP4_SOFTRESET) {
|
||||
pr_err("Can't take mailbox out of reset\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
} else {
|
||||
mbox_write_reg(SOFTRESET, MAILBOX_SYSCONFIG);
|
||||
timeout = jiffies + msecs_to_jiffies(20);
|
||||
do {
|
||||
l = mbox_read_reg(MAILBOX_SYSSTATUS);
|
||||
if (l & RESETDONE)
|
||||
break;
|
||||
} while (!time_after(jiffies, timeout));
|
||||
|
||||
if (!(l & RESETDONE)) {
|
||||
pr_err("Can't take mailbox out of reset\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
pm_runtime_enable(mbox->dev->parent);
|
||||
pm_runtime_get_sync(mbox->dev->parent);
|
||||
|
||||
l = mbox_read_reg(MAILBOX_REVISION);
|
||||
pr_debug("omap mailbox rev %d.%d\n", (l & 0xf0) >> 4, (l & 0x0f));
|
||||
|
||||
if (cpu_is_omap44xx())
|
||||
l = OMAP4_SMARTIDLE;
|
||||
else
|
||||
l = SMARTIDLE | AUTOIDLE;
|
||||
mbox_write_reg(l, MAILBOX_SYSCONFIG);
|
||||
|
||||
omap2_mbox_enable_irq(mbox, IRQ_RX);
|
||||
|
||||
return 0;
|
||||
|
@ -143,9 +89,8 @@ static int omap2_mbox_startup(struct omap_mbox *mbox)
|
|||
|
||||
static void omap2_mbox_shutdown(struct omap_mbox *mbox)
|
||||
{
|
||||
clk_disable(mbox_ick_handle);
|
||||
clk_put(mbox_ick_handle);
|
||||
mbox_ick_handle = NULL;
|
||||
pm_runtime_put_sync(mbox->dev->parent);
|
||||
pm_runtime_disable(mbox->dev->parent);
|
||||
}
|
||||
|
||||
/* Mailbox FIFO handle functions */
|
||||
|
@ -398,14 +343,14 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
|
|||
else if (cpu_is_omap34xx()) {
|
||||
list = omap3_mboxes;
|
||||
|
||||
list[0]->irq = platform_get_irq_byname(pdev, "dsp");
|
||||
list[0]->irq = platform_get_irq(pdev, 0);
|
||||
}
|
||||
#endif
|
||||
#if defined(CONFIG_ARCH_OMAP2)
|
||||
else if (cpu_is_omap2430()) {
|
||||
list = omap2_mboxes;
|
||||
|
||||
list[0]->irq = platform_get_irq_byname(pdev, "dsp");
|
||||
list[0]->irq = platform_get_irq(pdev, 0);
|
||||
} else if (cpu_is_omap2420()) {
|
||||
list = omap2_mboxes;
|
||||
|
||||
|
@ -417,8 +362,7 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
|
|||
else if (cpu_is_omap44xx()) {
|
||||
list = omap4_mboxes;
|
||||
|
||||
list[0]->irq = list[1]->irq =
|
||||
platform_get_irq_byname(pdev, "mbox");
|
||||
list[0]->irq = list[1]->irq = platform_get_irq(pdev, 0);
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
|
|
|
@ -22,10 +22,11 @@
|
|||
#include <plat/dma.h>
|
||||
#include <plat/cpu.h>
|
||||
#include <plat/mcbsp.h>
|
||||
#include <plat/omap_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
|
||||
#include "control.h"
|
||||
|
||||
|
||||
/* McBSP internal signal muxing functions */
|
||||
|
||||
void omap2_mcbsp1_mux_clkr_src(u8 mux)
|
||||
|
@ -83,7 +84,7 @@ int omap2_mcbsp_set_clks_src(u8 id, u8 fck_src_id)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
clk_disable(mcbsp->fclk);
|
||||
pm_runtime_put_sync(mcbsp->dev);
|
||||
|
||||
r = clk_set_parent(mcbsp->fclk, fck_src);
|
||||
if (IS_ERR_VALUE(r)) {
|
||||
|
@ -93,7 +94,7 @@ int omap2_mcbsp_set_clks_src(u8 id, u8 fck_src_id)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
clk_enable(mcbsp->fclk);
|
||||
pm_runtime_get_sync(mcbsp->dev);
|
||||
|
||||
clk_put(fck_src);
|
||||
|
||||
|
@ -101,196 +102,70 @@ int omap2_mcbsp_set_clks_src(u8 id, u8 fck_src_id)
|
|||
}
|
||||
EXPORT_SYMBOL(omap2_mcbsp_set_clks_src);
|
||||
|
||||
|
||||
/* Platform data */
|
||||
|
||||
#ifdef CONFIG_SOC_OMAP2420
|
||||
static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = {
|
||||
struct omap_device_pm_latency omap2_mcbsp_latency[] = {
|
||||
{
|
||||
.phys_base = OMAP24XX_MCBSP1_BASE,
|
||||
.dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX,
|
||||
.dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX,
|
||||
.rx_irq = INT_24XX_MCBSP1_IRQ_RX,
|
||||
.tx_irq = INT_24XX_MCBSP1_IRQ_TX,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP24XX_MCBSP2_BASE,
|
||||
.dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX,
|
||||
.dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX,
|
||||
.rx_irq = INT_24XX_MCBSP2_IRQ_RX,
|
||||
.tx_irq = INT_24XX_MCBSP2_IRQ_TX,
|
||||
.deactivate_func = omap_device_idle_hwmods,
|
||||
.activate_func = omap_device_enable_hwmods,
|
||||
.flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
|
||||
},
|
||||
};
|
||||
#define OMAP2420_MCBSP_PDATA_SZ ARRAY_SIZE(omap2420_mcbsp_pdata)
|
||||
#define OMAP2420_MCBSP_REG_NUM (OMAP_MCBSP_REG_RCCR / sizeof(u32) + 1)
|
||||
#else
|
||||
#define omap2420_mcbsp_pdata NULL
|
||||
#define OMAP2420_MCBSP_PDATA_SZ 0
|
||||
#define OMAP2420_MCBSP_REG_NUM 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SOC_OMAP2430
|
||||
static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = {
|
||||
{
|
||||
.phys_base = OMAP24XX_MCBSP1_BASE,
|
||||
.dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX,
|
||||
.dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX,
|
||||
.rx_irq = INT_24XX_MCBSP1_IRQ_RX,
|
||||
.tx_irq = INT_24XX_MCBSP1_IRQ_TX,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP24XX_MCBSP2_BASE,
|
||||
.dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX,
|
||||
.dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX,
|
||||
.rx_irq = INT_24XX_MCBSP2_IRQ_RX,
|
||||
.tx_irq = INT_24XX_MCBSP2_IRQ_TX,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP2430_MCBSP3_BASE,
|
||||
.dma_rx_sync = OMAP24XX_DMA_MCBSP3_RX,
|
||||
.dma_tx_sync = OMAP24XX_DMA_MCBSP3_TX,
|
||||
.rx_irq = INT_24XX_MCBSP3_IRQ_RX,
|
||||
.tx_irq = INT_24XX_MCBSP3_IRQ_TX,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP2430_MCBSP4_BASE,
|
||||
.dma_rx_sync = OMAP24XX_DMA_MCBSP4_RX,
|
||||
.dma_tx_sync = OMAP24XX_DMA_MCBSP4_TX,
|
||||
.rx_irq = INT_24XX_MCBSP4_IRQ_RX,
|
||||
.tx_irq = INT_24XX_MCBSP4_IRQ_TX,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP2430_MCBSP5_BASE,
|
||||
.dma_rx_sync = OMAP24XX_DMA_MCBSP5_RX,
|
||||
.dma_tx_sync = OMAP24XX_DMA_MCBSP5_TX,
|
||||
.rx_irq = INT_24XX_MCBSP5_IRQ_RX,
|
||||
.tx_irq = INT_24XX_MCBSP5_IRQ_TX,
|
||||
},
|
||||
};
|
||||
#define OMAP2430_MCBSP_PDATA_SZ ARRAY_SIZE(omap2430_mcbsp_pdata)
|
||||
#define OMAP2430_MCBSP_REG_NUM (OMAP_MCBSP_REG_RCCR / sizeof(u32) + 1)
|
||||
#else
|
||||
#define omap2430_mcbsp_pdata NULL
|
||||
#define OMAP2430_MCBSP_PDATA_SZ 0
|
||||
#define OMAP2430_MCBSP_REG_NUM 0
|
||||
#endif
|
||||
static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
|
||||
{
|
||||
int id, count = 1;
|
||||
char *name = "omap-mcbsp";
|
||||
struct omap_hwmod *oh_device[2];
|
||||
struct omap_mcbsp_platform_data *pdata = NULL;
|
||||
struct omap_device *od;
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP3
|
||||
static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = {
|
||||
{
|
||||
.phys_base = OMAP34XX_MCBSP1_BASE,
|
||||
.dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX,
|
||||
.dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX,
|
||||
.rx_irq = INT_24XX_MCBSP1_IRQ_RX,
|
||||
.tx_irq = INT_24XX_MCBSP1_IRQ_TX,
|
||||
.buffer_size = 0x80, /* The FIFO has 128 locations */
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP34XX_MCBSP2_BASE,
|
||||
.phys_base_st = OMAP34XX_MCBSP2_ST_BASE,
|
||||
.dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX,
|
||||
.dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX,
|
||||
.rx_irq = INT_24XX_MCBSP2_IRQ_RX,
|
||||
.tx_irq = INT_24XX_MCBSP2_IRQ_TX,
|
||||
.buffer_size = 0x500, /* The FIFO has 1024 + 256 locations */
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP34XX_MCBSP3_BASE,
|
||||
.phys_base_st = OMAP34XX_MCBSP3_ST_BASE,
|
||||
.dma_rx_sync = OMAP24XX_DMA_MCBSP3_RX,
|
||||
.dma_tx_sync = OMAP24XX_DMA_MCBSP3_TX,
|
||||
.rx_irq = INT_24XX_MCBSP3_IRQ_RX,
|
||||
.tx_irq = INT_24XX_MCBSP3_IRQ_TX,
|
||||
.buffer_size = 0x80, /* The FIFO has 128 locations */
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP34XX_MCBSP4_BASE,
|
||||
.dma_rx_sync = OMAP24XX_DMA_MCBSP4_RX,
|
||||
.dma_tx_sync = OMAP24XX_DMA_MCBSP4_TX,
|
||||
.rx_irq = INT_24XX_MCBSP4_IRQ_RX,
|
||||
.tx_irq = INT_24XX_MCBSP4_IRQ_TX,
|
||||
.buffer_size = 0x80, /* The FIFO has 128 locations */
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP34XX_MCBSP5_BASE,
|
||||
.dma_rx_sync = OMAP24XX_DMA_MCBSP5_RX,
|
||||
.dma_tx_sync = OMAP24XX_DMA_MCBSP5_TX,
|
||||
.rx_irq = INT_24XX_MCBSP5_IRQ_RX,
|
||||
.tx_irq = INT_24XX_MCBSP5_IRQ_TX,
|
||||
.buffer_size = 0x80, /* The FIFO has 128 locations */
|
||||
},
|
||||
};
|
||||
#define OMAP34XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap34xx_mcbsp_pdata)
|
||||
#define OMAP34XX_MCBSP_REG_NUM (OMAP_MCBSP_REG_RCCR / sizeof(u32) + 1)
|
||||
#else
|
||||
#define omap34xx_mcbsp_pdata NULL
|
||||
#define OMAP34XX_MCBSP_PDATA_SZ 0
|
||||
#define OMAP34XX_MCBSP_REG_NUM 0
|
||||
#endif
|
||||
sscanf(oh->name, "mcbsp%d", &id);
|
||||
|
||||
static struct omap_mcbsp_platform_data omap44xx_mcbsp_pdata[] = {
|
||||
{
|
||||
.phys_base = OMAP44XX_MCBSP1_BASE,
|
||||
.dma_rx_sync = OMAP44XX_DMA_MCBSP1_RX,
|
||||
.dma_tx_sync = OMAP44XX_DMA_MCBSP1_TX,
|
||||
.tx_irq = OMAP44XX_IRQ_MCBSP1,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP44XX_MCBSP2_BASE,
|
||||
.dma_rx_sync = OMAP44XX_DMA_MCBSP2_RX,
|
||||
.dma_tx_sync = OMAP44XX_DMA_MCBSP2_TX,
|
||||
.tx_irq = OMAP44XX_IRQ_MCBSP2,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP44XX_MCBSP3_BASE,
|
||||
.dma_rx_sync = OMAP44XX_DMA_MCBSP3_RX,
|
||||
.dma_tx_sync = OMAP44XX_DMA_MCBSP3_TX,
|
||||
.tx_irq = OMAP44XX_IRQ_MCBSP3,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP44XX_MCBSP4_BASE,
|
||||
.dma_rx_sync = OMAP44XX_DMA_MCBSP4_RX,
|
||||
.dma_tx_sync = OMAP44XX_DMA_MCBSP4_TX,
|
||||
.tx_irq = OMAP44XX_IRQ_MCBSP4,
|
||||
},
|
||||
};
|
||||
#define OMAP44XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap44xx_mcbsp_pdata)
|
||||
#define OMAP44XX_MCBSP_REG_NUM (OMAP_MCBSP_REG_RCCR / sizeof(u32) + 1)
|
||||
pdata = kzalloc(sizeof(struct omap_mcbsp_platform_data), GFP_KERNEL);
|
||||
if (!pdata) {
|
||||
pr_err("%s: No memory for mcbsp\n", __func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
pdata->mcbsp_config_type = oh->class->rev;
|
||||
|
||||
if (oh->class->rev == MCBSP_CONFIG_TYPE3) {
|
||||
if (id == 2)
|
||||
/* The FIFO has 1024 + 256 locations */
|
||||
pdata->buffer_size = 0x500;
|
||||
else
|
||||
/* The FIFO has 128 locations */
|
||||
pdata->buffer_size = 0x80;
|
||||
}
|
||||
|
||||
oh_device[0] = oh;
|
||||
|
||||
if (oh->dev_attr) {
|
||||
oh_device[1] = omap_hwmod_lookup((
|
||||
(struct omap_mcbsp_dev_attr *)(oh->dev_attr))->sidetone);
|
||||
count++;
|
||||
}
|
||||
od = omap_device_build_ss(name, id, oh_device, count, pdata,
|
||||
sizeof(*pdata), omap2_mcbsp_latency,
|
||||
ARRAY_SIZE(omap2_mcbsp_latency), false);
|
||||
kfree(pdata);
|
||||
if (IS_ERR(od)) {
|
||||
pr_err("%s: Cant build omap_device for %s:%s.\n", __func__,
|
||||
name, oh->name);
|
||||
return PTR_ERR(od);
|
||||
}
|
||||
omap_mcbsp_count++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init omap2_mcbsp_init(void)
|
||||
{
|
||||
if (cpu_is_omap2420()) {
|
||||
omap_mcbsp_count = OMAP2420_MCBSP_PDATA_SZ;
|
||||
omap_mcbsp_cache_size = OMAP2420_MCBSP_REG_NUM * sizeof(u16);
|
||||
} else if (cpu_is_omap2430()) {
|
||||
omap_mcbsp_count = OMAP2430_MCBSP_PDATA_SZ;
|
||||
omap_mcbsp_cache_size = OMAP2430_MCBSP_REG_NUM * sizeof(u32);
|
||||
} else if (cpu_is_omap34xx()) {
|
||||
omap_mcbsp_count = OMAP34XX_MCBSP_PDATA_SZ;
|
||||
omap_mcbsp_cache_size = OMAP34XX_MCBSP_REG_NUM * sizeof(u32);
|
||||
} else if (cpu_is_omap44xx()) {
|
||||
omap_mcbsp_count = OMAP44XX_MCBSP_PDATA_SZ;
|
||||
omap_mcbsp_cache_size = OMAP44XX_MCBSP_REG_NUM * sizeof(u32);
|
||||
}
|
||||
omap_hwmod_for_each_by_class("mcbsp", omap_init_mcbsp, NULL);
|
||||
|
||||
mcbsp_ptr = kzalloc(omap_mcbsp_count * sizeof(struct omap_mcbsp *),
|
||||
GFP_KERNEL);
|
||||
if (!mcbsp_ptr)
|
||||
return -ENOMEM;
|
||||
|
||||
if (cpu_is_omap2420())
|
||||
omap_mcbsp_register_board_cfg(omap2420_mcbsp_pdata,
|
||||
OMAP2420_MCBSP_PDATA_SZ);
|
||||
if (cpu_is_omap2430())
|
||||
omap_mcbsp_register_board_cfg(omap2430_mcbsp_pdata,
|
||||
OMAP2430_MCBSP_PDATA_SZ);
|
||||
if (cpu_is_omap34xx())
|
||||
omap_mcbsp_register_board_cfg(omap34xx_mcbsp_pdata,
|
||||
OMAP34XX_MCBSP_PDATA_SZ);
|
||||
if (cpu_is_omap44xx())
|
||||
omap_mcbsp_register_board_cfg(omap44xx_mcbsp_pdata,
|
||||
OMAP44XX_MCBSP_PDATA_SZ);
|
||||
|
||||
return omap_mcbsp_init();
|
||||
}
|
||||
arch_initcall(omap2_mcbsp_init);
|
||||
|
|
|
@ -1929,6 +1929,7 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
|
|||
os = oh->slaves[i];
|
||||
|
||||
for (j = 0; j < os->addr_cnt; j++) {
|
||||
(res + r)->name = (os->addr + j)->name;
|
||||
(res + r)->start = (os->addr + j)->pa_start;
|
||||
(res + r)->end = (os->addr + j)->pa_end;
|
||||
(res + r)->flags = IORESOURCE_MEM;
|
||||
|
|
|
@ -110,6 +110,8 @@ static struct omap_hwmod omap2420_uart2_hwmod;
|
|||
static struct omap_hwmod omap2420_uart3_hwmod;
|
||||
static struct omap_hwmod omap2420_i2c1_hwmod;
|
||||
static struct omap_hwmod omap2420_i2c2_hwmod;
|
||||
static struct omap_hwmod omap2420_mcbsp1_hwmod;
|
||||
static struct omap_hwmod omap2420_mcbsp2_hwmod;
|
||||
|
||||
/* l4 core -> mcspi1 interface */
|
||||
static struct omap_hwmod_addr_space omap2420_mcspi1_addr_space[] = {
|
||||
|
@ -1827,6 +1829,76 @@ static struct omap_hwmod omap2420_dma_system_hwmod = {
|
|||
.flags = HWMOD_NO_IDLEST,
|
||||
};
|
||||
|
||||
/*
|
||||
* 'mailbox' class
|
||||
* mailbox module allowing communication between the on-chip processors
|
||||
* using a queued mailbox-interrupt mechanism.
|
||||
*/
|
||||
|
||||
static struct omap_hwmod_class_sysconfig omap2420_mailbox_sysc = {
|
||||
.rev_offs = 0x000,
|
||||
.sysc_offs = 0x010,
|
||||
.syss_offs = 0x014,
|
||||
.sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
|
||||
SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
|
||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
|
||||
.sysc_fields = &omap_hwmod_sysc_type1,
|
||||
};
|
||||
|
||||
static struct omap_hwmod_class omap2420_mailbox_hwmod_class = {
|
||||
.name = "mailbox",
|
||||
.sysc = &omap2420_mailbox_sysc,
|
||||
};
|
||||
|
||||
/* mailbox */
|
||||
static struct omap_hwmod omap2420_mailbox_hwmod;
|
||||
static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
|
||||
{ .name = "dsp", .irq = 26 },
|
||||
{ .name = "iva", .irq = 34 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap2420_mailbox_addrs[] = {
|
||||
{
|
||||
.pa_start = 0x48094000,
|
||||
.pa_end = 0x480941ff,
|
||||
.flags = ADDR_TYPE_RT,
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_core -> mailbox */
|
||||
static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
|
||||
.master = &omap2420_l4_core_hwmod,
|
||||
.slave = &omap2420_mailbox_hwmod,
|
||||
.addr = omap2420_mailbox_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap2420_mailbox_addrs),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* mailbox slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = {
|
||||
&omap2420_l4_core__mailbox,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap2420_mailbox_hwmod = {
|
||||
.name = "mailbox",
|
||||
.class = &omap2420_mailbox_hwmod_class,
|
||||
.mpu_irqs = omap2420_mailbox_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap2420_mailbox_irqs),
|
||||
.main_clk = "mailboxes_ick",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
|
||||
.module_offs = CORE_MOD,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap2420_mailbox_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2420_mailbox_slaves),
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
|
||||
};
|
||||
|
||||
/*
|
||||
* 'mcspi' class
|
||||
* multichannel serial port interface (mcspi) / master/slave synchronous serial
|
||||
|
@ -1940,6 +2012,129 @@ static struct omap_hwmod omap2420_mcspi2_hwmod = {
|
|||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
|
||||
};
|
||||
|
||||
/*
|
||||
* 'mcbsp' class
|
||||
* multi channel buffered serial port controller
|
||||
*/
|
||||
|
||||
static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
|
||||
.name = "mcbsp",
|
||||
};
|
||||
|
||||
/* mcbsp1 */
|
||||
static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
|
||||
{ .name = "tx", .irq = 59 },
|
||||
{ .name = "rx", .irq = 60 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap2420_mcbsp1_sdma_chs[] = {
|
||||
{ .name = "rx", .dma_req = 32 },
|
||||
{ .name = "tx", .dma_req = 31 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap2420_mcbsp1_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
.pa_start = 0x48074000,
|
||||
.pa_end = 0x480740ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_core -> mcbsp1 */
|
||||
static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
|
||||
.master = &omap2420_l4_core_hwmod,
|
||||
.slave = &omap2420_mcbsp1_hwmod,
|
||||
.clk = "mcbsp1_ick",
|
||||
.addr = omap2420_mcbsp1_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap2420_mcbsp1_addrs),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* mcbsp1 slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap2420_mcbsp1_slaves[] = {
|
||||
&omap2420_l4_core__mcbsp1,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap2420_mcbsp1_hwmod = {
|
||||
.name = "mcbsp1",
|
||||
.class = &omap2420_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap2420_mcbsp1_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcbsp1_irqs),
|
||||
.sdma_reqs = omap2420_mcbsp1_sdma_chs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcbsp1_sdma_chs),
|
||||
.main_clk = "mcbsp1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
|
||||
.module_offs = CORE_MOD,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap2420_mcbsp1_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2420_mcbsp1_slaves),
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
|
||||
};
|
||||
|
||||
/* mcbsp2 */
|
||||
static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
|
||||
{ .name = "tx", .irq = 62 },
|
||||
{ .name = "rx", .irq = 63 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap2420_mcbsp2_sdma_chs[] = {
|
||||
{ .name = "rx", .dma_req = 34 },
|
||||
{ .name = "tx", .dma_req = 33 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap2420_mcbsp2_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
.pa_start = 0x48076000,
|
||||
.pa_end = 0x480760ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_core -> mcbsp2 */
|
||||
static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
|
||||
.master = &omap2420_l4_core_hwmod,
|
||||
.slave = &omap2420_mcbsp2_hwmod,
|
||||
.clk = "mcbsp2_ick",
|
||||
.addr = omap2420_mcbsp2_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap2420_mcbsp2_addrs),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* mcbsp2 slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap2420_mcbsp2_slaves[] = {
|
||||
&omap2420_l4_core__mcbsp2,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap2420_mcbsp2_hwmod = {
|
||||
.name = "mcbsp2",
|
||||
.class = &omap2420_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap2420_mcbsp2_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcbsp2_irqs),
|
||||
.sdma_reqs = omap2420_mcbsp2_sdma_chs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcbsp2_sdma_chs),
|
||||
.main_clk = "mcbsp2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
|
||||
.module_offs = CORE_MOD,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap2420_mcbsp2_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2420_mcbsp2_slaves),
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
|
||||
};
|
||||
|
||||
static __initdata struct omap_hwmod *omap2420_hwmods[] = {
|
||||
&omap2420_l3_main_hwmod,
|
||||
&omap2420_l4_core_hwmod,
|
||||
|
@ -1982,6 +2177,13 @@ static __initdata struct omap_hwmod *omap2420_hwmods[] = {
|
|||
/* dma_system class*/
|
||||
&omap2420_dma_system_hwmod,
|
||||
|
||||
/* mailbox class */
|
||||
&omap2420_mailbox_hwmod,
|
||||
|
||||
/* mcbsp class */
|
||||
&omap2420_mcbsp1_hwmod,
|
||||
&omap2420_mcbsp2_hwmod,
|
||||
|
||||
/* mcspi class */
|
||||
&omap2420_mcspi1_hwmod,
|
||||
&omap2420_mcspi2_hwmod,
|
||||
|
|
|
@ -18,8 +18,10 @@
|
|||
#include <plat/serial.h>
|
||||
#include <plat/i2c.h>
|
||||
#include <plat/gpio.h>
|
||||
#include <plat/mcbsp.h>
|
||||
#include <plat/mcspi.h>
|
||||
#include <plat/dmtimer.h>
|
||||
#include <plat/mmc.h>
|
||||
#include <plat/l3_2xxx.h>
|
||||
|
||||
#include "omap_hwmod_common_data.h"
|
||||
|
@ -52,9 +54,16 @@ static struct omap_hwmod omap2430_gpio3_hwmod;
|
|||
static struct omap_hwmod omap2430_gpio4_hwmod;
|
||||
static struct omap_hwmod omap2430_gpio5_hwmod;
|
||||
static struct omap_hwmod omap2430_dma_system_hwmod;
|
||||
static struct omap_hwmod omap2430_mcbsp1_hwmod;
|
||||
static struct omap_hwmod omap2430_mcbsp2_hwmod;
|
||||
static struct omap_hwmod omap2430_mcbsp3_hwmod;
|
||||
static struct omap_hwmod omap2430_mcbsp4_hwmod;
|
||||
static struct omap_hwmod omap2430_mcbsp5_hwmod;
|
||||
static struct omap_hwmod omap2430_mcspi1_hwmod;
|
||||
static struct omap_hwmod omap2430_mcspi2_hwmod;
|
||||
static struct omap_hwmod omap2430_mcspi3_hwmod;
|
||||
static struct omap_hwmod omap2430_mmc1_hwmod;
|
||||
static struct omap_hwmod omap2430_mmc2_hwmod;
|
||||
|
||||
/* L3 -> L4_CORE interface */
|
||||
static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
|
||||
|
@ -251,6 +260,42 @@ static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
|
|||
&omap2430_l4_core__usbhsotg,
|
||||
};
|
||||
|
||||
/* L4 CORE -> MMC1 interface */
|
||||
static struct omap_hwmod_addr_space omap2430_mmc1_addr_space[] = {
|
||||
{
|
||||
.pa_start = 0x4809c000,
|
||||
.pa_end = 0x4809c1ff,
|
||||
.flags = ADDR_TYPE_RT,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
|
||||
.master = &omap2430_l4_core_hwmod,
|
||||
.slave = &omap2430_mmc1_hwmod,
|
||||
.clk = "mmchs1_ick",
|
||||
.addr = omap2430_mmc1_addr_space,
|
||||
.addr_cnt = ARRAY_SIZE(omap2430_mmc1_addr_space),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* L4 CORE -> MMC2 interface */
|
||||
static struct omap_hwmod_addr_space omap2430_mmc2_addr_space[] = {
|
||||
{
|
||||
.pa_start = 0x480b4000,
|
||||
.pa_end = 0x480b41ff,
|
||||
.flags = ADDR_TYPE_RT,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
|
||||
.master = &omap2430_l4_core_hwmod,
|
||||
.slave = &omap2430_mmc2_hwmod,
|
||||
.addr = omap2430_mmc2_addr_space,
|
||||
.clk = "mmchs2_ick",
|
||||
.addr_cnt = ARRAY_SIZE(omap2430_mmc2_addr_space),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* Slave interfaces on the L4_CORE interconnect */
|
||||
static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
|
||||
&omap2430_l3_main__l4_core,
|
||||
|
@ -259,6 +304,8 @@ static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
|
|||
/* Master interfaces on the L4_CORE interconnect */
|
||||
static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
|
||||
&omap2430_l4_core__l4_wkup,
|
||||
&omap2430_l4_core__mmc1,
|
||||
&omap2430_l4_core__mmc2,
|
||||
};
|
||||
|
||||
/* L4 CORE */
|
||||
|
@ -1913,6 +1960,75 @@ static struct omap_hwmod omap2430_dma_system_hwmod = {
|
|||
.flags = HWMOD_NO_IDLEST,
|
||||
};
|
||||
|
||||
/*
|
||||
* 'mailbox' class
|
||||
* mailbox module allowing communication between the on-chip processors
|
||||
* using a queued mailbox-interrupt mechanism.
|
||||
*/
|
||||
|
||||
static struct omap_hwmod_class_sysconfig omap2430_mailbox_sysc = {
|
||||
.rev_offs = 0x000,
|
||||
.sysc_offs = 0x010,
|
||||
.syss_offs = 0x014,
|
||||
.sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
|
||||
SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
|
||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
|
||||
.sysc_fields = &omap_hwmod_sysc_type1,
|
||||
};
|
||||
|
||||
static struct omap_hwmod_class omap2430_mailbox_hwmod_class = {
|
||||
.name = "mailbox",
|
||||
.sysc = &omap2430_mailbox_sysc,
|
||||
};
|
||||
|
||||
/* mailbox */
|
||||
static struct omap_hwmod omap2430_mailbox_hwmod;
|
||||
static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
|
||||
{ .irq = 26 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap2430_mailbox_addrs[] = {
|
||||
{
|
||||
.pa_start = 0x48094000,
|
||||
.pa_end = 0x480941ff,
|
||||
.flags = ADDR_TYPE_RT,
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_core -> mailbox */
|
||||
static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
|
||||
.master = &omap2430_l4_core_hwmod,
|
||||
.slave = &omap2430_mailbox_hwmod,
|
||||
.addr = omap2430_mailbox_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap2430_mailbox_addrs),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* mailbox slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
|
||||
&omap2430_l4_core__mailbox,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap2430_mailbox_hwmod = {
|
||||
.name = "mailbox",
|
||||
.class = &omap2430_mailbox_hwmod_class,
|
||||
.mpu_irqs = omap2430_mailbox_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap2430_mailbox_irqs),
|
||||
.main_clk = "mailboxes_ick",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
|
||||
.module_offs = CORE_MOD,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap2430_mailbox_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves),
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
|
||||
};
|
||||
|
||||
/*
|
||||
* 'mcspi' class
|
||||
* multichannel serial port interface (mcspi) / master/slave synchronous serial
|
||||
|
@ -2125,7 +2241,425 @@ static struct omap_hwmod omap2430_usbhsotg_hwmod = {
|
|||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
|
||||
};
|
||||
|
||||
/*
|
||||
* 'mcbsp' class
|
||||
* multi channel buffered serial port controller
|
||||
*/
|
||||
|
||||
static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
|
||||
.rev_offs = 0x007C,
|
||||
.sysc_offs = 0x008C,
|
||||
.sysc_flags = (SYSC_HAS_SOFTRESET),
|
||||
.sysc_fields = &omap_hwmod_sysc_type1,
|
||||
};
|
||||
|
||||
static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
|
||||
.name = "mcbsp",
|
||||
.sysc = &omap2430_mcbsp_sysc,
|
||||
.rev = MCBSP_CONFIG_TYPE2,
|
||||
};
|
||||
|
||||
/* mcbsp1 */
|
||||
static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
|
||||
{ .name = "tx", .irq = 59 },
|
||||
{ .name = "rx", .irq = 60 },
|
||||
{ .name = "ovr", .irq = 61 },
|
||||
{ .name = "common", .irq = 64 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap2430_mcbsp1_sdma_chs[] = {
|
||||
{ .name = "rx", .dma_req = 32 },
|
||||
{ .name = "tx", .dma_req = 31 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap2430_mcbsp1_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
.pa_start = 0x48074000,
|
||||
.pa_end = 0x480740ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_core -> mcbsp1 */
|
||||
static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
|
||||
.master = &omap2430_l4_core_hwmod,
|
||||
.slave = &omap2430_mcbsp1_hwmod,
|
||||
.clk = "mcbsp1_ick",
|
||||
.addr = omap2430_mcbsp1_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap2430_mcbsp1_addrs),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* mcbsp1 slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = {
|
||||
&omap2430_l4_core__mcbsp1,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap2430_mcbsp1_hwmod = {
|
||||
.name = "mcbsp1",
|
||||
.class = &omap2430_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap2430_mcbsp1_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_irqs),
|
||||
.sdma_reqs = omap2430_mcbsp1_sdma_chs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_sdma_chs),
|
||||
.main_clk = "mcbsp1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
|
||||
.module_offs = CORE_MOD,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap2430_mcbsp1_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves),
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
|
||||
};
|
||||
|
||||
/* mcbsp2 */
|
||||
static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
|
||||
{ .name = "tx", .irq = 62 },
|
||||
{ .name = "rx", .irq = 63 },
|
||||
{ .name = "common", .irq = 16 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap2430_mcbsp2_sdma_chs[] = {
|
||||
{ .name = "rx", .dma_req = 34 },
|
||||
{ .name = "tx", .dma_req = 33 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap2430_mcbsp2_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
.pa_start = 0x48076000,
|
||||
.pa_end = 0x480760ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_core -> mcbsp2 */
|
||||
static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
|
||||
.master = &omap2430_l4_core_hwmod,
|
||||
.slave = &omap2430_mcbsp2_hwmod,
|
||||
.clk = "mcbsp2_ick",
|
||||
.addr = omap2430_mcbsp2_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap2430_mcbsp2_addrs),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* mcbsp2 slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = {
|
||||
&omap2430_l4_core__mcbsp2,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap2430_mcbsp2_hwmod = {
|
||||
.name = "mcbsp2",
|
||||
.class = &omap2430_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap2430_mcbsp2_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_irqs),
|
||||
.sdma_reqs = omap2430_mcbsp2_sdma_chs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_sdma_chs),
|
||||
.main_clk = "mcbsp2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
|
||||
.module_offs = CORE_MOD,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap2430_mcbsp2_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves),
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
|
||||
};
|
||||
|
||||
/* mcbsp3 */
|
||||
static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
|
||||
{ .name = "tx", .irq = 89 },
|
||||
{ .name = "rx", .irq = 90 },
|
||||
{ .name = "common", .irq = 17 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap2430_mcbsp3_sdma_chs[] = {
|
||||
{ .name = "rx", .dma_req = 18 },
|
||||
{ .name = "tx", .dma_req = 17 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
.pa_start = 0x4808C000,
|
||||
.pa_end = 0x4808C0ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_core -> mcbsp3 */
|
||||
static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
|
||||
.master = &omap2430_l4_core_hwmod,
|
||||
.slave = &omap2430_mcbsp3_hwmod,
|
||||
.clk = "mcbsp3_ick",
|
||||
.addr = omap2430_mcbsp3_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap2430_mcbsp3_addrs),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* mcbsp3 slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = {
|
||||
&omap2430_l4_core__mcbsp3,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap2430_mcbsp3_hwmod = {
|
||||
.name = "mcbsp3",
|
||||
.class = &omap2430_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap2430_mcbsp3_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_irqs),
|
||||
.sdma_reqs = omap2430_mcbsp3_sdma_chs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_sdma_chs),
|
||||
.main_clk = "mcbsp3_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP2430_EN_MCBSP3_SHIFT,
|
||||
.module_offs = CORE_MOD,
|
||||
.idlest_reg_id = 2,
|
||||
.idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap2430_mcbsp3_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves),
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
|
||||
};
|
||||
|
||||
/* mcbsp4 */
|
||||
static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
|
||||
{ .name = "tx", .irq = 54 },
|
||||
{ .name = "rx", .irq = 55 },
|
||||
{ .name = "common", .irq = 18 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
|
||||
{ .name = "rx", .dma_req = 20 },
|
||||
{ .name = "tx", .dma_req = 19 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
.pa_start = 0x4808E000,
|
||||
.pa_end = 0x4808E0ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_core -> mcbsp4 */
|
||||
static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
|
||||
.master = &omap2430_l4_core_hwmod,
|
||||
.slave = &omap2430_mcbsp4_hwmod,
|
||||
.clk = "mcbsp4_ick",
|
||||
.addr = omap2430_mcbsp4_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap2430_mcbsp4_addrs),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* mcbsp4 slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = {
|
||||
&omap2430_l4_core__mcbsp4,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap2430_mcbsp4_hwmod = {
|
||||
.name = "mcbsp4",
|
||||
.class = &omap2430_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap2430_mcbsp4_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_irqs),
|
||||
.sdma_reqs = omap2430_mcbsp4_sdma_chs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_sdma_chs),
|
||||
.main_clk = "mcbsp4_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP2430_EN_MCBSP4_SHIFT,
|
||||
.module_offs = CORE_MOD,
|
||||
.idlest_reg_id = 2,
|
||||
.idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap2430_mcbsp4_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves),
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
|
||||
};
|
||||
|
||||
/* mcbsp5 */
|
||||
static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
|
||||
{ .name = "tx", .irq = 81 },
|
||||
{ .name = "rx", .irq = 82 },
|
||||
{ .name = "common", .irq = 19 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
|
||||
{ .name = "rx", .dma_req = 22 },
|
||||
{ .name = "tx", .dma_req = 21 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
.pa_start = 0x48096000,
|
||||
.pa_end = 0x480960ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_core -> mcbsp5 */
|
||||
static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
|
||||
.master = &omap2430_l4_core_hwmod,
|
||||
.slave = &omap2430_mcbsp5_hwmod,
|
||||
.clk = "mcbsp5_ick",
|
||||
.addr = omap2430_mcbsp5_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap2430_mcbsp5_addrs),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* mcbsp5 slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = {
|
||||
&omap2430_l4_core__mcbsp5,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap2430_mcbsp5_hwmod = {
|
||||
.name = "mcbsp5",
|
||||
.class = &omap2430_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap2430_mcbsp5_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_irqs),
|
||||
.sdma_reqs = omap2430_mcbsp5_sdma_chs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_sdma_chs),
|
||||
.main_clk = "mcbsp5_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP2430_EN_MCBSP5_SHIFT,
|
||||
.module_offs = CORE_MOD,
|
||||
.idlest_reg_id = 2,
|
||||
.idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap2430_mcbsp5_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves),
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
|
||||
};
|
||||
|
||||
/* MMC/SD/SDIO common */
|
||||
|
||||
static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
|
||||
.rev_offs = 0x1fc,
|
||||
.sysc_offs = 0x10,
|
||||
.syss_offs = 0x14,
|
||||
.sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
|
||||
SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
|
||||
SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
|
||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
|
||||
.sysc_fields = &omap_hwmod_sysc_type1,
|
||||
};
|
||||
|
||||
static struct omap_hwmod_class omap2430_mmc_class = {
|
||||
.name = "mmc",
|
||||
.sysc = &omap2430_mmc_sysc,
|
||||
};
|
||||
|
||||
/* MMC/SD/SDIO1 */
|
||||
|
||||
static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
|
||||
{ .irq = 83 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
|
||||
{ .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
|
||||
{ .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
|
||||
};
|
||||
|
||||
static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
|
||||
{ .role = "dbck", .clk = "mmchsdb1_fck" },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = {
|
||||
&omap2430_l4_core__mmc1,
|
||||
};
|
||||
|
||||
static struct omap_mmc_dev_attr mmc1_dev_attr = {
|
||||
.flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap2430_mmc1_hwmod = {
|
||||
.name = "mmc1",
|
||||
.flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
|
||||
.mpu_irqs = omap2430_mmc1_mpu_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap2430_mmc1_mpu_irqs),
|
||||
.sdma_reqs = omap2430_mmc1_sdma_reqs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc1_sdma_reqs),
|
||||
.opt_clks = omap2430_mmc1_opt_clks,
|
||||
.opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
|
||||
.main_clk = "mmchs1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.module_offs = CORE_MOD,
|
||||
.prcm_reg_id = 2,
|
||||
.module_bit = OMAP2430_EN_MMCHS1_SHIFT,
|
||||
.idlest_reg_id = 2,
|
||||
.idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
|
||||
},
|
||||
},
|
||||
.dev_attr = &mmc1_dev_attr,
|
||||
.slaves = omap2430_mmc1_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves),
|
||||
.class = &omap2430_mmc_class,
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
|
||||
};
|
||||
|
||||
/* MMC/SD/SDIO2 */
|
||||
|
||||
static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
|
||||
{ .irq = 86 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
|
||||
{ .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
|
||||
{ .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
|
||||
};
|
||||
|
||||
static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
|
||||
{ .role = "dbck", .clk = "mmchsdb2_fck" },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = {
|
||||
&omap2430_l4_core__mmc2,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap2430_mmc2_hwmod = {
|
||||
.name = "mmc2",
|
||||
.flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
|
||||
.mpu_irqs = omap2430_mmc2_mpu_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap2430_mmc2_mpu_irqs),
|
||||
.sdma_reqs = omap2430_mmc2_sdma_reqs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc2_sdma_reqs),
|
||||
.opt_clks = omap2430_mmc2_opt_clks,
|
||||
.opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
|
||||
.main_clk = "mmchs2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.module_offs = CORE_MOD,
|
||||
.prcm_reg_id = 2,
|
||||
.module_bit = OMAP2430_EN_MMCHS2_SHIFT,
|
||||
.idlest_reg_id = 2,
|
||||
.idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap2430_mmc2_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_mmc2_slaves),
|
||||
.class = &omap2430_mmc_class,
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
|
||||
};
|
||||
|
||||
static __initdata struct omap_hwmod *omap2430_hwmods[] = {
|
||||
&omap2430_l3_main_hwmod,
|
||||
|
@ -2159,6 +2693,8 @@ static __initdata struct omap_hwmod *omap2430_hwmods[] = {
|
|||
/* i2c class */
|
||||
&omap2430_i2c1_hwmod,
|
||||
&omap2430_i2c2_hwmod,
|
||||
&omap2430_mmc1_hwmod,
|
||||
&omap2430_mmc2_hwmod,
|
||||
|
||||
/* gpio class */
|
||||
&omap2430_gpio1_hwmod,
|
||||
|
@ -2170,6 +2706,16 @@ static __initdata struct omap_hwmod *omap2430_hwmods[] = {
|
|||
/* dma_system class*/
|
||||
&omap2430_dma_system_hwmod,
|
||||
|
||||
/* mcbsp class */
|
||||
&omap2430_mcbsp1_hwmod,
|
||||
&omap2430_mcbsp2_hwmod,
|
||||
&omap2430_mcbsp3_hwmod,
|
||||
&omap2430_mcbsp4_hwmod,
|
||||
&omap2430_mcbsp5_hwmod,
|
||||
|
||||
/* mailbox class */
|
||||
&omap2430_mailbox_hwmod,
|
||||
|
||||
/* mcspi class */
|
||||
&omap2430_mcspi1_hwmod,
|
||||
&omap2430_mcspi2_hwmod,
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
#include <plat/l4_3xxx.h>
|
||||
#include <plat/i2c.h>
|
||||
#include <plat/gpio.h>
|
||||
#include <plat/mmc.h>
|
||||
#include <plat/smartreflex.h>
|
||||
#include <plat/mcbsp.h>
|
||||
#include <plat/mcspi.h>
|
||||
#include <plat/dmtimer.h>
|
||||
|
||||
|
@ -69,10 +71,21 @@ static struct omap_hwmod omap34xx_mcspi1;
|
|||
static struct omap_hwmod omap34xx_mcspi2;
|
||||
static struct omap_hwmod omap34xx_mcspi3;
|
||||
static struct omap_hwmod omap34xx_mcspi4;
|
||||
static struct omap_hwmod omap3xxx_mmc1_hwmod;
|
||||
static struct omap_hwmod omap3xxx_mmc2_hwmod;
|
||||
static struct omap_hwmod omap3xxx_mmc3_hwmod;
|
||||
static struct omap_hwmod am35xx_usbhsotg_hwmod;
|
||||
|
||||
static struct omap_hwmod omap3xxx_dma_system_hwmod;
|
||||
|
||||
static struct omap_hwmod omap3xxx_mcbsp1_hwmod;
|
||||
static struct omap_hwmod omap3xxx_mcbsp2_hwmod;
|
||||
static struct omap_hwmod omap3xxx_mcbsp3_hwmod;
|
||||
static struct omap_hwmod omap3xxx_mcbsp4_hwmod;
|
||||
static struct omap_hwmod omap3xxx_mcbsp5_hwmod;
|
||||
static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod;
|
||||
static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod;
|
||||
|
||||
/* L3 -> L4_CORE interface */
|
||||
static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
|
||||
.master = &omap3xxx_l3_main_hwmod,
|
||||
|
@ -159,6 +172,63 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
|
|||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* L4 CORE -> MMC1 interface */
|
||||
static struct omap_hwmod_addr_space omap3xxx_mmc1_addr_space[] = {
|
||||
{
|
||||
.pa_start = 0x4809c000,
|
||||
.pa_end = 0x4809c1ff,
|
||||
.flags = ADDR_TYPE_RT,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = {
|
||||
.master = &omap3xxx_l4_core_hwmod,
|
||||
.slave = &omap3xxx_mmc1_hwmod,
|
||||
.clk = "mmchs1_ick",
|
||||
.addr = omap3xxx_mmc1_addr_space,
|
||||
.addr_cnt = ARRAY_SIZE(omap3xxx_mmc1_addr_space),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
.flags = OMAP_FIREWALL_L4
|
||||
};
|
||||
|
||||
/* L4 CORE -> MMC2 interface */
|
||||
static struct omap_hwmod_addr_space omap3xxx_mmc2_addr_space[] = {
|
||||
{
|
||||
.pa_start = 0x480b4000,
|
||||
.pa_end = 0x480b41ff,
|
||||
.flags = ADDR_TYPE_RT,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = {
|
||||
.master = &omap3xxx_l4_core_hwmod,
|
||||
.slave = &omap3xxx_mmc2_hwmod,
|
||||
.clk = "mmchs2_ick",
|
||||
.addr = omap3xxx_mmc2_addr_space,
|
||||
.addr_cnt = ARRAY_SIZE(omap3xxx_mmc2_addr_space),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
.flags = OMAP_FIREWALL_L4
|
||||
};
|
||||
|
||||
/* L4 CORE -> MMC3 interface */
|
||||
static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
|
||||
{
|
||||
.pa_start = 0x480ad000,
|
||||
.pa_end = 0x480ad1ff,
|
||||
.flags = ADDR_TYPE_RT,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
|
||||
.master = &omap3xxx_l4_core_hwmod,
|
||||
.slave = &omap3xxx_mmc3_hwmod,
|
||||
.clk = "mmchs3_ick",
|
||||
.addr = omap3xxx_mmc3_addr_space,
|
||||
.addr_cnt = ARRAY_SIZE(omap3xxx_mmc3_addr_space),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
.flags = OMAP_FIREWALL_L4
|
||||
};
|
||||
|
||||
/* L4 CORE -> UART1 interface */
|
||||
static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
|
||||
{
|
||||
|
@ -2364,6 +2434,437 @@ static struct omap_hwmod omap3xxx_dma_system_hwmod = {
|
|||
.flags = HWMOD_NO_IDLEST,
|
||||
};
|
||||
|
||||
/*
|
||||
* 'mcbsp' class
|
||||
* multi channel buffered serial port controller
|
||||
*/
|
||||
|
||||
static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
|
||||
.sysc_offs = 0x008c,
|
||||
.sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
|
||||
SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
|
||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
|
||||
.sysc_fields = &omap_hwmod_sysc_type1,
|
||||
.clockact = 0x2,
|
||||
};
|
||||
|
||||
static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
|
||||
.name = "mcbsp",
|
||||
.sysc = &omap3xxx_mcbsp_sysc,
|
||||
.rev = MCBSP_CONFIG_TYPE3,
|
||||
};
|
||||
|
||||
/* mcbsp1 */
|
||||
static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
|
||||
{ .name = "irq", .irq = 16 },
|
||||
{ .name = "tx", .irq = 59 },
|
||||
{ .name = "rx", .irq = 60 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap3xxx_mcbsp1_sdma_chs[] = {
|
||||
{ .name = "rx", .dma_req = 32 },
|
||||
{ .name = "tx", .dma_req = 31 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
.pa_start = 0x48074000,
|
||||
.pa_end = 0x480740ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_core -> mcbsp1 */
|
||||
static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
|
||||
.master = &omap3xxx_l4_core_hwmod,
|
||||
.slave = &omap3xxx_mcbsp1_hwmod,
|
||||
.clk = "mcbsp1_ick",
|
||||
.addr = omap3xxx_mcbsp1_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_addrs),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* mcbsp1 slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap3xxx_mcbsp1_slaves[] = {
|
||||
&omap3xxx_l4_core__mcbsp1,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
|
||||
.name = "mcbsp1",
|
||||
.class = &omap3xxx_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap3xxx_mcbsp1_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_irqs),
|
||||
.sdma_reqs = omap3xxx_mcbsp1_sdma_chs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_sdma_chs),
|
||||
.main_clk = "mcbsp1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP3430_EN_MCBSP1_SHIFT,
|
||||
.module_offs = CORE_MOD,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap3xxx_mcbsp1_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_slaves),
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
||||
};
|
||||
|
||||
/* mcbsp2 */
|
||||
static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
|
||||
{ .name = "irq", .irq = 17 },
|
||||
{ .name = "tx", .irq = 62 },
|
||||
{ .name = "rx", .irq = 63 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap3xxx_mcbsp2_sdma_chs[] = {
|
||||
{ .name = "rx", .dma_req = 34 },
|
||||
{ .name = "tx", .dma_req = 33 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
.pa_start = 0x49022000,
|
||||
.pa_end = 0x490220ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_per -> mcbsp2 */
|
||||
static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
|
||||
.master = &omap3xxx_l4_per_hwmod,
|
||||
.slave = &omap3xxx_mcbsp2_hwmod,
|
||||
.clk = "mcbsp2_ick",
|
||||
.addr = omap3xxx_mcbsp2_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_addrs),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* mcbsp2 slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_slaves[] = {
|
||||
&omap3xxx_l4_per__mcbsp2,
|
||||
};
|
||||
|
||||
static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
|
||||
.sidetone = "mcbsp2_sidetone",
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
|
||||
.name = "mcbsp2",
|
||||
.class = &omap3xxx_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap3xxx_mcbsp2_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_irqs),
|
||||
.sdma_reqs = omap3xxx_mcbsp2_sdma_chs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sdma_chs),
|
||||
.main_clk = "mcbsp2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP3430_EN_MCBSP2_SHIFT,
|
||||
.module_offs = OMAP3430_PER_MOD,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap3xxx_mcbsp2_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_slaves),
|
||||
.dev_attr = &omap34xx_mcbsp2_dev_attr,
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
||||
};
|
||||
|
||||
/* mcbsp3 */
|
||||
static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
|
||||
{ .name = "irq", .irq = 22 },
|
||||
{ .name = "tx", .irq = 89 },
|
||||
{ .name = "rx", .irq = 90 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap3xxx_mcbsp3_sdma_chs[] = {
|
||||
{ .name = "rx", .dma_req = 18 },
|
||||
{ .name = "tx", .dma_req = 17 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
.pa_start = 0x49024000,
|
||||
.pa_end = 0x490240ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_per -> mcbsp3 */
|
||||
static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
|
||||
.master = &omap3xxx_l4_per_hwmod,
|
||||
.slave = &omap3xxx_mcbsp3_hwmod,
|
||||
.clk = "mcbsp3_ick",
|
||||
.addr = omap3xxx_mcbsp3_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_addrs),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* mcbsp3 slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_slaves[] = {
|
||||
&omap3xxx_l4_per__mcbsp3,
|
||||
};
|
||||
|
||||
static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
|
||||
.sidetone = "mcbsp3_sidetone",
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
|
||||
.name = "mcbsp3",
|
||||
.class = &omap3xxx_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap3xxx_mcbsp3_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_irqs),
|
||||
.sdma_reqs = omap3xxx_mcbsp3_sdma_chs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sdma_chs),
|
||||
.main_clk = "mcbsp3_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP3430_EN_MCBSP3_SHIFT,
|
||||
.module_offs = OMAP3430_PER_MOD,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap3xxx_mcbsp3_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_slaves),
|
||||
.dev_attr = &omap34xx_mcbsp3_dev_attr,
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
||||
};
|
||||
|
||||
/* mcbsp4 */
|
||||
static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
|
||||
{ .name = "irq", .irq = 23 },
|
||||
{ .name = "tx", .irq = 54 },
|
||||
{ .name = "rx", .irq = 55 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
|
||||
{ .name = "rx", .dma_req = 20 },
|
||||
{ .name = "tx", .dma_req = 19 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
.pa_start = 0x49026000,
|
||||
.pa_end = 0x490260ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_per -> mcbsp4 */
|
||||
static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
|
||||
.master = &omap3xxx_l4_per_hwmod,
|
||||
.slave = &omap3xxx_mcbsp4_hwmod,
|
||||
.clk = "mcbsp4_ick",
|
||||
.addr = omap3xxx_mcbsp4_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_addrs),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* mcbsp4 slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap3xxx_mcbsp4_slaves[] = {
|
||||
&omap3xxx_l4_per__mcbsp4,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
|
||||
.name = "mcbsp4",
|
||||
.class = &omap3xxx_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap3xxx_mcbsp4_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_irqs),
|
||||
.sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_sdma_chs),
|
||||
.main_clk = "mcbsp4_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP3430_EN_MCBSP4_SHIFT,
|
||||
.module_offs = OMAP3430_PER_MOD,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap3xxx_mcbsp4_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_slaves),
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
||||
};
|
||||
|
||||
/* mcbsp5 */
|
||||
static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
|
||||
{ .name = "irq", .irq = 27 },
|
||||
{ .name = "tx", .irq = 81 },
|
||||
{ .name = "rx", .irq = 82 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
|
||||
{ .name = "rx", .dma_req = 22 },
|
||||
{ .name = "tx", .dma_req = 21 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
.pa_start = 0x48096000,
|
||||
.pa_end = 0x480960ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_core -> mcbsp5 */
|
||||
static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
|
||||
.master = &omap3xxx_l4_core_hwmod,
|
||||
.slave = &omap3xxx_mcbsp5_hwmod,
|
||||
.clk = "mcbsp5_ick",
|
||||
.addr = omap3xxx_mcbsp5_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_addrs),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* mcbsp5 slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap3xxx_mcbsp5_slaves[] = {
|
||||
&omap3xxx_l4_core__mcbsp5,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
|
||||
.name = "mcbsp5",
|
||||
.class = &omap3xxx_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap3xxx_mcbsp5_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_irqs),
|
||||
.sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_sdma_chs),
|
||||
.main_clk = "mcbsp5_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP3430_EN_MCBSP5_SHIFT,
|
||||
.module_offs = CORE_MOD,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap3xxx_mcbsp5_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_slaves),
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
||||
};
|
||||
/* 'mcbsp sidetone' class */
|
||||
|
||||
static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
|
||||
.sysc_offs = 0x0010,
|
||||
.sysc_flags = SYSC_HAS_AUTOIDLE,
|
||||
.sysc_fields = &omap_hwmod_sysc_type1,
|
||||
};
|
||||
|
||||
static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
|
||||
.name = "mcbsp_sidetone",
|
||||
.sysc = &omap3xxx_mcbsp_sidetone_sysc,
|
||||
};
|
||||
|
||||
/* mcbsp2_sidetone */
|
||||
static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
|
||||
{ .name = "irq", .irq = 4 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
|
||||
{
|
||||
.name = "sidetone",
|
||||
.pa_start = 0x49028000,
|
||||
.pa_end = 0x490280ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_per -> mcbsp2_sidetone */
|
||||
static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
|
||||
.master = &omap3xxx_l4_per_hwmod,
|
||||
.slave = &omap3xxx_mcbsp2_sidetone_hwmod,
|
||||
.clk = "mcbsp2_ick",
|
||||
.addr = omap3xxx_mcbsp2_sidetone_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_addrs),
|
||||
.user = OCP_USER_MPU,
|
||||
};
|
||||
|
||||
/* mcbsp2_sidetone slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_sidetone_slaves[] = {
|
||||
&omap3xxx_l4_per__mcbsp2_sidetone,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
|
||||
.name = "mcbsp2_sidetone",
|
||||
.class = &omap3xxx_mcbsp_sidetone_hwmod_class,
|
||||
.mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_irqs),
|
||||
.main_clk = "mcbsp2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP3430_EN_MCBSP2_SHIFT,
|
||||
.module_offs = OMAP3430_PER_MOD,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap3xxx_mcbsp2_sidetone_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_slaves),
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
||||
};
|
||||
|
||||
/* mcbsp3_sidetone */
|
||||
static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
|
||||
{ .name = "irq", .irq = 5 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
|
||||
{
|
||||
.name = "sidetone",
|
||||
.pa_start = 0x4902A000,
|
||||
.pa_end = 0x4902A0ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_per -> mcbsp3_sidetone */
|
||||
static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
|
||||
.master = &omap3xxx_l4_per_hwmod,
|
||||
.slave = &omap3xxx_mcbsp3_sidetone_hwmod,
|
||||
.clk = "mcbsp3_ick",
|
||||
.addr = omap3xxx_mcbsp3_sidetone_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_addrs),
|
||||
.user = OCP_USER_MPU,
|
||||
};
|
||||
|
||||
/* mcbsp3_sidetone slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_sidetone_slaves[] = {
|
||||
&omap3xxx_l4_per__mcbsp3_sidetone,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
|
||||
.name = "mcbsp3_sidetone",
|
||||
.class = &omap3xxx_mcbsp_sidetone_hwmod_class,
|
||||
.mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_irqs),
|
||||
.main_clk = "mcbsp3_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP3430_EN_MCBSP3_SHIFT,
|
||||
.module_offs = OMAP3430_PER_MOD,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap3xxx_mcbsp3_sidetone_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_slaves),
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
||||
};
|
||||
|
||||
|
||||
/* SR common */
|
||||
static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
|
||||
.clkact_shift = 20,
|
||||
|
@ -2493,6 +2994,74 @@ static struct omap_hwmod omap36xx_sr2_hwmod = {
|
|||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
|
||||
};
|
||||
|
||||
/*
|
||||
* 'mailbox' class
|
||||
* mailbox module allowing communication between the on-chip processors
|
||||
* using a queued mailbox-interrupt mechanism.
|
||||
*/
|
||||
|
||||
static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
|
||||
.rev_offs = 0x000,
|
||||
.sysc_offs = 0x010,
|
||||
.syss_offs = 0x014,
|
||||
.sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
|
||||
SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
|
||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
|
||||
.sysc_fields = &omap_hwmod_sysc_type1,
|
||||
};
|
||||
|
||||
static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
|
||||
.name = "mailbox",
|
||||
.sysc = &omap3xxx_mailbox_sysc,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap3xxx_mailbox_hwmod;
|
||||
static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
|
||||
{ .irq = 26 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
|
||||
{
|
||||
.pa_start = 0x48094000,
|
||||
.pa_end = 0x480941ff,
|
||||
.flags = ADDR_TYPE_RT,
|
||||
},
|
||||
};
|
||||
|
||||
/* l4_core -> mailbox */
|
||||
static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
|
||||
.master = &omap3xxx_l4_core_hwmod,
|
||||
.slave = &omap3xxx_mailbox_hwmod,
|
||||
.addr = omap3xxx_mailbox_addrs,
|
||||
.addr_cnt = ARRAY_SIZE(omap3xxx_mailbox_addrs),
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* mailbox slave ports */
|
||||
static struct omap_hwmod_ocp_if *omap3xxx_mailbox_slaves[] = {
|
||||
&omap3xxx_l4_core__mailbox,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap3xxx_mailbox_hwmod = {
|
||||
.name = "mailbox",
|
||||
.class = &omap3xxx_mailbox_hwmod_class,
|
||||
.mpu_irqs = omap3xxx_mailbox_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mailbox_irqs),
|
||||
.main_clk = "mailboxes_ick",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
|
||||
.module_offs = CORE_MOD,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap3xxx_mailbox_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap3xxx_mailbox_slaves),
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
||||
};
|
||||
|
||||
/* l4 core -> mcspi1 interface */
|
||||
static struct omap_hwmod_addr_space omap34xx_mcspi1_addr_space[] = {
|
||||
{
|
||||
|
@ -2847,11 +3416,165 @@ static struct omap_hwmod am35xx_usbhsotg_hwmod = {
|
|||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1)
|
||||
};
|
||||
|
||||
/* MMC/SD/SDIO common */
|
||||
|
||||
static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
|
||||
.rev_offs = 0x1fc,
|
||||
.sysc_offs = 0x10,
|
||||
.syss_offs = 0x14,
|
||||
.sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
|
||||
SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
|
||||
SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
|
||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
|
||||
.sysc_fields = &omap_hwmod_sysc_type1,
|
||||
};
|
||||
|
||||
static struct omap_hwmod_class omap34xx_mmc_class = {
|
||||
.name = "mmc",
|
||||
.sysc = &omap34xx_mmc_sysc,
|
||||
};
|
||||
|
||||
/* MMC/SD/SDIO1 */
|
||||
|
||||
static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
|
||||
{ .irq = 83, },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
|
||||
{ .name = "tx", .dma_req = 61, },
|
||||
{ .name = "rx", .dma_req = 62, },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
|
||||
{ .role = "dbck", .clk = "omap_32k_fck", },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = {
|
||||
&omap3xxx_l4_core__mmc1,
|
||||
};
|
||||
|
||||
static struct omap_mmc_dev_attr mmc1_dev_attr = {
|
||||
.flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap3xxx_mmc1_hwmod = {
|
||||
.name = "mmc1",
|
||||
.mpu_irqs = omap34xx_mmc1_mpu_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc1_mpu_irqs),
|
||||
.sdma_reqs = omap34xx_mmc1_sdma_reqs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc1_sdma_reqs),
|
||||
.opt_clks = omap34xx_mmc1_opt_clks,
|
||||
.opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
|
||||
.main_clk = "mmchs1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.module_offs = CORE_MOD,
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP3430_EN_MMC1_SHIFT,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
|
||||
},
|
||||
},
|
||||
.dev_attr = &mmc1_dev_attr,
|
||||
.slaves = omap3xxx_mmc1_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
|
||||
.class = &omap34xx_mmc_class,
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
||||
};
|
||||
|
||||
/* MMC/SD/SDIO2 */
|
||||
|
||||
static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
|
||||
{ .irq = INT_24XX_MMC2_IRQ, },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
|
||||
{ .name = "tx", .dma_req = 47, },
|
||||
{ .name = "rx", .dma_req = 48, },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
|
||||
{ .role = "dbck", .clk = "omap_32k_fck", },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = {
|
||||
&omap3xxx_l4_core__mmc2,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap3xxx_mmc2_hwmod = {
|
||||
.name = "mmc2",
|
||||
.mpu_irqs = omap34xx_mmc2_mpu_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc2_mpu_irqs),
|
||||
.sdma_reqs = omap34xx_mmc2_sdma_reqs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc2_sdma_reqs),
|
||||
.opt_clks = omap34xx_mmc2_opt_clks,
|
||||
.opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
|
||||
.main_clk = "mmchs2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.module_offs = CORE_MOD,
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP3430_EN_MMC2_SHIFT,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap3xxx_mmc2_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
|
||||
.class = &omap34xx_mmc_class,
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
||||
};
|
||||
|
||||
/* MMC/SD/SDIO3 */
|
||||
|
||||
static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
|
||||
{ .irq = 94, },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
|
||||
{ .name = "tx", .dma_req = 77, },
|
||||
{ .name = "rx", .dma_req = 78, },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
|
||||
{ .role = "dbck", .clk = "omap_32k_fck", },
|
||||
};
|
||||
|
||||
static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = {
|
||||
&omap3xxx_l4_core__mmc3,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap3xxx_mmc3_hwmod = {
|
||||
.name = "mmc3",
|
||||
.mpu_irqs = omap34xx_mmc3_mpu_irqs,
|
||||
.mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc3_mpu_irqs),
|
||||
.sdma_reqs = omap34xx_mmc3_sdma_reqs,
|
||||
.sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc3_sdma_reqs),
|
||||
.opt_clks = omap34xx_mmc3_opt_clks,
|
||||
.opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
|
||||
.main_clk = "mmchs3_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
.module_bit = OMAP3430_EN_MMC3_SHIFT,
|
||||
.idlest_reg_id = 1,
|
||||
.idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
|
||||
},
|
||||
},
|
||||
.slaves = omap3xxx_mmc3_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap3xxx_mmc3_slaves),
|
||||
.class = &omap34xx_mmc_class,
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
||||
};
|
||||
|
||||
static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
|
||||
&omap3xxx_l3_main_hwmod,
|
||||
&omap3xxx_l4_core_hwmod,
|
||||
&omap3xxx_l4_per_hwmod,
|
||||
&omap3xxx_l4_wkup_hwmod,
|
||||
&omap3xxx_mmc1_hwmod,
|
||||
&omap3xxx_mmc2_hwmod,
|
||||
&omap3xxx_mmc3_hwmod,
|
||||
&omap3xxx_mpu_hwmod,
|
||||
&omap3xxx_iva_hwmod,
|
||||
|
||||
|
@ -2902,6 +3625,18 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
|
|||
/* dma_system class*/
|
||||
&omap3xxx_dma_system_hwmod,
|
||||
|
||||
/* mcbsp class */
|
||||
&omap3xxx_mcbsp1_hwmod,
|
||||
&omap3xxx_mcbsp2_hwmod,
|
||||
&omap3xxx_mcbsp3_hwmod,
|
||||
&omap3xxx_mcbsp4_hwmod,
|
||||
&omap3xxx_mcbsp5_hwmod,
|
||||
&omap3xxx_mcbsp2_sidetone_hwmod,
|
||||
&omap3xxx_mcbsp3_sidetone_hwmod,
|
||||
|
||||
/* mailbox class */
|
||||
&omap3xxx_mailbox_hwmod,
|
||||
|
||||
/* mcspi class */
|
||||
&omap34xx_mcspi1,
|
||||
&omap34xx_mcspi2,
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#include <plat/gpio.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/mcspi.h>
|
||||
#include <plat/mcbsp.h>
|
||||
#include <plat/mmc.h>
|
||||
|
||||
#include "omap_hwmod_common_data.h"
|
||||
|
||||
|
@ -2737,6 +2739,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_mcbsp_sysc = {
|
|||
static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = {
|
||||
.name = "mcbsp",
|
||||
.sysc = &omap44xx_mcbsp_sysc,
|
||||
.rev = MCBSP_CONFIG_TYPE4,
|
||||
};
|
||||
|
||||
/* mcbsp1 */
|
||||
|
@ -2752,6 +2755,7 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = {
|
|||
|
||||
static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
.pa_start = 0x40122000,
|
||||
.pa_end = 0x401220ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
|
@ -2770,6 +2774,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
|
|||
|
||||
static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
|
||||
{
|
||||
.name = "dma",
|
||||
.pa_start = 0x49022000,
|
||||
.pa_end = 0x490220ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
|
@ -2823,6 +2828,7 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = {
|
|||
|
||||
static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
.pa_start = 0x40124000,
|
||||
.pa_end = 0x401240ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
|
@ -2841,6 +2847,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
|
|||
|
||||
static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
|
||||
{
|
||||
.name = "dma",
|
||||
.pa_start = 0x49024000,
|
||||
.pa_end = 0x490240ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
|
@ -2894,6 +2901,7 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = {
|
|||
|
||||
static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
.pa_start = 0x40126000,
|
||||
.pa_end = 0x401260ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
|
@ -2912,6 +2920,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
|
|||
|
||||
static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
|
||||
{
|
||||
.name = "dma",
|
||||
.pa_start = 0x49026000,
|
||||
.pa_end = 0x490260ff,
|
||||
.flags = ADDR_TYPE_RT
|
||||
|
@ -3383,6 +3392,7 @@ static struct omap_hwmod_class omap44xx_mmc_hwmod_class = {
|
|||
};
|
||||
|
||||
/* mmc1 */
|
||||
|
||||
static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = {
|
||||
{ .irq = 83 + OMAP44XX_IRQ_GIC_START },
|
||||
};
|
||||
|
@ -3420,6 +3430,11 @@ static struct omap_hwmod_ocp_if *omap44xx_mmc1_slaves[] = {
|
|||
&omap44xx_l4_per__mmc1,
|
||||
};
|
||||
|
||||
/* mmc1 dev_attr */
|
||||
static struct omap_mmc_dev_attr mmc1_dev_attr = {
|
||||
.flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap44xx_mmc1_hwmod = {
|
||||
.name = "mmc1",
|
||||
.class = &omap44xx_mmc_hwmod_class,
|
||||
|
@ -3433,6 +3448,7 @@ static struct omap_hwmod omap44xx_mmc1_hwmod = {
|
|||
.clkctrl_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL,
|
||||
},
|
||||
},
|
||||
.dev_attr = &mmc1_dev_attr,
|
||||
.slaves = omap44xx_mmc1_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap44xx_mmc1_slaves),
|
||||
.masters = omap44xx_mmc1_masters,
|
||||
|
@ -5077,11 +5093,11 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
|
|||
&omap44xx_mcspi4_hwmod,
|
||||
|
||||
/* mmc class */
|
||||
/* &omap44xx_mmc1_hwmod, */
|
||||
/* &omap44xx_mmc2_hwmod, */
|
||||
/* &omap44xx_mmc3_hwmod, */
|
||||
/* &omap44xx_mmc4_hwmod, */
|
||||
/* &omap44xx_mmc5_hwmod, */
|
||||
&omap44xx_mmc1_hwmod,
|
||||
&omap44xx_mmc2_hwmod,
|
||||
&omap44xx_mmc3_hwmod,
|
||||
&omap44xx_mmc4_hwmod,
|
||||
&omap44xx_mmc5_hwmod,
|
||||
|
||||
/* mpu class */
|
||||
&omap44xx_mpu_hwmod,
|
||||
|
|
|
@ -121,6 +121,10 @@
|
|||
#define OMAP24XX_ST_MCSPI2_MASK (1 << 18)
|
||||
#define OMAP24XX_ST_MCSPI1_SHIFT 17
|
||||
#define OMAP24XX_ST_MCSPI1_MASK (1 << 17)
|
||||
#define OMAP24XX_ST_MCBSP2_SHIFT 16
|
||||
#define OMAP24XX_ST_MCBSP2_MASK (1 << 16)
|
||||
#define OMAP24XX_ST_MCBSP1_SHIFT 15
|
||||
#define OMAP24XX_ST_MCBSP1_MASK (1 << 15)
|
||||
#define OMAP24XX_ST_GPT12_SHIFT 14
|
||||
#define OMAP24XX_ST_GPT12_MASK (1 << 14)
|
||||
#define OMAP24XX_ST_GPT11_SHIFT 13
|
||||
|
@ -191,6 +195,8 @@
|
|||
#define OMAP3430_AUTOIDLE_MASK (1 << 0)
|
||||
|
||||
/* CM_FCLKEN1_CORE, CM_ICLKEN1_CORE, PM_WKEN1_CORE shared bits */
|
||||
#define OMAP3430_EN_MMC3_MASK (1 << 30)
|
||||
#define OMAP3430_EN_MMC3_SHIFT 30
|
||||
#define OMAP3430_EN_MMC2_MASK (1 << 25)
|
||||
#define OMAP3430_EN_MMC2_SHIFT 25
|
||||
#define OMAP3430_EN_MMC1_MASK (1 << 24)
|
||||
|
@ -231,6 +237,8 @@
|
|||
#define OMAP3430_EN_HSOTGUSB_SHIFT 4
|
||||
|
||||
/* PM_WKST1_CORE, CM_IDLEST1_CORE shared bits */
|
||||
#define OMAP3430_ST_MMC3_SHIFT 30
|
||||
#define OMAP3430_ST_MMC3_MASK (1 << 30)
|
||||
#define OMAP3430_ST_MMC2_SHIFT 25
|
||||
#define OMAP3430_ST_MMC2_MASK (1 << 25)
|
||||
#define OMAP3430_ST_MMC1_SHIFT 24
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
|
||||
static struct platform_device **omap_mcbsp_devices;
|
||||
|
||||
void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
|
||||
int size)
|
||||
void omap_mcbsp_register_board_cfg(struct resource *res, int res_count,
|
||||
struct omap_mcbsp_platform_data *config, int size)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -54,6 +54,8 @@ void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
|
|||
new_mcbsp = platform_device_alloc("omap-mcbsp", i + 1);
|
||||
if (!new_mcbsp)
|
||||
continue;
|
||||
platform_device_add_resources(new_mcbsp, &res[i * res_count],
|
||||
res_count);
|
||||
new_mcbsp->dev.platform_data = &config[i];
|
||||
ret = platform_device_add(new_mcbsp);
|
||||
if (ret) {
|
||||
|
@ -65,8 +67,8 @@ void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
|
|||
}
|
||||
|
||||
#else
|
||||
void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
|
||||
int size)
|
||||
void omap_mcbsp_register_board_cfg(struct resource *res, int res_count,
|
||||
struct omap_mcbsp_platform_data *config, int size)
|
||||
{ }
|
||||
#endif
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ struct iommu {
|
|||
struct clk *clk;
|
||||
void __iomem *regbase;
|
||||
struct device *dev;
|
||||
void *isr_priv;
|
||||
|
||||
unsigned int refcount;
|
||||
struct mutex iommu_lock; /* global for this whole object */
|
||||
|
@ -47,7 +48,7 @@ struct iommu {
|
|||
struct list_head mmap;
|
||||
struct mutex mmap_lock; /* protect mmap */
|
||||
|
||||
int (*isr)(struct iommu *obj);
|
||||
int (*isr)(struct iommu *obj, u32 da, u32 iommu_errs, void *priv);
|
||||
|
||||
void *ctx; /* iommu context: registres saved area */
|
||||
u32 da_start;
|
||||
|
@ -109,6 +110,13 @@ struct iommu_platform_data {
|
|||
u32 da_end;
|
||||
};
|
||||
|
||||
/* IOMMU errors */
|
||||
#define OMAP_IOMMU_ERR_TLB_MISS (1 << 0)
|
||||
#define OMAP_IOMMU_ERR_TRANS_FAULT (1 << 1)
|
||||
#define OMAP_IOMMU_ERR_EMU_MISS (1 << 2)
|
||||
#define OMAP_IOMMU_ERR_TBLWALK_FAULT (1 << 3)
|
||||
#define OMAP_IOMMU_ERR_MULTIHIT_FAULT (1 << 4)
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP1)
|
||||
#error "iommu for this processor not implemented yet"
|
||||
#else
|
||||
|
@ -161,6 +169,10 @@ extern size_t iopgtable_clear_entry(struct iommu *obj, u32 iova);
|
|||
extern int iommu_set_da_range(struct iommu *obj, u32 start, u32 end);
|
||||
extern struct iommu *iommu_get(const char *name);
|
||||
extern void iommu_put(struct iommu *obj);
|
||||
extern int iommu_set_isr(const char *name,
|
||||
int (*isr)(struct iommu *obj, u32 da, u32 iommu_errs,
|
||||
void *priv),
|
||||
void *isr_priv);
|
||||
|
||||
extern void iommu_save_ctx(struct iommu *obj);
|
||||
extern void iommu_restore_ctx(struct iommu *obj);
|
||||
|
|
|
@ -37,6 +37,10 @@ static struct platform_device omap_mcbsp##port_nr = { \
|
|||
.id = OMAP_MCBSP##port_nr, \
|
||||
}
|
||||
|
||||
#define MCBSP_CONFIG_TYPE2 0x2
|
||||
#define MCBSP_CONFIG_TYPE3 0x3
|
||||
#define MCBSP_CONFIG_TYPE4 0x4
|
||||
|
||||
#define OMAP7XX_MCBSP1_BASE 0xfffb1000
|
||||
#define OMAP7XX_MCBSP2_BASE 0xfffb1800
|
||||
|
||||
|
@ -48,32 +52,14 @@ static struct platform_device omap_mcbsp##port_nr = { \
|
|||
#define OMAP1610_MCBSP2_BASE 0xfffb1000
|
||||
#define OMAP1610_MCBSP3_BASE 0xe1017000
|
||||
|
||||
#define OMAP24XX_MCBSP1_BASE 0x48074000
|
||||
#define OMAP24XX_MCBSP2_BASE 0x48076000
|
||||
#define OMAP2430_MCBSP3_BASE 0x4808c000
|
||||
#define OMAP2430_MCBSP4_BASE 0x4808e000
|
||||
#define OMAP2430_MCBSP5_BASE 0x48096000
|
||||
|
||||
#define OMAP34XX_MCBSP1_BASE 0x48074000
|
||||
#define OMAP34XX_MCBSP2_BASE 0x49022000
|
||||
#define OMAP34XX_MCBSP2_ST_BASE 0x49028000
|
||||
#define OMAP34XX_MCBSP3_BASE 0x49024000
|
||||
#define OMAP34XX_MCBSP3_ST_BASE 0x4902A000
|
||||
#define OMAP34XX_MCBSP3_BASE 0x49024000
|
||||
#define OMAP34XX_MCBSP4_BASE 0x49026000
|
||||
#define OMAP34XX_MCBSP5_BASE 0x48096000
|
||||
|
||||
#define OMAP44XX_MCBSP1_BASE 0x49022000
|
||||
#define OMAP44XX_MCBSP2_BASE 0x49024000
|
||||
#define OMAP44XX_MCBSP3_BASE 0x49026000
|
||||
#define OMAP44XX_MCBSP4_BASE 0x48096000
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
|
||||
#ifdef CONFIG_ARCH_OMAP1
|
||||
|
||||
#define OMAP_MCBSP_REG_DRR2 0x00
|
||||
#define OMAP_MCBSP_REG_DRR1 0x02
|
||||
#define OMAP_MCBSP_REG_DXR2 0x04
|
||||
#define OMAP_MCBSP_REG_DXR1 0x06
|
||||
#define OMAP_MCBSP_REG_DRR 0x02
|
||||
#define OMAP_MCBSP_REG_DXR 0x06
|
||||
#define OMAP_MCBSP_REG_SPCR2 0x08
|
||||
#define OMAP_MCBSP_REG_SPCR1 0x0a
|
||||
#define OMAP_MCBSP_REG_RCR2 0x0c
|
||||
|
@ -414,8 +400,9 @@ struct omap_mcbsp_platform_data {
|
|||
#ifdef CONFIG_ARCH_OMAP3
|
||||
/* Sidetone block for McBSP 2 and 3 */
|
||||
unsigned long phys_base_st;
|
||||
u16 buffer_size;
|
||||
#endif
|
||||
u16 buffer_size;
|
||||
unsigned int mcbsp_config_type;
|
||||
};
|
||||
|
||||
struct omap_mcbsp_st_data {
|
||||
|
@ -431,6 +418,7 @@ struct omap_mcbsp_st_data {
|
|||
struct omap_mcbsp {
|
||||
struct device *dev;
|
||||
unsigned long phys_base;
|
||||
unsigned long phys_dma_base;
|
||||
void __iomem *io_base;
|
||||
u8 id;
|
||||
u8 free;
|
||||
|
@ -457,7 +445,6 @@ struct omap_mcbsp {
|
|||
/* Protect the field .free, while checking if the mcbsp is in use */
|
||||
spinlock_t lock;
|
||||
struct omap_mcbsp_platform_data *pdata;
|
||||
struct clk *iclk;
|
||||
struct clk *fclk;
|
||||
#ifdef CONFIG_ARCH_OMAP3
|
||||
struct omap_mcbsp_st_data *st_data;
|
||||
|
@ -466,7 +453,17 @@ struct omap_mcbsp {
|
|||
u16 max_rx_thres;
|
||||
#endif
|
||||
void *reg_cache;
|
||||
unsigned int mcbsp_config_type;
|
||||
};
|
||||
|
||||
/**
|
||||
* omap_mcbsp_dev_attr - OMAP McBSP device attributes for omap_hwmod
|
||||
* @sidetone: name of the sidetone device
|
||||
*/
|
||||
struct omap_mcbsp_dev_attr {
|
||||
const char *sidetone;
|
||||
};
|
||||
|
||||
extern struct omap_mcbsp **mcbsp_ptr;
|
||||
extern int omap_mcbsp_count, omap_mcbsp_cache_size;
|
||||
|
||||
|
@ -474,8 +471,8 @@ extern int omap_mcbsp_count, omap_mcbsp_cache_size;
|
|||
#define id_to_mcbsp_ptr(id) mcbsp_ptr[id];
|
||||
|
||||
int omap_mcbsp_init(void);
|
||||
void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
|
||||
int size);
|
||||
void omap_mcbsp_register_board_cfg(struct resource *res, int res_count,
|
||||
struct omap_mcbsp_platform_data *config, int size);
|
||||
void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg * config);
|
||||
#ifdef CONFIG_ARCH_OMAP3
|
||||
void omap_mcbsp_set_tx_threshold(unsigned int id, u16 threshold);
|
||||
|
@ -525,6 +522,9 @@ int omap_mcbsp_set_io_type(unsigned int id, omap_mcbsp_io_type_t io_type);
|
|||
void omap2_mcbsp1_mux_clkr_src(u8 mux);
|
||||
void omap2_mcbsp1_mux_fsr_src(u8 mux);
|
||||
|
||||
int omap_mcbsp_dma_ch_params(unsigned int id, unsigned int stream);
|
||||
int omap_mcbsp_dma_reg_params(unsigned int id, unsigned int stream);
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP3
|
||||
/* Sidetone specific API */
|
||||
int omap_st_set_chgain(unsigned int id, int channel, s16 chgain);
|
||||
|
|
|
@ -24,25 +24,19 @@
|
|||
#define OMAP1_MMC2_BASE 0xfffb7c00 /* omap16xx only */
|
||||
|
||||
#define OMAP24XX_NR_MMC 2
|
||||
#define OMAP34XX_NR_MMC 3
|
||||
#define OMAP44XX_NR_MMC 5
|
||||
#define OMAP2420_MMC_SIZE OMAP1_MMC_SIZE
|
||||
#define OMAP3_HSMMC_SIZE 0x200
|
||||
#define OMAP4_HSMMC_SIZE 0x1000
|
||||
#define OMAP2_MMC1_BASE 0x4809c000
|
||||
#define OMAP2_MMC2_BASE 0x480b4000
|
||||
#define OMAP3_MMC3_BASE 0x480ad000
|
||||
#define OMAP4_MMC4_BASE 0x480d1000
|
||||
#define OMAP4_MMC5_BASE 0x480d5000
|
||||
|
||||
#define OMAP4_MMC_REG_OFFSET 0x100
|
||||
#define HSMMC5 (1 << 4)
|
||||
#define HSMMC4 (1 << 3)
|
||||
#define HSMMC3 (1 << 2)
|
||||
#define HSMMC2 (1 << 1)
|
||||
#define HSMMC1 (1 << 0)
|
||||
|
||||
#define OMAP_MMC_MAX_SLOTS 2
|
||||
|
||||
#define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(1)
|
||||
|
||||
struct omap_mmc_dev_attr {
|
||||
u8 flags;
|
||||
};
|
||||
|
||||
struct omap_mmc_platform_data {
|
||||
/* back-link to device */
|
||||
struct device *dev;
|
||||
|
@ -71,6 +65,9 @@ struct omap_mmc_platform_data {
|
|||
|
||||
u64 dma_mask;
|
||||
|
||||
/* Integrating attributes from the omap_hwmod layer */
|
||||
u8 controller_flags;
|
||||
|
||||
/* Register offset deviation */
|
||||
u16 reg_offset;
|
||||
|
||||
|
@ -159,8 +156,7 @@ extern void omap_mmc_notify_cover_event(struct device *dev, int slot,
|
|||
defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
|
||||
void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
|
||||
int nr_controllers);
|
||||
void omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
|
||||
int nr_controllers);
|
||||
void omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data);
|
||||
int omap_mmc_add(const char *name, int id, unsigned long base,
|
||||
unsigned long size, unsigned int irq,
|
||||
struct omap_mmc_platform_data *data);
|
||||
|
@ -169,8 +165,7 @@ static inline void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
|
|||
int nr_controllers)
|
||||
{
|
||||
}
|
||||
static inline void omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
|
||||
int nr_controllers)
|
||||
static inline void omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data)
|
||||
{
|
||||
}
|
||||
static inline int omap_mmc_add(const char *name, int id, unsigned long base,
|
||||
|
|
|
@ -179,7 +179,8 @@ struct omap_hwmod_omap2_firewall {
|
|||
#define ADDR_TYPE_RT (1 << 1)
|
||||
|
||||
/**
|
||||
* struct omap_hwmod_addr_space - MPU address space handled by the hwmod
|
||||
* struct omap_hwmod_addr_space - address space handled by the hwmod
|
||||
* @name: name of the address space
|
||||
* @pa_start: starting physical address
|
||||
* @pa_end: ending physical address
|
||||
* @flags: (see omap_hwmod_addr_space.flags macros above)
|
||||
|
@ -188,6 +189,7 @@ struct omap_hwmod_omap2_firewall {
|
|||
* structure. GPMC is one example.
|
||||
*/
|
||||
struct omap_hwmod_addr_space {
|
||||
const char *name;
|
||||
u32 pa_start;
|
||||
u32 pa_end;
|
||||
u8 flags;
|
||||
|
|
|
@ -104,6 +104,9 @@ static int iommu_enable(struct iommu *obj)
|
|||
if (!obj)
|
||||
return -EINVAL;
|
||||
|
||||
if (!arch_iommu)
|
||||
return -ENODEV;
|
||||
|
||||
clk_enable(obj->clk);
|
||||
|
||||
err = arch_iommu->enable(obj);
|
||||
|
@ -780,25 +783,19 @@ static void iopgtable_clear_entry_all(struct iommu *obj)
|
|||
*/
|
||||
static irqreturn_t iommu_fault_handler(int irq, void *data)
|
||||
{
|
||||
u32 stat, da;
|
||||
u32 da, errs;
|
||||
u32 *iopgd, *iopte;
|
||||
int err = -EIO;
|
||||
struct iommu *obj = data;
|
||||
|
||||
if (!obj->refcount)
|
||||
return IRQ_NONE;
|
||||
|
||||
/* Dynamic loading TLB or PTE */
|
||||
if (obj->isr)
|
||||
err = obj->isr(obj);
|
||||
|
||||
if (!err)
|
||||
return IRQ_HANDLED;
|
||||
|
||||
clk_enable(obj->clk);
|
||||
stat = iommu_report_fault(obj, &da);
|
||||
errs = iommu_report_fault(obj, &da);
|
||||
clk_disable(obj->clk);
|
||||
if (!stat)
|
||||
|
||||
/* Fault callback or TLB/PTE Dynamic loading */
|
||||
if (obj->isr && !obj->isr(obj, da, errs, obj->isr_priv))
|
||||
return IRQ_HANDLED;
|
||||
|
||||
iommu_disable(obj);
|
||||
|
@ -806,15 +803,16 @@ static irqreturn_t iommu_fault_handler(int irq, void *data)
|
|||
iopgd = iopgd_offset(obj, da);
|
||||
|
||||
if (!iopgd_is_table(*iopgd)) {
|
||||
dev_err(obj->dev, "%s: da:%08x pgd:%p *pgd:%08x\n", __func__,
|
||||
da, iopgd, *iopgd);
|
||||
dev_err(obj->dev, "%s: errs:0x%08x da:0x%08x pgd:0x%p "
|
||||
"*pgd:px%08x\n", obj->name, errs, da, iopgd, *iopgd);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
iopte = iopte_offset(iopgd, da);
|
||||
|
||||
dev_err(obj->dev, "%s: da:%08x pgd:%p *pgd:%08x pte:%p *pte:%08x\n",
|
||||
__func__, da, iopgd, *iopgd, iopte, *iopte);
|
||||
dev_err(obj->dev, "%s: errs:0x%08x da:0x%08x pgd:0x%p *pgd:0x%08x "
|
||||
"pte:0x%p *pte:0x%08x\n", obj->name, errs, da, iopgd, *iopgd,
|
||||
iopte, *iopte);
|
||||
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
@ -917,6 +915,33 @@ void iommu_put(struct iommu *obj)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(iommu_put);
|
||||
|
||||
int iommu_set_isr(const char *name,
|
||||
int (*isr)(struct iommu *obj, u32 da, u32 iommu_errs,
|
||||
void *priv),
|
||||
void *isr_priv)
|
||||
{
|
||||
struct device *dev;
|
||||
struct iommu *obj;
|
||||
|
||||
dev = driver_find_device(&omap_iommu_driver.driver, NULL, (void *)name,
|
||||
device_match_by_alias);
|
||||
if (!dev)
|
||||
return -ENODEV;
|
||||
|
||||
obj = to_iommu(dev);
|
||||
mutex_lock(&obj->iommu_lock);
|
||||
if (obj->refcount != 0) {
|
||||
mutex_unlock(&obj->iommu_lock);
|
||||
return -EBUSY;
|
||||
}
|
||||
obj->isr = isr;
|
||||
obj->isr_priv = isr_priv;
|
||||
mutex_unlock(&obj->iommu_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(iommu_set_isr);
|
||||
|
||||
/*
|
||||
* OMAP Device MMU(IOMMU) detection
|
||||
*/
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
|
||||
#include <plat/dma.h>
|
||||
#include <plat/mcbsp.h>
|
||||
#include <plat/omap_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
|
||||
/* XXX These "sideways" includes are a sign that something is wrong */
|
||||
#include "../mach-omap2/cm2xxx_3xxx.h"
|
||||
|
@ -227,10 +229,83 @@ void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg *config)
|
|||
}
|
||||
EXPORT_SYMBOL(omap_mcbsp_config);
|
||||
|
||||
/**
|
||||
* omap_mcbsp_dma_params - returns the dma channel number
|
||||
* @id - mcbsp id
|
||||
* @stream - indicates the direction of data flow (rx or tx)
|
||||
*
|
||||
* Returns the dma channel number for the rx channel or tx channel
|
||||
* based on the value of @stream for the requested mcbsp given by @id
|
||||
*/
|
||||
int omap_mcbsp_dma_ch_params(unsigned int id, unsigned int stream)
|
||||
{
|
||||
struct omap_mcbsp *mcbsp;
|
||||
|
||||
if (!omap_mcbsp_check_valid_id(id)) {
|
||||
printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
|
||||
return -ENODEV;
|
||||
}
|
||||
mcbsp = id_to_mcbsp_ptr(id);
|
||||
|
||||
if (stream)
|
||||
return mcbsp->dma_rx_sync;
|
||||
else
|
||||
return mcbsp->dma_tx_sync;
|
||||
}
|
||||
EXPORT_SYMBOL(omap_mcbsp_dma_ch_params);
|
||||
|
||||
/**
|
||||
* omap_mcbsp_dma_reg_params - returns the address of mcbsp data register
|
||||
* @id - mcbsp id
|
||||
* @stream - indicates the direction of data flow (rx or tx)
|
||||
*
|
||||
* Returns the address of mcbsp data transmit register or data receive register
|
||||
* to be used by DMA for transferring/receiving data based on the value of
|
||||
* @stream for the requested mcbsp given by @id
|
||||
*/
|
||||
int omap_mcbsp_dma_reg_params(unsigned int id, unsigned int stream)
|
||||
{
|
||||
struct omap_mcbsp *mcbsp;
|
||||
int data_reg;
|
||||
|
||||
if (!omap_mcbsp_check_valid_id(id)) {
|
||||
printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
|
||||
return -ENODEV;
|
||||
}
|
||||
mcbsp = id_to_mcbsp_ptr(id);
|
||||
|
||||
data_reg = mcbsp->phys_dma_base;
|
||||
|
||||
if (mcbsp->mcbsp_config_type < MCBSP_CONFIG_TYPE2) {
|
||||
if (stream)
|
||||
data_reg += OMAP_MCBSP_REG_DRR1;
|
||||
else
|
||||
data_reg += OMAP_MCBSP_REG_DXR1;
|
||||
} else {
|
||||
if (stream)
|
||||
data_reg += OMAP_MCBSP_REG_DRR;
|
||||
else
|
||||
data_reg += OMAP_MCBSP_REG_DXR;
|
||||
}
|
||||
|
||||
return data_reg;
|
||||
}
|
||||
EXPORT_SYMBOL(omap_mcbsp_dma_reg_params);
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP3
|
||||
static struct omap_device *find_omap_device_by_dev(struct device *dev)
|
||||
{
|
||||
struct platform_device *pdev = container_of(dev,
|
||||
struct platform_device, dev);
|
||||
return container_of(pdev, struct omap_device, pdev);
|
||||
}
|
||||
|
||||
static void omap_st_on(struct omap_mcbsp *mcbsp)
|
||||
{
|
||||
unsigned int w;
|
||||
struct omap_device *od;
|
||||
|
||||
od = find_omap_device_by_dev(mcbsp->dev);
|
||||
|
||||
/*
|
||||
* Sidetone uses McBSP ICLK - which must not idle when sidetones
|
||||
|
@ -244,9 +319,6 @@ static void omap_st_on(struct omap_mcbsp *mcbsp)
|
|||
w = MCBSP_READ(mcbsp, SSELCR);
|
||||
MCBSP_WRITE(mcbsp, SSELCR, w | SIDETONEEN);
|
||||
|
||||
w = MCBSP_ST_READ(mcbsp, SYSCONFIG);
|
||||
MCBSP_ST_WRITE(mcbsp, SYSCONFIG, w & ~(ST_AUTOIDLE));
|
||||
|
||||
/* Enable Sidetone from Sidetone Core */
|
||||
w = MCBSP_ST_READ(mcbsp, SSELCR);
|
||||
MCBSP_ST_WRITE(mcbsp, SSELCR, w | ST_SIDETONEEN);
|
||||
|
@ -255,13 +327,13 @@ static void omap_st_on(struct omap_mcbsp *mcbsp)
|
|||
static void omap_st_off(struct omap_mcbsp *mcbsp)
|
||||
{
|
||||
unsigned int w;
|
||||
struct omap_device *od;
|
||||
|
||||
od = find_omap_device_by_dev(mcbsp->dev);
|
||||
|
||||
w = MCBSP_ST_READ(mcbsp, SSELCR);
|
||||
MCBSP_ST_WRITE(mcbsp, SSELCR, w & ~(ST_SIDETONEEN));
|
||||
|
||||
w = MCBSP_ST_READ(mcbsp, SYSCONFIG);
|
||||
MCBSP_ST_WRITE(mcbsp, SYSCONFIG, w | ST_AUTOIDLE);
|
||||
|
||||
w = MCBSP_READ(mcbsp, SSELCR);
|
||||
MCBSP_WRITE(mcbsp, SSELCR, w & ~(SIDETONEEN));
|
||||
|
||||
|
@ -273,9 +345,9 @@ static void omap_st_off(struct omap_mcbsp *mcbsp)
|
|||
static void omap_st_fir_write(struct omap_mcbsp *mcbsp, s16 *fir)
|
||||
{
|
||||
u16 val, i;
|
||||
struct omap_device *od;
|
||||
|
||||
val = MCBSP_ST_READ(mcbsp, SYSCONFIG);
|
||||
MCBSP_ST_WRITE(mcbsp, SYSCONFIG, val & ~(ST_AUTOIDLE));
|
||||
od = find_omap_device_by_dev(mcbsp->dev);
|
||||
|
||||
val = MCBSP_ST_READ(mcbsp, SSELCR);
|
||||
|
||||
|
@ -303,9 +375,9 @@ static void omap_st_chgain(struct omap_mcbsp *mcbsp)
|
|||
{
|
||||
u16 w;
|
||||
struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
|
||||
struct omap_device *od;
|
||||
|
||||
w = MCBSP_ST_READ(mcbsp, SYSCONFIG);
|
||||
MCBSP_ST_WRITE(mcbsp, SYSCONFIG, w & ~(ST_AUTOIDLE));
|
||||
od = find_omap_device_by_dev(mcbsp->dev);
|
||||
|
||||
w = MCBSP_ST_READ(mcbsp, SSELCR);
|
||||
|
||||
|
@ -648,48 +720,33 @@ EXPORT_SYMBOL(omap_mcbsp_get_dma_op_mode);
|
|||
|
||||
static inline void omap34xx_mcbsp_request(struct omap_mcbsp *mcbsp)
|
||||
{
|
||||
struct omap_device *od;
|
||||
|
||||
od = find_omap_device_by_dev(mcbsp->dev);
|
||||
/*
|
||||
* Enable wakup behavior, smart idle and all wakeups
|
||||
* REVISIT: some wakeups may be unnecessary
|
||||
*/
|
||||
if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
|
||||
u16 syscon;
|
||||
|
||||
syscon = MCBSP_READ(mcbsp, SYSCON);
|
||||
syscon &= ~(ENAWAKEUP | SIDLEMODE(0x03) | CLOCKACTIVITY(0x03));
|
||||
|
||||
if (mcbsp->dma_op_mode == MCBSP_DMA_MODE_THRESHOLD) {
|
||||
syscon |= (ENAWAKEUP | SIDLEMODE(0x02) |
|
||||
CLOCKACTIVITY(0x02));
|
||||
MCBSP_WRITE(mcbsp, WAKEUPEN, XRDYEN | RRDYEN);
|
||||
} else {
|
||||
syscon |= SIDLEMODE(0x01);
|
||||
}
|
||||
|
||||
MCBSP_WRITE(mcbsp, SYSCON, syscon);
|
||||
MCBSP_WRITE(mcbsp, WAKEUPEN, XRDYEN | RRDYEN);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void omap34xx_mcbsp_free(struct omap_mcbsp *mcbsp)
|
||||
{
|
||||
struct omap_device *od;
|
||||
|
||||
od = find_omap_device_by_dev(mcbsp->dev);
|
||||
|
||||
/*
|
||||
* Disable wakup behavior, smart idle and all wakeups
|
||||
*/
|
||||
if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
|
||||
u16 syscon;
|
||||
|
||||
syscon = MCBSP_READ(mcbsp, SYSCON);
|
||||
syscon &= ~(ENAWAKEUP | SIDLEMODE(0x03) | CLOCKACTIVITY(0x03));
|
||||
/*
|
||||
* HW bug workaround - If no_idle mode is taken, we need to
|
||||
* go to smart_idle before going to always_idle, or the
|
||||
* device will not hit retention anymore.
|
||||
*/
|
||||
syscon |= SIDLEMODE(0x02);
|
||||
MCBSP_WRITE(mcbsp, SYSCON, syscon);
|
||||
|
||||
syscon &= ~(SIDLEMODE(0x03));
|
||||
MCBSP_WRITE(mcbsp, SYSCON, syscon);
|
||||
|
||||
MCBSP_WRITE(mcbsp, WAKEUPEN, 0);
|
||||
}
|
||||
|
@ -764,8 +821,7 @@ int omap_mcbsp_request(unsigned int id)
|
|||
if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->request)
|
||||
mcbsp->pdata->ops->request(id);
|
||||
|
||||
clk_enable(mcbsp->iclk);
|
||||
clk_enable(mcbsp->fclk);
|
||||
pm_runtime_get_sync(mcbsp->dev);
|
||||
|
||||
/* Do procedure specific to omap34xx arch, if applicable */
|
||||
omap34xx_mcbsp_request(mcbsp);
|
||||
|
@ -813,8 +869,7 @@ int omap_mcbsp_request(unsigned int id)
|
|||
/* Do procedure specific to omap34xx arch, if applicable */
|
||||
omap34xx_mcbsp_free(mcbsp);
|
||||
|
||||
clk_disable(mcbsp->fclk);
|
||||
clk_disable(mcbsp->iclk);
|
||||
pm_runtime_put_sync(mcbsp->dev);
|
||||
|
||||
spin_lock(&mcbsp->lock);
|
||||
mcbsp->free = true;
|
||||
|
@ -844,8 +899,7 @@ void omap_mcbsp_free(unsigned int id)
|
|||
/* Do procedure specific to omap34xx arch, if applicable */
|
||||
omap34xx_mcbsp_free(mcbsp);
|
||||
|
||||
clk_disable(mcbsp->fclk);
|
||||
clk_disable(mcbsp->iclk);
|
||||
pm_runtime_put_sync(mcbsp->dev);
|
||||
|
||||
if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) {
|
||||
/* Free IRQs */
|
||||
|
@ -1649,7 +1703,8 @@ static const struct attribute_group sidetone_attr_group = {
|
|||
|
||||
static int __devinit omap_st_add(struct omap_mcbsp *mcbsp)
|
||||
{
|
||||
struct omap_mcbsp_platform_data *pdata = mcbsp->pdata;
|
||||
struct platform_device *pdev;
|
||||
struct resource *res;
|
||||
struct omap_mcbsp_st_data *st_data;
|
||||
int err;
|
||||
|
||||
|
@ -1659,7 +1714,10 @@ static int __devinit omap_st_add(struct omap_mcbsp *mcbsp)
|
|||
goto err1;
|
||||
}
|
||||
|
||||
st_data->io_base_st = ioremap(pdata->phys_base_st, SZ_4K);
|
||||
pdev = container_of(mcbsp->dev, struct platform_device, dev);
|
||||
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "sidetone");
|
||||
st_data->io_base_st = ioremap(res->start, resource_size(res));
|
||||
if (!st_data->io_base_st) {
|
||||
err = -ENOMEM;
|
||||
goto err2;
|
||||
|
@ -1748,6 +1806,7 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev)
|
|||
struct omap_mcbsp_platform_data *pdata = pdev->dev.platform_data;
|
||||
struct omap_mcbsp *mcbsp;
|
||||
int id = pdev->id - 1;
|
||||
struct resource *res;
|
||||
int ret = 0;
|
||||
|
||||
if (!pdata) {
|
||||
|
@ -1777,47 +1836,78 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev)
|
|||
mcbsp->dma_tx_lch = -1;
|
||||
mcbsp->dma_rx_lch = -1;
|
||||
|
||||
mcbsp->phys_base = pdata->phys_base;
|
||||
mcbsp->io_base = ioremap(pdata->phys_base, SZ_4K);
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
|
||||
if (!res) {
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!res) {
|
||||
dev_err(&pdev->dev, "%s:mcbsp%d has invalid memory"
|
||||
"resource\n", __func__, pdev->id);
|
||||
ret = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
mcbsp->phys_base = res->start;
|
||||
omap_mcbsp_cache_size = resource_size(res);
|
||||
mcbsp->io_base = ioremap(res->start, resource_size(res));
|
||||
if (!mcbsp->io_base) {
|
||||
ret = -ENOMEM;
|
||||
goto err_ioremap;
|
||||
}
|
||||
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dma");
|
||||
if (!res)
|
||||
mcbsp->phys_dma_base = mcbsp->phys_base;
|
||||
else
|
||||
mcbsp->phys_dma_base = res->start;
|
||||
|
||||
/* Default I/O is IRQ based */
|
||||
mcbsp->io_type = OMAP_MCBSP_IRQ_IO;
|
||||
mcbsp->tx_irq = pdata->tx_irq;
|
||||
mcbsp->rx_irq = pdata->rx_irq;
|
||||
mcbsp->dma_rx_sync = pdata->dma_rx_sync;
|
||||
mcbsp->dma_tx_sync = pdata->dma_tx_sync;
|
||||
|
||||
mcbsp->iclk = clk_get(&pdev->dev, "ick");
|
||||
if (IS_ERR(mcbsp->iclk)) {
|
||||
ret = PTR_ERR(mcbsp->iclk);
|
||||
dev_err(&pdev->dev, "unable to get ick: %d\n", ret);
|
||||
goto err_iclk;
|
||||
mcbsp->tx_irq = platform_get_irq_byname(pdev, "tx");
|
||||
mcbsp->rx_irq = platform_get_irq_byname(pdev, "rx");
|
||||
|
||||
/* From OMAP4 there will be a single irq line */
|
||||
if (mcbsp->tx_irq == -ENXIO)
|
||||
mcbsp->tx_irq = platform_get_irq(pdev, 0);
|
||||
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
|
||||
if (!res) {
|
||||
dev_err(&pdev->dev, "%s:mcbsp%d has invalid rx DMA channel\n",
|
||||
__func__, pdev->id);
|
||||
ret = -ENODEV;
|
||||
goto err_res;
|
||||
}
|
||||
mcbsp->dma_rx_sync = res->start;
|
||||
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
|
||||
if (!res) {
|
||||
dev_err(&pdev->dev, "%s:mcbsp%d has invalid tx DMA channel\n",
|
||||
__func__, pdev->id);
|
||||
ret = -ENODEV;
|
||||
goto err_res;
|
||||
}
|
||||
mcbsp->dma_tx_sync = res->start;
|
||||
|
||||
mcbsp->fclk = clk_get(&pdev->dev, "fck");
|
||||
if (IS_ERR(mcbsp->fclk)) {
|
||||
ret = PTR_ERR(mcbsp->fclk);
|
||||
dev_err(&pdev->dev, "unable to get fck: %d\n", ret);
|
||||
goto err_fclk;
|
||||
goto err_res;
|
||||
}
|
||||
|
||||
mcbsp->pdata = pdata;
|
||||
mcbsp->dev = &pdev->dev;
|
||||
mcbsp_ptr[id] = mcbsp;
|
||||
mcbsp->mcbsp_config_type = pdata->mcbsp_config_type;
|
||||
platform_set_drvdata(pdev, mcbsp);
|
||||
pm_runtime_enable(mcbsp->dev);
|
||||
|
||||
/* Initialize mcbsp properties for OMAP34XX if needed / applicable */
|
||||
omap34xx_device_init(mcbsp);
|
||||
|
||||
return 0;
|
||||
|
||||
err_fclk:
|
||||
clk_put(mcbsp->iclk);
|
||||
err_iclk:
|
||||
err_res:
|
||||
iounmap(mcbsp->io_base);
|
||||
err_ioremap:
|
||||
kfree(mcbsp);
|
||||
|
@ -1839,7 +1929,6 @@ static int __devexit omap_mcbsp_remove(struct platform_device *pdev)
|
|||
omap34xx_device_exit(mcbsp);
|
||||
|
||||
clk_put(mcbsp->fclk);
|
||||
clk_put(mcbsp->iclk);
|
||||
|
||||
iounmap(mcbsp->io_base);
|
||||
kfree(mcbsp);
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
|
||||
#define MMC_TIMEOUT_MS 20
|
||||
#define OMAP_MMC_MASTER_CLOCK 96000000
|
||||
#define DRIVER_NAME "mmci-omap-hs"
|
||||
#define DRIVER_NAME "omap_hsmmc"
|
||||
|
||||
/* Timeouts for entering power saving states on inactivity, msec */
|
||||
#define OMAP_MMC_DISABLED_TIMEOUT 100
|
||||
|
@ -1571,7 +1571,7 @@ static void omap_hsmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
|
|||
break;
|
||||
}
|
||||
|
||||
if (host->id == OMAP_MMC1_DEVID) {
|
||||
if (host->pdata->controller_flags & OMAP_HSMMC_SUPPORTS_DUAL_VOLT) {
|
||||
/* Only MMC1 can interface at 3V without some flavor
|
||||
* of external transceiver; but they all handle 1.8V.
|
||||
*/
|
||||
|
@ -1663,7 +1663,7 @@ static void omap_hsmmc_conf_bus_power(struct omap_hsmmc_host *host)
|
|||
u32 hctl, capa, value;
|
||||
|
||||
/* Only MMC1 supports 3.0V */
|
||||
if (host->id == OMAP_MMC1_DEVID) {
|
||||
if (host->pdata->controller_flags & OMAP_HSMMC_SUPPORTS_DUAL_VOLT) {
|
||||
hctl = SDVS30;
|
||||
capa = VS30 | VS18;
|
||||
} else {
|
||||
|
|
|
@ -637,7 +637,6 @@ extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts);
|
|||
extern int twl4030_remove_script(u8 flags);
|
||||
|
||||
struct twl4030_codec_audio_data {
|
||||
unsigned int audio_mclk; /* not used, will be removed */
|
||||
unsigned int digimic_delay; /* in ms */
|
||||
unsigned int ramp_delay_value;
|
||||
unsigned int offset_cncl_path;
|
||||
|
@ -648,7 +647,6 @@ struct twl4030_codec_audio_data {
|
|||
};
|
||||
|
||||
struct twl4030_codec_vibra_data {
|
||||
unsigned int audio_mclk;
|
||||
unsigned int coexist;
|
||||
};
|
||||
|
||||
|
|
|
@ -69,110 +69,6 @@ static struct omap_mcbsp_data mcbsp_data[NUM_LINKS];
|
|||
*/
|
||||
static struct omap_pcm_dma_data omap_mcbsp_dai_dma_params[NUM_LINKS][2];
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX)
|
||||
static const int omap1_dma_reqs[][2] = {
|
||||
{ OMAP_DMA_MCBSP1_TX, OMAP_DMA_MCBSP1_RX },
|
||||
{ OMAP_DMA_MCBSP2_TX, OMAP_DMA_MCBSP2_RX },
|
||||
{ OMAP_DMA_MCBSP3_TX, OMAP_DMA_MCBSP3_RX },
|
||||
};
|
||||
static const unsigned long omap1_mcbsp_port[][2] = {
|
||||
{ OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DXR1,
|
||||
OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DRR1 },
|
||||
{ OMAP1510_MCBSP2_BASE + OMAP_MCBSP_REG_DXR1,
|
||||
OMAP1510_MCBSP2_BASE + OMAP_MCBSP_REG_DRR1 },
|
||||
{ OMAP1510_MCBSP3_BASE + OMAP_MCBSP_REG_DXR1,
|
||||
OMAP1510_MCBSP3_BASE + OMAP_MCBSP_REG_DRR1 },
|
||||
};
|
||||
#else
|
||||
static const int omap1_dma_reqs[][2] = {};
|
||||
static const unsigned long omap1_mcbsp_port[][2] = {};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
|
||||
static const int omap24xx_dma_reqs[][2] = {
|
||||
{ OMAP24XX_DMA_MCBSP1_TX, OMAP24XX_DMA_MCBSP1_RX },
|
||||
{ OMAP24XX_DMA_MCBSP2_TX, OMAP24XX_DMA_MCBSP2_RX },
|
||||
#if defined(CONFIG_SOC_OMAP2430) || defined(CONFIG_ARCH_OMAP3)
|
||||
{ OMAP24XX_DMA_MCBSP3_TX, OMAP24XX_DMA_MCBSP3_RX },
|
||||
{ OMAP24XX_DMA_MCBSP4_TX, OMAP24XX_DMA_MCBSP4_RX },
|
||||
{ OMAP24XX_DMA_MCBSP5_TX, OMAP24XX_DMA_MCBSP5_RX },
|
||||
#endif
|
||||
};
|
||||
#else
|
||||
static const int omap24xx_dma_reqs[][2] = {};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP4)
|
||||
static const int omap44xx_dma_reqs[][2] = {
|
||||
{ OMAP44XX_DMA_MCBSP1_TX, OMAP44XX_DMA_MCBSP1_RX },
|
||||
{ OMAP44XX_DMA_MCBSP2_TX, OMAP44XX_DMA_MCBSP2_RX },
|
||||
{ OMAP44XX_DMA_MCBSP3_TX, OMAP44XX_DMA_MCBSP3_RX },
|
||||
{ OMAP44XX_DMA_MCBSP4_TX, OMAP44XX_DMA_MCBSP4_RX },
|
||||
};
|
||||
#else
|
||||
static const int omap44xx_dma_reqs[][2] = {};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SOC_OMAP2420)
|
||||
static const unsigned long omap2420_mcbsp_port[][2] = {
|
||||
{ OMAP24XX_MCBSP1_BASE + OMAP_MCBSP_REG_DXR1,
|
||||
OMAP24XX_MCBSP1_BASE + OMAP_MCBSP_REG_DRR1 },
|
||||
{ OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DXR1,
|
||||
OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DRR1 },
|
||||
};
|
||||
#else
|
||||
static const unsigned long omap2420_mcbsp_port[][2] = {};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SOC_OMAP2430)
|
||||
static const unsigned long omap2430_mcbsp_port[][2] = {
|
||||
{ OMAP24XX_MCBSP1_BASE + OMAP_MCBSP_REG_DXR,
|
||||
OMAP24XX_MCBSP1_BASE + OMAP_MCBSP_REG_DRR },
|
||||
{ OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DXR,
|
||||
OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DRR },
|
||||
{ OMAP2430_MCBSP3_BASE + OMAP_MCBSP_REG_DXR,
|
||||
OMAP2430_MCBSP3_BASE + OMAP_MCBSP_REG_DRR },
|
||||
{ OMAP2430_MCBSP4_BASE + OMAP_MCBSP_REG_DXR,
|
||||
OMAP2430_MCBSP4_BASE + OMAP_MCBSP_REG_DRR },
|
||||
{ OMAP2430_MCBSP5_BASE + OMAP_MCBSP_REG_DXR,
|
||||
OMAP2430_MCBSP5_BASE + OMAP_MCBSP_REG_DRR },
|
||||
};
|
||||
#else
|
||||
static const unsigned long omap2430_mcbsp_port[][2] = {};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP3)
|
||||
static const unsigned long omap34xx_mcbsp_port[][2] = {
|
||||
{ OMAP34XX_MCBSP1_BASE + OMAP_MCBSP_REG_DXR,
|
||||
OMAP34XX_MCBSP1_BASE + OMAP_MCBSP_REG_DRR },
|
||||
{ OMAP34XX_MCBSP2_BASE + OMAP_MCBSP_REG_DXR,
|
||||
OMAP34XX_MCBSP2_BASE + OMAP_MCBSP_REG_DRR },
|
||||
{ OMAP34XX_MCBSP3_BASE + OMAP_MCBSP_REG_DXR,
|
||||
OMAP34XX_MCBSP3_BASE + OMAP_MCBSP_REG_DRR },
|
||||
{ OMAP34XX_MCBSP4_BASE + OMAP_MCBSP_REG_DXR,
|
||||
OMAP34XX_MCBSP4_BASE + OMAP_MCBSP_REG_DRR },
|
||||
{ OMAP34XX_MCBSP5_BASE + OMAP_MCBSP_REG_DXR,
|
||||
OMAP34XX_MCBSP5_BASE + OMAP_MCBSP_REG_DRR },
|
||||
};
|
||||
#else
|
||||
static const unsigned long omap34xx_mcbsp_port[][2] = {};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP4)
|
||||
static const unsigned long omap44xx_mcbsp_port[][2] = {
|
||||
{ OMAP44XX_MCBSP1_BASE + OMAP_MCBSP_REG_DXR,
|
||||
OMAP44XX_MCBSP1_BASE + OMAP_MCBSP_REG_DRR },
|
||||
{ OMAP44XX_MCBSP2_BASE + OMAP_MCBSP_REG_DXR,
|
||||
OMAP44XX_MCBSP2_BASE + OMAP_MCBSP_REG_DRR },
|
||||
{ OMAP44XX_MCBSP3_BASE + OMAP_MCBSP_REG_DXR,
|
||||
OMAP44XX_MCBSP3_BASE + OMAP_MCBSP_REG_DRR },
|
||||
{ OMAP44XX_MCBSP4_BASE + OMAP_MCBSP_REG_DXR,
|
||||
OMAP44XX_MCBSP4_BASE + OMAP_MCBSP_REG_DRR },
|
||||
};
|
||||
#else
|
||||
static const unsigned long omap44xx_mcbsp_port[][2] = {};
|
||||
#endif
|
||||
|
||||
static void omap_mcbsp_set_threshold(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
|
@ -346,24 +242,10 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,
|
|||
unsigned int format, div, framesize, master;
|
||||
|
||||
dma_data = &omap_mcbsp_dai_dma_params[cpu_dai->id][substream->stream];
|
||||
if (cpu_class_is_omap1()) {
|
||||
dma = omap1_dma_reqs[bus_id][substream->stream];
|
||||
port = omap1_mcbsp_port[bus_id][substream->stream];
|
||||
} else if (cpu_is_omap2420()) {
|
||||
dma = omap24xx_dma_reqs[bus_id][substream->stream];
|
||||
port = omap2420_mcbsp_port[bus_id][substream->stream];
|
||||
} else if (cpu_is_omap2430()) {
|
||||
dma = omap24xx_dma_reqs[bus_id][substream->stream];
|
||||
port = omap2430_mcbsp_port[bus_id][substream->stream];
|
||||
} else if (cpu_is_omap343x()) {
|
||||
dma = omap24xx_dma_reqs[bus_id][substream->stream];
|
||||
port = omap34xx_mcbsp_port[bus_id][substream->stream];
|
||||
} else if (cpu_is_omap44xx()) {
|
||||
dma = omap44xx_dma_reqs[bus_id][substream->stream];
|
||||
port = omap44xx_mcbsp_port[bus_id][substream->stream];
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
dma = omap_mcbsp_dma_ch_params(bus_id, substream->stream);
|
||||
port = omap_mcbsp_dma_reg_params(bus_id, substream->stream);
|
||||
|
||||
switch (params_format(params)) {
|
||||
case SNDRV_PCM_FORMAT_S16_LE:
|
||||
dma_data->data_type = OMAP_DMA_DATA_TYPE_S16;
|
||||
|
|
Loading…
Add table
Reference in a new issue