rockchip.c 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Device Tree support for Rockchip SoCs
  3. *
  4. * Copyright (c) 2013 MundoReader S.L.
  5. * Author: Heiko Stuebner <heiko@sntech.de>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. */
  17. #include <linux/kernel.h>
  18. #include <linux/init.h>
  19. #include <linux/of_platform.h>
  20. #include <linux/irqchip.h>
  21. #include <linux/dw_apb_timer.h>
  22. #include <linux/clk-provider.h>
  23. #include <asm/mach/arch.h>
  24. #include <asm/mach/map.h>
  25. #include <asm/hardware/cache-l2x0.h>
  26. static void __init rockchip_timer_init(void)
  27. {
  28. of_clk_init(NULL);
  29. clocksource_of_init();
  30. }
  31. static void __init rockchip_dt_init(void)
  32. {
  33. l2x0_of_init(0, ~0UL);
  34. of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
  35. }
  36. static const char * const rockchip_board_dt_compat[] = {
  37. "rockchip,rk2928",
  38. "rockchip,rk3066a",
  39. "rockchip,rk3066b",
  40. "rockchip,rk3188",
  41. NULL,
  42. };
  43. DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)")
  44. .init_machine = rockchip_dt_init,
  45. .init_time = rockchip_timer_init,
  46. .dt_compat = rockchip_board_dt_compat,
  47. MACHINE_END