fsp2.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * FSP-2 board specific routines
  3. *
  4. * Based on earlier code:
  5. * Matt Porter <mporter@kernel.crashing.org>
  6. * Copyright 2002-2005 MontaVista Software Inc.
  7. *
  8. * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
  9. * Copyright (c) 2003-2005 Zultys Technologies
  10. *
  11. * Rewritten and ported to the merged powerpc tree:
  12. * Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
  13. *
  14. * This program is free software; you can redistribute it and/or modify it
  15. * under the terms of the GNU General Public License as published by the
  16. * Free Software Foundation; either version 2 of the License, or (at your
  17. * option) any later version.
  18. */
  19. #include <linux/init.h>
  20. #include <linux/of_platform.h>
  21. #include <linux/rtc.h>
  22. #include <asm/machdep.h>
  23. #include <asm/prom.h>
  24. #include <asm/udbg.h>
  25. #include <asm/time.h>
  26. #include <asm/uic.h>
  27. #include <asm/ppc4xx.h>
  28. static __initdata struct of_device_id fsp2_of_bus[] = {
  29. { .compatible = "ibm,plb4", },
  30. { .compatible = "ibm,plb6", },
  31. { .compatible = "ibm,opb", },
  32. {},
  33. };
  34. static int __init fsp2_device_probe(void)
  35. {
  36. of_platform_bus_probe(NULL, fsp2_of_bus, NULL);
  37. return 0;
  38. }
  39. machine_device_initcall(fsp2, fsp2_device_probe);
  40. static int __init fsp2_probe(void)
  41. {
  42. unsigned long root = of_get_flat_dt_root();
  43. if (!of_flat_dt_is_compatible(root, "ibm,fsp2"))
  44. return 0;
  45. return 1;
  46. }
  47. define_machine(fsp2) {
  48. .name = "FSP-2",
  49. .probe = fsp2_probe,
  50. .progress = udbg_progress,
  51. .init_IRQ = uic_init_tree,
  52. .get_irq = uic_get_irq,
  53. .restart = ppc4xx_reset_system,
  54. .calibrate_decr = generic_calibrate_decr,
  55. };