linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Griffin <peter.griffin@linaro.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	mturquette@baylibre.com, conor+dt@kernel.org, sboyd@kernel.org,
	tomasz.figa@gmail.com, s.nawrocki@samsung.com,
	linus.walleij@linaro.org, wim@linux-watchdog.org,
	linux@roeck-us.net, catalin.marinas@arm.com, will@kernel.org,
	arnd@arndb.de, olof@lixom.net, cw00.choi@samsung.com,
	tudor.ambarus@linaro.org, andre.draszik@linaro.org,
	semen.protsenko@linaro.org, saravanak@google.com,
	willmcvicker@google.com, soc@kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-watchdog@vger.kernel.org,
	kernel-team@android.com, linux-serial@vger.kernel.org
Subject: Re: [PATCH v2 16/20] tty: serial: samsung: Add gs101 compatible and SoC data
Date: Wed, 11 Oct 2023 19:03:44 +0100	[thread overview]
Message-ID: <CADrjBPouDPfcj9eCN0BN0Lfd1sOb=Q3jmkeD1aO2on5VHmROJg@mail.gmail.com> (raw)
In-Reply-To: <2023101109-crispy-escapable-0801@gregkh>

Hi Greg,

Thanks for the review.

On Wed, 11 Oct 2023 at 08:47, Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Tue, Oct 10, 2023 at 11:49:24PM +0100, Peter Griffin wrote:
> > Add serial driver data for Google Tensor gs101 SoC.
> >
> > Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
> > ---
> >  drivers/tty/serial/samsung_tty.c | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> >
> > diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
> > index 07fb8a9dac63..79a1a184d5c1 100644
> > --- a/drivers/tty/serial/samsung_tty.c
> > +++ b/drivers/tty/serial/samsung_tty.c
> > @@ -2597,14 +2597,21 @@ static const struct s3c24xx_serial_drv_data exynos850_serial_drv_data = {
> >       .fifosize = { 256, 64, 64, 64 },
> >  };
> >
> > +static const struct s3c24xx_serial_drv_data gs101_serial_drv_data = {
> > +     EXYNOS_COMMON_SERIAL_DRV_DATA(),
> > +     .fifosize = { 256, 64, 64, 64 },
> > +};
>
> Why are you duplicating a structure that is already in the same file?
> What is the benifit here?

There is a mistake here, the struct shouldn't be the same as e850 it
should look like this

static const struct s3c24xx_serial_drv_data gs101_serial_drv_data = {
     EXYNOS_COMMON_SERIAL_DRV_DATA(),
     /* rely on samsung,uart-fifosize DT property for fifosize */
     .fifosize = { 0 },
};

This then allows the fifosize to be taken from the samsung,uart-fifosize
DT property for each of the 19 UARTs on this SoC.

>
> >  #define EXYNOS4210_SERIAL_DRV_DATA (&exynos4210_serial_drv_data)
> >  #define EXYNOS5433_SERIAL_DRV_DATA (&exynos5433_serial_drv_data)
> >  #define EXYNOS850_SERIAL_DRV_DATA (&exynos850_serial_drv_data)
> > +#define GS101_SERIAL_DRV_DATA (&gs101_serial_drv_data)
>
> What is "GS101"?

gs101 is the name of the SoC in Pixel 6, 6 pro, 6a phones. I've put
some more info
about the various names of the SoC in the bindings documentation. See
https://lore.kernel.org/linux-arm-kernel/20231010224928.2296997-9-peter.griffin@linaro.org/T/#mb45492e58de0bef566df8cdf6191ab8f96f0cf99

>
> >  #else
> >  #define EXYNOS4210_SERIAL_DRV_DATA NULL
> >  #define EXYNOS5433_SERIAL_DRV_DATA NULL
> >  #define EXYNOS850_SERIAL_DRV_DATA NULL
> > +#define GS101_SERIAL_DRV_DATA NULL
> >  #endif
> >
> >  #ifdef CONFIG_ARCH_APPLE
> > @@ -2688,6 +2695,9 @@ static const struct platform_device_id s3c24xx_serial_driver_ids[] = {
> >       }, {
> >               .name           = "artpec8-uart",
> >               .driver_data    = (kernel_ulong_t)ARTPEC8_SERIAL_DRV_DATA,
> > +     }, {
> > +             .name           = "gs101-uart",
> > +             .driver_data    = (kernel_ulong_t)GS101_SERIAL_DRV_DATA,
> >       },
> >       { },
> >  };
> > @@ -2709,6 +2719,8 @@ static const struct of_device_id s3c24xx_uart_dt_match[] = {
> >               .data = EXYNOS850_SERIAL_DRV_DATA },
> >       { .compatible = "axis,artpec8-uart",
> >               .data = ARTPEC8_SERIAL_DRV_DATA },
> > +     { .compatible = "google,gs101-uart",
> > +             .data =  GS101_SERIAL_DRV_DATA },
>
> Why aren't you just listing this hardware as the same one above?  There
> doesn't need to be a new entry if you just fix up the DT for the board
> to declare it as the proper type of device.  No need to keep adding new
> entries that do the exact same thing, we don't normally like that at all
> for other bus types, why is DT different?
>

I believe Krzysztof already answered this from a dt maintainer point of view.

regards,

Peter.

  parent reply	other threads:[~2023-10-11 18:38 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10 22:49 [PATCH v2 00/20] Add minimal Tensor/GS101 SoC support and Oriole/Pixel6 board Peter Griffin
2023-10-10 22:49 ` [PATCH v2 01/20] dt-bindings: soc: samsung: exynos-pmu: Add gs101 compatible Peter Griffin
2023-10-10 22:49 ` [PATCH v2 02/20] dt-bindings: clock: Add Google gs101 clock management unit bindings Peter Griffin
2023-10-10 22:49 ` [PATCH v2 03/20] dt-bindings: soc: google: exynos-sysreg: add dedicated SYSREG compatibles to GS101 Peter Griffin
2023-10-10 22:49 ` [PATCH v2 04/20] dt-bindings: watchdog: Document Google gs101 & gs201 watchdog bindings Peter Griffin
2023-10-10 22:49 ` [PATCH v2 05/20] dt-bindings: arm: google: Add bindings for Google ARM platforms Peter Griffin
2023-10-10 22:49 ` [PATCH v2 06/20] dt-bindings: pinctrl: samsung: add google,gs101-pinctrl compatible Peter Griffin
2023-10-10 22:49 ` [PATCH v2 07/20] dt-bindings: pinctrl: samsung: add gs101-wakeup-eint compatible Peter Griffin
2023-10-11 23:12   ` Sam Protsenko
2023-10-12 11:24     ` Peter Griffin
2023-10-10 22:49 ` [PATCH v2 08/20] dt-bindings: serial: samsung: Add google-gs101-uart compatible Peter Griffin
     [not found]   ` <2023101111-banknote-satin-1f77@gregkh>
2023-10-11  8:49     ` Tudor Ambarus
     [not found]       ` <2023101137-fester-rerun-5c39@gregkh>
2023-10-11  9:30         ` Arnd Bergmann
     [not found]           ` <2023101126-stash-manor-7162@gregkh>
2023-10-11 10:19             ` Arnd Bergmann
2023-10-11 11:55               ` Peter Griffin
2023-10-11 12:07         ` Krzysztof Kozlowski
2023-10-11  9:22     ` Peter Griffin
2023-10-11 11:58     ` Linus Walleij
2023-10-11 12:09   ` Krzysztof Kozlowski
2023-10-11 13:27     ` Peter Griffin
2023-10-11 13:32       ` Krzysztof Kozlowski
2023-10-10 22:49 ` [PATCH v2 09/20] clk: samsung: clk-pll: Add support for pll_{0516,0517,518} Peter Griffin
2023-10-10 22:49 ` [PATCH v2 10/20] clk: samsung: clk-gs101: Add cmu_top registers, plls, mux and gates Peter Griffin
2023-10-10 22:49 ` [PATCH v2 11/20] clk: samsung: clk-gs101: add CMU_APM support Peter Griffin
2023-10-10 22:49 ` [PATCH v2 12/20] clk: samsung: clk-gs101: Add support for CMU_MISC clock unit Peter Griffin
2023-10-10 22:49 ` [PATCH v2 13/20] pinctrl: samsung: Add filter selection support for alive banks Peter Griffin
2023-10-10 22:49 ` [PATCH v2 14/20] pinctrl: samsung: Add gs101 SoC pinctrl configuration Peter Griffin
2023-10-10 22:49 ` [PATCH v2 15/20] watchdog: s3c2410_wdt: Add support for Google tensor SoCs Peter Griffin
2023-10-10 23:56   ` Guenter Roeck
2023-10-11 14:43     ` Peter Griffin
2023-10-10 22:49 ` [PATCH v2 16/20] tty: serial: samsung: Add gs101 compatible and SoC data Peter Griffin
     [not found]   ` <2023101109-crispy-escapable-0801@gregkh>
2023-10-11 18:03     ` Peter Griffin [this message]
2023-10-10 22:49 ` [PATCH v2 17/20] arm64: dts: google: Add initial Google gs101 SoC support Peter Griffin
2023-10-10 22:49 ` [PATCH v2 18/20] arm64: dts: google: Add initial Oriole/pixel 6 board support Peter Griffin
2023-10-10 22:49 ` [PATCH v2 19/20] arm64: defconfig: Enable Google Tensor SoC Peter Griffin
2023-10-10 22:49 ` [PATCH v2 20/20] MAINTAINERS: add entry for " Peter Griffin
2023-10-11  6:10 ` [PATCH v2 00/20] Add minimal Tensor/GS101 SoC support and Oriole/Pixel6 board Tudor Ambarus
2023-10-11  8:16   ` Peter Griffin
2023-10-11  8:42     ` Tudor Ambarus
2023-10-11 14:16       ` Peter Griffin
2023-10-11  7:44 ` Greg KH
2023-10-11  9:06   ` Peter Griffin
2023-10-11  9:11     ` Greg KH
2023-10-11 12:11       ` Krzysztof Kozlowski
2023-10-11 12:10   ` Krzysztof Kozlowski
2023-11-02 22:32 ` Maksym Holovach
2023-11-03 13:11   ` Peter Griffin
2023-11-03 13:56     ` Maksym Holovach
2023-11-03 14:49       ` Krzysztof Kozlowski
2023-11-03 17:36         ` William McVicker
2023-11-03 20:05           ` William McVicker
2023-11-03 23:05           ` Maksym Holovach
2023-11-03 23:23             ` Maksym Holovach
2023-11-06 20:12               ` William McVicker
2023-11-05 12:52           ` Krzysztof Kozlowski
     [not found]             ` <2023110535-rare-underdone-b508@gregkh>
2023-11-05 13:14               ` Krzysztof Kozlowski
2023-11-04 17:55         ` Alim Akhtar
2023-11-06 13:36         ` Peter Griffin
2023-11-06 15:10           ` Henrik Grimler
2023-11-06 12:46       ` Peter Griffin
2023-11-06 13:46         ` Krzysztof Kozlowski
2023-11-06 19:42           ` William McVicker
2023-11-07  3:52         ` Alim Akhtar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADrjBPouDPfcj9eCN0BN0Lfd1sOb=Q3jmkeD1aO2on5VHmROJg@mail.gmail.com' \
    --to=peter.griffin@linaro.org \
    --cc=andre.draszik@linaro.org \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-team@android.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mturquette@baylibre.com \
    --cc=olof@lixom.net \
    --cc=robh+dt@kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=saravanak@google.com \
    --cc=sboyd@kernel.org \
    --cc=semen.protsenko@linaro.org \
    --cc=soc@kernel.org \
    --cc=tomasz.figa@gmail.com \
    --cc=tudor.ambarus@linaro.org \
    --cc=will@kernel.org \
    --cc=willmcvicker@google.com \
    --cc=wim@linux-watchdog.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).