diff mbox

[U-Boot,v3,15/16] RFC: dm: tegra: Enable driver model for serial

Message ID 1406713793-12828-16-git-send-email-sjg@chromium.org
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass July 30, 2014, 9:49 a.m. UTC
Use driver model for serial ports (for test and comment only).

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3:
- Add new patch to enable driver model for seial on tegra

Changes in v2: None

 include/configs/tegra-common.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Stephen Warren July 31, 2014, 8:18 p.m. UTC | #1
On 07/30/2014 03:49 AM, Simon Glass wrote:
> Use driver model for serial ports (for test and comment only).

A couple of nits:

> diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h

>   #define CONFIG_SYS_MALLOC_LEN		(4 << 20)	/* 4MB  */
> +#define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)

README says:

                 Pre-relocation malloc() is only supported on sandbox
                 at present but is fairly easy to enable for other archs.

I assume that should be deleted now.

>
>   /*
>    * NS16550 Configuration
>    */
> -#define CONFIG_SYS_NS16550
> +#ifdef CONFIG_SPL_BUILD
>   #define CONFIG_SYS_NS16550_SERIAL
>   #define CONFIG_SYS_NS16550_REG_SIZE	(-4)
>   #define CONFIG_SYS_NS16550_CLK		V_NS16550_CLK
> +#endif
> +#define CONFIG_SYS_NS16550

Leaving that define in the same place would simplify the diff.
Simon Glass July 31, 2014, 10:11 p.m. UTC | #2
Hi Stephen,

On 31 July 2014 21:18, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 07/30/2014 03:49 AM, Simon Glass wrote:
>>
>> Use driver model for serial ports (for test and comment only).
>
>
> A couple of nits:
>
>> diff --git a/include/configs/tegra-common.h
>> b/include/configs/tegra-common.h
>
>
>>   #define CONFIG_SYS_MALLOC_LEN         (4 << 20)       /* 4MB  */
>> +#define CONFIG_SYS_MALLOC_F_LEN        (1 << 10)
>
>
> README says:
>
>                 Pre-relocation malloc() is only supported on sandbox
>                 at present but is fairly easy to enable for other archs.
>
> I assume that should be deleted now.

There's another series ahead of this patch which changes this message.

>
>
>>
>>   /*
>>    * NS16550 Configuration
>>    */
>> -#define CONFIG_SYS_NS16550
>> +#ifdef CONFIG_SPL_BUILD
>>   #define CONFIG_SYS_NS16550_SERIAL
>>   #define CONFIG_SYS_NS16550_REG_SIZE   (-4)
>>   #define CONFIG_SYS_NS16550_CLK                V_NS16550_CLK
>> +#endif
>> +#define CONFIG_SYS_NS16550
>
>
> Leaving that define in the same place would simplify the diff.

OK, will do.

Regards,
Simon
diff mbox

Patch

diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index 6eb0dd9..e0779f1 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -22,6 +22,9 @@ 
 #define CONFIG_DM
 #define CONFIG_CMD_DM
 #define CONFIG_DM_GPIO
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_DM_SERIAL
+#endif
 
 #define CONFIG_SYS_TIMER_RATE		1000000
 #define CONFIG_SYS_TIMER_COUNTER	NV_PA_TMRUS_BASE
@@ -42,14 +45,17 @@ 
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN		(4 << 20)	/* 4MB  */
+#define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
 
 /*
  * NS16550 Configuration
  */
-#define CONFIG_SYS_NS16550
+#ifdef CONFIG_SPL_BUILD
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE	(-4)
 #define CONFIG_SYS_NS16550_CLK		V_NS16550_CLK
+#endif
+#define CONFIG_SYS_NS16550
 
 /*
  * Common HW configuration.