From: Ben Dooks <ben-linux@fluff.org>
To: Thomas Abraham <thomas.ab@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org, ben-linux@fluff.org
Subject: Re: [PATCH] S3C: serial: Modify console initialization.
Date: Thu, 14 Jan 2010 06:23:11 +0000 [thread overview]
Message-ID: <20100114062311.GO3738@trinity.fluff.org> (raw)
In-Reply-To: <1263448415-27721-1-git-send-email-thomas.ab@samsung.com>
On Thu, Jan 14, 2010 at 02:53:35PM +0900, Thomas Abraham wrote:
> 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.
ok, will look at applying once this is needed.
> This patch also modifies the s3c24xx_console_init macro since it wraps the
> call to the s3c24xx_serial_initconsole function.
> ---
> drivers/serial/samsung.c | 6 +++---
> drivers/serial/samsung.h | 19 ++++++++++++-------
> 2 files changed, 15 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/serial/samsung.c b/drivers/serial/samsung.c
> index 52e3df1..6982243 100644
> --- a/drivers/serial/samsung.c
> +++ b/drivers/serial/samsung.c
> @@ -1374,7 +1374,7 @@ s3c24xx_serial_get_options(struct uart_port *port, int *baud,
> * data.
> */
>
> -static int s3c24xx_serial_init_ports(struct s3c24xx_uart_info *info)
> +static int s3c24xx_serial_init_ports(struct s3c24xx_uart_info **info)
> {
> struct s3c24xx_uart_port *ptr = s3c24xx_serial_ports;
> struct platform_device **platdev_ptr;
> @@ -1385,7 +1385,7 @@ static int s3c24xx_serial_init_ports(struct s3c24xx_uart_info *info)
> platdev_ptr = s3c24xx_uart_devs;
>
> for (i = 0; i < CONFIG_SERIAL_SAMSUNG_UARTS; i++, ptr++, platdev_ptr++) {
> - s3c24xx_serial_init_port(ptr, info, *platdev_ptr);
> + s3c24xx_serial_init_port(ptr, info[i], *platdev_ptr);
> }
>
> return 0;
> @@ -1451,7 +1451,7 @@ static struct console s3c24xx_serial_console = {
> };
>
> int s3c24xx_serial_initconsole(struct platform_driver *drv,
> - struct s3c24xx_uart_info *info)
> + struct s3c24xx_uart_info **info)
>
> {
> struct platform_device *dev = s3c24xx_uart_devs[0];
> diff --git a/drivers/serial/samsung.h b/drivers/serial/samsung.h
> index 1fb2234..0ac06a0 100644
> --- a/drivers/serial/samsung.h
> +++ b/drivers/serial/samsung.h
> @@ -75,19 +75,24 @@ extern int s3c24xx_serial_probe(struct platform_device *dev,
> extern int __devexit s3c24xx_serial_remove(struct platform_device *dev);
>
> extern int s3c24xx_serial_initconsole(struct platform_driver *drv,
> - struct s3c24xx_uart_info *uart);
> + struct s3c24xx_uart_info **uart);
>
> extern int s3c24xx_serial_init(struct platform_driver *drv,
> struct s3c24xx_uart_info *info);
>
> #ifdef CONFIG_SERIAL_SAMSUNG_CONSOLE
>
> -#define s3c24xx_console_init(__drv, __inf) \
> -static int __init s3c_serial_console_init(void) \
> -{ \
> - return s3c24xx_serial_initconsole(__drv, __inf); \
> -} \
> - \
> +#define s3c24xx_console_init(__drv, __inf) \
> +static int __init s3c_serial_console_init(void) \
> +{ \
> + struct s3c24xx_uart_info *uinfo[CONFIG_SERIAL_SAMSUNG_UARTS]; \
> + int i; \
> + \
> + for (i = 0; i < CONFIG_SERIAL_SAMSUNG_UARTS; i++) \
> + uinfo[i] = __inf; \
> + return s3c24xx_serial_initconsole(__drv, uinfo); \
> +} \
> + \
> console_initcall(s3c_serial_console_init)
>
> #else
> --
> 1.6.3.3
>
--
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
next prev parent reply other threads:[~2010-01-14 6:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-14 5:53 [PATCH] S3C: serial: Modify console initialization Thomas Abraham
2010-01-14 6:23 ` Ben Dooks [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-01-14 6:05 Thomas Abraham
2010-01-14 6:41 ` Ben Dooks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100114062311.GO3738@trinity.fluff.org \
--to=ben-linux@fluff.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=thomas.ab@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.