2008-01-28 17:28:53 +00:00
|
|
|
/*
|
2008-07-09 20:54:03 +00:00
|
|
|
* Copyright (C) 2007, 2008 Freescale Semiconductor, Inc. All rights reserved.
|
2008-01-28 17:28:53 +00:00
|
|
|
*
|
|
|
|
* Author: John Rigby, <jrigby@freescale.com>, Thur Mar 29 2007
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* MPC5121 ADS board setup
|
|
|
|
*
|
|
|
|
* This is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/io.h>
|
|
|
|
#include <linux/of_platform.h>
|
|
|
|
|
|
|
|
#include <asm/machdep.h>
|
|
|
|
#include <asm/ipic.h>
|
|
|
|
#include <asm/prom.h>
|
|
|
|
#include <asm/time.h>
|
|
|
|
|
2008-10-07 21:13:18 +00:00
|
|
|
#include <sysdev/fsl_pci.h>
|
|
|
|
|
2008-07-09 20:54:03 +00:00
|
|
|
#include "mpc512x.h"
|
2008-07-09 20:54:04 +00:00
|
|
|
#include "mpc5121_ads.h"
|
|
|
|
|
|
|
|
static void __init mpc5121_ads_setup_arch(void)
|
|
|
|
{
|
2008-10-07 21:13:18 +00:00
|
|
|
#ifdef CONFIG_PCI
|
|
|
|
struct device_node *np;
|
|
|
|
#endif
|
2008-07-09 20:54:04 +00:00
|
|
|
printk(KERN_INFO "MPC5121 ADS board from Freescale Semiconductor\n");
|
|
|
|
/*
|
|
|
|
* cpld regs are needed early
|
|
|
|
*/
|
|
|
|
mpc5121_ads_cpld_map();
|
2008-10-07 21:13:18 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_PCI
|
|
|
|
for_each_compatible_node(np, "pci", "fsl,mpc5121-pci")
|
|
|
|
mpc83xx_add_bridge(np);
|
|
|
|
#endif
|
2012-10-15 09:52:20 +00:00
|
|
|
|
2013-05-14 04:40:53 +00:00
|
|
|
mpc512x_setup_arch();
|
2008-07-09 20:54:04 +00:00
|
|
|
}
|
2008-01-28 17:28:53 +00:00
|
|
|
|
|
|
|
static void __init mpc5121_ads_init_IRQ(void)
|
|
|
|
{
|
2008-07-09 20:54:03 +00:00
|
|
|
mpc512x_init_IRQ();
|
2008-07-09 20:54:04 +00:00
|
|
|
mpc5121_ads_cpld_pic_init();
|
2008-01-28 17:28:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Called very early, MMU is off, device-tree isn't unflattened
|
|
|
|
*/
|
|
|
|
static int __init mpc5121_ads_probe(void)
|
|
|
|
{
|
2016-07-05 05:04:06 +00:00
|
|
|
if (!of_machine_is_compatible("fsl,mpc5121ads"))
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
mpc512x_init_early();
|
|
|
|
|
|
|
|
return 1;
|
2008-01-28 17:28:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
define_machine(mpc5121_ads) {
|
|
|
|
.name = "MPC5121 ADS",
|
|
|
|
.probe = mpc5121_ads_probe,
|
2008-07-09 20:54:03 +00:00
|
|
|
.setup_arch = mpc5121_ads_setup_arch,
|
2010-02-16 17:35:13 +00:00
|
|
|
.init = mpc512x_init,
|
2008-01-28 17:28:53 +00:00
|
|
|
.init_IRQ = mpc5121_ads_init_IRQ,
|
|
|
|
.get_irq = ipic_get_irq,
|
|
|
|
.calibrate_decr = generic_calibrate_decr,
|
2010-02-16 17:36:26 +00:00
|
|
|
.restart = mpc512x_restart,
|
2008-01-28 17:28:53 +00:00
|
|
|
};
|