[U-Boot] [PATCH 07/34] zynq: Add UART0, UART1 configs support

Michal Simek
2013-11-06T17:43:22Z

On 11/06/2013 02:50 PM, Dinh Nguyen wrote:
>
>
> On 11/6/13 12:45 AM, Michal Simek wrote:
>> On 11/06/2013 05:17 AM, Dinh Nguyen wrote:
>>>
>>> On 11/5/13 11:46 AM, Jagannadha Sutradharudu Teki wrote:
>>>> Zynq uart controller support two serial ports like
>>>> CONFIG_ZYNQ_SERIAL_UART0 and CONFIG_ZYNQ_SERIAL_UART1
>>>> enabled both so-that the respective board will define
>>>> these macros based on their usage.
>>>>
>>>> Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
>>>> ---
>>>> include/configs/zynq.h | 20 ++++++++++++++++----
>>>> 1 file changed, 16 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/include/configs/zynq.h b/include/configs/zynq.h
>>>> index f32008b..1bcb28d 100644
>>>> --- a/include/configs/zynq.h
>>>> +++ b/include/configs/zynq.h
>>>> @@ -33,10 +33,22 @@
>>>> {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200,
> 230400}
>>>>
>>>> /* Zynq Serial driver */
>>>> -#define CONFIG_ZYNQ_SERIAL
>>>> -#define CONFIG_ZYNQ_SERIAL_BASEADDR0 0xE0001000
>>>> -#define CONFIG_ZYNQ_SERIAL_BAUDRATE0 CONFIG_BAUDRATE
>>>> -#define CONFIG_ZYNQ_SERIAL_CLOCK0 50000000
>>>> +#define CONFIG_ZYNQ_SERIAL_UART1
>>>> +#ifdef CONFIG_ZYNQ_SERIAL_UART0
>>>> +# define CONFIG_ZYNQ_SERIAL_BASEADDR0 0xE0000000
>>>> +# define CONFIG_ZYNQ_SERIAL_BAUDRATE0 CONFIG_BAUDRATE
>>> Why couldn't you just use CONFIG_BAUDRATE? Why do you need to add
>>> another define?
>
>> If we start to use the same CONFIG_BAUDRATE(or better gd->baudrate)
>> in the driver then we lose config options to setup different baudrate
>> for every single device.
>
>> I haven't seen any code for SERIAL_MULTI if you want to configure
>> 2 serial drivers but on different baudrate.
>> If there is better way how to do it please let us know.
> I guess the question then is what would be the use case for supporting
> different baudrates on different device?

I don't have any particular case in my mind but based on my experience
with various customer they could have intention to replace old subsystem
by fpga and one serial console can go to standard output which is logged
by default and different serial output for debug purpose and both
can run on different baudrates.

I just think that with SERIAL_MULTI support various baudrate should be supported
and doing it through macros is one way to go.

Thanks,
Michal

--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131106/158dee1a/attachment.pgp>