From: "Franck Bui-Huu" <vagabon.xyz@gmail.com>
To: linux-mtd@lists.infradead.org
Cc: Franck <vagabon.xyz@gmail.com>, Nicolas Pitre <nico@cam.org>
Subject: Reduce the size of a probed flash for broken HW
Date: Mon, 24 Apr 2006 16:40:34 +0200 [thread overview]
Message-ID: <cda58cb80604240740j62e51ecctb3ad75673b98445a@mail.gmail.com> (raw)
[discussed with Vitaly Wool on IRC]
My hardware has some problem to access my onboard flashes specially
the last 64Ko of them. So I need a way to restrict access to these areas.
Several solutions comes in mind:
- In the mapping driver, try to modify the mtd_info and cfi_info
setup by the MTD probing functions to reduce the detected
size. This solution is really hackish since it modifies internal
structures of the MTD layer that the mapping driver is not
supposed to be aware of. I just did this in my driver:
*mtd = do_map_probe("xxx_probe", map);
while ((*mtd)->size > 32Mo - 64Ko)
(*mtd)->size -= (*mtd)->erasesize;
and it seems to work fine...
- Use a partition that exclude the last 64Ko of the flash. This
solution was suggested by Nicolas Pitre, but I think it imposes
some restrictions on flash concatenation for example.
- Modify the common MTD layer to take into account the value of the
mapping size given by the hardware: if the driver setup a mapping
size of the flash lesser than the real flash size then the MTD
layer should use the map size instead of simply ignoring it. Thus
the MTD layer gives the opportunity to the driver to reduce the
size of the flash.
Can anybody gives some feedback or others solutions ?
Thanks
--
Franck
[Please CC me, I'm not subscribed to this list]
next reply other threads:[~2006-04-24 14:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-24 14:40 Franck Bui-Huu [this message]
2006-04-24 15:07 ` Reduce the size of a probed flash for broken HW Nicolas Pitre
2006-04-25 9:19 ` Franck Bui-Huu
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=cda58cb80604240740j62e51ecctb3ad75673b98445a@mail.gmail.com \
--to=vagabon.xyz@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=nico@cam.org \
/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