diff mbox

[U-Boot,v3,4/5] malta: Tidy up UART address selection

Message ID 1463467408-13245-5-git-send-email-paul.burton@imgtec.com
State Accepted
Delegated to: Daniel Schwierzeck
Headers show

Commit Message

Paul Burton May 17, 2016, 6:43 a.m. UTC
The address of the UART differs based upon the system controller because
it's actually within the I/O port region, which is in a different
location for each system controller. Rather than handling this as 2
UARTs with the correct one selected at runtime, use I/O port accessors
for the UART such that access to it gets translated into the I/O port
region automatically.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---

Changes in v3: None
Changes in v2:
- New patch, simplifying the later DT conversion.

 board/imgtec/malta/malta.c | 13 -------------
 include/configs/malta.h    |  4 ++--
 2 files changed, 2 insertions(+), 15 deletions(-)

Comments

Daniel Schwierzeck May 25, 2016, 10:09 p.m. UTC | #1
Am 17.05.2016 um 08:43 schrieb Paul Burton:
> The address of the UART differs based upon the system controller because
> it's actually within the I/O port region, which is in a different
> location for each system controller. Rather than handling this as 2
> UARTs with the correct one selected at runtime, use I/O port accessors
> for the UART such that access to it gets translated into the I/O port
> region automatically.
> 
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> ---
> 
> Changes in v3: None
> Changes in v2:
> - New patch, simplifying the later DT conversion.
> 
>  board/imgtec/malta/malta.c | 13 -------------
>  include/configs/malta.h    |  4 ++--
>  2 files changed, 2 insertions(+), 15 deletions(-)
> 

applied to u-boot-mips, thanks.
diff mbox

Patch

diff --git a/board/imgtec/malta/malta.c b/board/imgtec/malta/malta.c
index 3a9e780..4955043 100644
--- a/board/imgtec/malta/malta.c
+++ b/board/imgtec/malta/malta.c
@@ -12,7 +12,6 @@ 
 #include <pci_gt64120.h>
 #include <pci_msc01.h>
 #include <rtc.h>
-#include <serial.h>
 
 #include <asm/addrspace.h>
 #include <asm/io.h>
@@ -161,18 +160,6 @@  int misc_init_r(void)
 	return 0;
 }
 
-struct serial_device *default_serial_console(void)
-{
-	switch (malta_sys_con()) {
-	case SYSCON_GT64120:
-		return &eserial1_device;
-
-	default:
-	case SYSCON_MSC01:
-		return &eserial2_device;
-	}
-}
-
 void pci_init_board(void)
 {
 	pci_dev_t bdf;
diff --git a/include/configs/malta.h b/include/configs/malta.h
index 04dca71..1c3c83c 100644
--- a/include/configs/malta.h
+++ b/include/configs/malta.h
@@ -67,10 +67,10 @@ 
 #define CONFIG_BAUDRATE			115200
 
 #define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_PORT_MAPPED
 #define CONFIG_SYS_NS16550_REG_SIZE	1
 #define CONFIG_SYS_NS16550_CLK		(115200 * 16)
-#define CONFIG_SYS_NS16550_COM1		0xb80003f8
-#define CONFIG_SYS_NS16550_COM2		0xbb0003f8
+#define CONFIG_SYS_NS16550_COM1		0x3f8
 #define CONFIG_CONS_INDEX		1
 
 /*