[PATCH 0/3] MIPS Malta serial port fixups
Antony Pavlov
antonynpavlov at gmail.com
Thu Feb 12 21:53:11 PST 2015
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:
diff --git a/arch/mips/boards/qemu-malta/include/board/board_pbl_start.h b/arch/mips/boards/qemu-malta/include/board/board_pbl_start.h
index 5c15372..7975044 100644
--- a/arch/mips/boards/qemu-malta/include/board/board_pbl_start.h
+++ b/arch/mips/boards/qemu-malta/include/board/board_pbl_start.h
@@ -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
diff --git a/arch/mips/boards/qemu-malta/include/board/debug_ll.h b/arch/mips/boards/qemu-malta/include/board/debug_ll.h
index abeee53..e6ae9b5 100644
--- a/arch/mips/boards/qemu-malta/include/board/debug_ll.h
+++ b/arch/mips/boards/qemu-malta/include/board/debug_ll.h
@@ -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
diff --git a/arch/mips/dts/qemu-malta.dts b/arch/mips/dts/qemu-malta.dts
index 9b0c594..ece7555 100644
--- a/arch/mips/dts/qemu-malta.dts
+++ b/arch/mips/dts/qemu-malta.dts
@@ -19,7 +19,7 @@
uart0: serial at 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
--
2.1.4
More information about the barebox
mailing list