From d18d49d7ad77f1a97b9697b3761802de5b82983d Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Tue, 26 Nov 2013 17:45:25 +0000 Subject: mips: don't hardcode Malta env baudrate The baudrate passed to Linux in the environment was hardcoded at 38400. Instead pass the correct baudrate from global data, allowing Linux to correctly inherit the baudrate used by U-boot when console setup is not explicitly specified. Signed-off-by: Paul Burton --- arch/mips/lib/bootm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c index 1febf29..71bb0d2 100644 --- a/arch/mips/lib/bootm.c +++ b/arch/mips/lib/bootm.c @@ -196,8 +196,10 @@ static void boot_prep_linux(bootm_headers_t *images) if (cp) linux_env_set("eth1addr", cp); - if (mips_boot_malta) - linux_env_set("modetty0", "38400n8r"); + if (mips_boot_malta) { + sprintf(env_buf, "%un8r", gd->baudrate); + linux_env_set("modetty0", env_buf); + } } static void boot_jump_linux(bootm_headers_t *images) -- cgit v1.1 From bea12b782337105feeb3aeb0875d110eed007803 Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Tue, 26 Nov 2013 17:45:27 +0000 Subject: malta: enable PIIX4 SERIRQ Whilst U-boot does not require this itself, Linux currently relies upon it having been muxed and enabled by the bootloader. Thus in order to preserve compatibility with current kernels before a fix is merged in Linux we will enable the SERIRQ interrupt and mux it to its pin. Without doing this current kernels will never receive serial port interrupts and the end result is typically that userland appears to hang. Signed-off-by: Paul Burton --- arch/mips/include/asm/malta.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch') diff --git a/arch/mips/include/asm/malta.h b/arch/mips/include/asm/malta.h index bd9043d..9e7c045 100644 --- a/arch/mips/include/asm/malta.h +++ b/arch/mips/include/asm/malta.h @@ -56,5 +56,12 @@ #define PCI_CFG_PIIX4_PIRQRCB 0x61 #define PCI_CFG_PIIX4_PIRQRCC 0x62 #define PCI_CFG_PIIX4_PIRQRCD 0x63 +#define PCI_CFG_PIIX4_SERIRQC 0x64 +#define PCI_CFG_PIIX4_GENCFG 0xb0 + +#define PCI_CFG_PIIX4_SERIRQC_EN (1 << 7) +#define PCI_CFG_PIIX4_SERIRQC_CONT (1 << 6) + +#define PCI_CFG_PIIX4_GENCFG_SERIRQ (1 << 16) #endif /* _MIPS_ASM_MALTA_H */ -- cgit v1.1