setup.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. #include <linux/init.h>
  2. #include <linux/platform_device.h>
  3. #include <asm/machvec.h>
  4. #include <asm/mach/se7343.h>
  5. #include <asm/irq.h>
  6. void init_7343se_IRQ(void);
  7. static struct resource smc91x_resources[] = {
  8. [0] = {
  9. .start = 0x10000000,
  10. .end = 0x1000000F,
  11. .flags = IORESOURCE_MEM,
  12. },
  13. [1] = {
  14. /*
  15. * shared with other devices via externel
  16. * interrupt controller in FPGA...
  17. */
  18. .start = EXT_IRQ2,
  19. .end = EXT_IRQ2,
  20. .flags = IORESOURCE_IRQ,
  21. },
  22. };
  23. static struct platform_device smc91x_device = {
  24. .name = "smc91x",
  25. .id = 0,
  26. .num_resources = ARRAY_SIZE(smc91x_resources),
  27. .resource = smc91x_resources,
  28. };
  29. static struct resource heartbeat_resources[] = {
  30. [0] = {
  31. .start = PA_LED,
  32. .end = PA_LED + 8 - 1,
  33. .flags = IORESOURCE_MEM,
  34. },
  35. };
  36. static struct platform_device heartbeat_device = {
  37. .name = "heartbeat",
  38. .id = -1,
  39. .num_resources = ARRAY_SIZE(heartbeat_resources),
  40. .resource = heartbeat_resources,
  41. };
  42. static struct platform_device *sh7343se_platform_devices[] __initdata = {
  43. &smc91x_device,
  44. &heartbeat_device,
  45. };
  46. static int __init sh7343se_devices_setup(void)
  47. {
  48. return platform_add_devices(sh7343se_platform_devices,
  49. ARRAY_SIZE(sh7343se_platform_devices));
  50. }
  51. static void __init sh7343se_setup(char **cmdline_p)
  52. {
  53. device_initcall(sh7343se_devices_setup);
  54. }
  55. /*
  56. * The Machine Vector
  57. */
  58. struct sh_machine_vector mv_7343se __initmv = {
  59. .mv_name = "SolutionEngine 7343",
  60. .mv_setup = sh7343se_setup,
  61. .mv_nr_irqs = 108,
  62. .mv_inb = sh7343se_inb,
  63. .mv_inw = sh7343se_inw,
  64. .mv_inl = sh7343se_inl,
  65. .mv_outb = sh7343se_outb,
  66. .mv_outw = sh7343se_outw,
  67. .mv_outl = sh7343se_outl,
  68. .mv_inb_p = sh7343se_inb_p,
  69. .mv_inw_p = sh7343se_inw,
  70. .mv_inl_p = sh7343se_inl,
  71. .mv_outb_p = sh7343se_outb_p,
  72. .mv_outw_p = sh7343se_outw,
  73. .mv_outl_p = sh7343se_outl,
  74. .mv_insb = sh7343se_insb,
  75. .mv_insw = sh7343se_insw,
  76. .mv_insl = sh7343se_insl,
  77. .mv_outsb = sh7343se_outsb,
  78. .mv_outsw = sh7343se_outsw,
  79. .mv_outsl = sh7343se_outsl,
  80. .mv_init_irq = init_7343se_IRQ,
  81. .mv_irq_demux = shmse_irq_demux,
  82. };
  83. ALIAS_MV(7343se)