From 81216c014f760b5f5ae9c61cb69fb5990de03c74 Mon Sep 17 00:00:00 2001 From: Mike Tipton Date: Thu, 6 May 2021 16:51:35 -0700 Subject: [PATCH] interconnect: qcom: qnoc-qos: Don't skip writing urg_fwd when it's zero Some QoS enable urgent forwarding by default, but we don't always want this. So don't assume the register already has zero and write it unconditionally. Change-Id: I257e099a588870f8d6e6d68b7fd794e22781450e Signed-off-by: Mike Tipton --- drivers/interconnect/qcom/qnoc-qos.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/interconnect/qcom/qnoc-qos.c b/drivers/interconnect/qcom/qnoc-qos.c index cf78e497e743..2eb98897a216 100644 --- a/drivers/interconnect/qcom/qnoc-qos.c +++ b/drivers/interconnect/qcom/qnoc-qos.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. * */ @@ -13,7 +13,7 @@ #define QOSGEN_MAINCTL_LO(p, qp) ((p)->offsets[qp] + \ (p)->regs[QOSGEN_OFF_MAINCTL_LO]) -# define QOS_SLV_URG_MSG_EN BIT(3) +#define QOS_SLV_URG_MSG_EN_SHFT 3 # define QOS_DFLT_PRIO_MASK 0x7 # define QOS_DFLT_PRIO_SHFT 4 @@ -49,11 +49,9 @@ static void qcom_icc_set_qos(struct qcom_icc_node *node) QOS_DFLT_PRIO_MASK << QOS_DFLT_PRIO_SHFT, qos->config->prio << QOS_DFLT_PRIO_SHFT); - if (qos->config->urg_fwd) - regmap_update_bits(node->regmap, - QOSGEN_MAINCTL_LO(qos, port), - QOS_SLV_URG_MSG_EN, - QOS_SLV_URG_MSG_EN); + regmap_update_bits(node->regmap, QOSGEN_MAINCTL_LO(qos, port), + BIT(QOS_SLV_URG_MSG_EN_SHFT), + qos->config->urg_fwd << QOS_SLV_URG_MSG_EN_SHFT); } }