mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
cm-t35: implement board specific card detect check
Implement a card detection check for cm-t35. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
This commit is contained in:
parent
e874d5b001
commit
5c1214de8c
1 changed files with 11 additions and 0 deletions
|
@ -33,6 +33,7 @@
|
|||
#include <net.h>
|
||||
#include <i2c.h>
|
||||
#include <usb.h>
|
||||
#include <mmc.h>
|
||||
#include <twl4030.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
|
@ -377,6 +378,16 @@ void set_muxconf_regs(void)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_GENERIC_MMC
|
||||
int board_mmc_getcd(struct mmc *mmc)
|
||||
{
|
||||
u8 val;
|
||||
|
||||
if (twl4030_i2c_read_u8(TWL4030_CHIP_GPIO, &val, TWL4030_BASEADD_GPIO))
|
||||
return -1;
|
||||
|
||||
return !(val & 1);
|
||||
}
|
||||
|
||||
int board_mmc_init(bd_t *bis)
|
||||
{
|
||||
return omap_mmc_init(0, 0, 0, -1);
|
||||
|
|
Loading…
Reference in a new issue