[PATCH] adding ROM chips to device tree
Grant Likely
grant.likely at secretlab.ca
Fri Nov 3 02:31:57 EST 2006
On 11/2/06, Vitaly Wool <vwool at ru.mvista.com> wrote:
> Hello folks,
>
> inlined below is the patch which adds support for flash device descriptions to the OF device tree. It's inspired by and partially borrowed from Sergei's patch which can be found at http://patchwork.ozlabs.org/linuxppc/patch?id=6526 but arranges things in a different way.
> It should be used together with the corresponding MTD layer extension the current version of which was recently posted to linux-mtd list for discussion and can be found at http://lists.infradead.org/pipermail/linux-mtd/2006-November/016700.html.
> In fact, currently this description can handle only flash devices mapped into memory in a linear way. For NAND flashes we'll need a whole lot different description but let's solve problems as they arise since I'm not aware of any ppc board w/ NAND chip yet :)
>
> Documentation/powerpc/booting-without-of.txt | 37 +++++++++++++++++++++++++++
> arch/powerpc/sysdev/Makefile | 1
> arch/powerpc/sysdev/flash.c | 27 +++++++++++++++++++
> 3 files changed, 65 insertions(+)
>
> Signed-off-by: Vitaly Wool <vwool at ru.mvista.com>
>
> Index: powerpc/Documentation/powerpc/booting-without-of.txt
> ===================================================================
> --- powerpc.orig/Documentation/powerpc/booting-without-of.txt
> +++ powerpc/Documentation/powerpc/booting-without-of.txt
> @@ -1693,6 +1696,41 @@ platforms are moved over to use the flat
> };
> };
>
> + viii) Flash chip nodes
> +
> + Flash chips (Memory Technology Devices) are often used for solid state
> + file systems on embedded devices.
> +
> + Required properties:
> +
> + - device_type : has to be "rom"
> + - compatible : Should be the name of the MTD driver. Currently, this is
> + most likely to be "physmap".
> + - reg : Offset and length of the register set for the device.
> +
> + Recommended properties :
> +
> + - bank-width : Width of the flash data bus in bytes. Must be specified
> + for the NOR flashes.
> + - partitions : Several pairs of 32-bit values where the first value is
> + partition's offset from the start of the MTD device and the second
> + one is partition size in bytes with LSB used to signify a read only
> + partititon (so, the parition size should always be an even number).
> + - partition-names : The list of concatenated zero terminated strings
> + representing the partition names.
What about selecting driver; ie. CFI vs. non-CFI FLASH devices?
(Although I'm not sure that it really matters).
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195
More information about the Linuxppc-embedded
mailing list