From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Reg. CFI flash_init and hardware write protected devices
Date: Fri, 24 Jun 2011 16:26:49 +0200 [thread overview]
Message-ID: <20110624142649.059831FDF12@gemini.denx.de> (raw)
In-Reply-To: <BANLkTimt0LYXr-B5PAr1ONEaEoWKCyEHbw@mail.gmail.com>
Dear =?ISO-8859-1?Q?Frank_Svendsb=F8e?=,
In message <BANLkTimt0LYXr-B5PAr1ONEaEoWKCyEHbw@mail.gmail.com> you wrote:
>
> Hi Wolfgang, I did as you recommended and replaced cfi-flash with
> mtd-ram in the device tree. I also defined CONFIG_MTD_PHYSMAP_OF,
> CONFIG_MTD_MTDRAM, CONFIG_MTDRAM_TOTAL_SIZE according to our
> specifications. The default erase-size was 128k, which is what we have
> too, so I didn't touch that. Now when I boot the kernel recognizes all
> the partitions I've defined in the dts. But, when mounting a
> jffs2-filesystem, it ends with a jffs2_scan_eraseblock(): Magic
> bitmask 0x1985 not found...
>
> Do you have any other tips?
Difficult to speculate - I don't know your hardware (eventually you
have two 16 bit flash chips in parallel to build a 32 bit bus, and
have to double the chip's erase block size?), and I don;t know how you
created the JFFS2 file system.
Are you sure you want to use JFFS2? UBIFS is considered to be a
better choice these days...
> When working with this, I realised that if I could get it to work we'd
> still might have a problem. You see, we need write access for one of
> the flashes when upgrading software. We can't treat this as a simple
> ROM. So do we need CFI working in order to set the device into
> write-mode, erase flash sectors, etc.? Or do mtd-ram handle flash
> write operations too?
mtd-ram provides a pure memory interface, i. e. you cannot use this to
erase or program any blocks in a CFI flash device. To do so, you need
the CFI driver.
> In theory, I guess I could unmount the root fs, unload the mtd module,
> insert the cfi-flash module, mount the filesystem, then write, etc..
Yes, or you could start with the CFI driver in the first place.
> But isn't that harder than write a custom map driver?
I consider your chances to get such a customdriver into mainline to be
epsilon. And you don't really want to use any out of tree drivers.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If you're out of tree, you don't exist.
- David Woodhouse in <1304620350.2398.29.camel@i7.infradead.org>
next prev parent reply other threads:[~2011-06-24 14:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-31 8:35 [U-Boot] Reg. CFI flash_init and hardware write protected devices Frank Svendsbøe
2011-05-31 12:49 ` Mike Frysinger
2011-05-31 13:25 ` Frank Svendsbøe
2011-05-31 14:01 ` Mike Frysinger
2011-05-31 13:10 ` Stefan Roese
2011-05-31 13:55 ` Frank Svendsbøe
2011-05-31 14:37 ` Stefan Roese
2011-06-01 14:33 ` Frank Svendsbøe
2011-06-01 15:34 ` Stefan Roese
2011-06-01 16:59 ` Frank Svendsbøe
2011-06-23 13:50 ` Frank Svendsbøe
2011-06-23 15:21 ` Wolfgang Denk
2011-06-23 16:15 ` Frank Svendsbøe
2011-06-23 17:55 ` Wolfgang Denk
2011-06-23 19:05 ` Frank Svendsbøe
2011-06-24 13:59 ` Frank Svendsbøe
2011-06-24 14:26 ` Wolfgang Denk [this message]
2011-06-24 19:58 ` Frank Svendsbøe
2011-06-24 20:26 ` Wolfgang Denk
2011-06-24 21:12 ` Frank Svendsbøe
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=20110624142649.059831FDF12@gemini.denx.de \
--to=wd@denx.de \
--cc=u-boot@lists.denx.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