OMAP3: PM: Ensure MUSB block can idle when driver not loaded
[linux-ginger.git] / arch / powerpc / platforms / 512x / mpc5121_ads.c
blob441abc488851c9f95bf6b674b7198041bf2cd79f
1 /*
2 * Copyright (C) 2007, 2008 Freescale Semiconductor, Inc. All rights reserved.
4 * Author: John Rigby, <jrigby@freescale.com>, Thur Mar 29 2007
6 * Description:
7 * MPC5121 ADS board setup
9 * This is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
16 #include <linux/kernel.h>
17 #include <linux/io.h>
18 #include <linux/of_platform.h>
20 #include <asm/machdep.h>
21 #include <asm/ipic.h>
22 #include <asm/prom.h>
23 #include <asm/time.h>
25 #include <sysdev/fsl_pci.h>
27 #include "mpc512x.h"
28 #include "mpc5121_ads.h"
30 static void __init mpc5121_ads_setup_arch(void)
32 #ifdef CONFIG_PCI
33 struct device_node *np;
34 #endif
35 printk(KERN_INFO "MPC5121 ADS board from Freescale Semiconductor\n");
37 * cpld regs are needed early
39 mpc5121_ads_cpld_map();
41 #ifdef CONFIG_PCI
42 for_each_compatible_node(np, "pci", "fsl,mpc5121-pci")
43 mpc83xx_add_bridge(np);
44 #endif
47 static void __init mpc5121_ads_init_IRQ(void)
49 mpc512x_init_IRQ();
50 mpc5121_ads_cpld_pic_init();
54 * Called very early, MMU is off, device-tree isn't unflattened
56 static int __init mpc5121_ads_probe(void)
58 unsigned long root = of_get_flat_dt_root();
60 return of_flat_dt_is_compatible(root, "fsl,mpc5121ads");
63 define_machine(mpc5121_ads) {
64 .name = "MPC5121 ADS",
65 .probe = mpc5121_ads_probe,
66 .setup_arch = mpc5121_ads_setup_arch,
67 .init = mpc512x_declare_of_platform_devices,
68 .init_IRQ = mpc5121_ads_init_IRQ,
69 .get_irq = ipic_get_irq,
70 .calibrate_decr = generic_calibrate_decr,