mach-smdk6440.c 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /* linux/arch/arm/mach-s5p6440/mach-smdk6440.c
  2. *
  3. * Copyright (c) 2009 Samsung Electronics Co., Ltd.
  4. * http://www.samsung.com/
  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. #include <linux/kernel.h>
  11. #include <linux/types.h>
  12. #include <linux/interrupt.h>
  13. #include <linux/list.h>
  14. #include <linux/timer.h>
  15. #include <linux/delay.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 <linux/module.h>
  21. #include <linux/clk.h>
  22. #include <asm/mach/arch.h>
  23. #include <asm/mach/map.h>
  24. #include <mach/hardware.h>
  25. #include <mach/map.h>
  26. #include <asm/irq.h>
  27. #include <asm/mach-types.h>
  28. #include <plat/regs-serial.h>
  29. #include <plat/s5p6440.h>
  30. #include <plat/clock.h>
  31. #include <mach/regs-clock.h>
  32. #include <plat/devs.h>
  33. #include <plat/cpu.h>
  34. #include <plat/pll.h>
  35. #include <plat/adc.h>
  36. #include <plat/ts.h>
  37. #define S5P6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
  38. S3C2410_UCON_RXILEVEL | \
  39. S3C2410_UCON_TXIRQMODE | \
  40. S3C2410_UCON_RXIRQMODE | \
  41. S3C2410_UCON_RXFIFO_TOI | \
  42. S3C2443_UCON_RXERR_IRQEN)
  43. #define S5P6440_ULCON_DEFAULT S3C2410_LCON_CS8
  44. #define S5P6440_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
  45. S3C2440_UFCON_TXTRIG16 | \
  46. S3C2410_UFCON_RXTRIG8)
  47. static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = {
  48. [0] = {
  49. .hwport = 0,
  50. .flags = 0,
  51. .ucon = S5P6440_UCON_DEFAULT,
  52. .ulcon = S5P6440_ULCON_DEFAULT,
  53. .ufcon = S5P6440_UFCON_DEFAULT,
  54. },
  55. [1] = {
  56. .hwport = 1,
  57. .flags = 0,
  58. .ucon = S5P6440_UCON_DEFAULT,
  59. .ulcon = S5P6440_ULCON_DEFAULT,
  60. .ufcon = S5P6440_UFCON_DEFAULT,
  61. },
  62. [2] = {
  63. .hwport = 2,
  64. .flags = 0,
  65. .ucon = S5P6440_UCON_DEFAULT,
  66. .ulcon = S5P6440_ULCON_DEFAULT,
  67. .ufcon = S5P6440_UFCON_DEFAULT,
  68. },
  69. [3] = {
  70. .hwport = 3,
  71. .flags = 0,
  72. .ucon = S5P6440_UCON_DEFAULT,
  73. .ulcon = S5P6440_ULCON_DEFAULT,
  74. .ufcon = S5P6440_UFCON_DEFAULT,
  75. },
  76. };
  77. static struct platform_device *smdk6440_devices[] __initdata = {
  78. &s5p6440_device_iis,
  79. &s3c_device_adc,
  80. &s3c_device_rtc,
  81. &s3c_device_ts,
  82. &s3c_device_wdt,
  83. };
  84. static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
  85. .delay = 10000,
  86. .presc = 49,
  87. .oversampling_shift = 2,
  88. };
  89. static void __init smdk6440_map_io(void)
  90. {
  91. s5p_init_io(NULL, 0, S5P_SYS_ID);
  92. s3c24xx_init_clocks(12000000);
  93. s3c24xx_init_uarts(smdk6440_uartcfgs, ARRAY_SIZE(smdk6440_uartcfgs));
  94. }
  95. static void __init smdk6440_machine_init(void)
  96. {
  97. s3c24xx_ts_set_platdata(&s3c_ts_platform);
  98. platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices));
  99. }
  100. MACHINE_START(SMDK6440, "SMDK6440")
  101. /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
  102. .phys_io = S3C_PA_UART & 0xfff00000,
  103. .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc,
  104. .boot_params = S5P_PA_SDRAM + 0x100,
  105. .init_irq = s5p6440_init_irq,
  106. .map_io = smdk6440_map_io,
  107. .init_machine = smdk6440_machine_init,
  108. .timer = &s3c24xx_timer,
  109. MACHINE_END