micro9.c 2.8 KB

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