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 5/5] usb: ehci: Be explicit about the BE IO accessors
Date: Wed, 27 Jan 2016 03:14:03 +0100	[thread overview]
Message-ID: <1453860843-5835-5-git-send-email-marex@denx.de> (raw)
In-Reply-To: <1453860843-5835-1-git-send-email-marex@denx.de>

Add explicit cpu_to_be32()/be32_to_cpu() conversion to BE EHCI I/O
accessors to align them with their LE counterpart. No functional
change.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
---
 drivers/usb/host/ehci.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index b41c04a..826b3fe 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -102,8 +102,9 @@ struct usb_linux_config_descriptor {
 } __attribute__ ((packed));
 
 #if defined CONFIG_EHCI_DESC_BIG_ENDIAN
-#define	ehci_readl(x)		(*((volatile u32 *)(x)))
-#define ehci_writel(a, b)	(*((volatile u32 *)(a)) = ((volatile u32)b))
+#define ehci_readl(x)		cpu_to_be32((*((volatile u32 *)(x))))
+#define ehci_writel(a, b)	(*((volatile u32 *)(a)) = \
+					cpu_to_be32(((volatile u32)b)))
 #else
 #define ehci_readl(x)		cpu_to_le32((*((volatile u32 *)(x))))
 #define ehci_writel(a, b)	(*((volatile u32 *)(a)) = \
-- 
2.1.4

  parent 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 ` [U-Boot] [PATCH 2/5] usb: ehci: Use map_physmem in ehci-generic Marek Vasut
2016-01-27 14:21   ` 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 ` Marek Vasut [this message]
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-5-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.