[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPv3WKdPO4Rsjq2y=sW0JyBAqr_NPRedGbY0qabwYiU8QBPbDg@mail.gmail.com>
Date: Tue, 8 Nov 2016 17:52:50 +0100
From: Marcin Wojtas <mw@...ihalf.com>
To: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
Cc: linux-kernel@...r.kernel.org,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Jason Cooper <jason@...edaemon.net>,
Gregory Clément
<gregory.clement@...e-electrons.com>,
Will Deacon <will.deacon@....com>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>, nadavh@...vell.com,
Lior Amsalem <alior@...vell.com>,
"jaz@...ihalf.com" <jaz@...ihalf.com>,
Tomasz Nowicki <tn@...ihalf.com>
Subject: Re: [PATCH] arm64: dts: marvell: add unique identifiers for Armada
A8k SPI controllers
Hi Thomas,
2016-11-08 17:48 GMT+01:00 Thomas Petazzoni
<thomas.petazzoni@...e-electrons.com>:
> Hello,
>
> On Tue, 8 Nov 2016 17:31:32 +0100, Marcin Wojtas wrote:
>> Enabling SPI controllers, which are attached to different busses
>> inside an SoC, may result in overlapping enumeration and cause
>> sysfs registration failure. Example log after enabling two
>> controllers on Armada 8040 SoC with same identifiers:
>>
>> [ 3.740415] sysfs: cannot create duplicate filename
>> '/class/spi_master/spi0'
>> [ 3.747510] ------------[ cut here ]------------
>> [ 3.752145] WARNING: at fs/sysfs/dir.c:31
>> [...]
>> [ 4.002299] orion_spi: probe of f4700600.spi failed with error -17
>>
>> spi-orion driver offers dedicated DT property ('cell-index'), that
>> allow setting unique identifiers. Recently added support for CP110-slave
>> HW block introduced two new SPI controllers' nodes with same ID as
>> ones from CP110-master.
>>
>> This commit fixes the issue by assigning different 'cell-index' values
>> for CP110-slave SPI controllers.
>>
>> Fixes: 4eef78a0091b ("arm64: dts: marvell: add description for the slave
>> CP110 in Armada 8K")
>> Signed-off-by: Marcin Wojtas <mw@...ihalf.com>
>
> It's sad that we need to hardcode those indexes in the Device Tree
> (which by no means are a description of the HW by the way), but that's
> what the SPI framework expects I believe.
Right. Devices are enumerated by generic code beginning from '0' on
each bus (AP806, CP110-master, CP110-slave) independently and
I didn't see any nice solution for it either.
> Therefore:
>
> Acked-by: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
>
Thanks,
Marcin
Powered by blists - more mailing lists