mach-smdkc110.c 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /* linux/arch/arm/mach-s5pv210/mach-smdkc110.c
  2. *
  3. * Copyright (c) 2010 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/init.h>
  13. #include <linux/serial_core.h>
  14. #include <asm/mach/arch.h>
  15. #include <asm/mach/map.h>
  16. #include <asm/setup.h>
  17. #include <asm/mach-types.h>
  18. #include <mach/map.h>
  19. #include <mach/regs-clock.h>
  20. #include <plat/regs-serial.h>
  21. #include <plat/s5pv210.h>
  22. #include <plat/devs.h>
  23. #include <plat/cpu.h>
  24. #include <plat/ata.h>
  25. /* Following are default values for UCON, ULCON and UFCON UART registers */
  26. #define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
  27. S3C2410_UCON_RXILEVEL | \
  28. S3C2410_UCON_TXIRQMODE | \
  29. S3C2410_UCON_RXIRQMODE | \
  30. S3C2410_UCON_RXFIFO_TOI | \
  31. S3C2443_UCON_RXERR_IRQEN)
  32. #define S5PV210_ULCON_DEFAULT S3C2410_LCON_CS8
  33. #define S5PV210_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
  34. S5PV210_UFCON_TXTRIG4 | \
  35. S5PV210_UFCON_RXTRIG4)
  36. static struct s3c2410_uartcfg smdkv210_uartcfgs[] __initdata = {
  37. [0] = {
  38. .hwport = 0,
  39. .flags = 0,
  40. .ucon = S5PV210_UCON_DEFAULT,
  41. .ulcon = S5PV210_ULCON_DEFAULT,
  42. .ufcon = S5PV210_UFCON_DEFAULT,
  43. },
  44. [1] = {
  45. .hwport = 1,
  46. .flags = 0,
  47. .ucon = S5PV210_UCON_DEFAULT,
  48. .ulcon = S5PV210_ULCON_DEFAULT,
  49. .ufcon = S5PV210_UFCON_DEFAULT,
  50. },
  51. [2] = {
  52. .hwport = 2,
  53. .flags = 0,
  54. .ucon = S5PV210_UCON_DEFAULT,
  55. .ulcon = S5PV210_ULCON_DEFAULT,
  56. .ufcon = S5PV210_UFCON_DEFAULT,
  57. },
  58. [3] = {
  59. .hwport = 3,
  60. .flags = 0,
  61. .ucon = S5PV210_UCON_DEFAULT,
  62. .ulcon = S5PV210_ULCON_DEFAULT,
  63. .ufcon = S5PV210_UFCON_DEFAULT,
  64. },
  65. };
  66. static struct s3c_ide_platdata smdkv210_ide_pdata __initdata = {
  67. .setup_gpio = s5pv210_ide_setup_gpio,
  68. };
  69. static struct platform_device *smdkc110_devices[] __initdata = {
  70. &s5pv210_device_iis0,
  71. &s5pv210_device_ac97,
  72. &s3c_device_cfcon,
  73. &s3c_device_rtc,
  74. &s3c_device_wdt,
  75. };
  76. static void __init smdkc110_map_io(void)
  77. {
  78. s5p_init_io(NULL, 0, S5P_VA_CHIPID);
  79. s3c24xx_init_clocks(24000000);
  80. s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs));
  81. }
  82. static void __init smdkc110_machine_init(void)
  83. {
  84. s3c_ide_set_platdata(&smdkv210_ide_pdata);
  85. platform_add_devices(smdkc110_devices, ARRAY_SIZE(smdkc110_devices));
  86. }
  87. MACHINE_START(SMDKC110, "SMDKC110")
  88. /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
  89. .phys_io = S3C_PA_UART & 0xfff00000,
  90. .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc,
  91. .boot_params = S5P_PA_SDRAM + 0x100,
  92. .init_irq = s5pv210_init_irq,
  93. .map_io = smdkc110_map_io,
  94. .init_machine = smdkc110_machine_init,
  95. .timer = &s3c24xx_timer,
  96. MACHINE_END