Skip to contentSkip to conversation

how to get MTD support - need expert input

DISCUSSION Tim Hockin 2 participants 2 messages Jun 13, 2001 Memory technology devices (MTD)

lore
Share & tools
lore

Tim Hockin

author
#0 lore raw

Hello, All.

I am trying to get the general MTD layer in linux to support our systems' flashroms. The problem is that our system setup is a bit unique.

We have 1 or 2 chips (so far all have been JEDEC). These may be of intermixable sizes from 512K to 4MB. They are mapped in the top 64k of address space (x86 compatible). To swap pages and banks, there is a custom flash page register, which has a few bits that determine teh actively mapped page.

So my question is this:

What is the best way for me get full support? Apparently all the JEDEC support in 2.4.5 is broken.

This is my thought:

have a map driver (like the other chipset map drivers) that builds it's own struct mtd_info. We can then flip pages at will, probe however we like, etc. I wish I could say that we will always have both flash chips identical, but I can't.

feedback?

Signature · 4 lines
Tim Hockin
Systems Software Engineer
Sun Microsystems, Cobalt Server Appliances
[email protected]
#1 lore raw
Quoted 2 lines · [email protected] said:

What is the best way for me get full support? Apparently all the
JEDEC support in 2.4.5 is broken.

Don't even look at the MTD support in 2.4.5. Use 2.4.6-pre3 or later. There should be something in that which should drive the chip - out of the jedec.c code, the amd_flash.c code and the hack which detects such flash chips and uses the CFI driver backend.

If the chips are different you'll need to register them in separate 'map' drivers - we don't currently support having different chips in the same mapping, although that's relatively easily fixable if it's absolutely necessary.

Take a look a drivers/mtd/octagon-5066.c for inspiration. Get your mapping driver working with the map_rom chip driver first and then we can worry about the flash in it.

What flash chips are you likely to be using?

--
dwmw2