tegra124-emc.c (4f2c0a4acffbec01079c28f839422e64ddeff004) | tegra124-emc.c (abd9f1b49cf25eebeaba193c7707355be3f48dae) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. 4 * 5 * Author: 6 * Mikko Perttunen <mperttunen@nvidia.com> 7 */ 8 --- 1337 unchanged lines hidden (view full) --- 1346 int err; 1347 1348 emc->provider.dev = emc->dev; 1349 emc->provider.set = emc_icc_set; 1350 emc->provider.data = &emc->provider; 1351 emc->provider.aggregate = soc->icc_ops->aggregate; 1352 emc->provider.xlate_extended = emc_of_icc_xlate_extended; 1353 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. 4 * 5 * Author: 6 * Mikko Perttunen <mperttunen@nvidia.com> 7 */ 8 --- 1337 unchanged lines hidden (view full) --- 1346 int err; 1347 1348 emc->provider.dev = emc->dev; 1349 emc->provider.set = emc_icc_set; 1350 emc->provider.data = &emc->provider; 1351 emc->provider.aggregate = soc->icc_ops->aggregate; 1352 emc->provider.xlate_extended = emc_of_icc_xlate_extended; 1353 |
1354 err = icc_provider_add(&emc->provider); 1355 if (err) 1356 goto err_msg; | 1354 icc_provider_init(&emc->provider); |
1357 1358 /* create External Memory Controller node */ 1359 node = icc_node_create(TEGRA_ICC_EMC); 1360 if (IS_ERR(node)) { 1361 err = PTR_ERR(node); | 1355 1356 /* create External Memory Controller node */ 1357 node = icc_node_create(TEGRA_ICC_EMC); 1358 if (IS_ERR(node)) { 1359 err = PTR_ERR(node); |
1362 goto del_provider; | 1360 goto err_msg; |
1363 } 1364 1365 node->name = "External Memory Controller"; 1366 icc_node_add(node, &emc->provider); 1367 1368 /* link External Memory Controller to External Memory (DRAM) */ 1369 err = icc_link_create(node, TEGRA_ICC_EMEM); 1370 if (err) --- 4 unchanged lines hidden (view full) --- 1375 if (IS_ERR(node)) { 1376 err = PTR_ERR(node); 1377 goto remove_nodes; 1378 } 1379 1380 node->name = "External Memory (DRAM)"; 1381 icc_node_add(node, &emc->provider); 1382 | 1361 } 1362 1363 node->name = "External Memory Controller"; 1364 icc_node_add(node, &emc->provider); 1365 1366 /* link External Memory Controller to External Memory (DRAM) */ 1367 err = icc_link_create(node, TEGRA_ICC_EMEM); 1368 if (err) --- 4 unchanged lines hidden (view full) --- 1373 if (IS_ERR(node)) { 1374 err = PTR_ERR(node); 1375 goto remove_nodes; 1376 } 1377 1378 node->name = "External Memory (DRAM)"; 1379 icc_node_add(node, &emc->provider); 1380 |
1381 err = icc_provider_register(&emc->provider); 1382 if (err) 1383 goto remove_nodes; 1384 |
|
1383 return 0; 1384 1385remove_nodes: 1386 icc_nodes_remove(&emc->provider); | 1385 return 0; 1386 1387remove_nodes: 1388 icc_nodes_remove(&emc->provider); |
1387del_provider: 1388 icc_provider_del(&emc->provider); | |
1389err_msg: 1390 dev_err(emc->dev, "failed to initialize ICC: %d\n", err); 1391 1392 return err; 1393} 1394 1395static int tegra_emc_opp_table_init(struct tegra_emc *emc) 1396{ --- 139 unchanged lines hidden --- | 1389err_msg: 1390 dev_err(emc->dev, "failed to initialize ICC: %d\n", err); 1391 1392 return err; 1393} 1394 1395static int tegra_emc_opp_table_init(struct tegra_emc *emc) 1396{ --- 139 unchanged lines hidden --- |