mach-otom.c 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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/device.h>
  18. #include <asm/mach/arch.h>
  19. #include <asm/mach/map.h>
  20. #include <asm/mach/irq.h>
  21. #include <asm/arch/otom-map.h>
  22. #include <asm/hardware.h>
  23. #include <asm/io.h>
  24. #include <asm/irq.h>
  25. #include <asm/mach-types.h>
  26. #include <asm/arch/regs-serial.h>
  27. #include <asm/arch/regs-gpio.h>
  28. #include "s3c2410.h"
  29. #include "clock.h"
  30. #include "devs.h"
  31. #include "cpu.h"
  32. static struct map_desc otom11_iodesc[] __initdata = {
  33. /* Device area */
  34. { (u32)OTOM_VA_CS8900A_BASE, OTOM_PA_CS8900A_BASE, SZ_16M, MT_DEVICE },
  35. };
  36. #define UCON S3C2410_UCON_DEFAULT
  37. #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
  38. #define UFCON S3C2410_UFCON_RXTRIG12 | S3C2410_UFCON_FIFOMODE
  39. static struct s3c2410_uartcfg otom11_uartcfgs[] = {
  40. [0] = {
  41. .hwport = 0,
  42. .flags = 0,
  43. .ucon = UCON,
  44. .ulcon = ULCON,
  45. .ufcon = UFCON,
  46. },
  47. [1] = {
  48. .hwport = 1,
  49. .flags = 0,
  50. .ucon = UCON,
  51. .ulcon = ULCON,
  52. .ufcon = UFCON,
  53. },
  54. /* port 2 is not actually used */
  55. [2] = {
  56. .hwport = 2,
  57. .flags = 0,
  58. .ucon = UCON,
  59. .ulcon = ULCON,
  60. .ufcon = UFCON,
  61. }
  62. };
  63. /* NOR Flash on NexVision OTOM board */
  64. static struct resource otom_nor_resource[] = {
  65. [0] = {
  66. .start = S3C2410_CS0,
  67. .end = S3C2410_CS0 + (4*1024*1024) - 1,
  68. .flags = IORESOURCE_MEM,
  69. }
  70. };
  71. static struct platform_device otom_device_nor = {
  72. .name = "mtd-flash",
  73. .id = -1,
  74. .num_resources = ARRAY_SIZE(otom_nor_resource),
  75. .resource = otom_nor_resource,
  76. };
  77. /* Standard OTOM devices */
  78. static struct platform_device *otom11_devices[] __initdata = {
  79. &s3c_device_usb,
  80. &s3c_device_lcd,
  81. &s3c_device_wdt,
  82. &s3c_device_i2c,
  83. &s3c_device_iis,
  84. &s3c_device_rtc,
  85. &otom_device_nor,
  86. };
  87. static struct s3c24xx_board otom11_board __initdata = {
  88. .devices = otom11_devices,
  89. .devices_count = ARRAY_SIZE(otom11_devices)
  90. };
  91. void __init otom11_map_io(void)
  92. {
  93. s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc));
  94. s3c24xx_init_clocks(0);
  95. s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs));
  96. s3c24xx_set_board(&otom11_board);
  97. }
  98. MACHINE_START(OTOM, "Nex Vision - Otom 1.1")
  99. /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */
  100. .phys_ram = S3C2410_SDRAM_PA,
  101. .phys_io = S3C2410_PA_UART,
  102. .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
  103. .boot_params = S3C2410_SDRAM_PA + 0x100,
  104. .map_io = otom11_map_io,
  105. .init_irq = s3c24xx_init_irq,
  106. .timer = &s3c24xx_timer,
  107. MACHINE_END