* flash unlock on VPB
@ 2005-02-05 2:20 stiger
2005-02-05 2:39 ` Nicolas Pitre
0 siblings, 1 reply; 3+ messages in thread
From: stiger @ 2005-02-05 2:20 UTC (permalink / raw)
To: linux-mtd
hello,
i'm using VPB + kernel 2.6.9
but i found the flash cannot write, it should be unlocked first.
if not use root filesystem in flash, I can use flash_unlock to unlock the
flash.
but if burn root filesystem into flash, i have to change the kernel code.
i add these code at driver/mtd/mtdpart.c->add_mtd_partitions()
if((slave->mtd.flags & MTD_WRITEABLE) && slave->mtd.unlock ){
slave->mtd.unlock(&(slave->mtd), 0, slave->mtd.size );
}
now, it works.
but i think it's a stupid way to do this.
is there any other way to do this ?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: flash unlock on VPB
2005-02-05 2:20 flash unlock on VPB stiger
@ 2005-02-05 2:39 ` Nicolas Pitre
2005-02-05 3:14 ` stiger
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Pitre @ 2005-02-05 2:39 UTC (permalink / raw)
To: stiger; +Cc: linux-mtd
On Thu, 5 Feb 2004, stiger wrote:
> hello,
>
> i'm using VPB + kernel 2.6.9
> but i found the flash cannot write, it should be unlocked first.
>
> if not use root filesystem in flash, I can use flash_unlock to unlock the
> flash.
> but if burn root filesystem into flash, i have to change the kernel code.
>
> i add these code at driver/mtd/mtdpart.c->add_mtd_partitions()
>
> if((slave->mtd.flags & MTD_WRITEABLE) && slave->mtd.unlock ){
> slave->mtd.unlock(&(slave->mtd), 0, slave->mtd.size );
> }
>
> now, it works.
> but i think it's a stupid way to do this.
> is there any other way to do this ?
The unlock is usually called from the map driver in that case.
Nicolas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: flash unlock on VPB
2005-02-05 2:39 ` Nicolas Pitre
@ 2005-02-05 3:14 ` stiger
0 siblings, 0 replies; 3+ messages in thread
From: stiger @ 2005-02-05 3:14 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: linux-mtd
thx.
Is there any code to real call unlock?
i see many map drivers only set
.mask_flags = MTD_WRITEABLE
and then call add_mtd_partitions()
but i didn't see any real unlock in map drivers.
so, how can they do when they want to use writeable root filesystem in flash ?
----- Original Message -----
From: "Nicolas Pitre" <nico@cam.org>
To: "stiger" <bhe@jadechip.com>
Cc: <linux-mtd@lists.infradead.org>
Sent: Saturday, February 05, 2005 10:39 AM
Subject: Re: flash unlock on VPB
> On Thu, 5 Feb 2004, stiger wrote:
>
> > hello,
> >
> > i'm using VPB + kernel 2.6.9
> > but i found the flash cannot write, it should be unlocked first.
> >
> > if not use root filesystem in flash, I can use flash_unlock to unlock the
> > flash.
> > but if burn root filesystem into flash, i have to change the kernel code.
> >
> > i add these code at driver/mtd/mtdpart.c->add_mtd_partitions()
> >
> > if((slave->mtd.flags & MTD_WRITEABLE) && slave->mtd.unlock ){
> > slave->mtd.unlock(&(slave->mtd), 0, slave->mtd.size );
> > }
> >
> > now, it works.
> > but i think it's a stupid way to do this.
> > is there any other way to do this ?
>
> The unlock is usually called from the map driver in that case.
>
>
> Nicolas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-02-05 3:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-05 2:20 flash unlock on VPB stiger
2005-02-05 2:39 ` Nicolas Pitre
2005-02-05 3:14 ` stiger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox