Path: blob/master/arch/powerpc/platforms/83xx/asp834x.c
10819 views
/*1* arch/powerpc/platforms/83xx/asp834x.c2*3* Analogue & Micro ASP8347 board specific routines4* clone of mpc834x_itx5*6* Copyright 2008 Codehermit7*8* Maintainer: Bryan O'Donoghue <[email protected]>9*10* This program is free software; you can redistribute it and/or modify it11* under the terms of the GNU General Public License as published by the12* Free Software Foundation; either version 2 of the License, or (at your13* option) any later version.14*/1516#include <linux/pci.h>17#include <linux/of_platform.h>1819#include <asm/time.h>20#include <asm/ipic.h>21#include <asm/udbg.h>2223#include "mpc83xx.h"2425/* ************************************************************************26*27* Setup the architecture28*29*/30static void __init asp834x_setup_arch(void)31{32if (ppc_md.progress)33ppc_md.progress("asp834x_setup_arch()", 0);3435mpc834x_usb_cfg();36}3738static void __init asp834x_init_IRQ(void)39{40struct device_node *np;4142np = of_find_node_by_type(NULL, "ipic");43if (!np)44return;4546ipic_init(np, 0);4748of_node_put(np);4950/* Initialize the default interrupt mapping priorities,51* in case the boot rom changed something on us.52*/53ipic_set_default_priority();54}5556static struct __initdata of_device_id asp8347_ids[] = {57{ .type = "soc", },58{ .compatible = "soc", },59{ .compatible = "simple-bus", },60{ .compatible = "gianfar", },61{},62};6364static int __init asp8347_declare_of_platform_devices(void)65{66of_platform_bus_probe(NULL, asp8347_ids, NULL);67return 0;68}69machine_device_initcall(asp834x, asp8347_declare_of_platform_devices);7071/*72* Called very early, MMU is off, device-tree isn't unflattened73*/74static int __init asp834x_probe(void)75{76unsigned long root = of_get_flat_dt_root();77return of_flat_dt_is_compatible(root, "analogue-and-micro,asp8347e");78}7980define_machine(asp834x) {81.name = "ASP8347E",82.probe = asp834x_probe,83.setup_arch = asp834x_setup_arch,84.init_IRQ = asp834x_init_IRQ,85.get_irq = ipic_get_irq,86.restart = mpc83xx_restart,87.time_init = mpc83xx_time_init,88.calibrate_decr = generic_calibrate_decr,89.progress = udbg_progress,90};919293