public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Martyn Welch <martyn.welch@gefanuc•com>
To: Milton Miller <miltonm@bga•com>,
	linuxppc-dev list <linuxppc-dev@ozlabs•org>
Subject: Re: [PATCH] powerpc: Add support to access the flash on SLOF based systems
Date: Mon, 12 Jan 2009 17:05:16 +0000	[thread overview]
Message-ID: <496B784C.5010800@gefanuc.com> (raw)
In-Reply-To: <20090110195040.GA19945@lisas.de>

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

  parent reply	other threads:[~2009-01-12 17:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-10 15:31 [PATCH] powerpc: Add support to access the flash on SLOF based systems Adrian Reber
2009-01-10 17:52 ` Milton Miller
2009-01-10 19:50   ` Adrian Reber
2009-01-12 15:51     ` Milton Miller
2009-01-14 15:56       ` Adrian Reber
2009-01-12 17:05     ` Martyn Welch [this message]
2009-01-12 17:29       ` Arnd Bergmann

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=496B784C.5010800@gefanuc.com \
    --to=martyn.welch@gefanuc$(echo .)com \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=miltonm@bga$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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