Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754026AbcKHQte (ORCPT ); Tue, 8 Nov 2016 11:49:34 -0500 Received: from up.free-electrons.com ([163.172.77.33]:52244 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751976AbcKHQta (ORCPT ); Tue, 8 Nov 2016 11:49:30 -0500 Date: Tue, 8 Nov 2016 17:48:51 +0100 From: Thomas Petazzoni To: Marcin Wojtas Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sebastian.hesselbarth@gmail.com, andrew@lunn.ch, jason@lakedaemon.net, gregory.clement@free-electrons.com, will.deacon@arm.com, robh+dt@kernel.org, mark.rutland@arm.com, nadavh@marvell.com, alior@marvell.com, jaz@semihalf.com, tn@semihalf.com Subject: Re: [PATCH] arm64: dts: marvell: add unique identifiers for Armada A8k SPI controllers Message-ID: <20161108174851.2cd8efb4@free-electrons.com> In-Reply-To: <1478622692-18441-1-git-send-email-mw@semihalf.com> References: <1478622692-18441-1-git-send-email-mw@semihalf.com> Organization: Free Electrons X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1457 Lines: 38 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 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. Therefore: Acked-by: Thomas Petazzoni Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com