Messages in this thread |  | | Date | Sat, 19 Jan 2002 16:11:54 +0100 (CET) | | From | Lukas Geyer <> | | Subject | 2.4.18pre4 on PPC, Byteswap in dmasound_awacs.c |
| |
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
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |