taishan.c 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Taishan board specific routines based off ebony.c code
  3. * original copyrights below
  4. *
  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. * Modified from ebony.c for taishan:
  15. * Copyright 2007 Hugh Blemings <hugh@au.ibm.com>, IBM Corporation.
  16. *
  17. * This program is free software; you can redistribute it and/or modify it
  18. * under the terms of the GNU General Public License as published by the
  19. * Free Software Foundation; either version 2 of the License, or (at your
  20. * option) any later version.
  21. */
  22. #include <linux/init.h>
  23. #include <linux/of_platform.h>
  24. #include <asm/machdep.h>
  25. #include <asm/prom.h>
  26. #include <asm/udbg.h>
  27. #include <asm/time.h>
  28. #include <asm/uic.h>
  29. #include <asm/pci-bridge.h>
  30. #include <asm/ppc4xx.h>
  31. static __initdata struct of_device_id taishan_of_bus[] = {
  32. { .compatible = "ibm,plb4", },
  33. { .compatible = "ibm,opb", },
  34. { .compatible = "ibm,ebc", },
  35. {},
  36. };
  37. static int __init taishan_device_probe(void)
  38. {
  39. of_platform_bus_probe(NULL, taishan_of_bus, NULL);
  40. return 0;
  41. }
  42. machine_device_initcall(taishan, taishan_device_probe);
  43. /*
  44. * Called very early, MMU is off, device-tree isn't unflattened
  45. */
  46. static int __init taishan_probe(void)
  47. {
  48. unsigned long root = of_get_flat_dt_root();
  49. if (!of_flat_dt_is_compatible(root, "amcc,taishan"))
  50. return 0;
  51. ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
  52. return 1;
  53. }
  54. define_machine(taishan) {
  55. .name = "Taishan",
  56. .probe = taishan_probe,
  57. .progress = udbg_progress,
  58. .init_IRQ = uic_init_tree,
  59. .get_irq = uic_get_irq,
  60. .restart = ppc4xx_reset_system,
  61. .calibrate_decr = generic_calibrate_decr,
  62. };