From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] ARM: board: cm_fx6: fixup mtd partitions in the fdt
Date: Thu, 23 Jun 2016 11:56:12 +0300 [thread overview]
Message-ID: <576BA42C.9010209@compulab.co.il> (raw)
In-Reply-To: <c31bb7613e2b4c3993cc6e933c1261d2@rwthex-s1-b.rwth-ad.de>
Hi Christopher,
On 06/22/2016 10:21 PM, Christopher Spinrath wrote:
> Hi Igor,
>
> On 06/22/2016 06:02 PM, Igor Grinberg wrote:
>> Hi Christopher,
>>
>> On 06/19/2016 06:44 PM, Christopher Spinrath wrote:
>>> The cm-fx6 module has an on-board st,m25p compatible spi flash chip
>>> used for u-boot (binary & environment). Overwrite the partitions in
>>> the device tree by the partition table provided in the mtdparts
>>> environment variable, if it is set.
>>>
>>> This allows to specify a kernel independent partitioning in the
>>> environment and provides a convient way for the user to adapt the
>>> partition table.
>>>
>>> Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
>>> ---
>>> board/compulab/cm_fx6/cm_fx6.c | 16 +++++++++++++++-
>>> 1 file changed, 15 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
>>> index 712057a..81a7ae2 100644
>>> --- a/board/compulab/cm_fx6/cm_fx6.c
>>> +++ b/board/compulab/cm_fx6/cm_fx6.c
[...]
>>> @@ -28,6 +29,7 @@
>>> #include <asm/io.h>
>>> #include <asm/gpio.h>
>>> #include <dm/platform_data/serial_mxc.h>
>>> +#include <jffs2/load_kernel.h>
>>
>> Why is this needed?
>>
> The MTD_DEV_TYPE_NOR constant is defined in this header. I agree that it
> is a bit ugly but this header is used for the same purpose in other
> board files, too (e.g.board/pdm360ng/pdm360ng.c).
I see.
I don't feel right to request this in scope of these patches, but
if you can take care of that one (even in a follow up patch) - it would
be awesome.
[...]
>>> @@ -616,6 +626,10 @@ int ft_board_setup(void *blob, bd_t *bd)
>>> NULL, 0, 1);
>>> }
>>>
>>> +#ifdef CONFIG_FDT_FIXUP_PARTITIONS
>>> + fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
>>> +#endif
>>
>> I really dislike the ifdeffery inside functions.
>> Care to introduce a stub for the !CONFIG_FDT_FIXUP_PARTITIONS case in
>> include/fdt_support.h for this one?
>>
> Sure. Is the header the correct place for this or should I add a #else
> case in the .c file?
IMO, the header file is better for stubbing things out.
It does not require you to add .c into compilation.
There are also already several examples inside this header.
--
Regards,
Igor.
next prev parent reply other threads:[~2016-06-23 8:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-19 15:44 [U-Boot] [PATCH 0/3] ARM: imx: enhance support for the cm-fx6 module Christopher Spinrath
2016-06-19 15:44 ` [U-Boot] [PATCH 1/3] ARM: configs: cm_fx6: improve default environment Christopher Spinrath
2016-06-22 15:24 ` Igor Grinberg
2016-07-07 8:20 ` Nikita Kiryanov
2016-06-19 15:44 ` [U-Boot] [PATCH 2/3] ARM: board: cm_fx6: fixup mtd partitions in the fdt Christopher Spinrath
2016-06-22 16:02 ` Igor Grinberg
2016-06-22 16:17 ` Igor Grinberg
2016-07-07 8:53 ` Nikita Kiryanov
[not found] ` <2998896d159243199ecf53a75c1c6698@rwthex-s2-a.rwth-ad.de>
2016-07-07 13:30 ` Christopher Spinrath
2016-07-10 7:52 ` Nikita Kiryanov
[not found] ` <a2247b7ba1f141c3b8b5392e9164554e@rwthex-s2-a.rwth-ad.de>
2016-07-11 11:54 ` Christopher Spinrath
[not found] ` <fec86b5e27364c219569d1aa1297af83@rwthex-s2-a.rwth-ad.de>
2016-06-22 19:21 ` Christopher Spinrath
2016-06-23 8:56 ` Igor Grinberg [this message]
[not found] ` <c0cbb752390c4ad2b8e6f757c5251e86@rwthex-s1-a.rwth-ad.de>
2016-06-25 15:03 ` Christopher Spinrath
2016-06-19 15:44 ` [U-Boot] [PATCH 3/3] ARM: configs: cm_fx6: add mtd support Christopher Spinrath
2016-06-22 16:15 ` Igor Grinberg
[not found] ` <795d43d2bdc64a5d84abadcdbe528fdb@rwthex-w2-b.rwth-ad.de>
2016-06-22 19:27 ` Christopher Spinrath
2016-06-23 9:03 ` Igor Grinberg
[not found] ` <74b93a24448a4d4e93d5f1a2c28b1580@rwthex-w1-a.rwth-ad.de>
2016-06-25 15:05 ` Christopher Spinrath
2016-06-22 15:46 ` [U-Boot] [PATCH 0/3] ARM: imx: enhance support for the cm-fx6 module Igor Grinberg
[not found] ` <1510d02bba0b4658aa2f20276e484c76@rwthex-s2-b.rwth-ad.de>
2016-06-22 19:10 ` Christopher Spinrath
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=576BA42C.9010209@compulab.co.il \
--to=grinberg@compulab.co.il \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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