mach-torbreck.c 3.4 KB

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