Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
corenet_ds.c
Go to the documentation of this file.
1 /*
2  * Corenet based SoC DS Setup
3  *
4  * Maintained by Kumar Gala (see MAINTAINERS for contact information)
5  *
6  * Copyright 2009-2011 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/time.h>
21 #include <asm/machdep.h>
22 #include <asm/pci-bridge.h>
23 #include <asm/ppc-pci.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 #include "smp.h"
33 
35 {
36  struct mpic *mpic;
37  unsigned int flags = MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU |
38  MPIC_NO_RESET;
39 
40  if (ppc_md.get_irq == mpic_get_coreint_irq)
41  flags |= MPIC_ENABLE_COREINT;
42 
43  mpic = mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC ");
44  BUG_ON(mpic == NULL);
45 
46  mpic_init(mpic);
47 }
48 
49 /*
50  * Setup the architecture
51  */
53 {
55 
56 #if defined(CONFIG_PCI) && defined(CONFIG_PPC64)
58 #endif
59 
60  fsl_pci_assign_primary();
61 
63 
64  pr_info("%s board from Freescale Semiconductor\n", ppc_md.name);
65 }
66 
67 static const struct of_device_id of_device_ids[] __devinitconst = {
68  {
69  .compatible = "simple-bus"
70  },
71  {
72  .compatible = "fsl,srio",
73  },
74  {
75  .compatible = "fsl,p4080-pcie",
76  },
77  {
78  .compatible = "fsl,qoriq-pcie-v2.2",
79  },
80  {
81  .compatible = "fsl,qoriq-pcie-v2.3",
82  },
83  {
84  .compatible = "fsl,qoriq-pcie-v2.4",
85  },
86  /* The following two are for the Freescale hypervisor */
87  {
88  .name = "hypervisor",
89  },
90  {
91  .name = "handles",
92  },
93  {}
94 };
95 
97 {
98  return of_platform_bus_probe(NULL, of_device_ids, NULL);
99 }