mach-real6410.c 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /* linux/arch/arm/mach-s3c64xx/mach-real6410.c
  2. *
  3. * Copyright 2010 Darius Augulis <augulis.darius@gmail.com>
  4. * Copyright 2008 Openmoko, Inc.
  5. * Copyright 2008 Simtec Electronics
  6. * Ben Dooks <ben@simtec.co.uk>
  7. * http://armlinux.simtec.co.uk/
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. *
  13. */
  14. #include <linux/kernel.h>
  15. #include <linux/types.h>
  16. #include <linux/interrupt.h>
  17. #include <linux/list.h>
  18. #include <linux/init.h>
  19. #include <linux/serial_core.h>
  20. #include <linux/platform_device.h>
  21. #include <asm/mach-types.h>
  22. #include <asm/mach/arch.h>
  23. #include <asm/mach/map.h>
  24. #include <mach/map.h>
  25. #include <mach/s3c6410.h>
  26. #include <plat/cpu.h>
  27. #include <plat/regs-serial.h>
  28. #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
  29. #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
  30. #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
  31. static struct s3c2410_uartcfg real6410_uartcfgs[] __initdata = {
  32. [0] = {
  33. .hwport = 0,
  34. .flags = 0,
  35. .ucon = UCON,
  36. .ulcon = ULCON,
  37. .ufcon = UFCON,
  38. },
  39. [1] = {
  40. .hwport = 1,
  41. .flags = 0,
  42. .ucon = UCON,
  43. .ulcon = ULCON,
  44. .ufcon = UFCON,
  45. },
  46. [2] = {
  47. .hwport = 2,
  48. .flags = 0,
  49. .ucon = UCON,
  50. .ulcon = ULCON,
  51. .ufcon = UFCON,
  52. },
  53. [3] = {
  54. .hwport = 3,
  55. .flags = 0,
  56. .ucon = UCON,
  57. .ulcon = ULCON,
  58. .ufcon = UFCON,
  59. },
  60. };
  61. static void __init real6410_map_io(void)
  62. {
  63. s3c64xx_init_io(NULL, 0);
  64. s3c24xx_init_clocks(12000000);
  65. s3c24xx_init_uarts(real6410_uartcfgs, ARRAY_SIZE(real6410_uartcfgs));
  66. }
  67. static void __init real6410_machine_init(void)
  68. {
  69. }
  70. MACHINE_START(REAL6410, "REAL6410")
  71. /* Maintainer: Darius Augulis <augulis.darius@gmail.com> */
  72. .phys_io = S3C_PA_UART & 0xfff00000,
  73. .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc,
  74. .boot_params = S3C64XX_PA_SDRAM + 0x100,
  75. .init_irq = s3c6410_init_irq,
  76. .map_io = real6410_map_io,
  77. .init_machine = real6410_machine_init,
  78. .timer = &s3c24xx_timer,
  79. MACHINE_END