diff mbox

[pm-wip/uart,0/5,v2] Serial HWMOD updation and uart4 support for 3630

Message ID 87d3vpciim.fsf@deeprootsystems.com (mailing list archive)
State New, archived
Delegated to: Kevin Hilman
Headers show

Commit Message

Kevin Hilman June 18, 2010, 12:05 a.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 2ab8f25..37cc28e 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -98,7 +98,9 @@  struct omap_uart_state {
 #endif
 };
 
-static LIST_HEAD(uart_list);
+static LIST_HEAD(hwmod_list); /* list of detected UART hwmods */
+static LIST_HEAD(uart_list);  /* list of initialized UARTs */
+
 static u8 num_uarts;
 
 static struct omap_device_pm_latency omap_uart_latency[] = {
@@ -612,7 +614,7 @@  static int omap_serial_port_init(struct omap_hwmod *oh, void *user)
 
 	uart->oh = oh;
 	uart->num = i++;
-	list_add_tail(&uart->node, &uart_list);
+	list_add_tail(&uart->node, &hwmod_list);
 	num_uarts++;
 
 	/*
@@ -676,7 +678,7 @@  void __init omap_serial_init_port(int port)
 	if (WARN_ON(port >= num_uarts))
 		return;
 
-	list_for_each_entry(uart, &uart_list, node)
+	list_for_each_entry(uart, &hwmod_list, node)
 		if (port == uart->num)
 			break;
 
@@ -789,6 +791,8 @@  void __init omap_serial_init_port(int port)
 		device_init_wakeup(&od->pdev.dev, true);
 		DEV_CREATE_FILE(&od->pdev.dev, &dev_attr_sleep_timeout);
 	}
+
+	list_add_tail(&uart->node, &uart_list);
 }
 
 /**