mach-ncp.c 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. * linux/arch/arm/mach-s3c6410/mach-ncp.c
  3. *
  4. * Copyright (C) 2008-2009 Samsung Electronics
  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/i2c.h>
  21. #include <linux/fb.h>
  22. #include <linux/gpio.h>
  23. #include <linux/delay.h>
  24. #include <video/platform_lcd.h>
  25. #include <asm/mach/arch.h>
  26. #include <asm/mach/map.h>
  27. #include <asm/mach/irq.h>
  28. #include <mach/hardware.h>
  29. #include <mach/regs-fb.h>
  30. #include <mach/map.h>
  31. #include <asm/irq.h>
  32. #include <asm/mach-types.h>
  33. #include <plat/regs-serial.h>
  34. #include <plat/iic.h>
  35. #include <plat/fb.h>
  36. #include <plat/s3c6410.h>
  37. #include <plat/clock.h>
  38. #include <plat/devs.h>
  39. #include <plat/cpu.h>
  40. #define UCON S3C2410_UCON_DEFAULT
  41. #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE
  42. #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
  43. static struct s3c2410_uartcfg ncp_uartcfgs[] __initdata = {
  44. /* REVISIT: NCP uses only serial 1, 2 */
  45. [0] = {
  46. .hwport = 0,
  47. .flags = 0,
  48. .ucon = UCON,
  49. .ulcon = ULCON,
  50. .ufcon = UFCON,
  51. },
  52. [1] = {
  53. .hwport = 1,
  54. .flags = 0,
  55. .ucon = UCON,
  56. .ulcon = ULCON,
  57. .ufcon = UFCON,
  58. },
  59. [2] = {
  60. .hwport = 2,
  61. .flags = 0,
  62. .ucon = UCON,
  63. .ulcon = ULCON,
  64. .ufcon = UFCON,
  65. },
  66. };
  67. static struct platform_device *ncp_devices[] __initdata = {
  68. &s3c_device_hsmmc1,
  69. &s3c_device_i2c0,
  70. };
  71. static struct map_desc ncp_iodesc[] __initdata = {};
  72. static void __init ncp_map_io(void)
  73. {
  74. s3c64xx_init_io(ncp_iodesc, ARRAY_SIZE(ncp_iodesc));
  75. s3c24xx_init_clocks(12000000);
  76. s3c24xx_init_uarts(ncp_uartcfgs, ARRAY_SIZE(ncp_uartcfgs));
  77. }
  78. static void __init ncp_machine_init(void)
  79. {
  80. s3c_i2c0_set_platdata(NULL);
  81. platform_add_devices(ncp_devices, ARRAY_SIZE(ncp_devices));
  82. }
  83. MACHINE_START(NCP, "NCP")
  84. /* Maintainer: Samsung Electronics */
  85. .phys_io = S3C_PA_UART & 0xfff00000,
  86. .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc,
  87. .boot_params = S3C64XX_PA_SDRAM + 0x100,
  88. .init_irq = s3c6410_init_irq,
  89. .map_io = ncp_map_io,
  90. .init_machine = ncp_machine_init,
  91. .timer = &s3c24xx_timer,
  92. MACHINE_END