setup.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. device_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_init_irq = init_7751se_IRQ,
  52. };