hcu4.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Architecture- / platform-specific boot-time initialization code for
  3. * IBM PowerPC 4xx based boards. Adapted from original
  4. * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek
  5. * <dan@net4x.com>.
  6. *
  7. * Copyright(c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
  8. *
  9. * Rewritten and ported to the merged powerpc tree:
  10. * Copyright 2007 IBM Corporation
  11. * Josh Boyer <jwboyer@linux.vnet.ibm.com>
  12. *
  13. * 2002 (c) MontaVista, Software, Inc. This file is licensed under
  14. * the terms of the GNU General Public License version 2. This program
  15. * is licensed "as is" without any warranty of any kind, whether express
  16. * or implied.
  17. */
  18. #include <linux/init.h>
  19. #include <linux/of_platform.h>
  20. #include <asm/machdep.h>
  21. #include <asm/prom.h>
  22. #include <asm/udbg.h>
  23. #include <asm/time.h>
  24. #include <asm/uic.h>
  25. #include <asm/ppc4xx.h>
  26. static __initdata struct of_device_id hcu4_of_bus[] = {
  27. { .compatible = "ibm,plb3", },
  28. { .compatible = "ibm,opb", },
  29. { .compatible = "ibm,ebc", },
  30. {},
  31. };
  32. static int __init hcu4_device_probe(void)
  33. {
  34. of_platform_bus_probe(NULL, hcu4_of_bus, NULL);
  35. return 0;
  36. }
  37. machine_device_initcall(hcu4, hcu4_device_probe);
  38. static int __init hcu4_probe(void)
  39. {
  40. unsigned long root = of_get_flat_dt_root();
  41. if (!of_flat_dt_is_compatible(root, "netstal,hcu4"))
  42. return 0;
  43. return 1;
  44. }
  45. define_machine(hcu4) {
  46. .name = "HCU4",
  47. .probe = hcu4_probe,
  48. .progress = udbg_progress,
  49. .init_IRQ = uic_init_tree,
  50. .get_irq = uic_get_irq,
  51. .restart = ppc4xx_reset_system,
  52. .calibrate_decr = generic_calibrate_decr,
  53. };