Skip to content

Commit a579e94

Browse files
committed
Merge tag 'mips_fixes_4.14_2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips
Pull MIPS fixes from James Hogan: "A final few MIPS fixes for 4.14: - fix BMIPS NULL pointer dereference (4.7) - fix AR7 early GPIO init allocation failure (3.19) - fix dead serial output on certain AR7 platforms (2.6.35)" * tag 'mips_fixes_4.14_2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips: MIPS: AR7: Ensure that serial ports are properly set up MIPS: AR7: Defer registration of GPIO MIPS: BMIPS: Fix missing cbr address
2 parents 085c17f + b084116 commit a579e94

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

arch/mips/ar7/platform.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ static int __init ar7_register_uarts(void)
575575
uart_port.type = PORT_AR7;
576576
uart_port.uartclk = clk_get_rate(bus_clk) / 2;
577577
uart_port.iotype = UPIO_MEM32;
578+
uart_port.flags = UPF_FIXED_TYPE;
578579
uart_port.regshift = 2;
579580

580581
uart_port.line = 0;
@@ -653,6 +654,10 @@ static int __init ar7_register_devices(void)
653654
u32 val;
654655
int res;
655656

657+
res = ar7_gpio_init();
658+
if (res)
659+
pr_warn("unable to register gpios: %d\n", res);
660+
656661
res = ar7_register_uarts();
657662
if (res)
658663
pr_err("unable to setup uart(s): %d\n", res);

arch/mips/ar7/prom.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,6 @@ void __init prom_init(void)
246246
ar7_init_cmdline(fw_arg0, (char **)fw_arg1);
247247
ar7_init_env((struct env_var *)fw_arg2);
248248
console_config();
249-
250-
ar7_gpio_init();
251249
}
252250

253251
#define PORT(offset) (KSEG1ADDR(AR7_REGS_UART0 + (offset * 4)))

arch/mips/kernel/smp-bmips.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,11 +591,11 @@ void __init bmips_cpu_setup(void)
591591

592592
/* Flush and enable RAC */
593593
cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
594-
__raw_writel(cfg | 0x100, BMIPS_RAC_CONFIG);
594+
__raw_writel(cfg | 0x100, cbr + BMIPS_RAC_CONFIG);
595595
__raw_readl(cbr + BMIPS_RAC_CONFIG);
596596

597597
cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
598-
__raw_writel(cfg | 0xf, BMIPS_RAC_CONFIG);
598+
__raw_writel(cfg | 0xf, cbr + BMIPS_RAC_CONFIG);
599599
__raw_readl(cbr + BMIPS_RAC_CONFIG);
600600

601601
cfg = __raw_readl(cbr + BMIPS_RAC_ADDRESS_RANGE);

0 commit comments

Comments
 (0)