mach-exynos4-dt.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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/of_platform.h>
  14. #include <linux/of_fdt.h>
  15. #include <asm/mach/arch.h>
  16. #include <plat/mfc.h>
  17. #include "common.h"
  18. static void __init exynos4_dt_machine_init(void)
  19. {
  20. of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
  21. }
  22. static char const *exynos4_dt_compat[] __initdata = {
  23. "samsung,exynos4210",
  24. "samsung,exynos4212",
  25. "samsung,exynos4412",
  26. NULL
  27. };
  28. static void __init exynos4_reserve(void)
  29. {
  30. #ifdef CONFIG_S5P_DEV_MFC
  31. struct s5p_mfc_dt_meminfo mfc_mem;
  32. /* Reserve memory for MFC only if it's available */
  33. mfc_mem.compatible = "samsung,mfc-v5";
  34. if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem))
  35. s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff,
  36. mfc_mem.lsize);
  37. #endif
  38. }
  39. DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)")
  40. /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */
  41. .smp = smp_ops(exynos_smp_ops),
  42. .map_io = exynos_init_io,
  43. .init_early = exynos_firmware_init,
  44. .init_machine = exynos4_dt_machine_init,
  45. .init_late = exynos_init_late,
  46. .dt_compat = exynos4_dt_compat,
  47. .restart = exynos4_restart,
  48. .reserve = exynos4_reserve,
  49. MACHINE_END