micro9.c 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /*
  2. * linux/arch/arm/mach-ep93xx/micro9.c
  3. *
  4. * Copyright (C) 2006 Contec Steuerungstechnik & Automation GmbH
  5. * Manfred Gruber <manfred.gruber@contec.at>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #include <linux/init.h>
  12. #include <linux/interrupt.h>
  13. #include <linux/ioport.h>
  14. #include <linux/kernel.h>
  15. #include <linux/mm.h>
  16. #include <linux/platform_device.h>
  17. #include <linux/sched.h>
  18. #include <linux/io.h>
  19. #include <linux/mtd/physmap.h>
  20. #include <mach/hardware.h>
  21. #include <asm/mach/arch.h>
  22. #include <asm/mach-types.h>
  23. static struct ep93xx_eth_data micro9_eth_data = {
  24. .phy_id = 0x1f,
  25. };
  26. static void __init micro9_init(void)
  27. {
  28. ep93xx_register_eth(&micro9_eth_data, 1);
  29. }
  30. /*
  31. * Micro9-H
  32. */
  33. #ifdef CONFIG_MACH_MICRO9H
  34. static struct physmap_flash_data micro9h_flash_data = {
  35. .width = 4,
  36. };
  37. static struct resource micro9h_flash_resource = {
  38. .start = 0x10000000,
  39. .end = 0x13ffffff,
  40. .flags = IORESOURCE_MEM,
  41. };
  42. static struct platform_device micro9h_flash = {
  43. .name = "physmap-flash",
  44. .id = 0,
  45. .dev = {
  46. .platform_data = &micro9h_flash_data,
  47. },
  48. .num_resources = 1,
  49. .resource = &micro9h_flash_resource,
  50. };
  51. static void __init micro9h_init(void)
  52. {
  53. platform_device_register(&micro9h_flash);
  54. }
  55. static void __init micro9h_init_machine(void)
  56. {
  57. ep93xx_init_devices();
  58. micro9_init();
  59. micro9h_init();
  60. }
  61. MACHINE_START(MICRO9, "Contec Hypercontrol Micro9-H")
  62. /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
  63. .phys_io = EP93XX_APB_PHYS_BASE,
  64. .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
  65. .boot_params = 0x00000100,
  66. .map_io = ep93xx_map_io,
  67. .init_irq = ep93xx_init_irq,
  68. .timer = &ep93xx_timer,
  69. .init_machine = micro9h_init_machine,
  70. MACHINE_END
  71. #endif
  72. /*
  73. * Micro9-M
  74. */
  75. #ifdef CONFIG_MACH_MICRO9M
  76. static void __init micro9m_init_machine(void)
  77. {
  78. ep93xx_init_devices();
  79. micro9_init();
  80. }
  81. MACHINE_START(MICRO9M, "Contec Hypercontrol Micro9-M")
  82. /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
  83. .phys_io = EP93XX_APB_PHYS_BASE,
  84. .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
  85. .boot_params = 0x00000100,
  86. .map_io = ep93xx_map_io,
  87. .init_irq = ep93xx_init_irq,
  88. .timer = &ep93xx_timer,
  89. .init_machine = micro9m_init_machine,
  90. MACHINE_END
  91. #endif
  92. /*
  93. * Micro9-L
  94. */
  95. #ifdef CONFIG_MACH_MICRO9L
  96. static void __init micro9l_init_machine(void)
  97. {
  98. ep93xx_init_devices();
  99. micro9_init();
  100. }
  101. MACHINE_START(MICRO9L, "Contec Hypercontrol Micro9-L")
  102. /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
  103. .phys_io = EP93XX_APB_PHYS_BASE,
  104. .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
  105. .boot_params = 0x00000100,
  106. .map_io = ep93xx_map_io,
  107. .init_irq = ep93xx_init_irq,
  108. .timer = &ep93xx_timer,
  109. .init_machine = micro9l_init_machine,
  110. MACHINE_END
  111. #endif