Re: [PATCH 11/13] rapidio: modify for rev.3 specification changes
Andrew Morton writes: > On Wed, 27 Jul 2016 14:53:25 +1000 Michael Ellerman > wrote: >> arch/powerpc/sysdev/fsl_rio.c:702:11: error: 'struct rio_mport' has no >> member named 'phy_type' >> arch/powerpc/sysdev/fsl_rio.c:702:25: error: 'RIO_PHY_SERIAL' undeclared >> (first use in this function) > > I'll go out on a limb and assume it's this: > > --- > a/arch/powerpc/sysdev/fsl_rio.c~powerpc-fsl_rio-apply-changes-for-rio-spec-rev-3-fix > +++ a/arch/powerpc/sysdev/fsl_rio.c > @@ -698,11 +698,6 @@ int fsl_rio_setup(struct platform_device > RIO_INB_ATMU_REGS_PORT2_OFFSET)); > > > - /* Set to receive any dist ID for serial RapidIO controller. */ > - if (port->phy_type == RIO_PHY_SERIAL) > - out_be32((priv->regs_win > - + RIO_ISR_AACR + i*0x80), RIO_ISR_AACR_AA); > - Yep, thanks. Hopefully someone somewhere is testing this on powerpc, I don't have one of those FSL boxes. But at least it will build now. cheers
Re: [PATCH 11/13] rapidio: modify for rev.3 specification changes
On Wed, 27 Jul 2016 14:53:25 +1000 Michael Ellerman wrote: > Alexandre Bounine writes: > > > Implement changes made in RapidIO specification rev.3 to LP-Serial Physical > > Layer register definitions: > > - use per-port register offset calculations based on LP-Serial Extended > > Features Block (EFB) Register Map type (I or II) with different per-port > > offset step (0x20 vs. 0x40 respectfully). > > - remove deprecated Parallel Physical layer definitions and related code. > > > > Signed-off-by: Alexandre Bounine > > Tested-by: Barry Wood > > Cc: Matt Porter > > Cc: Andre van Herk > > Cc: Barry Wood > > Cc: linux-kernel@vger.kernel.org > > --- > > drivers/rapidio/devices/rio_mport_cdev.c |2 +- > > drivers/rapidio/devices/tsi721.c |8 +- > > drivers/rapidio/rio-scan.c | 74 +++-- > > drivers/rapidio/rio.c| 149 ++- > > drivers/rapidio/rio.h|2 +- > > drivers/rapidio/switches/tsi57x.c| 26 ++--- > > include/linux/rio.h | 11 +-- > > include/linux/rio_regs.h | 167 > > +++-- > > 8 files changed, 248 insertions(+), 191 deletions(-) > > This is breaking the build for me on powerpc, for > corenet64_smp_defconfig at least. > > eg. > > http://kisskb.ellerman.id.au/kisskb/buildresult/12750751/ > > Commit: Add linux-next specific files for 20160722 > 13123042d0dbf7635f052efc2ae69fd9af624f1d > Compiler: powerpc-linux-gcc (GCC) 4.6.3 > > Possible errors > --- > > arch/powerpc/sysdev/fsl_rio.c:702:11: error: 'struct rio_mport' has no member > named 'phy_type' > arch/powerpc/sysdev/fsl_rio.c:702:25: error: 'RIO_PHY_SERIAL' undeclared > (first use in this function) > make[2]: *** [arch/powerpc/sysdev/fsl_rio.o] Error 1 > make[1]: *** [arch/powerpc/sysdev] Error 2 > make: *** [sub-make] Error 2 I'll go out on a limb and assume it's this: --- a/arch/powerpc/sysdev/fsl_rio.c~powerpc-fsl_rio-apply-changes-for-rio-spec-rev-3-fix +++ a/arch/powerpc/sysdev/fsl_rio.c @@ -698,11 +698,6 @@ int fsl_rio_setup(struct platform_device RIO_INB_ATMU_REGS_PORT2_OFFSET)); - /* Set to receive any dist ID for serial RapidIO controller. */ - if (port->phy_type == RIO_PHY_SERIAL) - out_be32((priv->regs_win - + RIO_ISR_AACR + i*0x80), RIO_ISR_AACR_AA); - /* Configure maintenance transaction window */ out_be32(&priv->maint_atmu_regs->rowbar, port->iores.start >> 12); _
RE: [PATCH 11/13] rapidio: modify for rev.3 specification changes
Hi Michael, Alex is currently on vacation, but will return August 2. He will resolve this issue at that time. Cheers, Barry -Original Message- From: Michael Ellerman [mailto:m...@ellerman.id.au] Sent: Wednesday, July 27, 2016 12:53 AM To: Bounine, Alexandre; Andrew Morton Cc: Bounine, Alexandre; Matt Porter; Andre van Herk; Wood, Barry; linux-kernel@vger.kernel.org Subject: Re: [PATCH 11/13] rapidio: modify for rev.3 specification changes Alexandre Bounine writes: > Implement changes made in RapidIO specification rev.3 to LP-Serial > Physical Layer register definitions: > - use per-port register offset calculations based on LP-Serial Extended > Features Block (EFB) Register Map type (I or II) with different per-port > offset step (0x20 vs. 0x40 respectfully). > - remove deprecated Parallel Physical layer definitions and related code. > > Signed-off-by: Alexandre Bounine > Tested-by: Barry Wood > Cc: Matt Porter > Cc: Andre van Herk > Cc: Barry Wood > Cc: linux-kernel@vger.kernel.org > --- > drivers/rapidio/devices/rio_mport_cdev.c |2 +- > drivers/rapidio/devices/tsi721.c |8 +- > drivers/rapidio/rio-scan.c | 74 +++-- > drivers/rapidio/rio.c| 149 ++- > drivers/rapidio/rio.h|2 +- > drivers/rapidio/switches/tsi57x.c| 26 ++--- > include/linux/rio.h | 11 +-- > include/linux/rio_regs.h | 167 +++-- > 8 files changed, 248 insertions(+), 191 deletions(-) This is breaking the build for me on powerpc, for corenet64_smp_defconfig at least. eg. http://kisskb.ellerman.id.au/kisskb/buildresult/12750751/ Commit: Add linux-next specific files for 20160722 13123042d0dbf7635f052efc2ae69fd9af624f1d Compiler: powerpc-linux-gcc (GCC) 4.6.3 Possible errors --- arch/powerpc/sysdev/fsl_rio.c:702:11: error: 'struct rio_mport' has no member named 'phy_type' arch/powerpc/sysdev/fsl_rio.c:702:25: error: 'RIO_PHY_SERIAL' undeclared (first use in this function) make[2]: *** [arch/powerpc/sysdev/fsl_rio.o] Error 1 make[1]: *** [arch/powerpc/sysdev] Error 2 make: *** [sub-make] Error 2 cheers
Re: [PATCH 11/13] rapidio: modify for rev.3 specification changes
Alexandre Bounine writes: > Implement changes made in RapidIO specification rev.3 to LP-Serial Physical > Layer register definitions: > - use per-port register offset calculations based on LP-Serial Extended > Features Block (EFB) Register Map type (I or II) with different per-port > offset step (0x20 vs. 0x40 respectfully). > - remove deprecated Parallel Physical layer definitions and related code. > > Signed-off-by: Alexandre Bounine > Tested-by: Barry Wood > Cc: Matt Porter > Cc: Andre van Herk > Cc: Barry Wood > Cc: linux-kernel@vger.kernel.org > --- > drivers/rapidio/devices/rio_mport_cdev.c |2 +- > drivers/rapidio/devices/tsi721.c |8 +- > drivers/rapidio/rio-scan.c | 74 +++-- > drivers/rapidio/rio.c| 149 ++- > drivers/rapidio/rio.h|2 +- > drivers/rapidio/switches/tsi57x.c| 26 ++--- > include/linux/rio.h | 11 +-- > include/linux/rio_regs.h | 167 +++-- > 8 files changed, 248 insertions(+), 191 deletions(-) This is breaking the build for me on powerpc, for corenet64_smp_defconfig at least. eg. http://kisskb.ellerman.id.au/kisskb/buildresult/12750751/ Commit: Add linux-next specific files for 20160722 13123042d0dbf7635f052efc2ae69fd9af624f1d Compiler: powerpc-linux-gcc (GCC) 4.6.3 Possible errors --- arch/powerpc/sysdev/fsl_rio.c:702:11: error: 'struct rio_mport' has no member named 'phy_type' arch/powerpc/sysdev/fsl_rio.c:702:25: error: 'RIO_PHY_SERIAL' undeclared (first use in this function) make[2]: *** [arch/powerpc/sysdev/fsl_rio.o] Error 1 make[1]: *** [arch/powerpc/sysdev] Error 2 make: *** [sub-make] Error 2 cheers
[PATCH 11/13] rapidio: modify for rev.3 specification changes
Implement changes made in RapidIO specification rev.3 to LP-Serial Physical Layer register definitions: - use per-port register offset calculations based on LP-Serial Extended Features Block (EFB) Register Map type (I or II) with different per-port offset step (0x20 vs. 0x40 respectfully). - remove deprecated Parallel Physical layer definitions and related code. Signed-off-by: Alexandre Bounine Tested-by: Barry Wood Cc: Matt Porter Cc: Andre van Herk Cc: Barry Wood Cc: linux-kernel@vger.kernel.org --- drivers/rapidio/devices/rio_mport_cdev.c |2 +- drivers/rapidio/devices/tsi721.c |8 +- drivers/rapidio/rio-scan.c | 74 +++-- drivers/rapidio/rio.c| 149 ++- drivers/rapidio/rio.h|2 +- drivers/rapidio/switches/tsi57x.c| 26 ++--- include/linux/rio.h | 11 +-- include/linux/rio_regs.h | 167 +++-- 8 files changed, 248 insertions(+), 191 deletions(-) diff --git a/drivers/rapidio/devices/rio_mport_cdev.c b/drivers/rapidio/devices/rio_mport_cdev.c index de0c692..436dfe8 100644 --- a/drivers/rapidio/devices/rio_mport_cdev.c +++ b/drivers/rapidio/devices/rio_mport_cdev.c @@ -1813,7 +1813,7 @@ static int rio_mport_add_riodev(struct mport_cdev_priv *priv, if (rdev->pef & RIO_PEF_EXT_FEATURES) { rdev->efptr = rval & 0x; rdev->phys_efptr = rio_mport_get_physefb(mport, 0, destid, -hopcount); + hopcount, &rdev->phys_rmap); rdev->em_efptr = rio_mport_get_feature(mport, 0, destid, hopcount, RIO_EFB_ERR_MGMNT); diff --git a/drivers/rapidio/devices/tsi721.c b/drivers/rapidio/devices/tsi721.c index 53daf63..32f0f01 100644 --- a/drivers/rapidio/devices/tsi721.c +++ b/drivers/rapidio/devices/tsi721.c @@ -2555,11 +2555,11 @@ static int tsi721_query_mport(struct rio_mport *mport, struct tsi721_device *priv = mport->priv; u32 rval; - rval = ioread32(priv->regs + (0x100 + RIO_PORT_N_ERR_STS_CSR(0))); + rval = ioread32(priv->regs + 0x100 + RIO_PORT_N_ERR_STS_CSR(0, 0)); if (rval & RIO_PORT_N_ERR_STS_PORT_OK) { - rval = ioread32(priv->regs + (0x100 + RIO_PORT_N_CTL2_CSR(0))); + rval = ioread32(priv->regs + 0x100 + RIO_PORT_N_CTL2_CSR(0, 0)); attr->link_speed = (rval & RIO_PORT_N_CTL2_SEL_BAUD) >> 28; - rval = ioread32(priv->regs + (0x100 + RIO_PORT_N_CTL_CSR(0))); + rval = ioread32(priv->regs + 0x100 + RIO_PORT_N_CTL_CSR(0, 0)); attr->link_width = (rval & RIO_PORT_N_CTL_IPW) >> 27; } else attr->link_speed = RIO_LINK_DOWN; @@ -2673,9 +2673,9 @@ static int tsi721_setup_mport(struct tsi721_device *priv) mport->ops = &tsi721_rio_ops; mport->index = 0; mport->sys_size = 0; /* small system */ - mport->phy_type = RIO_PHY_SERIAL; mport->priv = (void *)priv; mport->phys_efptr = 0x100; + mport->phys_rmap = 1; mport->dev.parent = &pdev->dev; mport->dev.release = tsi721_mport_release; diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c index a63a380..23429bd 100644 --- a/drivers/rapidio/rio-scan.c +++ b/drivers/rapidio/rio-scan.c @@ -49,15 +49,6 @@ struct rio_id_table { static int next_destid = 0; static int next_comptag = 1; -static int rio_mport_phys_table[] = { - RIO_EFB_PAR_EP_ID, - RIO_EFB_PAR_EP_REC_ID, - RIO_EFB_SER_EP_ID, - RIO_EFB_SER_EP_REC_ID, - -1, -}; - - /** * rio_destid_alloc - Allocate next available destID for given network * @net: RIO network @@ -380,10 +371,15 @@ static struct rio_dev *rio_setup_device(struct rio_net *net, if (rdev->pef & RIO_PEF_EXT_FEATURES) { rdev->efptr = result & 0x; rdev->phys_efptr = rio_mport_get_physefb(port, 0, destid, -hopcount); + hopcount, &rdev->phys_rmap); + pr_debug("RIO: %s Register Map %d device\n", +__func__, rdev->phys_rmap); rdev->em_efptr = rio_mport_get_feature(port, 0, destid, hopcount, RIO_EFB_ERR_MGMNT); + if (!rdev->em_efptr) + rdev->em_efptr = rio_mport_get_feature(port, 0, destid, + hopcount, RIO_EFB_ERR_MGMNT_HS); } rio_mport_read_config_32(port, destid, hopcount, RIO_SRC_OPS_CAR, @@ -445,7 +441,7 @@ static struct rio_dev *rio_setup_device(struct rio_net *net, rio_route_clr_table(rdev, RIO_GLOBAL_TABLE, 0); } else {