From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Wed, 06 Nov 2013 07:45:47 +0100 Subject: [U-Boot] [PATCH 07/34] zynq: Add UART0, UART1 configs support In-Reply-To: <5279C2C9.7060008@gmail.com> References: <1383673615-32473-1-git-send-email-jaganna@xilinx.com> <1249b50d-d1d1-42ad-b612-7aa9901598ad@VA3EHSMHS029.ehs.local> <5279C2C9.7060008@gmail.com> Message-ID: <5279E59B.6040909@monstr.eu> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 >> --- >> 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. 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: