[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48f0d7891b480b2242eff6343719880df3d17c8c.camel@microchip.com>
Date: Wed, 30 Nov 2022 04:53:12 +0000
From: <Arun.Ramadoss@...rochip.com>
To: <pavan.chebbi@...adcom.com>
CC: <andrew@...n.ch>, <linux-kernel@...r.kernel.org>,
<UNGLinuxDriver@...rochip.com>, <vivien.didelot@...il.com>,
<olteanv@...il.com>, <linux@...linux.org.uk>, <ceggers@...i.de>,
<Tristram.Ha@...rochip.com>, <f.fainelli@...il.com>,
<kuba@...nel.org>, <edumazet@...gle.com>, <pabeni@...hat.com>,
<richardcochran@...il.com>, <netdev@...r.kernel.org>,
<Woojung.Huh@...rochip.com>, <davem@...emloft.net>
Subject: Re: [Patch net-next v1 01/12] net: dsa: microchip: ptp: add the posix
clock support
Hi Pavan,
On Mon, 2022-11-28 at 20:19 +0530, Pavan Chebbi wrote:
> On Mon, Nov 28, 2022 at 4:03 PM Arun Ramadoss
> <arun.ramadoss@...rochip.com> wrote:
>
> > diff --git a/drivers/net/dsa/microchip/ksz_ptp_reg.h
> > b/drivers/net/dsa/microchip/ksz_ptp_reg.h
> > new file mode 100644
> > index 000000000000..e578a0006ecf
> > --- /dev/null
> > +++ b/drivers/net/dsa/microchip/ksz_ptp_reg.h
> > @@ -0,0 +1,57 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/* Microchip KSZ PTP register definitions
> > + * Copyright (C) 2022 Microchip Technology Inc.
> > + */
> > +
> > +#ifndef __KSZ_PTP_REGS_H
> > +#define __KSZ_PTP_REGS_H
> > +
> > +/* 5 - PTP Clock */
> > +#define REG_PTP_CLK_CTRL 0x0500
> > +
> > +#define PTP_STEP_ADJ BIT(6)
> > +#define PTP_STEP_DIR BIT(5)
> > +#define PTP_READ_TIME BIT(4)
> > +#define PTP_LOAD_TIME BIT(3)
>
> PTP_WRITE_TIME sounds more intuitive than PTP_LOAD_TIME?
To have similar naming convention between code and Datasheet it is
named as Load time.
> Also I see that all the #defines are introduced in this patch, some
> of
> which are used later. It is a good idea to introduce the #defines in
> the same patches where they are being used for the first time.
> I will be looking at the entire series but am responding to this now.
The patches are splitted into multiple smaller patches for review. I
missed to move header file defines to appropriate patches. Sure I will
move it.
>
> > +#define PTP_CLK_ADJ_ENABLE BIT(2)
> > +#define PTP_CLK_ENABLE BIT(1)
> > +#define PTP_CLK_RESET BIT(0)
> > +
> > +#define REG_PTP_RTC_SUB_NANOSEC__2 0x0502
> > +
> > +#define PTP_RTC_SUB_NANOSEC_M 0x0007
> > +#define PTP_RTC_0NS 0x00
> > +
> > +#define REG_PTP_RTC_NANOSEC 0x0504
> > +#define REG_PTP_RTC_NANOSEC_H 0x0504
> > +#define REG_PTP_RTC_NANOSEC_L 0x0506
> > +
> > +#define REG_PTP_RTC_SEC 0x0508
> > +#define REG_PTP_RTC_SEC_H 0x0508
> > +#define REG_PTP_RTC_SEC_L 0x050A
> > +
> >
> >
> > +#endif
> > --
> > 2.36.1
> >
Powered by blists - more mailing lists