1 // SPDX-License-Identifier: GPL-2.0-or-later
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>
16 #include <linux/pci.h>
17 #include <asm/reboot.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
);
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;