mach-torbreck.c 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /* linux/arch/arm/mach-s5pv210/mach-torbreck.c
  2. *
  3. * Copyright (c) 2010 aESOP Community
  4. * http://www.aesop.or.kr/
  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/i2c.h>
  13. #include <linux/init.h>
  14. #include <linux/serial_core.h>
  15. #include <asm/mach/arch.h>
  16. #include <asm/mach/map.h>
  17. #include <asm/setup.h>
  18. #include <asm/mach-types.h>
  19. #include <mach/map.h>
  20. #include <mach/regs-clock.h>
  21. #include <plat/regs-serial.h>
  22. #include <plat/s5pv210.h>
  23. #include <plat/devs.h>
  24. #include <plat/cpu.h>
  25. #include <plat/iic.h>
  26. #include <plat/s5p-time.h>
  27. /* Following are default values for UCON, ULCON and UFCON UART registers */
  28. #define TORBRECK_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
  29. S3C2410_UCON_RXILEVEL | \
  30. S3C2410_UCON_TXIRQMODE | \
  31. S3C2410_UCON_RXIRQMODE | \
  32. S3C2410_UCON_RXFIFO_TOI | \
  33. S3C2443_UCON_RXERR_IRQEN)
  34. #define TORBRECK_ULCON_DEFAULT S3C2410_LCON_CS8
  35. #define TORBRECK_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
  36. S5PV210_UFCON_TXTRIG4 | \
  37. S5PV210_UFCON_RXTRIG4)
  38. static struct s3c2410_uartcfg torbreck_uartcfgs[] __initdata = {
  39. [0] = {
  40. .hwport = 0,
  41. .flags = 0,
  42. .ucon = TORBRECK_UCON_DEFAULT,
  43. .ulcon = TORBRECK_ULCON_DEFAULT,
  44. .ufcon = TORBRECK_UFCON_DEFAULT,
  45. },
  46. [1] = {
  47. .hwport = 1,
  48. .flags = 0,
  49. .ucon = TORBRECK_UCON_DEFAULT,
  50. .ulcon = TORBRECK_ULCON_DEFAULT,
  51. .ufcon = TORBRECK_UFCON_DEFAULT,
  52. },
  53. [2] = {
  54. .hwport = 2,
  55. .flags = 0,
  56. .ucon = TORBRECK_UCON_DEFAULT,
  57. .ulcon = TORBRECK_ULCON_DEFAULT,
  58. .ufcon = TORBRECK_UFCON_DEFAULT,
  59. },
  60. [3] = {
  61. .hwport = 3,
  62. .flags = 0,
  63. .ucon = TORBRECK_UCON_DEFAULT,
  64. .ulcon = TORBRECK_ULCON_DEFAULT,
  65. .ufcon = TORBRECK_UFCON_DEFAULT,
  66. },
  67. };
  68. static struct platform_device *torbreck_devices[] __initdata = {
  69. &s5pv210_device_iis0,
  70. &s3c_device_cfcon,
  71. &s3c_device_hsmmc0,
  72. &s3c_device_hsmmc1,
  73. &s3c_device_hsmmc2,
  74. &s3c_device_hsmmc3,
  75. &s3c_device_i2c0,
  76. &s3c_device_i2c1,
  77. &s3c_device_i2c2,
  78. &s3c_device_rtc,
  79. &s3c_device_wdt,
  80. };
  81. static struct i2c_board_info torbreck_i2c_devs0[] __initdata = {
  82. /* To Be Updated */
  83. };
  84. static struct i2c_board_info torbreck_i2c_devs1[] __initdata = {
  85. /* To Be Updated */
  86. };
  87. static struct i2c_board_info torbreck_i2c_devs2[] __initdata = {
  88. /* To Be Updated */
  89. };
  90. static void __init torbreck_map_io(void)
  91. {
  92. s5p_init_io(NULL, 0, S5P_VA_CHIPID);
  93. s3c24xx_init_clocks(24000000);
  94. s3c24xx_init_uarts(torbreck_uartcfgs, ARRAY_SIZE(torbreck_uartcfgs));
  95. s5p_set_timer_source(S5P_PWM3, S5P_PWM4);
  96. }
  97. static void __init torbreck_machine_init(void)
  98. {
  99. s3c_i2c0_set_platdata(NULL);
  100. s3c_i2c1_set_platdata(NULL);
  101. s3c_i2c2_set_platdata(NULL);
  102. i2c_register_board_info(0, torbreck_i2c_devs0,
  103. ARRAY_SIZE(torbreck_i2c_devs0));
  104. i2c_register_board_info(1, torbreck_i2c_devs1,
  105. ARRAY_SIZE(torbreck_i2c_devs1));
  106. i2c_register_board_info(2, torbreck_i2c_devs2,
  107. ARRAY_SIZE(torbreck_i2c_devs2));
  108. platform_add_devices(torbreck_devices, ARRAY_SIZE(torbreck_devices));
  109. }
  110. MACHINE_START(TORBRECK, "TORBRECK")
  111. /* Maintainer: Hyunchul Ko <ghcstop@gmail.com> */
  112. .boot_params = S5P_PA_SDRAM + 0x100,
  113. .init_irq = s5pv210_init_irq,
  114. .map_io = torbreck_map_io,
  115. .init_machine = torbreck_machine_init,
  116. .timer = &s5p_timer,
  117. MACHINE_END