vpr.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms and conditions of the GNU General Public License,
  6. * version 2, as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope it will be useful, but WITHOUT
  9. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  11. * more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. /* Tegra vpr routines */
  17. #include <common.h>
  18. #include <asm/io.h>
  19. #include <asm/arch/tegra.h>
  20. #include <asm/arch/mc.h>
  21. /* Configures VPR. Right now, all we do is turn it off. */
  22. void config_vpr(void)
  23. {
  24. struct mc_ctlr *mc = (struct mc_ctlr *)NV_PA_MC_BASE;
  25. /* Turn VPR off */
  26. writel(0, &mc->mc_video_protect_size_mb);
  27. writel(TEGRA_MC_VIDEO_PROTECT_REG_WRITE_ACCESS_DISABLED,
  28. &mc->mc_video_protect_reg_ctrl);
  29. /* read back to ensure the write went through */
  30. readl(&mc->mc_video_protect_reg_ctrl);
  31. }