Lines Matching +full:bit +full:- +full:shift
1 // SPDX-License-Identifier: GPL-2.0-only
10 #include <dt-bindings/memory/tegra30-mc.h>
43 .shift = 0,
56 .bit = 1,
60 .shift = 0,
73 .bit = 2,
77 .shift = 0,
90 .bit = 3,
94 .shift = 16,
107 .bit = 4,
111 .shift = 16,
124 .bit = 5,
128 .shift = 0,
141 .bit = 6,
145 .shift = 0,
158 .bit = 7,
162 .shift = 16,
175 .bit = 8,
179 .shift = 16,
192 .bit = 9,
196 .shift = 0,
209 .bit = 10,
213 .shift = 0,
226 .bit = 11,
230 .shift = 16,
243 .bit = 12,
247 .shift = 0,
260 .bit = 13,
264 .shift = 0,
277 .bit = 14,
281 .shift = 0,
294 .bit = 15,
298 .shift = 0,
311 .bit = 16,
315 .shift = 0,
328 .bit = 17,
332 .shift = 0,
345 .bit = 18,
349 .shift = 0,
362 .bit = 19,
366 .shift = 0,
379 .bit = 20,
383 .shift = 0,
396 .bit = 21,
400 .shift = 0,
413 .bit = 22,
417 .shift = 0,
430 .bit = 23,
434 .shift = 16,
447 .bit = 24,
451 .shift = 16,
464 .bit = 25,
468 .shift = 16,
481 .bit = 26,
485 .shift = 16,
498 .bit = 27,
502 .shift = 0,
515 .bit = 28,
519 .shift = 16,
532 .bit = 29,
536 .shift = 0,
549 .bit = 30,
553 .shift = 16,
566 .bit = 31,
570 .shift = 0,
583 .bit = 0,
587 .shift = 0,
600 .bit = 1,
604 .shift = 0,
617 .bit = 2,
621 .shift = 0,
634 .bit = 3,
638 .shift = 16,
651 .bit = 4,
655 .shift = 0,
668 .bit = 5,
672 .shift = 16,
685 .shift = 0,
698 .shift = 0,
711 .bit = 8,
715 .shift = 16,
728 .bit = 9,
732 .shift = 0,
745 .bit = 10,
749 .shift = 16,
762 .bit = 11,
766 .shift = 0,
779 .bit = 12,
783 .shift = 16,
796 .bit = 13,
800 .shift = 0,
813 .bit = 14,
817 .shift = 16,
830 .bit = 15,
834 .shift = 0,
847 .bit = 16,
851 .shift = 16,
864 .bit = 17,
868 .shift = 16,
881 .bit = 18,
885 .shift = 16,
898 .bit = 19,
902 .shift = 16,
915 .bit = 20,
919 .shift = 16,
932 .bit = 21,
936 .shift = 16,
949 .bit = 22,
953 .shift = 0,
966 .bit = 23,
970 .shift = 0,
983 .shift = 16,
996 .shift = 16,
1009 .bit = 26,
1013 .shift = 16,
1026 .bit = 27,
1030 .shift = 0,
1043 .bit = 28,
1047 .shift = 16,
1060 .bit = 29,
1064 .shift = 16,
1077 .bit = 30,
1081 .shift = 0,
1094 .bit = 31,
1098 .shift = 16,
1111 .bit = 0,
1115 .shift = 0,
1128 .bit = 1,
1132 .shift = 16,
1195 .bit = _bit, \
1224 unsigned int fifo_size = client->fifo_size; in tegra30_mc_tune_client_latency()
1244 switch (client->swgroup) { in tegra30_mc_tune_client_latency()
1271 arb_nsec -= arb_tolerance_compensation_nsec; in tegra30_mc_tune_client_latency()
1279 * client may wait in the EMEM arbiter before it becomes a high-priority in tegra30_mc_tune_client_latency()
1282 la_ticks = arb_nsec / mc->tick; in tegra30_mc_tune_client_latency()
1283 la_ticks = min(la_ticks, client->regs.la.mask); in tegra30_mc_tune_client_latency()
1285 value = mc_readl(mc, client->regs.la.reg); in tegra30_mc_tune_client_latency()
1286 value &= ~(client->regs.la.mask << client->regs.la.shift); in tegra30_mc_tune_client_latency()
1287 value |= la_ticks << client->regs.la.shift; in tegra30_mc_tune_client_latency()
1288 mc_writel(mc, value, client->regs.la.reg); in tegra30_mc_tune_client_latency()
1293 struct tegra_mc *mc = icc_provider_to_tegra_mc(src->provider); in tegra30_mc_icc_set()
1294 const struct tegra_mc_client *client = &mc->soc->clients[src->id]; in tegra30_mc_icc_set()
1295 u64 peak_bandwidth = icc_units_to_bps(src->peak_bw); in tegra30_mc_icc_set()
1298 * Skip pre-initialization that is done by icc_node_add(), which sets in tegra30_mc_icc_set()
1320 * ISO clients need to reserve extra bandwidth up-front because in tegra30_mc_icc_aggreate()
1339 unsigned int i, idx = spec->args[0]; in tegra30_mc_of_icc_xlate_extended()
1343 list_for_each_entry(node, &mc->provider.nodes, node_list) { in tegra30_mc_of_icc_xlate_extended()
1344 if (node->id != idx) in tegra30_mc_of_icc_xlate_extended()
1349 return ERR_PTR(-ENOMEM); in tegra30_mc_of_icc_xlate_extended()
1351 client = &mc->soc->clients[idx]; in tegra30_mc_of_icc_xlate_extended()
1352 ndata->node = node; in tegra30_mc_of_icc_xlate_extended()
1354 switch (client->swgroup) { in tegra30_mc_of_icc_xlate_extended()
1360 ndata->tag = TEGRA_MC_ICC_TAG_ISO; in tegra30_mc_of_icc_xlate_extended()
1364 ndata->tag = TEGRA_MC_ICC_TAG_DEFAULT; in tegra30_mc_of_icc_xlate_extended()
1371 for (i = 0; i < mc->soc->num_clients; i++) { in tegra30_mc_of_icc_xlate_extended()
1372 if (mc->soc->clients[i].id == idx) in tegra30_mc_of_icc_xlate_extended()
1373 return ERR_PTR(-EPROBE_DEFER); in tegra30_mc_of_icc_xlate_extended()
1376 dev_err(mc->dev, "invalid ICC client ID %u\n", idx); in tegra30_mc_of_icc_xlate_extended()
1378 return ERR_PTR(-EINVAL); in tegra30_mc_of_icc_xlate_extended()