mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 13:44:15 +08:00
f62e3f595c
The function imx_icc_unregister() returns zero unconditionally. Make it return void. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220718121409.171773-9-u.kleine-koenig@pengutronix.de Signed-off-by: Georgi Djakov <djakov@kernel.org>
97 lines
2.9 KiB
C
97 lines
2.9 KiB
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Interconnect framework driver for i.MX8MN SoC
|
|
*
|
|
* Copyright (c) 2019-2020, NXP
|
|
*/
|
|
|
|
#include <linux/module.h>
|
|
#include <linux/platform_device.h>
|
|
#include <dt-bindings/interconnect/imx8mn.h>
|
|
|
|
#include "imx.h"
|
|
|
|
static const struct imx_icc_node_adj_desc imx8mn_dram_adj = {
|
|
.bw_mul = 1,
|
|
.bw_div = 4,
|
|
.phandle_name = "fsl,ddrc",
|
|
};
|
|
|
|
static const struct imx_icc_node_adj_desc imx8mn_noc_adj = {
|
|
.bw_mul = 1,
|
|
.bw_div = 4,
|
|
.main_noc = true,
|
|
};
|
|
|
|
/*
|
|
* Describe bus masters, slaves and connections between them
|
|
*
|
|
* This is a simplified subset of the bus diagram, there are several other
|
|
* PL301 nics which are skipped/merged into PL301_MAIN
|
|
*/
|
|
static struct imx_icc_node_desc nodes[] = {
|
|
DEFINE_BUS_INTERCONNECT("NOC", IMX8MN_ICN_NOC, &imx8mn_noc_adj,
|
|
IMX8MN_ICS_DRAM, IMX8MN_ICN_MAIN),
|
|
|
|
DEFINE_BUS_SLAVE("DRAM", IMX8MN_ICS_DRAM, &imx8mn_dram_adj),
|
|
DEFINE_BUS_SLAVE("OCRAM", IMX8MN_ICS_OCRAM, NULL),
|
|
DEFINE_BUS_MASTER("A53", IMX8MN_ICM_A53, IMX8MN_ICN_NOC),
|
|
|
|
/* GPUMIX */
|
|
DEFINE_BUS_MASTER("GPU", IMX8MN_ICM_GPU, IMX8MN_ICN_GPU),
|
|
DEFINE_BUS_INTERCONNECT("PL301_GPU", IMX8MN_ICN_GPU, NULL, IMX8MN_ICN_NOC),
|
|
|
|
/* DISPLAYMIX */
|
|
DEFINE_BUS_MASTER("CSI1", IMX8MN_ICM_CSI1, IMX8MN_ICN_MIPI),
|
|
DEFINE_BUS_MASTER("CSI2", IMX8MN_ICM_CSI2, IMX8MN_ICN_MIPI),
|
|
DEFINE_BUS_MASTER("ISI", IMX8MN_ICM_ISI, IMX8MN_ICN_MIPI),
|
|
DEFINE_BUS_MASTER("LCDIF", IMX8MN_ICM_LCDIF, IMX8MN_ICN_MIPI),
|
|
DEFINE_BUS_INTERCONNECT("PL301_MIPI", IMX8MN_ICN_MIPI, NULL, IMX8MN_ICN_NOC),
|
|
|
|
/* USB goes straight to NOC */
|
|
DEFINE_BUS_MASTER("USB", IMX8MN_ICM_USB, IMX8MN_ICN_NOC),
|
|
|
|
/* Audio */
|
|
DEFINE_BUS_MASTER("SDMA2", IMX8MN_ICM_SDMA2, IMX8MN_ICN_AUDIO),
|
|
DEFINE_BUS_MASTER("SDMA3", IMX8MN_ICM_SDMA3, IMX8MN_ICN_AUDIO),
|
|
DEFINE_BUS_INTERCONNECT("PL301_AUDIO", IMX8MN_ICN_AUDIO, NULL, IMX8MN_ICN_MAIN),
|
|
|
|
/* Ethernet */
|
|
DEFINE_BUS_MASTER("ENET", IMX8MN_ICM_ENET, IMX8MN_ICN_ENET),
|
|
DEFINE_BUS_INTERCONNECT("PL301_ENET", IMX8MN_ICN_ENET, NULL, IMX8MN_ICN_MAIN),
|
|
|
|
/* Other */
|
|
DEFINE_BUS_MASTER("SDMA1", IMX8MN_ICM_SDMA1, IMX8MN_ICN_MAIN),
|
|
DEFINE_BUS_MASTER("NAND", IMX8MN_ICM_NAND, IMX8MN_ICN_MAIN),
|
|
DEFINE_BUS_MASTER("USDHC1", IMX8MN_ICM_USDHC1, IMX8MN_ICN_MAIN),
|
|
DEFINE_BUS_MASTER("USDHC2", IMX8MN_ICM_USDHC2, IMX8MN_ICN_MAIN),
|
|
DEFINE_BUS_MASTER("USDHC3", IMX8MN_ICM_USDHC3, IMX8MN_ICN_MAIN),
|
|
DEFINE_BUS_INTERCONNECT("PL301_MAIN", IMX8MN_ICN_MAIN, NULL,
|
|
IMX8MN_ICN_NOC, IMX8MN_ICS_OCRAM),
|
|
};
|
|
|
|
static int imx8mn_icc_probe(struct platform_device *pdev)
|
|
{
|
|
return imx_icc_register(pdev, nodes, ARRAY_SIZE(nodes), NULL);
|
|
}
|
|
|
|
static int imx8mn_icc_remove(struct platform_device *pdev)
|
|
{
|
|
imx_icc_unregister(pdev);
|
|
|
|
return 0;
|
|
}
|
|
|
|
static struct platform_driver imx8mn_icc_driver = {
|
|
.probe = imx8mn_icc_probe,
|
|
.remove = imx8mn_icc_remove,
|
|
.driver = {
|
|
.name = "imx8mn-interconnect",
|
|
},
|
|
};
|
|
|
|
module_platform_driver(imx8mn_icc_driver);
|
|
MODULE_ALIAS("platform:imx8mn-interconnect");
|
|
MODULE_AUTHOR("Leonard Crestez <leonard.crestez@nxp.com>");
|
|
MODULE_LICENSE("GPL v2");
|