public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Becky Bruce <beckyb@kernel.crashing.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V5 02/10] drivers/usb/host/ohci-hcd: undef readl/writel before redefining
Date: Mon, 14 Jun 2010 19:56:12 -0500	[thread overview]
Message-ID: <1276563380-24592-3-git-send-email-beckyb@kernel.crashing.org> (raw)
In-Reply-To: <1276563380-24592-2-git-send-email-beckyb@kernel.crashing.org>

This avoids a build warning that you see if anyone in the
header chain has included io.h (which is coming shortly).  I
also move this to the "ohci.h" header file in the same dir,
which is cleaner.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
---
 drivers/usb/host/ohci-hcd.c |   11 -----------
 drivers/usb/host/ohci.h     |   13 +++++++++++++
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index b03a600..3ffdc9d 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -83,17 +83,6 @@
 #define OHCI_CONTROL_INIT \
 	(OHCI_CTRL_CBSR & 0x3) | OHCI_CTRL_IE | OHCI_CTRL_PLE
 
-/*
- * e.g. PCI controllers need this
- */
-#ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS
-# define readl(a) __swap_32(*((volatile u32 *)(a)))
-# define writel(a, b) (*((volatile u32 *)(b)) = __swap_32((volatile u32)a))
-#else
-# define readl(a) (*((volatile u32 *)(a)))
-# define writel(a, b) (*((volatile u32 *)(b)) = ((volatile u32)a))
-#endif /* CONFIG_SYS_OHCI_SWAP_REG_ACCESS */
-
 #define min_t(type, x, y) \
 		    ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
 
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index 79aa79d..fa4ecc8 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -7,6 +7,19 @@
  * usb-ohci.h
  */
 
+/*
+ * e.g. PCI controllers need this
+ */
+#undef readl
+#undef writel
+#ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS
+# define readl(a) __swap_32(*((volatile u32 *)(a)))
+# define writel(a, b) (*((volatile u32 *)(b)) = __swap_32((volatile u32)a))
+#else
+# define readl(a) (*((volatile u32 *)(a)))
+# define writel(a, b) (*((volatile u32 *)(b)) = ((volatile u32)a))
+#endif /* CONFIG_SYS_OHCI_SWAP_REG_ACCESS */
+
 /* functions for doing board or CPU specific setup/cleanup */
 extern int usb_board_init(void);
 extern int usb_board_stop(void);
-- 
1.6.0.6

  reply	other threads:[~2010-06-15  0:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-15  0:56 [U-Boot] [PATCH V5] PPC LBC/TLB cleanups; reginfo command for 85xx Becky Bruce
2010-06-15  0:56 ` [U-Boot] [PATCH V5 01/10] powerpc: Update configs to properly set FSL_ELBC Becky Bruce
2010-06-15  0:56   ` Becky Bruce [this message]
2010-06-15  0:56     ` [U-Boot] [PATCH V5 03/10] 83xx/85xx/86xx: LBC register cleanup Becky Bruce
2010-06-15  0:56       ` [U-Boot] [PATCH V5 04/10] mpc85xx: tlb.c cleanups Becky Bruce
2010-06-15  0:56         ` [U-Boot] [PATCH V5 05/10] mpc85xx: Add print_tlbcam() function Becky Bruce
2010-06-15  0:56           ` [U-Boot] [PATCH V5 06/10] drivers/misc/fsl_law.c: Rearrange code to avoid duplication Becky Bruce
2010-06-15  0:56             ` [U-Boot] [PATCH V5 07/10] fsl_law.c: Add print_laws() for FSL_CORENET platforms Becky Bruce
2010-06-15  0:56               ` [U-Boot] [PATCH V5 08/10] mpc85xx: Add reginfo command Becky Bruce
2010-06-15  0:56                 ` [U-Boot] [PATCH V5 09/10] powerpc 83xx/85xx: Merge lbc upmconfig code Becky Bruce
2010-06-15  0:56                   ` [U-Boot] [PATCH V5 10/10] MAKEALL: Add missing powerpc 36-bit targets Becky Bruce
2010-06-16  1:31                   ` [U-Boot] [PATCH V5 09/10] powerpc 83xx/85xx: Merge lbc upmconfig code Kim Phillips
2010-06-16 22:03                     ` Becky Bruce
2010-06-16  1:31       ` [U-Boot] [PATCH V5 03/10] 83xx/85xx/86xx: LBC register cleanup Kim Phillips
2010-06-16 21:59         ` Becky Bruce
2010-06-16  1:30   ` [U-Boot] [PATCH V5 01/10] powerpc: Update configs to properly set FSL_ELBC Kim Phillips

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=1276563380-24592-3-git-send-email-beckyb@kernel.crashing.org \
    --to=beckyb@kernel.crashing.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox