[U-Boot] [PATCH 2/2] m68k: add DM model serial driver
Simon Glass
sjg at chromium.org
Sun Dec 20 00:07:01 CET 2015
Hi Angelo,
On 19 December 2015 at 15:32, Angelo Dureghello <angelo at sysam.it> wrote:
> Hi Simon,
>
> On 19/12/2015 21:29, Simon Glass wrote:
>>
>> Hi Angelo,
>>
>> On 19 December 2015 at 06:43, Angelo Dureghello <angelo at sysam.it> wrote:
>>>
>>> Boards can now use DM serial driver, or still legacy mcf uart
>>> driver version.
>>> Add DM-related changes for AMCORE board, to use as a tested example.
>>>
>>> Signed-off-by: Angelo Dureghello <angelo at sysam.it>
>>> ---
>>>
>>> board/sysam/amcore/amcore.c | 33 +++++
>>> configs/amcore_defconfig | 2 +
>>> drivers/serial/mcfuart.c | 193
>>> ++++++++++++++++++++++-------
>>> include/dm/platform_data/serial_coldfire.h | 23 ++++
>>> 4 files changed, 207 insertions(+), 44 deletions(-)
>>> create mode 100644 include/dm/platform_data/serial_coldfire.h
>>
[snip]
>>> diff --git a/drivers/serial/mcfuart.c b/drivers/serial/mcfuart.c
>>> index 407354f..03a4d64 100644
>>> --- a/drivers/serial/mcfuart.c
>>> +++ b/drivers/serial/mcfuart.c
>>> @@ -2,6 +2,9 @@
>>> * (C) Copyright 2004-2007 Freescale Semiconductor, Inc.
>>> * TsiChung Liew, Tsi-Chung.Liew at freescale.com.
>>> *
>>> + * Modified to add device model (DM) support
>>> + * (C) Copyright 2015 Angelo Dureghello <angelo at sysam.it>
>>> + *
>>> * SPDX-License-Identifier: GPL-2.0+
>>> */
>>>
>>> @@ -11,101 +14,123 @@
>>> */
>>>
>>> #include <common.h>
>>> +#include <dm.h>
>>> #include <serial.h>
>>> #include <linux/compiler.h>
>>> -
>>> #include <asm/immap.h>
>>> #include <asm/uart.h>
>>> +#ifdef CONFIG_DM_SERIAL
>>
>>
>> Do you need this #ifdef?
>>
>
> Since CONFIG_DM_SERIAL is defined in board xxx_defconfig,
> it was to avoid to include dm/platform_data/serial_coldfire.h
> when CONFIG_DM_SERIAL is not defined.
I don't think that matters. Anyway the non-DM code will go away soon.
[snip]
Regards,
Simon
More information about the U-Boot
mailing list