[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5c281b1a-b6a7-c62e-6247-5d82ebd5e0d6@loongson.cn>
Date: Tue, 21 Mar 2023 10:54:32 +0800
From: zhuyinbo <zhuyinbo@...ngson.cn>
To: Mark Brown <broonie@...nel.org>
Cc: Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
zhuyinbo@...ngson.cn, linux-spi@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Jianmin Lv <lvjianmin@...ngson.cn>, wanghongliang@...ngson.cn,
Liu Peibao <liupeibao@...ngson.cn>,
loongson-kernel@...ts.loongnix.cn
Subject: Re: [PATCH v2 2/2] spi: loongson: add bus driver for the loongson spi
controller
在 2023/3/20 下午8:52, Mark Brown 写道:
> On Sat, Mar 18, 2023 at 02:07:16PM +0800, zhuyinbo wrote:
>> 在 2023/3/18 上午12:26, Mark Brown 写道:
>>> On Fri, Mar 17, 2023 at 04:29:50PM +0800, Yinbo Zhu wrote:
>>> As IIRC I mentioned last time setup() might be called while other
>>> transfers are happening and therefore shouldn't affect parallel
>>> operations on other devices.
>> I think add spin_lock in transfer_one interface that should be to fix this
>> issue, Do you think so?
> No, that doesn't help if setup() reconfigures the controller while it's
> doing a transfer. The issue is that the controller might be put into
> the wrong mode or run at the wrong speed.
sorry, I don't got that why cpu still can call setup's critical region
when cpu call transfer_one to transfer spi data.
when I added a spin_lock for setup and transfer_one then setup and
transfer_one's critical region cann't be called
simultaneously as I know, because the their lock was same lock.
Powered by blists - more mailing lists