mpc512x_generic.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (C) 2007,2008 Freescale Semiconductor, Inc. All rights reserved.
  3. *
  4. * Author: John Rigby, <jrigby@freescale.com>
  5. *
  6. * Description:
  7. * MPC512x 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. #include <linux/kernel.h>
  16. #include <linux/of_platform.h>
  17. #include <asm/machdep.h>
  18. #include <asm/ipic.h>
  19. #include <asm/prom.h>
  20. #include <asm/time.h>
  21. #include "mpc512x.h"
  22. /*
  23. * list of supported boards
  24. */
  25. static const char * const board[] __initconst = {
  26. "prt,prtlvt",
  27. "fsl,mpc5125ads",
  28. "ifm,ac14xx",
  29. NULL
  30. };
  31. /*
  32. * Called very early, MMU is off, device-tree isn't unflattened
  33. */
  34. static int __init mpc512x_generic_probe(void)
  35. {
  36. if (!of_device_compatible_match(of_root, board))
  37. return 0;
  38. mpc512x_init_early();
  39. return 1;
  40. }
  41. define_machine(mpc512x_generic) {
  42. .name = "MPC512x generic",
  43. .probe = mpc512x_generic_probe,
  44. .init = mpc512x_init,
  45. .setup_arch = mpc512x_setup_arch,
  46. .init_IRQ = mpc512x_init_IRQ,
  47. .get_irq = ipic_get_irq,
  48. .calibrate_decr = generic_calibrate_decr,
  49. .restart = mpc512x_restart,
  50. };