Path: blob/master/arch/powerpc/platforms/85xx/ppa8548.c
26481 views
// SPDX-License-Identifier: GPL-2.0-or-later1/*2* ppa8548 setup and early boot code.3*4* Copyright 2009 Prodrive B.V..5*6* By Stef van Os (see MAINTAINERS for contact information)7*8* Based on the SBC8548 support - Copyright 2007 Wind River Systems Inc.9* Based on the MPC8548CDS support - Copyright 2005 Freescale Inc.10*/1112#include <linux/stddef.h>13#include <linux/kernel.h>14#include <linux/init.h>15#include <linux/reboot.h>16#include <linux/seq_file.h>17#include <linux/of_fdt.h>18#include <linux/of_platform.h>1920#include <asm/machdep.h>21#include <asm/udbg.h>22#include <asm/mpic.h>2324#include <sysdev/fsl_soc.h>2526static void __init ppa8548_pic_init(void)27{28struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN,290, 256, " OpenPIC ");30BUG_ON(mpic == NULL);31mpic_init(mpic);32}3334/*35* Setup the architecture36*/37static void __init ppa8548_setup_arch(void)38{39if (ppc_md.progress)40ppc_md.progress("ppa8548_setup_arch()", 0);41}4243static void ppa8548_show_cpuinfo(struct seq_file *m)44{45uint32_t svid, phid1;4647svid = mfspr(SPRN_SVR);4849seq_printf(m, "Vendor\t\t: Prodrive B.V.\n");50seq_printf(m, "SVR\t\t: 0x%x\n", svid);5152/* Display cpu Pll setting */53phid1 = mfspr(SPRN_HID1);54seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));55}5657static const struct of_device_id of_bus_ids[] __initconst = {58{ .name = "soc", },59{ .type = "soc", },60{ .compatible = "simple-bus", },61{ .compatible = "gianfar", },62{ .compatible = "fsl,srio", },63{},64};6566static int __init declare_of_platform_devices(void)67{68of_platform_bus_probe(NULL, of_bus_ids, NULL);6970return 0;71}72machine_device_initcall(ppa8548, declare_of_platform_devices);7374define_machine(ppa8548) {75.name = "ppa8548",76.compatible = "ppa8548",77.setup_arch = ppa8548_setup_arch,78.init_IRQ = ppa8548_pic_init,79.show_cpuinfo = ppa8548_show_cpuinfo,80.get_irq = mpic_get_irq,81.progress = udbg_progress,82};838485