All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] usb: ehci: Use map_physmem in ehci-generic
Date: Wed, 27 Jan 2016 03:14:00 +0100	[thread overview]
Message-ID: <1453860843-5835-2-git-send-email-marex@denx.de> (raw)
In-Reply-To: <1453860843-5835-1-git-send-email-marex@denx.de>

Some architectures, like MIPS, require remapping of the registers.
Add the map_physmem() call to handle it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
---
 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 1292caa..6d58ef8 100644
--- a/drivers/usb/host/ehci-generic.c
+++ b/drivers/usb/host/ehci-generic.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/io.h>
 #include <dm.h>
 #include "ehci.h"
 
@@ -19,9 +20,10 @@ 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;
 
+	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.1.4

  reply	other threads:[~2016-01-27  2:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27  2:13 [U-Boot] [PATCH 1/5] mips: cache: Bulletproof the code against cornercases Marek Vasut
2016-01-27  2:14 ` Marek Vasut [this message]
2016-01-27 14:21   ` [U-Boot] [PATCH 2/5] usb: ehci: Use map_physmem in ehci-generic Alexey Brodkin
2016-01-27 16:14     ` Marek Vasut
2016-01-27  2:14 ` [U-Boot] [PATCH 3/5] usb: ehci: Implement V2P mapping Marek Vasut
2016-02-26 16:48   ` Stephen Warren
2016-02-26 16:55     ` Marek Vasut
2016-02-26 18:16       ` Stephen Warren
2016-02-26 18:44         ` Marek Vasut
2016-02-26 19:12           ` Stephen Warren
2016-02-26 19:16             ` Marek Vasut
2016-01-27  2:14 ` [U-Boot] [PATCH 4/5] usb: ehci: Clear USBMODE_BE on LE MMIO Marek Vasut
2016-01-27  2:14 ` [U-Boot] [PATCH 5/5] usb: ehci: Be explicit about the BE IO accessors Marek Vasut
2016-01-27 14:56 ` [U-Boot] [PATCH 1/5] mips: cache: Bulletproof the code against cornercases Daniel Schwierzeck
2016-01-27 16:15   ` Marek Vasut
2016-02-01 21:29 ` Daniel Schwierzeck
2016-02-01 21:31   ` Marek Vasut
2016-02-01 21:40     ` Daniel Schwierzeck
2016-02-01 21:45       ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453860843-5835-2-git-send-email-marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.