diff options
author | Thomas Abraham <thomas.ab@samsung.com> | 2010-01-14 01:05:38 -0500 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-01-19 03:50:47 -0500 |
commit | 51fe52229e3765dc56b8d2dd5df656fbf8a20500 (patch) | |
tree | 5d26164280bdd77137df3e3db04069702c182bd2 /drivers/serial/samsung.h | |
parent | bb9b1c772727849051e485a877aa9a4b2d3ac1a1 (diff) |
ARM: SAMSUNG: serial: Modify console initialization.
This patch modifies s3c24xx_serial_initconsole function to accept multiple
platform UART information structures. This is required on platforms that have
differences among the instances of UART ports. As an example, the FIFO sizes
could be different for each UART instance and hence multiple platform UART
information structures would be needed.
This patch also modifies the s3c24xx_console_init macro since it wraps the
call to the s3c24xx_serial_initconsole function.
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/serial/samsung.h')
-rw-r--r-- | drivers/serial/samsung.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/serial/samsung.h b/drivers/serial/samsung.h index 1fb22343df42..0ac06a07d25f 100644 --- a/drivers/serial/samsung.h +++ b/drivers/serial/samsung.h | |||
@@ -75,19 +75,24 @@ extern int s3c24xx_serial_probe(struct platform_device *dev, | |||
75 | extern int __devexit s3c24xx_serial_remove(struct platform_device *dev); | 75 | extern int __devexit s3c24xx_serial_remove(struct platform_device *dev); |
76 | 76 | ||
77 | extern int s3c24xx_serial_initconsole(struct platform_driver *drv, | 77 | extern int s3c24xx_serial_initconsole(struct platform_driver *drv, |
78 | struct s3c24xx_uart_info *uart); | 78 | struct s3c24xx_uart_info **uart); |
79 | 79 | ||
80 | extern int s3c24xx_serial_init(struct platform_driver *drv, | 80 | extern int s3c24xx_serial_init(struct platform_driver *drv, |
81 | struct s3c24xx_uart_info *info); | 81 | struct s3c24xx_uart_info *info); |
82 | 82 | ||
83 | #ifdef CONFIG_SERIAL_SAMSUNG_CONSOLE | 83 | #ifdef CONFIG_SERIAL_SAMSUNG_CONSOLE |
84 | 84 | ||
85 | #define s3c24xx_console_init(__drv, __inf) \ | 85 | #define s3c24xx_console_init(__drv, __inf) \ |
86 | static int __init s3c_serial_console_init(void) \ | 86 | static int __init s3c_serial_console_init(void) \ |
87 | { \ | 87 | { \ |
88 | return s3c24xx_serial_initconsole(__drv, __inf); \ | 88 | struct s3c24xx_uart_info *uinfo[CONFIG_SERIAL_SAMSUNG_UARTS]; \ |
89 | } \ | 89 | int i; \ |
90 | \ | 90 | \ |
91 | for (i = 0; i < CONFIG_SERIAL_SAMSUNG_UARTS; i++) \ | ||
92 | uinfo[i] = __inf; \ | ||
93 | return s3c24xx_serial_initconsole(__drv, uinfo); \ | ||
94 | } \ | ||
95 | \ | ||
91 | console_initcall(s3c_serial_console_init) | 96 | console_initcall(s3c_serial_console_init) |
92 | 97 | ||
93 | #else | 98 | #else |