mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 2.4.18pre4 on PPC, Byteswap in dmasound_awacs.c
@ 2002-01-19 15:11 Lukas Geyer
  2002-01-19 16:18 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 2+ messages in thread
From: Lukas Geyer @ 2002-01-19 15:11 UTC (permalink / raw)
  To: linux-kernel, linuxppc-dev

I have an ibook2 and the Keylargo controller of this laptop seems not to
be able to do hardware byteswap. However, the driver set hw_can_byteswap
to 1 due to the following in drivers/sound/dmasound/dmasound_awacs.h:

+       struct device_node *mio ;
+       unsigned int *p, rev = 0 ;
+
+       /* if seems that Keylargo (at least rev2) can't byte-swap  */
+
+       for (mio = io->parent; mio ; mio = mio->parent) {
+               if (strcmp(mio->name, "mac-io") == 0) {
+                       if (device_is_compatible(mio, "Keylargo")){
+                               p = (unsigned int *)
+                                       get_property(mio, "revision-id", 0);
+                               if (p)
+                                       rev = *p ;
+                       }
+                       break;
+                }
+       }
+       if (rev >= 2) {
+               hw_can_byteswap = 0;

My Keylargo controller reports 0 as the revision number, thus it might
either be advisable to put that hw_can_byteswap = 0 into the innermost
block and not check the revision at all (if no Keylargo can do byteswap)
or or to put a check for revision <= 2 (after all, isn't it logical to
assume that only later revisions will be able to do byteswap?) inside the
innermost block and set hw_can_byteswap to 0 there.

Lukas


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

end of thread, other threads:[~2002-01-19 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-19 15:11 2.4.18pre4 on PPC, Byteswap in dmasound_awacs.c Lukas Geyer
2002-01-19 16:18 ` Benjamin Herrenschmidt

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

all inboxes | Powered by JetHome®