diff options
author | Philippe Langlais <philippe.langlais@linaro.org> | 2011-05-11 14:16:33 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-19 15:15:15 +0200 |
commit | a15e7eb24cc6b014d311207105e86ce368786228 (patch) | |
tree | db0d8f329c49a905cb8fd5c4e49828be3c35a676 | |
parent | 917efd87812b5785c634f572df0fba6b4cc92bde (diff) |
mach-ux500:sdi3: Added platform data for SDIO support
Added platform data for SDIO support on U4500 board
Needs rework for power saving part (MMC_CAP_DISABLE, wakeup_handler not present)
ST-Ericsson Id: AP 337858
Change-Id: I963abcf7ada91dc88251301f3a29a0a490eab3d8
Signed-off-by: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/22500
Reviewed-by: Preetham-rao K <preetham.rao@stericsson.com>
Tested-by: Preetham-rao K <preetham.rao@stericsson.com>
Reviewed-by: QATEST
Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com>
Conflicts:
arch/arm/mach-ux500/board-u5500-sdi.c
-rw-r--r-- | arch/arm/mach-ux500/board-u5500-sdi.c | 53 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-u5500.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-ux500/devices-db5500.h | 6 |
3 files changed, 57 insertions, 10 deletions
diff --git a/arch/arm/mach-ux500/board-u5500-sdi.c b/arch/arm/mach-ux500/board-u5500-sdi.c index 7c0b659a7ac..0246dc5fc17 100644 --- a/arch/arm/mach-ux500/board-u5500-sdi.c +++ b/arch/arm/mach-ux500/board-u5500-sdi.c @@ -22,7 +22,7 @@ * SDI0 (EMMC) */ #ifdef CONFIG_STE_DMA40 -struct stedma40_chan_cfg u5500_sdi0_dma_cfg_rx = { +struct stedma40_chan_cfg sdi0_dma_cfg_rx = { .mode = STEDMA40_MODE_LOGICAL, .dir = STEDMA40_PERIPH_TO_MEM, .src_dev_type = DB5500_DMA_DEV24_SDMMC0_RX, @@ -31,7 +31,7 @@ struct stedma40_chan_cfg u5500_sdi0_dma_cfg_rx = { .dst_info.data_width = STEDMA40_WORD_WIDTH, }; -static struct stedma40_chan_cfg u5500_sdi0_dma_cfg_tx = { +static struct stedma40_chan_cfg sdi0_dma_cfg_tx = { .mode = STEDMA40_MODE_LOGICAL, .dir = STEDMA40_MEM_TO_PERIPH, .src_dev_type = STEDMA40_DEV_SRC_MEMORY, @@ -39,11 +39,11 @@ static struct stedma40_chan_cfg u5500_sdi0_dma_cfg_tx = { .src_info.data_width = STEDMA40_WORD_WIDTH, .dst_info.data_width = STEDMA40_WORD_WIDTH, }; -#endif + /* * SDI1 (SD/MMC) */ -#ifdef CONFIG_STE_DMA40 + static struct stedma40_chan_cfg sdi1_dma_cfg_rx = { .dir = STEDMA40_PERIPH_TO_MEM, .src_dev_type = DB5500_DMA_DEV25_SDMMC1_RX, @@ -59,6 +59,26 @@ static struct stedma40_chan_cfg sdi1_dma_cfg_tx = { .src_info.data_width = STEDMA40_WORD_WIDTH, .dst_info.data_width = STEDMA40_WORD_WIDTH, }; + +/* + * SDI3 (SDIO) + */ +static struct stedma40_chan_cfg sdi3_dma_cfg_rx = { + .dir = STEDMA40_PERIPH_TO_MEM, + .src_dev_type = DB5500_DMA_DEV27_SDMMC3_RX, + .dst_dev_type = STEDMA40_DEV_DST_MEMORY, + .src_info.data_width = STEDMA40_WORD_WIDTH, + .dst_info.data_width = STEDMA40_WORD_WIDTH, +}; + +static struct stedma40_chan_cfg sdi3_dma_cfg_tx = { + .dir = STEDMA40_MEM_TO_PERIPH, + .src_dev_type = STEDMA40_DEV_SRC_MEMORY, + .dst_dev_type = DB5500_DMA_DEV27_SDMMC3_TX, + .src_info.data_width = STEDMA40_WORD_WIDTH, + .dst_info.data_width = STEDMA40_WORD_WIDTH, +}; + #endif static struct mmci_platform_data u5500_sdi0_data = { @@ -71,8 +91,8 @@ static struct mmci_platform_data u5500_sdi0_data = { .gpio_wp = -1, #ifdef CONFIG_STE_DMA40 .dma_filter = stedma40_filter, - .dma_rx_param = &u5500_sdi0_dma_cfg_rx, - .dma_tx_param = &u5500_sdi0_dma_cfg_tx, + .dma_rx_param = &sdi0_dma_cfg_rx, + .dma_tx_param = &sdi0_dma_cfg_tx, #endif }; @@ -134,10 +154,29 @@ static void sdi1_configure(void) } +/* + * SDI3 (SDIO WLAN) + */ + +static struct mmci_platform_data u5500_sdi3_data = { + .ocr_mask = MMC_VDD_29_30, + .f_max = 50000000, + .capabilities = MMC_CAP_4_BIT_DATA | + MMC_CAP_SDIO_IRQ | + MMC_CAP_BROKEN_SDIO_CMD53, + .gpio_cd = -1, + .gpio_wp = -1, +#ifdef CONFIG_STE_DMA40 + .dma_filter = stedma40_filter, + .dma_rx_param = &sdi3_dma_cfg_rx, + .dma_tx_param = &sdi3_dma_cfg_tx, +#endif +}; + void __init u5500_sdi_init(void) { db5500_add_sdi0(&u5500_sdi0_data); sdi1_configure(); db5500_add_sdi1(&u5500_sdi1_data); + db5500_add_sdi3(&u5500_sdi3_data); } - diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c index 3636289da07..2b86760898e 100644 --- a/arch/arm/mach-ux500/board-u5500.c +++ b/arch/arm/mach-ux500/board-u5500.c @@ -116,6 +116,14 @@ static pin_cfg_t u5500_pins[] = { GPIO227_GPIO, GPIO185_GPIO, + /* SDI3 (SDIO) */ + GPIO171_MC3_DAT0 | PIN_INPUT_PULLUP, + GPIO172_MC3_DAT1 | PIN_INPUT_PULLUP, + GPIO173_MC3_DAT2 | PIN_INPUT_PULLUP, + GPIO174_MC3_DAT3 | PIN_INPUT_PULLUP, + GPIO175_MC3_CMD | PIN_INPUT_PULLUP, + GPIO176_MC3_CLK | PIN_OUTPUT_LOW, + /* Display & HDMI HW sync */ GPIO204_LCD_VSI1 | PIN_INPUT_PULLUP, }; diff --git a/arch/arm/mach-ux500/devices-db5500.h b/arch/arm/mach-ux500/devices-db5500.h index c1314c2acce..59c235d059a 100644 --- a/arch/arm/mach-ux500/devices-db5500.h +++ b/arch/arm/mach-ux500/devices-db5500.h @@ -54,13 +54,13 @@ db5500_add_keypad(struct db5500_keypad_platform_data *pdata) dbx500_add_sdi("sdi1", U5500_SDI1_BASE, IRQ_DB5500_SDMMC1, pdata, \ 0x10480180) #define db5500_add_sdi2(pdata) \ - dbx500_add_sdi("sdi2", U5500_SDI2_BASE, IRQ_DB5500_SDMMC2, pdata \ + dbx500_add_sdi("sdi2", U5500_SDI2_BASE, IRQ_DB5500_SDMMC2, pdata, \ 0x10480180) #define db5500_add_sdi3(pdata) \ - dbx500_add_sdi("sdi3", U5500_SDI3_BASE, IRQ_DB5500_SDMMC3, pdata \ + dbx500_add_sdi("sdi3", U5500_SDI3_BASE, IRQ_DB5500_SDMMC3, pdata, \ 0x10480180) #define db5500_add_sdi4(pdata) \ - dbx500_add_sdi("sdi4", U5500_SDI4_BASE, IRQ_DB5500_SDMMC4, pdata \ + dbx500_add_sdi("sdi4", U5500_SDI4_BASE, IRQ_DB5500_SDMMC4, pdata, \ 0x10480180) /* This one has a bad peripheral ID in the U5500 silicon */ |