setup.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. *
  3. * linux/arch/sh/boards/se/7206/setup.c
  4. *
  5. * Copyright (C) 2006 Yoshinori Sato
  6. *
  7. * Hitachi 7206 SolutionEngine Support.
  8. *
  9. */
  10. #include <linux/init.h>
  11. #include <linux/platform_device.h>
  12. #include <asm/se7206.h>
  13. #include <asm/io.h>
  14. #include <asm/machvec.h>
  15. static struct resource smc91x_resources[] = {
  16. [0] = {
  17. .start = 0x300,
  18. .end = 0x300 + 0x020 - 1,
  19. .flags = IORESOURCE_MEM,
  20. },
  21. [1] = {
  22. .start = 64,
  23. .end = 64,
  24. .flags = IORESOURCE_IRQ,
  25. },
  26. };
  27. static struct platform_device smc91x_device = {
  28. .name = "smc91x",
  29. .id = -1,
  30. .num_resources = ARRAY_SIZE(smc91x_resources),
  31. .resource = smc91x_resources,
  32. };
  33. static int __init se7206_devices_setup(void)
  34. {
  35. return platform_device_register(&smc91x_device);
  36. }
  37. __initcall(se7206_devices_setup);
  38. void heartbeat_se(void);
  39. /*
  40. * The Machine Vector
  41. */
  42. struct sh_machine_vector mv_se __initmv = {
  43. .mv_name = "SolutionEngine",
  44. .mv_nr_irqs = 256,
  45. .mv_inb = se7206_inb,
  46. .mv_inw = se7206_inw,
  47. .mv_inl = se7206_inl,
  48. .mv_outb = se7206_outb,
  49. .mv_outw = se7206_outw,
  50. .mv_outl = se7206_outl,
  51. .mv_inb_p = se7206_inb_p,
  52. .mv_inw_p = se7206_inw,
  53. .mv_inl_p = se7206_inl,
  54. .mv_outb_p = se7206_outb_p,
  55. .mv_outw_p = se7206_outw,
  56. .mv_outl_p = se7206_outl,
  57. .mv_insb = se7206_insb,
  58. .mv_insw = se7206_insw,
  59. .mv_insl = se7206_insl,
  60. .mv_outsb = se7206_outsb,
  61. .mv_outsw = se7206_outsw,
  62. .mv_outsl = se7206_outsl,
  63. .mv_init_irq = init_se7206_IRQ,
  64. #ifdef CONFIG_HEARTBEAT
  65. .mv_heartbeat = heartbeat_se,
  66. #endif
  67. };
  68. ALIAS_MV(se)