Path: blob/master/arch/mips/pnx833x/common/setup.c
10818 views
/*1* setup.c: Setup PNX833X Soc.2*3* Copyright 2008 NXP Semiconductors4* Chris Steel <[email protected]>5* Daniel Laird <[email protected]>6*7* Based on software written by:8* Nikita Youshchenko <[email protected]>, based on PNX8550 code.9*10* This program is free software; you can redistribute it and/or modify11* it under the terms of the GNU General Public License as published by12* the Free Software Foundation; either version 2 of the License, or13* (at your option) any later version.14*15* This program is distributed in the hope that it will be useful,16* but WITHOUT ANY WARRANTY; without even the implied warranty of17* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the18* GNU General Public License for more details.19*20* You should have received a copy of the GNU General Public License21* along with this program; if not, write to the Free Software22* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.23*/24#include <linux/init.h>25#include <linux/interrupt.h>26#include <linux/ioport.h>27#include <linux/io.h>28#include <linux/pci.h>29#include <asm/reboot.h>30#include <pnx833x.h>31#include <gpio.h>3233extern void pnx833x_board_setup(void);34extern void pnx833x_machine_restart(char *);35extern void pnx833x_machine_halt(void);36extern void pnx833x_machine_power_off(void);3738int __init plat_mem_setup(void)39{40/* fake pci bus to avoid bounce buffers */41PCI_DMA_BUS_IS_PHYS = 1;4243/* set mips clock to 320MHz */44#if defined(CONFIG_SOC_PNX8335)45PNX8335_WRITEFIELD(0x17, CLOCK_PLL_CPU_CTL, FREQ);46#endif47pnx833x_gpio_init(); /* so it will be ready in board_setup() */4849pnx833x_board_setup();5051_machine_restart = pnx833x_machine_restart;52_machine_halt = pnx833x_machine_halt;53pm_power_off = pnx833x_machine_power_off;5455/* IO/MEM resources. */56set_io_port_base(KSEG1);57ioport_resource.start = 0;58ioport_resource.end = ~0;59iomem_resource.start = 0;60iomem_resource.end = ~0;6162return 0;63}646566