ebony.c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 <asm/machdep.h>
  20. #include <asm/prom.h>
  21. #include <asm/udbg.h>
  22. #include <asm/time.h>
  23. #include <asm/uic.h>
  24. #include <asm/of_platform.h>
  25. #include "44x.h"
  26. static struct of_device_id ebony_of_bus[] = {
  27. { .type = "ibm,plb", },
  28. { .type = "ibm,opb", },
  29. { .type = "ibm,ebc", },
  30. {},
  31. };
  32. static int __init ebony_device_probe(void)
  33. {
  34. if (!machine_is(ebony))
  35. return 0;
  36. of_platform_bus_probe(NULL, ebony_of_bus, NULL);
  37. return 0;
  38. }
  39. device_initcall(ebony_device_probe);
  40. /*
  41. * Called very early, MMU is off, device-tree isn't unflattened
  42. */
  43. static int __init ebony_probe(void)
  44. {
  45. unsigned long root = of_get_flat_dt_root();
  46. if (!of_flat_dt_is_compatible(root, "ibm,ebony"))
  47. return 0;
  48. return 1;
  49. }
  50. static void __init ebony_setup_arch(void)
  51. {
  52. }
  53. define_machine(ebony) {
  54. .name = "Ebony",
  55. .probe = ebony_probe,
  56. .setup_arch = ebony_setup_arch,
  57. .progress = udbg_progress,
  58. .init_IRQ = uic_init_tree,
  59. .get_irq = uic_get_irq,
  60. .restart = ppc44x_reset_system,
  61. .calibrate_decr = generic_calibrate_decr,
  62. };