mach-otom.c 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /* linux/arch/arm/mach-s3c2410/mach-otom.c
  2. *
  3. * Copyright (c) 2004 Nex Vision
  4. * Guillaume GOURAT <guillaume.gourat@nexvision.fr>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. */
  11. #include <linux/kernel.h>
  12. #include <linux/types.h>
  13. #include <linux/interrupt.h>
  14. #include <linux/list.h>
  15. #include <linux/timer.h>
  16. #include <linux/init.h>
  17. #include <linux/serial_core.h>
  18. #include <linux/platform_device.h>
  19. #include <linux/io.h>
  20. #include <asm/mach/arch.h>
  21. #include <asm/mach/map.h>
  22. #include <asm/mach/irq.h>
  23. #include <mach/otom-map.h>
  24. #include <mach/hardware.h>
  25. #include <asm/irq.h>
  26. #include <asm/mach-types.h>
  27. #include <plat/regs-serial.h>
  28. #include <mach/regs-gpio.h>
  29. #include <plat/s3c2410.h>
  30. #include <plat/clock.h>
  31. #include <plat/devs.h>
  32. #include <plat/iic.h>
  33. #include <plat/cpu.h>
  34. #include "common.h"
  35. static struct map_desc otom11_iodesc[] __initdata = {
  36. /* Device area */
  37. { (u32)OTOM_VA_CS8900A_BASE, OTOM_PA_CS8900A_BASE, SZ_16M, MT_DEVICE },
  38. };
  39. #define UCON S3C2410_UCON_DEFAULT
  40. #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
  41. #define UFCON S3C2410_UFCON_RXTRIG12 | S3C2410_UFCON_FIFOMODE
  42. static struct s3c2410_uartcfg otom11_uartcfgs[] __initdata = {
  43. [0] = {
  44. .hwport = 0,
  45. .flags = 0,
  46. .ucon = UCON,
  47. .ulcon = ULCON,
  48. .ufcon = UFCON,
  49. },
  50. [1] = {
  51. .hwport = 1,
  52. .flags = 0,
  53. .ucon = UCON,
  54. .ulcon = ULCON,
  55. .ufcon = UFCON,
  56. },
  57. /* port 2 is not actually used */
  58. [2] = {
  59. .hwport = 2,
  60. .flags = 0,
  61. .ucon = UCON,
  62. .ulcon = ULCON,
  63. .ufcon = UFCON,
  64. }
  65. };
  66. /* NOR Flash on NexVision OTOM board */
  67. static struct resource otom_nor_resource[] = {
  68. [0] = {
  69. .start = S3C2410_CS0,
  70. .end = S3C2410_CS0 + (4*1024*1024) - 1,
  71. .flags = IORESOURCE_MEM,
  72. }
  73. };
  74. static struct platform_device otom_device_nor = {
  75. .name = "mtd-flash",
  76. .id = -1,
  77. .num_resources = ARRAY_SIZE(otom_nor_resource),
  78. .resource = otom_nor_resource,
  79. };
  80. /* Standard OTOM devices */
  81. static struct platform_device *otom11_devices[] __initdata = {
  82. &s3c_device_ohci,
  83. &s3c_device_lcd,
  84. &s3c_device_wdt,
  85. &s3c_device_i2c0,
  86. &s3c_device_iis,
  87. &s3c_device_rtc,
  88. &otom_device_nor,
  89. };
  90. static void __init otom11_map_io(void)
  91. {
  92. s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc));
  93. s3c24xx_init_clocks(0);
  94. s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs));
  95. }
  96. static void __init otom11_init(void)
  97. {
  98. s3c_i2c0_set_platdata(NULL);
  99. platform_add_devices(otom11_devices, ARRAY_SIZE(otom11_devices));
  100. }
  101. MACHINE_START(OTOM, "Nex Vision - Otom 1.1")
  102. /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */
  103. .atag_offset = 0x100,
  104. .map_io = otom11_map_io,
  105. .init_machine = otom11_init,
  106. .init_irq = s3c24xx_init_irq,
  107. .timer = &s3c24xx_timer,
  108. .restart = s3c2410_restart,
  109. MACHINE_END