Re: [PATCH] powerpc: Add support to access the flash on SLOF based systems
From: Martyn Welch <hidden>
Date: 2009-01-12 17:05:28
Adrian Reber wrote:
On Sat, Jan 10, 2009 at 11:52:56AM -0600, Milton Miller wrote:quoted
Normally such drivers are written and mtd drivers. If slof were not an of implementation I would just say put the right properties on the node in the device tree, but the kernel should adapt to real OF. It should be easy to write a driver to hook up a mtd platform device if this is a direct mapped flash.The reason why I did not use mtd is that part of the flash is used by the firmware image and I do not know if that works with mtd, if only a part of the flash can be used. SLOF does also a "CRC" check over the firmware image, so that image must have valid SLOF "CRC". The flash is a direct mapped flash, but the size of the firmware can vary.
It can. MTD can create "partitions" within the flash, for an example see lines 84-110 of arch/powerpc/bootdts/sbc8641d.dts (http://tinyurl.com/7k2kym) Partitions can also be labeled as read-only, I guess the CRC could be checked from userspace as necessary. HTH, Martyn -- Martyn Welch MEng MPhil MIET (Principal Software Engineer) T:+44(0)1327322748 GE Fanuc Intelligent Platforms Ltd, |Registered in England and Wales Tove Valley Business Park, Towcester, |(3828642) at 100 Barbirolli Square, Northants, NN12 6PF, UK T:+44(0)1327359444 |Manchester,M2 3AB VAT:GB 729849476