[PATCH] powerpc: Add support to access the flash on SLOF based systems

Martyn Welch martyn.welch at gefanuc.com
Tue Jan 13 04:05:16 EST 2009


Adrian Reber wrote:
> On Sat, Jan 10, 2009 at 11:52:56AM -0600, Milton Miller wrote:
>> 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



More information about the Linuxppc-dev mailing list