[U-Boot] [PATCH 5/9] serial_mxc: add support for MX51 processor

Stefano Babic sbabic at denx.de
Mon Jan 18 08:16:09 CET 2010


Wolfgang Denk wrote:
> Dear Stefano Babic,
> 

Hi Wolfgang,

>> @@ -49,8 +51,14 @@
>>  #define UART_PHYS 0x1001b000
>>  #elif defined(CONFIG_SYS_MX27_UART6)
>>  #define UART_PHYS 0x1001c000
>> +#elif defined(CONFIG_SYS_MX51_UART1)
>> +#define UART_PHYS UART1_BASE_ADDR
>> +#elif defined(CONFIG_SYS_MX51_UART2)
>> +#define UART_PHYS UART2_BASE_ADDR
>> +#elif defined(CONFIG_SYS_MX51_UART3)
>> +#define UART_PHYS UART3_BASE_ADDR
> 
> What happens if - for example - CONFIG_SYS_MX51_UART1 _and_
> CONFIG_SYS_MX51_UART2 are defiend? How is CONFIG_SERIAL_MULTI going to
> be supported?

The patch adds only support for the i.MX51 and does
I understand what you mean. However, the driver at moment has the same
problem with other processors (MX27, MX31). Should be not better to fix
this issue with another patch that has nothing to do with i.MX51 ?

> 
>> -#error "define CONFIG_SYS_MX31_UARTx to use the mx31 UART driver"
>> +#error "define CONFIG_SYS_MXxx_UARTx to use the mxxx UART driver"
> 
> WHat's "mxxx" supposed to mean? This is not readable.

You are right. I want only to get rid of specific processor statement,
because according to code this driver runs on several Freescale imx
processor. "MXC UART driver" is better defined as what I did.

> 
>>  #ifdef CONFIG_MX31
>>  	u32 clk = mx31_get_ipg_clk();
>> +#elif defined(CONFIG_MX51)
>> +	u32 clk = mxc_get_clock(MXC_UART_CLK);
>>  #else
>>  	u32 clk = imx_get_perclk1();
>>  #endif
> 
> Cannot we have a common clock interface?

There is already a patch by John Rigby to drop them and using a general
function for all of them. However, you are reviewing my first patchset.
In V2 I have already removed the special implementation for MX51 and I
have added the general function imx_get_uartclk(), as John implemented
for the other MX processors.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list