Moving ARM DCC from stdio to serial
cover Moving ARM DCC from stdio to serial
Hi,
I am not sure about this change but it seems to me there shouldn't be any problem to remove stdio support because it can be simple another serial driver which can use serial multi interface.
Also it is in serial folder.
What was the reason to use it as stdio device? Or is there still a reason to use it as stdio device?
Thanks for your comments,
Michal
Jagannadha Sutradharudu Teki (2):
serial: arm_dcc: Remove stdio structure support
serial: arm_dcc: Register with serial core
common/stdio.c | 3 --- drivers/serial/arm_dcc.c | 41 +++++++++++++++++++++++------------------ drivers/serial/serial.c | 2 ++ include/stdio_dev.h | 3 --- 4 files changed, 25 insertions(+), 24 deletions(-)
--
1.8.2.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130806/3e0aed75/attachment.pgp>
RFC PATCH 1/2 serial: arm_dcc: Remove stdio structure support
From: Jagannadha Sutradharudu Teki <[email protected]>
Removed stdio structure ops support on arm_dcc driver, and need to register with serial core so-that it can access like remianing serial drivers.
--- common/stdio.c | 3 --- drivers/serial/arm_dcc.c | 16 ---------------- include/stdio_dev.h | 3 --- 3 files changed, 22 deletions(-)
common/stdio.c +0 -3
@@ -196,9 +196,6 @@ int stdio_init (void)/* Initialize the list */ INIT_LIST_HEAD (&(devs.list)); -#ifdef CONFIG_ARM_DCC -drv_arm_dcc_init (); -#endif #ifdef CONFIG_SYS_I2C i2c_init_all ();#else
drivers/serial/arm_dcc.c +0 -16
@@ -27,7 +27,6 @@*/ #include <common.h> -#include <stdio_dev.h> #if defined(CONFIG_CPU_V6 )/*
@@ -138,21 +137,6 @@ int arm_dcc_tstc(void)return reg; } -static struct stdio_dev arm_dcc_dev; - -int drv_arm_dcc_init (void ) -{ -strcpy (arm_dcc_dev.name,"dcc" ); - arm_dcc_dev.ext =0 ;/* No extensions */ - arm_dcc_dev.flags =DEV_FLAGS_INPUT |DEV_FLAGS_OUTPUT ; - arm_dcc_dev.tstc = arm_dcc_tstc;/* 'tstc' function */ - arm_dcc_dev.getc = arm_dcc_getc;/* 'getc' function */ - arm_dcc_dev.putc = arm_dcc_putc;/* 'putc' function */ - arm_dcc_dev.puts = arm_dcc_puts;/* 'puts' function */ - -return stdio_register (&arm_dcc_dev); -} -__weak struct serial_device *default_serial_console (void ) {return NULL ;
include/stdio_dev.h +0 -3
@@ -83,9 +83,6 @@ struct list_head* stdio_get_list(void);struct stdio_dev *stdio_get_by_name (const char * name);struct stdio_dev *stdio_clone (struct stdio_dev *dev); -#ifdef CONFIG_ARM_DCC -int drv_arm_dcc_init (void ); -#endif #ifdef CONFIG_LCD int drv_lcd_init (void );#endif
--
1.8.2.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130806/3142c6c9/attachment.pgp>
RFC PATCH 2/2 serial: arm_dcc: Register with serial core
In reply to Michal SimekFrom: Jagannadha Sutradharudu Teki <[email protected]>
Register arm_dcc with drivers/serial/serial.c
--- drivers/serial/arm_dcc.c | 33 +++++++++++++++++++++++++++------ drivers/serial/serial.c | 2 ++ 2 files changed, 29 insertions(+), 6 deletions(-)
drivers/serial/arm_dcc.c +27 -6
@@ -27,6 +27,7 @@*/ #include <common.h> +#include <serial.h> #if defined(CONFIG_CPU_V6 )/*
@@ -88,12 +89,12 @@#define TIMEOUT_COUNT 0x4000000 -int arm_dcc_init (void ) +static int arm_dcc_init (void ) {return 0 ; } -int arm_dcc_getc (void ) +static int arm_dcc_getc (void ) {int ch; registerunsigned int reg;
@@ -106,7 +107,7 @@ int arm_dcc_getc(void)return ch; } -void arm_dcc_putc (char ch) +static void arm_dcc_putc (char ch) { registerunsigned int reg;unsigned int timeout_count =TIMEOUT_COUNT ;
@@ -122,13 +123,13 @@ void arm_dcc_putc(char ch)write_dcc (ch); } -void arm_dcc_puts (const char *s) +static void arm_dcc_puts (const char *s) {while (*s)arm_dcc_putc (*s++); } -int arm_dcc_tstc (void ) +static int arm_dcc_tstc (void ) { registerunsigned int reg;
@@ -137,7 +138,27 @@ int arm_dcc_tstc(void)return reg; } +static void arm_dcc_setbrg (void ) +{ +} + +static struct serial_device arm_dcc_drv = { + .name ="arm_dcc" , + .start = arm_dcc_init, + .stop =NULL , + .setbrg = arm_dcc_setbrg, + .putc = arm_dcc_putc, + .puts = arm_dcc_puts, + .getc = arm_dcc_getc, + .tstc = arm_dcc_tstc, +}; + +void arm_dcc_initialize (void ) +{ +serial_register (&arm_dcc_drv); +} +__weak struct serial_device *default_serial_console (void ) { -return NULL ; +return &arm_dcc_drv; }
drivers/serial/serial.c +2 -0
@@ -159,6 +159,7 @@ serial_initfunc(pl01x_serial_initialize);serial_initfunc (s3c44b0_serial_initialize);serial_initfunc (sa1100_serial_initialize);serial_initfunc (sh_serial_initialize); +serial_initfunc (arm_dcc_initialize);/** * serial_register() - Register serial driver with serial driver core
@@ -251,6 +252,7 @@ void serial_initialize(void)s3c44b0_serial_initialize ();sa1100_serial_initialize ();sh_serial_initialize (); +arm_dcc_initialize ();serial_assign (default_serial_console ()->name); }
--
1.8.2.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130806/1df9e6b5/attachment.pgp>
cover Moving ARM DCC from stdio to serial
In reply to Michal SimekDear Michal Simek,
Quoted 5 lines · In message <[email protected]> you wrote:
I am not sure about this change but it seems to me there shouldn't be any problem to remove stdio support because it can be simple another serial driver which can use serial multi interface.
Does this not mean we lose the capability to use DCC as console port?
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
History is only a confused heap of facts.
-- Philip Earl of Chesterfieldcover Moving ARM DCC from stdio to serial
Hi Wolfgang,
Quoted 10 lines · Wolfgang Denk
Dear Michal Simek,
Quoted 5 lines · In message <[email protected]> you wrote:
I am not sure about this change but it seems to me there shouldn't be any problem to remove stdio support because it can be simple another serial driver which can use serial multi interface.
Does this not mean we lose the capability to use DCC as console port?
We have done this change based on testing and use case which are using dcc as console port.
It means with this change we are not loosing any capability of using dcc port as console.
Can you remember why stdio registration was used in past?
Thanks,
Michal
Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 263 bytes Desc: OpenPGP digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130806/59d3b791/attachment.pgp>