Skip to contentSkip to conversation

Accessing flash on a PCI card

DISCUSSION Amit Shah 2 participants 3 messages Jul 6, 2004 – Jul 7, 2004 Memory technology devices (MTD)

lore
Share & tools
lore

Amit Shah

author
#0 lore raw

Hi all,

I have a PCI card that has Intel Flash. I've cooked up a small driver (the host kernel is 2.6.6) that iomaps the base address exported by the PCI BARs and can verify that it's an intel flash by doing some config- write and read sequences.

I now want to export the flash to userspace for reading / writing to the flash. I guess it would be better to let MTD handle the stuff than me doing things all over again. So, how can I access that flash memory over the PCI with MTD?

Thanks for any hints,
Amit.

Signature · 2 lines
Amit Shah
http://amitshah.nav.to/
#1 lore raw
Quoted 9 lines · Amit Shah

I have a PCI card that has Intel Flash. I've cooked up a small driver (the host kernel is 2.6.6) that iomaps the base address exported by the PCI BARs and can verify that it's an intel flash by doing some config- write and read sequences.

I now want to export the flash to userspace for reading / writing to the flash. I guess it would be better to let MTD handle the stuff than me doing things all over again. So, how can I access that flash memory over the PCI with MTD?

Look at
drivers/mtd/maps/pci.c and other files using PCI in the same folder

Thomas

author
#2 lore raw
Quoted 6 lines · Thomas Gleixner
Quoted 5 lines · Amit Shah

I have a PCI card that has Intel Flash. I've cooked up a small driver (the host kernel is 2.6.6) that iomaps the base address exported by the PCI BARs and can verify that it's an intel flash by doing some config- write and read sequences.

Quoted 7 lines
Quoted 4 lines

I now want to export the flash to userspace for reading / writing to the flash. I guess it would be better to let MTD handle the stuff than me doing things all over again. So, how can I access that flash memory over the PCI with MTD?

Look at
drivers/mtd/maps/pci.c and other files using PCI in the same folder

Thanks, Thomas!

Signature · 2 lines
Amit Shah
http://amitshah.nav.to/