treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / mips / pnx833x / common / setup.c
blobabf68d92ce4a73721fb54afadefb3c360cebe58a
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * setup.c: Setup PNX833X Soc.
5 * Copyright 2008 NXP Semiconductors
6 * Chris Steel <chris.steel@nxp.com>
7 * Daniel Laird <daniel.j.laird@nxp.com>
9 * Based on software written by:
10 * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code.
12 #include <linux/init.h>
13 #include <linux/interrupt.h>
14 #include <linux/ioport.h>
15 #include <linux/io.h>
16 #include <linux/pci.h>
17 #include <asm/reboot.h>
18 #include <pnx833x.h>
19 #include <gpio.h>
21 extern void pnx833x_board_setup(void);
22 extern void pnx833x_machine_restart(char *);
23 extern void pnx833x_machine_halt(void);
24 extern void pnx833x_machine_power_off(void);
26 int __init plat_mem_setup(void)
28 /* set mips clock to 320MHz */
29 #if defined(CONFIG_SOC_PNX8335)
30 PNX8335_WRITEFIELD(0x17, CLOCK_PLL_CPU_CTL, FREQ);
31 #endif
32 pnx833x_gpio_init(); /* so it will be ready in board_setup() */
34 pnx833x_board_setup();
36 _machine_restart = pnx833x_machine_restart;
37 _machine_halt = pnx833x_machine_halt;
38 pm_power_off = pnx833x_machine_power_off;
40 /* IO/MEM resources. */
41 set_io_port_base(KSEG1);
42 ioport_resource.start = 0;
43 ioport_resource.end = ~0;
44 iomem_resource.start = 0;
45 iomem_resource.end = ~0;
47 return 0;