RE: [PATCH 0/2] staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl
> -Original Message- > From: Roy Pledge > Sent: Friday, July 6, 2018 9:52 PM > To: Horia Geanta ; de...@driverdev.osuosl.org; > linux-arm-ker...@lists.infradead.org; gre...@linuxfoundation.org; Leo Li > ; Ioana Ciocoi Radulescu > > Cc: Laurentiu Tudor ; linux- > ker...@vger.kernel.org; a...@arndb.de; catalin.mari...@arm.com; > robin.mur...@arm.com > Subject: Re: [PATCH 0/2] staging/fsl-mc/bus: Move DPIO from staging to > drivers/soc/fsl > > On 7/6/2018 8:25 AM, Horia Geanta wrote: > > On 7/5/2018 10:41 PM, Roy Pledge wrote: > >> Move the NXP DPIO (Datapath I/O driver) from the staging/fsl- > mc/bus/dpio > >> directory to the drivers/soc/fsl directory. > >> > >> The DPIO driver enables access to the Queue and Buffer Managemer > (QBMAN) > >> hardware of NXP DPAA2 devices. This is a prerequiste for moving the > DPAA2 > >> Ethernet device driver from the staging directory. > >> > > Roy, Ioana, > > > > Would it be ok to add the following patch on top of the series? > > It's a dependency for dpseci object. > > If not added now I fear it won't be accepted until dpaa2-ethernet > > moves out of staging, thus gating dpseci upstreaming. > > > > Thanks, > > Horia > I can add this to the series - I will respin and send a v2. Roy, when you send the v2 you can also add for this patch: Acked-by: Ioana Radulescu > > > > --->8--- > > Previous commits: > > 6e2387e8f19ed ("staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet > driver") > > 39163c0ce0f48 ("staging: fsl-dpaa2/eth: Errors checking update") > > added bits that are not specific to the WRIOP accelerator. > > > > Move these where they belong (in DPIO) such that other accelerators > > can make use of them. > > > > Signed-off-by: Horia Geantă > > --- > > drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 4 ++-- > > drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 18 +- > > drivers/staging/fsl-mc/include/dpaa2-fd.h | 12 > > 3 files changed, 19 insertions(+), 15 deletions(-) > > > > diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > > index 396371728aa1..d5f0ac5c2d1f 100644 > > --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > > +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > > @@ -455,7 +455,7 @@ static int build_sg_fd(struct dpaa2_eth_priv *priv, > > dpaa2_fd_set_format(fd, dpaa2_fd_sg); > > dpaa2_fd_set_addr(fd, addr); > > dpaa2_fd_set_len(fd, skb->len); > > - dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | > DPAA2_FD_CTRL_PTV1); > > + dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1); > > > > if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & > SKBTX_HW_TSTAMP) > > enable_tx_tstamp(fd, sgt_buf); > > @@ -508,7 +508,7 @@ static int build_single_fd(struct dpaa2_eth_priv > *priv, > > dpaa2_fd_set_offset(fd, (u16)(skb->data - buffer_start)); > > dpaa2_fd_set_len(fd, skb->len); > > dpaa2_fd_set_format(fd, dpaa2_fd_single); > > - dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | > DPAA2_FD_CTRL_PTV1); > > + dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1); > > > > if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & > SKBTX_HW_TSTAMP) > > enable_tx_tstamp(fd, buffer_start); > > diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h > b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h > > index 905a4e6be8fa..9269cb05a84b 100644 > > --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h > > +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h > > @@ -124,21 +124,13 @@ struct dpaa2_eth_swa { > > #define DPAA2_FD_FRC_FAICFDV 0x0400 > > > > /* Error bits in FD CTRL */ > > -#define DPAA2_FD_CTRL_UFD 0x0004 > > -#define DPAA2_FD_CTRL_SBE 0x0008 > > -#define DPAA2_FD_CTRL_FSE 0x0020 > > -#define DPAA2_FD_CTRL_FAERR0x0040 > > - > > -#define DPAA2_FD_RX_ERR_MASK (DPAA2_FD_CTRL_SBE | \ > > -DPAA2_FD_CTRL_FAERR) > > -#define DPAA2_FD_TX_ERR_MASK (DPAA2_FD_CTRL_UFD | \ > > -DPAA2_FD_CTRL_SBE | \ > > -DPAA2_FD_CTRL_FSE | \ > > -DPAA2_FD_CTRL_FAERR) > > +#define DPAA2_FD_RX_ERR_MASK (FD_CTRL_SBE | > FD_CTRL_FAERR) > >
RE: [PATCH 0/2] staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl
> -Original Message- > From: Roy Pledge > Sent: Friday, July 6, 2018 9:52 PM > To: Horia Geanta ; de...@driverdev.osuosl.org; > linux-arm-ker...@lists.infradead.org; gre...@linuxfoundation.org; Leo Li > ; Ioana Ciocoi Radulescu > > Cc: Laurentiu Tudor ; linux- > ker...@vger.kernel.org; a...@arndb.de; catalin.mari...@arm.com; > robin.mur...@arm.com > Subject: Re: [PATCH 0/2] staging/fsl-mc/bus: Move DPIO from staging to > drivers/soc/fsl > > On 7/6/2018 8:25 AM, Horia Geanta wrote: > > On 7/5/2018 10:41 PM, Roy Pledge wrote: > >> Move the NXP DPIO (Datapath I/O driver) from the staging/fsl- > mc/bus/dpio > >> directory to the drivers/soc/fsl directory. > >> > >> The DPIO driver enables access to the Queue and Buffer Managemer > (QBMAN) > >> hardware of NXP DPAA2 devices. This is a prerequiste for moving the > DPAA2 > >> Ethernet device driver from the staging directory. > >> > > Roy, Ioana, > > > > Would it be ok to add the following patch on top of the series? > > It's a dependency for dpseci object. > > If not added now I fear it won't be accepted until dpaa2-ethernet > > moves out of staging, thus gating dpseci upstreaming. > > > > Thanks, > > Horia > I can add this to the series - I will respin and send a v2. Roy, when you send the v2 you can also add for this patch: Acked-by: Ioana Radulescu > > > > --->8--- > > Previous commits: > > 6e2387e8f19ed ("staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet > driver") > > 39163c0ce0f48 ("staging: fsl-dpaa2/eth: Errors checking update") > > added bits that are not specific to the WRIOP accelerator. > > > > Move these where they belong (in DPIO) such that other accelerators > > can make use of them. > > > > Signed-off-by: Horia Geantă > > --- > > drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 4 ++-- > > drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 18 +- > > drivers/staging/fsl-mc/include/dpaa2-fd.h | 12 > > 3 files changed, 19 insertions(+), 15 deletions(-) > > > > diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > > index 396371728aa1..d5f0ac5c2d1f 100644 > > --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > > +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > > @@ -455,7 +455,7 @@ static int build_sg_fd(struct dpaa2_eth_priv *priv, > > dpaa2_fd_set_format(fd, dpaa2_fd_sg); > > dpaa2_fd_set_addr(fd, addr); > > dpaa2_fd_set_len(fd, skb->len); > > - dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | > DPAA2_FD_CTRL_PTV1); > > + dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1); > > > > if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & > SKBTX_HW_TSTAMP) > > enable_tx_tstamp(fd, sgt_buf); > > @@ -508,7 +508,7 @@ static int build_single_fd(struct dpaa2_eth_priv > *priv, > > dpaa2_fd_set_offset(fd, (u16)(skb->data - buffer_start)); > > dpaa2_fd_set_len(fd, skb->len); > > dpaa2_fd_set_format(fd, dpaa2_fd_single); > > - dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | > DPAA2_FD_CTRL_PTV1); > > + dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1); > > > > if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & > SKBTX_HW_TSTAMP) > > enable_tx_tstamp(fd, buffer_start); > > diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h > b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h > > index 905a4e6be8fa..9269cb05a84b 100644 > > --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h > > +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h > > @@ -124,21 +124,13 @@ struct dpaa2_eth_swa { > > #define DPAA2_FD_FRC_FAICFDV 0x0400 > > > > /* Error bits in FD CTRL */ > > -#define DPAA2_FD_CTRL_UFD 0x0004 > > -#define DPAA2_FD_CTRL_SBE 0x0008 > > -#define DPAA2_FD_CTRL_FSE 0x0020 > > -#define DPAA2_FD_CTRL_FAERR0x0040 > > - > > -#define DPAA2_FD_RX_ERR_MASK (DPAA2_FD_CTRL_SBE | \ > > -DPAA2_FD_CTRL_FAERR) > > -#define DPAA2_FD_TX_ERR_MASK (DPAA2_FD_CTRL_UFD | \ > > -DPAA2_FD_CTRL_SBE | \ > > -DPAA2_FD_CTRL_FSE | \ > > -DPAA2_FD_CTRL_FAERR) > > +#define DPAA2_FD_RX_ERR_MASK (FD_CTRL_SBE | > FD_CTRL_FAERR) > >
Re: [PATCH 0/2] staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl
On 7/6/2018 8:25 AM, Horia Geanta wrote: > On 7/5/2018 10:41 PM, Roy Pledge wrote: >> Move the NXP DPIO (Datapath I/O driver) from the staging/fsl-mc/bus/dpio >> directory to the drivers/soc/fsl directory. >> >> The DPIO driver enables access to the Queue and Buffer Managemer (QBMAN) >> hardware of NXP DPAA2 devices. This is a prerequiste for moving the DPAA2 >> Ethernet device driver from the staging directory. >> > Roy, Ioana, > > Would it be ok to add the following patch on top of the series? > It's a dependency for dpseci object. > If not added now I fear it won't be accepted until dpaa2-ethernet > moves out of staging, thus gating dpseci upstreaming. > > Thanks, > Horia I can add this to the series - I will respin and send a v2. > > --->8--- > Previous commits: > 6e2387e8f19ed ("staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver") > 39163c0ce0f48 ("staging: fsl-dpaa2/eth: Errors checking update") > added bits that are not specific to the WRIOP accelerator. > > Move these where they belong (in DPIO) such that other accelerators > can make use of them. > > Signed-off-by: Horia Geantă > --- > drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 4 ++-- > drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 18 +- > drivers/staging/fsl-mc/include/dpaa2-fd.h | 12 > 3 files changed, 19 insertions(+), 15 deletions(-) > > diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > index 396371728aa1..d5f0ac5c2d1f 100644 > --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > @@ -455,7 +455,7 @@ static int build_sg_fd(struct dpaa2_eth_priv *priv, > dpaa2_fd_set_format(fd, dpaa2_fd_sg); > dpaa2_fd_set_addr(fd, addr); > dpaa2_fd_set_len(fd, skb->len); > - dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | DPAA2_FD_CTRL_PTV1); > + dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1); > > if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) > enable_tx_tstamp(fd, sgt_buf); > @@ -508,7 +508,7 @@ static int build_single_fd(struct dpaa2_eth_priv *priv, > dpaa2_fd_set_offset(fd, (u16)(skb->data - buffer_start)); > dpaa2_fd_set_len(fd, skb->len); > dpaa2_fd_set_format(fd, dpaa2_fd_single); > - dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | DPAA2_FD_CTRL_PTV1); > + dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1); > > if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) > enable_tx_tstamp(fd, buffer_start); > diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h > b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h > index 905a4e6be8fa..9269cb05a84b 100644 > --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h > +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h > @@ -124,21 +124,13 @@ struct dpaa2_eth_swa { > #define DPAA2_FD_FRC_FAICFDV 0x0400 > > /* Error bits in FD CTRL */ > -#define DPAA2_FD_CTRL_UFD0x0004 > -#define DPAA2_FD_CTRL_SBE0x0008 > -#define DPAA2_FD_CTRL_FSE0x0020 > -#define DPAA2_FD_CTRL_FAERR 0x0040 > - > -#define DPAA2_FD_RX_ERR_MASK (DPAA2_FD_CTRL_SBE | \ > - DPAA2_FD_CTRL_FAERR) > -#define DPAA2_FD_TX_ERR_MASK (DPAA2_FD_CTRL_UFD | \ > - DPAA2_FD_CTRL_SBE | \ > - DPAA2_FD_CTRL_FSE | \ > - DPAA2_FD_CTRL_FAERR) > +#define DPAA2_FD_RX_ERR_MASK (FD_CTRL_SBE | FD_CTRL_FAERR) > +#define DPAA2_FD_TX_ERR_MASK (FD_CTRL_UFD| \ > + FD_CTRL_SBE| \ > + FD_CTRL_FSE| \ > + FD_CTRL_FAERR) > > /* Annotation bits in FD CTRL */ > -#define DPAA2_FD_CTRL_PTA0x0080 > -#define DPAA2_FD_CTRL_PTV1 0x0040 > #define DPAA2_FD_CTRL_ASAL 0x0002 /* ASAL = 128B */ > > /* Frame annotation status */ > diff --git a/drivers/staging/fsl-mc/include/dpaa2-fd.h > b/drivers/staging/fsl-mc/include/dpaa2-fd.h > index b55b89ba4eda..2576abaa7779 100644 > --- a/drivers/staging/fsl-mc/include/dpaa2-fd.h > +++ b/drivers/staging/fsl-mc/include/dpaa2-fd.h > @@ -67,6 +67,18 @@ struct dpaa2_fd { > #define SG_FINAL_FLAG_MASK 0x1 > #define SG_FINAL_FLAG_SHIFT 15 > > +/* Error bits in FD CTRL */ > +#define FD_CTRL_ERR_MASK 0x00FF > +#define FD_CTRL_UFD 0x0004 > +#define FD_CTRL_SBE 0x0008 > +#define FD_CTRL_FLC 0x0010 > +#define FD_CTRL_FSE 0x0020 > +#define FD_CTRL_FAERR0x0040 > + > +/* Annotation bits in FD CTRL */ > +#define FD_CTRL_PTA 0x0080 > +#define FD_CTRL_PTV1 0x0040 > + > enum dpaa2_fd_format { > dpaa2_fd_single = 0, >
Re: [PATCH 0/2] staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl
On 7/6/2018 8:25 AM, Horia Geanta wrote: > On 7/5/2018 10:41 PM, Roy Pledge wrote: >> Move the NXP DPIO (Datapath I/O driver) from the staging/fsl-mc/bus/dpio >> directory to the drivers/soc/fsl directory. >> >> The DPIO driver enables access to the Queue and Buffer Managemer (QBMAN) >> hardware of NXP DPAA2 devices. This is a prerequiste for moving the DPAA2 >> Ethernet device driver from the staging directory. >> > Roy, Ioana, > > Would it be ok to add the following patch on top of the series? > It's a dependency for dpseci object. > If not added now I fear it won't be accepted until dpaa2-ethernet > moves out of staging, thus gating dpseci upstreaming. > > Thanks, > Horia I can add this to the series - I will respin and send a v2. > > --->8--- > Previous commits: > 6e2387e8f19ed ("staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver") > 39163c0ce0f48 ("staging: fsl-dpaa2/eth: Errors checking update") > added bits that are not specific to the WRIOP accelerator. > > Move these where they belong (in DPIO) such that other accelerators > can make use of them. > > Signed-off-by: Horia Geantă > --- > drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 4 ++-- > drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 18 +- > drivers/staging/fsl-mc/include/dpaa2-fd.h | 12 > 3 files changed, 19 insertions(+), 15 deletions(-) > > diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > index 396371728aa1..d5f0ac5c2d1f 100644 > --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > @@ -455,7 +455,7 @@ static int build_sg_fd(struct dpaa2_eth_priv *priv, > dpaa2_fd_set_format(fd, dpaa2_fd_sg); > dpaa2_fd_set_addr(fd, addr); > dpaa2_fd_set_len(fd, skb->len); > - dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | DPAA2_FD_CTRL_PTV1); > + dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1); > > if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) > enable_tx_tstamp(fd, sgt_buf); > @@ -508,7 +508,7 @@ static int build_single_fd(struct dpaa2_eth_priv *priv, > dpaa2_fd_set_offset(fd, (u16)(skb->data - buffer_start)); > dpaa2_fd_set_len(fd, skb->len); > dpaa2_fd_set_format(fd, dpaa2_fd_single); > - dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | DPAA2_FD_CTRL_PTV1); > + dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1); > > if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) > enable_tx_tstamp(fd, buffer_start); > diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h > b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h > index 905a4e6be8fa..9269cb05a84b 100644 > --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h > +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h > @@ -124,21 +124,13 @@ struct dpaa2_eth_swa { > #define DPAA2_FD_FRC_FAICFDV 0x0400 > > /* Error bits in FD CTRL */ > -#define DPAA2_FD_CTRL_UFD0x0004 > -#define DPAA2_FD_CTRL_SBE0x0008 > -#define DPAA2_FD_CTRL_FSE0x0020 > -#define DPAA2_FD_CTRL_FAERR 0x0040 > - > -#define DPAA2_FD_RX_ERR_MASK (DPAA2_FD_CTRL_SBE | \ > - DPAA2_FD_CTRL_FAERR) > -#define DPAA2_FD_TX_ERR_MASK (DPAA2_FD_CTRL_UFD | \ > - DPAA2_FD_CTRL_SBE | \ > - DPAA2_FD_CTRL_FSE | \ > - DPAA2_FD_CTRL_FAERR) > +#define DPAA2_FD_RX_ERR_MASK (FD_CTRL_SBE | FD_CTRL_FAERR) > +#define DPAA2_FD_TX_ERR_MASK (FD_CTRL_UFD| \ > + FD_CTRL_SBE| \ > + FD_CTRL_FSE| \ > + FD_CTRL_FAERR) > > /* Annotation bits in FD CTRL */ > -#define DPAA2_FD_CTRL_PTA0x0080 > -#define DPAA2_FD_CTRL_PTV1 0x0040 > #define DPAA2_FD_CTRL_ASAL 0x0002 /* ASAL = 128B */ > > /* Frame annotation status */ > diff --git a/drivers/staging/fsl-mc/include/dpaa2-fd.h > b/drivers/staging/fsl-mc/include/dpaa2-fd.h > index b55b89ba4eda..2576abaa7779 100644 > --- a/drivers/staging/fsl-mc/include/dpaa2-fd.h > +++ b/drivers/staging/fsl-mc/include/dpaa2-fd.h > @@ -67,6 +67,18 @@ struct dpaa2_fd { > #define SG_FINAL_FLAG_MASK 0x1 > #define SG_FINAL_FLAG_SHIFT 15 > > +/* Error bits in FD CTRL */ > +#define FD_CTRL_ERR_MASK 0x00FF > +#define FD_CTRL_UFD 0x0004 > +#define FD_CTRL_SBE 0x0008 > +#define FD_CTRL_FLC 0x0010 > +#define FD_CTRL_FSE 0x0020 > +#define FD_CTRL_FAERR0x0040 > + > +/* Annotation bits in FD CTRL */ > +#define FD_CTRL_PTA 0x0080 > +#define FD_CTRL_PTV1 0x0040 > + > enum dpaa2_fd_format { > dpaa2_fd_single = 0, >
Re: [PATCH 0/2] staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl
On 7/5/2018 10:41 PM, Roy Pledge wrote: > Move the NXP DPIO (Datapath I/O driver) from the staging/fsl-mc/bus/dpio > directory to the drivers/soc/fsl directory. > > The DPIO driver enables access to the Queue and Buffer Managemer (QBMAN) > hardware of NXP DPAA2 devices. This is a prerequiste for moving the DPAA2 > Ethernet device driver from the staging directory. > Roy, Ioana, Would it be ok to add the following patch on top of the series? It's a dependency for dpseci object. If not added now I fear it won't be accepted until dpaa2-ethernet moves out of staging, thus gating dpseci upstreaming. Thanks, Horia --->8--- Previous commits: 6e2387e8f19ed ("staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver") 39163c0ce0f48 ("staging: fsl-dpaa2/eth: Errors checking update") added bits that are not specific to the WRIOP accelerator. Move these where they belong (in DPIO) such that other accelerators can make use of them. Signed-off-by: Horia Geantă --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 4 ++-- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 18 +- drivers/staging/fsl-mc/include/dpaa2-fd.h | 12 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index 396371728aa1..d5f0ac5c2d1f 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -455,7 +455,7 @@ static int build_sg_fd(struct dpaa2_eth_priv *priv, dpaa2_fd_set_format(fd, dpaa2_fd_sg); dpaa2_fd_set_addr(fd, addr); dpaa2_fd_set_len(fd, skb->len); - dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | DPAA2_FD_CTRL_PTV1); + dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1); if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) enable_tx_tstamp(fd, sgt_buf); @@ -508,7 +508,7 @@ static int build_single_fd(struct dpaa2_eth_priv *priv, dpaa2_fd_set_offset(fd, (u16)(skb->data - buffer_start)); dpaa2_fd_set_len(fd, skb->len); dpaa2_fd_set_format(fd, dpaa2_fd_single); - dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | DPAA2_FD_CTRL_PTV1); + dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1); if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) enable_tx_tstamp(fd, buffer_start); diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h index 905a4e6be8fa..9269cb05a84b 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h @@ -124,21 +124,13 @@ struct dpaa2_eth_swa { #define DPAA2_FD_FRC_FAICFDV 0x0400 /* Error bits in FD CTRL */ -#define DPAA2_FD_CTRL_UFD 0x0004 -#define DPAA2_FD_CTRL_SBE 0x0008 -#define DPAA2_FD_CTRL_FSE 0x0020 -#define DPAA2_FD_CTRL_FAERR0x0040 - -#define DPAA2_FD_RX_ERR_MASK (DPAA2_FD_CTRL_SBE | \ -DPAA2_FD_CTRL_FAERR) -#define DPAA2_FD_TX_ERR_MASK (DPAA2_FD_CTRL_UFD | \ -DPAA2_FD_CTRL_SBE | \ -DPAA2_FD_CTRL_FSE | \ -DPAA2_FD_CTRL_FAERR) +#define DPAA2_FD_RX_ERR_MASK (FD_CTRL_SBE | FD_CTRL_FAERR) +#define DPAA2_FD_TX_ERR_MASK (FD_CTRL_UFD| \ +FD_CTRL_SBE| \ +FD_CTRL_FSE| \ +FD_CTRL_FAERR) /* Annotation bits in FD CTRL */ -#define DPAA2_FD_CTRL_PTA 0x0080 -#define DPAA2_FD_CTRL_PTV1 0x0040 #define DPAA2_FD_CTRL_ASAL 0x0002 /* ASAL = 128B */ /* Frame annotation status */ diff --git a/drivers/staging/fsl-mc/include/dpaa2-fd.h b/drivers/staging/fsl-mc/include/dpaa2-fd.h index b55b89ba4eda..2576abaa7779 100644 --- a/drivers/staging/fsl-mc/include/dpaa2-fd.h +++ b/drivers/staging/fsl-mc/include/dpaa2-fd.h @@ -67,6 +67,18 @@ struct dpaa2_fd { #define SG_FINAL_FLAG_MASK 0x1 #define SG_FINAL_FLAG_SHIFT15 +/* Error bits in FD CTRL */ +#define FD_CTRL_ERR_MASK 0x00FF +#define FD_CTRL_UFD0x0004 +#define FD_CTRL_SBE0x0008 +#define FD_CTRL_FLC0x0010 +#define FD_CTRL_FSE0x0020 +#define FD_CTRL_FAERR 0x0040 + +/* Annotation bits in FD CTRL */ +#define FD_CTRL_PTA0x0080 +#define FD_CTRL_PTV1 0x0040 + enum dpaa2_fd_format { dpaa2_fd_single = 0, dpaa2_fd_list, -- 2.16.2
Re: [PATCH 0/2] staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl
On 7/5/2018 10:41 PM, Roy Pledge wrote: > Move the NXP DPIO (Datapath I/O driver) from the staging/fsl-mc/bus/dpio > directory to the drivers/soc/fsl directory. > > The DPIO driver enables access to the Queue and Buffer Managemer (QBMAN) > hardware of NXP DPAA2 devices. This is a prerequiste for moving the DPAA2 > Ethernet device driver from the staging directory. > Roy, Ioana, Would it be ok to add the following patch on top of the series? It's a dependency for dpseci object. If not added now I fear it won't be accepted until dpaa2-ethernet moves out of staging, thus gating dpseci upstreaming. Thanks, Horia --->8--- Previous commits: 6e2387e8f19ed ("staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver") 39163c0ce0f48 ("staging: fsl-dpaa2/eth: Errors checking update") added bits that are not specific to the WRIOP accelerator. Move these where they belong (in DPIO) such that other accelerators can make use of them. Signed-off-by: Horia Geantă --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 4 ++-- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 18 +- drivers/staging/fsl-mc/include/dpaa2-fd.h | 12 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index 396371728aa1..d5f0ac5c2d1f 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -455,7 +455,7 @@ static int build_sg_fd(struct dpaa2_eth_priv *priv, dpaa2_fd_set_format(fd, dpaa2_fd_sg); dpaa2_fd_set_addr(fd, addr); dpaa2_fd_set_len(fd, skb->len); - dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | DPAA2_FD_CTRL_PTV1); + dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1); if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) enable_tx_tstamp(fd, sgt_buf); @@ -508,7 +508,7 @@ static int build_single_fd(struct dpaa2_eth_priv *priv, dpaa2_fd_set_offset(fd, (u16)(skb->data - buffer_start)); dpaa2_fd_set_len(fd, skb->len); dpaa2_fd_set_format(fd, dpaa2_fd_single); - dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | DPAA2_FD_CTRL_PTV1); + dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1); if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) enable_tx_tstamp(fd, buffer_start); diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h index 905a4e6be8fa..9269cb05a84b 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h @@ -124,21 +124,13 @@ struct dpaa2_eth_swa { #define DPAA2_FD_FRC_FAICFDV 0x0400 /* Error bits in FD CTRL */ -#define DPAA2_FD_CTRL_UFD 0x0004 -#define DPAA2_FD_CTRL_SBE 0x0008 -#define DPAA2_FD_CTRL_FSE 0x0020 -#define DPAA2_FD_CTRL_FAERR0x0040 - -#define DPAA2_FD_RX_ERR_MASK (DPAA2_FD_CTRL_SBE | \ -DPAA2_FD_CTRL_FAERR) -#define DPAA2_FD_TX_ERR_MASK (DPAA2_FD_CTRL_UFD | \ -DPAA2_FD_CTRL_SBE | \ -DPAA2_FD_CTRL_FSE | \ -DPAA2_FD_CTRL_FAERR) +#define DPAA2_FD_RX_ERR_MASK (FD_CTRL_SBE | FD_CTRL_FAERR) +#define DPAA2_FD_TX_ERR_MASK (FD_CTRL_UFD| \ +FD_CTRL_SBE| \ +FD_CTRL_FSE| \ +FD_CTRL_FAERR) /* Annotation bits in FD CTRL */ -#define DPAA2_FD_CTRL_PTA 0x0080 -#define DPAA2_FD_CTRL_PTV1 0x0040 #define DPAA2_FD_CTRL_ASAL 0x0002 /* ASAL = 128B */ /* Frame annotation status */ diff --git a/drivers/staging/fsl-mc/include/dpaa2-fd.h b/drivers/staging/fsl-mc/include/dpaa2-fd.h index b55b89ba4eda..2576abaa7779 100644 --- a/drivers/staging/fsl-mc/include/dpaa2-fd.h +++ b/drivers/staging/fsl-mc/include/dpaa2-fd.h @@ -67,6 +67,18 @@ struct dpaa2_fd { #define SG_FINAL_FLAG_MASK 0x1 #define SG_FINAL_FLAG_SHIFT15 +/* Error bits in FD CTRL */ +#define FD_CTRL_ERR_MASK 0x00FF +#define FD_CTRL_UFD0x0004 +#define FD_CTRL_SBE0x0008 +#define FD_CTRL_FLC0x0010 +#define FD_CTRL_FSE0x0020 +#define FD_CTRL_FAERR 0x0040 + +/* Annotation bits in FD CTRL */ +#define FD_CTRL_PTA0x0080 +#define FD_CTRL_PTV1 0x0040 + enum dpaa2_fd_format { dpaa2_fd_single = 0, dpaa2_fd_list, -- 2.16.2
[PATCH 0/2] staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl
Move the NXP DPIO (Datapath I/O driver) from the staging/fsl-mc/bus/dpio directory to the drivers/soc/fsl directory. The DPIO driver enables access to the Queue and Buffer Managemer (QBMAN) hardware of NXP DPAA2 devices. This is a prerequiste for moving the DPAA2 Ethernet device driver from the staging directory. Roy Pledge (2): staging:fsl-mc: Move DPIO from staging to drivers/soc/fsl drivers/staging: Remove fsl-mc driver from staging MAINTAINERS | 2 +- drivers/crypto/caam/sg_sw_qm2.h | 2 +- drivers/crypto/caam/sg_sw_sec4.h | 2 +- drivers/soc/fsl/Kconfig | 10 ++ drivers/soc/fsl/Makefile | 1 + drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/Makefile| 0 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-cmd.h | 0 .../{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.c | 2 +- .../{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.txt | 0 .../{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-service.c | 2 +- drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.c | 0 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.h | 0 .../{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.c | 2 +- .../{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.h | 2 +- drivers/staging/Kconfig | 2 -- drivers/staging/Makefile | 1 - drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 4 ++-- drivers/staging/fsl-mc/Kconfig | 2 -- drivers/staging/fsl-mc/Makefile | 3 --- drivers/staging/fsl-mc/bus/Kconfig | 16 drivers/staging/fsl-mc/bus/Makefile | 9 - .../fsl-mc/include => include/soc/fsl}/dpaa2-fd.h| 0 .../fsl-mc/include => include/soc/fsl}/dpaa2-global.h| 0 .../fsl-mc/include => include/soc/fsl}/dpaa2-io.h| 0 24 files changed, 20 insertions(+), 42 deletions(-) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/Makefile (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-cmd.h (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.c (99%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.txt (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-service.c (99%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.c (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.h (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.c (99%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.h (99%) delete mode 100644 drivers/staging/fsl-mc/Kconfig delete mode 100644 drivers/staging/fsl-mc/Makefile delete mode 100644 drivers/staging/fsl-mc/bus/Kconfig delete mode 100644 drivers/staging/fsl-mc/bus/Makefile rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-fd.h (100%) rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-global.h (100%) rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-io.h (100%) -- 2.7.4
[PATCH 0/2] staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl
Move the NXP DPIO (Datapath I/O driver) from the staging/fsl-mc/bus/dpio directory to the drivers/soc/fsl directory. The DPIO driver enables access to the Queue and Buffer Managemer (QBMAN) hardware of NXP DPAA2 devices. This is a prerequiste for moving the DPAA2 Ethernet device driver from the staging directory. Roy Pledge (2): staging:fsl-mc: Move DPIO from staging to drivers/soc/fsl drivers/staging: Remove fsl-mc driver from staging MAINTAINERS | 2 +- drivers/crypto/caam/sg_sw_qm2.h | 2 +- drivers/crypto/caam/sg_sw_sec4.h | 2 +- drivers/soc/fsl/Kconfig | 10 ++ drivers/soc/fsl/Makefile | 1 + drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/Makefile| 0 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-cmd.h | 0 .../{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.c | 2 +- .../{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.txt | 0 .../{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-service.c | 2 +- drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.c | 0 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.h | 0 .../{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.c | 2 +- .../{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.h | 2 +- drivers/staging/Kconfig | 2 -- drivers/staging/Makefile | 1 - drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 4 ++-- drivers/staging/fsl-mc/Kconfig | 2 -- drivers/staging/fsl-mc/Makefile | 3 --- drivers/staging/fsl-mc/bus/Kconfig | 16 drivers/staging/fsl-mc/bus/Makefile | 9 - .../fsl-mc/include => include/soc/fsl}/dpaa2-fd.h| 0 .../fsl-mc/include => include/soc/fsl}/dpaa2-global.h| 0 .../fsl-mc/include => include/soc/fsl}/dpaa2-io.h| 0 24 files changed, 20 insertions(+), 42 deletions(-) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/Makefile (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-cmd.h (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.c (99%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.txt (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-service.c (99%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.c (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.h (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.c (99%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.h (99%) delete mode 100644 drivers/staging/fsl-mc/Kconfig delete mode 100644 drivers/staging/fsl-mc/Makefile delete mode 100644 drivers/staging/fsl-mc/bus/Kconfig delete mode 100644 drivers/staging/fsl-mc/bus/Makefile rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-fd.h (100%) rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-global.h (100%) rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-io.h (100%) -- 2.7.4