Re: [PATCH v5] ptp: ocp: add Adva timecard support

From: Sagi Maimon
Date: Sun Feb 04 2024 - 06:32:10 EST


Hi Vadim,
Sorry but I was on vacation for the last two weeks.
So What should I do now:
1) Do you want me to set my changes into the main linux git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
and use use '[PATCH v6] ...' prefix
2) Or
set my changes into the net-next git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
and use use '[PATCH net-next v6] ...' prefix

BR,
Sagi

On Wed, Jan 17, 2024 at 11:23 PM Vadim Fedorenko
<vadim.fedorenko@xxxxxxxxx> wrote:
>
> On 17/01/2024 11:43, Sagi Maimon wrote:
> > Adding support for the Adva timecard.
> > The card uses different drivers to provide access to the
> > firmware SPI flash (Altera based).
> > Other parts of the code are the same and could be reused.
> >
>
> Hi Sagi,
>
> Thanks for adjusting the code. One signle still have to be
> adjusted, see comments below. And this is treated as net-next
> material, but net-next is closed now until merge window ends,
> you will have to submit new version next week.
>
> Please, also use '[PATCH net-next v6] ...' prefix for it.
>
> > Signed-off-by: Sagi Maimon <maimon.sagi@xxxxxxxxx>
> > ---
> > Changes since version 4:
> > - alignment fix.
> >
>
> Please, preserve changes from all previous versions for next submissions.
>
> > drivers/ptp/ptp_ocp.c | 302 ++++++++++++++++++++++++++++++++++++++++--
> > 1 file changed, 293 insertions(+), 9 deletions(-)
> >
>
> [ ..skip.. ]
>
> > @@ -2603,7 +2819,44 @@ ptp_ocp_art_board_init(struct ptp_ocp *bp, struct ocp_resource *r)
> > if (err)
> > return err;
> >
> > - return ptp_ocp_init_clock(bp);
> > + return ptp_ocp_init_clock(bp, r->extra);
> > +}
> > +
> > +/* ADVA specific board initializers; last "resource" registered. */
> > +static int
> > +ptp_ocp_adva_board_init(struct ptp_ocp *bp, struct ocp_resource *r)
> > +{
> > + int err;
> > + u32 version;
> > +
> > + bp->flash_start = 0xA00000;
> > + bp->eeprom_map = fb_eeprom_map;
> > + bp->sma_op = &ocp_adva_sma_op;
> > +
> > + version = ioread32(&bp->image->version);
> > + /* if lower 16 bits are empty, this is the fw loader. */
> > + if ((version & 0xffff) == 0) {
> > + version = version >> 16;
> > + bp->fw_loader = true;
> > + }
> > + bp->fw_tag = 1;
>
> Please, use fw_tag = 3 here, other tags are for other vendors.
>
> Thanks,
> Vadim
>
> > + bp->fw_version = version & 0xffff;
> > + bp->fw_cap = OCP_CAP_BASIC | OCP_CAP_SIGNAL | OCP_CAP_FREQ;
> > +
> > + ptp_ocp_tod_init(bp);
> > + ptp_ocp_nmea_out_init(bp);
> > + ptp_ocp_signal_init(bp);
> > +
>