common.c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * arch/arm/mach-tegra/board-harmony.c
  3. *
  4. * Copyright (C) 2010 Google, Inc.
  5. *
  6. * Author:
  7. * Colin Cross <ccross@android.com>
  8. *
  9. * This software is licensed under the terms of the GNU General Public
  10. * License version 2, as published by the Free Software Foundation, and
  11. * may be copied, distributed, and modified under those terms.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. */
  19. #include <linux/init.h>
  20. #include <linux/io.h>
  21. #include <asm/hardware/cache-l2x0.h>
  22. #include <mach/iomap.h>
  23. #include "board.h"
  24. #include "clock.h"
  25. static __initdata struct tegra_clk_init_table common_clk_init_table[] = {
  26. /* name parent rate enabled */
  27. { "clk_m", NULL, 0, true },
  28. { "pll_p", "clk_m", 216000000, true },
  29. { "pll_p_out1", "pll_p", 28800000, true },
  30. { "pll_p_out2", "pll_p", 48000000, true },
  31. { "pll_p_out3", "pll_p", 72000000, true },
  32. { "pll_p_out4", "pll_p", 108000000, true },
  33. { "sys", "pll_p_out4", 108000000, true },
  34. { "hclk", "sys", 108000000, true },
  35. { "pclk", "hclk", 54000000, true },
  36. { NULL, NULL, 0, 0},
  37. };
  38. void __init tegra_init_cache(void)
  39. {
  40. #ifdef CONFIG_CACHE_L2X0
  41. void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000;
  42. writel(0x331, p + L2X0_TAG_LATENCY_CTRL);
  43. writel(0x441, p + L2X0_DATA_LATENCY_CTRL);
  44. l2x0_init(p, 0x6C080001, 0x8200c3fe);
  45. #endif
  46. }
  47. void __init tegra_common_init(void)
  48. {
  49. tegra_init_clock();
  50. tegra_clk_init_from_table(common_clk_init_table);
  51. tegra_init_cache();
  52. }