[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJMQK-iyE6myo4KVBYz-0V5HHXi89Eix8fB1CdfvXFRk0fJG5g@mail.gmail.com>
Date: Thu, 16 Sep 2021 14:05:25 +0800
From: Hsin-Yi Wang <hsinyi@...omium.org>
To: Enric Balletbo i Serra <enric.balletbo@...labora.com>
Cc: lkml <linux-kernel@...r.kernel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@...ts.infradead.org>,
Jitao Shi <jitao.shi@...iatek.com>,
Eizan Miyamoto <eizan@...omium.org>,
Nicolas Boichat <drinkcat@...omium.org>,
Chun-Kuang Hu <chunkuang.hu@...nel.org>,
Collabora Kernel ML <kernel@...labora.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v3 6/7] soc: mediatek: mmsys: Add reset controller support
On Wed, Aug 25, 2021 at 6:26 PM Enric Balletbo i Serra
<enric.balletbo@...labora.com> wrote:
>
> Among other features the mmsys driver should implement a reset
> controller to be able to reset different bits from their space.
>
> Cc: Jitao Shi <jitao.shi@...iatek.com>
> Suggested-by: Chun-Kuang Hu <chunkuang.hu@...nel.org>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@...labora.com>
> Reviewed-by: Philipp Zabel <p.zabel@...gutronix.de>
> ---
>
> (no changes since v1)
>
<snip>
> +static int mtk_mmsys_reset_update(struct reset_controller_dev *rcdev, unsigned long id,
> + bool assert)
> +{
> + struct mtk_mmsys *mmsys = container_of(rcdev, struct mtk_mmsys, rcdev);
> + unsigned long flags;
> + u32 reg;
> + int i;
This variable is not used.
> +
> + spin_lock_irqsave(&mmsys->lock, flags);
> +
> + reg = readl_relaxed(mmsys->regs + MMSYS_SW0_RST_B);
> +
> + if (assert)
> + reg &= ~BIT(id);
> + else
> + reg |= BIT(id);
> +
> + writel_relaxed(reg, mmsys->regs + MMSYS_SW0_RST_B);
> +
> + spin_unlock_irqrestore(&mmsys->lock, flags);
> +
> + return 0;
> +}
> +
<snip>
Powered by blists - more mailing lists