* Re: [PATCH] serial: sh-sci: Make sure status register SCxSR is read in correct sequence [not found] ` <CA+V-a8vPn_z_j1Vwr_1F=dCw8H=g5UMWvWxgRqBeVR7dzHPz8Q@mail.gmail.com> @ 2020-04-02 15:24 ` Geert Uytterhoeven 2020-04-15 12:36 ` Geert Uytterhoeven 0 siblings, 1 reply; 7+ messages in thread From: Geert Uytterhoeven @ 2020-04-02 15:24 UTC (permalink / raw) To: Lad, Prabhakar Cc: Prabhakar Mahadev Lad, Kazuhiro Fujita, Greg Kroah-Hartman, Jiri Slaby, open list:SERIAL DRIVERS, Linux-Renesas, Linux Kernel Mailing List, Hao Bui, KAZUMI HARADA, Sasha Levin, Chris Brandt, Magnus Damm, Linux-sh list, Rob Landley Hi Prabhakar, On Thu, Apr 2, 2020 at 1:28 PM Lad, Prabhakar <prabhakar.csengg@gmail.com> wrote: > On Wed, Apr 1, 2020 at 1:43 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > On Tue, Mar 31, 2020 at 5:58 PM Prabhakar Mahadev Lad > > <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote: > > > > -----Original Message----- > > > > From: Geert Uytterhoeven <geert@linux-m68k.org> > > > > On Fri, Mar 27, 2020 at 7:17 PM Kazuhiro Fujita > > > > <kazuhiro.fujita.jg@renesas.com> wrote: > > > > > For SCIF and HSCIF interfaces the SCxSR register holds the status of > > > > > data that is to be read next from SCxRDR register, But where as for > > > > > SCIFA and SCIFB interfaces SCxSR register holds status of data that is > > > > > previously read from SCxRDR register. > > > > > > > > > > This patch makes sure the status register is read depending on the port > > > > > types so that errors are caught accordingly. > > > > > > > > > > Cc: <stable@vger.kernel.org> > > > > > Signed-off-by: Kazuhiro Fujita <kazuhiro.fujita.jg@renesas.com> > > > > > Signed-off-by: Hao Bui <hao.bui.yg@renesas.com> > > > > > Signed-off-by: KAZUMI HARADA <kazumi.harada.rh@renesas.com> > > > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > > > Nevertheless, this patch will need some testing on various hardware. > > > > Do you have a test case to verify the broken/fixed behavior? > > > > > > > Agreed, its been tested on RZ/G2x & RZ/G1x by doing a loopback test, configure one interface as CS8 mode(8-bits data, No parity) and other as CS7 mode (7-bits data, 1-bit Parity) and parity errors should be detected. > > > > This can easily be tested on the console. Basic testing can even be > > done with an unmodified kernel, as there is already a "parity error" > > notice message in the driver. > > > > Enable even parity on the console: > > > > $ stty evenp > > > > (use "oddp" for odd parity, and invert all below) > > > > Typing e.g. a single "p" should trigger a parity error. > > Typing "o" shouldn't. > > Without this patch, no parity error is detected on SCIF. > > > > Likewise, pasting a sequence of "p" characters should trigger a lot of > > parity errors, "o" shouldn't. > > Without this patch, parity errors are detected on SCIF, except for the > > first character. > > > > For more advanced testing, make the following change to the driver: > > > > - dev_notice(port->dev, "parity error\n"); > > + dev_notice(port->dev, "parity error for char 0x%02x hweight %u\n", > > c, hweight8(c)); > > > > Pasting an alternating sequence of "p" and "o" characters should trigger > > parity errors for the "p" characters. > > Without this patch, they are triggered for the "o" characters instead. > > > Thank you that makes life easier. > > > With this patch, the issues above are fixed on SCIF. > > This has been verified on: > > 1. SCIF on R-Car Gen 2, > > 2. SCIF on R-Car Gen3 > > 3. SCIF on RZ/A1H, > > 4. SCIF on RZ/A2M. > > > Thank you for the testing. > > > However, I also tried this on HSCIF on R-Car Gen3, where I cannot > > trigger parity errors at all. > > Parabhakar: have you tried HSCIF on RZ/G1 and RZ/G2? Can you trigger > > parity errors on HSCIF? > > > I couldnt test this in RZ/Gx as the hscif interface is connected to > wifi, but I did manage to trigger this > on M3N following are the steps: > 1: Set console as ttySC1 in booatargs > 2: The login console will come up on both SC0&1 > 3: Login through SC0 > 4: Append securetty file: echo ttySC1 >> /etc/securetty > 5: Login through SC1 (CN26 on M3N) > 6: And finally I repeated your steps using stty on SC1 (CN26) to > introduce parity error. Interesting, as I decided to pick up an M3-N target, too ;-) Then I realized you used ttySC1 as the console, so DMA is disabled. I just used the existing getty I have running on the second serial port, which had DMA enabled, and no parity errors were triggered, as sci_receive_chars() is never called. If I disable DMA for HSCIF1 in the .dtsi, parity errors are detected as expected. Hence the driver does not support parity checking when DMA is enabled. I also think it's not easy to add support for that, if possible at all. > > I haven't tested it yet on: > > 1. SCIFB on SH/R-Mobile (needs wiring up), > > 2. SCIFA, SCIFB, and HSCIF on R-Car Gen2 (needs wiring up), > > 3. (H)SCIF on R-Car Gen1 (remote boards unaccessible at the moment), > > 4. SuperH (only remote Migo-R available, but unaccessible). > > > > I can test 1 and 2 (and perhaps 3 and 4) later, if needed. > probably testing this on SuperH is gonna be a pain due to lack of > hardware availability, > (it needs to be tested on 19 platforms) > how about #ifdef CONFIG_ARCH_RENESAS || CONFIG_H8300 and the fix ? I had a look at a few SuperH docs w.r.t. framing/parity error behavior: - SCIF(A) on SH7724: similar to R-Car Gen2, - H(SCIF) on SH7734: same as on R-Car Gen2, - SCIF on SH7751: conflict between status register ("to be read next") and flowchart ("read from"). Let's wait a bit, we're in the middle of the merge window anyway. Probably we can get it tested on SuperH during the coming weeks. 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] serial: sh-sci: Make sure status register SCxSR is read in correct sequence 2020-04-02 15:24 ` [PATCH] serial: sh-sci: Make sure status register SCxSR is read in correct sequence Geert Uytterhoeven @ 2020-04-15 12:36 ` Geert Uytterhoeven 2020-04-15 23:21 ` Rob Landley 2020-08-14 15:25 ` Geert Uytterhoeven 0 siblings, 2 replies; 7+ messages in thread From: Geert Uytterhoeven @ 2020-04-15 12:36 UTC (permalink / raw) To: Lad, Prabhakar Cc: Prabhakar Mahadev Lad, Kazuhiro Fujita, Greg Kroah-Hartman, Jiri Slaby, open list:SERIAL DRIVERS, Linux-Renesas, Linux Kernel Mailing List, Hao Bui, KAZUMI HARADA, Sasha Levin, Chris Brandt, Magnus Damm, Linux-sh list, Rob Landley, John Paul Adrian Glaubitz On Thu, Apr 2, 2020 at 5:24 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > On Thu, Apr 2, 2020 at 1:28 PM Lad, Prabhakar > <prabhakar.csengg@gmail.com> wrote: > > On Wed, Apr 1, 2020 at 1:43 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > > On Tue, Mar 31, 2020 at 5:58 PM Prabhakar Mahadev Lad > > > <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote: > > > > > -----Original Message----- > > > > > From: Geert Uytterhoeven <geert@linux-m68k.org> > > > > > On Fri, Mar 27, 2020 at 7:17 PM Kazuhiro Fujita > > > > > <kazuhiro.fujita.jg@renesas.com> wrote: > > > > > > For SCIF and HSCIF interfaces the SCxSR register holds the status of > > > > > > data that is to be read next from SCxRDR register, But where as for > > > > > > SCIFA and SCIFB interfaces SCxSR register holds status of data that is > > > > > > previously read from SCxRDR register. > > > > > > > > > > > > This patch makes sure the status register is read depending on the port > > > > > > types so that errors are caught accordingly. > > > > > > > > > > > > Cc: <stable@vger.kernel.org> > > > > > > Signed-off-by: Kazuhiro Fujita <kazuhiro.fujita.jg@renesas.com> > > > > > > Signed-off-by: Hao Bui <hao.bui.yg@renesas.com> > > > > > > Signed-off-by: KAZUMI HARADA <kazumi.harada.rh@renesas.com> > > > > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > > > > > Nevertheless, this patch will need some testing on various hardware. > > > > > Do you have a test case to verify the broken/fixed behavior? > > > > > > > > > Agreed, its been tested on RZ/G2x & RZ/G1x by doing a loopback test, configure one interface as CS8 mode(8-bits data, No parity) and other as CS7 mode (7-bits data, 1-bit Parity) and parity errors should be detected. > > > > > > This can easily be tested on the console. Basic testing can even be > > > done with an unmodified kernel, as there is already a "parity error" > > > notice message in the driver. > > > > > > Enable even parity on the console: > > > > > > $ stty evenp > > > > > > (use "oddp" for odd parity, and invert all below) > > > > > > Typing e.g. a single "p" should trigger a parity error. > > > Typing "o" shouldn't. > > > Without this patch, no parity error is detected on SCIF. > > > > > > Likewise, pasting a sequence of "p" characters should trigger a lot of > > > parity errors, "o" shouldn't. > > > Without this patch, parity errors are detected on SCIF, except for the > > > first character. > > > > > > For more advanced testing, make the following change to the driver: > > > > > > - dev_notice(port->dev, "parity error\n"); > > > + dev_notice(port->dev, "parity error for char 0x%02x hweight %u\n", > > > c, hweight8(c)); > > > > > > Pasting an alternating sequence of "p" and "o" characters should trigger > > > parity errors for the "p" characters. > > > Without this patch, they are triggered for the "o" characters instead. > > > > > Thank you that makes life easier. > > > > > With this patch, the issues above are fixed on SCIF. > > > This has been verified on: > > > 1. SCIF on R-Car Gen 2, > > > 2. SCIF on R-Car Gen3 > > > 3. SCIF on RZ/A1H, > > > 4. SCIF on RZ/A2M. > If I disable DMA for HSCIF1 in the .dtsi, parity errors are detected > as expected. So HSCIF on R-Car Gen3 is affected, and fixed by this patch. > Hence the driver does not support parity checking when DMA is enabled. > I also think it's not easy to add support for that, if possible at all. > > > > I haven't tested it yet on: > > > 1. SCIFB on SH/R-Mobile (needs wiring up), SCIFB on R-Mobile A1 is not affected, and works before/after, as expected. > > > 2. SCIFA, SCIFB, and HSCIF on R-Car Gen2 (needs wiring up), Same for SCIFA, SCIFB on R-Car M2-W. HSCIF on R-Car M2-W is affected, and fixed by this patch. This means the modern platforms we care about are handled fine, so Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> That leaves us with testing on a few legacy platforms... > > > 3. (H)SCIF on R-Car Gen1 (remote boards unaccessible at the moment), > > > 4. SuperH (only remote Migo-R available, but unaccessible). > > > > > > I can test 1 and 2 (and perhaps 3 and 4) later, if needed. > > probably testing this on SuperH is gonna be a pain due to lack of > > hardware availability, > > (it needs to be tested on 19 platforms) > > how about #ifdef CONFIG_ARCH_RENESAS || CONFIG_H8300 and the fix ? > > I had a look at a few SuperH docs w.r.t. framing/parity error behavior: > - SCIF(A) on SH7724: similar to R-Car Gen2, > - H(SCIF) on SH7734: same as on R-Car Gen2, > - SCIF on SH7751: conflict between status register ("to be read next") > and flowchart ("read from"). > > Let's wait a bit, we're in the middle of the merge window anyway. > Probably we can get it tested on SuperH during the coming weeks. Anyone with a real (not qemu) SuperH system who can do the basic "stty evenp" tests above, and report back to us? Thanks a lot! 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] serial: sh-sci: Make sure status register SCxSR is read in correct sequence 2020-04-15 12:36 ` Geert Uytterhoeven @ 2020-04-15 23:21 ` Rob Landley 2020-08-14 15:25 ` Geert Uytterhoeven 1 sibling, 0 replies; 7+ messages in thread From: Rob Landley @ 2020-04-15 23:21 UTC (permalink / raw) To: Geert Uytterhoeven, Lad, Prabhakar Cc: Prabhakar Mahadev Lad, Kazuhiro Fujita, Greg Kroah-Hartman, Jiri Slaby, open list:SERIAL DRIVERS, Linux-Renesas, Linux Kernel Mailing List, Hao Bui, KAZUMI HARADA, Sasha Levin, Chris Brandt, Magnus Damm, Linux-sh list, John Paul Adrian Glaubitz On 4/15/20 7:36 AM, Geert Uytterhoeven wrote: >> Let's wait a bit, we're in the middle of the merge window anyway. >> Probably we can get it tested on SuperH during the coming weeks. > > Anyone with a real (not qemu) SuperH system who can do the basic "stty evenp" > tests above, and report back to us? > Thanks a lot! The j-core boards use either uartlite or 16550a for serial, and neither of my legacy sh4 boxes is easily accessible right now. But if nobody manages to test this before next merge window poke me and I can set one up. Rob ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] serial: sh-sci: Make sure status register SCxSR is read in correct sequence 2020-04-15 12:36 ` Geert Uytterhoeven 2020-04-15 23:21 ` Rob Landley @ 2020-08-14 15:25 ` Geert Uytterhoeven 2020-08-16 16:22 ` Prabhakar Mahadev Lad 1 sibling, 1 reply; 7+ messages in thread From: Geert Uytterhoeven @ 2020-08-14 15:25 UTC (permalink / raw) To: Lad, Prabhakar Cc: Prabhakar Mahadev Lad, Kazuhiro Fujita, Greg Kroah-Hartman, Jiri Slaby, open list:SERIAL DRIVERS, Linux-Renesas, Linux Kernel Mailing List, Hao Bui, KAZUMI HARADA, Sasha Levin, Chris Brandt, Magnus Damm, Linux-sh list, Rob Landley, John Paul Adrian Glaubitz On Wed, Apr 15, 2020 at 2:36 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > On Thu, Apr 2, 2020 at 5:24 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > On Thu, Apr 2, 2020 at 1:28 PM Lad, Prabhakar > > <prabhakar.csengg@gmail.com> wrote: > > > On Wed, Apr 1, 2020 at 1:43 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > > > On Tue, Mar 31, 2020 at 5:58 PM Prabhakar Mahadev Lad > > > > <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote: > > > > > > -----Original Message----- > > > > > > From: Geert Uytterhoeven <geert@linux-m68k.org> > > > > > > On Fri, Mar 27, 2020 at 7:17 PM Kazuhiro Fujita > > > > > > <kazuhiro.fujita.jg@renesas.com> wrote: > > > > > > > For SCIF and HSCIF interfaces the SCxSR register holds the status of > > > > > > > data that is to be read next from SCxRDR register, But where as for > > > > > > > SCIFA and SCIFB interfaces SCxSR register holds status of data that is > > > > > > > previously read from SCxRDR register. > > > > > > > > > > > > > > This patch makes sure the status register is read depending on the port > > > > > > > types so that errors are caught accordingly. > > > > > > > > > > > > > > Cc: <stable@vger.kernel.org> > > > > > > > Signed-off-by: Kazuhiro Fujita <kazuhiro.fujita.jg@renesas.com> > > > > > > > Signed-off-by: Hao Bui <hao.bui.yg@renesas.com> > > > > > > > Signed-off-by: KAZUMI HARADA <kazumi.harada.rh@renesas.com> > > > > > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > > > > > > > Nevertheless, this patch will need some testing on various hardware. > > > > > > Do you have a test case to verify the broken/fixed behavior? > > > > > > > > > > > Agreed, its been tested on RZ/G2x & RZ/G1x by doing a loopback test, configure one interface as CS8 mode(8-bits data, No parity) and other as CS7 mode (7-bits data, 1-bit Parity) and parity errors should be detected. > > > > > > > > This can easily be tested on the console. Basic testing can even be > > > > done with an unmodified kernel, as there is already a "parity error" > > > > notice message in the driver. > > > > > > > > Enable even parity on the console: > > > > > > > > $ stty evenp > > > > > > > > (use "oddp" for odd parity, and invert all below) > > > > > > > > Typing e.g. a single "p" should trigger a parity error. > > > > Typing "o" shouldn't. > > > > Without this patch, no parity error is detected on SCIF. > > > > > > > > Likewise, pasting a sequence of "p" characters should trigger a lot of > > > > parity errors, "o" shouldn't. > > > > Without this patch, parity errors are detected on SCIF, except for the > > > > first character. > > > > > > > > For more advanced testing, make the following change to the driver: > > > > > > > > - dev_notice(port->dev, "parity error\n"); > > > > + dev_notice(port->dev, "parity error for char 0x%02x hweight %u\n", > > > > c, hweight8(c)); > > > > > > > > Pasting an alternating sequence of "p" and "o" characters should trigger > > > > parity errors for the "p" characters. > > > > Without this patch, they are triggered for the "o" characters instead. > > > > > > > Thank you that makes life easier. > > > > > > > With this patch, the issues above are fixed on SCIF. > > > > This has been verified on: > > > > 1. SCIF on R-Car Gen 2, > > > > 2. SCIF on R-Car Gen3 > > > > 3. SCIF on RZ/A1H, > > > > 4. SCIF on RZ/A2M. > > > If I disable DMA for HSCIF1 in the .dtsi, parity errors are detected > > as expected. > > So HSCIF on R-Car Gen3 is affected, and fixed by this patch. > > > Hence the driver does not support parity checking when DMA is enabled. > > I also think it's not easy to add support for that, if possible at all. > > > > > > I haven't tested it yet on: > > > > 1. SCIFB on SH/R-Mobile (needs wiring up), > > SCIFB on R-Mobile A1 is not affected, and works before/after, as expected. > > > > > 2. SCIFA, SCIFB, and HSCIF on R-Car Gen2 (needs wiring up), > > Same for SCIFA, SCIFB on R-Car M2-W. > > HSCIF on R-Car M2-W is affected, and fixed by this patch. > > This means the modern platforms we care about are handled fine, so > Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> > > That leaves us with testing on a few legacy platforms... > > > > > 3. (H)SCIF on R-Car Gen1 (remote boards unaccessible at the moment), > > > > 4. SuperH (only remote Migo-R available, but unaccessible). > > > > > > > > I can test 1 and 2 (and perhaps 3 and 4) later, if needed. > > > probably testing this on SuperH is gonna be a pain due to lack of > > > hardware availability, > > > (it needs to be tested on 19 platforms) > > > how about #ifdef CONFIG_ARCH_RENESAS || CONFIG_H8300 and the fix ? > > > > I had a look at a few SuperH docs w.r.t. framing/parity error behavior: > > - SCIF(A) on SH7724: similar to R-Car Gen2, > > - H(SCIF) on SH7734: same as on R-Car Gen2, > > - SCIF on SH7751: conflict between status register ("to be read next") > > and flowchart ("read from"). 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"). 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] serial: sh-sci: Make sure status register SCxSR is read in correct sequence 2020-08-14 15:25 ` Geert Uytterhoeven @ 2020-08-16 16:22 ` Prabhakar Mahadev Lad 2020-08-17 3:17 ` Rob Landley 0 siblings, 1 reply; 7+ messages in thread From: Prabhakar Mahadev Lad @ 2020-08-16 16:22 UTC (permalink / raw) To: Geert Uytterhoeven, Lad, Prabhakar Cc: Kazuhiro Fujita, Greg Kroah-Hartman, Jiri Slaby, open list:SERIAL DRIVERS, Linux-Renesas, Linux Kernel Mailing List, Hao Bui, KAZUMI HARADA, Sasha Levin, Chris Brandt, Magnus Damm, Linux-sh list, Rob Landley, John Paul Adrian Glaubit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YSB0cnkgb24g dGhlIFNINzc1MVItYmFzZWQgSS1PIERBVEEgVVNMLTVQIGFrYSBMYW5kaXNrOg0KPiBTQ0lGIGlz IGFmZmVjdGVkLCBhbmQgZml4ZWQgYnkgY29tbWl0IDNkYzRkYjM2NjIzNjYzMDYgKCJzZXJpYWw6 IHNoLXNjaToNCj4gTWFrZSBzdXJlIHN0YXR1cyByZWdpc3RlciBTQ3hTUiBpcyByZWFkIGluIGNv cnJlY3Qgc2VxdWVuY2UiKS4NCj4NClRoYW5rIHlvdSBHZWVydC4NCg0KQ2hlZXJzLA0KUHJhYmhh a2FyDQoNCg0KUmVuZXNhcyBFbGVjdHJvbmljcyBFdXJvcGUgR21iSCwgR2VzY2hhZWZ0c2Z1ZWhy ZXIvUHJlc2lkZW50OiBDYXJzdGVuIEphdWNoLCBTaXR6IGRlciBHZXNlbGxzY2hhZnQvUmVnaXN0 ZXJlZCBvZmZpY2U6IER1ZXNzZWxkb3JmLCBBcmNhZGlhc3RyYXNzZSAxMCwgNDA0NzIgRHVlc3Nl bGRvcmYsIEdlcm1hbnksIEhhbmRlbHNyZWdpc3Rlci9Db21tZXJjaWFsIFJlZ2lzdGVyOiBEdWVz c2VsZG9yZiwgSFJCIDM3MDggVVN0LUlETnIuL1RheCBpZGVudGlmaWNhdGlvbiBuby46IERFIDEx OTM1MzQwNiBXRUVFLVJlZy4tTnIuL1dFRUUgcmVnLiBuby46IERFIDE0OTc4NjQ3DQo ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] serial: sh-sci: Make sure status register SCxSR is read in correct sequence 2020-08-16 16:22 ` Prabhakar Mahadev Lad @ 2020-08-17 3:17 ` Rob Landley 2020-08-18 15:11 ` SCI on R2D+ (was: Re: [PATCH] serial: sh-sci: Make sure status register SCxSR is read in correct seq Geert Uytterhoeven 0 siblings, 1 reply; 7+ messages in thread From: Rob Landley @ 2020-08-17 3:17 UTC (permalink / raw) To: Prabhakar Mahadev Lad, Geert Uytterhoeven, Lad, Prabhakar Cc: Kazuhiro Fujita, Greg Kroah-Hartman, Jiri Slaby, open list:SERIAL DRIVERS, Linux-Renesas, Linux Kernel Mailing List, Hao Bui, KAZUMI HARADA, Sasha Levin, Chris Brandt, Magnus Damm, Linux-sh list, John Paul Adrian Glaubitz 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?) Rob ^ permalink raw reply [flat|nested] 7+ messages in thread
* SCI on R2D+ (was: Re: [PATCH] serial: sh-sci: Make sure status register SCxSR is read in correct seq 2020-08-17 3:17 ` Rob Landley @ 2020-08-18 15:11 ` Geert Uytterhoeven 0 siblings, 0 replies; 7+ messages in thread From: Geert Uytterhoeven @ 2020-08-18 15:11 UTC (permalink / raw) To: Rob Landley; +Cc: Linux-Renesas, Magnus Damm, Linux-sh list 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-08-18 15:11 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1585333048-31828-1-git-send-email-kazuhiro.fujita.jg@renesas.com> [not found] ` <CAMuHMdW+u5r6zyxFJsVzj21BYDrKCr=Q6Ojk5VeN+mkhvXX9Jw@mail.gmail.com> [not found] ` <OSBPR01MB3590E3D12546BC6711CEB542AAC80@OSBPR01MB3590.jpnprd01.prod.outlook.com> [not found] ` <CAMuHMdXmfQ0x7mCZ-E7OPQFv2z-=mFDT20hJ2_JKax=OePB8eA@mail.gmail.com> [not found] ` <CA+V-a8vPn_z_j1Vwr_1F=dCw8H=g5UMWvWxgRqBeVR7dzHPz8Q@mail.gmail.com> 2020-04-02 15:24 ` [PATCH] serial: sh-sci: Make sure status register SCxSR is read in correct sequence Geert Uytterhoeven 2020-04-15 12:36 ` Geert Uytterhoeven 2020-04-15 23:21 ` Rob Landley 2020-08-14 15:25 ` Geert Uytterhoeven 2020-08-16 16:22 ` Prabhakar Mahadev Lad 2020-08-17 3:17 ` Rob Landley 2020-08-18 15:11 ` SCI on R2D+ (was: Re: [PATCH] serial: sh-sci: Make sure status register SCxSR is read in correct seq Geert Uytterhoeven
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).