• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/arch/powerpc/platforms/512x/
1/*
2 * Copyright (C) 2007,2008 Freescale Semiconductor, Inc. All rights reserved.
3 *
4 * Author: John Rigby, <jrigby@freescale.com>
5 *
6 * Description:
7 * MPC5121 SoC setup
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 */
29static char *board[] __initdata = {
30	"prt,prtlvt",
31	NULL
32};
33
34/*
35 * Called very early, MMU is off, device-tree isn't unflattened
36 */
37static int __init mpc5121_generic_probe(void)
38{
39	unsigned long node = of_get_flat_dt_root();
40	int i = 0;
41
42	while (board[i]) {
43		if (of_flat_dt_is_compatible(node, board[i]))
44			break;
45		i++;
46	}
47
48	return board[i] != NULL;
49}
50
51define_machine(mpc5121_generic) {
52	.name			= "MPC5121 generic",
53	.probe			= mpc5121_generic_probe,
54	.init			= mpc512x_init,
55	.init_early		= mpc512x_init_diu,
56	.setup_arch		= mpc512x_setup_diu,
57	.init_IRQ		= mpc512x_init_IRQ,
58	.get_irq		= ipic_get_irq,
59	.calibrate_decr		= generic_calibrate_decr,
60	.restart		= mpc512x_restart,
61};
62