mach-smdkc110.c 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. /* Following are default values for UCON, ULCON and UFCON UART registers */
  25. #define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
  26. S3C2410_UCON_RXILEVEL | \
  27. S3C2410_UCON_TXIRQMODE | \
  28. S3C2410_UCON_RXIRQMODE | \
  29. S3C2410_UCON_RXFIFO_TOI | \
  30. S3C2443_UCON_RXERR_IRQEN)
  31. #define S5PV210_ULCON_DEFAULT S3C2410_LCON_CS8
  32. #define S5PV210_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
  33. S5PV210_UFCON_TXTRIG4 | \
  34. S5PV210_UFCON_RXTRIG4)
  35. static struct s3c2410_uartcfg smdkv210_uartcfgs[] __initdata = {
  36. [0] = {
  37. .hwport = 0,
  38. .flags = 0,
  39. .ucon = S5PV210_UCON_DEFAULT,
  40. .ulcon = S5PV210_ULCON_DEFAULT,
  41. .ufcon = S5PV210_UFCON_DEFAULT,
  42. },
  43. [1] = {
  44. .hwport = 1,
  45. .flags = 0,
  46. .ucon = S5PV210_UCON_DEFAULT,
  47. .ulcon = S5PV210_ULCON_DEFAULT,
  48. .ufcon = S5PV210_UFCON_DEFAULT,
  49. },
  50. [2] = {
  51. .hwport = 2,
  52. .flags = 0,
  53. .ucon = S5PV210_UCON_DEFAULT,
  54. .ulcon = S5PV210_ULCON_DEFAULT,
  55. .ufcon = S5PV210_UFCON_DEFAULT,
  56. },
  57. [3] = {
  58. .hwport = 3,
  59. .flags = 0,
  60. .ucon = S5PV210_UCON_DEFAULT,
  61. .ulcon = S5PV210_ULCON_DEFAULT,
  62. .ufcon = S5PV210_UFCON_DEFAULT,
  63. },
  64. };
  65. static struct platform_device *smdkc110_devices[] __initdata = {
  66. };
  67. static void __init smdkc110_map_io(void)
  68. {
  69. s5p_init_io(NULL, 0, S5P_VA_CHIPID);
  70. s3c24xx_init_clocks(24000000);
  71. s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs));
  72. }
  73. static void __init smdkc110_machine_init(void)
  74. {
  75. platform_add_devices(smdkc110_devices, ARRAY_SIZE(smdkc110_devices));
  76. }
  77. MACHINE_START(SMDKC110, "SMDKC110")
  78. /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
  79. .phys_io = S3C_PA_UART & 0xfff00000,
  80. .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc,
  81. .boot_params = S5P_PA_SDRAM + 0x100,
  82. .init_irq = s5pv210_init_irq,
  83. .map_io = smdkc110_map_io,
  84. .init_machine = smdkc110_machine_init,
  85. .timer = &s3c24xx_timer,
  86. MACHINE_END