* [U-Boot-Users] Wrong place to manage endianess for usbdev?
@ 2007-05-04 14:39 Rodolfo Giometti
0 siblings, 0 replies; only message in thread
From: Rodolfo Giometti @ 2007-05-04 14:39 UTC (permalink / raw)
To: u-boot
Hello,
I suppose is better using this patch:
diff --git a/include/usbdcore.h b/include/usbdcore.h
index cb2be72..72b9af2 100644
--- a/include/usbdcore.h
+++ b/include/usbdcore.h
@@ -56,10 +56,6 @@
#define usbinfo(fmt,args...) do{}while(0)
#endif
-#ifndef le16_to_cpu
-#define le16_to_cpu(x) (x)
-#endif
-
#ifndef inb
#define inb(p) (*(volatile u8*)(p))
#endif
Since defining le16_to_cpu() here is wrong. Each usbdevice driver
should be free of using itsown endianess definition.
In fact for my new driver I added:
diff --git a/drivers/usbtty.h b/drivers/usbtty.h
index 8154e30..051ead7 100644
--- a/drivers/usbtty.h
+++ b/drivers/usbtty.h
@@ -27,6 +27,8 @@
#include "usbdcore.h"
#if defined(CONFIG_PPC)
#include "usbdcore_mpc8xx.h"
+#elif defined(CONFIG_PXA27X)
+#include "usbdcore_pxa27x.h"
#elif defined(CONFIG_ARM)
#include "usbdcore_omap1510.h"
#endif
and inside usbdcore_pxa27x.h I use:
#include <asm/byteorder.h>
Ciao,
Rodolfo
P.S. Please note also that using CONFIG_ARM to include
usbdcore_omap1510.h is not the best... I think it should be replaced
with a proper CONFIG option.
--
GNU/Linux Solutions e-mail: giometti at enneenne.com
Linux Device Driver giometti at gnudd.com
Embedded Systems giometti at linux.it
UNIX programming phone: +39 349 2432127
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-05-04 14:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-04 14:39 [U-Boot-Users] Wrong place to manage endianess for usbdev? Rodolfo Giometti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox