Problem writing to flash with writeb()
Gettert, Wolfram
Wolfram.Gettert at fci.com
Wed Nov 13 03:12:59 EST 2002
Thanks for the hint.
I was really blind.
Wolfram
> -----Original Message-----
> From: J B [mailto:mad_flasher at hotmail.com]
> Sent: Dienstag, 12. November 2002 20:02
> To: Wolfram.Gettert at fci.com; linux-mtd at lists.infradead.org
> Subject: Re: Problem writing to flash with writeb()
>
>
>
> > physmap_map.map_priv_1 = (unsigned
> >long)ioremap_nocache(WINDOW_ADDR,WINDOW_SIZE);
> >
> > ...
> >
> > //Read Manufacturer and Device code
> > physmap_write8(&physmap_map,0x90,physmap_map.map_priv_1);
>
> Are you sure you want to pass physmap_map.map_priv_1 as the
> address? That
> would imply that the address you are writing 0x90 to is (2 *
> physmap_map.map_priv_1) because physmap_writeX will add
> map->map_priv_1 to
> whatever address you pass it. If that is bigger than
> WINDOW_SIZE, I don't
> think the command will actually reach the flash chip because
> the address
> isn't mapped to a flash chip. I am assuming you are using a
> cfi compliant
> flash chip and 0x90 is putting it into "Read Identifier
> Codes". Try using 0
> for the address instead, which is what you did below.
>
> >If I do it like this:
> >
> > p = physmap_map.map_priv_1;
> > p[0] = 0x90;
>
> Looks like this is the equivalent of:
> physmap_write8(&physmap_map,0x90,0);
>
>
> I could be very wrong however. I still consider myself a
> newbie, so sorry
> if this doesn't make any sense. Hope it helps though.
>
>
> Josh
>
> _________________________________________________________________
> The new MSN 8: smart spam protection and 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
More information about the linux-mtd
mailing list