Fix early uart on malta, now malta board can print things!

Signed-off-by: Harry Chen <i@harrychen.xyz>
master
Harry Chen 6 years ago
parent 06f7b1643d
commit c3e94d38ae

@ -127,7 +127,7 @@ else ifeq ($(arch), mipsel)
ifeq ($(board), malta) ifeq ($(board), malta)
qemu_opts += \ qemu_opts += \
-machine $(board) \ -machine $(board) \
-serial none -serial none -serial mon:stdio \ -serial mon:stdio \
-kernel $(kernel_img) -kernel $(kernel_img)
endif endif
endif endif

@ -24,6 +24,12 @@
reg = <0x00000000 0x10000000>; reg = <0x00000000 0x10000000>;
}; };
uart0: serial@b80003f8 {
compatible = "ns16550a";
reg = <0xb80003f8 0x8>;
clock-frequency = <1843200>;
};
uart2: serial@bf000900 { uart2: serial@bf000900 {
compatible = "ns16550a"; compatible = "ns16550a";
reg = <0xbf000900 0x40>; reg = <0xbf000900 0x40>;

@ -10,7 +10,7 @@ pub mod console;
/// Initialize serial port first /// Initialize serial port first
pub fn init_serial_early() { pub fn init_serial_early() {
assert_has_not_been_called!("board::init must be called only once"); assert_has_not_been_called!("board::init must be called only once");
serial::init(0xbf000900); serial::init(0xb80003f8);
println!("Hello QEMU Malta!"); println!("Hello QEMU Malta!");
} }

Loading…
Cancel
Save