All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Rob Landley <rob@landley.net>
Cc: Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Linux-sh list <linux-sh@vger.kernel.org>
Subject: SCI on R2D+ (was: Re: [PATCH] serial: sh-sci: Make sure status register SCxSR is read in correct seq
Date: Tue, 18 Aug 2020 15:11:46 +0000	[thread overview]
Message-ID: <CAMuHMdXH03ec-F8JC7L7mobLddhoUEbdEuOtdDHvMDsR+WJWPg@mail.gmail.com> (raw)
In-Reply-To: <b384543f-c80d-aa63-63a6-1b5dbc47885d@landley.net>

Hi Rob,

On Mon, Aug 17, 2020 at 5:09 AM Rob Landley <rob@landley.net> wrote:
> On 8/16/20 11:22 AM, Prabhakar Mahadev Lad wrote:
> >> FTR, I gave it a try on the SH7751R-based I-O DATA USL-5P aka Landisk:
> >> SCIF is affected, and fixed by commit 3dc4db3662366306 ("serial: sh-sci:
> >> Make sure status register SCxSR is read in correct sequence").
> >>
> > Thank you Geert.
> >
> > Cheers,
> > Prabhakar
>
> Did we ever figure out how to get linux to talk to the _first_ serial port on
> the qemu-system-sh4 r2d board? I'm still doing:
>
>   qemu-system-sh4 -M r2d -serial null -serial mon:stdio
>
> Because I can only get a working console on the _second_ serial port. (SCI vs
> SCIF I think?)

Because the SCI is wired to an SPI bus?
See:
    arch/sh/boards/mach-r2d/setup.c:spi_sh_sci_device()
    arch/sh/kernel/cpu/sh4/setup-sh7750.c:plat_early_device_setup()

To enable support for that:
    CONFIG_SPI=y
    CONFIG_SPI_SH_SCI=y
    CONFIG_RTC_CLASS=y
    CONFIG_RTC_DRV_R9701=y

However, QEMU doesn't support that mode:

    rtc-r9701 spi0.0: cannot read RTC register

Couldn't try on the remote physical R2D+. Will try when it becomes available
again...

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Rob Landley <rob@landley.net>
Cc: Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Linux-sh list <linux-sh@vger.kernel.org>
Subject: SCI on R2D+ (was: Re: [PATCH] serial: sh-sci: Make sure status register SCxSR is read in correct sequence)
Date: Tue, 18 Aug 2020 17:11:46 +0200	[thread overview]
Message-ID: <CAMuHMdXH03ec-F8JC7L7mobLddhoUEbdEuOtdDHvMDsR+WJWPg@mail.gmail.com> (raw)
In-Reply-To: <b384543f-c80d-aa63-63a6-1b5dbc47885d@landley.net>

Hi Rob,

On Mon, Aug 17, 2020 at 5:09 AM Rob Landley <rob@landley.net> wrote:
> On 8/16/20 11:22 AM, Prabhakar Mahadev Lad wrote:
> >> FTR, I gave it a try on the SH7751R-based I-O DATA USL-5P aka Landisk:
> >> SCIF is affected, and fixed by commit 3dc4db3662366306 ("serial: sh-sci:
> >> Make sure status register SCxSR is read in correct sequence").
> >>
> > Thank you Geert.
> >
> > Cheers,
> > Prabhakar
>
> Did we ever figure out how to get linux to talk to the _first_ serial port on
> the qemu-system-sh4 r2d board? I'm still doing:
>
>   qemu-system-sh4 -M r2d -serial null -serial mon:stdio
>
> Because I can only get a working console on the _second_ serial port. (SCI vs
> SCIF I think?)

Because the SCI is wired to an SPI bus?
See:
    arch/sh/boards/mach-r2d/setup.c:spi_sh_sci_device()
    arch/sh/kernel/cpu/sh4/setup-sh7750.c:plat_early_device_setup()

To enable support for that:
    CONFIG_SPI=y
    CONFIG_SPI_SH_SCI=y
    CONFIG_RTC_CLASS=y
    CONFIG_RTC_DRV_R9701=y

However, QEMU doesn't support that mode:

    rtc-r9701 spi0.0: cannot read RTC register

Couldn't try on the remote physical R2D+. Will try when it becomes available
again...

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2020-08-18 15:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-27 18:17 [PATCH] serial: sh-sci: Make sure status register SCxSR is read in correct sequence Kazuhiro Fujita
2020-03-31 13:11 ` Sasha Levin
2020-03-31 15:17 ` Geert Uytterhoeven
2020-03-31 15:58   ` Prabhakar Mahadev Lad
2020-03-31 17:38     ` Geert Uytterhoeven
2020-03-31 18:10       ` Prabhakar Mahadev Lad
2020-04-01 12:43     ` Geert Uytterhoeven
2020-04-02 11:27       ` Lad, Prabhakar
2020-04-02 15:24         ` Geert Uytterhoeven
2020-04-02 15:24           ` Geert Uytterhoeven
2020-04-15 12:36           ` Geert Uytterhoeven
2020-04-15 12:36             ` Geert Uytterhoeven
2020-04-15 23:21             ` Rob Landley
2020-04-15 23:21               ` Rob Landley
2020-08-14 15:25             ` Geert Uytterhoeven
2020-08-14 15:25               ` Geert Uytterhoeven
2020-08-16 16:22               ` Prabhakar Mahadev Lad
2020-08-16 16:22                 ` Prabhakar Mahadev Lad
2020-08-17  3:17                 ` Rob Landley
2020-08-17  3:17                   ` Rob Landley
2020-08-18 15:11                   ` Geert Uytterhoeven [this message]
2020-08-18 15:11                     ` SCI on R2D+ (was: Re: [PATCH] serial: sh-sci: Make sure status register SCxSR is read in correct sequence) Geert Uytterhoeven
2020-03-31 19:07   ` [PATCH] serial: sh-sci: Make sure status register SCxSR is read in correct sequence Chris Brandt

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=CAMuHMdXH03ec-F8JC7L7mobLddhoUEbdEuOtdDHvMDsR+WJWPg@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=rob@landley.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.