ebony.c 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Ebony board specific routines
  4. *
  5. * Matt Porter <[email protected]>
  6. * Copyright 2002-2005 MontaVista Software Inc.
  7. *
  8. * Eugene Surovegin <[email protected]> or <[email protected]>
  9. * Copyright (c) 2003-2005 Zultys Technologies
  10. *
  11. * Rewritten and ported to the merged powerpc tree:
  12. * Copyright 2007 David Gibson <[email protected]>, IBM Corporation.
  13. */
  14. #include <linux/init.h>
  15. #include <linux/of_platform.h>
  16. #include <linux/rtc.h>
  17. #include <asm/machdep.h>
  18. #include <asm/prom.h>
  19. #include <asm/udbg.h>
  20. #include <asm/time.h>
  21. #include <asm/uic.h>
  22. #include <asm/pci-bridge.h>
  23. #include <asm/ppc4xx.h>
  24. static const struct of_device_id ebony_of_bus[] __initconst = {
  25. { .compatible = "ibm,plb4", },
  26. { .compatible = "ibm,opb", },
  27. { .compatible = "ibm,ebc", },
  28. {},
  29. };
  30. static int __init ebony_device_probe(void)
  31. {
  32. of_platform_bus_probe(NULL, ebony_of_bus, NULL);
  33. of_instantiate_rtc();
  34. return 0;
  35. }
  36. machine_device_initcall(ebony, ebony_device_probe);
  37. /*
  38. * Called very early, MMU is off, device-tree isn't unflattened
  39. */
  40. static int __init ebony_probe(void)
  41. {
  42. if (!of_machine_is_compatible("ibm,ebony"))
  43. return 0;
  44. pci_set_flags(PCI_REASSIGN_ALL_RSRC);
  45. return 1;
  46. }
  47. define_machine(ebony) {
  48. .name = "Ebony",
  49. .probe = ebony_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. };