setup.c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * linux/arch/sh/boards/se/7751/setup.c
  3. *
  4. * Copyright (C) 2000 Kazumoto Kojima
  5. *
  6. * Hitachi SolutionEngine Support.
  7. *
  8. * Modified for 7751 Solution Engine by
  9. * Ian da Silva and Jeremy Siegel, 2001.
  10. */
  11. #include <linux/init.h>
  12. #include <linux/platform_device.h>
  13. #include <asm/machvec.h>
  14. #include <mach-se/mach/se7751.h>
  15. #include <asm/io.h>
  16. #include <asm/heartbeat.h>
  17. static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 };
  18. static struct heartbeat_data heartbeat_data = {
  19. .bit_pos = heartbeat_bit_pos,
  20. .nr_bits = ARRAY_SIZE(heartbeat_bit_pos),
  21. };
  22. static struct resource heartbeat_resources[] = {
  23. [0] = {
  24. .start = PA_LED,
  25. .end = PA_LED,
  26. .flags = IORESOURCE_MEM,
  27. },
  28. };
  29. static struct platform_device heartbeat_device = {
  30. .name = "heartbeat",
  31. .id = -1,
  32. .dev = {
  33. .platform_data = &heartbeat_data,
  34. },
  35. .num_resources = ARRAY_SIZE(heartbeat_resources),
  36. .resource = heartbeat_resources,
  37. };
  38. static struct platform_device *se7751_devices[] __initdata = {
  39. &heartbeat_device,
  40. };
  41. static int __init se7751_devices_setup(void)
  42. {
  43. return platform_add_devices(se7751_devices, ARRAY_SIZE(se7751_devices));
  44. }
  45. __initcall(se7751_devices_setup);
  46. /*
  47. * The Machine Vector
  48. */
  49. static struct sh_machine_vector mv_7751se __initmv = {
  50. .mv_name = "7751 SolutionEngine",
  51. .mv_nr_irqs = 72,
  52. .mv_inb = sh7751se_inb,
  53. .mv_inw = sh7751se_inw,
  54. .mv_inl = sh7751se_inl,
  55. .mv_outb = sh7751se_outb,
  56. .mv_outw = sh7751se_outw,
  57. .mv_outl = sh7751se_outl,
  58. .mv_inb_p = sh7751se_inb_p,
  59. .mv_inw_p = sh7751se_inw,
  60. .mv_inl_p = sh7751se_inl,
  61. .mv_outb_p = sh7751se_outb_p,
  62. .mv_outw_p = sh7751se_outw,
  63. .mv_outl_p = sh7751se_outl,
  64. .mv_insl = sh7751se_insl,
  65. .mv_outsl = sh7751se_outsl,
  66. .mv_init_irq = init_7751se_IRQ,
  67. };