* Passing arguments to cmdline or changing the devicetree node??
@ 2015-07-07 13:50 gianluca
2015-07-13 12:50 ` Fabio Estevam
0 siblings, 1 reply; 2+ messages in thread
From: gianluca @ 2015-07-07 13:50 UTC (permalink / raw)
To: linux-arm-kernel
Hello list,
I was thinking which is the best method to ensure a fallback
compatibility to old boards when a single board has changed something in
hardware.
I will explain better:
I designed a board running linux (on iMX28) which had 128MB and the
first stage bootstrap is programming the DDR2 controller to match the
memory timings.
The bootloader had the memory size hardcoded, but it is not a problem
because nothing on the bootloader is using it (maybe some atag for old
compatibility, I need to check this out)
The bootloader now loads linux and the devicetree flattened blob and
pass it to the kernel.
In the .dts I have a node called:
> memory {
> reg = <0x40000000 0x08000000>;
> };
and it is fixed.
Now we need to update the memory onboard up to 256Mb or 512Mb, and if I
can test easily on the fist stage bootstrap (programming the DDR2
controller for 256Mb and writing on memory above 128Mb and if it works I
have could have 256Mb or more, for example) I need a procedure to change
the memory node on the dts.
I was thinking of two ways:
1- The bootloader can check the DDR2 registers and find out how much
memory is installed on board, and pass mem=128M, mem=256M or higher to
the kernel. But what about the node on the device tree?
2- The bootloader can select the right .dts file from file-system
choosing one of the following: dts-128M, dts-256M or dts-512M.
All those dts are EQUAL apart the memory descriptor values.
Are there any other way to have this beahviour???
Best regards,
--
Eurek s.r.l. |
Electronic Engineering | http://www.eurek.it
via Celletta 8/B, 40026 Imola, Italy | Phone: +39-(0)542-609120
p.iva 00690621206 - c.f. 04020030377 | Fax: +39-(0)542-609212
^ permalink raw reply [flat|nested] 2+ messages in thread
* Passing arguments to cmdline or changing the devicetree node??
2015-07-07 13:50 Passing arguments to cmdline or changing the devicetree node?? gianluca
@ 2015-07-13 12:50 ` Fabio Estevam
0 siblings, 0 replies; 2+ messages in thread
From: Fabio Estevam @ 2015-07-13 12:50 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jul 7, 2015 at 10:50 AM, gianluca <gianlucarenzi@eurek.it> wrote:
> Hello list,
> I was thinking which is the best method to ensure a fallback compatibility
> to old boards when a single board has changed something in hardware.
>
> I will explain better:
>
> I designed a board running linux (on iMX28) which had 128MB and the first
> stage bootstrap is programming the DDR2 controller to match the memory
> timings.
> The bootloader had the memory size hardcoded, but it is not a problem
> because nothing on the bootloader is using it (maybe some atag for old
> compatibility, I need to check this out)
> The bootloader now loads linux and the devicetree flattened blob and pass it
> to the kernel.
> In the .dts I have a node called:
>
>> memory {
>> reg = <0x40000000 0x08000000>;
>> };
>
>
> and it is fixed.
>
> Now we need to update the memory onboard up to 256Mb or 512Mb, and if I can
> test easily on the fist stage bootstrap (programming the DDR2 controller for
> 256Mb and writing on memory above 128Mb and if it works I have could have
> 256Mb or more, for example) I need a procedure to change the memory node on
> the dts.
You could simply remove the memory node from your dts and let the
bootloader pass it to the kernel.
Regards,
Fabio Estevam
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-13 12:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-07 13:50 Passing arguments to cmdline or changing the devicetree node?? gianluca
2015-07-13 12:50 ` Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).