From 643cacb6d6d5a9f3adbf294a390537d53208fd79 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 23 Jan 2016 21:04:46 +0100 Subject: [PATCH] usb: ehci: Use map_physmem in ehci-generic Some architectures, like MIPS, require remapping of the registers. Add the map_physmem() call to handle it. Signed-off-by: Marek Vasut Cc: Daniel Schwierzeck Cc: Hans de Goede --- drivers/usb/host/ehci-generic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-generic.c b/drivers/usb/host/ehci-generic.c index 84114c5df9..4444988e36 100644 --- a/drivers/usb/host/ehci-generic.c +++ b/drivers/usb/host/ehci-generic.c @@ -6,6 +6,7 @@ #include #include +#include #include #include "ehci.h" @@ -20,7 +21,7 @@ struct generic_ehci { static int ehci_usb_probe(struct udevice *dev) { - struct ehci_hccr *hccr = (struct ehci_hccr *)dev_get_addr(dev); + struct ehci_hccr *hccr; struct ehci_hcor *hcor; int i; @@ -36,6 +37,7 @@ static int ehci_usb_probe(struct udevice *dev) clk_dev->name, clk_id); } + hccr = map_physmem(dev_get_addr(dev), 0x100, MAP_NOCACHE); hcor = (struct ehci_hcor *)((uintptr_t)hccr + HC_LENGTH(ehci_readl(&hccr->cr_capbase))); -- 2.25.1