Skip to contentSkip to conversation

MTD: linux-2.4.0-test9 on a PowerPC board.

DISCUSSION Brendan J Simon 2 participants 2 messages Jan 25, 2001 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

My company has a custom PowerPC board with a DOC2000 (8MB) on it. I am trying to get linux-2.4.0-test9 running on it with the MTD drivers. We think the DOC was detected initially but it seems that NFTL media header has been blown away. I think this happened when we tried to write to it or format the device.

Trying to debug things we have noticed that some of the data returned has the bytes swapped. It seems the NUM ERASE UNITS is returning 0xFA03 where as it should be returning 0x03FA. It looks like an endian problem. Is the DOC code endian neutral ?? Will the endian problems be rampant throughout the code or will it be confined to a few places ??

Has anyone used a DOC on a PowerPC processor or other big endian architecture ??

Thanks for any help,
Brendan Simon.

To unsubscribe, send "unsubscribe mtd" to [email protected]

#1 lore raw
Quoted 6 lines · [email protected] said:

Trying to debug things we have noticed that some of the data returned has the bytes swapped. It seems the NUM ERASE UNITS is returning
0xFA03 where as it should be returning 0x03FA. It looks like an endian problem. Is the DOC code endian neutral ?? Will the endian problems be rampant throughout the code or will it be confined to a few places ??

We don't actually seem to use NumEraseUnits, although I have absolutely no recollection _why_ not. But that would explain why we never bother to byteswap it. The code is intended to be endian-aware, although I've personally only tested it on LE machines, so I wouldn't swear that I've caught all cases.

Quoted 2 lines

Has anyone used a DOC on a PowerPC processor or other big endian architecture ??

It's been known, but I can't remember whether the person who asked me about it ever admitted to it in public.

--
dwmw2

To unsubscribe, send "unsubscribe mtd" to [email protected]