mach-smdkc100.c 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /* linux/arch/arm/mach-s5pc100/mach-smdkc100.c
  2. *
  3. * Copyright 2009 Samsung Electronics Co.
  4. * Author: Byungho Min <bhmin@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. */
  11. #include <linux/kernel.h>
  12. #include <linux/types.h>
  13. #include <linux/interrupt.h>
  14. #include <linux/list.h>
  15. #include <linux/timer.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/gpio.h>
  21. #include <linux/i2c.h>
  22. #include <linux/fb.h>
  23. #include <linux/delay.h>
  24. #include <asm/mach/arch.h>
  25. #include <asm/mach/map.h>
  26. #include <mach/map.h>
  27. #include <asm/irq.h>
  28. #include <asm/mach-types.h>
  29. #include <plat/regs-serial.h>
  30. #include <plat/clock.h>
  31. #include <plat/devs.h>
  32. #include <plat/cpu.h>
  33. #include <plat/s5pc100.h>
  34. #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
  35. #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
  36. #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
  37. static struct s3c2410_uartcfg smdkc100_uartcfgs[] __initdata = {
  38. [0] = {
  39. .hwport = 0,
  40. .flags = 0,
  41. .ucon = 0x3c5,
  42. .ulcon = 0x03,
  43. .ufcon = 0x51,
  44. },
  45. [1] = {
  46. .hwport = 1,
  47. .flags = 0,
  48. .ucon = 0x3c5,
  49. .ulcon = 0x03,
  50. .ufcon = 0x51,
  51. },
  52. [2] = {
  53. .hwport = 2,
  54. .flags = 0,
  55. .ucon = 0x3c5,
  56. .ulcon = 0x03,
  57. .ufcon = 0x51,
  58. },
  59. [3] = {
  60. .hwport = 3,
  61. .flags = 0,
  62. .ucon = 0x3c5,
  63. .ulcon = 0x03,
  64. .ufcon = 0x51,
  65. },
  66. };
  67. static struct map_desc smdkc100_iodesc[] = {};
  68. static struct platform_device *smdkc100_devices[] __initdata = {
  69. };
  70. static void __init smdkc100_map_io(void)
  71. {
  72. s5pc1xx_init_io(smdkc100_iodesc, ARRAY_SIZE(smdkc100_iodesc));
  73. s3c24xx_init_clocks(12000000);
  74. s3c24xx_init_uarts(smdkc100_uartcfgs, ARRAY_SIZE(smdkc100_uartcfgs));
  75. }
  76. static void __init smdkc100_machine_init(void)
  77. {
  78. platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices));
  79. }
  80. MACHINE_START(SMDKC100, "SMDKC100")
  81. /* Maintainer: Byungho Min <bhmin@samsung.com> */
  82. .phys_io = S5PC1XX_PA_UART & 0xfff00000,
  83. .io_pg_offst = (((u32)S5PC1XX_VA_UART) >> 18) & 0xfffc,
  84. .boot_params = S5PC100_PA_SDRAM + 0x100,
  85. .init_irq = s5pc100_init_irq,
  86. .map_io = smdkc100_map_io,
  87. .init_machine = smdkc100_machine_init,
  88. .timer = &s3c24xx_timer,
  89. MACHINE_END