public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ehci-pci: Prepare for usage of readl()/writel() accessors
@ 2017-06-05  7:19 Alexey Brodkin
  2017-06-05 11:42 ` Marek Vasut
  0 siblings, 1 reply; 12+ messages in thread
From: Alexey Brodkin @ 2017-06-05  7:19 UTC (permalink / raw)
  To: u-boot

We used to have opencoded ehci_readl()/writel() which required no
external functions to be called.

Now with attempt to switch to generic readl()/writel() accessors
we see a missing declaration of those accessors in ehci-ppc4xx.
Something like that happens if applied
http://patchwork.ozlabs.org/patch/726714/:
--------------------------------->8---------------------------
  CC      drivers/usb/host/ehci-pci.o
In file included from drivers/usb/host/ehci-pci.c:14:0:
drivers/usb/host/ehci-pci.c: In function 'ehci_pci_init':
drivers/usb/host/ehci.h:108:36: warning: implicit declaration of function 'readl' [-Wimplicit-function-declaration]
 #define ehci_readl(x)  cpu_to_le32(readl(x))
                                    ^
drivers/usb/host/ehci.h:23:26: note: in definition of macro 'HC_LENGTH'
 #define HC_LENGTH(p)  (((p) >> 0) & 0x00ff)
                          ^
include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__cpu_to_le32'
 #define cpu_to_le32 __cpu_to_le32
                     ^~~~~~~~~~~~~
drivers/usb/host/ehci-pci.c:33:14: note: in expansion of macro 'ehci_readl'
    HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
              ^~~~~~~~~~
--------------------------------->8---------------------------

This the same fix as we have for "ehci-ppc4xx" in
83cb46c286b "ehci-ppc4xx: Prepare for usage of readl()/writel() accessors".

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
---
 drivers/usb/host/ehci-pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index f20fc3354cc0..dceba4bd7aa1 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <pci.h>
 #include <usb.h>
+#include <asm/io.h>
 
 #include "ehci.h"
 
-- 
2.7.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-06-15 17:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-05  7:19 [U-Boot] [PATCH] ehci-pci: Prepare for usage of readl()/writel() accessors Alexey Brodkin
2017-06-05 11:42 ` Marek Vasut
2017-06-05 12:03   ` Alexey Brodkin
2017-06-05 12:06     ` Marek Vasut
2017-06-05 12:24       ` Alexey Brodkin
2017-06-14  9:55       ` Alexey Brodkin
2017-06-15 17:00         ` Marek Vasut
2017-06-15 17:19           ` Tom Rini
2017-06-15 17:23             ` Marek Vasut
2017-06-15 17:48               ` Alexey Brodkin
2017-06-15 17:51                 ` Marek Vasut
2017-06-15 17:52                   ` Alexey Brodkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox