All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RFC PATCH 0/2] Moving ARM DCC from stdio to serial
@ 2013-08-06 13:17 Michal Simek
  2013-08-06 13:17 ` [U-Boot] [RFC PATCH 1/2] serial: arm_dcc: Remove stdio structure support Michal Simek
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Michal Simek @ 2013-08-06 13:17 UTC (permalink / raw)
  To: u-boot

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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [RFC PATCH 1/2] serial: arm_dcc: Remove stdio structure support
  2013-08-06 13:17 [U-Boot] [RFC PATCH 0/2] Moving ARM DCC from stdio to serial Michal Simek
@ 2013-08-06 13:17 ` Michal Simek
  2013-08-06 13:17 ` [U-Boot] [RFC PATCH 2/2] serial: arm_dcc: Register with serial core Michal Simek
  2013-08-06 16:02 ` [U-Boot] [RFC PATCH 0/2] Moving ARM DCC from stdio to serial Wolfgang Denk
  2 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2013-08-06 13:17 UTC (permalink / raw)
  To: u-boot

From: Jagannadha Sutradharudu Teki <jagannadha.sutradharudu-teki@xilinx.com>

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.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 common/stdio.c           |  3 ---
 drivers/serial/arm_dcc.c | 16 ----------------
 include/stdio_dev.h      |  3 ---
 3 files changed, 22 deletions(-)

diff --git a/common/stdio.c b/common/stdio.c
index 721e9a1..844f98c 100644
--- a/common/stdio.c
+++ b/common/stdio.c
@@ -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
diff --git a/drivers/serial/arm_dcc.c b/drivers/serial/arm_dcc.c
index c217c88..e76c038 100644
--- a/drivers/serial/arm_dcc.c
+++ b/drivers/serial/arm_dcc.c
@@ -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;
diff --git a/include/stdio_dev.h b/include/stdio_dev.h
index d0b5593..e6dc12a 100644
--- a/include/stdio_dev.h
+++ b/include/stdio_dev.h
@@ -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>

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [RFC PATCH 2/2] serial: arm_dcc: Register with serial core
  2013-08-06 13:17 [U-Boot] [RFC PATCH 0/2] Moving ARM DCC from stdio to serial Michal Simek
  2013-08-06 13:17 ` [U-Boot] [RFC PATCH 1/2] serial: arm_dcc: Remove stdio structure support Michal Simek
@ 2013-08-06 13:17 ` Michal Simek
  2013-08-06 16:02 ` [U-Boot] [RFC PATCH 0/2] Moving ARM DCC from stdio to serial Wolfgang Denk
  2 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2013-08-06 13:17 UTC (permalink / raw)
  To: u-boot

From: Jagannadha Sutradharudu Teki <jagannadha.sutradharudu-teki@xilinx.com>

Register arm_dcc with drivers/serial/serial.c

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>

---
 drivers/serial/arm_dcc.c | 33 +++++++++++++++++++++++++++------
 drivers/serial/serial.c  |  2 ++
 2 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/drivers/serial/arm_dcc.c b/drivers/serial/arm_dcc.c
index e76c038..29d9295 100644
--- a/drivers/serial/arm_dcc.c
+++ b/drivers/serial/arm_dcc.c
@@ -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;
 	register unsigned 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)
 {
 	register unsigned 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)
 {
 	register unsigned 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;
 }
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 6730135..118fbc3 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -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>

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [RFC PATCH 0/2] Moving ARM DCC from stdio to serial
  2013-08-06 13:17 [U-Boot] [RFC PATCH 0/2] Moving ARM DCC from stdio to serial Michal Simek
  2013-08-06 13:17 ` [U-Boot] [RFC PATCH 1/2] serial: arm_dcc: Remove stdio structure support Michal Simek
  2013-08-06 13:17 ` [U-Boot] [RFC PATCH 2/2] serial: arm_dcc: Register with serial core Michal Simek
@ 2013-08-06 16:02 ` Wolfgang Denk
  2013-08-06 19:16   ` Michal Simek
  2 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2013-08-06 16:02 UTC (permalink / raw)
  To: u-boot

Dear Michal Simek,

In message <cover.1375795019.git.michal.simek@xilinx.com> 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

-- 
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 Chesterfield

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [RFC PATCH 0/2] Moving ARM DCC from stdio to serial
  2013-08-06 16:02 ` [U-Boot] [RFC PATCH 0/2] Moving ARM DCC from stdio to serial Wolfgang Denk
@ 2013-08-06 19:16   ` Michal Simek
  0 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2013-08-06 19:16 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,

On 08/06/2013 06:02 PM, Wolfgang Denk wrote:
> Dear Michal Simek,
> 
> In message <cover.1375795019.git.michal.simek@xilinx.com> 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


-- 
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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-06 19:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-06 13:17 [U-Boot] [RFC PATCH 0/2] Moving ARM DCC from stdio to serial Michal Simek
2013-08-06 13:17 ` [U-Boot] [RFC PATCH 1/2] serial: arm_dcc: Remove stdio structure support Michal Simek
2013-08-06 13:17 ` [U-Boot] [RFC PATCH 2/2] serial: arm_dcc: Register with serial core Michal Simek
2013-08-06 16:02 ` [U-Boot] [RFC PATCH 0/2] Moving ARM DCC from stdio to serial Wolfgang Denk
2013-08-06 19:16   ` Michal Simek

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.