public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* [PATCH] [m68k] Atari: support for NetUSBee register access to isp116x.h
@ 2012-05-28 22:48 Michael Schmitz
  2012-05-29 20:46 ` Geert Uytterhoeven
  0 siblings, 1 reply; 16+ messages in thread
From: Michael Schmitz @ 2012-05-28 22:48 UTC (permalink / raw)
  To: Michael Schmitz; +Cc: linux-m68k, geert

Geert,

the following patch allows selecting the correct register access
macros depending on whether the EtherNAT or NetUSBee variant of the
ISP1160 chip is used. With this patch applied on top of the previous
two, it should be possible to test the NetUSBee USB port.

Cheers,

  Michael


index 198b4bb..c8f0612 100644
--- a/drivers/usb/host/isp116x.h
+++ b/drivers/usb/host/isp116x.h
@@ -367,16 +367,16 @@ struct isp116x_ep {

 #ifdef CONFIG_ATARI
   /* 16 bit data bus byte swapped in hardware */
-#define isp_readw               __raw_readw
-#define isp_writew              __raw_writew
-#define isp_raw_readw           readw
-#define isp_raw_writew          writew
+#define isp_readw(p)           (__pa(p) < 1024 ? raw_rom_inw((p)) :
__raw_readw((p)))
+#define isp_writew(v,p)                (__pa(p) < 1024 ?
raw_rom_outw((v),(p)) : __raw_writew((v),(p)))
+#define isp_raw_readw(p)       (__pa(p) < 1024 ? rom_in_le16((p)) : readw((p)))
+#define isp_raw_writew(v,p)    (__pa(p) < 1024 ?
rom_out_le16((p),(v)) : writew((v),(p)))
 #else
   /* sane hardware */
-#define isp_readw               readw
-#define isp_writew              writew
-#define isp_raw_readw           __raw_readw
-#define isp_raw_writew          __raw_writew
+#define isp_readw              readw
+#define isp_writew             writew
+#define isp_raw_readw          __raw_readw
+#define isp_raw_writew         __raw_writew
 #endif

 static inline void isp116x_write_addr(struct isp116x *isp116x, unsigned reg)

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

end of thread, other threads:[~2012-06-05 20:05 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-28 22:48 [PATCH] [m68k] Atari: support for NetUSBee register access to isp116x.h Michael Schmitz
2012-05-29 20:46 ` Geert Uytterhoeven
2012-06-01 18:46   ` Michael Schmitz
2012-06-01 19:06     ` Geert Uytterhoeven
     [not found]   ` <CAOmrzk+2bYgDNtcW6DVy4WYT2i+07n8xR4bbNbwFJ@mail.gmail.com>
2012-06-05 15:51     ` Thorsten Glaser
2012-06-05 16:20       ` Geert Uytterhoeven
2012-06-05 16:26         ` Thorsten Glaser
2012-06-05 16:45           ` Geert Uytterhoeven
2012-06-05 17:53           ` Andreas Schwab
2012-06-05 17:57             ` Thorsten Glaser
2012-06-05 18:36               ` Andreas Schwab
2012-06-05 19:52               ` Geert Uytterhoeven
2012-06-05 19:59                 ` Thorsten Glaser
2012-06-05 16:38       ` Andreas Schwab
2012-06-05 16:51         ` Thorsten Glaser
2012-06-05 19:43           ` Geert Uytterhoeven

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