Commit 6242aa137427f6da6ca47e7a8c9a9f78ad63e00d
Committed by
Daniel Schwierzeck
1 parent
2e7eb12e5c
Exists in
v2017.01-smarct4x
and in
25 other branches
malta: Use device model & tree for UART
Make use of device model & device tree to probe the UART driver. This is the initial step in bringing Malta up to date with driver model, and allows for cleaner handling of the different I/O addresses for different system controllers by specifying the ISA bus address instead of a translated memory address. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Showing 6 changed files with 41 additions and 6 deletions Side-by-side Diff
arch/mips/Kconfig
... | ... | @@ -23,7 +23,11 @@ |
23 | 23 | |
24 | 24 | config TARGET_MALTA |
25 | 25 | bool "Support malta" |
26 | + select DM | |
27 | + select DM_SERIAL | |
26 | 28 | select DYNAMIC_IO_PORT_BASE |
29 | + select OF_CONTROL | |
30 | + select OF_ISA_BUS | |
27 | 31 | select SUPPORTS_BIG_ENDIAN |
28 | 32 | select SUPPORTS_LITTLE_ENDIAN |
29 | 33 | select SUPPORTS_CPU_MIPS32_R1 |
arch/mips/dts/Makefile
arch/mips/dts/mti,malta.dts
1 | +/dts-v1/; | |
2 | + | |
3 | +/memreserve/ 0x00000000 0x00001000; /* Exception vectors */ | |
4 | +/memreserve/ 0x000f0000 0x00010000; /* PIIX4 ISA memory */ | |
5 | + | |
6 | +/ { | |
7 | + #address-cells = <1>; | |
8 | + #size-cells = <1>; | |
9 | + compatible = "mti,malta"; | |
10 | + | |
11 | + chosen { | |
12 | + stdout-path = &uart0; | |
13 | + }; | |
14 | + | |
15 | + isa@0 { | |
16 | + compatible = "isa"; | |
17 | + #address-cells = <2>; | |
18 | + #size-cells = <1>; | |
19 | + ranges = <1 0 0 0x1000>; | |
20 | + | |
21 | + uart0: serial@3f8 { | |
22 | + compatible = "ns16550a"; | |
23 | + | |
24 | + reg = <1 0x3f8 0x40>; | |
25 | + reg-shift = <0>; | |
26 | + | |
27 | + clock-frequency = <1843200>; | |
28 | + | |
29 | + u-boot,dm-pre-reloc; | |
30 | + }; | |
31 | + }; | |
32 | +}; |
configs/malta_defconfig
1 | 1 | CONFIG_MIPS=y |
2 | 2 | CONFIG_TARGET_MALTA=y |
3 | +CONFIG_DEFAULT_DEVICE_TREE="mti,malta" | |
3 | 4 | CONFIG_HUSH_PARSER=y |
4 | 5 | CONFIG_SYS_PROMPT="malta # " |
5 | 6 | # CONFIG_CMD_LOADB is not set |
... | ... | @@ -9,6 +10,7 @@ |
9 | 10 | CONFIG_CMD_DHCP=y |
10 | 11 | # CONFIG_CMD_NFS is not set |
11 | 12 | CONFIG_CMD_PING=y |
13 | +CONFIG_OF_EMBED=y | |
12 | 14 | CONFIG_SYS_NS16550=y |
13 | 15 | CONFIG_USE_PRIVATE_LIBGCC=y |
configs/maltael_defconfig
1 | 1 | CONFIG_MIPS=y |
2 | 2 | CONFIG_TARGET_MALTA=y |
3 | 3 | CONFIG_SYS_LITTLE_ENDIAN=y |
4 | +CONFIG_DEFAULT_DEVICE_TREE="mti,malta" | |
4 | 5 | CONFIG_HUSH_PARSER=y |
5 | 6 | CONFIG_SYS_PROMPT="maltael # " |
6 | 7 | # CONFIG_CMD_LOADB is not set |
... | ... | @@ -10,6 +11,7 @@ |
10 | 11 | CONFIG_CMD_DHCP=y |
11 | 12 | # CONFIG_CMD_NFS is not set |
12 | 13 | CONFIG_CMD_PING=y |
14 | +CONFIG_OF_EMBED=y | |
13 | 15 | CONFIG_SYS_NS16550=y |
14 | 16 | CONFIG_USE_PRIVATE_LIBGCC=y |
include/configs/malta.h
... | ... | @@ -65,13 +65,7 @@ |
65 | 65 | * Serial driver |
66 | 66 | */ |
67 | 67 | #define CONFIG_BAUDRATE 115200 |
68 | - | |
69 | -#define CONFIG_SYS_NS16550_SERIAL | |
70 | 68 | #define CONFIG_SYS_NS16550_PORT_MAPPED |
71 | -#define CONFIG_SYS_NS16550_REG_SIZE 1 | |
72 | -#define CONFIG_SYS_NS16550_CLK (115200 * 16) | |
73 | -#define CONFIG_SYS_NS16550_COM1 0x3f8 | |
74 | -#define CONFIG_CONS_INDEX 1 | |
75 | 69 | |
76 | 70 | /* |
77 | 71 | * Flash configuration |