mc.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #ifdef CONFIG_ARCH_TEGRA_210_SOC
  35. extern const struct tegra_mc_soc tegra210_mc_soc;
  36. #endif
  37. #endif /* MEMORY_TEGRA_MC_H */