[U-Boot] [RFC PATCH 01/13] serial: s5p: rework Samsung UART driver to get rid of uart.h
Andre Przywara
andre.przywara at arm.com
Mon Dec 4 10:21:18 UTC 2017
Hi Simon,
On 02/12/17 03:30, Simon Glass wrote:
> On 29 November 2017 at 18:24, Andre Przywara <andre.przywara at arm.com> wrote:
>> At the moment the serial_s5p driver takes care of both Exynos UARTs
>> as well as those from older Samsung SoCs (s3c/s5p series).
>> Looking more closely the only difference between those two groups is
>> how the fractional baud rate is programmed: via a "divslot" (s3c) or as
>> a proper fractional value (Exynos).
>> Instead of intricately expressing this via a special header file (which
>> is otherwise identical), let's use the blessings of DT to tackle this:
>> The S5P series of SoCs use their own compatible string, in line with
>> what the official DTs from the Linux kernel do. We then switch between
>> divslot and fractional value based on the compatible string used.
>> This allows us to get rid of the uart.h header files and make the
>> driver more flexible.
>>
>> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
>> ---
>> arch/arm/dts/s5pc1xx-goni.dts | 2 +-
>> arch/arm/dts/s5pc1xx-smdkc100.dts | 2 +-
>> arch/arm/mach-exynos/include/mach/uart.h | 44 ------------------------------
>> arch/arm/mach-s5pc1xx/include/mach/uart.h | 44 ------------------------------
>> drivers/serial/serial_s5p.c | 45 +++++++++++++++++++++++++++----
>> 5 files changed, 42 insertions(+), 95 deletions(-)
>> delete mode 100644 arch/arm/mach-exynos/include/mach/uart.h
>> delete mode 100644 arch/arm/mach-s5pc1xx/include/mach/uart.h
>>
>> diff --git a/arch/arm/dts/s5pc1xx-goni.dts b/arch/arm/dts/s5pc1xx-goni.dts
>> index 182325a091..964c7a6b67 100644
>> --- a/arch/arm/dts/s5pc1xx-goni.dts
>> +++ b/arch/arm/dts/s5pc1xx-goni.dts
>> @@ -28,7 +28,7 @@
>> };
>>
>> serial at e2900800 {
>> - compatible = "samsung,exynos4210-uart";
>> + compatible = "samsung,s5pv210-uart";
>
> Does this match linux?
Yes, this is where I got the compatible from:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/s5pv210.dtsi#n331
And s5pv210.dtsi is included by s5pv210-goni.dts.
> Apart from that:
>
> Reviewed-by: Simon Glass <sjg at chromium.org>
Thanks a ton for the complete review! This is much appreciated!
Cheers,
Andre.
More information about the U-Boot
mailing list