Re: [PATCH v2 07/12] OMAP: Serial: Allow UART parameters to be configured from board file

2011-05-04 Thread Tony Lindgren
* Govindraj.R govindraj.r...@ti.com [110429 05:39]:
 @@ -250,7 +251,7 @@ static void __init omap_2430sdp_init(void)
   omap2430_i2c_init();
  
   platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
 - omap_serial_init();
 + omap_serial_init(NULL);
   omap2_hsmmc_init(mmc);
   omap2_usbfs_init(sdp2430_usb_config);
...
  
  static inline void board_serial_init(void)
  {
 - omap_serial_init();
 + omap_serial_init(NULL);
  }

This change seems like crazy churn and probably not needed
if it's always null. Boards using platform_data can use
omap_serial_init_port instead, right?  

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 07/12] OMAP: Serial: Allow UART parameters to be configured from board file

2011-05-04 Thread Govindraj
On Wed, May 4, 2011 at 3:25 PM, Tony Lindgren t...@atomide.com wrote:
 * Govindraj.R govindraj.r...@ti.com [110429 05:39]:
 @@ -250,7 +251,7 @@ static void __init omap_2430sdp_init(void)
       omap2430_i2c_init();

       platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
 -     omap_serial_init();
 +     omap_serial_init(NULL);
       omap2_hsmmc_init(mmc);
       omap2_usbfs_init(sdp2430_usb_config);
 ...

  static inline void board_serial_init(void)
  {
 -     omap_serial_init();
 +     omap_serial_init(NULL);
  }

 This change seems like crazy churn and probably not needed
 if it's always null. Boards using platform_data can use
 omap_serial_init_port instead, right?

We can intiliaze only one uart port with omap_serial_init_port.

omap_serial_init initializes all uart port.

During any client device integration using dma mode
(for example Bluetooth) we can pass the dma config
params based on the board  client device.

--
Govindraj.R



 Tony
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 07/12] OMAP: Serial: Allow UART parameters to be configured from board file

2011-05-04 Thread Tony Lindgren
* Govindraj govindraj...@gmail.com [110504 03:03]:
 On Wed, May 4, 2011 at 3:25 PM, Tony Lindgren t...@atomide.com wrote:
  * Govindraj.R govindraj.r...@ti.com [110429 05:39]:
  @@ -250,7 +251,7 @@ static void __init omap_2430sdp_init(void)
        omap2430_i2c_init();
 
        platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
  -     omap_serial_init();
  +     omap_serial_init(NULL);
        omap2_hsmmc_init(mmc);
        omap2_usbfs_init(sdp2430_usb_config);
  ...
 
   static inline void board_serial_init(void)
   {
  -     omap_serial_init();
  +     omap_serial_init(NULL);
   }
 
  This change seems like crazy churn and probably not needed
  if it's always null. Boards using platform_data can use
  omap_serial_init_port instead, right?
 
 We can intiliaze only one uart port with omap_serial_init_port.
 
 omap_serial_init initializes all uart port.
 
 During any client device integration using dma mode
 (for example Bluetooth) we can pass the dma config
 params based on the board  client device.

But you're changing all omap_serial_init() calls to
omap_serial_init(NULL) so there are no users for that.

It should be a separate patch if it's needed.

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 07/12] OMAP: Serial: Allow UART parameters to be configured from board file

2011-05-04 Thread Govindraj
On Wed, May 4, 2011 at 3:55 PM, Tony Lindgren t...@atomide.com wrote:
 * Govindraj govindraj...@gmail.com [110504 03:03]:
 On Wed, May 4, 2011 at 3:25 PM, Tony Lindgren t...@atomide.com wrote:
  * Govindraj.R govindraj.r...@ti.com [110429 05:39]:
  @@ -250,7 +251,7 @@ static void __init omap_2430sdp_init(void)
        omap2430_i2c_init();
 
        platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
  -     omap_serial_init();
  +     omap_serial_init(NULL);
        omap2_hsmmc_init(mmc);
        omap2_usbfs_init(sdp2430_usb_config);
  ...
 
   static inline void board_serial_init(void)
   {
  -     omap_serial_init();
  +     omap_serial_init(NULL);
   }
 
  This change seems like crazy churn and probably not needed
  if it's always null. Boards using platform_data can use
  omap_serial_init_port instead, right?

 We can intiliaze only one uart port with omap_serial_init_port.

 omap_serial_init initializes all uart port.

 During any client device integration using dma mode
 (for example Bluetooth) we can pass the dma config
 params based on the board  client device.

 But you're changing all omap_serial_init() calls to
 omap_serial_init(NULL) so there are no users for that.

 It should be a separate patch if it's needed.


Agree.

Will add seperate func. in serial.c file for board that need to pass these
params and retain the old func. omap_serial_init() syntax to avoid all the
additions in board-*.c files.

--
Thanks,
Govindraj.R

 Tony

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 07/12] OMAP: Serial: Allow UART parameters to be configured from board file

2011-04-29 Thread Govindraj.R
From: Deepak K deepa...@ti.com

The following UART parameters are defined within the UART driver:

1). Whether the UART uses DMA (dma_enabled), by default set to 0
2). The size of dma buffer (set to 4096 bytes)
3). The time after which the dma should stop if no more data is received.
4). The auto suspend delay that will be passed for pm_runtime_autosuspend
where uart will be disabled after timeout

Different UARTs may be used for different purpose such as the console,
for interfacing bluetooth chip, for interfacing to a modem chip, etc.
Therefore, it is necessary to be able to customize the above settings
for a given board on a per UART basis.

This change allows these parameters to be configured from the board file
and allows the parameters to be configured for each UART independently.

If a board does not define its own custom parameters for the UARTs, then
use the default parameters in the structure omap_serial_default_info.
The default parameters are defined to be the same as the current settings
in the UART driver to avoid breaking the UART for any board. By default,
make all boards use the default UART parameters.

Signed-off-by: Deepak K deepa...@ti.com
Signed-off-by: Jon Hunter jon-hun...@ti.com
Signed-off-by: Govindraj.R govindraj.r...@ti.com
---
 arch/arm/mach-omap2/board-2430sdp.c   |3 +-
 arch/arm/mach-omap2/board-3430sdp.c   |9 ---
 arch/arm/mach-omap2/board-4430sdp.c   |   11 +
 arch/arm/mach-omap2/board-am3517evm.c |3 +-
 arch/arm/mach-omap2/board-apollon.c   |3 +-
 arch/arm/mach-omap2/board-cm-t35.c|3 +-
 arch/arm/mach-omap2/board-cm-t3517.c  |3 +-
 arch/arm/mach-omap2/board-devkit8000.c|3 +-
 arch/arm/mach-omap2/board-generic.c   |3 +-
 arch/arm/mach-omap2/board-h4.c|3 +-
 arch/arm/mach-omap2/board-igep0020.c  |3 +-
 arch/arm/mach-omap2/board-igep0030.c  |3 +-
 arch/arm/mach-omap2/board-ldp.c   |3 +-
 arch/arm/mach-omap2/board-n8x0.c  |9 ---
 arch/arm/mach-omap2/board-omap3beagle.c   |3 +-
 arch/arm/mach-omap2/board-omap3evm.c  |3 +-
 arch/arm/mach-omap2/board-omap3logic.c|3 +-
 arch/arm/mach-omap2/board-omap3pandora.c  |3 +-
 arch/arm/mach-omap2/board-omap3stalker.c  |3 +-
 arch/arm/mach-omap2/board-omap3touchbook.c|3 +-
 arch/arm/mach-omap2/board-omap4panda.c|   11 +
 arch/arm/mach-omap2/board-overo.c |3 +-
 arch/arm/mach-omap2/board-rm680.c |3 +-
 arch/arm/mach-omap2/board-rx51.c  |3 +-
 arch/arm/mach-omap2/board-ti8168evm.c |2 +-
 arch/arm/mach-omap2/board-zoom-peripherals.c  |3 +-
 arch/arm/mach-omap2/serial.c  |   28 +++-
 arch/arm/plat-omap/include/plat/omap-serial.h |   14 +--
 arch/arm/plat-omap/include/plat/serial.h  |6 +++-
 drivers/tty/serial/omap-serial.c  |8 ++
 30 files changed, 109 insertions(+), 52 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
b/arch/arm/mach-omap2/board-2430sdp.c
index 1fa6bb8..88f969b 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -38,6 +38,7 @@
 #include plat/gpmc.h
 #include plat/usb.h
 #include plat/gpmc-smc91x.h
+#include plat/omap-serial.h
 
 #include mux.h
 #include hsmmc.h
@@ -250,7 +251,7 @@ static void __init omap_2430sdp_init(void)
omap2430_i2c_init();
 
platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
-   omap_serial_init();
+   omap_serial_init(NULL);
omap2_hsmmc_init(mmc);
omap2_usbfs_init(sdp2430_usb_config);
 
diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
b/arch/arm/mach-omap2/board-3430sdp.c
index 9afd087..7912174 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -32,6 +32,7 @@
 #include asm/mach/map.h
 
 #include plat/mcspi.h
+#include plat/omap-serial.h
 #include plat/board.h
 #include plat/usb.h
 #include plat/common.h
@@ -739,16 +740,16 @@ static struct omap_board_data serial3_data = {
 
 static inline void board_serial_init(void)
 {
-   omap_serial_init_port(serial1_data);
-   omap_serial_init_port(serial2_data);
-   omap_serial_init_port(serial3_data);
+   omap_serial_init_port(serial1_data, NULL);
+   omap_serial_init_port(serial2_data, NULL);
+   omap_serial_init_port(serial3_data, NULL);
 }
 #else
 #define board_mux  NULL
 
 static inline void board_serial_init(void)
 {
-   omap_serial_init();
+   omap_serial_init(NULL);
 }
 #endif
 
diff --git a/arch/arm/mach-omap2/board-4430sdp.c 
b/arch/arm/mach-omap2/board-4430sdp.c
index 56702c5..c7651bd 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -37,6 +37,7 @@
 #include plat/mmc.h
 #include plat/omap4-keypad.h
 #include