John Rigby | fb18032 | 2008-07-09 14:54:03 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2007,2008 Freescale Semiconductor, Inc. All rights reserved. |
| 3 | * |
| 4 | * Author: John Rigby, <jrigby@freescale.com> |
| 5 | * |
| 6 | * Description: |
Matteo Facchinetti | b9e7196 | 2013-03-20 07:41:52 +0000 | [diff] [blame] | 7 | * MPC512x SoC setup |
John Rigby | fb18032 | 2008-07-09 14:54:03 -0600 | [diff] [blame] | 8 | * |
| 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 Kleen | 9597abe | 2012-10-04 17:11:37 -0700 | [diff] [blame] | 29 | static const char * const board[] __initconst = { |
John Rigby | fb18032 | 2008-07-09 14:54:03 -0600 | [diff] [blame] | 30 | "prt,prtlvt", |
Matteo Facchinetti | a9b6aae | 2013-04-04 03:57:30 +0000 | [diff] [blame] | 31 | "fsl,mpc5125ads", |
Anatolij Gustschin | fdeaf0e | 2013-04-10 20:46:27 +0200 | [diff] [blame] | 32 | "ifm,ac14xx", |
John Rigby | fb18032 | 2008-07-09 14:54:03 -0600 | [diff] [blame] | 33 | NULL |
| 34 | }; |
| 35 | |
| 36 | /* |
| 37 | * Called very early, MMU is off, device-tree isn't unflattened |
| 38 | */ |
Matteo Facchinetti | b9e7196 | 2013-03-20 07:41:52 +0000 | [diff] [blame] | 39 | static int __init mpc512x_generic_probe(void) |
John Rigby | fb18032 | 2008-07-09 14:54:03 -0600 | [diff] [blame] | 40 | { |
Grant Likely | a4f740c | 2010-10-30 11:49:09 -0400 | [diff] [blame] | 41 | return of_flat_dt_match(of_get_flat_dt_root(), board); |
John Rigby | fb18032 | 2008-07-09 14:54:03 -0600 | [diff] [blame] | 42 | } |
| 43 | |
Matteo Facchinetti | b9e7196 | 2013-03-20 07:41:52 +0000 | [diff] [blame] | 44 | define_machine(mpc512x_generic) { |
| 45 | .name = "MPC512x generic", |
| 46 | .probe = mpc512x_generic_probe, |
Anatolij Gustschin | 284ed66 | 2010-02-16 10:35:13 -0700 | [diff] [blame] | 47 | .init = mpc512x_init, |
Gerhard Sittig | 2abbbb6 | 2013-05-14 04:40:53 +0000 | [diff] [blame] | 48 | .init_early = mpc512x_init_early, |
| 49 | .setup_arch = mpc512x_setup_arch, |
John Rigby | fb18032 | 2008-07-09 14:54:03 -0600 | [diff] [blame] | 50 | .init_IRQ = mpc512x_init_IRQ, |
| 51 | .get_irq = ipic_get_irq, |
| 52 | .calibrate_decr = generic_calibrate_decr, |
Anatolij Gustschin | a8dbceb7 | 2010-02-16 10:36:26 -0700 | [diff] [blame] | 53 | .restart = mpc512x_restart, |
John Rigby | fb18032 | 2008-07-09 14:54:03 -0600 | [diff] [blame] | 54 | }; |