Full support for Ginger Console
[linux-ginger.git] / arch / powerpc / platforms / 83xx / asp834x.c
blobaa0d84d22585639bf5f42d22416305180450e844
1 /*
2 * arch/powerpc/platforms/83xx/asp834x.c
4 * Analogue & Micro ASP8347 board specific routines
5 * clone of mpc834x_itx
7 * Copyright 2008 Codehermit
9 * Maintainer: Bryan O'Donoghue <bodonoghue@codhermit.ie>
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
17 #include <linux/pci.h>
18 #include <linux/of_platform.h>
20 #include <asm/time.h>
21 #include <asm/ipic.h>
22 #include <asm/udbg.h>
24 #include "mpc83xx.h"
26 /* ************************************************************************
28 * Setup the architecture
31 static void __init asp834x_setup_arch(void)
33 if (ppc_md.progress)
34 ppc_md.progress("asp834x_setup_arch()", 0);
36 mpc834x_usb_cfg();
39 static void __init asp834x_init_IRQ(void)
41 struct device_node *np;
43 np = of_find_node_by_type(NULL, "ipic");
44 if (!np)
45 return;
47 ipic_init(np, 0);
49 of_node_put(np);
51 /* Initialize the default interrupt mapping priorities,
52 * in case the boot rom changed something on us.
54 ipic_set_default_priority();
57 static struct __initdata of_device_id asp8347_ids[] = {
58 { .type = "soc", },
59 { .compatible = "soc", },
60 { .compatible = "simple-bus", },
61 { .compatible = "gianfar", },
62 {},
65 static int __init asp8347_declare_of_platform_devices(void)
67 of_platform_bus_probe(NULL, asp8347_ids, NULL);
68 return 0;
70 machine_device_initcall(asp834x, asp8347_declare_of_platform_devices);
73 * Called very early, MMU is off, device-tree isn't unflattened
75 static int __init asp834x_probe(void)
77 unsigned long root = of_get_flat_dt_root();
78 return of_flat_dt_is_compatible(root, "analogue-and-micro,asp8347e");
81 define_machine(asp834x) {
82 .name = "ASP8347E",
83 .probe = asp834x_probe,
84 .setup_arch = asp834x_setup_arch,
85 .init_IRQ = asp834x_init_IRQ,
86 .get_irq = ipic_get_irq,
87 .restart = mpc83xx_restart,
88 .time_init = mpc83xx_time_init,
89 .calibrate_decr = generic_calibrate_decr,
90 .progress = udbg_progress,