Path: blob/master/arch/powerpc/platforms/85xx/p4080_ds.c
10820 views
/*1* P4080 DS Setup2*3* Maintained by Kumar Gala (see MAINTAINERS for contact information)4*5* Copyright 2009 Freescale Semiconductor Inc.6*7* This program is free software; you can redistribute it and/or modify it8* under the terms of the GNU General Public License as published by the9* Free Software Foundation; either version 2 of the License, or (at your10* option) any later version.11*/1213#include <linux/kernel.h>14#include <linux/pci.h>15#include <linux/kdev_t.h>16#include <linux/delay.h>17#include <linux/interrupt.h>1819#include <asm/system.h>20#include <asm/time.h>21#include <asm/machdep.h>22#include <asm/pci-bridge.h>23#include <mm/mmu_decl.h>24#include <asm/prom.h>25#include <asm/udbg.h>26#include <asm/mpic.h>2728#include <linux/of_platform.h>29#include <sysdev/fsl_soc.h>30#include <sysdev/fsl_pci.h>3132#include "corenet_ds.h"3334#ifdef CONFIG_PCI35static int primary_phb_addr;36#endif3738/*39* Called very early, device-tree isn't unflattened40*/41static int __init p4080_ds_probe(void)42{43unsigned long root = of_get_flat_dt_root();4445if (of_flat_dt_is_compatible(root, "fsl,P4080DS")) {46#ifdef CONFIG_PCI47/* treat PCIe1 as primary,48* shouldn't matter as we have no ISA on the board49*/50primary_phb_addr = 0x0000;51#endif52return 1;53} else {54return 0;55}56}5758define_machine(p4080_ds) {59.name = "P4080 DS",60.probe = p4080_ds_probe,61.setup_arch = corenet_ds_setup_arch,62.init_IRQ = corenet_ds_pic_init,63#ifdef CONFIG_PCI64.pcibios_fixup_bus = fsl_pcibios_fixup_bus,65#endif66.get_irq = mpic_get_coreint_irq,67.restart = fsl_rstcr_restart,68.calibrate_decr = generic_calibrate_decr,69.progress = udbg_progress,70};7172machine_device_initcall(p4080_ds, corenet_ds_publish_devices);73machine_arch_initcall(p4080_ds, swiotlb_setup_bus_notifier);747576