setup.c 1.8 KB

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