Lines Matching +full:emc +full:- +full:tables
1 // SPDX-License-Identifier: GPL-2.0
8 #include "tegra210-emc.h"
15 struct tegra210_emc *emc = dev_get_drvdata(dev); in tegra210_emc_table_device_init() local
19 timings = memremap(rmem->base, rmem->size, MEMREMAP_WB); in tegra210_emc_table_device_init()
21 dev_err(dev, "failed to map EMC table\n"); in tegra210_emc_table_device_init()
22 return -ENOMEM; in tegra210_emc_table_device_init()
32 /* only the nominal and derated tables are expected */ in tegra210_emc_table_device_init()
33 if (emc->derated) { in tegra210_emc_table_device_init()
34 dev_warn(dev, "excess EMC table '%s'\n", rmem->name); in tegra210_emc_table_device_init()
38 if (emc->nominal) { in tegra210_emc_table_device_init()
39 if (count != emc->num_timings) { in tegra210_emc_table_device_init()
41 count, emc->num_timings); in tegra210_emc_table_device_init()
43 return -EINVAL; in tegra210_emc_table_device_init()
46 emc->derated = timings; in tegra210_emc_table_device_init()
48 emc->num_timings = count; in tegra210_emc_table_device_init()
49 emc->nominal = timings; in tegra210_emc_table_device_init()
54 rmem->priv = timings; in tegra210_emc_table_device_init()
62 struct tegra210_emc_timing *timings = rmem->priv; in tegra210_emc_table_device_release()
63 struct tegra210_emc *emc = dev_get_drvdata(dev); in tegra210_emc_table_device_release() local
65 if ((emc->nominal && timings != emc->nominal) && in tegra210_emc_table_device_release()
66 (emc->derated && timings != emc->derated)) in tegra210_emc_table_device_release()
67 dev_warn(dev, "trying to release unassigned EMC table '%s'\n", in tegra210_emc_table_device_release()
68 rmem->name); in tegra210_emc_table_device_release()
80 pr_debug("Tegra210 EMC table at %pa, size %lu bytes\n", &rmem->base, in tegra210_emc_table_init()
81 (unsigned long)rmem->size); in tegra210_emc_table_init()
83 rmem->ops = &tegra210_emc_table_ops; in tegra210_emc_table_init()
87 RESERVEDMEM_OF_DECLARE(tegra210_emc_table, "nvidia,tegra210-emc-table",