Commit da0122ca authored by Cyril Chemparathy's avatar Cyril Chemparathy Committed by Kevin Hilman

Davinci: serial - remove unnecessary define

The uart pdata array is already terminated by a zero flag field.

This patch reuses this terminator and eliminates DAVINCI_MAX_NR_UARTS
definition.  This way, future platforms can have different number of uarts
initialized via davinci_serial_init().
Signed-off-by: default avatarCyril Chemparathy <cyril@ti.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent c78a5bc2
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#define DAVINCI_MAX_NR_UARTS 3
#define DAVINCI_UART0_BASE (IO_PHYS + 0x20000) #define DAVINCI_UART0_BASE (IO_PHYS + 0x20000)
#define DAVINCI_UART1_BASE (IO_PHYS + 0x20400) #define DAVINCI_UART1_BASE (IO_PHYS + 0x20400)
#define DAVINCI_UART2_BASE (IO_PHYS + 0x20800) #define DAVINCI_UART2_BASE (IO_PHYS + 0x20800)
......
...@@ -77,7 +77,7 @@ int __init davinci_serial_init(struct davinci_uart_config *info) ...@@ -77,7 +77,7 @@ int __init davinci_serial_init(struct davinci_uart_config *info)
* Make sure the serial ports are muxed on at this point. * Make sure the serial ports are muxed on at this point.
* You have to mux them off in device drivers later on if not needed. * You have to mux them off in device drivers later on if not needed.
*/ */
for (i = 0; i < DAVINCI_MAX_NR_UARTS; i++, p++) { for (i = 0; p->flags; i++, p++) {
if (!(info->enabled_uarts & (1 << i))) if (!(info->enabled_uarts & (1 << i)))
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment