micro9.c 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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/i2c.h>
  20. #include <linux/mtd/physmap.h>
  21. #include <mach/hardware.h>
  22. #include <asm/mach/arch.h>
  23. #include <asm/mach-types.h>
  24. static struct ep93xx_eth_data micro9_eth_data = {
  25. .phy_id = 0x1f,
  26. };
  27. static void __init micro9_init(void)
  28. {
  29. ep93xx_register_eth(&micro9_eth_data, 1);
  30. }
  31. /*
  32. * Micro9-H
  33. */
  34. #ifdef CONFIG_MACH_MICRO9H
  35. static struct physmap_flash_data micro9h_flash_data = {
  36. .width = 4,
  37. };
  38. static struct resource micro9h_flash_resource = {
  39. .start = EP93XX_CS1_PHYS_BASE,
  40. .end = EP93XX_CS1_PHYS_BASE + SZ_64M - 1,
  41. .flags = IORESOURCE_MEM,
  42. };
  43. static struct platform_device micro9h_flash = {
  44. .name = "physmap-flash",
  45. .id = 0,
  46. .dev = {
  47. .platform_data = &micro9h_flash_data,
  48. },
  49. .num_resources = 1,
  50. .resource = &micro9h_flash_resource,
  51. };
  52. static void __init micro9h_init(void)
  53. {
  54. platform_device_register(&micro9h_flash);
  55. }
  56. static void __init micro9h_init_machine(void)
  57. {
  58. ep93xx_init_devices();
  59. micro9_init();
  60. micro9h_init();
  61. }
  62. MACHINE_START(MICRO9, "Contec Hypercontrol Micro9-H")
  63. /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
  64. .phys_io = EP93XX_APB_PHYS_BASE,
  65. .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
  66. .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
  67. .map_io = ep93xx_map_io,
  68. .init_irq = ep93xx_init_irq,
  69. .timer = &ep93xx_timer,
  70. .init_machine = micro9h_init_machine,
  71. MACHINE_END
  72. #endif
  73. /*
  74. * Micro9-M
  75. */
  76. #ifdef CONFIG_MACH_MICRO9M
  77. static void __init micro9m_init_machine(void)
  78. {
  79. ep93xx_init_devices();
  80. micro9_init();
  81. }
  82. MACHINE_START(MICRO9M, "Contec Hypercontrol Micro9-M")
  83. /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
  84. .phys_io = EP93XX_APB_PHYS_BASE,
  85. .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
  86. .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
  87. .map_io = ep93xx_map_io,
  88. .init_irq = ep93xx_init_irq,
  89. .timer = &ep93xx_timer,
  90. .init_machine = micro9m_init_machine,
  91. MACHINE_END
  92. #endif
  93. /*
  94. * Micro9-L
  95. */
  96. #ifdef CONFIG_MACH_MICRO9L
  97. static void __init micro9l_init_machine(void)
  98. {
  99. ep93xx_init_devices();
  100. micro9_init();
  101. }
  102. MACHINE_START(MICRO9L, "Contec Hypercontrol Micro9-L")
  103. /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
  104. .phys_io = EP93XX_APB_PHYS_BASE,
  105. .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
  106. .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
  107. .map_io = ep93xx_map_io,
  108. .init_irq = ep93xx_init_irq,
  109. .timer = &ep93xx_timer,
  110. .init_machine = micro9l_init_machine,
  111. MACHINE_END
  112. #endif