MIPS Malta serial port fixups
Subsystems (2)
cover MIPS Malta serial port fixups
Yesterday I tested qemu-malta barebox on a real MIPS Malta board. Barebox runs on real board with some limitations.
This patchseries fixes trivial serial port errors
found during barebox real board experiments.
real Malta pico-howto
=====================
There are several configurations for Malta board. The Malta board at my disposal is a rather new board with MIPS ROC-it2 system controller. But qemu emulates the board with old GT64120 system controller.
So additional workaround is needed:
we have to disable GT64120 initialization in pbl and change serial port base addresses; also PCI has to be disabled in the .config.
Here is the patch:
arch/mips/boards/qemu-malta/include/board/board_pbl_start.h +2 -0
@@ -60,6 +60,7 @@ __start:/* cpu specific setup ... */ /* ... absent */ +#if 0 /* * Load BAR registers of GT64120 as done by YAMON *
@@ -93,6 +94,7 @@ __start: sw t0, GT_PCI0M1LD_OFS(t1) li t0, GT_LD(0x1bdfffff) sw t0, GT_PCI0M1HD_OFS(t1) +#endif mips_nmon
arch/mips/boards/qemu-malta/include/board/debug_ll.h +1 -1
@@ -20,7 +20,7 @@#include <mach/hardware.h> -#define DEBUG_LL_UART_ADDR MALTA_PIIX4_UART0 +#define DEBUG_LL_UART_ADDR 0xbb0003f8#define DEBUG_LL_UART_SHIFT 0#define DEBUG_LL_UART_CLK 1843200
arch/mips/dts/qemu-malta.dts +1 -1
@@ -19,7 +19,7 @@ uart0: serial@180003f8 { compatible = "ns16550a"; - reg = <0x180003f8 0x08>; + reg = <0x1b0003f8 0x08>; reg-shift = <0>; /* no matter for emulated port */ clock-frequency = <1843200>;
Using YAMON to run barebox
--------------------------
YAMON can be used to load barebox from tftp-server:
YAMON> setenv ipaddr 10.0.0.177
YAMON> setenv subnetmask 255.255.255.0
YAMON> ping 10.0.0.1
64 bytes ICMP-ECHO-REPLY user data received from 10.0.0.1 YAMON> fread tftp://10.0.0.1/antony/zbarebox.bin 0xa0100000 YAMON> go 0xa0100000
Please see http://www.jackslab.org/?p=274 for more YAMON usage examples.
Antony Pavlov (3):
MIPS: qemu-malta_defconfig: set BAUDRATE=38400
MIPS: qemu-malta: debug_ll: fix serial port speed
MIPS: add gxemul-malta_defconfig
Documentation/boards/mips/qemu-malta.rst | 17 +++++-- .../boards/qemu-malta/include/board/debug_ll.h | 5 +- arch/mips/configs/gxemul-malta_defconfig | 57 ++++++++++++++++++++++ arch/mips/configs/qemu-malta_defconfig | 4 +- 4 files changed, 76 insertions(+), 7 deletions(-) create mode 100644 arch/mips/configs/gxemul-malta_defconfig
Signature · 7 lines
2.1.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/3 MIPS: qemu-malta_defconfig: set BAUDRATE=38400
MIPS Malta's YAMON PROM monitor uses serial port speed=38400 (see Malta(tm) User's Manual for details).
--- arch/mips/configs/qemu-malta_defconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/configs/qemu-malta_defconfig +2 -2
@@ -2,8 +2,8 @@ CONFIG_BUILTIN_DTB=y CONFIG_BUILTIN_DTB_NAME="qemu-malta" CONFIG_PBL_IMAGE=y CONFIG_STACK_SIZE=0x7000 -CONFIG_BROKEN=y CONFIG_EXPERIMENTAL=y +CONFIG_BAUDRATE=38400 CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y
@@ -38,9 +38,9 @@ CONFIG_CMD_PING=y CONFIG_CMD_TFTP=y CONFIG_CMD_ECHO_E=y CONFIG_CMD_EDIT=y +CONFIG_CMD_LOGIN=y CONFIG_CMD_MENU=y CONFIG_CMD_MENU_MANAGEMENT=y -CONFIG_CMD_LOGIN=y CONFIG_CMD_PASSWD=y CONFIG_CMD_READLINE=y CONFIG_CMD_TIMEOUT=y
Signature · 7 lines
2.1.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/3 MIPS: qemu-malta: debug_ll: fix serial port speed
In reply to Antony Pavlovqemu-malta.dts uses clock-frequency = <1843200>,
but debug_ll.h for Malta uses another value.
This patch fixes this inconsistency.
--- arch/mips/boards/qemu-malta/include/board/debug_ll.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/mips/boards/qemu-malta/include/board/debug_ll.h +4 -1
@@ -22,6 +22,9 @@#define DEBUG_LL_UART_ADDR MALTA_PIIX4_UART0#define DEBUG_LL_UART_SHIFT 0 -#define DEBUG_LL_UART_DIVISOR 1843200/* no matter for emulated port */ + +#define DEBUG_LL_UART_CLK 1843200 +#define DEBUG_LL_UART_BPS CONFIG_BAUDRATE +#define DEBUG_LL_UART_DIVISOR (DEBUG_LL_UART_CLK / DEBUG_LL_UART_BPS)#endif /* __INCLUDE_BOARD_DEBUG_LL_QEMU_MALTA_H__ */
Signature · 7 lines
2.1.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 3/3 MIPS: add gxemul-malta_defconfig
In reply to Antony PavlovGXemul supports MIPS Malta but with some limitations. The most notable problems:
* PCI-enabled barebox just hangs under GXemul;
* by default gxemul uses 5Kc processor,
so we have to force MIPS32R1 processor usage.
To fix these problems the special gxemul-malta_defconfig is introduced and the board's documentation is updated.
--- Documentation/boards/mips/qemu-malta.rst | 17 +++++++--- arch/mips/configs/gxemul-malta_defconfig | 57 ++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 arch/mips/configs/gxemul-malta_defconfig
Documentation/boards/mips/qemu-malta.rst +13 -4
@@ -10,10 +10,6 @@ QEMU run string:: -nographic -serial stdio -monitor null \ -bios barebox-flash-image -Also you can use GXemul:: - - gxemul -Q -x -e maltabe -M 256 0xbfc00000:barebox-flash-image - Little-endian mode ------------------
@@ -35,6 +31,19 @@ QEMU run string:: -bios barebox-flash-image +Using GXemul +------------ + +GXemul supports MIPS Malta except PCI stuff. +You can use GXemul to run little-endian barebox (use gxemul-malta_defconfig). + +N.B. There is no need to swap words in ``zbarebox.bin`` for little-endian GXemul! + +GXemul run string:: + + gxemul -Q -e malta -M 256 0xbfc00000:barebox-flash-image + + Links -----
arch/mips/configs/gxemul-malta_defconfig new file +57 -0
57 lines not on this page · raw message
Signature · 7 lines
2.1.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedHi Antony,
Quoted 4 lines · Antony Pavlov
Yesterday I tested qemu-malta barebox on a real MIPS Malta board. Barebox runs on real board with some limitations.
This patchseries fixes trivial serial port errors
found during barebox real board experiments.
Applied all, thanks.
Do you plan to add real hardware support?
Sascha
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 11 lines · On Mon, 16 Feb 2015 06:32:42 +0100 Sascha Hauer <[email protected]> wrote:
Hi Antony,
Quoted 4 lines · Antony Pavlov
Yesterday I tested qemu-malta barebox on a real MIPS Malta board. Barebox runs on real board with some limitations.
This patchseries fixes trivial serial port errors
found during barebox real board experiments.Applied all, thanks.
Do you plan to add real hardware support?
It depends on aviability of real hardware and my free time. Just now I can work with this Malta board remotly from time to time. YAMON-02.22 sources are available at official MIPS site, so some information on system controller can be obtained there. Full YAMON replacement may be difficult but I think I can try to add PCI support on real hardware.
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox