summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorHerve Codina <herve.codina@bootlin.com>2024-08-08 09:11:24 +0200
committerChristophe Leroy <christophe.leroy@csgroup.eu>2024-09-03 07:49:20 +0200
commitb741b66f1cc83105fdea9ac5503c5ac106a37494 (patch)
tree4bf59e630f3d16c0306281e9b1ca20a094ae11a6 /drivers/soc
parent8f55d06b4c49a8bf1a911bce89b6ee9460b8b052 (diff)
downloadlwn-b741b66f1cc83105fdea9ac5503c5ac106a37494.tar.gz
lwn-b741b66f1cc83105fdea9ac5503c5ac106a37494.zip
soc: fsl: cpm1: qmc: Introduce qmc_version
Current code handles the CPM1 version of QMC. In order to prepare the support for the QUICC Engine (QE) version of QMC, introduce qmc_version to identify versions. This will enable the code to make the distinction between several QMC implementations. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> Link: https://lore.kernel.org/r/20240808071132.149251-32-herve.codina@bootlin.com Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/fsl/qe/qmc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c
index 062477b7426e..8ff7eaaa4c50 100644
--- a/drivers/soc/fsl/qe/qmc.c
+++ b/drivers/soc/fsl/qe/qmc.c
@@ -215,7 +215,12 @@ struct qmc_chan {
bool is_rx_stopped;
};
+enum qmc_version {
+ QMC_CPM1,
+};
+
struct qmc_data {
+ enum qmc_version version;
u32 tstate; /* Initial TSTATE value */
u32 rstate; /* Initial RSTATE value */
u32 zistate; /* Initial ZISTATE value */
@@ -1811,6 +1816,7 @@ static void qmc_remove(struct platform_device *pdev)
}
static const struct qmc_data qmc_data_cpm1 = {
+ .version = QMC_CPM1,
.tstate = 0x30000000,
.rstate = 0x31000000,
.zistate = 0x00000100,