setup.c 1.8 KB

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