You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/07/04 05:36:21 UTC
[incubator-nuttx] 08/13: arch: cxd56xx: Add eMMC configuration for
vendor-specific commands
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit d29db87bdcc832114d8c5c6cacf00c751a9f1695
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Sun Jul 4 12:54:12 2021 +0900
arch: cxd56xx: Add eMMC configuration for vendor-specific commands
The eMMC driver for cxd56xx has been implemented a vendor-specific command
for Toshiba eMMC device, and so add a new configuration to enable the code.
---
arch/arm/src/cxd56xx/Kconfig | 10 ++++++++++
arch/arm/src/cxd56xx/cxd56_emmc.c | 4 ++++
arch/arm/src/cxd56xx/hardware/cxd56_emmc.h | 3 +++
3 files changed, 17 insertions(+)
diff --git a/arch/arm/src/cxd56xx/Kconfig b/arch/arm/src/cxd56xx/Kconfig
index 58c58cc..cbd7619 100644
--- a/arch/arm/src/cxd56xx/Kconfig
+++ b/arch/arm/src/cxd56xx/Kconfig
@@ -1234,6 +1234,16 @@ config CXD56_EMMC
---help---
Emmc driver for cxd56xx chip
+if CXD56_EMMC
+
+config CXD56_EMMC_VENDOR_TOSHIBA
+ bool "Toshiba eMMC device"
+ default n
+ ---help---
+ Enable vendor-specific commands for Toshiba eMMC device.
+
+endif # CXD56_EMMC
+
endmenu
config CXD56_GE2D
diff --git a/arch/arm/src/cxd56xx/cxd56_emmc.c b/arch/arm/src/cxd56xx/cxd56_emmc.c
index b1430ab..2fd8ca1 100644
--- a/arch/arm/src/cxd56xx/cxd56_emmc.c
+++ b/arch/arm/src/cxd56xx/cxd56_emmc.c
@@ -668,11 +668,15 @@ static int emmc_hwinitialize(void)
emmc_changeclock(EMMC_CLKDIV_NON_DIV);
+#ifdef CONFIG_CXD56_EMMC_VENDOR_TOSHIBA
+ /* Vendor-specific command */
+
ret = emmc_switchcmd(EXTCSD_PON, EXTCSD_PON_POWERED_ON);
if (ret)
{
goto errout;
}
+#endif
return OK;
diff --git a/arch/arm/src/cxd56xx/hardware/cxd56_emmc.h b/arch/arm/src/cxd56xx/hardware/cxd56_emmc.h
index b310ed3..a5e2e49 100644
--- a/arch/arm/src/cxd56xx/hardware/cxd56_emmc.h
+++ b/arch/arm/src/cxd56xx/hardware/cxd56_emmc.h
@@ -324,6 +324,9 @@
#define EXTCSD_BUS_WIDTH (183u)
#define EXTCSD_BUS_WIDTH_4BIT_SDR (0x01u)
#define EXTCSD_BUS_WIDTH_4BIT_DDR (0x05u)
+
+/* Vendor-specific Extended CSD */
+
#define EXTCSD_PON (34u) /* Power Off Notification */
#define EXTCSD_PON_POWERED_ON (0x01u)
#define EXTCSD_PON_POWERED_OFF_LONG (0x03u)