setup.c 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 <asm/se7751.h>
  15. #include <asm/io.h>
  16. static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 };
  17. static struct resource heartbeat_resources[] = {
  18. [0] = {
  19. .start = PA_LED,
  20. .end = PA_LED + ARRAY_SIZE(heartbeat_bit_pos) - 1,
  21. .flags = IORESOURCE_MEM,
  22. },
  23. };
  24. static struct platform_device heartbeat_device = {
  25. .name = "heartbeat",
  26. .id = -1,
  27. .dev = {
  28. .platform_data = heartbeat_bit_pos,
  29. },
  30. .num_resources = ARRAY_SIZE(heartbeat_resources),
  31. .resource = heartbeat_resources,
  32. };
  33. static struct platform_device *se7751_devices[] __initdata = {
  34. &smc91x_device,
  35. &heartbeat_device,
  36. };
  37. static int __init se7751_devices_setup(void)
  38. {
  39. return platform_add_devices(se7751_devices, ARRAY_SIZE(se7751_devices));
  40. }
  41. __initcall(se7751_devices_setup);
  42. /*
  43. * The Machine Vector
  44. */
  45. struct sh_machine_vector mv_7751se __initmv = {
  46. .mv_name = "7751 SolutionEngine",
  47. .mv_nr_irqs = 72,
  48. .mv_inb = sh7751se_inb,
  49. .mv_inw = sh7751se_inw,
  50. .mv_inl = sh7751se_inl,
  51. .mv_outb = sh7751se_outb,
  52. .mv_outw = sh7751se_outw,
  53. .mv_outl = sh7751se_outl,
  54. .mv_inb_p = sh7751se_inb_p,
  55. .mv_inw_p = sh7751se_inw,
  56. .mv_inl_p = sh7751se_inl,
  57. .mv_outb_p = sh7751se_outb_p,
  58. .mv_outw_p = sh7751se_outw,
  59. .mv_outl_p = sh7751se_outl,
  60. .mv_insl = sh7751se_insl,
  61. .mv_outsl = sh7751se_outsl,
  62. .mv_init_irq = init_7751se_IRQ,
  63. };
  64. ALIAS_MV(7751se)