On Fri, 16 Jan 2009 14:17:28 -0800
Kevin Hilman <[email protected]> wrote:

> Hugo Villeneuve <[email protected]> writes:
> 
> > Signed-off-by: Hugo Villeneuve <[email protected]>
> > ---
> >  arch/arm/mach-davinci/board-dm355-evm.c     |    2 +-
> >  arch/arm/mach-davinci/board-dm644x-evm.c    |    2 +-
> >  arch/arm/mach-davinci/board-dm646x-evm.c    |    2 +-
> >  arch/arm/mach-davinci/board-sffsdr.c        |    6 +++++-
> >  arch/arm/mach-davinci/include/mach/serial.h |    5 +++++
> >  5 files changed, 13 insertions(+), 4 deletions(-)
> 
> NAK.  You changed the usage in the board files, but not the usage in 
> the common code (common.c, serial.c.)

Yes, one step at a time. It is still much better than what is
currently there.

> In fact, I think the bitmasks here are clear enough without new
> #defines.  Also the serial init is going to be reworked a bit for
> mainline submission as all the platform-specific TAGs have to go.

Having to decode how the serial routine works to be able to figure
out the bits to use is clearly wrong and bad programming practice. In
fact, I tought at first that I figured it out correctly for UART2 but
after many attempts I realized that I was not correctly shifting the
bits. Please use macros instead of hard to read bits shifting.

> So, please drop the serial stuff and send a new patch with the
> mux updates for SFFSDR.
> 
> Thanks,
> 
> Kevin
> 
> 
> > diff --git a/arch/arm/mach-davinci/board-dm355-evm.c
> > b/arch/arm/mach-davinci/board-dm355-evm.c index d62d19a..47a46d7
> > 100644
> > --- a/arch/arm/mach-davinci/board-dm355-evm.c
> > +++ b/arch/arm/mach-davinci/board-dm355-evm.c
> > @@ -167,7 +167,7 @@ static struct platform_device
> > *davinci_evm_devices[] __initdata = { };
> >  
> >  static struct davinci_uart_config davinci_evm_uart_config
> > __initdata = {
> > -   .enabled_uarts = (1 << 0),
> > +   .enabled_uarts = DAVINCI_UART0_ENABLE,
> >  };
> >  
> >  static struct davinci_board_config_kernel davinci_evm_config[]
> > __initdata = { diff --git
> > a/arch/arm/mach-davinci/board-dm644x-evm.c
> > b/arch/arm/mach-davinci/board-dm644x-evm.c index 359b754..5401911
> > 100644
> > --- a/arch/arm/mach-davinci/board-dm644x-evm.c
> > +++ b/arch/arm/mach-davinci/board-dm644x-evm.c
> > @@ -583,7 +583,7 @@ static struct platform_device
> > *davinci_evm_devices[] __initdata = { };
> >  
> >  static struct davinci_uart_config davinci_evm_uart_config
> > __initdata = {
> > -   .enabled_uarts = (1 << 0),
> > +   .enabled_uarts = DAVINCI_UART0_ENABLE,
> >  };
> >  
> >  static struct davinci_board_config_kernel davinci_evm_config[]
> > __initdata = { diff --git
> > a/arch/arm/mach-davinci/board-dm646x-evm.c
> > b/arch/arm/mach-davinci/board-dm646x-evm.c index 6b1f323..868f721
> > 100644
> > --- a/arch/arm/mach-davinci/board-dm646x-evm.c
> > +++ b/arch/arm/mach-davinci/board-dm646x-evm.c
> > @@ -47,7 +47,7 @@
> >  #include <mach/emac.h>
> >  
> >  static struct davinci_uart_config davinci_evm_uart_config
> > __initdata = {
> > -   .enabled_uarts = (1 << 0),
> > +   .enabled_uarts = DAVINCI_UART0_ENABLE,
> >  };
> >  
> >  static struct davinci_board_config_kernel davinci_evm_config[]
> > __initdata = { diff --git a/arch/arm/mach-davinci/board-sffsdr.c
> > b/arch/arm/mach-davinci/board-sffsdr.c index 9dab21d..196c779 100644
> > --- a/arch/arm/mach-davinci/board-sffsdr.c
> > +++ b/arch/arm/mach-davinci/board-sffsdr.c
> > @@ -53,6 +53,7 @@
> >  #include <mach/i2c.h>
> >  #include <mach/serial.h>
> >  #include <mach/psc.h>
> > +#include <mach/mux.h>
> >  
> >  #define DAVINCI_ASYNC_EMIF_CONTROL_BASE   0x01e00000
> >  #define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE  0x02000000
> > @@ -142,7 +143,7 @@ static struct platform_device
> > *davinci_sffsdr_devices[] __initdata = { };
> >  
> >  static struct davinci_uart_config davinci_sffsdr_uart_config
> > __initdata = {
> > -   .enabled_uarts = (1 << 0),
> > +   .enabled_uarts = DAVINCI_UART0_ENABLE |
> > DAVINCI_UART1_ENABLE, };
> >  
> >  static struct davinci_board_config_kernel davinci_sffsdr_config[]
> > __initdata = { @@ -156,6 +157,9 @@ static void __init
> > davinci_sffsdr_map_io(void) 
> >  static __init void davinci_sffsdr_init(void)
> >  {
> > +   /* Turn UART1 MUX ON. */
> > +   davinci_cfg_reg(DM644X_UART1);
> > +
> >     davinci_psc_init();
> >     platform_add_devices(davinci_sffsdr_devices,
> >                          ARRAY_SIZE(davinci_sffsdr_devices));
> > diff --git a/arch/arm/mach-davinci/include/mach/serial.h
> > b/arch/arm/mach-davinci/include/mach/serial.h index
> > 1508433..6df4765 100644
> > --- a/arch/arm/mach-davinci/include/mach/serial.h
> > +++ b/arch/arm/mach-davinci/include/mach/serial.h
> > @@ -25,6 +25,11 @@
> >  #define UART_DM646X_SCR                  0x10
> >  #define UART_DM646X_SCR_TX_WATERMARK  0x08
> >  
> > +/* Use these macros in board setup code to enable a specific UART.
> > */ +#define DAVINCI_UART0_ENABLE  (1 << 0)
> > +#define DAVINCI_UART1_ENABLE  (1 << 1)
> > +#define DAVINCI_UART2_ENABLE  (1 << 2)
> > +
> >  extern void davinci_serial_init(void);
> >  
> >  #endif /* __ASM_ARCH_SERIAL_H */
> > -- 
> > 1.5.4.5
> >
> >
> > _______________________________________________
> > Davinci-linux-open-source mailing list
> > [email protected]
> > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to