public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] USB: fix those pesky aliasing warnings caused by gcc-4.2
@ 2008-04-23  8:53 Markus Klotzbücher
  2008-04-23  8:57 ` [U-Boot-Users] [PATCH] USB: remove a cpu bug workaround for an unsupported architecture Markus Klotzbücher
  2008-04-24 11:33 ` [U-Boot-Users] [PATCH] USB: fix those pesky aliasing warnings caused by gcc-4.2 Wolfgang Denk
  0 siblings, 2 replies; 4+ messages in thread
From: Markus Klotzbücher @ 2008-04-23  8:53 UTC (permalink / raw)
  To: u-boot


USB: fix those pesky aliasing warnings caused by gcc-4.2

Signed-off-by: Markus Klotzbuecher <mk@denx.de>
Signed-off-by: Detlev Zundel <dzu@denx.de>

---

 drivers/usb/usb_ohci.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/drivers/usb/usb_ohci.c b/drivers/usb/usb_ohci.c
index 5c201b3..d37a037 100644
--- a/drivers/usb/usb_ohci.c
+++ b/drivers/usb/usb_ohci.c
@@ -86,11 +86,11 @@
  * e.g. PCI controllers need this
  */
 #ifdef CFG_OHCI_SWAP_REG_ACCESS
-# define readl(a) __swap_32(*((vu_long *)(a)))
-# define writel(a, b) (*((vu_long *)(b)) = __swap_32((vu_long)a))
+# define readl(a) __swap_32(*((volatile u32 *)(a)))
+# define writel(a, b) (*((volatile u32 *)(b)) = __swap_32((volatile u32)a))
 #else
-# define readl(a) (*((vu_long *)(a)))
-# define writel(a, b) (*((vu_long *)(b)) = ((vu_long)a))
+# define readl(a) (*((volatile u32 *)(a)))
+# define writel(a, b) (*((volatile u32 *)(b)) = ((volatile u32)a))
 #endif /* CFG_OHCI_SWAP_REG_ACCESS */
 
 #define min_t(type,x,y) ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })


Best regards

Markus Klotzbuecher

--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office@denx.de

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

* [U-Boot-Users] [PATCH] USB: remove a cpu bug workaround for an unsupported architecture
  2008-04-23  8:53 [U-Boot-Users] [PATCH] USB: fix those pesky aliasing warnings caused by gcc-4.2 Markus Klotzbücher
@ 2008-04-23  8:57 ` Markus Klotzbücher
  2008-04-24 11:37   ` Wolfgang Denk
  2008-04-24 11:33 ` [U-Boot-Users] [PATCH] USB: fix those pesky aliasing warnings caused by gcc-4.2 Wolfgang Denk
  1 sibling, 1 reply; 4+ messages in thread
From: Markus Klotzbücher @ 2008-04-23  8:57 UTC (permalink / raw)
  To: u-boot


USB: remove a cpu bug workaround for an unsupported architecture.

Signed-off-by: Markus Klotzbuecher <mk@denx.de>

---

 drivers/usb/usb_ohci.c |   22 ++++------------------
 1 files changed, 4 insertions(+), 18 deletions(-)


diff --git a/drivers/usb/usb_ohci.c b/drivers/usb/usb_ohci.c
index d37a037..ee0f2e4 100644
--- a/drivers/usb/usb_ohci.c
+++ b/drivers/usb/usb_ohci.c
@@ -138,28 +138,14 @@ int got_rhsc;
 /* device which was disconnected */
 struct usb_device *devgone;
 
-/*-------------------------------------------------------------------------*/
-
-/* AMD-756 (D2 rev) reports corrupt register contents in some cases.
- * The erratum (#4) description is incorrect.  AMD's workaround waits
- * till some bits (mostly reserved) are clear; ok for all revs.
- */
-#define OHCI_QUIRK_AMD756 0xabcd
-#define read_roothub(hc, register, mask) ({ \
-	u32 temp = readl (&hc->regs->roothub.register); \
-	if (hc->flags & OHCI_QUIRK_AMD756) \
-		while (temp & mask) \
-			temp = readl (&hc->regs->roothub.register); \
-	temp; })
-
-static u32 roothub_a (struct ohci *hc)
-	{ return read_roothub (hc, a, 0xfc0fe000); }
+static inline u32 roothub_a (struct ohci *hc)
+	{ return readl (&hc->regs->roothub.a); }
 static inline u32 roothub_b (struct ohci *hc)
 	{ return readl (&hc->regs->roothub.b); }
 static inline u32 roothub_status (struct ohci *hc)
 	{ return readl (&hc->regs->roothub.status); }
-static u32 roothub_portstatus (struct ohci *hc, int i)
-	{ return read_roothub (hc, portstatus [i], 0xffe0fce0); }
+static inline u32 roothub_portstatus (struct ohci *hc, int i)
+	{ return readl (&hc->regs->roothub.portstatus[i]); }
 
 /* forward declaration */
 static int hc_interrupt (void);


Best regards

     Markus

     
--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de

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

* [U-Boot-Users] [PATCH] USB: fix those pesky aliasing warnings caused by gcc-4.2
  2008-04-23  8:53 [U-Boot-Users] [PATCH] USB: fix those pesky aliasing warnings caused by gcc-4.2 Markus Klotzbücher
  2008-04-23  8:57 ` [U-Boot-Users] [PATCH] USB: remove a cpu bug workaround for an unsupported architecture Markus Klotzbücher
@ 2008-04-24 11:33 ` Wolfgang Denk
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2008-04-24 11:33 UTC (permalink / raw)
  To: u-boot

In message <87wsmpymt8.fsf@denx.de> you wrote:
> 
> USB: fix those pesky aliasing warnings caused by gcc-4.2

Please do not duplicate the subject line, or it will end up twice in
the commit log.

And - GCC just prints the warnings, they are caused by coding issues
:-)

> Signed-off-by: Markus Klotzbuecher <mk@denx.de>
> Signed-off-by: Detlev Zundel <dzu@denx.de>
> 
> ---
> 
>  drivers/usb/usb_ohci.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)

Applied - thanks a lot!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"A complex system that works is invariably found to have evolved from
a simple system that worked."             - John Gall, _Systemantics_

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

* [U-Boot-Users] [PATCH] USB: remove a cpu bug workaround for an unsupported architecture
  2008-04-23  8:57 ` [U-Boot-Users] [PATCH] USB: remove a cpu bug workaround for an unsupported architecture Markus Klotzbücher
@ 2008-04-24 11:37   ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2008-04-24 11:37 UTC (permalink / raw)
  To: u-boot

In message <87lk35ymma.fsf@denx.de> you wrote:
> 
> USB: remove a cpu bug workaround for an unsupported architecture.
> 
> Signed-off-by: Markus Klotzbuecher <mk@denx.de>
> 
> ---
> 
>  drivers/usb/usb_ohci.c |   22 ++++------------------
>  1 files changed, 4 insertions(+), 18 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Not one hundred percent efficient, of course ... but nothing ever is.
	-- Kirk, "Metamorphosis", stardate 3219.8

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

end of thread, other threads:[~2008-04-24 11:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23  8:53 [U-Boot-Users] [PATCH] USB: fix those pesky aliasing warnings caused by gcc-4.2 Markus Klotzbücher
2008-04-23  8:57 ` [U-Boot-Users] [PATCH] USB: remove a cpu bug workaround for an unsupported architecture Markus Klotzbücher
2008-04-24 11:37   ` Wolfgang Denk
2008-04-24 11:33 ` [U-Boot-Users] [PATCH] USB: fix those pesky aliasing warnings caused by gcc-4.2 Wolfgang Denk

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