ebony.c 1.7 KB

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