Kumar Gala | ab2f489 | 2009-10-22 16:35:07 -0500 | [diff] [blame] | 1 | /* |
| 2 | * P4080 DS Setup |
| 3 | * |
| 4 | * Maintained by Kumar Gala (see MAINTAINERS for contact information) |
| 5 | * |
| 6 | * Copyright 2009 Freescale Semiconductor Inc. |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify it |
| 9 | * under the terms of the GNU General Public License as published by the |
| 10 | * Free Software Foundation; either version 2 of the License, or (at your |
| 11 | * option) any later version. |
| 12 | */ |
| 13 | |
| 14 | #include <linux/kernel.h> |
| 15 | #include <linux/pci.h> |
| 16 | #include <linux/kdev_t.h> |
| 17 | #include <linux/delay.h> |
| 18 | #include <linux/interrupt.h> |
| 19 | |
| 20 | #include <asm/system.h> |
| 21 | #include <asm/time.h> |
| 22 | #include <asm/machdep.h> |
| 23 | #include <asm/pci-bridge.h> |
| 24 | #include <mm/mmu_decl.h> |
| 25 | #include <asm/prom.h> |
| 26 | #include <asm/udbg.h> |
| 27 | #include <asm/mpic.h> |
| 28 | |
| 29 | #include <linux/of_platform.h> |
| 30 | #include <sysdev/fsl_soc.h> |
| 31 | #include <sysdev/fsl_pci.h> |
| 32 | |
| 33 | #include "corenet_ds.h" |
| 34 | |
Kumar Gala | ab2f489 | 2009-10-22 16:35:07 -0500 | [diff] [blame] | 35 | /* |
| 36 | * Called very early, device-tree isn't unflattened |
| 37 | */ |
| 38 | static int __init p4080_ds_probe(void) |
| 39 | { |
| 40 | unsigned long root = of_get_flat_dt_root(); |
| 41 | |
Kumar Gala | b9a4334 | 2011-05-09 15:08:57 -0500 | [diff] [blame^] | 42 | return of_flat_dt_is_compatible(root, "fsl,P4080DS"); |
Kumar Gala | ab2f489 | 2009-10-22 16:35:07 -0500 | [diff] [blame] | 43 | } |
| 44 | |
| 45 | define_machine(p4080_ds) { |
| 46 | .name = "P4080 DS", |
| 47 | .probe = p4080_ds_probe, |
| 48 | .setup_arch = corenet_ds_setup_arch, |
| 49 | .init_IRQ = corenet_ds_pic_init, |
| 50 | #ifdef CONFIG_PCI |
| 51 | .pcibios_fixup_bus = fsl_pcibios_fixup_bus, |
| 52 | #endif |
| 53 | .get_irq = mpic_get_coreint_irq, |
| 54 | .restart = fsl_rstcr_restart, |
| 55 | .calibrate_decr = generic_calibrate_decr, |
| 56 | .progress = udbg_progress, |
| 57 | }; |
| 58 | |
| 59 | machine_device_initcall(p4080_ds, corenet_ds_publish_devices); |
Kumar Gala | b9a4334 | 2011-05-09 15:08:57 -0500 | [diff] [blame^] | 60 | #ifdef CONFIG_SWIOTLB |
Kumar Gala | ab2f489 | 2009-10-22 16:35:07 -0500 | [diff] [blame] | 61 | machine_arch_initcall(p4080_ds, swiotlb_setup_bus_notifier); |
Kumar Gala | b9a4334 | 2011-05-09 15:08:57 -0500 | [diff] [blame^] | 62 | #endif |