* [PATCH] omap3_beagle: init uart2 for beagle rev AX/BX only
@ 2012-03-06 9:05 ` Govindraj.R
0 siblings, 0 replies; 12+ messages in thread
From: Govindraj.R @ 2012-03-06 9:05 UTC (permalink / raw)
To: linux-omap
Cc: linux-arm-kernel, Peter Ujfalusi, Robert Nelson, Govindraj.R,
Tony Lindgren, Kevin Hilman, Koen Kooi
From: "Govindraj.R" <govindraj.raja@ti.com>
All beagle boards rev > AX/BX have external usb hubs connected to ehci
interface, external hub/peripheral uses a nreset sequence for which
uart2_rx.gpio_147 pin in mux mode4(USB2HS_nRST) is used on all beagle
boards expect rev Ax/BX.
(Reference to all beagle boards rev schematics:
http://beagleboard.org/hardware/design)
Initialising uart2 will lead to serial init taking over uart2_rx pin
so init uart2_rx pin mux only for Beagle AX/BX rev boards.
Dont init uart2 for all other boards allowing usb_ehci functionality.
To initialise individual uart port by id utilise and modify the existing
available func. omap_serial_board_init.
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Koen Kooi <koen@dominion.thruhere.net>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
arch/arm/mach-omap2/board-omap3beagle.c | 6 +++-
arch/arm/mach-omap2/serial.c | 41 ++++++++++++++++-------------
arch/arm/plat-omap/include/plat/serial.h | 3 +-
3 files changed, 30 insertions(+), 20 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 7ffcd28..19d6fb5 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -126,6 +126,7 @@ static void __init omap3_beagle_init_rev(void)
beagle_config.mmc1_gpio_wp = 29;
beagle_config.reset_gpio = 170;
beagle_config.usr_button_gpio = 7;
+ omap_serial_board_init(NULL, 1);
break;
case 6:
printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
@@ -528,7 +529,10 @@ static void __init omap3_beagle_init(void)
platform_add_devices(omap3_beagle_devices,
ARRAY_SIZE(omap3_beagle_devices));
omap_display_init(&beagle_dss_data);
- omap_serial_init();
+ omap_serial_board_init(NULL, 0);
+ omap_serial_board_init(NULL, 2);
+ omap_serial_board_init(NULL, 3);
+
omap_sdrc_init(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index f590afc..e7c0462 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -393,30 +393,32 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
/**
* omap_serial_board_init() - initialize all supported serial ports
* @info: platform specific data pointer
+ * @port_id: uart port number to be initialised
*
- * Initializes all available UARTs as serial ports. Platforms
+ * Initializes individual UARTs as serial ports. Platforms
* can call this function when they want to have default behaviour
- * for serial ports (e.g initialize them all as serial ports).
+ * for serial ports (e.g initialize individual serial ports based on port id).
*/
-void __init omap_serial_board_init(struct omap_uart_port_info *info)
+void __init omap_serial_board_init(struct omap_uart_port_info *info, u8 port_id)
{
struct omap_uart_state *uart;
struct omap_board_data bdata;
- list_for_each_entry(uart, &uart_list, node) {
- bdata.id = uart->num;
- bdata.flags = 0;
- bdata.pads = NULL;
- bdata.pads_cnt = 0;
-
- if (cpu_is_omap44xx() || cpu_is_omap34xx())
- omap_serial_fill_default_pads(&bdata);
-
- if (!info)
- omap_serial_init_port(&bdata, NULL);
- else
- omap_serial_init_port(&bdata, &info[uart->num]);
- }
+ list_for_each_entry(uart, &uart_list, node)
+ if (uart->num == port_id) {
+ bdata.id = uart->num;
+ bdata.flags = 0;
+ bdata.pads = NULL;
+ bdata.pads_cnt = 0;
+
+ if (!cpu_is_omap24xx())
+ omap_serial_fill_default_pads(&bdata);
+
+ if (!info)
+ omap_serial_init_port(&bdata, NULL);
+ else
+ omap_serial_init_port(&bdata, info);
+ }
}
/**
@@ -428,5 +430,8 @@ void __init omap_serial_board_init(struct omap_uart_port_info *info)
*/
void __init omap_serial_init(void)
{
- omap_serial_board_init(NULL);
+ struct omap_uart_state *uart;
+
+ list_for_each_entry(uart, &uart_list, node)
+ omap_serial_board_init(NULL, uart->num);
}
diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h
index 198d1e6..043b251 100644
--- a/arch/arm/plat-omap/include/plat/serial.h
+++ b/arch/arm/plat-omap/include/plat/serial.h
@@ -111,7 +111,8 @@ struct omap_uart_port_info;
extern void omap_serial_init(void);
extern int omap_uart_can_sleep(void);
-extern void omap_serial_board_init(struct omap_uart_port_info *platform_data);
+extern void omap_serial_board_init(struct omap_uart_port_info *platform_data,
+ u8 port_id);
extern void omap_serial_init_port(struct omap_board_data *bdata,
struct omap_uart_port_info *platform_data);
#endif
--
1.7.5.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] omap3_beagle: init uart2 for beagle rev AX/BX only
@ 2012-03-06 9:05 ` Govindraj.R
0 siblings, 0 replies; 12+ messages in thread
From: Govindraj.R @ 2012-03-06 9:05 UTC (permalink / raw)
To: linux-arm-kernel
From: "Govindraj.R" <govindraj.raja@ti.com>
All beagle boards rev > AX/BX have external usb hubs connected to ehci
interface, external hub/peripheral uses a nreset sequence for which
uart2_rx.gpio_147 pin in mux mode4(USB2HS_nRST) is used on all beagle
boards expect rev Ax/BX.
(Reference to all beagle boards rev schematics:
http://beagleboard.org/hardware/design)
Initialising uart2 will lead to serial init taking over uart2_rx pin
so init uart2_rx pin mux only for Beagle AX/BX rev boards.
Dont init uart2 for all other boards allowing usb_ehci functionality.
To initialise individual uart port by id utilise and modify the existing
available func. omap_serial_board_init.
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Koen Kooi <koen@dominion.thruhere.net>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
arch/arm/mach-omap2/board-omap3beagle.c | 6 +++-
arch/arm/mach-omap2/serial.c | 41 ++++++++++++++++-------------
arch/arm/plat-omap/include/plat/serial.h | 3 +-
3 files changed, 30 insertions(+), 20 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 7ffcd28..19d6fb5 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -126,6 +126,7 @@ static void __init omap3_beagle_init_rev(void)
beagle_config.mmc1_gpio_wp = 29;
beagle_config.reset_gpio = 170;
beagle_config.usr_button_gpio = 7;
+ omap_serial_board_init(NULL, 1);
break;
case 6:
printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
@@ -528,7 +529,10 @@ static void __init omap3_beagle_init(void)
platform_add_devices(omap3_beagle_devices,
ARRAY_SIZE(omap3_beagle_devices));
omap_display_init(&beagle_dss_data);
- omap_serial_init();
+ omap_serial_board_init(NULL, 0);
+ omap_serial_board_init(NULL, 2);
+ omap_serial_board_init(NULL, 3);
+
omap_sdrc_init(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index f590afc..e7c0462 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -393,30 +393,32 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
/**
* omap_serial_board_init() - initialize all supported serial ports
* @info: platform specific data pointer
+ * @port_id: uart port number to be initialised
*
- * Initializes all available UARTs as serial ports. Platforms
+ * Initializes individual UARTs as serial ports. Platforms
* can call this function when they want to have default behaviour
- * for serial ports (e.g initialize them all as serial ports).
+ * for serial ports (e.g initialize individual serial ports based on port id).
*/
-void __init omap_serial_board_init(struct omap_uart_port_info *info)
+void __init omap_serial_board_init(struct omap_uart_port_info *info, u8 port_id)
{
struct omap_uart_state *uart;
struct omap_board_data bdata;
- list_for_each_entry(uart, &uart_list, node) {
- bdata.id = uart->num;
- bdata.flags = 0;
- bdata.pads = NULL;
- bdata.pads_cnt = 0;
-
- if (cpu_is_omap44xx() || cpu_is_omap34xx())
- omap_serial_fill_default_pads(&bdata);
-
- if (!info)
- omap_serial_init_port(&bdata, NULL);
- else
- omap_serial_init_port(&bdata, &info[uart->num]);
- }
+ list_for_each_entry(uart, &uart_list, node)
+ if (uart->num == port_id) {
+ bdata.id = uart->num;
+ bdata.flags = 0;
+ bdata.pads = NULL;
+ bdata.pads_cnt = 0;
+
+ if (!cpu_is_omap24xx())
+ omap_serial_fill_default_pads(&bdata);
+
+ if (!info)
+ omap_serial_init_port(&bdata, NULL);
+ else
+ omap_serial_init_port(&bdata, info);
+ }
}
/**
@@ -428,5 +430,8 @@ void __init omap_serial_board_init(struct omap_uart_port_info *info)
*/
void __init omap_serial_init(void)
{
- omap_serial_board_init(NULL);
+ struct omap_uart_state *uart;
+
+ list_for_each_entry(uart, &uart_list, node)
+ omap_serial_board_init(NULL, uart->num);
}
diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h
index 198d1e6..043b251 100644
--- a/arch/arm/plat-omap/include/plat/serial.h
+++ b/arch/arm/plat-omap/include/plat/serial.h
@@ -111,7 +111,8 @@ struct omap_uart_port_info;
extern void omap_serial_init(void);
extern int omap_uart_can_sleep(void);
-extern void omap_serial_board_init(struct omap_uart_port_info *platform_data);
+extern void omap_serial_board_init(struct omap_uart_port_info *platform_data,
+ u8 port_id);
extern void omap_serial_init_port(struct omap_board_data *bdata,
struct omap_uart_port_info *platform_data);
#endif
--
1.7.5.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] omap3_beagle: init uart2 for beagle rev AX/BX only
2012-03-06 9:05 ` Govindraj.R
@ 2012-03-06 21:38 ` Tony Lindgren
-1 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2012-03-06 21:38 UTC (permalink / raw)
To: Govindraj.R
Cc: linux-omap, linux-arm-kernel, Peter Ujfalusi, Robert Nelson,
Kevin Hilman, Koen Kooi
* Govindraj.R <govindraj.raja@ti.com> [120306 00:34]:
> From: "Govindraj.R" <govindraj.raja@ti.com>
>
> All beagle boards rev > AX/BX have external usb hubs connected to ehci
> interface, external hub/peripheral uses a nreset sequence for which
> uart2_rx.gpio_147 pin in mux mode4(USB2HS_nRST) is used on all beagle
> boards expect rev Ax/BX.
> (Reference to all beagle boards rev schematics:
> http://beagleboard.org/hardware/design)
>
> Initialising uart2 will lead to serial init taking over uart2_rx pin
> so init uart2_rx pin mux only for Beagle AX/BX rev boards.
> Dont init uart2 for all other boards allowing usb_ehci functionality.
>
> To initialise individual uart port by id utilise and modify the existing
> available func. omap_serial_board_init.
>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Koen Kooi <koen@dominion.thruhere.net>
> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Tested-by: Robert Nelson <robertcnelson@gmail.com>
> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
Can somebody please test this on non-xm beagle too and
reply with a Tested-by?
Thanks,
Tony
> ---
> arch/arm/mach-omap2/board-omap3beagle.c | 6 +++-
> arch/arm/mach-omap2/serial.c | 41 ++++++++++++++++-------------
> arch/arm/plat-omap/include/plat/serial.h | 3 +-
> 3 files changed, 30 insertions(+), 20 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
> index 7ffcd28..19d6fb5 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -126,6 +126,7 @@ static void __init omap3_beagle_init_rev(void)
> beagle_config.mmc1_gpio_wp = 29;
> beagle_config.reset_gpio = 170;
> beagle_config.usr_button_gpio = 7;
> + omap_serial_board_init(NULL, 1);
> break;
> case 6:
> printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
> @@ -528,7 +529,10 @@ static void __init omap3_beagle_init(void)
> platform_add_devices(omap3_beagle_devices,
> ARRAY_SIZE(omap3_beagle_devices));
> omap_display_init(&beagle_dss_data);
> - omap_serial_init();
> + omap_serial_board_init(NULL, 0);
> + omap_serial_board_init(NULL, 2);
> + omap_serial_board_init(NULL, 3);
> +
> omap_sdrc_init(mt46h32m32lf6_sdrc_params,
> mt46h32m32lf6_sdrc_params);
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index f590afc..e7c0462 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -393,30 +393,32 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
> /**
> * omap_serial_board_init() - initialize all supported serial ports
> * @info: platform specific data pointer
> + * @port_id: uart port number to be initialised
> *
> - * Initializes all available UARTs as serial ports. Platforms
> + * Initializes individual UARTs as serial ports. Platforms
> * can call this function when they want to have default behaviour
> - * for serial ports (e.g initialize them all as serial ports).
> + * for serial ports (e.g initialize individual serial ports based on port id).
> */
> -void __init omap_serial_board_init(struct omap_uart_port_info *info)
> +void __init omap_serial_board_init(struct omap_uart_port_info *info, u8 port_id)
> {
> struct omap_uart_state *uart;
> struct omap_board_data bdata;
>
> - list_for_each_entry(uart, &uart_list, node) {
> - bdata.id = uart->num;
> - bdata.flags = 0;
> - bdata.pads = NULL;
> - bdata.pads_cnt = 0;
> -
> - if (cpu_is_omap44xx() || cpu_is_omap34xx())
> - omap_serial_fill_default_pads(&bdata);
> -
> - if (!info)
> - omap_serial_init_port(&bdata, NULL);
> - else
> - omap_serial_init_port(&bdata, &info[uart->num]);
> - }
> + list_for_each_entry(uart, &uart_list, node)
> + if (uart->num == port_id) {
> + bdata.id = uart->num;
> + bdata.flags = 0;
> + bdata.pads = NULL;
> + bdata.pads_cnt = 0;
> +
> + if (!cpu_is_omap24xx())
> + omap_serial_fill_default_pads(&bdata);
> +
> + if (!info)
> + omap_serial_init_port(&bdata, NULL);
> + else
> + omap_serial_init_port(&bdata, info);
> + }
> }
>
> /**
> @@ -428,5 +430,8 @@ void __init omap_serial_board_init(struct omap_uart_port_info *info)
> */
> void __init omap_serial_init(void)
> {
> - omap_serial_board_init(NULL);
> + struct omap_uart_state *uart;
> +
> + list_for_each_entry(uart, &uart_list, node)
> + omap_serial_board_init(NULL, uart->num);
> }
> diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h
> index 198d1e6..043b251 100644
> --- a/arch/arm/plat-omap/include/plat/serial.h
> +++ b/arch/arm/plat-omap/include/plat/serial.h
> @@ -111,7 +111,8 @@ struct omap_uart_port_info;
>
> extern void omap_serial_init(void);
> extern int omap_uart_can_sleep(void);
> -extern void omap_serial_board_init(struct omap_uart_port_info *platform_data);
> +extern void omap_serial_board_init(struct omap_uart_port_info *platform_data,
> + u8 port_id);
> extern void omap_serial_init_port(struct omap_board_data *bdata,
> struct omap_uart_port_info *platform_data);
> #endif
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] omap3_beagle: init uart2 for beagle rev AX/BX only
@ 2012-03-06 21:38 ` Tony Lindgren
0 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2012-03-06 21:38 UTC (permalink / raw)
To: linux-arm-kernel
* Govindraj.R <govindraj.raja@ti.com> [120306 00:34]:
> From: "Govindraj.R" <govindraj.raja@ti.com>
>
> All beagle boards rev > AX/BX have external usb hubs connected to ehci
> interface, external hub/peripheral uses a nreset sequence for which
> uart2_rx.gpio_147 pin in mux mode4(USB2HS_nRST) is used on all beagle
> boards expect rev Ax/BX.
> (Reference to all beagle boards rev schematics:
> http://beagleboard.org/hardware/design)
>
> Initialising uart2 will lead to serial init taking over uart2_rx pin
> so init uart2_rx pin mux only for Beagle AX/BX rev boards.
> Dont init uart2 for all other boards allowing usb_ehci functionality.
>
> To initialise individual uart port by id utilise and modify the existing
> available func. omap_serial_board_init.
>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Koen Kooi <koen@dominion.thruhere.net>
> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Tested-by: Robert Nelson <robertcnelson@gmail.com>
> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
Can somebody please test this on non-xm beagle too and
reply with a Tested-by?
Thanks,
Tony
> ---
> arch/arm/mach-omap2/board-omap3beagle.c | 6 +++-
> arch/arm/mach-omap2/serial.c | 41 ++++++++++++++++-------------
> arch/arm/plat-omap/include/plat/serial.h | 3 +-
> 3 files changed, 30 insertions(+), 20 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
> index 7ffcd28..19d6fb5 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -126,6 +126,7 @@ static void __init omap3_beagle_init_rev(void)
> beagle_config.mmc1_gpio_wp = 29;
> beagle_config.reset_gpio = 170;
> beagle_config.usr_button_gpio = 7;
> + omap_serial_board_init(NULL, 1);
> break;
> case 6:
> printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
> @@ -528,7 +529,10 @@ static void __init omap3_beagle_init(void)
> platform_add_devices(omap3_beagle_devices,
> ARRAY_SIZE(omap3_beagle_devices));
> omap_display_init(&beagle_dss_data);
> - omap_serial_init();
> + omap_serial_board_init(NULL, 0);
> + omap_serial_board_init(NULL, 2);
> + omap_serial_board_init(NULL, 3);
> +
> omap_sdrc_init(mt46h32m32lf6_sdrc_params,
> mt46h32m32lf6_sdrc_params);
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index f590afc..e7c0462 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -393,30 +393,32 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
> /**
> * omap_serial_board_init() - initialize all supported serial ports
> * @info: platform specific data pointer
> + * @port_id: uart port number to be initialised
> *
> - * Initializes all available UARTs as serial ports. Platforms
> + * Initializes individual UARTs as serial ports. Platforms
> * can call this function when they want to have default behaviour
> - * for serial ports (e.g initialize them all as serial ports).
> + * for serial ports (e.g initialize individual serial ports based on port id).
> */
> -void __init omap_serial_board_init(struct omap_uart_port_info *info)
> +void __init omap_serial_board_init(struct omap_uart_port_info *info, u8 port_id)
> {
> struct omap_uart_state *uart;
> struct omap_board_data bdata;
>
> - list_for_each_entry(uart, &uart_list, node) {
> - bdata.id = uart->num;
> - bdata.flags = 0;
> - bdata.pads = NULL;
> - bdata.pads_cnt = 0;
> -
> - if (cpu_is_omap44xx() || cpu_is_omap34xx())
> - omap_serial_fill_default_pads(&bdata);
> -
> - if (!info)
> - omap_serial_init_port(&bdata, NULL);
> - else
> - omap_serial_init_port(&bdata, &info[uart->num]);
> - }
> + list_for_each_entry(uart, &uart_list, node)
> + if (uart->num == port_id) {
> + bdata.id = uart->num;
> + bdata.flags = 0;
> + bdata.pads = NULL;
> + bdata.pads_cnt = 0;
> +
> + if (!cpu_is_omap24xx())
> + omap_serial_fill_default_pads(&bdata);
> +
> + if (!info)
> + omap_serial_init_port(&bdata, NULL);
> + else
> + omap_serial_init_port(&bdata, info);
> + }
> }
>
> /**
> @@ -428,5 +430,8 @@ void __init omap_serial_board_init(struct omap_uart_port_info *info)
> */
> void __init omap_serial_init(void)
> {
> - omap_serial_board_init(NULL);
> + struct omap_uart_state *uart;
> +
> + list_for_each_entry(uart, &uart_list, node)
> + omap_serial_board_init(NULL, uart->num);
> }
> diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h
> index 198d1e6..043b251 100644
> --- a/arch/arm/plat-omap/include/plat/serial.h
> +++ b/arch/arm/plat-omap/include/plat/serial.h
> @@ -111,7 +111,8 @@ struct omap_uart_port_info;
>
> extern void omap_serial_init(void);
> extern int omap_uart_can_sleep(void);
> -extern void omap_serial_board_init(struct omap_uart_port_info *platform_data);
> +extern void omap_serial_board_init(struct omap_uart_port_info *platform_data,
> + u8 port_id);
> extern void omap_serial_init_port(struct omap_board_data *bdata,
> struct omap_uart_port_info *platform_data);
> #endif
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] omap3_beagle: init uart2 for beagle rev AX/BX only
2012-03-06 21:38 ` Tony Lindgren
@ 2012-03-07 0:39 ` Robert Nelson
-1 siblings, 0 replies; 12+ messages in thread
From: Robert Nelson @ 2012-03-07 0:39 UTC (permalink / raw)
To: Tony Lindgren
Cc: Govindraj.R, linux-omap, linux-arm-kernel, Peter Ujfalusi,
Kevin Hilman, Koen Kooi
On Tue, Mar 6, 2012 at 3:38 PM, Tony Lindgren <tony@atomide.com> wrote:
> * Govindraj.R <govindraj.raja@ti.com> [120306 00:34]:
>> From: "Govindraj.R" <govindraj.raja@ti.com>
>>
>> All beagle boards rev > AX/BX have external usb hubs connected to ehci
>> interface, external hub/peripheral uses a nreset sequence for which
>> uart2_rx.gpio_147 pin in mux mode4(USB2HS_nRST) is used on all beagle
>> boards expect rev Ax/BX.
>> (Reference to all beagle boards rev schematics:
>> http://beagleboard.org/hardware/design)
>>
>> Initialising uart2 will lead to serial init taking over uart2_rx pin
>> so init uart2_rx pin mux only for Beagle AX/BX rev boards.
>> Dont init uart2 for all other boards allowing usb_ehci functionality.
>>
>> To initialise individual uart port by id utilise and modify the existing
>> available func. omap_serial_board_init.
>>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Cc: Kevin Hilman <khilman@ti.com>
>> Cc: Koen Kooi <koen@dominion.thruhere.net>
>> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> Tested-by: Robert Nelson <robertcnelson@gmail.com>
>> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
>
> Can somebody please test this on non-xm beagle too and
> reply with a Tested-by?
Here's an update for my: Tested-by: Robert Nelson <robertcnelson@gmail.com>
Just tested with one of my Beagle C4's, (and re-verified the new patch
on a xM B) using usb flash drives on the ehci port...
beagle c4:
v3.2.9
Bus 001 Device 002: ID 0457:0151 Silicon Integrated Systems Corp.
Super Flash 1GB / GXT 64MB Flash Drive
v3.3-rc6:
ehci broken
v3.3-rc6 + this patch:
Bus 001 Device 002: ID 0457:0151 Silicon Integrated Systems Corp.
Super Flash 1GB / GXT 64MB Flash Driv
beagle xM B:
v3.2.9
Bus 001 Device 004: ID 1977:0824 T-Logic
v3.3-rc6:
ehci broken
v3.3-rc6 + this patch:
Bus 001 Device 004: ID 1977:0824 T-Logic
Regards,
--
Robert Nelson
http://www.rcn-ee.com/
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] omap3_beagle: init uart2 for beagle rev AX/BX only
@ 2012-03-07 0:39 ` Robert Nelson
0 siblings, 0 replies; 12+ messages in thread
From: Robert Nelson @ 2012-03-07 0:39 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Mar 6, 2012 at 3:38 PM, Tony Lindgren <tony@atomide.com> wrote:
> * Govindraj.R <govindraj.raja@ti.com> [120306 00:34]:
>> From: "Govindraj.R" <govindraj.raja@ti.com>
>>
>> All beagle boards rev > AX/BX have external usb hubs connected to ehci
>> interface, external hub/peripheral uses a nreset sequence for which
>> uart2_rx.gpio_147 pin in mux mode4(USB2HS_nRST) is used on all beagle
>> boards expect rev Ax/BX.
>> (Reference to all beagle boards rev schematics:
>> http://beagleboard.org/hardware/design)
>>
>> Initialising uart2 will lead to serial init taking over uart2_rx pin
>> so init uart2_rx pin mux only for Beagle AX/BX rev boards.
>> Dont init uart2 for all other boards allowing usb_ehci functionality.
>>
>> To initialise individual uart port by id utilise and modify the existing
>> available func. omap_serial_board_init.
>>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Cc: Kevin Hilman <khilman@ti.com>
>> Cc: Koen Kooi <koen@dominion.thruhere.net>
>> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> Tested-by: Robert Nelson <robertcnelson@gmail.com>
>> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
>
> Can somebody please test this on non-xm beagle too and
> reply with a Tested-by?
Here's an update for my: Tested-by: Robert Nelson <robertcnelson@gmail.com>
Just tested with one of my Beagle C4's, (and re-verified the new patch
on a xM B) using usb flash drives on the ehci port...
beagle c4:
v3.2.9
Bus 001 Device 002: ID 0457:0151 Silicon Integrated Systems Corp.
Super Flash 1GB / GXT 64MB Flash Drive
v3.3-rc6:
ehci broken
v3.3-rc6 + this patch:
Bus 001 Device 002: ID 0457:0151 Silicon Integrated Systems Corp.
Super Flash 1GB / GXT 64MB Flash Driv
beagle xM B:
v3.2.9
Bus 001 Device 004: ID 1977:0824 T-Logic
v3.3-rc6:
ehci broken
v3.3-rc6 + this patch:
Bus 001 Device 004: ID 1977:0824 T-Logic
Regards,
--
Robert Nelson
http://www.rcn-ee.com/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] omap3_beagle: init uart2 for beagle rev AX/BX only
2012-03-06 9:05 ` Govindraj.R
@ 2012-05-04 18:18 ` Tony Lindgren
-1 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2012-05-04 18:18 UTC (permalink / raw)
To: Govindraj.R
Cc: linux-omap, linux-arm-kernel, Peter Ujfalusi, Robert Nelson,
Kevin Hilman, Koen Kooi
Hi,
Looking at this again..
* Govindraj.R <govindraj.raja@ti.com> [120306 00:34]:
> From: "Govindraj.R" <govindraj.raja@ti.com>
>
> All beagle boards rev > AX/BX have external usb hubs connected to ehci
> interface, external hub/peripheral uses a nreset sequence for which
> uart2_rx.gpio_147 pin in mux mode4(USB2HS_nRST) is used on all beagle
> boards expect rev Ax/BX.
> (Reference to all beagle boards rev schematics:
> http://beagleboard.org/hardware/design)
>
> Initialising uart2 will lead to serial init taking over uart2_rx pin
> so init uart2_rx pin mux only for Beagle AX/BX rev boards.
> Dont init uart2 for all other boards allowing usb_ehci functionality.
OK so the above got fixed for the muxing part with commit
bce492c04ba8fc66a4ea0a52b181ba255daaaf54.
> To initialise individual uart port by id utilise and modify the existing
> available func. omap_serial_board_init.
This makes sense as board specific fixes.
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -126,6 +126,7 @@ static void __init omap3_beagle_init_rev(void)
> beagle_config.mmc1_gpio_wp = 29;
> beagle_config.reset_gpio = 170;
> beagle_config.usr_button_gpio = 7;
> + omap_serial_board_init(NULL, 1);
> break;
> case 6:
> printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
> @@ -528,7 +529,10 @@ static void __init omap3_beagle_init(void)
> platform_add_devices(omap3_beagle_devices,
> ARRAY_SIZE(omap3_beagle_devices));
> omap_display_init(&beagle_dss_data);
> - omap_serial_init();
> + omap_serial_board_init(NULL, 0);
> + omap_serial_board_init(NULL, 2);
> + omap_serial_board_init(NULL, 3);
> +
> omap_sdrc_init(mt46h32m32lf6_sdrc_params,
> mt46h32m32lf6_sdrc_params);
>
So this still looks valid, except now you also add the muxing for the
uart pins instead of NULL? Note that you could define OMAP3_UART1_DEFAULT_PINS
etc in some header.
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -393,30 +393,32 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
> /**
> * omap_serial_board_init() - initialize all supported serial ports
> * @info: platform specific data pointer
> + * @port_id: uart port number to be initialised
> *
> - * Initializes all available UARTs as serial ports. Platforms
> + * Initializes individual UARTs as serial ports. Platforms
> * can call this function when they want to have default behaviour
> - * for serial ports (e.g initialize them all as serial ports).
> + * for serial ports (e.g initialize individual serial ports based on port id).
> */
> -void __init omap_serial_board_init(struct omap_uart_port_info *info)
> +void __init omap_serial_board_init(struct omap_uart_port_info *info, u8 port_id)
> {
> struct omap_uart_state *uart;
> struct omap_board_data bdata;
>
> - list_for_each_entry(uart, &uart_list, node) {
> - bdata.id = uart->num;
> - bdata.flags = 0;
> - bdata.pads = NULL;
> - bdata.pads_cnt = 0;
> -
> - if (cpu_is_omap44xx() || cpu_is_omap34xx())
> - omap_serial_fill_default_pads(&bdata);
> -
> - if (!info)
> - omap_serial_init_port(&bdata, NULL);
> - else
> - omap_serial_init_port(&bdata, &info[uart->num]);
> - }
> + list_for_each_entry(uart, &uart_list, node)
> + if (uart->num == port_id) {
> + bdata.id = uart->num;
> + bdata.flags = 0;
> + bdata.pads = NULL;
> + bdata.pads_cnt = 0;
> +
> + if (!cpu_is_omap24xx())
> + omap_serial_fill_default_pads(&bdata);
> +
> + if (!info)
> + omap_serial_init_port(&bdata, NULL);
> + else
> + omap_serial_init_port(&bdata, info);
> + }
> }
> @@ -428,5 +430,8 @@ void __init omap_serial_board_init(struct omap_uart_port_info *info)
> */
> void __init omap_serial_init(void)
> {
> - omap_serial_board_init(NULL);
> + struct omap_uart_state *uart;
> +
> + list_for_each_entry(uart, &uart_list, node)
> + omap_serial_board_init(NULL, uart->num);
> }
Is this fix still needed? If so, it should probably be a separate fix
with it's own description.
Regards,
Tony
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] omap3_beagle: init uart2 for beagle rev AX/BX only
@ 2012-05-04 18:18 ` Tony Lindgren
0 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2012-05-04 18:18 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Looking at this again..
* Govindraj.R <govindraj.raja@ti.com> [120306 00:34]:
> From: "Govindraj.R" <govindraj.raja@ti.com>
>
> All beagle boards rev > AX/BX have external usb hubs connected to ehci
> interface, external hub/peripheral uses a nreset sequence for which
> uart2_rx.gpio_147 pin in mux mode4(USB2HS_nRST) is used on all beagle
> boards expect rev Ax/BX.
> (Reference to all beagle boards rev schematics:
> http://beagleboard.org/hardware/design)
>
> Initialising uart2 will lead to serial init taking over uart2_rx pin
> so init uart2_rx pin mux only for Beagle AX/BX rev boards.
> Dont init uart2 for all other boards allowing usb_ehci functionality.
OK so the above got fixed for the muxing part with commit
bce492c04ba8fc66a4ea0a52b181ba255daaaf54.
> To initialise individual uart port by id utilise and modify the existing
> available func. omap_serial_board_init.
This makes sense as board specific fixes.
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -126,6 +126,7 @@ static void __init omap3_beagle_init_rev(void)
> beagle_config.mmc1_gpio_wp = 29;
> beagle_config.reset_gpio = 170;
> beagle_config.usr_button_gpio = 7;
> + omap_serial_board_init(NULL, 1);
> break;
> case 6:
> printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
> @@ -528,7 +529,10 @@ static void __init omap3_beagle_init(void)
> platform_add_devices(omap3_beagle_devices,
> ARRAY_SIZE(omap3_beagle_devices));
> omap_display_init(&beagle_dss_data);
> - omap_serial_init();
> + omap_serial_board_init(NULL, 0);
> + omap_serial_board_init(NULL, 2);
> + omap_serial_board_init(NULL, 3);
> +
> omap_sdrc_init(mt46h32m32lf6_sdrc_params,
> mt46h32m32lf6_sdrc_params);
>
So this still looks valid, except now you also add the muxing for the
uart pins instead of NULL? Note that you could define OMAP3_UART1_DEFAULT_PINS
etc in some header.
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -393,30 +393,32 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
> /**
> * omap_serial_board_init() - initialize all supported serial ports
> * @info: platform specific data pointer
> + * @port_id: uart port number to be initialised
> *
> - * Initializes all available UARTs as serial ports. Platforms
> + * Initializes individual UARTs as serial ports. Platforms
> * can call this function when they want to have default behaviour
> - * for serial ports (e.g initialize them all as serial ports).
> + * for serial ports (e.g initialize individual serial ports based on port id).
> */
> -void __init omap_serial_board_init(struct omap_uart_port_info *info)
> +void __init omap_serial_board_init(struct omap_uart_port_info *info, u8 port_id)
> {
> struct omap_uart_state *uart;
> struct omap_board_data bdata;
>
> - list_for_each_entry(uart, &uart_list, node) {
> - bdata.id = uart->num;
> - bdata.flags = 0;
> - bdata.pads = NULL;
> - bdata.pads_cnt = 0;
> -
> - if (cpu_is_omap44xx() || cpu_is_omap34xx())
> - omap_serial_fill_default_pads(&bdata);
> -
> - if (!info)
> - omap_serial_init_port(&bdata, NULL);
> - else
> - omap_serial_init_port(&bdata, &info[uart->num]);
> - }
> + list_for_each_entry(uart, &uart_list, node)
> + if (uart->num == port_id) {
> + bdata.id = uart->num;
> + bdata.flags = 0;
> + bdata.pads = NULL;
> + bdata.pads_cnt = 0;
> +
> + if (!cpu_is_omap24xx())
> + omap_serial_fill_default_pads(&bdata);
> +
> + if (!info)
> + omap_serial_init_port(&bdata, NULL);
> + else
> + omap_serial_init_port(&bdata, info);
> + }
> }
> @@ -428,5 +430,8 @@ void __init omap_serial_board_init(struct omap_uart_port_info *info)
> */
> void __init omap_serial_init(void)
> {
> - omap_serial_board_init(NULL);
> + struct omap_uart_state *uart;
> +
> + list_for_each_entry(uart, &uart_list, node)
> + omap_serial_board_init(NULL, uart->num);
> }
Is this fix still needed? If so, it should probably be a separate fix
with it's own description.
Regards,
Tony
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] omap3_beagle: init uart2 for beagle rev AX/BX only
2012-05-04 18:18 ` Tony Lindgren
@ 2012-05-07 12:22 ` Raja, Govindraj
-1 siblings, 0 replies; 12+ messages in thread
From: Raja, Govindraj @ 2012-05-07 12:22 UTC (permalink / raw)
To: Tony Lindgren
Cc: linux-omap, linux-arm-kernel, Peter Ujfalusi, Robert Nelson,
Kevin Hilman, Koen Kooi
On Fri, May 4, 2012 at 11:48 PM, Tony Lindgren <tony@atomide.com> wrote:
> Hi,
>
> Looking at this again..
>
> * Govindraj.R <govindraj.raja@ti.com> [120306 00:34]:
>> From: "Govindraj.R" <govindraj.raja@ti.com>
>>
>> All beagle boards rev > AX/BX have external usb hubs connected to ehci
>> interface, external hub/peripheral uses a nreset sequence for which
>> uart2_rx.gpio_147 pin in mux mode4(USB2HS_nRST) is used on all beagle
>> boards expect rev Ax/BX.
>> (Reference to all beagle boards rev schematics:
>> http://beagleboard.org/hardware/design)
>>
>> Initialising uart2 will lead to serial init taking over uart2_rx pin
>> so init uart2_rx pin mux only for Beagle AX/BX rev boards.
>> Dont init uart2 for all other boards allowing usb_ehci functionality.
>
> OK so the above got fixed for the muxing part with commit
> bce492c04ba8fc66a4ea0a52b181ba255daaaf54.
>
>> To initialise individual uart port by id utilise and modify the existing
>> available func. omap_serial_board_init.
>
> This makes sense as board specific fixes.
>
>> --- a/arch/arm/mach-omap2/board-omap3beagle.c
>> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
>> @@ -126,6 +126,7 @@ static void __init omap3_beagle_init_rev(void)
>> beagle_config.mmc1_gpio_wp = 29;
>> beagle_config.reset_gpio = 170;
>> beagle_config.usr_button_gpio = 7;
>> + omap_serial_board_init(NULL, 1);
>> break;
>> case 6:
>> printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
>> @@ -528,7 +529,10 @@ static void __init omap3_beagle_init(void)
>> platform_add_devices(omap3_beagle_devices,
>> ARRAY_SIZE(omap3_beagle_devices));
>> omap_display_init(&beagle_dss_data);
>> - omap_serial_init();
>> + omap_serial_board_init(NULL, 0);
>> + omap_serial_board_init(NULL, 2);
>> + omap_serial_board_init(NULL, 3);
>> +
>> omap_sdrc_init(mt46h32m32lf6_sdrc_params,
>> mt46h32m32lf6_sdrc_params);
>>
>
> So this still looks valid, except now you also add the muxing for the
> uart pins instead of NULL? Note that you could define OMAP3_UART1_DEFAULT_PINS
> etc in some header.
>
>> --- a/arch/arm/mach-omap2/serial.c
>> +++ b/arch/arm/mach-omap2/serial.c
>> @@ -393,30 +393,32 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
>> /**
>> * omap_serial_board_init() - initialize all supported serial ports
>> * @info: platform specific data pointer
>> + * @port_id: uart port number to be initialised
>> *
>> - * Initializes all available UARTs as serial ports. Platforms
>> + * Initializes individual UARTs as serial ports. Platforms
>> * can call this function when they want to have default behaviour
>> - * for serial ports (e.g initialize them all as serial ports).
>> + * for serial ports (e.g initialize individual serial ports based on port id).
>> */
>> -void __init omap_serial_board_init(struct omap_uart_port_info *info)
>> +void __init omap_serial_board_init(struct omap_uart_port_info *info, u8 port_id)
>> {
>> struct omap_uart_state *uart;
>> struct omap_board_data bdata;
>>
>> - list_for_each_entry(uart, &uart_list, node) {
>> - bdata.id = uart->num;
>> - bdata.flags = 0;
>> - bdata.pads = NULL;
>> - bdata.pads_cnt = 0;
>> -
>> - if (cpu_is_omap44xx() || cpu_is_omap34xx())
>> - omap_serial_fill_default_pads(&bdata);
>> -
>> - if (!info)
>> - omap_serial_init_port(&bdata, NULL);
>> - else
>> - omap_serial_init_port(&bdata, &info[uart->num]);
>> - }
>> + list_for_each_entry(uart, &uart_list, node)
>> + if (uart->num == port_id) {
>> + bdata.id = uart->num;
>> + bdata.flags = 0;
>> + bdata.pads = NULL;
>> + bdata.pads_cnt = 0;
>> +
>> + if (!cpu_is_omap24xx())
>> + omap_serial_fill_default_pads(&bdata);
>> +
>> + if (!info)
>> + omap_serial_init_port(&bdata, NULL);
>> + else
>> + omap_serial_init_port(&bdata, info);
>> + }
>> }
>> @@ -428,5 +430,8 @@ void __init omap_serial_board_init(struct omap_uart_port_info *info)
>> */
>> void __init omap_serial_init(void)
>> {
>> - omap_serial_board_init(NULL);
>> + struct omap_uart_state *uart;
>> +
>> + list_for_each_entry(uart, &uart_list, node)
>> + omap_serial_board_init(NULL, uart->num);
>> }
>
> Is this fix still needed? If so, it should probably be a separate fix
> with it's own description.
No this one is not needed anymore
since its fixed part of commit
bce492c04ba8fc66a4ea0a52b181ba255daaaf54
--
Thanks,
Govindraj.R
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] omap3_beagle: init uart2 for beagle rev AX/BX only
@ 2012-05-07 12:22 ` Raja, Govindraj
0 siblings, 0 replies; 12+ messages in thread
From: Raja, Govindraj @ 2012-05-07 12:22 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, May 4, 2012 at 11:48 PM, Tony Lindgren <tony@atomide.com> wrote:
> Hi,
>
> Looking at this again..
>
> * Govindraj.R <govindraj.raja@ti.com> [120306 00:34]:
>> From: "Govindraj.R" <govindraj.raja@ti.com>
>>
>> All beagle boards rev > AX/BX have external usb hubs connected to ehci
>> interface, external hub/peripheral uses a nreset sequence for which
>> uart2_rx.gpio_147 pin in mux mode4(USB2HS_nRST) is used on all beagle
>> boards expect rev Ax/BX.
>> (Reference to all beagle boards rev schematics:
>> http://beagleboard.org/hardware/design)
>>
>> Initialising uart2 will lead to serial init taking over uart2_rx pin
>> so init uart2_rx pin mux only for Beagle AX/BX rev boards.
>> Dont init uart2 for all other boards allowing usb_ehci functionality.
>
> OK so the above got fixed for the muxing part with commit
> bce492c04ba8fc66a4ea0a52b181ba255daaaf54.
>
>> To initialise individual uart port by id utilise and modify the existing
>> available func. omap_serial_board_init.
>
> This makes sense as board specific fixes.
>
>> --- a/arch/arm/mach-omap2/board-omap3beagle.c
>> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
>> @@ -126,6 +126,7 @@ static void __init omap3_beagle_init_rev(void)
>> ? ? ? ? ? ? ? beagle_config.mmc1_gpio_wp = 29;
>> ? ? ? ? ? ? ? beagle_config.reset_gpio = 170;
>> ? ? ? ? ? ? ? beagle_config.usr_button_gpio = 7;
>> + ? ? ? ? ? ? omap_serial_board_init(NULL, 1);
>> ? ? ? ? ? ? ? break;
>> ? ? ? case 6:
>> ? ? ? ? ? ? ? printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
>> @@ -528,7 +529,10 @@ static void __init omap3_beagle_init(void)
>> ? ? ? platform_add_devices(omap3_beagle_devices,
>> ? ? ? ? ? ? ? ? ? ? ? ARRAY_SIZE(omap3_beagle_devices));
>> ? ? ? omap_display_init(&beagle_dss_data);
>> - ? ? omap_serial_init();
>> + ? ? omap_serial_board_init(NULL, 0);
>> + ? ? omap_serial_board_init(NULL, 2);
>> + ? ? omap_serial_board_init(NULL, 3);
>> +
>> ? ? ? omap_sdrc_init(mt46h32m32lf6_sdrc_params,
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? mt46h32m32lf6_sdrc_params);
>>
>
> So this still looks valid, except now you also add the muxing for the
> uart pins instead of NULL? Note that you could define OMAP3_UART1_DEFAULT_PINS
> etc in some header.
>
>> --- a/arch/arm/mach-omap2/serial.c
>> +++ b/arch/arm/mach-omap2/serial.c
>> @@ -393,30 +393,32 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
>> ?/**
>> ? * omap_serial_board_init() - initialize all supported serial ports
>> ? * @info: platform specific data pointer
>> + * @port_id: uart port number to be initialised
>> ? *
>> - * Initializes all available UARTs as serial ports. Platforms
>> + * Initializes individual UARTs as serial ports. Platforms
>> ? * can call this function when they want to have default behaviour
>> - * for serial ports (e.g initialize them all as serial ports).
>> + * for serial ports (e.g initialize individual serial ports based on port id).
>> ? */
>> -void __init omap_serial_board_init(struct omap_uart_port_info *info)
>> +void __init omap_serial_board_init(struct omap_uart_port_info *info, u8 port_id)
>> ?{
>> ? ? ? struct omap_uart_state *uart;
>> ? ? ? struct omap_board_data bdata;
>>
>> - ? ? list_for_each_entry(uart, &uart_list, node) {
>> - ? ? ? ? ? ? bdata.id = uart->num;
>> - ? ? ? ? ? ? bdata.flags = 0;
>> - ? ? ? ? ? ? bdata.pads = NULL;
>> - ? ? ? ? ? ? bdata.pads_cnt = 0;
>> -
>> - ? ? ? ? ? ? if (cpu_is_omap44xx() || cpu_is_omap34xx())
>> - ? ? ? ? ? ? ? ? ? ? omap_serial_fill_default_pads(&bdata);
>> -
>> - ? ? ? ? ? ? if (!info)
>> - ? ? ? ? ? ? ? ? ? ? omap_serial_init_port(&bdata, NULL);
>> - ? ? ? ? ? ? else
>> - ? ? ? ? ? ? ? ? ? ? omap_serial_init_port(&bdata, &info[uart->num]);
>> - ? ? }
>> + ? ? list_for_each_entry(uart, &uart_list, node)
>> + ? ? ? ? ? ? if (uart->num == port_id) {
>> + ? ? ? ? ? ? ? ? ? ? bdata.id = uart->num;
>> + ? ? ? ? ? ? ? ? ? ? bdata.flags = 0;
>> + ? ? ? ? ? ? ? ? ? ? bdata.pads = NULL;
>> + ? ? ? ? ? ? ? ? ? ? bdata.pads_cnt = 0;
>> +
>> + ? ? ? ? ? ? ? ? ? ? if (!cpu_is_omap24xx())
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? omap_serial_fill_default_pads(&bdata);
>> +
>> + ? ? ? ? ? ? ? ? ? ? if (!info)
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? omap_serial_init_port(&bdata, NULL);
>> + ? ? ? ? ? ? ? ? ? ? else
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? omap_serial_init_port(&bdata, info);
>> + ? ? ? ? ? ? }
>> ?}
>> @@ -428,5 +430,8 @@ void __init omap_serial_board_init(struct omap_uart_port_info *info)
>> ? */
>> ?void __init omap_serial_init(void)
>> ?{
>> - ? ? omap_serial_board_init(NULL);
>> + ? ? struct omap_uart_state *uart;
>> +
>> + ? ? list_for_each_entry(uart, &uart_list, node)
>> + ? ? ? ? ? ? omap_serial_board_init(NULL, uart->num);
>> ?}
>
> Is this fix still needed? If so, it should probably be a separate fix
> with it's own description.
No this one is not needed anymore
since its fixed part of commit
bce492c04ba8fc66a4ea0a52b181ba255daaaf54
--
Thanks,
Govindraj.R
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] omap3_beagle: init uart2 for beagle rev AX/BX only
2012-05-07 12:22 ` Raja, Govindraj
@ 2012-05-07 17:50 ` Tony Lindgren
-1 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2012-05-07 17:50 UTC (permalink / raw)
To: Raja, Govindraj
Cc: linux-omap, linux-arm-kernel, Peter Ujfalusi, Robert Nelson,
Kevin Hilman, Koen Kooi
* Raja, Govindraj <govindraj.raja@ti.com> [120507 05:26]:
> On Fri, May 4, 2012 at 11:48 PM, Tony Lindgren <tony@atomide.com> wrote:
>
> > Is this fix still needed? If so, it should probably be a separate fix
> > with it's own description.
>
> No this one is not needed anymore
> since its fixed part of commit
> bce492c04ba8fc66a4ea0a52b181ba255daaaf54
OK thanks for the update.
Tony
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] omap3_beagle: init uart2 for beagle rev AX/BX only
@ 2012-05-07 17:50 ` Tony Lindgren
0 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2012-05-07 17:50 UTC (permalink / raw)
To: linux-arm-kernel
* Raja, Govindraj <govindraj.raja@ti.com> [120507 05:26]:
> On Fri, May 4, 2012 at 11:48 PM, Tony Lindgren <tony@atomide.com> wrote:
>
> > Is this fix still needed? If so, it should probably be a separate fix
> > with it's own description.
>
> No this one is not needed anymore
> since its fixed part of commit
> bce492c04ba8fc66a4ea0a52b181ba255daaaf54
OK thanks for the update.
Tony
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-05-07 17:50 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-06 9:05 [PATCH] omap3_beagle: init uart2 for beagle rev AX/BX only Govindraj.R
2012-03-06 9:05 ` Govindraj.R
2012-03-06 21:38 ` Tony Lindgren
2012-03-06 21:38 ` Tony Lindgren
2012-03-07 0:39 ` Robert Nelson
2012-03-07 0:39 ` Robert Nelson
2012-05-04 18:18 ` Tony Lindgren
2012-05-04 18:18 ` Tony Lindgren
2012-05-07 12:22 ` Raja, Govindraj
2012-05-07 12:22 ` Raja, Govindraj
2012-05-07 17:50 ` Tony Lindgren
2012-05-07 17:50 ` Tony Lindgren
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.