blob: ce71408781a0d2d98b099bea3f507fe4345c546c [file] [log] [blame]
John Rigbyfb180322008-07-09 14:54:03 -06001/*
2 * Copyright (C) 2007,2008 Freescale Semiconductor, Inc. All rights reserved.
3 *
4 * Author: John Rigby, <jrigby@freescale.com>
5 *
6 * Description:
Matteo Facchinettib9e71962013-03-20 07:41:52 +00007 * MPC512x SoC setup
John Rigbyfb180322008-07-09 14:54:03 -06008 *
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.
13 *
14 */
15
16#include <linux/kernel.h>
17#include <linux/of_platform.h>
18
19#include <asm/machdep.h>
20#include <asm/ipic.h>
21#include <asm/prom.h>
22#include <asm/time.h>
23
24#include "mpc512x.h"
25
26/*
27 * list of supported boards
28 */
Andi Kleen9597abe2012-10-04 17:11:37 -070029static const char * const board[] __initconst = {
John Rigbyfb180322008-07-09 14:54:03 -060030 "prt,prtlvt",
Matteo Facchinettia9b6aae2013-04-04 03:57:30 +000031 "fsl,mpc5125ads",
Anatolij Gustschinfdeaf0e2013-04-10 20:46:27 +020032 "ifm,ac14xx",
John Rigbyfb180322008-07-09 14:54:03 -060033 NULL
34};
35
36/*
37 * Called very early, MMU is off, device-tree isn't unflattened
38 */
Matteo Facchinettib9e71962013-03-20 07:41:52 +000039static int __init mpc512x_generic_probe(void)
John Rigbyfb180322008-07-09 14:54:03 -060040{
Grant Likelya4f740c2010-10-30 11:49:09 -040041 return of_flat_dt_match(of_get_flat_dt_root(), board);
John Rigbyfb180322008-07-09 14:54:03 -060042}
43
Matteo Facchinettib9e71962013-03-20 07:41:52 +000044define_machine(mpc512x_generic) {
45 .name = "MPC512x generic",
46 .probe = mpc512x_generic_probe,
Anatolij Gustschin284ed662010-02-16 10:35:13 -070047 .init = mpc512x_init,
Gerhard Sittig2abbbb62013-05-14 04:40:53 +000048 .init_early = mpc512x_init_early,
49 .setup_arch = mpc512x_setup_arch,
John Rigbyfb180322008-07-09 14:54:03 -060050 .init_IRQ = mpc512x_init_IRQ,
51 .get_irq = ipic_get_irq,
52 .calibrate_decr = generic_calibrate_decr,
Anatolij Gustschina8dbceb72010-02-16 10:36:26 -070053 .restart = mpc512x_restart,
John Rigbyfb180322008-07-09 14:54:03 -060054};