[U-Boot] [PATCH 7/8] serial: lpuart: Add driver model serial support

Bin Meng bmeng.cn at gmail.com
Wed Jan 13 09:19:01 CET 2016


+Simon

Hi Bhuvan,

On Wed, Jan 13, 2016 at 4:07 PM, Bhuvanchandra DV
<bhuvanchandra.dv at toradex.com> wrote:
> Hi Bin,
>
> On 01/13/2016 11:43 AM, Bin Meng wrote:
>>
>> Hi Bhuvan,
>>
>> On Wed, Jan 13, 2016 at 1:49 PM, Bhuvanchandra DV
>> <bhuvanchandra.dv at gmail.com> wrote:
>>>
>>> Hi Bin,
>>>
>>> With reference to the discussion here[1].
>>>
>>> Unfortunately the lpuart driver is now broken for legacy code and also
>>> the driver doesn't
>>> work with serial driver model enabled on Toradex Colibri VF50/VF61,
>>> Freescale VF610twr
>>> and Phytec pcm052 boards. Did some one tested this patchset on these
>>> boards ?
>>
>>
>> I will fix the legacy code build in v2. About serial driver model not
>> working on these boards, is that the caused by no device tree of these
>> boards?
>
>
> Yes, i tested on Colibri VF50/VF61 with device tree and it works fine.

Great to know!

> I think it would be nice to have the support for both platform data and
> device tree so that we can use it with platform data via board files and
> device tree too.

I believe we should introduce device tree support on these boards. The
configuration data (like in your patches the reg base for LPUART)
should really be put into device tree. I adapted the comments from
platdata.h below:

31/**
32 * NOTE: Avoid using these except in extreme circumstances, where device tree
33 * is not feasible (e.g. serial driver in SPL where <8KB of SRAM is
34 * available). U-Boot's driver model uses device tree for configuration.
35 */
36#define U_BOOT_DEVICE(__name)                                           \
37        ll_entry_declare(struct driver_info, __name, driver_info)

>
> Since only few boards are using lpuart driver we can update the driver
> completly to driver model, drop the legacy code and update the boards.
>

Since in my patches I only updated ls1021atwr board to use driver
model serial, and I don't have those other boards (like Colibri
VF50/VF61) to test this lpuart dm driver. I chose to leave the legacy
codes there. On top of my series, you can prepare a patch to
completely drop those legacy codes after you switch to use driver
model lpuart driver on those boards in your series. Then we get a
legacy-free driver for lpuart boards :)

Regards,
Bin


More information about the U-Boot mailing list