57 lines
1.6 KiB
Diff
57 lines
1.6 KiB
Diff
|
From 0499ca266f668c9d72217631151f3b6e15350134 Mon Sep 17 00:00:00 2001
|
||
|
From: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
|
||
|
Date: Wed, 15 Jun 2016 17:42:51 +0530
|
||
|
Subject: [PATCH 58/93] mmc: fsl_esdhc: disable sdhc2 when no card inserted
|
||
|
for ls1012ardb
|
||
|
|
||
|
This is a temporary workaround patch for ls1012ardb becasue there
|
||
|
was host controller hardware issue found on some RDB boards when
|
||
|
there was no eMMC adapter card inserted. This would cause below
|
||
|
continious error messages in linux. So this patch is to disable
|
||
|
sdhc2 when finding there isn't card inserted.
|
||
|
"mmc1: Controller never released inhibit bit(s)."
|
||
|
|
||
|
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
|
||
|
---
|
||
|
board/freescale/ls1012ardb/ls1012ardb.c | 24 ++++++++++++++++++++++++
|
||
|
1 file changed, 24 insertions(+)
|
||
|
|
||
|
diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c
|
||
|
index 90cbd5e..ad4d8ee 100644
|
||
|
--- a/board/freescale/ls1012ardb/ls1012ardb.c
|
||
|
+++ b/board/freescale/ls1012ardb/ls1012ardb.c
|
||
|
@@ -171,6 +171,30 @@ int board_early_init_f(void)
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
+int mmc_check_sdhc2_card(void)
|
||
|
+{
|
||
|
+ u8 io = 0;
|
||
|
+ u8 is_card = 0;
|
||
|
+
|
||
|
+ /* Initialize i2c early for Serial flash bank information */
|
||
|
+ i2c_set_bus_num(0);
|
||
|
+
|
||
|
+ if (i2c_read(I2C_MUX_IO1_ADDR, 0, 1, &io, 1) < 0) {
|
||
|
+ printf("Error reading i2c boot information!\n");
|
||
|
+ return 0; /* Don't want to hang() on this error */
|
||
|
+ }
|
||
|
+
|
||
|
+ io = io & 0x0c;
|
||
|
+
|
||
|
+ switch (io) {
|
||
|
+ case 0:
|
||
|
+ case 8:
|
||
|
+ is_card = 1;
|
||
|
+ }
|
||
|
+
|
||
|
+ return is_card;
|
||
|
+}
|
||
|
+
|
||
|
int board_init(void)
|
||
|
{
|
||
|
struct ccsr_cci400 *cci = (struct ccsr_cci400 *)CONFIG_SYS_CCI400_ADDR;
|
||
|
--
|
||
|
1.7.9.5
|
||
|
|