mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 0/8] MIPS: improve Ingenic JZ4755 device tree support
@ 2014-03-24 20:13 Antony Pavlov
  2014-03-24 20:13 ` [PATCH v2 1/8] MIPS: mach-xburst: fix DEBUG_LL=n build error Antony Pavlov
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Antony Pavlov @ 2014-03-24 20:13 UTC (permalink / raw)
  To: barebox

This patcheseries moves Ingenic JZ4755 UART initialization
into device tree and makes JZ4755 device tree organization
more clear.

This patchseries is a part of work on Ingenic chips support
and prepares MIPS board support switch to device tree.
Next patchseries will add device tree Ingenic gpio, clk
and pinctls support.

Changes since v1:
  * use "make FCR setup value part of struct ns16550_priv"
    instead of "make it possible to get reg_write() from devtype";
  * add a trivial "fix whitespaces" patch.


Antony Pavlov (8):
  MIPS: mach-xburst: fix DEBUG_LL=n build error
  MIPS: dts: rzx50: move jz4755 description to the separate file
  serial: ns16550: fix whitespaces
  serial: ns16550: make FCR setup value part of struct ns16550_priv
  serial: ns16550: add compatible entry for "ingenic,jz4740-uart"
  MIPS: rzx50: drop console initialization in board code
  MIPS: mach-xburst: drop serial.c
  MIPS: boards: rename rzx50 -> ritmix-rzx50

 Documentation/boards.dox                           |  2 +-
 arch/mips/Makefile                                 |  2 +-
 arch/mips/boards/ritmix-rzx50/Makefile             |  1 +
 .../ritmix-rzx50/include/board/board_pbl_start.h   | 43 ++++++++++++++++
 .../boards/ritmix-rzx50/include/board/debug_ll.h   | 23 +++++++++
 arch/mips/boards/ritmix-rzx50/ritmix-rzx50.dox     | 46 +++++++++++++++++
 arch/mips/boards/ritmix-rzx50/serial.c             | 27 ++++++++++
 arch/mips/boards/rzx50/Makefile                    |  1 -
 .../boards/rzx50/include/board/board_pbl_start.h   | 43 ----------------
 arch/mips/boards/rzx50/include/board/debug_ll.h    | 23 ---------
 arch/mips/boards/rzx50/rzx50.dox                   | 46 -----------------
 arch/mips/boards/rzx50/serial.c                    | 32 ------------
 arch/mips/configs/ritmix-rzx50_defconfig           | 39 ++++++++++++++
 arch/mips/configs/rzx50_defconfig                  | 39 --------------
 arch/mips/dts/jz4755.dtsi                          | 35 +++++++++++++
 arch/mips/dts/rzx50.dts                            |  8 ++-
 arch/mips/include/asm/debug_ll_ns16550.h           |  2 +
 arch/mips/mach-xburst/Makefile                     |  1 -
 arch/mips/mach-xburst/mach-xburst.dox              |  2 +-
 arch/mips/mach-xburst/serial.c                     | 60 ----------------------
 drivers/serial/serial_ns16550.c                    | 35 ++++++++++---
 21 files changed, 254 insertions(+), 256 deletions(-)
 create mode 100644 arch/mips/boards/ritmix-rzx50/Makefile
 create mode 100644 arch/mips/boards/ritmix-rzx50/include/board/board_pbl_start.h
 create mode 100644 arch/mips/boards/ritmix-rzx50/include/board/debug_ll.h
 create mode 100644 arch/mips/boards/ritmix-rzx50/ritmix-rzx50.dox
 create mode 100644 arch/mips/boards/ritmix-rzx50/serial.c
 delete mode 100644 arch/mips/boards/rzx50/Makefile
 delete mode 100644 arch/mips/boards/rzx50/include/board/board_pbl_start.h
 delete mode 100644 arch/mips/boards/rzx50/include/board/debug_ll.h
 delete mode 100644 arch/mips/boards/rzx50/rzx50.dox
 delete mode 100644 arch/mips/boards/rzx50/serial.c
 create mode 100644 arch/mips/configs/ritmix-rzx50_defconfig
 delete mode 100644 arch/mips/configs/rzx50_defconfig
 create mode 100644 arch/mips/dts/jz4755.dtsi
 delete mode 100644 arch/mips/mach-xburst/serial.c

-- 
1.9.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 1/8] MIPS: mach-xburst: fix DEBUG_LL=n build error
  2014-03-24 20:13 [PATCH v2 0/8] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
@ 2014-03-24 20:13 ` Antony Pavlov
  2014-03-24 20:13 ` [PATCH v2 2/8] MIPS: dts: rzx50: move jz4755 description to the separate file Antony Pavlov
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Antony Pavlov @ 2014-03-24 20:13 UTC (permalink / raw)
  To: barebox

Here is my error log:

  CC      common/startup.o
In file included from arch/mips/mach-xburst/include/mach/debug_ll.h:25,
                 from include/debug_ll.h:31,
                 from common/startup.c:36:
arch/mips/include/asm/debug_ll_ns16550.h: In function 'PUTC_LL':
arch/mips/include/asm/debug_ll_ns16550.h:62: error: 'DEBUG_LL_UART_ADDR' undeclared (first use in this function)
arch/mips/include/asm/debug_ll_ns16550.h:62: error: (Each undeclared identifier is reported only once
arch/mips/include/asm/debug_ll_ns16550.h:62: error: for each function it appears in.)
make[1]: *** [common/startup.o] Error 1

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 arch/mips/include/asm/debug_ll_ns16550.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/mips/include/asm/debug_ll_ns16550.h b/arch/mips/include/asm/debug_ll_ns16550.h
index f36010c..032f0a2 100644
--- a/arch/mips/include/asm/debug_ll_ns16550.h
+++ b/arch/mips/include/asm/debug_ll_ns16550.h
@@ -59,9 +59,11 @@
 
 static __inline__ void PUTC_LL(char ch)
 {
+#ifdef CONFIG_DEBUG_LL
 	while (!(__raw_readb((u8 *)DEBUG_LL_UART_ADDR + UART_LSR) & UART_LSR_THRE))
 		;
 	__raw_writeb(ch, (u8 *)DEBUG_LL_UART_ADDR + UART_THR);
+#endif /* CONFIG_DEBUG_LL */
 }
 #else /* __ASSEMBLY__ */
 /*
-- 
1.9.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 2/8] MIPS: dts: rzx50: move jz4755 description to the separate file
  2014-03-24 20:13 [PATCH v2 0/8] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
  2014-03-24 20:13 ` [PATCH v2 1/8] MIPS: mach-xburst: fix DEBUG_LL=n build error Antony Pavlov
@ 2014-03-24 20:13 ` Antony Pavlov
  2014-03-24 20:13 ` [PATCH v2 3/8] serial: ns16550: fix whitespaces Antony Pavlov
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Antony Pavlov @ 2014-03-24 20:13 UTC (permalink / raw)
  To: barebox

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 arch/mips/dts/jz4755.dtsi | 35 +++++++++++++++++++++++++++++++++++
 arch/mips/dts/rzx50.dts   |  8 +++++++-
 2 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/arch/mips/dts/jz4755.dtsi b/arch/mips/dts/jz4755.dtsi
new file mode 100644
index 0000000..44ff912
--- /dev/null
+++ b/arch/mips/dts/jz4755.dtsi
@@ -0,0 +1,35 @@
+#include "skeleton.dtsi"
+
+/ {
+	soc {
+		compatible = "simple-bus";
+		model = "Ingenic JZ4755";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		serial0: serial@b0030000 {
+			compatible = "ingenic,jz4740-uart";
+			reg = <0xb0030000 0x20>;
+			reg-shift = <2>;
+			clock-frequency = <12000000>;
+			status = "disabled";
+		};
+
+		serial1: serial@b0031000 {
+			compatible = "ingenic,jz4740-uart";
+			reg = <0xb0031000 0x20>;
+			reg-shift = <2>;
+			clock-frequency = <12000000>;
+			status = "disabled";
+		};
+
+		serial2: serial@b0032000 {
+			compatible = "ingenic,jz4740-uart";
+			reg = <0xb0032000 0x20>;
+			reg-shift = <2>;
+			clock-frequency = <12000000>;
+			status = "disabled";
+		};
+	};
+};
diff --git a/arch/mips/dts/rzx50.dts b/arch/mips/dts/rzx50.dts
index 69320dd..78103e3 100644
--- a/arch/mips/dts/rzx50.dts
+++ b/arch/mips/dts/rzx50.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-/include/ "skeleton.dtsi"
+#include "jz4755.dtsi"
 
 / {
 	model = "Ritmix RZX-50";
@@ -9,4 +9,10 @@
 	memory {
 		reg = <0x00000000 0x4000000>;
 	};
+
+	soc {
+		serial1: serial@b0031000 {
+			status = "okay";
+		};
+	};
 };
-- 
1.9.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 3/8] serial: ns16550: fix whitespaces
  2014-03-24 20:13 [PATCH v2 0/8] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
  2014-03-24 20:13 ` [PATCH v2 1/8] MIPS: mach-xburst: fix DEBUG_LL=n build error Antony Pavlov
  2014-03-24 20:13 ` [PATCH v2 2/8] MIPS: dts: rzx50: move jz4755 description to the separate file Antony Pavlov
@ 2014-03-24 20:13 ` Antony Pavlov
  2014-03-24 20:13 ` [PATCH v2 4/8] serial: ns16550: make FCR setup value part of struct ns16550_priv Antony Pavlov
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Antony Pavlov @ 2014-03-24 20:13 UTC (permalink / raw)
  To: barebox

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 drivers/serial/serial_ns16550.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index f1da44b..d217014 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -192,7 +192,7 @@ static void ns16550_omap_init_port(struct console_device *cdev)
 	ns16550_serial_init_port(cdev);
 
 	ns16550_write(cdev, 0x07, omap_mdr1);	/* Disable */
-	ns16550_write(cdev, 0x00,  omap_mdr1);
+	ns16550_write(cdev, 0x00, omap_mdr1);
 }
 
 /*********** Exposed Functions **********************************/
-- 
1.9.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 4/8] serial: ns16550: make FCR setup value part of struct ns16550_priv
  2014-03-24 20:13 [PATCH v2 0/8] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
                   ` (2 preceding siblings ...)
  2014-03-24 20:13 ` [PATCH v2 3/8] serial: ns16550: fix whitespaces Antony Pavlov
@ 2014-03-24 20:13 ` Antony Pavlov
  2014-03-24 20:28   ` Antony Pavlov
  2014-03-24 20:13 ` [PATCH v2 5/8] serial: ns16550: add compatible entry for "ingenic, jz4740-uart" Antony Pavlov
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 11+ messages in thread
From: Antony Pavlov @ 2014-03-24 20:13 UTC (permalink / raw)
  To: barebox

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 drivers/serial/serial_ns16550.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index d217014..0089a04 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -48,6 +48,7 @@ struct ns16550_priv {
 	struct NS16550_plat plat;
 	int access_width;
 	struct clk *clk;
+	uint32_t fcrval;
 };
 
 static inline struct ns16550_priv *to_ns16550_priv(struct console_device *cdev)
@@ -157,18 +158,13 @@ static int ns16550_setbaudrate(struct console_device *cdev, int baud_rate)
 {
 	unsigned int baud_divisor = ns16550_calc_divisor(cdev, baud_rate);
 	struct ns16550_priv *priv = to_ns16550_priv(cdev);
-	struct NS16550_plat *plat = &priv->plat;
 
 	ns16550_write(cdev, LCR_BKSE, lcr);
 	ns16550_write(cdev, baud_divisor & 0xff, dll);
 	ns16550_write(cdev, (baud_divisor >> 8) & 0xff, dlm);
 	ns16550_write(cdev, LCRVAL, lcr);
 	ns16550_write(cdev, MCRVAL, mcr);
-
-	if (plat->flags & NS16650_FLAG_DISABLE_FIFO)
-		ns16550_write(cdev, FCRVAL & ~FCR_FIFO_EN, fcr);
-	else
-		ns16550_write(cdev, FCRVAL, fcr);
+	ns16550_write(cdev, priv->fcrval, fcr);
 
 	return 0;
 }
@@ -316,6 +312,11 @@ static int ns16550_probe(struct device_d *dev)
 	cdev->setbrg = ns16550_setbaudrate;
 	cdev->linux_console_name = devtype->linux_console_name;
 
+	if (plat->flags & NS16650_FLAG_DISABLE_FIFO)
+		priv->fcrval = FCRVAL & ~FCR_FIFO_EN;
+	else
+		priv->fcrval = FCRVAL;
+
 	devtype->init_port(cdev);
 
 	return console_register(cdev);
-- 
1.9.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 5/8] serial: ns16550: add compatible entry for "ingenic, jz4740-uart"
  2014-03-24 20:13 [PATCH v2 0/8] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
                   ` (3 preceding siblings ...)
  2014-03-24 20:13 ` [PATCH v2 4/8] serial: ns16550: make FCR setup value part of struct ns16550_priv Antony Pavlov
@ 2014-03-24 20:13 ` Antony Pavlov
  2014-03-24 20:13 ` [PATCH v2 6/8] MIPS: rzx50: drop console initialization in board code Antony Pavlov
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Antony Pavlov @ 2014-03-24 20:13 UTC (permalink / raw)
  To: barebox

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 drivers/serial/serial_ns16550.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index 0089a04..a37ac69 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -191,6 +191,16 @@ static void ns16550_omap_init_port(struct console_device *cdev)
 	ns16550_write(cdev, 0x00, omap_mdr1);
 }
 
+#define JZ_FCR_UME 0x10 /* Uart Module Enable */
+
+static void ns16550_jz_init_port(struct console_device *cdev)
+{
+	struct ns16550_priv *priv = to_ns16550_priv(cdev);
+
+	priv->fcrval |= JZ_FCR_UME;
+	ns16550_serial_init_port(cdev);
+}
+
 /*********** Exposed Functions **********************************/
 
 /**
@@ -251,6 +261,10 @@ static __maybe_unused struct ns16550_drvdata omap_drvdata = {
 	.linux_console_name = "ttyO",
 };
 
+static __maybe_unused struct ns16550_drvdata jz_drvdata = {
+	.init_port = ns16550_jz_init_port,
+};
+
 /**
  * @brief Probe entry point -called on the first match for device
  *
@@ -347,6 +361,12 @@ static struct of_device_id ns16550_serial_dt_ids[] = {
 		.data = (unsigned long)&omap_drvdata,
 	},
 #endif
+#if IS_ENABLED(CONFIG_MACH_MIPS_XBURST)
+	{
+		.compatible = "ingenic,jz4740-uart",
+		.data = (unsigned long)&jz_drvdata,
+	},
+#endif
 	{
 		/* sentinel */
 	},
-- 
1.9.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 6/8] MIPS: rzx50: drop console initialization in board code
  2014-03-24 20:13 [PATCH v2 0/8] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
                   ` (4 preceding siblings ...)
  2014-03-24 20:13 ` [PATCH v2 5/8] serial: ns16550: add compatible entry for "ingenic, jz4740-uart" Antony Pavlov
@ 2014-03-24 20:13 ` Antony Pavlov
  2014-03-24 20:13 ` [PATCH v2 7/8] MIPS: mach-xburst: drop serial.c Antony Pavlov
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Antony Pavlov @ 2014-03-24 20:13 UTC (permalink / raw)
  To: barebox

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 arch/mips/boards/rzx50/Makefile | 2 +-
 arch/mips/boards/rzx50/serial.c | 9 ++-------
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/arch/mips/boards/rzx50/Makefile b/arch/mips/boards/rzx50/Makefile
index ff1a655..31c0629 100644
--- a/arch/mips/boards/rzx50/Makefile
+++ b/arch/mips/boards/rzx50/Makefile
@@ -1 +1 @@
-obj-$(CONFIG_DRIVER_SERIAL_NS16550) += serial.o
+obj-y += serial.o
diff --git a/arch/mips/boards/rzx50/serial.c b/arch/mips/boards/rzx50/serial.c
index 566356a..f1e8da0 100644
--- a/arch/mips/boards/rzx50/serial.c
+++ b/arch/mips/boards/rzx50/serial.c
@@ -17,16 +17,11 @@
 
 #include <common.h>
 #include <init.h>
-#include <mach/devices.h>
-#include <mach/jz4750d_regs.h>
 
-static int rzx50_console_init(void)
+static int rzx50_hostname_init(void)
 {
 	barebox_set_hostname("rzx50");
 
-	/* Register the serial port */
-	jz_add_uart(DEVICE_ID_DYNAMIC, UART1_BASE, 12000000);
-
 	return 0;
 }
-console_initcall(rzx50_console_init);
+console_initcall(rzx50_hostname_init);
-- 
1.9.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 7/8] MIPS: mach-xburst: drop serial.c
  2014-03-24 20:13 [PATCH v2 0/8] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
                   ` (5 preceding siblings ...)
  2014-03-24 20:13 ` [PATCH v2 6/8] MIPS: rzx50: drop console initialization in board code Antony Pavlov
@ 2014-03-24 20:13 ` Antony Pavlov
  2014-03-24 20:13 ` [PATCH v2 8/8] MIPS: boards: rename rzx50 -> ritmix-rzx50 Antony Pavlov
  2014-03-25  9:40 ` [PATCH v2 0/8] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
  8 siblings, 0 replies; 11+ messages in thread
From: Antony Pavlov @ 2014-03-24 20:13 UTC (permalink / raw)
  To: barebox

We use dts for serial port initialization,
so we have no need in mach-xburst/serial.c anymore.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 arch/mips/mach-xburst/Makefile |  1 -
 arch/mips/mach-xburst/serial.c | 60 ------------------------------------------
 2 files changed, 61 deletions(-)

diff --git a/arch/mips/mach-xburst/Makefile b/arch/mips/mach-xburst/Makefile
index 3e0cd73..e5634ba 100644
--- a/arch/mips/mach-xburst/Makefile
+++ b/arch/mips/mach-xburst/Makefile
@@ -1,2 +1 @@
-obj-y += serial.o
 obj-$(CONFIG_CPU_JZ4755) += csrc-jz4750.o reset-jz4750.o
diff --git a/arch/mips/mach-xburst/serial.c b/arch/mips/mach-xburst/serial.c
deleted file mode 100644
index acf5648..0000000
--- a/arch/mips/mach-xburst/serial.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com>
- *
- * Based on the linux kernel JZ4740 serial support:
- * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
- *
- * This file is part of barebox.
- * See file CREDITS for list of people who contributed to this project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#include <common.h>
-#include <ns16550.h>
-#include <io.h>
-#include <mach/devices.h>
-
-#define JZ_UART_SHIFT	2
-
-#define ier		(1 << JZ_UART_SHIFT)
-#define fcr		(2 << JZ_UART_SHIFT)
-
-static void jz_serial_reg_write(unsigned int val, unsigned long base,
-	unsigned char reg_offset)
-{
-	switch (reg_offset) {
-	case fcr:
-		val |= 0x10; /* Enable uart module */
-		break;
-	case ier:
-		val |= (val & 0x4) << 2;
-		break;
-	default:
-		break;
-	}
-
-	writeb(val & 0xff, (void *)(base + reg_offset));
-}
-
-struct device_d *jz_add_uart(int id, unsigned long base, unsigned int clock)
-{
-	struct NS16550_plat *serial_plat;
-
-	serial_plat = xzalloc(sizeof(*serial_plat));
-
-	serial_plat->shift = JZ_UART_SHIFT;
-	serial_plat->reg_write = &jz_serial_reg_write;
-	serial_plat->clock = clock;
-
-	return add_ns16550_device(id, base, 8 << JZ_UART_SHIFT,
-			IORESOURCE_MEM_8BIT, serial_plat);
-}
-- 
1.9.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 8/8] MIPS: boards: rename rzx50 -> ritmix-rzx50
  2014-03-24 20:13 [PATCH v2 0/8] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
                   ` (6 preceding siblings ...)
  2014-03-24 20:13 ` [PATCH v2 7/8] MIPS: mach-xburst: drop serial.c Antony Pavlov
@ 2014-03-24 20:13 ` Antony Pavlov
  2014-03-25  9:40 ` [PATCH v2 0/8] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
  8 siblings, 0 replies; 11+ messages in thread
From: Antony Pavlov @ 2014-03-24 20:13 UTC (permalink / raw)
  To: barebox

All MIPS board use <vendor>-<model> name template save Ritmix RZX-50.
This commit fixes this inconsistency.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 Documentation/boards.dox                           |  2 +-
 arch/mips/Makefile                                 |  2 +-
 arch/mips/boards/ritmix-rzx50/Makefile             |  1 +
 .../ritmix-rzx50/include/board/board_pbl_start.h   | 43 ++++++++++++++++++++
 .../boards/ritmix-rzx50/include/board/debug_ll.h   | 23 +++++++++++
 arch/mips/boards/ritmix-rzx50/ritmix-rzx50.dox     | 46 ++++++++++++++++++++++
 arch/mips/boards/ritmix-rzx50/serial.c             | 27 +++++++++++++
 arch/mips/boards/rzx50/Makefile                    |  1 -
 .../boards/rzx50/include/board/board_pbl_start.h   | 43 --------------------
 arch/mips/boards/rzx50/include/board/debug_ll.h    | 23 -----------
 arch/mips/boards/rzx50/rzx50.dox                   | 46 ----------------------
 arch/mips/boards/rzx50/serial.c                    | 27 -------------
 arch/mips/configs/ritmix-rzx50_defconfig           | 39 ++++++++++++++++++
 arch/mips/configs/rzx50_defconfig                  | 39 ------------------
 arch/mips/mach-xburst/mach-xburst.dox              |  2 +-
 15 files changed, 182 insertions(+), 182 deletions(-)

diff --git a/Documentation/boards.dox b/Documentation/boards.dox
index 9a14aee..42bc5e6 100644
--- a/Documentation/boards.dox
+++ b/Documentation/boards.dox
@@ -59,7 +59,7 @@ MIPS type:
 @li @subpage dlink_dir_320
 @li @subpage loongson_ls1b
 @li @subpage qemu_malta
-@li @subpage rzx50
+@li @subpage ritmix-rzx50
 
 */
 
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 8986fcf..e3d65c8 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -85,7 +85,7 @@ machine-$(CONFIG_MACH_MIPS_LOONGSON)	:= loongson
 board-$(CONFIG_BOARD_LOONGSON_TECH_LS1B)	:= loongson-ls1b
 
 machine-$(CONFIG_MACH_MIPS_XBURST)	:= xburst
-board-$(CONFIG_BOARD_RZX50)	:= rzx50
+board-$(CONFIG_BOARD_RZX50)	:= ritmix-rzx50
 
 machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y))
 
diff --git a/arch/mips/boards/ritmix-rzx50/Makefile b/arch/mips/boards/ritmix-rzx50/Makefile
new file mode 100644
index 0000000..31c0629
--- /dev/null
+++ b/arch/mips/boards/ritmix-rzx50/Makefile
@@ -0,0 +1 @@
+obj-y += serial.o
diff --git a/arch/mips/boards/ritmix-rzx50/include/board/board_pbl_start.h b/arch/mips/boards/ritmix-rzx50/include/board/board_pbl_start.h
new file mode 100644
index 0000000..fb914d9
--- /dev/null
+++ b/arch/mips/boards/ritmix-rzx50/include/board/board_pbl_start.h
@@ -0,0 +1,43 @@
+/*
+ * Startup Code for Ritmix RZX-50 board
+ *
+ * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * This file is part of barebox.
+ * See file CREDITS for list of people who contributed to this project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <asm/pbl_macros.h>
+#include <mach/debug_ll.h>
+#include <asm/pbl_nmon.h>
+
+	.macro	board_pbl_start
+	.set	push
+	.set	noreorder
+
+	mips_disable_interrupts
+
+	/* CPU/SoC specific setup ... */
+	/* ... absent */
+
+	debug_ll_ns16550_init
+
+	debug_ll_ns16550_outc '.'
+	debug_ll_ns16550_outnl
+
+	mips_nmon
+
+	copy_to_link_location	pbl_start
+
+	.set	pop
+	.endm
diff --git a/arch/mips/boards/ritmix-rzx50/include/board/debug_ll.h b/arch/mips/boards/ritmix-rzx50/include/board/debug_ll.h
new file mode 100644
index 0000000..7ae0e2a
--- /dev/null
+++ b/arch/mips/boards/ritmix-rzx50/include/board/debug_ll.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * This file is part of barebox.
+ * See file CREDITS for list of people who contributed to this project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __INCLUDE_RZX50_BOARD_DEBUG_LL_H__
+#define __INCLUDE_RZX50_BOARD_DEBUG_LL_H__
+
+#include <mach/debug_ll_jz4750d.h>
+
+#endif  /* __INCLUDE_RZX50_BOARD_DEBUG_LL_H__ */
diff --git a/arch/mips/boards/ritmix-rzx50/ritmix-rzx50.dox b/arch/mips/boards/ritmix-rzx50/ritmix-rzx50.dox
new file mode 100644
index 0000000..5ec8194
--- /dev/null
+++ b/arch/mips/boards/ritmix-rzx50/ritmix-rzx50.dox
@@ -0,0 +1,46 @@
+/** @page ritmix-rzx50 Ritmix RZX-50 game console
+
+Ritmix RZX-50 is a portable game console for the Russian market.
+
+The portable game console has
+@li Ingenic JZ4755 SoC;
+@li 64 MiB SDRAM;
+@li 4 GiB microSDHC card / 4 GiB NAND type Flash Memory;
+@li RS232 serial interface (LV-TTL levels on the board!);
+@li LCD display (480x272);
+@li Video out interface;
+@li 1xUSB interface;
+@li buttons.
+
+The game console uses U-Boot 1.1.6 as bootloader.
+
+barebox-rzx50 mini-howto:
+
+1. Connect to the game console's UART (see. http://a320.emulate.su/2012/01/19/uart-na-ritmix-rzx-50/);
+
+2. Unblock U-Boot console (see. http://a320.emulate.su/2012/01/25/rzx-50-dostup-k-konsoli-u-boot/); Please note that U-Boot's Zmodem support does not work;
+
+3. Boot Ritmix linux and login;
+
+4. Upload barebox.bin via Zmodem
+@verbatim
+  # cd /tmp
+  # rz
+@endverbatim
+
+5. Write barebox to onboard flash
+@verbatim
+  # dd if=barebox.bin of=/dev/mmcblk0 seek=1048576 bs=1 count=262144
+@endverbatim
+
+6. Reboot RZX-50, next in U-Boot console start barebox:
+@verbatim
+  CETUS # msc read 0xa0800000 0x100000 0x40000; g a0800000
+@endverbatim
+
+Ritmix RZX-50 links:
+@li http://www.ritmixrussia.ru/products/252/entertainment/game/rzx-50
+@li ftp://ftp.ingenic.cn/2soc/4755/JZ4755_ds.pdf
+@li ftp://ftp.ingenic.cn/3sw/01linux/01loader/u-boot/u-boot-1.1.6-jz-20110719-r1728-add-jz4770.patch.bz2
+
+*/
diff --git a/arch/mips/boards/ritmix-rzx50/serial.c b/arch/mips/boards/ritmix-rzx50/serial.c
new file mode 100644
index 0000000..f1e8da0
--- /dev/null
+++ b/arch/mips/boards/ritmix-rzx50/serial.c
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * This file is part of barebox.
+ * See file CREDITS for list of people who contributed to this project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <common.h>
+#include <init.h>
+
+static int rzx50_hostname_init(void)
+{
+	barebox_set_hostname("rzx50");
+
+	return 0;
+}
+console_initcall(rzx50_hostname_init);
diff --git a/arch/mips/boards/rzx50/Makefile b/arch/mips/boards/rzx50/Makefile
deleted file mode 100644
index 31c0629..0000000
--- a/arch/mips/boards/rzx50/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-obj-y += serial.o
diff --git a/arch/mips/boards/rzx50/include/board/board_pbl_start.h b/arch/mips/boards/rzx50/include/board/board_pbl_start.h
deleted file mode 100644
index fb914d9..0000000
--- a/arch/mips/boards/rzx50/include/board/board_pbl_start.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Startup Code for Ritmix RZX-50 board
- *
- * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com>
- *
- * This file is part of barebox.
- * See file CREDITS for list of people who contributed to this project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#include <asm/pbl_macros.h>
-#include <mach/debug_ll.h>
-#include <asm/pbl_nmon.h>
-
-	.macro	board_pbl_start
-	.set	push
-	.set	noreorder
-
-	mips_disable_interrupts
-
-	/* CPU/SoC specific setup ... */
-	/* ... absent */
-
-	debug_ll_ns16550_init
-
-	debug_ll_ns16550_outc '.'
-	debug_ll_ns16550_outnl
-
-	mips_nmon
-
-	copy_to_link_location	pbl_start
-
-	.set	pop
-	.endm
diff --git a/arch/mips/boards/rzx50/include/board/debug_ll.h b/arch/mips/boards/rzx50/include/board/debug_ll.h
deleted file mode 100644
index 7ae0e2a..0000000
--- a/arch/mips/boards/rzx50/include/board/debug_ll.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com>
- *
- * This file is part of barebox.
- * See file CREDITS for list of people who contributed to this project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __INCLUDE_RZX50_BOARD_DEBUG_LL_H__
-#define __INCLUDE_RZX50_BOARD_DEBUG_LL_H__
-
-#include <mach/debug_ll_jz4750d.h>
-
-#endif  /* __INCLUDE_RZX50_BOARD_DEBUG_LL_H__ */
diff --git a/arch/mips/boards/rzx50/rzx50.dox b/arch/mips/boards/rzx50/rzx50.dox
deleted file mode 100644
index 963473c..0000000
--- a/arch/mips/boards/rzx50/rzx50.dox
+++ /dev/null
@@ -1,46 +0,0 @@
-/** @page rzx50 Ritmix RZX-50 game console
-
-Ritmix RZX-50 is a portable game console for the Russian market.
-
-The portable game console has
-@li Ingenic JZ4755 SoC;
-@li 64 MiB SDRAM;
-@li 4 GiB microSDHC card / 4 GiB NAND type Flash Memory;
-@li RS232 serial interface (LV-TTL levels on the board!);
-@li LCD display (480x272);
-@li Video out interface;
-@li 1xUSB interface;
-@li buttons.
-
-The game console uses U-Boot 1.1.6 as bootloader.
-
-barebox-rzx50 mini-howto:
-
-1. Connect to the game console's UART (see. http://a320.emulate.su/2012/01/19/uart-na-ritmix-rzx-50/);
-
-2. Unblock U-Boot console (see. http://a320.emulate.su/2012/01/25/rzx-50-dostup-k-konsoli-u-boot/); Please note that U-Boot's Zmodem support does not work;
-
-3. Boot Ritmix linux and login;
-
-4. Upload barebox.bin via Zmodem
-@verbatim
-  # cd /tmp
-  # rz
-@endverbatim
-
-5. Write barebox to onboard flash
-@verbatim
-  # dd if=barebox.bin of=/dev/mmcblk0 seek=1048576 bs=1 count=262144
-@endverbatim
-
-6. Reboot RZX-50, next in U-Boot console start barebox:
-@verbatim
-  CETUS # msc read 0xa0800000 0x100000 0x40000; g a0800000
-@endverbatim
-
-Ritmix RZX-50 links:
-@li http://www.ritmixrussia.ru/products/252/entertainment/game/rzx-50
-@li ftp://ftp.ingenic.cn/2soc/4755/JZ4755_ds.pdf
-@li ftp://ftp.ingenic.cn/3sw/01linux/01loader/u-boot/u-boot-1.1.6-jz-20110719-r1728-add-jz4770.patch.bz2
-
-*/
diff --git a/arch/mips/boards/rzx50/serial.c b/arch/mips/boards/rzx50/serial.c
deleted file mode 100644
index f1e8da0..0000000
--- a/arch/mips/boards/rzx50/serial.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com>
- *
- * This file is part of barebox.
- * See file CREDITS for list of people who contributed to this project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#include <common.h>
-#include <init.h>
-
-static int rzx50_hostname_init(void)
-{
-	barebox_set_hostname("rzx50");
-
-	return 0;
-}
-console_initcall(rzx50_hostname_init);
diff --git a/arch/mips/configs/ritmix-rzx50_defconfig b/arch/mips/configs/ritmix-rzx50_defconfig
new file mode 100644
index 0000000..7691bae
--- /dev/null
+++ b/arch/mips/configs/ritmix-rzx50_defconfig
@@ -0,0 +1,39 @@
+CONFIG_BUILTIN_DTB=y
+CONFIG_BUILTIN_DTB_NAME="rzx50"
+CONFIG_MACH_MIPS_XBURST=y
+CONFIG_JZ4750D_DEBUG_LL_UART1=y
+CONFIG_PBL_IMAGE=y
+CONFIG_BAUDRATE=57600
+CONFIG_GLOB=y
+CONFIG_HUSH_FANCY_PROMPT=y
+CONFIG_HUSH_GETOPT=y
+CONFIG_CMDLINE_EDITING=y
+CONFIG_AUTO_COMPLETE=y
+# CONFIG_DEFAULT_ENVIRONMENT is not set
+CONFIG_DEBUG_LL=y
+CONFIG_CMD_EDIT=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_LOADB=y
+CONFIG_CMD_LOADY=y
+CONFIG_CMD_LOADS=y
+CONFIG_CMD_SAVES=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_IOMEM=y
+CONFIG_CMD_MD5SUM=y
+CONFIG_CMD_BOOTM_SHOW_TYPE=y
+CONFIG_CMD_BOOTM_VERBOSE=y
+CONFIG_CMD_BOOTM_INITRD=y
+CONFIG_CMD_BOOTM_OFTREE=y
+CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
+CONFIG_CMD_UIMAGE=y
+CONFIG_CMD_RESET=y
+CONFIG_CMD_POWEROFF=y
+CONFIG_CMD_GO=y
+CONFIG_CMD_OFTREE=y
+CONFIG_CMD_OF_PROPERTY=y
+CONFIG_CMD_OF_NODE=y
+CONFIG_OFDEVICE=y
+# CONFIG_SPI is not set
+CONFIG_SHA1=y
+CONFIG_SHA224=y
+CONFIG_SHA256=y
diff --git a/arch/mips/configs/rzx50_defconfig b/arch/mips/configs/rzx50_defconfig
deleted file mode 100644
index 7691bae..0000000
--- a/arch/mips/configs/rzx50_defconfig
+++ /dev/null
@@ -1,39 +0,0 @@
-CONFIG_BUILTIN_DTB=y
-CONFIG_BUILTIN_DTB_NAME="rzx50"
-CONFIG_MACH_MIPS_XBURST=y
-CONFIG_JZ4750D_DEBUG_LL_UART1=y
-CONFIG_PBL_IMAGE=y
-CONFIG_BAUDRATE=57600
-CONFIG_GLOB=y
-CONFIG_HUSH_FANCY_PROMPT=y
-CONFIG_HUSH_GETOPT=y
-CONFIG_CMDLINE_EDITING=y
-CONFIG_AUTO_COMPLETE=y
-# CONFIG_DEFAULT_ENVIRONMENT is not set
-CONFIG_DEBUG_LL=y
-CONFIG_CMD_EDIT=y
-CONFIG_CMD_SLEEP=y
-CONFIG_CMD_LOADB=y
-CONFIG_CMD_LOADY=y
-CONFIG_CMD_LOADS=y
-CONFIG_CMD_SAVES=y
-CONFIG_CMD_MEMINFO=y
-CONFIG_CMD_IOMEM=y
-CONFIG_CMD_MD5SUM=y
-CONFIG_CMD_BOOTM_SHOW_TYPE=y
-CONFIG_CMD_BOOTM_VERBOSE=y
-CONFIG_CMD_BOOTM_INITRD=y
-CONFIG_CMD_BOOTM_OFTREE=y
-CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
-CONFIG_CMD_UIMAGE=y
-CONFIG_CMD_RESET=y
-CONFIG_CMD_POWEROFF=y
-CONFIG_CMD_GO=y
-CONFIG_CMD_OFTREE=y
-CONFIG_CMD_OF_PROPERTY=y
-CONFIG_CMD_OF_NODE=y
-CONFIG_OFDEVICE=y
-# CONFIG_SPI is not set
-CONFIG_SHA1=y
-CONFIG_SHA224=y
-CONFIG_SHA256=y
diff --git a/arch/mips/mach-xburst/mach-xburst.dox b/arch/mips/mach-xburst/mach-xburst.dox
index a5e524d..052c05e 100644
--- a/arch/mips/mach-xburst/mach-xburst.dox
+++ b/arch/mips/mach-xburst/mach-xburst.dox
@@ -2,6 +2,6 @@
 
 @section xburst_boards XBurst-based boards
 
-@li @subpage rzx50
+@li @subpage ritmix-rzx50
 
 */
-- 
1.9.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2 4/8] serial: ns16550: make FCR setup value part of struct ns16550_priv
  2014-03-24 20:13 ` [PATCH v2 4/8] serial: ns16550: make FCR setup value part of struct ns16550_priv Antony Pavlov
@ 2014-03-24 20:28   ` Antony Pavlov
  0 siblings, 0 replies; 11+ messages in thread
From: Antony Pavlov @ 2014-03-24 20:28 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On Tue, 25 Mar 2014 00:13:50 +0400
Antony Pavlov <antonynpavlov@gmail.com> wrote:

This patch can be very handy for adding device tree FIFO-less controllers support in the future.

E.g.:  .compatible = "ns8250" or .compatible = "ns16450"

> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
>  drivers/serial/serial_ns16550.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
> index d217014..0089a04 100644
> --- a/drivers/serial/serial_ns16550.c
> +++ b/drivers/serial/serial_ns16550.c
> @@ -48,6 +48,7 @@ struct ns16550_priv {
>  	struct NS16550_plat plat;
>  	int access_width;
>  	struct clk *clk;
> +	uint32_t fcrval;
>  };
>  
>  static inline struct ns16550_priv *to_ns16550_priv(struct console_device *cdev)
> @@ -157,18 +158,13 @@ static int ns16550_setbaudrate(struct console_device *cdev, int baud_rate)
>  {
>  	unsigned int baud_divisor = ns16550_calc_divisor(cdev, baud_rate);
>  	struct ns16550_priv *priv = to_ns16550_priv(cdev);
> -	struct NS16550_plat *plat = &priv->plat;
>  
>  	ns16550_write(cdev, LCR_BKSE, lcr);
>  	ns16550_write(cdev, baud_divisor & 0xff, dll);
>  	ns16550_write(cdev, (baud_divisor >> 8) & 0xff, dlm);
>  	ns16550_write(cdev, LCRVAL, lcr);
>  	ns16550_write(cdev, MCRVAL, mcr);
> -
> -	if (plat->flags & NS16650_FLAG_DISABLE_FIFO)
> -		ns16550_write(cdev, FCRVAL & ~FCR_FIFO_EN, fcr);
> -	else
> -		ns16550_write(cdev, FCRVAL, fcr);
> +	ns16550_write(cdev, priv->fcrval, fcr);
>  
>  	return 0;
>  }
> @@ -316,6 +312,11 @@ static int ns16550_probe(struct device_d *dev)
>  	cdev->setbrg = ns16550_setbaudrate;
>  	cdev->linux_console_name = devtype->linux_console_name;
>  
> +	if (plat->flags & NS16650_FLAG_DISABLE_FIFO)
> +		priv->fcrval = FCRVAL & ~FCR_FIFO_EN;
> +	else
> +		priv->fcrval = FCRVAL;
> +
>  	devtype->init_port(cdev);
>  
>  	return console_register(cdev);
> -- 
> 1.9.0
> 


-- 
-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2 0/8] MIPS: improve Ingenic JZ4755 device tree support
  2014-03-24 20:13 [PATCH v2 0/8] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
                   ` (7 preceding siblings ...)
  2014-03-24 20:13 ` [PATCH v2 8/8] MIPS: boards: rename rzx50 -> ritmix-rzx50 Antony Pavlov
@ 2014-03-25  9:40 ` Antony Pavlov
  8 siblings, 0 replies; 11+ messages in thread
From: Antony Pavlov @ 2014-03-25  9:40 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On Tue, 25 Mar 2014 00:13:46 +0400
Antony Pavlov <antonynpavlov@gmail.com> wrote:

Sascha!

Please ignore this series!

There is a error in 
  [PATCH v2 4/8] serial: ns16550: make FCR setup value part of struct ns16550_priv

This code does not check 'plat' value before checking plat->flags!

+	if (plat->flags & NS16650_FLAG_DISABLE_FIFO)
+		priv->fcrval = FCRVAL & ~FCR_FIFO_EN;
+	else
+		priv->fcrval = FCRVAL;
+

> This patcheseries moves Ingenic JZ4755 UART initialization
> into device tree and makes JZ4755 device tree organization
> more clear.
> 
> This patchseries is a part of work on Ingenic chips support
> and prepares MIPS board support switch to device tree.
> Next patchseries will add device tree Ingenic gpio, clk
> and pinctls support.
> 
> Changes since v1:
>   * use "make FCR setup value part of struct ns16550_priv"
>     instead of "make it possible to get reg_write() from devtype";
>   * add a trivial "fix whitespaces" patch.
> 
> 
> Antony Pavlov (8):
>   MIPS: mach-xburst: fix DEBUG_LL=n build error
>   MIPS: dts: rzx50: move jz4755 description to the separate file
>   serial: ns16550: fix whitespaces
>   serial: ns16550: make FCR setup value part of struct ns16550_priv
>   serial: ns16550: add compatible entry for "ingenic,jz4740-uart"
>   MIPS: rzx50: drop console initialization in board code
>   MIPS: mach-xburst: drop serial.c
>   MIPS: boards: rename rzx50 -> ritmix-rzx50
> 
>  Documentation/boards.dox                           |  2 +-
>  arch/mips/Makefile                                 |  2 +-
>  arch/mips/boards/ritmix-rzx50/Makefile             |  1 +
>  .../ritmix-rzx50/include/board/board_pbl_start.h   | 43 ++++++++++++++++
>  .../boards/ritmix-rzx50/include/board/debug_ll.h   | 23 +++++++++
>  arch/mips/boards/ritmix-rzx50/ritmix-rzx50.dox     | 46 +++++++++++++++++
>  arch/mips/boards/ritmix-rzx50/serial.c             | 27 ++++++++++
>  arch/mips/boards/rzx50/Makefile                    |  1 -
>  .../boards/rzx50/include/board/board_pbl_start.h   | 43 ----------------
>  arch/mips/boards/rzx50/include/board/debug_ll.h    | 23 ---------
>  arch/mips/boards/rzx50/rzx50.dox                   | 46 -----------------
>  arch/mips/boards/rzx50/serial.c                    | 32 ------------
>  arch/mips/configs/ritmix-rzx50_defconfig           | 39 ++++++++++++++
>  arch/mips/configs/rzx50_defconfig                  | 39 --------------
>  arch/mips/dts/jz4755.dtsi                          | 35 +++++++++++++
>  arch/mips/dts/rzx50.dts                            |  8 ++-
>  arch/mips/include/asm/debug_ll_ns16550.h           |  2 +
>  arch/mips/mach-xburst/Makefile                     |  1 -
>  arch/mips/mach-xburst/mach-xburst.dox              |  2 +-
>  arch/mips/mach-xburst/serial.c                     | 60 ----------------------
>  drivers/serial/serial_ns16550.c                    | 35 ++++++++++---
>  21 files changed, 254 insertions(+), 256 deletions(-)
>  create mode 100644 arch/mips/boards/ritmix-rzx50/Makefile
>  create mode 100644 arch/mips/boards/ritmix-rzx50/include/board/board_pbl_start.h
>  create mode 100644 arch/mips/boards/ritmix-rzx50/include/board/debug_ll.h
>  create mode 100644 arch/mips/boards/ritmix-rzx50/ritmix-rzx50.dox
>  create mode 100644 arch/mips/boards/ritmix-rzx50/serial.c
>  delete mode 100644 arch/mips/boards/rzx50/Makefile
>  delete mode 100644 arch/mips/boards/rzx50/include/board/board_pbl_start.h
>  delete mode 100644 arch/mips/boards/rzx50/include/board/debug_ll.h
>  delete mode 100644 arch/mips/boards/rzx50/rzx50.dox
>  delete mode 100644 arch/mips/boards/rzx50/serial.c
>  create mode 100644 arch/mips/configs/ritmix-rzx50_defconfig
>  delete mode 100644 arch/mips/configs/rzx50_defconfig
>  create mode 100644 arch/mips/dts/jz4755.dtsi
>  delete mode 100644 arch/mips/mach-xburst/serial.c
> 
> -- 
> 1.9.0
> 


-- 
-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2014-03-25  9:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-24 20:13 [PATCH v2 0/8] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
2014-03-24 20:13 ` [PATCH v2 1/8] MIPS: mach-xburst: fix DEBUG_LL=n build error Antony Pavlov
2014-03-24 20:13 ` [PATCH v2 2/8] MIPS: dts: rzx50: move jz4755 description to the separate file Antony Pavlov
2014-03-24 20:13 ` [PATCH v2 3/8] serial: ns16550: fix whitespaces Antony Pavlov
2014-03-24 20:13 ` [PATCH v2 4/8] serial: ns16550: make FCR setup value part of struct ns16550_priv Antony Pavlov
2014-03-24 20:28   ` Antony Pavlov
2014-03-24 20:13 ` [PATCH v2 5/8] serial: ns16550: add compatible entry for "ingenic, jz4740-uart" Antony Pavlov
2014-03-24 20:13 ` [PATCH v2 6/8] MIPS: rzx50: drop console initialization in board code Antony Pavlov
2014-03-24 20:13 ` [PATCH v2 7/8] MIPS: mach-xburst: drop serial.c Antony Pavlov
2014-03-24 20:13 ` [PATCH v2 8/8] MIPS: boards: rename rzx50 -> ritmix-rzx50 Antony Pavlov
2014-03-25  9:40 ` [PATCH v2 0/8] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox