aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/board-dm644x-evm.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@deeprootsystems.com>2009-05-11 18:55:03 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-05-26 10:18:16 -0400
commit2dbf56aeb7986b54651c93ed171877e8179289bc (patch)
treeecdc2e340ed799a884812abb200aac23279cb79b /arch/arm/mach-davinci/board-dm644x-evm.c
parent35652fe1858e664707cfa32e80547b210cc41f78 (diff)
davinci: MMC platform support
Add SoC and platform-specific data and init for MMC driver. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/board-dm644x-evm.c')
-rw-r--r--arch/arm/mach-davinci/board-dm644x-evm.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index b2e7f9c63bc5..9c3ce311d5d7 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -44,6 +44,7 @@
44#include <mach/mux.h> 44#include <mach/mux.h>
45#include <mach/psc.h> 45#include <mach/psc.h>
46#include <mach/nand.h> 46#include <mach/nand.h>
47#include <mach/mmc.h>
47 48
48#define DM644X_EVM_PHY_MASK (0x2) 49#define DM644X_EVM_PHY_MASK (0x2)
49#define DM644X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ 50#define DM644X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */
@@ -545,6 +546,27 @@ static int dm6444evm_msp430_get_pins(void)
545 return (buf[3] << 8) | buf[2]; 546 return (buf[3] << 8) | buf[2];
546} 547}
547 548
549static int dm6444evm_mmc_get_cd(int module)
550{
551 int status = dm6444evm_msp430_get_pins();
552
553 return (status < 0) ? status : !(status & BIT(1));
554}
555
556static int dm6444evm_mmc_get_ro(int module)
557{
558 int status = dm6444evm_msp430_get_pins();
559
560 return (status < 0) ? status : status & BIT(6 + 8);
561}
562
563static struct davinci_mmc_config dm6446evm_mmc_config = {
564 .get_cd = dm6444evm_mmc_get_cd,
565 .get_ro = dm6444evm_mmc_get_ro,
566 .wires = 4,
567 .version = MMC_CTLR_VERSION_1
568};
569
548static struct i2c_board_info __initdata i2c_info[] = { 570static struct i2c_board_info __initdata i2c_info[] = {
549 { 571 {
550 I2C_BOARD_INFO("dm6446evm_msp", 0x23), 572 I2C_BOARD_INFO("dm6446evm_msp", 0x23),
@@ -671,6 +693,8 @@ static __init void davinci_evm_init(void)
671 ARRAY_SIZE(davinci_evm_devices)); 693 ARRAY_SIZE(davinci_evm_devices));
672 evm_init_i2c(); 694 evm_init_i2c();
673 695
696 davinci_setup_mmc(0, &dm6446evm_mmc_config);
697
674 davinci_serial_init(&uart_config); 698 davinci_serial_init(&uart_config);
675 699
676 /* Register the fixup for PHY on DaVinci */ 700 /* Register the fixup for PHY on DaVinci */