common.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. #include "fuse.h"
  26. static __initdata struct tegra_clk_init_table common_clk_init_table[] = {
  27. /* name parent rate enabled */
  28. { "clk_m", NULL, 0, true },
  29. { "pll_p", "clk_m", 216000000, true },
  30. { "pll_p_out1", "pll_p", 28800000, true },
  31. { "pll_p_out2", "pll_p", 48000000, true },
  32. { "pll_p_out3", "pll_p", 72000000, true },
  33. { "pll_p_out4", "pll_p", 108000000, true },
  34. { "sys", "pll_p_out4", 108000000, true },
  35. { "hclk", "sys", 108000000, true },
  36. { "pclk", "hclk", 54000000, true },
  37. { NULL, NULL, 0, 0},
  38. };
  39. void __init tegra_init_cache(void)
  40. {
  41. #ifdef CONFIG_CACHE_L2X0
  42. void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000;
  43. writel(0x331, p + L2X0_TAG_LATENCY_CTRL);
  44. writel(0x441, p + L2X0_DATA_LATENCY_CTRL);
  45. l2x0_init(p, 0x6C080001, 0x8200c3fe);
  46. #endif
  47. }
  48. void __init tegra_common_init(void)
  49. {
  50. tegra_init_fuse();
  51. tegra_init_clock();
  52. tegra_clk_init_from_table(common_clk_init_table);
  53. tegra_init_cache();
  54. }