mach-exynos4-dt.c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Samsung's EXYNOS4 flattened device tree enabled machine
  3. *
  4. * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
  5. * http://www.samsung.com
  6. * Copyright (c) 2010-2011 Linaro Ltd.
  7. * www.linaro.org
  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. #include <linux/kernel.h>
  14. #include <linux/of_platform.h>
  15. #include <linux/of_fdt.h>
  16. #include <linux/serial_core.h>
  17. #include <linux/memblock.h>
  18. #include <linux/clocksource.h>
  19. #include <asm/mach/arch.h>
  20. #include <plat/mfc.h>
  21. #include "common.h"
  22. static void __init exynos4_dt_machine_init(void)
  23. {
  24. exynos_cpuidle_init();
  25. of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
  26. }
  27. static char const *exynos4_dt_compat[] __initdata = {
  28. "samsung,exynos4210",
  29. "samsung,exynos4212",
  30. "samsung,exynos4412",
  31. NULL
  32. };
  33. static void __init exynos4_reserve(void)
  34. {
  35. #ifdef CONFIG_S5P_DEV_MFC
  36. struct s5p_mfc_dt_meminfo mfc_mem;
  37. /* Reserve memory for MFC only if it's available */
  38. mfc_mem.compatible = "samsung,mfc-v5";
  39. if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem))
  40. s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff,
  41. mfc_mem.lsize);
  42. #endif
  43. }
  44. DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)")
  45. /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */
  46. .smp = smp_ops(exynos_smp_ops),
  47. .map_io = exynos_init_io,
  48. .init_early = exynos_firmware_init,
  49. .init_machine = exynos4_dt_machine_init,
  50. .init_late = exynos_init_late,
  51. .init_time = exynos_init_time,
  52. .dt_compat = exynos4_dt_compat,
  53. .restart = exynos4_restart,
  54. .reserve = exynos4_reserve,
  55. MACHINE_END