mach-smdk6440.c 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. #define S5P6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
  36. S3C2410_UCON_RXILEVEL | \
  37. S3C2410_UCON_TXIRQMODE | \
  38. S3C2410_UCON_RXIRQMODE | \
  39. S3C2410_UCON_RXFIFO_TOI | \
  40. S3C2443_UCON_RXERR_IRQEN)
  41. #define S5P6440_ULCON_DEFAULT S3C2410_LCON_CS8
  42. #define S5P6440_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
  43. S3C2440_UFCON_TXTRIG16 | \
  44. S3C2410_UFCON_RXTRIG8)
  45. static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = {
  46. [0] = {
  47. .hwport = 0,
  48. .flags = 0,
  49. .ucon = S5P6440_UCON_DEFAULT,
  50. .ulcon = S5P6440_ULCON_DEFAULT,
  51. .ufcon = S5P6440_UFCON_DEFAULT,
  52. },
  53. [1] = {
  54. .hwport = 1,
  55. .flags = 0,
  56. .ucon = S5P6440_UCON_DEFAULT,
  57. .ulcon = S5P6440_ULCON_DEFAULT,
  58. .ufcon = S5P6440_UFCON_DEFAULT,
  59. },
  60. [2] = {
  61. .hwport = 2,
  62. .flags = 0,
  63. .ucon = S5P6440_UCON_DEFAULT,
  64. .ulcon = S5P6440_ULCON_DEFAULT,
  65. .ufcon = S5P6440_UFCON_DEFAULT,
  66. },
  67. [3] = {
  68. .hwport = 3,
  69. .flags = 0,
  70. .ucon = S5P6440_UCON_DEFAULT,
  71. .ulcon = S5P6440_ULCON_DEFAULT,
  72. .ufcon = S5P6440_UFCON_DEFAULT,
  73. },
  74. };
  75. static struct platform_device *smdk6440_devices[] __initdata = {
  76. &s5p6440_device_iis,
  77. };
  78. static void __init smdk6440_map_io(void)
  79. {
  80. s5p_init_io(NULL, 0, S5P_SYS_ID);
  81. s3c24xx_init_clocks(12000000);
  82. s3c24xx_init_uarts(smdk6440_uartcfgs, ARRAY_SIZE(smdk6440_uartcfgs));
  83. }
  84. static void __init smdk6440_machine_init(void)
  85. {
  86. platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices));
  87. }
  88. MACHINE_START(SMDK6440, "SMDK6440")
  89. /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
  90. .phys_io = S3C_PA_UART & 0xfff00000,
  91. .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc,
  92. .boot_params = S5P_PA_SDRAM + 0x100,
  93. .init_irq = s5p6440_init_irq,
  94. .map_io = smdk6440_map_io,
  95. .init_machine = smdk6440_machine_init,
  96. .timer = &s3c24xx_timer,
  97. MACHINE_END