* [PATCH 1/7] MIPS: mach-xburst: fix DEBUG_LL=n build error
2014-03-22 11:29 [PATCH 0/7] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
@ 2014-03-22 11:29 ` Antony Pavlov
2014-03-22 11:29 ` [PATCH 2/7] MIPS: dts: rzx50: move jz4755 description to the separate file Antony Pavlov
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Antony Pavlov @ 2014-03-22 11:29 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] 10+ messages in thread
* [PATCH 2/7] MIPS: dts: rzx50: move jz4755 description to the separate file
2014-03-22 11:29 [PATCH 0/7] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
2014-03-22 11:29 ` [PATCH 1/7] MIPS: mach-xburst: fix DEBUG_LL=n build error Antony Pavlov
@ 2014-03-22 11:29 ` Antony Pavlov
2014-03-22 11:29 ` [PATCH 3/7] serial: ns16550: make it possible to get reg_write() from devtype Antony Pavlov
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Antony Pavlov @ 2014-03-22 11:29 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] 10+ messages in thread
* [PATCH 3/7] serial: ns16550: make it possible to get reg_write() from devtype
2014-03-22 11:29 [PATCH 0/7] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
2014-03-22 11:29 ` [PATCH 1/7] MIPS: mach-xburst: fix DEBUG_LL=n build error Antony Pavlov
2014-03-22 11:29 ` [PATCH 2/7] MIPS: dts: rzx50: move jz4755 description to the separate file Antony Pavlov
@ 2014-03-22 11:29 ` Antony Pavlov
2014-03-22 11:29 ` [PATCH 4/7] serial: ns16550: add compatible entry for "ingenic, jz4740-uart" Antony Pavlov
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Antony Pavlov @ 2014-03-22 11:29 UTC (permalink / raw)
To: barebox
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
drivers/serial/serial_ns16550.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index f1da44b..aa0992f 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -57,6 +57,8 @@ static inline struct ns16550_priv *to_ns16550_priv(struct console_device *cdev)
struct ns16550_drvdata {
void (*init_port)(struct console_device *cdev);
+ void (*reg_write)(unsigned int val, unsigned long base,
+ unsigned char reg_offset);
const char *linux_console_name;
};
@@ -316,6 +318,9 @@ static int ns16550_probe(struct device_d *dev)
cdev->setbrg = ns16550_setbaudrate;
cdev->linux_console_name = devtype->linux_console_name;
+ if (devtype->reg_write)
+ priv->plat.reg_write = devtype->reg_write;
+
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] 10+ messages in thread
* [PATCH 4/7] serial: ns16550: add compatible entry for "ingenic, jz4740-uart"
2014-03-22 11:29 [PATCH 0/7] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
` (2 preceding siblings ...)
2014-03-22 11:29 ` [PATCH 3/7] serial: ns16550: make it possible to get reg_write() from devtype Antony Pavlov
@ 2014-03-22 11:29 ` Antony Pavlov
2014-03-24 6:45 ` Sascha Hauer
2014-03-22 11:29 ` [PATCH 5/7] MIPS: rzx50: drop console initialization in board code Antony Pavlov
` (2 subsequent siblings)
6 siblings, 1 reply; 10+ messages in thread
From: Antony Pavlov @ 2014-03-22 11:29 UTC (permalink / raw)
To: barebox
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
drivers/serial/serial_ns16550.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index aa0992f..7130871 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -257,6 +257,30 @@ static __maybe_unused struct ns16550_drvdata omap_drvdata = {
.linux_console_name = "ttyO",
};
+#define JZ_UART_SHIFT 2
+
+static void jz_serial_reg_write(unsigned int val, unsigned long base,
+ unsigned char reg_offset)
+{
+ switch (reg_offset) {
+ case (fcr << JZ_UART_SHIFT):
+ val |= 0x10; /* Enable uart module */
+ break;
+ case (ier << JZ_UART_SHIFT):
+ val |= (val & 0x4) << 2;
+ break;
+ default:
+ break;
+ }
+
+ writeb(val & 0xff, (void *)(base + reg_offset));
+}
+
+static __maybe_unused struct ns16550_drvdata jz_drvdata = {
+ .init_port = ns16550_serial_init_port,
+ .reg_write = jz_serial_reg_write,
+};
+
/**
* @brief Probe entry point -called on the first match for device
*
@@ -351,6 +375,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] 10+ messages in thread
* Re: [PATCH 4/7] serial: ns16550: add compatible entry for "ingenic, jz4740-uart"
2014-03-22 11:29 ` [PATCH 4/7] serial: ns16550: add compatible entry for "ingenic, jz4740-uart" Antony Pavlov
@ 2014-03-24 6:45 ` Sascha Hauer
2014-03-24 20:23 ` Antony Pavlov
0 siblings, 1 reply; 10+ messages in thread
From: Sascha Hauer @ 2014-03-24 6:45 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
On Sat, Mar 22, 2014 at 03:29:54PM +0400, Antony Pavlov wrote:
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
> drivers/serial/serial_ns16550.c | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
> index aa0992f..7130871 100644
> --- a/drivers/serial/serial_ns16550.c
> +++ b/drivers/serial/serial_ns16550.c
> @@ -257,6 +257,30 @@ static __maybe_unused struct ns16550_drvdata omap_drvdata = {
> .linux_console_name = "ttyO",
> };
>
> +#define JZ_UART_SHIFT 2
> +
> +static void jz_serial_reg_write(unsigned int val, unsigned long base,
> + unsigned char reg_offset)
> +{
> + switch (reg_offset) {
> + case (fcr << JZ_UART_SHIFT):
> + val |= 0x10; /* Enable uart module */
> + break;
You could also do this by overwriting .init_port.
> + case (ier << JZ_UART_SHIFT):
> + val |= (val & 0x4) << 2;
What does this bit do?
Putting driver logic into the register writes is not good. Where this
leads to can be seen in drivers/mmc/host/sdhci-esdhc-imx.c in the
kernel. Could we make fcrval overwritable in drvdata? Or just special
case the fcr register access in ns16550_setbaudrate?
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 4/7] serial: ns16550: add compatible entry for "ingenic, jz4740-uart"
2014-03-24 6:45 ` Sascha Hauer
@ 2014-03-24 20:23 ` Antony Pavlov
0 siblings, 0 replies; 10+ messages in thread
From: Antony Pavlov @ 2014-03-24 20:23 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
On Mon, 24 Mar 2014 07:45:31 +0100
Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Sat, Mar 22, 2014 at 03:29:54PM +0400, Antony Pavlov wrote:
> > Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> > ---
> > drivers/serial/serial_ns16550.c | 30 ++++++++++++++++++++++++++++++
> > 1 file changed, 30 insertions(+)
> >
> > diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
> > index aa0992f..7130871 100644
> > --- a/drivers/serial/serial_ns16550.c
> > +++ b/drivers/serial/serial_ns16550.c
> > @@ -257,6 +257,30 @@ static __maybe_unused struct ns16550_drvdata omap_drvdata = {
> > .linux_console_name = "ttyO",
> > };
> >
> > +#define JZ_UART_SHIFT 2
> > +
> > +static void jz_serial_reg_write(unsigned int val, unsigned long base,
> > + unsigned char reg_offset)
> > +{
> > + switch (reg_offset) {
> > + case (fcr << JZ_UART_SHIFT):
> > + val |= 0x10; /* Enable uart module */
> > + break;
>
> You could also do this by overwriting .init_port.
I'll do so.
> > + case (ier << JZ_UART_SHIFT):
> > + val |= (val & 0x4) << 2;
>
> What does this bit do?
It's non-standard Ingenic-specific 'Receive Timeout Interrupt Enable' bit.
We can simply drop it as we use 'ns16550_write(cdev, 0x00, ier);' for ier initialization.
>
> Putting driver logic into the register writes is not good. Where this
> leads to can be seen in drivers/mmc/host/sdhci-esdhc-imx.c in the
> kernel. Could we make fcrval overwritable in drvdata? Or just special
> case the fcr register access in ns16550_setbaudrate?
Please see v2 patchseries.
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 5/7] MIPS: rzx50: drop console initialization in board code
2014-03-22 11:29 [PATCH 0/7] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
` (3 preceding siblings ...)
2014-03-22 11:29 ` [PATCH 4/7] serial: ns16550: add compatible entry for "ingenic, jz4740-uart" Antony Pavlov
@ 2014-03-22 11:29 ` Antony Pavlov
2014-03-22 11:29 ` [PATCH 6/7] MIPS: mach-xburst: drop serial.c Antony Pavlov
2014-03-22 11:29 ` [PATCH 7/7] MIPS: boards: rename rzx50 -> ritmix-rzx50 Antony Pavlov
6 siblings, 0 replies; 10+ messages in thread
From: Antony Pavlov @ 2014-03-22 11:29 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] 10+ messages in thread
* [PATCH 6/7] MIPS: mach-xburst: drop serial.c
2014-03-22 11:29 [PATCH 0/7] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
` (4 preceding siblings ...)
2014-03-22 11:29 ` [PATCH 5/7] MIPS: rzx50: drop console initialization in board code Antony Pavlov
@ 2014-03-22 11:29 ` Antony Pavlov
2014-03-22 11:29 ` [PATCH 7/7] MIPS: boards: rename rzx50 -> ritmix-rzx50 Antony Pavlov
6 siblings, 0 replies; 10+ messages in thread
From: Antony Pavlov @ 2014-03-22 11:29 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] 10+ messages in thread
* [PATCH 7/7] MIPS: boards: rename rzx50 -> ritmix-rzx50
2014-03-22 11:29 [PATCH 0/7] MIPS: improve Ingenic JZ4755 device tree support Antony Pavlov
` (5 preceding siblings ...)
2014-03-22 11:29 ` [PATCH 6/7] MIPS: mach-xburst: drop serial.c Antony Pavlov
@ 2014-03-22 11:29 ` Antony Pavlov
6 siblings, 0 replies; 10+ messages in thread
From: Antony Pavlov @ 2014-03-22 11:29 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] 10+ messages in thread