All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/8] dm-serial: bug fix and refactoring and conversion of Uniphier serial
@ 2014-10-23 13:26 Masahiro Yamada
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 1/8] serial: add static directive to local functions Masahiro Yamada
                   ` (7 more replies)
  0 siblings, 8 replies; 22+ messages in thread
From: Masahiro Yamada @ 2014-10-23 13:26 UTC (permalink / raw)
  To: u-boot

1/8: cleanup
2/8: bug fix
3/8 - 4/8: cleanup
5/8: prepare some Kconfig entries
7/8 - 8/8: convert UniPhier serial driver and some cleanups

Masahiro Yamada (8):
  serial: add static directive to local functions
  dm: serial: fix console putc
  dm: serial: remove unnecessary casting
  dm: serial: consolidate common code more
  dm: add entries to Kconfig
  dm: serial: use Driver Model for UniPhier serial driver
  serial: uniphier: move CONFIG_UNIPHIER_SERIAL to Kconfig
  serial: remove uniphier_serial_initialize() call

 arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile      |   1 +
 arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c  |  15 ++
 arch/arm/cpu/armv7/uniphier/ph1-pro4/Makefile     |   1 +
 arch/arm/cpu/armv7/uniphier/ph1-pro4/platdevice.c |  15 ++
 arch/arm/cpu/armv7/uniphier/ph1-sld8/Makefile     |   1 +
 arch/arm/cpu/armv7/uniphier/ph1-sld8/platdevice.c |  15 ++
 arch/arm/include/asm/arch-uniphier/platdevice.h   |  24 +++
 configs/ph1_ld4_defconfig                         |   3 +
 configs/ph1_pro4_defconfig                        |   3 +
 configs/ph1_sld8_defconfig                        |   3 +
 drivers/core/Kconfig                              |   6 +
 drivers/gpio/Kconfig                              |   6 +
 drivers/serial/Kconfig                            |  12 ++
 drivers/serial/serial-uclass.c                    |  83 +++++----
 drivers/serial/serial.c                           |   2 -
 drivers/serial/serial_ns16550.c                   |  21 +--
 drivers/serial/serial_s3c24x0.c                   |  10 +-
 drivers/serial/serial_uniphier.c                  | 199 ++++++++--------------
 drivers/spi/Kconfig                               |   6 +
 include/common.h                                  |   7 -
 include/configs/ph1_ld4.h                         |   6 +-
 include/configs/ph1_pro4.h                        |   6 +-
 include/configs/ph1_sld8.h                        |   6 +-
 include/configs/uniphier-common.h                 |   7 +-
 include/dm/platform_data/serial-uniphier.h        |  18 ++
 25 files changed, 261 insertions(+), 215 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c
 create mode 100644 arch/arm/cpu/armv7/uniphier/ph1-pro4/platdevice.c
 create mode 100644 arch/arm/cpu/armv7/uniphier/ph1-sld8/platdevice.c
 create mode 100644 arch/arm/include/asm/arch-uniphier/platdevice.h
 create mode 100644 include/dm/platform_data/serial-uniphier.h

-- 
1.9.1

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

* [U-Boot] [PATCH v2 1/8] serial: add static directive to local functions
  2014-10-23 13:26 [U-Boot] [PATCH v2 0/8] dm-serial: bug fix and refactoring and conversion of Uniphier serial Masahiro Yamada
@ 2014-10-23 13:26 ` Masahiro Yamada
  2014-10-24  3:54   ` Simon Glass
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 2/8] dm: serial: fix console putc Masahiro Yamada
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 22+ messages in thread
From: Masahiro Yamada @ 2014-10-23 13:26 UTC (permalink / raw)
  To: u-boot

The functions _serial_putc, _serial_putc_raw, _serial_puts,
_serial_getc, _serial_tstc, _serial_setbrg are defined and used
locally in each of serial_ns16550.c and serial_s3c24x0.c.

Add static directive to them and remove declarations from
include/common.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 drivers/serial/serial_ns16550.c | 21 +++++++--------------
 drivers/serial/serial_s3c24x0.c | 10 +++++-----
 include/common.h                |  7 -------
 3 files changed, 12 insertions(+), 26 deletions(-)

diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index 632da4c..799ef6a 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -119,8 +119,7 @@ static NS16550_t serial_ports[6] = {
 	.puts	= eserial##port##_puts,		\
 }
 
-void
-_serial_putc(const char c,const int port)
+static void _serial_putc(const char c, const int port)
 {
 	if (c == '\n')
 		NS16550_putc(PORT, '\r');
@@ -128,35 +127,29 @@ _serial_putc(const char c,const int port)
 	NS16550_putc(PORT, c);
 }
 
-void
-_serial_putc_raw(const char c,const int port)
+static void _serial_putc_raw(const char c, const int port)
 {
 	NS16550_putc(PORT, c);
 }
 
-void
-_serial_puts (const char *s,const int port)
+static void _serial_puts(const char *s, const int port)
 {
 	while (*s) {
-		_serial_putc (*s++,port);
+		_serial_putc(*s++, port);
 	}
 }
 
-
-int
-_serial_getc(const int port)
+static int _serial_getc(const int port)
 {
 	return NS16550_getc(PORT);
 }
 
-int
-_serial_tstc(const int port)
+static int _serial_tstc(const int port)
 {
 	return NS16550_tstc(PORT);
 }
 
-void
-_serial_setbrg (const int port)
+static void _serial_setbrg(const int port)
 {
 	int clock_divisor;
 
diff --git a/drivers/serial/serial_s3c24x0.c b/drivers/serial/serial_s3c24x0.c
index c07f4c9..7afc504 100644
--- a/drivers/serial/serial_s3c24x0.c
+++ b/drivers/serial/serial_s3c24x0.c
@@ -69,7 +69,7 @@ DECLARE_GLOBAL_DATA_PTR;
 static int hwflow;
 #endif
 
-void _serial_setbrg(const int dev_index)
+static void _serial_setbrg(const int dev_index)
 {
 	struct s3c24x0_uart *uart = s3c24x0_get_base_uart(dev_index);
 	unsigned int reg = 0;
@@ -131,7 +131,7 @@ static int serial_init_dev(const int dev_index)
  * otherwise. When the function is succesfull, the character read is
  * written into its argument c.
  */
-int _serial_getc(const int dev_index)
+static int _serial_getc(const int dev_index)
 {
 	struct s3c24x0_uart *uart = s3c24x0_get_base_uart(dev_index);
 
@@ -181,7 +181,7 @@ void enable_putc(void)
 /*
  * Output a single byte to the serial port.
  */
-void _serial_putc(const char c, const int dev_index)
+static void _serial_putc(const char c, const int dev_index)
 {
 	struct s3c24x0_uart *uart = s3c24x0_get_base_uart(dev_index);
 #ifdef CONFIG_MODEM_SUPPORT
@@ -212,7 +212,7 @@ static inline void serial_putc_dev(unsigned int dev_index, const char c)
 /*
  * Test whether a character is in the RX buffer
  */
-int _serial_tstc(const int dev_index)
+static int _serial_tstc(const int dev_index)
 {
 	struct s3c24x0_uart *uart = s3c24x0_get_base_uart(dev_index);
 
@@ -224,7 +224,7 @@ static inline int serial_tstc_dev(unsigned int dev_index)
 	return _serial_tstc(dev_index);
 }
 
-void _serial_puts(const char *s, const int dev_index)
+static void _serial_puts(const char *s, const int dev_index)
 {
 	while (*s) {
 		_serial_putc(*s++, dev_index);
diff --git a/include/common.h b/include/common.h
index d5020c8..bcf6c7e 100644
--- a/include/common.h
+++ b/include/common.h
@@ -636,13 +636,6 @@ struct stdio_dev;
 int serial_stub_getc(struct stdio_dev *sdev);
 int serial_stub_tstc(struct stdio_dev *sdev);
 
-void	_serial_setbrg (const int);
-void	_serial_putc   (const char, const int);
-void	_serial_putc_raw(const char, const int);
-void	_serial_puts   (const char *, const int);
-int	_serial_getc   (const int);
-int	_serial_tstc   (const int);
-
 /* $(CPU)/speed.c */
 int	get_clocks (void);
 int	get_clocks_866 (void);
-- 
1.9.1

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

* [U-Boot] [PATCH v2 2/8] dm: serial: fix console putc
  2014-10-23 13:26 [U-Boot] [PATCH v2 0/8] dm-serial: bug fix and refactoring and conversion of Uniphier serial Masahiro Yamada
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 1/8] serial: add static directive to local functions Masahiro Yamada
@ 2014-10-23 13:26 ` Masahiro Yamada
  2014-10-23 18:43   ` Simon Glass
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 3/8] dm: serial: remove unnecessary casting Masahiro Yamada
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 22+ messages in thread
From: Masahiro Yamada @ 2014-10-23 13:26 UTC (permalink / raw)
  To: u-boot

Commit b8893327e9d2 (dm: serial: Put common code into separate functions)
consolidated getc() correctly, but introduced another bug to putc();
serial_stub_putc() passes sdev->priv to serial_putc_dev(), but
serial_putc_dev() uses cur_dev instead of the given argument.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

Changes in v2:
  - Newly added

 drivers/serial/serial-uclass.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 1a75950..f2bc4d8 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -73,14 +73,14 @@ void serial_initialize(void)
 
 static void serial_putc_dev(struct udevice *dev, char ch)
 {
-	struct dm_serial_ops *ops = serial_get_ops(cur_dev);
+	struct dm_serial_ops *ops = serial_get_ops(dev);
 	int err;
 
 	do {
-		err = ops->putc(cur_dev, ch);
+		err = ops->putc(dev, ch);
 	} while (err == -EAGAIN);
 	if (ch == '\n')
-		serial_putc('\r');
+		serial_putc_dev(dev, '\r');
 }
 
 void serial_putc(char ch)
-- 
1.9.1

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

* [U-Boot] [PATCH v2 3/8] dm: serial: remove unnecessary casting
  2014-10-23 13:26 [U-Boot] [PATCH v2 0/8] dm-serial: bug fix and refactoring and conversion of Uniphier serial Masahiro Yamada
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 1/8] serial: add static directive to local functions Masahiro Yamada
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 2/8] dm: serial: fix console putc Masahiro Yamada
@ 2014-10-23 13:26 ` Masahiro Yamada
  2014-10-23 18:45   ` Simon Glass
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 4/8] dm: serial: consolidate common code more Masahiro Yamada
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 22+ messages in thread
From: Masahiro Yamada @ 2014-10-23 13:26 UTC (permalink / raw)
  To: u-boot

The type (void *) can be directly passed to a function that
takes a specific pointer type.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

Changes in v2:
  - Rebase

 drivers/serial/serial-uclass.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index f2bc4d8..5767312 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -135,9 +135,7 @@ void serial_stdio_init(void)
 
 static void serial_stub_putc(struct stdio_dev *sdev, const char ch)
 {
-	struct udevice *dev = sdev->priv;
-
-	serial_putc_dev(dev, ch);
+	serial_putc_dev(sdev->priv, ch);
 }
 
 void serial_stub_puts(struct stdio_dev *sdev, const char *str)
@@ -148,9 +146,7 @@ void serial_stub_puts(struct stdio_dev *sdev, const char *str)
 
 int serial_stub_getc(struct stdio_dev *sdev)
 {
-	struct udevice *dev = sdev->priv;
-
-	return serial_getc_dev(dev);
+	return serial_getc_dev(sdev->priv);
 }
 
 int serial_stub_tstc(struct stdio_dev *sdev)
-- 
1.9.1

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

* [U-Boot] [PATCH v2 4/8] dm: serial: consolidate common code more
  2014-10-23 13:26 [U-Boot] [PATCH v2 0/8] dm-serial: bug fix and refactoring and conversion of Uniphier serial Masahiro Yamada
                   ` (2 preceding siblings ...)
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 3/8] dm: serial: remove unnecessary casting Masahiro Yamada
@ 2014-10-23 13:26 ` Masahiro Yamada
  2014-10-23 18:46   ` Simon Glass
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 5/8] dm: add entries to Kconfig Masahiro Yamada
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 22+ messages in thread
From: Masahiro Yamada @ 2014-10-23 13:26 UTC (permalink / raw)
  To: u-boot

Commit b8893327e9d2 (dm: serial: Put common code into separate functions)
consolidated getc() and putc().  This commit does more puts() and tsts().

Also rename locally used functions to _serial_*() for clarification
because we have similar functions names here are there in this file.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

Changes in v2:
  - Rebase

 drivers/serial/serial-uclass.c | 75 ++++++++++++++++++++++--------------------
 1 file changed, 39 insertions(+), 36 deletions(-)

diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 5767312..8764194 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -71,7 +71,7 @@ void serial_initialize(void)
 	serial_find_console_or_panic();
 }
 
-static void serial_putc_dev(struct udevice *dev, char ch)
+static void _serial_putc(struct udevice *dev, char ch)
 {
 	struct dm_serial_ops *ops = serial_get_ops(dev);
 	int err;
@@ -80,53 +80,63 @@ static void serial_putc_dev(struct udevice *dev, char ch)
 		err = ops->putc(dev, ch);
 	} while (err == -EAGAIN);
 	if (ch == '\n')
-		serial_putc_dev(dev, '\r');
+		_serial_putc(dev, '\r');
 }
 
-void serial_putc(char ch)
+static void _serial_puts(struct udevice *dev, const char *str)
 {
-	serial_putc_dev(cur_dev, ch);
+	while (*str)
+		_serial_putc(dev, *str++);
 }
 
-void serial_setbrg(void)
+static int _serial_getc(struct udevice *dev)
 {
-	struct dm_serial_ops *ops = serial_get_ops(cur_dev);
+	struct dm_serial_ops *ops = serial_get_ops(dev);
+	int err;
 
-	if (ops->setbrg)
-		ops->setbrg(cur_dev, gd->baudrate);
-}
+	do {
+		err = ops->getc(dev);
+	} while (err == -EAGAIN);
 
-void serial_puts(const char *str)
-{
-	while (*str)
-		serial_putc(*str++);
+	return err >= 0 ? err : 0;
 }
 
-int serial_tstc(void)
+static int _serial_tstc(struct udevice *dev)
 {
-	struct dm_serial_ops *ops = serial_get_ops(cur_dev);
+	struct dm_serial_ops *ops = serial_get_ops(dev);
 
 	if (ops->pending)
-		return ops->pending(cur_dev, true);
+		return ops->pending(dev, true);
 
 	return 1;
 }
 
-static int serial_getc_dev(struct udevice *dev)
+void serial_putc(char ch)
 {
-	struct dm_serial_ops *ops = serial_get_ops(dev);
-	int err;
-
-	do {
-		err = ops->getc(dev);
-	} while (err == -EAGAIN);
+	_serial_putc(cur_dev, ch);
+}
 
-	return err >= 0 ? err : 0;
+void serial_puts(const char *str)
+{
+	_serial_puts(cur_dev, str);
 }
 
 int serial_getc(void)
 {
-	return serial_getc_dev(cur_dev);
+	return _serial_getc(cur_dev);
+}
+
+int serial_tstc(void)
+{
+	return _serial_tstc(cur_dev);
+}
+
+void serial_setbrg(void)
+{
+	struct dm_serial_ops *ops = serial_get_ops(cur_dev);
+
+	if (ops->setbrg)
+		ops->setbrg(cur_dev, gd->baudrate);
 }
 
 void serial_stdio_init(void)
@@ -135,29 +145,22 @@ void serial_stdio_init(void)
 
 static void serial_stub_putc(struct stdio_dev *sdev, const char ch)
 {
-	serial_putc_dev(sdev->priv, ch);
+	_serial_putc(sdev->priv, ch);
 }
 
 void serial_stub_puts(struct stdio_dev *sdev, const char *str)
 {
-	while (*str)
-		serial_stub_putc(sdev, *str++);
+	_serial_puts(sdev->priv, str);
 }
 
 int serial_stub_getc(struct stdio_dev *sdev)
 {
-	return serial_getc_dev(sdev->priv);
+	return _serial_getc(sdev->priv);
 }
 
 int serial_stub_tstc(struct stdio_dev *sdev)
 {
-	struct udevice *dev = sdev->priv;
-	struct dm_serial_ops *ops = serial_get_ops(dev);
-
-	if (ops->pending)
-		return ops->pending(dev, true);
-
-	return 1;
+	return _serial_tstc(sdev->priv);
 }
 
 static int serial_post_probe(struct udevice *dev)
-- 
1.9.1

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

* [U-Boot] [PATCH v2 5/8] dm: add entries to Kconfig
  2014-10-23 13:26 [U-Boot] [PATCH v2 0/8] dm-serial: bug fix and refactoring and conversion of Uniphier serial Masahiro Yamada
                   ` (3 preceding siblings ...)
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 4/8] dm: serial: consolidate common code more Masahiro Yamada
@ 2014-10-23 13:26 ` Masahiro Yamada
  2014-10-24  3:54   ` Simon Glass
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 6/8] dm: serial: use Driver Model for UniPhier serial driver Masahiro Yamada
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 22+ messages in thread
From: Masahiro Yamada @ 2014-10-23 13:26 UTC (permalink / raw)
  To: u-boot

Create entries of CONFIG_DM, CONFIG_DM_SERIAL, CONFIG_DM_GPIO
and CONFIG_DM_SPI.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
  - Add CONFIG_DM_SPI

 drivers/core/Kconfig   | 6 ++++++
 drivers/gpio/Kconfig   | 6 ++++++
 drivers/serial/Kconfig | 6 ++++++
 drivers/spi/Kconfig    | 6 ++++++
 4 files changed, 24 insertions(+)

diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index e69de29..d2799dc 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -0,0 +1,6 @@
+config DM
+	bool "Enable Driver Model"
+	depends on !SPL_BUILD
+	help
+	  This config option enables Driver Model.
+	  To use legacy drivers, say N.
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index e69de29..d21302f 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -0,0 +1,6 @@
+config DM_GPIO
+	bool "Enable Driver Model for GPIO drivers"
+	depends on DM
+	help
+	  If you want to use driver model for GPIO drivers, say Y.
+	  To use legacy GPIO drivers, say N.
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index e69de29..6a392ba 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -0,0 +1,6 @@
+config DM_SERIAL
+	bool "Enable Driver Model for serial drivers"
+	depends on DM
+	help
+	  If you want to use driver model for serial drivers, say Y.
+	  To use legacy serial drivers, say N.
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index e69de29..e1678e6 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -0,0 +1,6 @@
+config DM_SPI
+	bool "Enable Driver Model for SPI drivers"
+	depends on DM
+	help
+	  If you want to use driver model for SPI drivers, say Y.
+	  To use legacy SPI drivers, say N.
-- 
1.9.1

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

* [U-Boot] [PATCH v2 6/8] dm: serial: use Driver Model for UniPhier serial driver
  2014-10-23 13:26 [U-Boot] [PATCH v2 0/8] dm-serial: bug fix and refactoring and conversion of Uniphier serial Masahiro Yamada
                   ` (4 preceding siblings ...)
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 5/8] dm: add entries to Kconfig Masahiro Yamada
@ 2014-10-23 13:26 ` Masahiro Yamada
  2014-10-24  3:55   ` Simon Glass
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 7/8] serial: uniphier: move CONFIG_UNIPHIER_SERIAL to Kconfig Masahiro Yamada
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 8/8] serial: remove uniphier_serial_initialize() call Masahiro Yamada
  7 siblings, 1 reply; 22+ messages in thread
From: Masahiro Yamada @ 2014-10-23 13:26 UTC (permalink / raw)
  To: u-boot

This commit converts UniPhier on-chip serial driver to driver model.

Since UniPhier SoCs do not have Device Tree support, some board files
should be added under arch/arm/cpu/armv7/uniphier/ph1-*/ directories.
(Device Tree support for UniPhier platform is still under way.)

Now the base address and master clock frequency are passed from
platform data, so CONFIG_SYS_UNIPHIER_SERIAL_BASE* and
CONFIG_SYS_UNIPHIER_UART_CLK should be removed.

Tested on UniPhier PH1-LD4 ref board.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile      |   1 +
 arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c  |  15 ++
 arch/arm/cpu/armv7/uniphier/ph1-pro4/Makefile     |   1 +
 arch/arm/cpu/armv7/uniphier/ph1-pro4/platdevice.c |  15 ++
 arch/arm/cpu/armv7/uniphier/ph1-sld8/Makefile     |   1 +
 arch/arm/cpu/armv7/uniphier/ph1-sld8/platdevice.c |  15 ++
 arch/arm/include/asm/arch-uniphier/platdevice.h   |  24 +++
 configs/ph1_ld4_defconfig                         |   2 +
 configs/ph1_pro4_defconfig                        |   2 +
 configs/ph1_sld8_defconfig                        |   2 +
 drivers/serial/serial_uniphier.c                  | 199 ++++++++--------------
 include/configs/ph1_ld4.h                         |   2 -
 include/configs/ph1_pro4.h                        |   2 -
 include/configs/ph1_sld8.h                        |   2 -
 include/configs/uniphier-common.h                 |   7 +-
 include/dm/platform_data/serial-uniphier.h        |  18 ++
 16 files changed, 172 insertions(+), 136 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c
 create mode 100644 arch/arm/cpu/armv7/uniphier/ph1-pro4/platdevice.c
 create mode 100644 arch/arm/cpu/armv7/uniphier/ph1-sld8/platdevice.c
 create mode 100644 arch/arm/include/asm/arch-uniphier/platdevice.h
 create mode 100644 include/dm/platform_data/serial-uniphier.h

diff --git a/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile b/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile
index b385e19..781b511 100644
--- a/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile
+++ b/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile
@@ -3,6 +3,7 @@
 #
 
 obj-$(CONFIG_DISPLAY_BOARDINFO) += board_info.o
+obj-y += platdevice.o
 obj-y += boot-mode.o
 obj-$(CONFIG_BOARD_POSTCLK_INIT) += board_postclk_init.o bcu_init.o \
 		sbc_init.o sg_init.o pll_init.o clkrst_init.o pinctrl.o
diff --git a/arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c b/arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c
new file mode 100644
index 0000000..0047223
--- /dev/null
+++ b/arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c
@@ -0,0 +1,15 @@
+/*
+ * Copyright (C) 2014 Panasonic Corporation
+ *   Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <asm/arch/platdevice.h>
+
+#define UART_MASTER_CLK		36864000
+
+SERIAL_DEVICE(0, 0x54006800, UART_MASTER_CLK)
+SERIAL_DEVICE(1, 0x54006900, UART_MASTER_CLK)
+SERIAL_DEVICE(2, 0x54006a00, UART_MASTER_CLK)
+SERIAL_DEVICE(3, 0x54006b00, UART_MASTER_CLK)
diff --git a/arch/arm/cpu/armv7/uniphier/ph1-pro4/Makefile b/arch/arm/cpu/armv7/uniphier/ph1-pro4/Makefile
index 712afd1..e11f4f6 100644
--- a/arch/arm/cpu/armv7/uniphier/ph1-pro4/Makefile
+++ b/arch/arm/cpu/armv7/uniphier/ph1-pro4/Makefile
@@ -3,6 +3,7 @@
 #
 
 obj-$(CONFIG_DISPLAY_BOARDINFO) += board_info.o
+obj-y += platdevice.o
 obj-y += boot-mode.o
 obj-$(CONFIG_BOARD_POSTCLK_INIT) += board_postclk_init.o sbc_init.o \
 				sg_init.o pll_init.o clkrst_init.o pinctrl.o
diff --git a/arch/arm/cpu/armv7/uniphier/ph1-pro4/platdevice.c b/arch/arm/cpu/armv7/uniphier/ph1-pro4/platdevice.c
new file mode 100644
index 0000000..6da921e
--- /dev/null
+++ b/arch/arm/cpu/armv7/uniphier/ph1-pro4/platdevice.c
@@ -0,0 +1,15 @@
+/*
+ * Copyright (C) 2014 Panasonic Corporation
+ *   Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <asm/arch/platdevice.h>
+
+#define UART_MASTER_CLK		73728000
+
+SERIAL_DEVICE(0, 0x54006800, UART_MASTER_CLK)
+SERIAL_DEVICE(1, 0x54006900, UART_MASTER_CLK)
+SERIAL_DEVICE(2, 0x54006a00, UART_MASTER_CLK)
+SERIAL_DEVICE(3, 0x54006b00, UART_MASTER_CLK)
diff --git a/arch/arm/cpu/armv7/uniphier/ph1-sld8/Makefile b/arch/arm/cpu/armv7/uniphier/ph1-sld8/Makefile
index b385e19..781b511 100644
--- a/arch/arm/cpu/armv7/uniphier/ph1-sld8/Makefile
+++ b/arch/arm/cpu/armv7/uniphier/ph1-sld8/Makefile
@@ -3,6 +3,7 @@
 #
 
 obj-$(CONFIG_DISPLAY_BOARDINFO) += board_info.o
+obj-y += platdevice.o
 obj-y += boot-mode.o
 obj-$(CONFIG_BOARD_POSTCLK_INIT) += board_postclk_init.o bcu_init.o \
 		sbc_init.o sg_init.o pll_init.o clkrst_init.o pinctrl.o
diff --git a/arch/arm/cpu/armv7/uniphier/ph1-sld8/platdevice.c b/arch/arm/cpu/armv7/uniphier/ph1-sld8/platdevice.c
new file mode 100644
index 0000000..59d054a
--- /dev/null
+++ b/arch/arm/cpu/armv7/uniphier/ph1-sld8/platdevice.c
@@ -0,0 +1,15 @@
+/*
+ * Copyright (C) 2014 Panasonic Corporation
+ *   Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <asm/arch/platdevice.h>
+
+#define UART_MASTER_CLK		80000000
+
+SERIAL_DEVICE(0, 0x54006800, UART_MASTER_CLK)
+SERIAL_DEVICE(1, 0x54006900, UART_MASTER_CLK)
+SERIAL_DEVICE(2, 0x54006a00, UART_MASTER_CLK)
+SERIAL_DEVICE(3, 0x54006b00, UART_MASTER_CLK)
diff --git a/arch/arm/include/asm/arch-uniphier/platdevice.h b/arch/arm/include/asm/arch-uniphier/platdevice.h
new file mode 100644
index 0000000..cdf7d13
--- /dev/null
+++ b/arch/arm/include/asm/arch-uniphier/platdevice.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2014 Panasonic Corporation
+ *   Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#ifndef ARCH_PLATDEVICE_H
+#define ARCH_PLATDEVICE_H
+
+#include <dm/platdata.h>
+#include <dm/platform_data/serial-uniphier.h>
+
+#define SERIAL_DEVICE(n, ba, clk)					\
+static struct uniphier_serial_platform_data serial_device##n = {	\
+	.base = ba,							\
+	.uartclk = clk							\
+};									\
+U_BOOT_DEVICE(serial##n) = {						\
+	.name = DRIVER_NAME,						\
+	.platdata = &serial_device##n					\
+};
+
+#endif /* ARCH_PLATDEVICE_H */
diff --git a/configs/ph1_ld4_defconfig b/configs/ph1_ld4_defconfig
index 53f3126..c8404f8 100644
--- a/configs/ph1_ld4_defconfig
+++ b/configs/ph1_ld4_defconfig
@@ -2,7 +2,9 @@ CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_UNIPHIER=y
 +S:CONFIG_MACH_PH1_LD4=y
+CONFIG_DM=y
 CONFIG_NAND_DENALI=y
 CONFIG_SYS_NAND_DENALI_64BIT=y
 CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
+CONFIG_DM_SERIAL=y
 S:CONFIG_SPL_NAND_DENALI=y
diff --git a/configs/ph1_pro4_defconfig b/configs/ph1_pro4_defconfig
index 209466e..5c051e3 100644
--- a/configs/ph1_pro4_defconfig
+++ b/configs/ph1_pro4_defconfig
@@ -2,7 +2,9 @@ CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_UNIPHIER=y
 +S:CONFIG_MACH_PH1_PRO4=y
+CONFIG_DM=y
 CONFIG_NAND_DENALI=y
 CONFIG_SYS_NAND_DENALI_64BIT=y
 CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
+CONFIG_DM_SERIAL=y
 S:CONFIG_SPL_NAND_DENALI=y
diff --git a/configs/ph1_sld8_defconfig b/configs/ph1_sld8_defconfig
index 658977b..2c636e6 100644
--- a/configs/ph1_sld8_defconfig
+++ b/configs/ph1_sld8_defconfig
@@ -2,7 +2,9 @@ CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_ARCH_UNIPHIER=y
 +S:CONFIG_MACH_PH1_SLD8=y
+CONFIG_DM=y
 CONFIG_NAND_DENALI=y
 CONFIG_SYS_NAND_DENALI_64BIT=y
 CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
+CONFIG_DM_SERIAL=y
 S:CONFIG_SPL_NAND_DENALI=y
diff --git a/drivers/serial/serial_uniphier.c b/drivers/serial/serial_uniphier.c
index f8c9d92..9114b3e 100644
--- a/drivers/serial/serial_uniphier.c
+++ b/drivers/serial/serial_uniphier.c
@@ -2,14 +2,14 @@
  * Copyright (C) 2012-2014 Panasonic Corporation
  *   Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
  *
- * Based on serial_ns16550.c
- * (C) Copyright 2000
- * Rob Taylor, Flying Pig Systems. robt at flyingpig.com.
- *
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
 #include <common.h>
+#include <asm/io.h>
+#include <asm/errno.h>
+#include <dm/device.h>
+#include <dm/platform_data/serial-uniphier.h>
 #include <serial.h>
 
 #define UART_REG(x)					\
@@ -48,157 +48,104 @@ struct uniphier_serial {
 #define UART_LSR_DR	0x01		/* Data ready */
 #define UART_LSR_THRE	0x20		/* Xmit holding register empty */
 
-DECLARE_GLOBAL_DATA_PTR;
+struct uniphier_serial_private_data {
+	struct uniphier_serial __iomem *membase;
+};
+
+#define uniphier_serial_port(dev)	\
+	((struct uniphier_serial_private_data *)dev_get_priv(dev))->membase
 
-static void uniphier_serial_init(struct uniphier_serial *port)
+int uniphier_serial_setbrg(struct udevice *dev, int baudrate)
 {
+	struct uniphier_serial_platform_data *plat = dev_get_platdata(dev);
+	struct uniphier_serial __iomem *port = uniphier_serial_port(dev);
 	const unsigned int mode_x_div = 16;
 	unsigned int divisor;
 
 	writeb(UART_LCR_WLS_8, &port->lcr);
 
-	divisor = DIV_ROUND_CLOSEST(CONFIG_SYS_UNIPHIER_UART_CLK,
-						mode_x_div * gd->baudrate);
+	divisor = DIV_ROUND_CLOSEST(plat->uartclk, mode_x_div * baudrate);
 
 	writew(divisor, &port->dlr);
-}
 
-static void uniphier_serial_setbrg(struct uniphier_serial *port)
-{
-	uniphier_serial_init(port);
+	return 0;
 }
 
-static int uniphier_serial_tstc(struct uniphier_serial *port)
+static int uniphier_serial_getc(struct udevice *dev)
 {
-	return (readb(&port->lsr) & UART_LSR_DR) != 0;
-}
+	struct uniphier_serial __iomem *port = uniphier_serial_port(dev);
 
-static int uniphier_serial_getc(struct uniphier_serial *port)
-{
-	while (!uniphier_serial_tstc(port))
-		;
+	if (!(readb(&port->lsr) & UART_LSR_DR))
+		return -EAGAIN;
 
 	return readb(&port->rbr);
 }
 
-static void uniphier_serial_putc(struct uniphier_serial *port, const char c)
+static int uniphier_serial_putc(struct udevice *dev, const char c)
 {
-	if (c == '\n')
-		uniphier_serial_putc(port, '\r');
+	struct uniphier_serial __iomem *port = uniphier_serial_port(dev);
 
-	while (!(readb(&port->lsr) & UART_LSR_THRE))
-		;
+	if (!(readb(&port->lsr) & UART_LSR_THRE))
+		return -EAGAIN;
 
 	writeb(c, &port->thr);
+
+	return 0;
 }
 
-static struct uniphier_serial *serial_ports[4] = {
-#ifdef CONFIG_SYS_UNIPHIER_SERIAL_BASE0
-	(struct uniphier_serial *)CONFIG_SYS_UNIPHIER_SERIAL_BASE0,
-#else
-	NULL,
-#endif
-#ifdef CONFIG_SYS_UNIPHIER_SERIAL_BASE1
-	(struct uniphier_serial *)CONFIG_SYS_UNIPHIER_SERIAL_BASE1,
-#else
-	NULL,
-#endif
-#ifdef CONFIG_SYS_UNIPHIER_SERIAL_BASE2
-	(struct uniphier_serial *)CONFIG_SYS_UNIPHIER_SERIAL_BASE2,
-#else
-	NULL,
-#endif
-#ifdef CONFIG_SYS_UNIPHIER_SERIAL_BASE3
-	(struct uniphier_serial *)CONFIG_SYS_UNIPHIER_SERIAL_BASE3,
-#else
-	NULL,
-#endif
-};
+int uniphier_serial_probe(struct udevice *dev)
+{
+	struct uniphier_serial_private_data *priv = dev_get_priv(dev);
+	struct uniphier_serial_platform_data *plat = dev_get_platdata(dev);
 
-/* Multi serial device functions */
-#define DECLARE_ESERIAL_FUNCTIONS(port) \
-	static int  eserial##port##_init(void) \
-	{ \
-		uniphier_serial_init(serial_ports[port]); \
-		return 0 ; \
-	} \
-	static void eserial##port##_setbrg(void) \
-	{ \
-		uniphier_serial_setbrg(serial_ports[port]); \
-	} \
-	static int  eserial##port##_getc(void) \
-	{ \
-		return uniphier_serial_getc(serial_ports[port]); \
-	} \
-	static int  eserial##port##_tstc(void) \
-	{ \
-		return uniphier_serial_tstc(serial_ports[port]); \
-	} \
-	static void eserial##port##_putc(const char c) \
-	{ \
-		uniphier_serial_putc(serial_ports[port], c); \
-	}
-
-/* Serial device descriptor */
-#define INIT_ESERIAL_STRUCTURE(port, __name) {	\
-	.name	= __name,			\
-	.start	= eserial##port##_init,		\
-	.stop	= NULL,				\
-	.setbrg	= eserial##port##_setbrg,	\
-	.getc	= eserial##port##_getc,		\
-	.tstc	= eserial##port##_tstc,		\
-	.putc	= eserial##port##_putc,		\
-	.puts	= default_serial_puts,		\
-}
+	priv->membase = map_sysmem(plat->base, sizeof(struct uniphier_serial));
 
-#if defined(CONFIG_SYS_UNIPHIER_SERIAL_BASE0)
-DECLARE_ESERIAL_FUNCTIONS(0);
-struct serial_device uniphier_serial0_device =
-	INIT_ESERIAL_STRUCTURE(0, "ttyS0");
-#endif
-#if defined(CONFIG_SYS_UNIPHIER_SERIAL_BASE1)
-DECLARE_ESERIAL_FUNCTIONS(1);
-struct serial_device uniphier_serial1_device =
-	INIT_ESERIAL_STRUCTURE(1, "ttyS1");
-#endif
-#if defined(CONFIG_SYS_UNIPHIER_SERIAL_BASE2)
-DECLARE_ESERIAL_FUNCTIONS(2);
-struct serial_device uniphier_serial2_device =
-	INIT_ESERIAL_STRUCTURE(2, "ttyS2");
-#endif
-#if defined(CONFIG_SYS_UNIPHIER_SERIAL_BASE3)
-DECLARE_ESERIAL_FUNCTIONS(3);
-struct serial_device uniphier_serial3_device =
-	INIT_ESERIAL_STRUCTURE(3, "ttyS3");
-#endif
+	if (!priv->membase)
+		return -ENOMEM;
 
-__weak struct serial_device *default_serial_console(void)
+	return 0;
+}
+
+int uniphier_serial_remove(struct udevice *dev)
 {
-#if defined(CONFIG_SYS_UNIPHIER_SERIAL_BASE0)
-	return &uniphier_serial0_device;
-#elif defined(CONFIG_SYS_UNIPHIER_SERIAL_BASE1)
-	return &uniphier_serial1_device;
-#elif defined(CONFIG_SYS_UNIPHIER_SERIAL_BASE2)
-	return &uniphier_serial2_device;
-#elif defined(CONFIG_SYS_UNIPHIER_SERIAL_BASE3)
-	return &uniphier_serial3_device;
-#else
-#error "No uniphier serial ports configured."
-#endif
+	unmap_sysmem(uniphier_serial_port(dev));
+
+	return 0;
 }
 
-void uniphier_serial_initialize(void)
+#ifdef CONFIG_OF_CONTROL
+static const struct udevice_id uniphier_uart_of_match = {
+	{ .compatible = "panasonic,uniphier-uart"},
+	{},
+};
+
+static int uniphier_serial_ofdata_to_platdata(struct udevice *dev)
 {
-#if defined(CONFIG_SYS_UNIPHIER_SERIAL_BASE0)
-	serial_register(&uniphier_serial0_device);
-#endif
-#if defined(CONFIG_SYS_UNIPHIER_SERIAL_BASE1)
-	serial_register(&uniphier_serial1_device);
-#endif
-#if defined(CONFIG_SYS_UNIPHIER_SERIAL_BASE2)
-	serial_register(&uniphier_serial2_device);
-#endif
-#if defined(CONFIG_SYS_UNIPHIER_SERIAL_BASE3)
-	serial_register(&uniphier_serial3_device);
-#endif
+	/*
+	 * TODO: Masahiro Yamada (yamada.m at jp.panasonic.com)
+	 *
+	 * Implement conversion code from DTB to platform data
+	 * when supporting CONFIG_OF_CONTROL on UniPhir platform.
+	 */
 }
+#endif
+
+static const struct dm_serial_ops uniphier_serial_ops = {
+	.setbrg = uniphier_serial_setbrg,
+	.getc = uniphier_serial_getc,
+	.putc = uniphier_serial_putc,
+};
+
+U_BOOT_DRIVER(uniphier_serial) = {
+	.name = DRIVER_NAME,
+	.id = UCLASS_SERIAL,
+	.of_match = of_match_ptr(uniphier_uart_of_match),
+	.ofdata_to_platdata = of_match_ptr(uniphier_serial_ofdata_to_platdata),
+	.probe = uniphier_serial_probe,
+	.remove = uniphier_serial_remove,
+	.priv_auto_alloc_size = sizeof(struct uniphier_serial_private_data),
+	.platdata_auto_alloc_size =
+				sizeof(struct uniphier_serial_platform_data),
+	.ops = &uniphier_serial_ops,
+	.flags = DM_FLAG_PRE_RELOC,
+};
diff --git a/include/configs/ph1_ld4.h b/include/configs/ph1_ld4.h
index a28d7b5..a546865 100644
--- a/include/configs/ph1_ld4.h
+++ b/include/configs/ph1_ld4.h
@@ -34,8 +34,6 @@
 #define CONFIG_SYS_NS16550_SERIAL
 #endif
 
-#define CONFIG_SYS_UNIPHIER_UART_CLK    36864000
-
 #define CONFIG_SMC911X
 
 #define CONFIG_DDR_NUM_CH0 1
diff --git a/include/configs/ph1_pro4.h b/include/configs/ph1_pro4.h
index b79967f..85c14ba 100644
--- a/include/configs/ph1_pro4.h
+++ b/include/configs/ph1_pro4.h
@@ -34,8 +34,6 @@
 #define CONFIG_SYS_NS16550_SERIAL
 #endif
 
-#define CONFIG_SYS_UNIPHIER_UART_CLK    73728000
-
 #define CONFIG_SMC911X
 
 #define CONFIG_DDR_NUM_CH0 2
diff --git a/include/configs/ph1_sld8.h b/include/configs/ph1_sld8.h
index 9d391f1..41e2299 100644
--- a/include/configs/ph1_sld8.h
+++ b/include/configs/ph1_sld8.h
@@ -34,8 +34,6 @@
 #define CONFIG_SYS_NS16550_SERIAL
 #endif
 
-#define CONFIG_SYS_UNIPHIER_UART_CLK    80000000
-
 #define CONFIG_SMC911X
 
 #define CONFIG_DDR_NUM_CH0 1
diff --git a/include/configs/uniphier-common.h b/include/configs/uniphier-common.h
index 18fe277..b18ae6d 100644
--- a/include/configs/uniphier-common.h
+++ b/include/configs/uniphier-common.h
@@ -33,18 +33,17 @@ are defined. Select only one of them."
 # define CONFIG_SUPPORT_CARD_UART_BASE	(CONFIG_SUPPORT_CARD_BASE + 0x00200000)
 #endif
 
+#ifdef CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550
 #define CONFIG_SYS_NS16550_COM1		CONFIG_SUPPORT_CARD_UART_BASE
 #define CONFIG_SYS_NS16550_CLK		12288000
 #define CONFIG_SYS_NS16550_REG_SIZE	-2
+#endif
 
 #define CONFIG_SMC911X_BASE		CONFIG_SUPPORT_CARD_ETHER_BASE
 #define CONFIG_SMC911X_32_BIT
 
-#define CONFIG_SYS_UNIPHIER_SERIAL_BASE0 0x54006800
-#define CONFIG_SYS_UNIPHIER_SERIAL_BASE1 0x54006900
-#define CONFIG_SYS_UNIPHIER_SERIAL_BASE2 0x54006a00
-#define CONFIG_SYS_UNIPHIER_SERIAL_BASE3 0x54006b00
+#define CONFIG_SYS_MALLOC_F_LEN  0x7000
 
 /*-----------------------------------------------------------------------
  * MMU and Cache Setting
diff --git a/include/dm/platform_data/serial-uniphier.h b/include/dm/platform_data/serial-uniphier.h
new file mode 100644
index 0000000..52343e3
--- /dev/null
+++ b/include/dm/platform_data/serial-uniphier.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright (C) 2014 Panasonic Corporation
+ *   Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#ifndef __PLAT_UNIPHIER_SERIAL_H
+#define __PLAT_UNIPHIER_SERIAL_H
+
+#define DRIVER_NAME	"uniphier-uart"
+
+struct uniphier_serial_platform_data {
+	unsigned long base;
+	unsigned int uartclk;
+};
+
+#endif /* __PLAT_UNIPHIER_SERIAL_H */
-- 
1.9.1

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

* [U-Boot] [PATCH v2 7/8] serial: uniphier: move CONFIG_UNIPHIER_SERIAL to Kconfig
  2014-10-23 13:26 [U-Boot] [PATCH v2 0/8] dm-serial: bug fix and refactoring and conversion of Uniphier serial Masahiro Yamada
                   ` (5 preceding siblings ...)
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 6/8] dm: serial: use Driver Model for UniPhier serial driver Masahiro Yamada
@ 2014-10-23 13:26 ` Masahiro Yamada
  2014-10-24  3:55   ` Simon Glass
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 8/8] serial: remove uniphier_serial_initialize() call Masahiro Yamada
  7 siblings, 1 reply; 22+ messages in thread
From: Masahiro Yamada @ 2014-10-23 13:26 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 configs/ph1_ld4_defconfig  | 1 +
 configs/ph1_pro4_defconfig | 1 +
 configs/ph1_sld8_defconfig | 1 +
 drivers/serial/Kconfig     | 6 ++++++
 include/configs/ph1_ld4.h  | 4 +---
 include/configs/ph1_pro4.h | 4 +---
 include/configs/ph1_sld8.h | 4 +---
 7 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/configs/ph1_ld4_defconfig b/configs/ph1_ld4_defconfig
index c8404f8..e6aba42 100644
--- a/configs/ph1_ld4_defconfig
+++ b/configs/ph1_ld4_defconfig
@@ -7,4 +7,5 @@ CONFIG_NAND_DENALI=y
 CONFIG_SYS_NAND_DENALI_64BIT=y
 CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
 CONFIG_DM_SERIAL=y
+CONFIG_UNIPHIER_SERIAL=y
 S:CONFIG_SPL_NAND_DENALI=y
diff --git a/configs/ph1_pro4_defconfig b/configs/ph1_pro4_defconfig
index 5c051e3..334ec4b 100644
--- a/configs/ph1_pro4_defconfig
+++ b/configs/ph1_pro4_defconfig
@@ -7,4 +7,5 @@ CONFIG_NAND_DENALI=y
 CONFIG_SYS_NAND_DENALI_64BIT=y
 CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
 CONFIG_DM_SERIAL=y
+CONFIG_UNIPHIER_SERIAL=y
 S:CONFIG_SPL_NAND_DENALI=y
diff --git a/configs/ph1_sld8_defconfig b/configs/ph1_sld8_defconfig
index 2c636e6..4e8f354 100644
--- a/configs/ph1_sld8_defconfig
+++ b/configs/ph1_sld8_defconfig
@@ -7,4 +7,5 @@ CONFIG_NAND_DENALI=y
 CONFIG_SYS_NAND_DENALI_64BIT=y
 CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
 CONFIG_DM_SERIAL=y
+CONFIG_UNIPHIER_SERIAL=y
 S:CONFIG_SPL_NAND_DENALI=y
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 6a392ba..a0b6e02 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -4,3 +4,9 @@ config DM_SERIAL
 	help
 	  If you want to use driver model for serial drivers, say Y.
 	  To use legacy serial drivers, say N.
+
+config UNIPHIER_SERIAL
+	bool "UniPhier on-chip UART support"
+	depends on ARCH_UNIPHIER && DM_SERIAL
+	help
+	  Support for the on-chip UARTs on the Panasonic UniPhier platform.
diff --git a/include/configs/ph1_ld4.h b/include/configs/ph1_ld4.h
index a546865..005a853 100644
--- a/include/configs/ph1_ld4.h
+++ b/include/configs/ph1_ld4.h
@@ -28,9 +28,7 @@
  *   SoC UART     : enable CONFIG_UNIPHIER_SERIAL
  *   On-board UART: enable CONFIG_SYS_NS16550_SERIAL
  */
-#if 1
-#define CONFIG_UNIPHIER_SERIAL
-#else
+#if 0
 #define CONFIG_SYS_NS16550_SERIAL
 #endif
 
diff --git a/include/configs/ph1_pro4.h b/include/configs/ph1_pro4.h
index 85c14ba..7dd6fd2 100644
--- a/include/configs/ph1_pro4.h
+++ b/include/configs/ph1_pro4.h
@@ -28,9 +28,7 @@
  *   SoC UART     : enable CONFIG_UNIPHIER_SERIAL
  *   On-board UART: enable CONFIG_SYS_NS16550_SERIAL
  */
-#if 1
-#define CONFIG_UNIPHIER_SERIAL
-#else
+#if 0
 #define CONFIG_SYS_NS16550_SERIAL
 #endif
 
diff --git a/include/configs/ph1_sld8.h b/include/configs/ph1_sld8.h
index 41e2299..1062aac 100644
--- a/include/configs/ph1_sld8.h
+++ b/include/configs/ph1_sld8.h
@@ -28,9 +28,7 @@
  *   SoC UART     : enable CONFIG_UNIPHIER_SERIAL
  *   On-board UART: enable CONFIG_SYS_NS16550_SERIAL
  */
-#if 1
-#define CONFIG_UNIPHIER_SERIAL
-#else
+#if 0
 #define CONFIG_SYS_NS16550_SERIAL
 #endif
 
-- 
1.9.1

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

* [U-Boot] [PATCH v2 8/8] serial: remove uniphier_serial_initialize() call
  2014-10-23 13:26 [U-Boot] [PATCH v2 0/8] dm-serial: bug fix and refactoring and conversion of Uniphier serial Masahiro Yamada
                   ` (6 preceding siblings ...)
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 7/8] serial: uniphier: move CONFIG_UNIPHIER_SERIAL to Kconfig Masahiro Yamada
@ 2014-10-23 13:26 ` Masahiro Yamada
  2014-10-24  3:55   ` Simon Glass
  7 siblings, 1 reply; 22+ messages in thread
From: Masahiro Yamada @ 2014-10-23 13:26 UTC (permalink / raw)
  To: u-boot

The UniPhier serial driver has been converted to driver model.
Let's remove uniphier_serial_initialize() call from the old
serial driver framework.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 drivers/serial/serial.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 82fbbd9..bbe60af 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -157,7 +157,6 @@ serial_initfunc(sh_serial_initialize);
 serial_initfunc(arm_dcc_initialize);
 serial_initfunc(mxs_auart_initialize);
 serial_initfunc(arc_serial_initialize);
-serial_initfunc(uniphier_serial_initialize);
 
 /**
  * serial_register() - Register serial driver with serial driver core
@@ -251,7 +250,6 @@ void serial_initialize(void)
 	arm_dcc_initialize();
 	mxs_auart_initialize();
 	arc_serial_initialize();
-	uniphier_serial_initialize();
 
 	serial_assign(default_serial_console()->name);
 }
-- 
1.9.1

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

* [U-Boot] [PATCH v2 2/8] dm: serial: fix console putc
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 2/8] dm: serial: fix console putc Masahiro Yamada
@ 2014-10-23 18:43   ` Simon Glass
  2014-10-24  3:54     ` Simon Glass
  0 siblings, 1 reply; 22+ messages in thread
From: Simon Glass @ 2014-10-23 18:43 UTC (permalink / raw)
  To: u-boot

On 23 October 2014 07:26, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> Commit b8893327e9d2 (dm: serial: Put common code into separate functions)
> consolidated getc() correctly, but introduced another bug to putc();
> serial_stub_putc() passes sdev->priv to serial_putc_dev(), but
> serial_putc_dev() uses cur_dev instead of the given argument.
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Acked-by: Simon Glass <sjg@chromium.org>

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

* [U-Boot] [PATCH v2 3/8] dm: serial: remove unnecessary casting
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 3/8] dm: serial: remove unnecessary casting Masahiro Yamada
@ 2014-10-23 18:45   ` Simon Glass
  2014-10-23 19:03     ` Simon Glass
  0 siblings, 1 reply; 22+ messages in thread
From: Simon Glass @ 2014-10-23 18:45 UTC (permalink / raw)
  To: u-boot

Hi Masahiro,

On 23 October 2014 07:26, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> The type (void *) can be directly passed to a function that
> takes a specific pointer type.
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> ---
>
> Changes in v2:
>   - Rebase
>
>  drivers/serial/serial-uclass.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
> index f2bc4d8..5767312 100644
> --- a/drivers/serial/serial-uclass.c
> +++ b/drivers/serial/serial-uclass.c
> @@ -135,9 +135,7 @@ void serial_stdio_init(void)
>
>  static void serial_stub_putc(struct stdio_dev *sdev, const char ch)
>  {
> -       struct udevice *dev = sdev->priv;
> -
> -       serial_putc_dev(dev, ch);
> +       serial_putc_dev(sdev->priv, ch);
>  }

There isn't really any casting going on, at least not explicitly. The
purpose of the local variable is to show the type which would
otherwise not be obvious from the context.

I'm OK to take this patch if you really want it, but I'm also OK with
the code as it is. Let me know.

>
>  void serial_stub_puts(struct stdio_dev *sdev, const char *str)
> @@ -148,9 +146,7 @@ void serial_stub_puts(struct stdio_dev *sdev, const char *str)
>
>  int serial_stub_getc(struct stdio_dev *sdev)
>  {
> -       struct udevice *dev = sdev->priv;
> -
> -       return serial_getc_dev(dev);
> +       return serial_getc_dev(sdev->priv);
>  }
>
>  int serial_stub_tstc(struct stdio_dev *sdev)
> --
> 1.9.1
>

Regards,
Simon

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

* [U-Boot] [PATCH v2 4/8] dm: serial: consolidate common code more
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 4/8] dm: serial: consolidate common code more Masahiro Yamada
@ 2014-10-23 18:46   ` Simon Glass
  2014-10-24  3:54     ` Simon Glass
  0 siblings, 1 reply; 22+ messages in thread
From: Simon Glass @ 2014-10-23 18:46 UTC (permalink / raw)
  To: u-boot

On 23 October 2014 07:26, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> Commit b8893327e9d2 (dm: serial: Put common code into separate functions)
> consolidated getc() and putc().  This commit does more puts() and tsts().
>
> Also rename locally used functions to _serial_*() for clarification
> because we have similar functions names here are there in this file.
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Acked-by: Simon Glass <sjg@chromium.org>

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

* [U-Boot] [PATCH v2 3/8] dm: serial: remove unnecessary casting
  2014-10-23 18:45   ` Simon Glass
@ 2014-10-23 19:03     ` Simon Glass
  2014-10-23 19:19       ` Masahiro YAMADA
  0 siblings, 1 reply; 22+ messages in thread
From: Simon Glass @ 2014-10-23 19:03 UTC (permalink / raw)
  To: u-boot

Hi,

On 23 October 2014 12:45, Simon Glass <sjg@chromium.org> wrote:
> Hi Masahiro,
>
> On 23 October 2014 07:26, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
>> The type (void *) can be directly passed to a function that
>> takes a specific pointer type.
>>
>> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Thinking a bit more we may as well take this, the value of the
explicit type is very small.

Acked-by: Simon Glass <sjg@chromium.org>

Regards,
Simon

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

* [U-Boot] [PATCH v2 3/8] dm: serial: remove unnecessary casting
  2014-10-23 19:03     ` Simon Glass
@ 2014-10-23 19:19       ` Masahiro YAMADA
  2014-10-24  3:54         ` Simon Glass
  0 siblings, 1 reply; 22+ messages in thread
From: Masahiro YAMADA @ 2014-10-23 19:19 UTC (permalink / raw)
  To: u-boot

Hi Simon,


2014-10-24 4:03 GMT+09:00 Simon Glass <sjg@chromium.org>:
> Hi,
>
> On 23 October 2014 12:45, Simon Glass <sjg@chromium.org> wrote:
>> Hi Masahiro,
>>
>> On 23 October 2014 07:26, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
>>> The type (void *) can be directly passed to a function that
>>> takes a specific pointer type.
>>>
>>> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
>
> Thinking a bit more we may as well take this, the value of the
> explicit type is very small.
>
> Acked-by: Simon Glass <sjg@chromium.org>


Setting aside my comments in the log, I like at least this code chage.

I admit the description was not nice as you pointed out.


If you like, you can rephrase the comments
or squash 3/8 and 4/8 into a single patch removing comments in this patch.
Of course, it is OK to leave it as is.
Up to you.



-- 
Best Regards
Masahiro Yamada

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

* [U-Boot] [PATCH v2 1/8] serial: add static directive to local functions
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 1/8] serial: add static directive to local functions Masahiro Yamada
@ 2014-10-24  3:54   ` Simon Glass
  0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2014-10-24  3:54 UTC (permalink / raw)
  To: u-boot

On 23 October 2014 07:26, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> The functions _serial_putc, _serial_putc_raw, _serial_puts,
> _serial_getc, _serial_tstc, _serial_setbrg are defined and used
> locally in each of serial_ns16550.c and serial_s3c24x0.c.
>
> Add static directive to them and remove declarations from
> include/common.h.
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Acked-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2: None
>
>  drivers/serial/serial_ns16550.c | 21 +++++++--------------
>  drivers/serial/serial_s3c24x0.c | 10 +++++-----
>  include/common.h                |  7 -------
>  3 files changed, 12 insertions(+), 26 deletions(-)

Applied to u-boot-dm/master, thanks!

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

* [U-Boot] [PATCH v2 2/8] dm: serial: fix console putc
  2014-10-23 18:43   ` Simon Glass
@ 2014-10-24  3:54     ` Simon Glass
  0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2014-10-24  3:54 UTC (permalink / raw)
  To: u-boot

On 23 October 2014 12:43, Simon Glass <sjg@chromium.org> wrote:
> On 23 October 2014 07:26, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
>> Commit b8893327e9d2 (dm: serial: Put common code into separate functions)
>> consolidated getc() correctly, but introduced another bug to putc();
>> serial_stub_putc() passes sdev->priv to serial_putc_dev(), but
>> serial_putc_dev() uses cur_dev instead of the given argument.
>>
>> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
>
> Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm/master, thanks!

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

* [U-Boot] [PATCH v2 3/8] dm: serial: remove unnecessary casting
  2014-10-23 19:19       ` Masahiro YAMADA
@ 2014-10-24  3:54         ` Simon Glass
  0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2014-10-24  3:54 UTC (permalink / raw)
  To: u-boot

On 23 October 2014 13:19, Masahiro YAMADA <yamada.m@jp.panasonic.com> wrote:
> Hi Simon,
>
>
> 2014-10-24 4:03 GMT+09:00 Simon Glass <sjg@chromium.org>:
>> Hi,
>>
>> On 23 October 2014 12:45, Simon Glass <sjg@chromium.org> wrote:
>>> Hi Masahiro,
>>>
>>> On 23 October 2014 07:26, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
>>>> The type (void *) can be directly passed to a function that
>>>> takes a specific pointer type.
>>>>
>>>> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
>>
>> Thinking a bit more we may as well take this, the value of the
>> explicit type is very small.
>>
>> Acked-by: Simon Glass <sjg@chromium.org>
>
>
> Setting aside my comments in the log, I like at least this code chage.
>
> I admit the description was not nice as you pointed out.
>
>
> If you like, you can rephrase the comments
> or squash 3/8 and 4/8 into a single patch removing comments in this patch.
> Of course, it is OK to leave it as is.
> Up to you.

I think it is fairly clear what is going on.

Applied to u-boot-dm/master, thanks!

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

* [U-Boot] [PATCH v2 4/8] dm: serial: consolidate common code more
  2014-10-23 18:46   ` Simon Glass
@ 2014-10-24  3:54     ` Simon Glass
  0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2014-10-24  3:54 UTC (permalink / raw)
  To: u-boot

On 23 October 2014 12:46, Simon Glass <sjg@chromium.org> wrote:
> On 23 October 2014 07:26, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
>> Commit b8893327e9d2 (dm: serial: Put common code into separate functions)
>> consolidated getc() and putc().  This commit does more puts() and tsts().
>>
>> Also rename locally used functions to _serial_*() for clarification
>> because we have similar functions names here are there in this file.
>>
>> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
>
> Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm/master, thanks!

(with merge)

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

* [U-Boot] [PATCH v2 5/8] dm: add entries to Kconfig
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 5/8] dm: add entries to Kconfig Masahiro Yamada
@ 2014-10-24  3:54   ` Simon Glass
  0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2014-10-24  3:54 UTC (permalink / raw)
  To: u-boot

On 23 October 2014 07:26, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> Create entries of CONFIG_DM, CONFIG_DM_SERIAL, CONFIG_DM_GPIO
> and CONFIG_DM_SPI.
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Acked-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2:
>   - Add CONFIG_DM_SPI
>
>  drivers/core/Kconfig   | 6 ++++++
>  drivers/gpio/Kconfig   | 6 ++++++
>  drivers/serial/Kconfig | 6 ++++++
>  drivers/spi/Kconfig    | 6 ++++++
>  4 files changed, 24 insertions(+)

Applied to u-boot-dm/master, thanks!

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

* [U-Boot] [PATCH v2 6/8] dm: serial: use Driver Model for UniPhier serial driver
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 6/8] dm: serial: use Driver Model for UniPhier serial driver Masahiro Yamada
@ 2014-10-24  3:55   ` Simon Glass
  0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2014-10-24  3:55 UTC (permalink / raw)
  To: u-boot

On 23 October 2014 07:26, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> This commit converts UniPhier on-chip serial driver to driver model.
>
> Since UniPhier SoCs do not have Device Tree support, some board files
> should be added under arch/arm/cpu/armv7/uniphier/ph1-*/ directories.
> (Device Tree support for UniPhier platform is still under way.)
>
> Now the base address and master clock frequency are passed from
> platform data, so CONFIG_SYS_UNIPHIER_SERIAL_BASE* and
> CONFIG_SYS_UNIPHIER_UART_CLK should be removed.
>
> Tested on UniPhier PH1-LD4 ref board.
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Acked-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2: None
>
>  arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile      |   1 +
>  arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c  |  15 ++
>  arch/arm/cpu/armv7/uniphier/ph1-pro4/Makefile     |   1 +
>  arch/arm/cpu/armv7/uniphier/ph1-pro4/platdevice.c |  15 ++
>  arch/arm/cpu/armv7/uniphier/ph1-sld8/Makefile     |   1 +
>  arch/arm/cpu/armv7/uniphier/ph1-sld8/platdevice.c |  15 ++
>  arch/arm/include/asm/arch-uniphier/platdevice.h   |  24 +++
>  configs/ph1_ld4_defconfig                         |   2 +
>  configs/ph1_pro4_defconfig                        |   2 +
>  configs/ph1_sld8_defconfig                        |   2 +
>  drivers/serial/serial_uniphier.c                  | 199 ++++++++--------------
>  include/configs/ph1_ld4.h                         |   2 -
>  include/configs/ph1_pro4.h                        |   2 -
>  include/configs/ph1_sld8.h                        |   2 -
>  include/configs/uniphier-common.h                 |   7 +-
>  include/dm/platform_data/serial-uniphier.h        |  18 ++
>  16 files changed, 172 insertions(+), 136 deletions(-)
>  create mode 100644 arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c
>  create mode 100644 arch/arm/cpu/armv7/uniphier/ph1-pro4/platdevice.c
>  create mode 100644 arch/arm/cpu/armv7/uniphier/ph1-sld8/platdevice.c
>  create mode 100644 arch/arm/include/asm/arch-uniphier/platdevice.h
>  create mode 100644 include/dm/platform_data/serial-uniphier.h

Applied to u-boot-dm/master, thanks!

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

* [U-Boot] [PATCH v2 7/8] serial: uniphier: move CONFIG_UNIPHIER_SERIAL to Kconfig
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 7/8] serial: uniphier: move CONFIG_UNIPHIER_SERIAL to Kconfig Masahiro Yamada
@ 2014-10-24  3:55   ` Simon Glass
  0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2014-10-24  3:55 UTC (permalink / raw)
  To: u-boot

On 23 October 2014 07:26, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Acked-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2: None
>
>  configs/ph1_ld4_defconfig  | 1 +
>  configs/ph1_pro4_defconfig | 1 +
>  configs/ph1_sld8_defconfig | 1 +
>  drivers/serial/Kconfig     | 6 ++++++
>  include/configs/ph1_ld4.h  | 4 +---
>  include/configs/ph1_pro4.h | 4 +---
>  include/configs/ph1_sld8.h | 4 +---
>  7 files changed, 12 insertions(+), 9 deletions(-)

Applied to u-boot-dm/master, thanks!

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

* [U-Boot] [PATCH v2 8/8] serial: remove uniphier_serial_initialize() call
  2014-10-23 13:26 ` [U-Boot] [PATCH v2 8/8] serial: remove uniphier_serial_initialize() call Masahiro Yamada
@ 2014-10-24  3:55   ` Simon Glass
  0 siblings, 0 replies; 22+ messages in thread
From: Simon Glass @ 2014-10-24  3:55 UTC (permalink / raw)
  To: u-boot

On 23 October 2014 07:26, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> The UniPhier serial driver has been converted to driver model.
> Let's remove uniphier_serial_initialize() call from the old
> serial driver framework.
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Acked-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2: None
>
>  drivers/serial/serial.c | 2 --
>  1 file changed, 2 deletions(-)

Applied to u-boot-dm/master, thanks!

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

end of thread, other threads:[~2014-10-24  3:55 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-23 13:26 [U-Boot] [PATCH v2 0/8] dm-serial: bug fix and refactoring and conversion of Uniphier serial Masahiro Yamada
2014-10-23 13:26 ` [U-Boot] [PATCH v2 1/8] serial: add static directive to local functions Masahiro Yamada
2014-10-24  3:54   ` Simon Glass
2014-10-23 13:26 ` [U-Boot] [PATCH v2 2/8] dm: serial: fix console putc Masahiro Yamada
2014-10-23 18:43   ` Simon Glass
2014-10-24  3:54     ` Simon Glass
2014-10-23 13:26 ` [U-Boot] [PATCH v2 3/8] dm: serial: remove unnecessary casting Masahiro Yamada
2014-10-23 18:45   ` Simon Glass
2014-10-23 19:03     ` Simon Glass
2014-10-23 19:19       ` Masahiro YAMADA
2014-10-24  3:54         ` Simon Glass
2014-10-23 13:26 ` [U-Boot] [PATCH v2 4/8] dm: serial: consolidate common code more Masahiro Yamada
2014-10-23 18:46   ` Simon Glass
2014-10-24  3:54     ` Simon Glass
2014-10-23 13:26 ` [U-Boot] [PATCH v2 5/8] dm: add entries to Kconfig Masahiro Yamada
2014-10-24  3:54   ` Simon Glass
2014-10-23 13:26 ` [U-Boot] [PATCH v2 6/8] dm: serial: use Driver Model for UniPhier serial driver Masahiro Yamada
2014-10-24  3:55   ` Simon Glass
2014-10-23 13:26 ` [U-Boot] [PATCH v2 7/8] serial: uniphier: move CONFIG_UNIPHIER_SERIAL to Kconfig Masahiro Yamada
2014-10-24  3:55   ` Simon Glass
2014-10-23 13:26 ` [U-Boot] [PATCH v2 8/8] serial: remove uniphier_serial_initialize() call Masahiro Yamada
2014-10-24  3:55   ` Simon Glass

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.