* [PATCH] spi: spi-mpc52xx.c: Init bus_num to 0 as this driver only supports one bus @ 2012-11-26 10:09 Stefan Roese [not found] ` <1353924587-31339-1-git-send-email-sr-ynQEQJNshbs@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Stefan Roese @ 2012-11-26 10:09 UTC (permalink / raw) To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Anatolij Gustschin By setting bus_num to 0 the resulting device is named "spi0". Otherwise the name was "spi32766" (dynamic numbering) which was a bit confusing. Using 0 is correct as this driver (and the MPC5200 SPI controller) only supports one SPI bus. Signed-off-by: Stefan Roese <sr-ynQEQJNshbs@public.gmane.org> Cc: Anatolij Gustschin <agust-ynQEQJNshbs@public.gmane.org> Cc: grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org --- drivers/spi/spi-mpc52xx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/spi-mpc52xx.c b/drivers/spi/spi-mpc52xx.c index 0454106..b40370c 100644 --- a/drivers/spi/spi-mpc52xx.c +++ b/drivers/spi/spi-mpc52xx.c @@ -438,6 +438,9 @@ static int __devinit mpc52xx_spi_probe(struct platform_device *op) master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST; master->dev.of_node = op->dev.of_node; + /* Only one SPI bus from this driver possible */ + master->bus_num = 0; + dev_set_drvdata(&op->dev, master); ms = spi_master_get_devdata(master); -- 1.8.0 ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <1353924587-31339-1-git-send-email-sr-ynQEQJNshbs@public.gmane.org>]
* Re: [PATCH] spi: spi-mpc52xx.c: Init bus_num to 0 as this driver only supports one bus [not found] ` <1353924587-31339-1-git-send-email-sr-ynQEQJNshbs@public.gmane.org> @ 2012-12-06 14:37 ` Grant Likely 2012-12-06 14:50 ` Stefan Roese 0 siblings, 1 reply; 3+ messages in thread From: Grant Likely @ 2012-12-06 14:37 UTC (permalink / raw) To: Stefan Roese, spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Cc: Anatolij Gustschin On Mon, 26 Nov 2012 11:09:47 +0100, Stefan Roese <sr-ynQEQJNshbs@public.gmane.org> wrote: > By setting bus_num to 0 the resulting device is named "spi0". Otherwise > the name was "spi32766" (dynamic numbering) which was a bit confusing. > > Using 0 is correct as this driver (and the MPC5200 SPI controller) only > supports one SPI bus. But the chip has multiple SPI busses. If the psc spi bus gets probed first, then there will be a number conflict. g. > > Signed-off-by: Stefan Roese <sr-ynQEQJNshbs@public.gmane.org> > Cc: Anatolij Gustschin <agust-ynQEQJNshbs@public.gmane.org> > Cc: grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org > --- > drivers/spi/spi-mpc52xx.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/spi/spi-mpc52xx.c b/drivers/spi/spi-mpc52xx.c > index 0454106..b40370c 100644 > --- a/drivers/spi/spi-mpc52xx.c > +++ b/drivers/spi/spi-mpc52xx.c > @@ -438,6 +438,9 @@ static int __devinit mpc52xx_spi_probe(struct platform_device *op) > master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST; > master->dev.of_node = op->dev.of_node; > > + /* Only one SPI bus from this driver possible */ > + master->bus_num = 0; > + > dev_set_drvdata(&op->dev, master); > > ms = spi_master_get_devdata(master); > -- > 1.8.0 > -- Grant Likely, B.Sc, P.Eng. Secret Lab Technologies, Ltd. ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: spi-mpc52xx.c: Init bus_num to 0 as this driver only supports one bus 2012-12-06 14:37 ` Grant Likely @ 2012-12-06 14:50 ` Stefan Roese 0 siblings, 0 replies; 3+ messages in thread From: Stefan Roese @ 2012-12-06 14:50 UTC (permalink / raw) To: Grant Likely Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Anatolij Gustschin On 12/06/2012 03:37 PM, Grant Likely wrote: > On Mon, 26 Nov 2012 11:09:47 +0100, Stefan Roese <sr-ynQEQJNshbs@public.gmane.org> wrote: >> By setting bus_num to 0 the resulting device is named "spi0". Otherwise >> the name was "spi32766" (dynamic numbering) which was a bit confusing. >> >> Using 0 is correct as this driver (and the MPC5200 SPI controller) only >> supports one SPI bus. > > But the chip has multiple SPI busses. If the psc spi bus gets probed > first, then there will be a number conflict. Yes, correct. Lets drop this patch for now then. Thanks, Stefan ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-12-06 14:50 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-11-26 10:09 [PATCH] spi: spi-mpc52xx.c: Init bus_num to 0 as this driver only supports one bus Stefan Roese [not found] ` <1353924587-31339-1-git-send-email-sr-ynQEQJNshbs@public.gmane.org> 2012-12-06 14:37 ` Grant Likely 2012-12-06 14:50 ` Stefan Roese
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).