From: Michal Simek Date: Fri, 21 Jun 2019 13:36:59 +0200 Subject: [U-Boot] [PATCH v2 1/3] mmc: Read sd card detect properties from DT In-Reply-To: References: <621280b2b5792b10cf61eaa2dbe527d2c0999411.1560948431.git.michal.simek@xilinx.com> Message-ID: <3aec904f-c795-e771-aac4-3489aa543705@xilinx.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 21. 06. 19 9:09, Peng Fan wrote: >> Subject: [PATCH v2 1/3] mmc: Read sd card detect properties from DT >> >> From: T Karthik Reddy >> >> This patch reads card detect properties from device tree & added mmc >> capability macros in mmc.h. >> >> Signed-off-by: T Karthik Reddy >> Signed-off-by: Michal Simek >> --- >> >> Changes in v2: >> - Moved reading CD devicetree properties functionality from sdhci.c to >> mmc-uclass.c & moved mmc capability macros to mmc.h from sdhci.h. >> >> drivers/mmc/mmc-uclass.c | 9 +++++++++ >> include/mmc.h | 4 ++++ >> 2 files changed, 13 insertions(+) >> >> diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index >> a9c8f335c142..1fba7a8c124d 100644 >> --- a/drivers/mmc/mmc-uclass.c >> +++ b/drivers/mmc/mmc-uclass.c >> @@ -171,6 +171,15 @@ int mmc_of_parse(struct udevice *dev, struct >> mmc_config *cfg) >> if (dev_read_bool(dev, "mmc-hs400-1_2v")) >> cfg->host_caps |= MMC_CAP(MMC_HS_400); >> >> + if (dev_read_bool(dev, "non-removable")) { >> + cfg->host_caps |= MMC_CAP_SD_NONREMOVABLE; >> + } else { >> + if (dev_read_bool(dev, "cd-inverted")) >> + cfg->host_caps |= MMC_CAP_CD_ACTIVE_HIGH; >> + if (dev_read_bool(dev, "broken-cd")) >> + cfg->host_caps |= MMC_CAP_SD_NEEDS_POLL; > > I think, it would be better if remove "SD" to align with Linux bit > definitions, saying MMC_CAP_NONREMOVEABLE. This macro is in include/mvebu_mmc.h but it is unused. It shouldn't be a problem to remove it and use it here. Thanks, Michal