diff options
author | Sandeep Paulraj <s-paulraj@ti.com> | 2009-06-20 14:00:52 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-08-26 03:56:59 -0400 |
commit | a45c8ba30bca0c3257785cae28680781fd356a85 (patch) | |
tree | 874d42618210c0e8d37ea0c12563b2aaeac1ae6a /arch/arm/mach-davinci | |
parent | 19ff3bf2e8473c03bb80052728bfa91c0fdf10f8 (diff) |
davinci: MMC/SD Support for dm365 EVM
Patch adds support for MMC/SD in the DM365 EVM.
Pinmux for MMC/SD slot 1 on the DM365 EVM is also
configured.
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r-- | arch/arm/mach-davinci/board-dm365-evm.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index 9dda3999c8f3..e62d1ab3bb2a 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/i2c.h> | 33 | #include <linux/i2c.h> |
34 | #include <mach/serial.h> | 34 | #include <mach/serial.h> |
35 | #include <mach/common.h> | 35 | #include <mach/common.h> |
36 | #include <mach/mmc.h> | ||
36 | 37 | ||
37 | #define DM365_EVM_PHY_MASK (0x2) | 38 | #define DM365_EVM_PHY_MASK (0x2) |
38 | #define DM365_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ | 39 | #define DM365_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ |
@@ -57,6 +58,13 @@ static struct davinci_i2c_platform_data i2c_pdata = { | |||
57 | .bus_delay = 0 /* usec */, | 58 | .bus_delay = 0 /* usec */, |
58 | }; | 59 | }; |
59 | 60 | ||
61 | static struct davinci_mmc_config dm365evm_mmc_config = { | ||
62 | .wires = 4, | ||
63 | .max_freq = 50000000, | ||
64 | .caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED, | ||
65 | .version = MMC_CTLR_VERSION_2, | ||
66 | }; | ||
67 | |||
60 | static void dm365evm_emac_configure(void) | 68 | static void dm365evm_emac_configure(void) |
61 | { | 69 | { |
62 | /* | 70 | /* |
@@ -93,6 +101,21 @@ static void dm365evm_emac_configure(void) | |||
93 | davinci_cfg_reg(DM365_INT_EMAC_MISCPULSE); | 101 | davinci_cfg_reg(DM365_INT_EMAC_MISCPULSE); |
94 | } | 102 | } |
95 | 103 | ||
104 | static void dm365evm_mmc_configure(void) | ||
105 | { | ||
106 | /* | ||
107 | * MMC/SD pins are multiplexed with GPIO and EMIF | ||
108 | * Further details are available at the DM365 ARM | ||
109 | * Subsystem Users Guide(sprufg5.pdf) pages 118, 128 - 131 | ||
110 | */ | ||
111 | davinci_cfg_reg(DM365_SD1_CLK); | ||
112 | davinci_cfg_reg(DM365_SD1_CMD); | ||
113 | davinci_cfg_reg(DM365_SD1_DATA3); | ||
114 | davinci_cfg_reg(DM365_SD1_DATA2); | ||
115 | davinci_cfg_reg(DM365_SD1_DATA1); | ||
116 | davinci_cfg_reg(DM365_SD1_DATA0); | ||
117 | } | ||
118 | |||
96 | static void __init evm_init_i2c(void) | 119 | static void __init evm_init_i2c(void) |
97 | { | 120 | { |
98 | davinci_init_i2c(&i2c_pdata); | 121 | davinci_init_i2c(&i2c_pdata); |
@@ -116,6 +139,10 @@ static __init void dm365_evm_init(void) | |||
116 | davinci_serial_init(&uart_config); | 139 | davinci_serial_init(&uart_config); |
117 | 140 | ||
118 | dm365evm_emac_configure(); | 141 | dm365evm_emac_configure(); |
142 | dm365evm_mmc_configure(); | ||
143 | |||
144 | davinci_setup_mmc(0, &dm365evm_mmc_config); | ||
145 | davinci_setup_mmc(1, &dm365evm_mmc_config); | ||
119 | 146 | ||
120 | soc_info->emac_pdata->phy_mask = DM365_EVM_PHY_MASK; | 147 | soc_info->emac_pdata->phy_mask = DM365_EVM_PHY_MASK; |
121 | soc_info->emac_pdata->mdio_max_freq = DM365_EVM_MDIO_FREQUENCY; | 148 | soc_info->emac_pdata->mdio_max_freq = DM365_EVM_MDIO_FREQUENCY; |