more confusion: how to define a map_info for multi-chip board?
Robert P. J. Day
rpjday at mindspring.com
Fri Jul 2 10:00:07 EDT 2004
another (annoyingly, i'm sure) picky question about rewriting my
rpxlite.c file to add command line parsing.
what's the proper protocol for defining a map_info structure for a
board that has multiple flash chips to support a single address space?
in the case of an rpxlite board, the default rpxlite.c reads as
follows:
==============================
#define WINDOW_ADDR 0xfe000000
#define WINDOW_SIZE 0x800000 (8M chip, but there are four of them)
static struct mtd_info *mymtd;
static struct map_info rpxlite_map = {
.name = "RPX",
.size = WINDOW_SIZE, (so map_info defines size of 8M ...)
.buswidth = 4,
.phys = WINDOW_ADDR,
};
int __init init_rpxlite(void)
{
printk(KERN_NOTICE "...", WINDOW_SIZE*4, WINDOW_ADDR);
rpxlite_map.virt = (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE * 4);
================================
but obviously, the actual mapping has to take into account that there
are 4 of those chips: "WINDOW_SIZE * 4". so i'm concluding that, in
cases like this, the map_info size should represent a single chip,
while the remapping should obviously refer to the entire address
space, is this correct?
almost there ...
rday
More information about the linux-mtd
mailing list