openwrtv4/package/boot/uboot-layerscape/patches/0034-mmc-fsl_esdhc-add-workaround-for-non-removable-card-.patch
Yutang Jiang 15a14cf166 layerscape: add 64b/32b target for ls1012ardb device
The QorIQ LS1012A processor, optimized for battery-backed or
USB-powered, integrates a single ARM Cortex-A53 core with a hardware
packet forwarding engine and high-speed interfaces to deliver
line-rate networking performance.
QorIQ LS1012A Reference Design System (LS1012ARDB) is a high-performance
development platform, with a complete debugging environment.
The LS1012ARDB board supports the QorIQ LS1012A processor and is
optimized to support the high-bandwidth DDR3L memory and
a full complement of high-speed SerDes ports.

LEDE/OPENWRT will auto strip executable program file while make. So we
need select CONFIG_NO_STRIP=y while make menuconfig to avoid the ppfe network
fiemware be destroyed, then run make to build ls1012ardb firmware.

The fsl-quadspi flash with jffs2 fs is unstable and arise some failed message.
This issue have noticed the IP owner for investigate, hope he can solve it
earlier. So the ls1012ardb now also provide a xx-firmware.ext4.bin as default
firmware, and the uboot bootcmd will run wrtboot_ext4rfs for "rootfstype=ext4"
bootargs.

Signed-off-by: Yutang Jiang <yutang.jiang@nxp.com>
2016-10-31 17:00:10 +01:00

57 lines
1.8 KiB
Diff

From e3e641993a1a5148e71bdd3f7b3cb5da695b1632 Mon Sep 17 00:00:00 2001
From: Yangbo Lu <yangbo.lu@nxp.com>
Date: Fri, 20 May 2016 11:17:30 +0800
Subject: [PATCH 34/93] mmc: fsl_esdhc: add workaround for non-removable card
of esdhc-2
The esdhc-2 usually uses some on-board memory devices such as eMMC
card or SDIO wifi module, and it doesn't support SDHC_CD_B. So we
could only assume it always has a card instead of detecting SDHC_CD_B
status. This patch is to add workaround for these non-removable
cards which are used by esdhc-2.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
drivers/mmc/fsl_esdhc.c | 6 +++++-
include/fsl_esdhc.h | 1 +
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index cacf879..2c6e175 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -628,6 +628,8 @@ static int esdhc_getcd(struct mmc *mmc)
struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base;
int timeout = 1000;
+ if (cfg->non_removable_card)
+ return 1;
#ifdef CONFIG_ESDHC_DETECT_QUIRK
if (CONFIG_ESDHC_DETECT_QUIRK)
return 1;
@@ -759,7 +761,9 @@ int fsl_esdhc_mmc_init(bd_t *bis)
cfg_1 = calloc(sizeof(struct fsl_esdhc_cfg), 1);
cfg_1->esdhc_base = CONFIG_SYS_FSL_ESDHC_1_ADDR;
cfg_1->sdhc_clk = gd->arch.sdhc_clk;
-
+#ifdef CONFIG_FSL_ESDHC_1_NON_REMOVABLE_CARD
+ cfg_1->non_removable_card = true;
+#endif
if (fsl_esdhc_initialize(bis, cfg))
return -1;
if (fsl_esdhc_initialize(bis, cfg_1))
diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h
index 073048f..8335106 100644
--- a/include/fsl_esdhc.h
+++ b/include/fsl_esdhc.h
@@ -175,6 +175,7 @@ struct fsl_esdhc_cfg {
#endif
u32 sdhc_clk;
u8 max_bus_width;
+ bool non_removable_card;
struct mmc_config cfg;
};
--
1.7.9.5