Skip to content

Commit

Permalink
Merge tag 'mips_fixes_4.14_2' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/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
  • Loading branch information
torvalds committed Nov 10, 2017
2 parents 085c17f + b084116 commit a579e94
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions arch/mips/ar7/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ static int __init ar7_register_uarts(void)
uart_port.type = PORT_AR7;
uart_port.uartclk = clk_get_rate(bus_clk) / 2;
uart_port.iotype = UPIO_MEM32;
uart_port.flags = UPF_FIXED_TYPE;
uart_port.regshift = 2;

uart_port.line = 0;
Expand Down Expand Up @@ -653,6 +654,10 @@ static int __init ar7_register_devices(void)
u32 val;
int res;

res = ar7_gpio_init();
if (res)
pr_warn("unable to register gpios: %d\n", res);

res = ar7_register_uarts();
if (res)
pr_err("unable to setup uart(s): %d\n", res);
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/ar7/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ void __init prom_init(void)
ar7_init_cmdline(fw_arg0, (char **)fw_arg1);
ar7_init_env((struct env_var *)fw_arg2);
console_config();

ar7_gpio_init();
}

#define PORT(offset) (KSEG1ADDR(AR7_REGS_UART0 + (offset * 4)))
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/kernel/smp-bmips.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,11 +591,11 @@ void __init bmips_cpu_setup(void)

/* Flush and enable RAC */
cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
__raw_writel(cfg | 0x100, BMIPS_RAC_CONFIG);
__raw_writel(cfg | 0x100, cbr + BMIPS_RAC_CONFIG);
__raw_readl(cbr + BMIPS_RAC_CONFIG);

cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
__raw_writel(cfg | 0xf, BMIPS_RAC_CONFIG);
__raw_writel(cfg | 0xf, cbr + BMIPS_RAC_CONFIG);
__raw_readl(cbr + BMIPS_RAC_CONFIG);

cfg = __raw_readl(cbr + BMIPS_RAC_ADDRESS_RANGE);
Expand Down

0 comments on commit a579e94

Please sign in to comment.