Commit c61cd638 authored by Varun Wadekar's avatar Varun Wadekar
Browse files

Tegra: memctrl_v2: get chip revision using platform identifiers



This patch switches to the functions which identify the underlying
platform in order to calculate the chip SKU.

Change-Id: I20cf5623465289ccfab28d6578efcf762bfeb456
Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
parent 524bd090
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <smmu.h> #include <smmu.h>
#include <string.h> #include <string.h>
#include <tegra_def.h> #include <tegra_def.h>
#include <tegra_platform.h>
#include <xlat_tables.h> #include <xlat_tables.h>
#define TEGRA_GPU_RESET_REG_OFFSET 0x30 #define TEGRA_GPU_RESET_REG_OFFSET 0x30
...@@ -495,7 +496,6 @@ void tegra_memctrl_setup(void) ...@@ -495,7 +496,6 @@ void tegra_memctrl_setup(void)
uint32_t num_overrides = sizeof(streamid_overrides) / sizeof(uint32_t); uint32_t num_overrides = sizeof(streamid_overrides) / sizeof(uint32_t);
uint32_t num_sec_cfgs = sizeof(sec_cfgs) / sizeof(mc_streamid_security_cfg_t); uint32_t num_sec_cfgs = sizeof(sec_cfgs) / sizeof(mc_streamid_security_cfg_t);
uint32_t num_txn_overrides = sizeof(mc_override_cfgs) / sizeof(mc_txn_override_cfg_t); uint32_t num_txn_overrides = sizeof(mc_override_cfgs) / sizeof(mc_txn_override_cfg_t);
uint32_t chip_minor, chip_major;
int i; int i;
INFO("Tegra Memory Controller (v2)\n"); INFO("Tegra Memory Controller (v2)\n");
...@@ -543,12 +543,8 @@ void tegra_memctrl_setup(void) ...@@ -543,12 +543,8 @@ void tegra_memctrl_setup(void)
/* /*
* Set the MC_TXN_OVERRIDE registers for write clients. * Set the MC_TXN_OVERRIDE registers for write clients.
*/ */
chip_major = (mmio_read_32(TEGRA_MISC_BASE + HARDWARE_REVISION_OFFSET) >> if (!tegra_platform_is_silicon() ||
MAJOR_VERSION_SHIFT) & MAJOR_VERSION_MASK; (tegra_platform_is_silicon() && tegra_get_chipid_minor() == 1)) {
chip_minor = (mmio_read_32(TEGRA_MISC_BASE + HARDWARE_REVISION_OFFSET) >>
MINOR_VERSION_SHIFT) & MINOR_VERSION_MASK;
if ((chip_major == 0) || (chip_major > 0 && chip_minor == 1)) {
/* GPU and NVENC settings for rev. A01 */ /* GPU and NVENC settings for rev. A01 */
val = tegra_mc_read_32(MC_TXN_OVERRIDE_CONFIG_GPUSWR); val = tegra_mc_read_32(MC_TXN_OVERRIDE_CONFIG_GPUSWR);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment