All of lore.kernel.org
 help / color / mirror / Atom feed
From: Troy Kisky <troy.kisky@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] imx-common: cpu: add fdt_file environment variable
Date: Mon, 31 Mar 2014 11:36:55 -0700	[thread overview]
Message-ID: <5339B5C7.3090604@boundarydevices.com> (raw)
In-Reply-To: <53375325.1080402@boundarydevices.com>

On 3/29/2014 4:11 PM, Eric Nelson wrote:
> Hi Troy,
> 
> On 03/29/2014 03:34 PM, Troy Kisky wrote:
>> This removes one block in the move toward 1 u-boot
>> for both a mx6q (quad) and mx6dl (duallite) processor.
>>
>> Now fdt_file hardcoded value can be removed.
>>
>> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
>> ---
>>   arch/arm/imx-common/cpu.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
>>   arch/arm/lib/board.c      |  7 +++++++
>>   2 files changed, 51 insertions(+)
>>
>> diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c
>> index a77c4de..5d48011 100644
>> --- a/arch/arm/imx-common/cpu.c
>> +++ b/arch/arm/imx-common/cpu.c
>> @@ -180,3 +180,47 @@ void arch_preboot_os(void)
>>       ipuv3_fb_shutdown();
>>   }
>>   #endif
>> +
>> +const char *get_dtb_prefix(u32 imxtype)
>> +{
>> +    switch (imxtype) {
>> +    case MXC_CPU_MX6Q:
>> +    case MXC_CPU_MX6D:
>> +        return "imx6q";        /* Quad/Dual-core version of the mx6 */
>> +    case MXC_CPU_MX6DL:
>> +    case MXC_CPU_MX6SOLO:
>> +        return "imx6dl";    /* Dual Lite/Solo version of the mx6 */
>> +    case MXC_CPU_MX6SL:
>> +        return "imx6sl";    /* Solo-Lite version of the mx6 */
>> +    case MXC_CPU_MX51:
>> +        return "imx51";
>> +    case MXC_CPU_MX53:
>> +        return "imx53";
>> +    }
>> +    return "??";
>> +}
>> +
> 
> I really dislike this implementation of naming policy in code.


It is not truly a policy. It is a convenience which can be ignored
if so desired. Though I do agree that cpu and board environment variables
would also be useful. Still, a cpu variable would still require
some scripting to combine the quad/dual, duallite/solo. So, your
way is not as convenient for dtb file names.


Troy

  reply	other threads:[~2014-03-31 18:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-29 22:34 [U-Boot] [PATCH 1/1] imx-common: cpu: add fdt_file environment variable Troy Kisky
2014-03-29 23:04 ` Otavio Salvador
2014-03-30 14:52   ` Marek Vasut
2014-03-31 18:30     ` Troy Kisky
2014-03-29 23:11 ` Eric Nelson
2014-03-31 18:36   ` Troy Kisky [this message]
2014-03-31 19:22     ` Marek Vasut
2014-03-31 19:38       ` Otavio Salvador
2014-03-31 19:47         ` Marek Vasut
2014-03-31 21:09           ` Troy Kisky
2014-04-01  7:45             ` Marek Vasut
2014-03-30 16:30 ` Stefano Babic
2014-03-31 18:29   ` Troy Kisky

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=5339B5C7.3090604@boundarydevices.com \
    --to=troy.kisky@boundarydevices.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.