mc.h 1023 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright (C) 2014 NVIDIA CORPORATION. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #ifndef MEMORY_TEGRA_MC_H
  9. #define MEMORY_TEGRA_MC_H
  10. #include <linux/io.h>
  11. #include <linux/types.h>
  12. #include <soc/tegra/mc.h>
  13. static inline u32 mc_readl(struct tegra_mc *mc, unsigned long offset)
  14. {
  15. return readl(mc->regs + offset);
  16. }
  17. static inline void mc_writel(struct tegra_mc *mc, u32 value,
  18. unsigned long offset)
  19. {
  20. writel(value, mc->regs + offset);
  21. }
  22. #ifdef CONFIG_ARCH_TEGRA_3x_SOC
  23. extern const struct tegra_mc_soc tegra30_mc_soc;
  24. #endif
  25. #ifdef CONFIG_ARCH_TEGRA_114_SOC
  26. extern const struct tegra_mc_soc tegra114_mc_soc;
  27. #endif
  28. #ifdef CONFIG_ARCH_TEGRA_124_SOC
  29. extern const struct tegra_mc_soc tegra124_mc_soc;
  30. #endif
  31. #ifdef CONFIG_ARCH_TEGRA_132_SOC
  32. extern const struct tegra_mc_soc tegra132_mc_soc;
  33. #endif
  34. #endif /* MEMORY_TEGRA_MC_H */