From: Adam Yergovich <ayergo@jkmicro.com>
To: Wolfgang Wegner <wolfgang@leila.ping.de>
Cc: linux-mtd@lists.infradead.org, Mike Frysinger <vapier.adi@gmail.com>
Subject: Re: Access entire device with mtdblock0
Date: Fri, 30 Jan 2009 16:08:08 -0800 [thread overview]
Message-ID: <49839668.20502@jkmicro.com> (raw)
In-Reply-To: <20090114115056.GD7994@leila.ping.de>
Wolfgang Wegner wrote:
> On Wed, Jan 14, 2009 at 05:58:43AM -0500, Mike Frysinger wrote:
>> On Wed, Jan 14, 2009 at 04:00, Peter Korsgaard wrote:
>>> "Mike" == Mike Frysinger <writes:
>>>>> Any recommendations on a simple way to create a partition using the
>>>>> entirety of flash?
>>>> looks like no one responded. i'm pretty sure the answer is to use
>>>> add_mtd_device() even in face of add_mtd_partitions().
>>> Why not just add a partition spanning the entire device in addition to
>>> the other partitions?
>> i was not aware partition tables allowed for overlaps. if that's
>> true, then the answer is obvious and easy to implement in boards ...
>
> They are allowed, but I have not been able yet to do a correct query
> for erase_size in case of a partition covering a whole device having
> multiple different-sized erase regions.
>
> Regards,
> Wolfgang
Hello All,
Sorry for the delay in trying this out, I have been exceptionally busy.
The short story is: i got it all to work.
The long story is:
In reviewing the code i found that add_mtd_device was already being
called after the partitioning. As it wasn't giving mtdblock0 as the
entire region it didn't seem to be the solution.
I played around some more, and found disabling the mtd partitioning
would give me one partition including all of flash. If you'll note in
the code (which has been present in physmap.c for some time i believe)
it was getting to the add_mtd_device and adding it if and only if the
redboot section was not called.
I moved the add_mtd_device() call to before the redboot partitioning and
it all worked brilliantly.
I would like to suggest that this is perhaps a better construct overall
as it adds a nice feature.
Hopefully this is at very least useful to someone who looks at this in
the future. I thank you all for your help in this.
-Adam
next prev parent reply other threads:[~2009-01-31 0:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-10 0:58 Access entire device with mtdblock0 Adam Yergovich
2009-01-10 1:51 ` Jamie Lokier
2009-01-13 23:10 ` Mike Frysinger
2009-01-14 9:00 ` Peter Korsgaard
2009-01-14 10:58 ` Mike Frysinger
2009-01-14 11:09 ` Peter Korsgaard
2009-01-14 11:25 ` Ricard Wanderlof
2009-01-14 11:50 ` Wolfgang Wegner
2009-01-14 17:06 ` Adam Yergovich
2009-01-31 0:08 ` Adam Yergovich [this message]
2009-02-05 22:56 ` hartleys
2009-02-06 0:32 ` Adam Yergovich
2009-02-09 13:15 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49839668.20502@jkmicro.com \
--to=ayergo@jkmicro.com \
--cc=linux-mtd@lists.infradead.org \
--cc=vapier.adi@gmail.com \
--cc=wolfgang@leila.ping.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox