public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] arm: mx6: tqma6: Extract baseboard configs into separate config file
Date: Thu, 12 Mar 2015 16:24:52 +0100	[thread overview]
Message-ID: <5501AFC4.3020805@denx.de> (raw)
In-Reply-To: <55019FEB.10800@tqsc.de>

Hi Markus,

On 12.03.2015 15:17, Markus Niebel wrote:
> I like the idea - did not know at time when we brought it to
 > mainline that splitting configs
> is an allowed way.

No, I'm not aware of such a thing. This proposed config file addition 
for the baseboard makes integration of multiple baseboards much easier 
than the current approach with the ugly #ifdef mess. So I definitely 
prefer this new version.

> See comment.

Okay. Some answers from me as well below.

> Am 12.03.2015 um 13:34 schrieb Stefan Roese:
>> This patch extracts all baseboard specific defines into a separate config file.
>> This makes it easier to add other baseboards that use the TQMa6 SoM.
>>
>> This patch will be used by the upcoming WRU-IV board support which also
>> uses the TQMa6 SoM.
>>
>> Signed-off-by: Stefan Roese <sr@denx.de>
>> Cc: Markus Niebel <Markus.Niebel@tq-group.com>
>> Cc: Stefano Babic <sbabic@denx.de>
>> ---
>>   include/configs/tqma6.h      | 52 ++++++++++----------------------------------
>>   include/configs/tqma6_mba6.h | 32 +++++++++++++++++++++++++++
>>   2 files changed, 43 insertions(+), 41 deletions(-)
>>   create mode 100644 include/configs/tqma6_mba6.h
>>
>> diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
>> index 9022550..69b6b57 100644
>> --- a/include/configs/tqma6.h
>> +++ b/include/configs/tqma6.h
>> @@ -35,16 +35,6 @@
>>   #define PHYS_SDRAM_SIZE			(1024u * SZ_1M)
>>   #endif
>>
>> -#if defined(CONFIG_MBA6)
>> -
>> -#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
>> -#define CONFIG_DEFAULT_FDT_FILE		"imx6dl-mba6x.dtb"
>> -#elif defined(CONFIG_MX6Q) || defined(CONFIG_MX6Q)
>> -#define CONFIG_DEFAULT_FDT_FILE		"imx6q-mba6x.dtb"
>> -#endif
>> -
>> -#endif
>> -
>>   #define CONFIG_DISPLAY_CPUINFO
>>   #define CONFIG_DISPLAY_BOARDINFO
>>   #define CONFIG_SYS_GENERIC_BOARD
>> @@ -85,11 +75,6 @@
>>
>>   /* I2C SYSMON (LM75) */
>>   #define CONFIG_DTT_LM75
>> -#if defined(CONFIG_MBA6)
>> -#define CONFIG_DTT_SENSORS		{ 0, 1 }
>> -#else
>> -#define CONFIG_DTT_SENSORS		{ 0 }
> This will be lost for baseboards not implementing DTT_SENSORS feature

I was wondering, why this define was there. And now its clear. Thanks. 
I'll update the patch accordingly.

>> -#endif
>>   #define CONFIG_DTT_MAX_TEMP		70
>>   #define CONFIG_DTT_MIN_TEMP		-30
>>   #define CONFIG_DTT_HYSTERESIS	3
>> @@ -150,38 +135,12 @@
>>   #define CONFIG_PHYLIB
>>   #define CONFIG_MII
>>
>> -#if defined(CONFIG_MBA6)
>> -
>> -#define CONFIG_FEC_XCV_TYPE		RGMII
>> -#define CONFIG_ETHPRIME			"FEC"
>> -
>> -#define CONFIG_FEC_MXC_PHYADDR		0x03
>> -#define CONFIG_PHY_MICREL
>> -#define CONFIG_PHY_KSZ9031
>> -
>> -#else
>> -
>> -#error "define PHY to use for your baseboard"
>> -
>> -#endif
>> -
>>   #define CONFIG_ARP_TIMEOUT		200UL
>>   /* Network config - Allow larger/faster download for TFTP/NFS */
>>   #define CONFIG_IP_DEFRAG
>>   #define CONFIG_TFTP_BLOCKSIZE	4096
>>   #define CONFIG_NFS_READ_SIZE	4096
>>
>> -#if defined(CONFIG_MBA6)
>> -
>> -#define CONFIG_MXC_UART_BASE		UART2_BASE
>> -#define CONFIG_CONSOLE_DEV		"ttymxc1"
>> -
>> -#else
>> -
>> -#error "define baseboard specific things (uart, number of SD-card slots)"
>> -
>> -#endif
>> -
>>   /* allow to overwrite serial and ethaddr */
>>   #define CONFIG_ENV_OVERWRITE
>>   #define CONFIG_CONS_INDEX		1
>> @@ -495,4 +454,15 @@
>>   #define CONFIG_CMD_CACHE
>>   #endif
>>
>> +/*
>> + * All the defines above are for the TQMa6 SoM
>> + *
>> + * Now include the baseboard specific configuration
>> + */
>> +#ifdef CONFIG_MBA6
>> +#include "tqma6_mba6.h"
>> +#else
>> +#error "No baseboard for the TQMa6 defined!"
>> +#endif
>
> Maybe this is the right place to add something like:
>
> /* support at least the sensor on TQMa6 SOM */
> #if !defined(CONFIG_DTT_SENSORS)
> #define CONFIG_DTT_SENSORS		{ 0 }
> #endif

Yes, will do. Thanks.

>> +
>>   #endif /* __CONFIG_H */
>> diff --git a/include/configs/tqma6_mba6.h b/include/configs/tqma6_mba6.h
>> new file mode 100644
>> index 0000000..a16120a
>> --- /dev/null
>> +++ b/include/configs/tqma6_mba6.h
>> @@ -0,0 +1,32 @@
>> +/*
>> + * Copyright (C) 2013, 2014 Markus Niebel <Markus.Niebel@tq-group.com>
>> + *
>> + * Configuration settings for the TQ Systems TQMa6<Q,S> module.
>> + *
>> + * SPDX-License-Identifier:	GPL-2.0+
>> + */
>> +
>> +#ifndef __CONFIG_TQMA6_MBA6_H
>> +#define __CONFIG_TQMA6_MBA6_H
>> +
>> +/* And now the baseboard specific configuration */
> Please delete this comment.

Okay.

Thanks,
Stefan

  reply	other threads:[~2015-03-12 15:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12 12:34 [U-Boot] [PATCH 1/3] arm: mx6: tqma6: Fix USB and add other filesystems Stefan Roese
2015-03-12 12:34 ` [U-Boot] [PATCH 2/3] arm: mx6: tqma6: Update to optionally configure an alternative SPI setup Stefan Roese
2015-03-12 14:25   ` Markus Niebel
2015-03-12 15:18     ` Stefan Roese
2015-03-13  9:05       ` Markus Niebel
2015-03-13 13:25         ` Stefan Roese
2015-03-13 13:27           ` Stefan Roese
2015-03-13 16:52           ` Markus Niebel
2015-05-05  9:37   ` Stefan Roese
2015-05-05 15:17     ` Stefano Babic
2015-03-12 12:34 ` [U-Boot] [PATCH 3/3] arm: mx6: tqma6: Extract baseboard configs into separate config file Stefan Roese
2015-03-12 14:17   ` Markus Niebel
2015-03-12 15:24     ` Stefan Roese [this message]
2015-03-12 14:09 ` [U-Boot] [PATCH 1/3] arm: mx6: tqma6: Fix USB and add other filesystems Markus Niebel
2015-05-05  9:36 ` Stefan Roese
2015-05-05  9:59   ` Stefano Babic
2015-05-05 15:16 ` Stefano Babic

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=5501AFC4.3020805@denx.de \
    --to=sr@denx.de \
    --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