rio.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * RapidIO PPC32 support
  3. *
  4. * Copyright 2005 MontaVista Software, Inc.
  5. * Matt Porter <mporter@kernel.crashing.org>
  6. *
  7. * This program is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the
  9. * Free Software Foundation; either version 2 of the License, or (at your
  10. * option) any later version.
  11. */
  12. #include <linux/init.h>
  13. #include <linux/kernel.h>
  14. #include <linux/rio.h>
  15. #include <asm/rio.h>
  16. /**
  17. * platform_rio_init - Do platform specific RIO init
  18. *
  19. * Any platform specific initialization of RapdIO
  20. * hardware is done here as well as registration
  21. * of any active master ports in the system.
  22. */
  23. void __attribute__ ((weak))
  24. platform_rio_init(void)
  25. {
  26. printk(KERN_WARNING "RIO: No platform_rio_init() present\n");
  27. }
  28. /**
  29. * ppc_rio_init - Do PPC32 RIO init
  30. *
  31. * Calls platform-specific RIO init code and then calls
  32. * rio_init_mports() to initialize any master ports that
  33. * have been registered with the RIO subsystem.
  34. */
  35. static int __init ppc_rio_init(void)
  36. {
  37. printk(KERN_INFO "RIO: RapidIO init\n");
  38. /* Platform specific initialization */
  39. platform_rio_init();
  40. /* Enumerate all registered ports */
  41. rio_init_mports();
  42. return 0;
  43. }
  44. subsys_initcall(ppc_rio_init);