[U-Boot] [PATCH] mmc: s5p_sdhci: fix to check proper pinmux id

At sdhci_get_config(), there was wrong condition to check pimux id, so this patch fixes to check proper pinmux id.
Signed-off-by: Seung-Woo Kim sw0312.kim@samsung.com --- drivers/mmc/s5p_sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c index b329bef..ac737e0 100644 --- a/drivers/mmc/s5p_sdhci.c +++ b/drivers/mmc/s5p_sdhci.c @@ -152,7 +152,7 @@ static int sdhci_get_config(const void *blob, int node, struct sdhci_host *host)
/* Get device id */ dev_id = pinmux_decode_periph_id(blob, node); - if (dev_id < PERIPH_ID_SDMMC0 && dev_id > PERIPH_ID_SDMMC3) { + if (dev_id < PERIPH_ID_SDMMC0 || dev_id > PERIPH_ID_SDMMC3) { debug("MMC: Can't get device id\n"); return -EINVAL; }

Hi,
On 11/24/2016 11:29 AM, Seung-Woo Kim wrote:
At sdhci_get_config(), there was wrong condition to check pimux id, so this patch fixes to check proper pinmux id.
I can't see this patch on patchwork.
Best Regards, Jaehoon Chung
Signed-off-by: Seung-Woo Kim sw0312.kim@samsung.com
drivers/mmc/s5p_sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c index b329bef..ac737e0 100644 --- a/drivers/mmc/s5p_sdhci.c +++ b/drivers/mmc/s5p_sdhci.c @@ -152,7 +152,7 @@ static int sdhci_get_config(const void *blob, int node, struct sdhci_host *host)
/* Get device id */ dev_id = pinmux_decode_periph_id(blob, node);
- if (dev_id < PERIPH_ID_SDMMC0 && dev_id > PERIPH_ID_SDMMC3) {
- if (dev_id < PERIPH_ID_SDMMC0 || dev_id > PERIPH_ID_SDMMC3) { debug("MMC: Can't get device id\n"); return -EINVAL; }

At sdhci_get_config(), there was wrong condition to check pimux id, so this patch fixes to check proper pinmux id.
Signed-off-by: Seung-Woo Kim sw0312.kim@samsung.com --- I was not in the mailing list, so I just resend. --- drivers/mmc/s5p_sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c index b329bef..ac737e0 100644 --- a/drivers/mmc/s5p_sdhci.c +++ b/drivers/mmc/s5p_sdhci.c @@ -152,7 +152,7 @@ static int sdhci_get_config(const void *blob, int node, struct sdhci_host *host)
/* Get device id */ dev_id = pinmux_decode_periph_id(blob, node); - if (dev_id < PERIPH_ID_SDMMC0 && dev_id > PERIPH_ID_SDMMC3) { + if (dev_id < PERIPH_ID_SDMMC0 || dev_id > PERIPH_ID_SDMMC3) { debug("MMC: Can't get device id\n"); return -EINVAL; }

On 11/24/2016 03:05 PM, Seung-Woo Kim wrote:
At sdhci_get_config(), there was wrong condition to check pimux id, so this patch fixes to check proper pinmux id.
Signed-off-by: Seung-Woo Kim sw0312.kim@samsung.com
Applied on u-boot-mmc. Thanks!
Best Regards, Jaehoon Chung
I was not in the mailing list, so I just resend.
drivers/mmc/s5p_sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c index b329bef..ac737e0 100644 --- a/drivers/mmc/s5p_sdhci.c +++ b/drivers/mmc/s5p_sdhci.c @@ -152,7 +152,7 @@ static int sdhci_get_config(const void *blob, int node, struct sdhci_host *host)
/* Get device id */ dev_id = pinmux_decode_periph_id(blob, node);
- if (dev_id < PERIPH_ID_SDMMC0 && dev_id > PERIPH_ID_SDMMC3) {
- if (dev_id < PERIPH_ID_SDMMC0 || dev_id > PERIPH_ID_SDMMC3) { debug("MMC: Can't get device id\n"); return -EINVAL; }
participants (2)
-
Jaehoon Chung
-
Seung-Woo Kim