chroma.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright 2008-2011, IBM Corporation
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation; either version
  7. * 2 of the License, or (at your option) any later version.
  8. */
  9. #include <linux/delay.h>
  10. #include <linux/init.h>
  11. #include <linux/irq.h>
  12. #include <linux/kernel.h>
  13. #include <linux/mm.h>
  14. #include <linux/of.h>
  15. #include <linux/smp.h>
  16. #include <linux/time.h>
  17. #include <asm/machdep.h>
  18. #include <asm/system.h>
  19. #include <asm/udbg.h>
  20. #include "ics.h"
  21. #include "wsp.h"
  22. void __init chroma_setup_arch(void)
  23. {
  24. wsp_setup_arch();
  25. wsp_setup_h8();
  26. }
  27. static int __init chroma_probe(void)
  28. {
  29. unsigned long root = of_get_flat_dt_root();
  30. if (!of_flat_dt_is_compatible(root, "ibm,wsp-chroma"))
  31. return 0;
  32. return 1;
  33. }
  34. define_machine(chroma_md) {
  35. .name = "Chroma PCIe",
  36. .probe = chroma_probe,
  37. .setup_arch = chroma_setup_arch,
  38. .restart = wsp_h8_restart,
  39. .power_off = wsp_h8_power_off,
  40. .halt = wsp_halt,
  41. .calibrate_decr = generic_calibrate_decr,
  42. .init_IRQ = wsp_setup_irq,
  43. .progress = udbg_progress,
  44. .power_save = book3e_idle,
  45. };
  46. machine_arch_initcall(chroma_md, wsp_probe_devices);