diff mbox

[U-Boot,2/2] ARM: exynos: Disable serial support in SPL

Message ID 1462055772-6419-2-git-send-email-marex@denx.de
State Accepted
Commit 086e13c5f6f79a68246d6b803cf4736cb6815e44
Delegated to: Minkyu Kang
Headers show

Commit Message

Marek Vasut April 30, 2016, 10:36 p.m. UTC
The exynos5 platforms use DM in U-Boot and do not use DM in SPL. The serial
driver, serial_s5p.c, is DM-only. This is OK for U-Boot, but in SPL, this
will fail with the following compile error:

drivers/built-in.o: In function `get_current':
...u-boot/drivers/serial/serial.c:387: undefined reference to `default_serial_console'

This warning happens because common/console.c is compiled into U-Boot SPL
if CONFIG_SPL_SERIAL_SUPPORT . The common/console.c invokes serial_*()
functions and since exynos5 does not use DM in SPL, these functions come
from drivers/serial/serial.c . The serial_*() locate default serial port
by calling default_serial_console(), but because the serial_s5p.c is DM-only,
it does no longer define default_serial_console(). Thus the error.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
---
 include/configs/exynos5-common.h | 1 -
 1 file changed, 1 deletion(-)

Comments

Simon Glass May 1, 2016, 6:55 p.m. UTC | #1
On 30 April 2016 at 16:36, Marek Vasut <marex@denx.de> wrote:
> The exynos5 platforms use DM in U-Boot and do not use DM in SPL. The serial
> driver, serial_s5p.c, is DM-only. This is OK for U-Boot, but in SPL, this
> will fail with the following compile error:
>
> drivers/built-in.o: In function `get_current':
> ...u-boot/drivers/serial/serial.c:387: undefined reference to `default_serial_console'
>
> This warning happens because common/console.c is compiled into U-Boot SPL
> if CONFIG_SPL_SERIAL_SUPPORT . The common/console.c invokes serial_*()
> functions and since exynos5 does not use DM in SPL, these functions come
> from drivers/serial/serial.c . The serial_*() locate default serial port
> by calling default_serial_console(), but because the serial_s5p.c is DM-only,
> it does no longer define default_serial_console(). Thus the error.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>  include/configs/exynos5-common.h | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini May 1, 2016, 6:57 p.m. UTC | #2
On Sun, May 01, 2016 at 12:36:12AM +0200, Marek Vasut wrote:

> The exynos5 platforms use DM in U-Boot and do not use DM in SPL. The serial
> driver, serial_s5p.c, is DM-only. This is OK for U-Boot, but in SPL, this
> will fail with the following compile error:
> 
> drivers/built-in.o: In function `get_current':
> ...u-boot/drivers/serial/serial.c:387: undefined reference to `default_serial_console'
> 
> This warning happens because common/console.c is compiled into U-Boot SPL
> if CONFIG_SPL_SERIAL_SUPPORT . The common/console.c invokes serial_*()
> functions and since exynos5 does not use DM in SPL, these functions come
> from drivers/serial/serial.c . The serial_*() locate default serial port
> by calling default_serial_console(), but because the serial_s5p.c is DM-only,
> it does no longer define default_serial_console(). Thus the error.

This is OK short term, can you see if turning on DM in SPL is easy for
these platforms instead?  Thanks!
Marek Vasut May 1, 2016, 7:46 p.m. UTC | #3
On 05/01/2016 08:57 PM, Tom Rini wrote:
> On Sun, May 01, 2016 at 12:36:12AM +0200, Marek Vasut wrote:
> 
>> The exynos5 platforms use DM in U-Boot and do not use DM in SPL. The serial
>> driver, serial_s5p.c, is DM-only. This is OK for U-Boot, but in SPL, this
>> will fail with the following compile error:
>>
>> drivers/built-in.o: In function `get_current':
>> ...u-boot/drivers/serial/serial.c:387: undefined reference to `default_serial_console'
>>
>> This warning happens because common/console.c is compiled into U-Boot SPL
>> if CONFIG_SPL_SERIAL_SUPPORT . The common/console.c invokes serial_*()
>> functions and since exynos5 does not use DM in SPL, these functions come
>> from drivers/serial/serial.c . The serial_*() locate default serial port
>> by calling default_serial_console(), but because the serial_s5p.c is DM-only,
>> it does no longer define default_serial_console(). Thus the error.
> 
> This is OK short term

Yes, indeed.

> can you see if turning on DM in SPL is easy for
> these platforms instead?  Thanks!
> 
I hope Simon can take a look into that ;-)
Minkyu Kang May 26, 2016, 5:01 a.m. UTC | #4
On 02/05/16 04:46, Marek Vasut wrote:
> On 05/01/2016 08:57 PM, Tom Rini wrote:
>> On Sun, May 01, 2016 at 12:36:12AM +0200, Marek Vasut wrote:
>>
>>> The exynos5 platforms use DM in U-Boot and do not use DM in SPL. The serial
>>> driver, serial_s5p.c, is DM-only. This is OK for U-Boot, but in SPL, this
>>> will fail with the following compile error:
>>>
>>> drivers/built-in.o: In function `get_current':
>>> ...u-boot/drivers/serial/serial.c:387: undefined reference to `default_serial_console'
>>>
>>> This warning happens because common/console.c is compiled into U-Boot SPL
>>> if CONFIG_SPL_SERIAL_SUPPORT . The common/console.c invokes serial_*()
>>> functions and since exynos5 does not use DM in SPL, these functions come
>>> from drivers/serial/serial.c . The serial_*() locate default serial port
>>> by calling default_serial_console(), but because the serial_s5p.c is DM-only,
>>> it does no longer define default_serial_console(). Thus the error.
>>
>> This is OK short term
> 
> Yes, indeed.
> 
>> can you see if turning on DM in SPL is easy for
>> these platforms instead?  Thanks!
>>
> I hope Simon can take a look into that ;-)
> 

applied to u-boot-samsung.

Thanks,
Minkyu Kang.
diff mbox

Patch

diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
index b2ff4dd..6846ad6 100644
--- a/include/configs/exynos5-common.h
+++ b/include/configs/exynos5-common.h
@@ -60,7 +60,6 @@ 
 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_GPIO_SUPPORT
-#define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
 
 /* specific .lds file */