micro9.c 3.0 KB

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