init.c 1002 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* linux/arch/arm/mach-exynos4/init.c
  2. *
  3. * Copyright (c) 2010 Samsung Electronics Co., Ltd.
  4. * http://www.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. #include <linux/serial_core.h>
  11. #include <plat/cpu.h>
  12. #include <plat/devs.h>
  13. #include <plat/regs-serial.h>
  14. static struct s3c24xx_uart_clksrc exynos4_serial_clocks[] = {
  15. [0] = {
  16. .name = "uclk1",
  17. .divisor = 1,
  18. .min_baud = 0,
  19. .max_baud = 0,
  20. },
  21. };
  22. /* uart registration process */
  23. void __init exynos4_common_init_uarts(struct s3c2410_uartcfg *cfg, int no)
  24. {
  25. struct s3c2410_uartcfg *tcfg = cfg;
  26. u32 ucnt;
  27. for (ucnt = 0; ucnt < no; ucnt++, tcfg++) {
  28. if (!tcfg->clocks) {
  29. tcfg->has_fracval = 1;
  30. tcfg->clocks = exynos4_serial_clocks;
  31. tcfg->clocks_size = ARRAY_SIZE(exynos4_serial_clocks);
  32. }
  33. }
  34. s3c24xx_init_uartdevs("s5pv210-uart", s5p_uart_resources, cfg, no);
  35. }