From 313360b13fd3773eb46811e0f93928d4d58c6f32 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Fri, 24 Aug 2018 21:03:14 +0200 Subject: [PATCH 1/2] pci: rmobile: Filter out device 1 and 2 Only PCI device 1 and 2 is populated on the R-Car Gen2 internal PCIe controller. Ignore all other devices. This fix prevents a duplication of OHCI controller response on slot 0 and 1. Signed-off-by: Marek Vasut --- drivers/pci/pci-rcar-gen2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci-rcar-gen2.c b/drivers/pci/pci-rcar-gen2.c index cbaba19..d913d53 100644 --- a/drivers/pci/pci-rcar-gen2.c +++ b/drivers/pci/pci-rcar-gen2.c @@ -97,7 +97,7 @@ static int rcar_gen2_pci_addr_valid(pci_dev_t d, uint offset) /* Only one EHCI/OHCI device built-in */ slot = PCI_DEV(d); - if (slot > 2) + if (slot != 1 && slot != 2) return -EINVAL; /* bridge logic only has registers to 0x40 */ From 65186977ee06e0df9a9524fa4b6689af4efecac1 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Thu, 30 Aug 2018 15:27:26 +0200 Subject: [PATCH 2/2] mmc: renesas-sdhi: Use priv directly The dev_get_priv(dev) is used twice in the probe function. Replace the second invocation with priv variable. Signed-off-by: Marek Vasut Cc: Masahiro Yamada Cc: Nobuhiro Iwamatsu --- drivers/mmc/renesas-sdhi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c index ecdb088..f8dc5f5 100644 --- a/drivers/mmc/renesas-sdhi.c +++ b/drivers/mmc/renesas-sdhi.c @@ -374,7 +374,7 @@ static int renesas_sdhi_probe(struct udevice *dev) ret = tmio_sd_probe(dev, quirks); #if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) if (!ret) - renesas_sdhi_reset_tuning(dev_get_priv(dev)); + renesas_sdhi_reset_tuning(priv); #endif return ret; }