init.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* linux/arch/arm/mach-s5p6440/init.c
  2. *
  3. * Copyright (c) 2009 Samsung Electronics Co., Ltd.
  4. * http://www.samsung.com/
  5. *
  6. * S5P6440 - Init support
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #include <linux/kernel.h>
  13. #include <linux/types.h>
  14. #include <linux/init.h>
  15. #include <linux/serial_core.h>
  16. #include <plat/cpu.h>
  17. #include <plat/devs.h>
  18. #include <plat/s5p6440.h>
  19. #include <plat/regs-serial.h>
  20. static struct s3c24xx_uart_clksrc s5p6440_serial_clocks[] = {
  21. [0] = {
  22. .name = "pclk_low",
  23. .divisor = 1,
  24. .min_baud = 0,
  25. .max_baud = 0,
  26. },
  27. [1] = {
  28. .name = "uclk1",
  29. .divisor = 1,
  30. .min_baud = 0,
  31. .max_baud = 0,
  32. },
  33. };
  34. /* uart registration process */
  35. void __init s5p6440_common_init_uarts(struct s3c2410_uartcfg *cfg, int no)
  36. {
  37. struct s3c2410_uartcfg *tcfg = cfg;
  38. u32 ucnt;
  39. for (ucnt = 0; ucnt < no; ucnt++, tcfg++) {
  40. if (!tcfg->clocks) {
  41. tcfg->clocks = s5p6440_serial_clocks;
  42. tcfg->clocks_size = ARRAY_SIZE(s5p6440_serial_clocks);
  43. }
  44. }
  45. s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no);
  46. }