setup.c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * linux/arch/sh/boards/se/7300/setup.c
  3. *
  4. * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp>
  5. *
  6. * SH-Mobile SolutionEngine 7300 Support.
  7. *
  8. */
  9. #include <linux/init.h>
  10. #include <linux/platform_device.h>
  11. #include <asm/machvec.h>
  12. #include <asm/se7300.h>
  13. void init_7300se_IRQ(void);
  14. static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 };
  15. static struct resource heartbeat_resources[] = {
  16. [0] = {
  17. .start = PA_LED,
  18. .end = PA_LED + ARRAY_SIZE(heartbeat_bit_pos) - 1,
  19. .flags = IORESOURCE_MEM,
  20. },
  21. };
  22. static struct platform_device heartbeat_device = {
  23. .name = "heartbeat",
  24. .id = -1,
  25. .dev = {
  26. .platform_data = heartbeat_bit_pos,
  27. },
  28. .num_resources = ARRAY_SIZE(heartbeat_resources),
  29. .resource = heartbeat_resources,
  30. };
  31. static struct platform_device *se7300_devices[] __initdata = {
  32. &heartbeat_device,
  33. };
  34. static int __init se7300_devices_setup(void)
  35. {
  36. return platform_add_devices(se7300_devices, ARRAY_SIZE(se7300_devices));
  37. }
  38. __initcall(se7300_devices_setup);
  39. /*
  40. * The Machine Vector
  41. */
  42. struct sh_machine_vector mv_7300se __initmv = {
  43. .mv_name = "SolutionEngine 7300",
  44. .mv_nr_irqs = 109,
  45. .mv_inb = sh7300se_inb,
  46. .mv_inw = sh7300se_inw,
  47. .mv_inl = sh7300se_inl,
  48. .mv_outb = sh7300se_outb,
  49. .mv_outw = sh7300se_outw,
  50. .mv_outl = sh7300se_outl,
  51. .mv_inb_p = sh7300se_inb_p,
  52. .mv_inw_p = sh7300se_inw,
  53. .mv_inl_p = sh7300se_inl,
  54. .mv_outb_p = sh7300se_outb_p,
  55. .mv_outw_p = sh7300se_outw,
  56. .mv_outl_p = sh7300se_outl,
  57. .mv_insb = sh7300se_insb,
  58. .mv_insw = sh7300se_insw,
  59. .mv_insl = sh7300se_insl,
  60. .mv_outsb = sh7300se_outsb,
  61. .mv_outsw = sh7300se_outsw,
  62. .mv_outsl = sh7300se_outsl,
  63. .mv_init_irq = init_7300se_IRQ,
  64. };
  65. ALIAS_MV(7300se)