From: "Chanho Park" <chanho61.park@samsung.com>
To: "'Marek Szyprowski'" <m.szyprowski@samsung.com>,
"'Krzysztof Kozlowski'" <krzysztof.kozlowski@linaro.org>,
"'Greg Kroah-Hartman'" <gregkh@linuxfoundation.org>
Cc: "'Jiri Slaby'" <jirislaby@kernel.org>,
"'Alim Akhtar'" <alim.akhtar@samsung.com>,
"'Hector Martin'" <marcan@marcan.st>,
"'Jaewon Kim'" <jaewon02.kim@samsung.com>,
"'Vincent Whitchurch'" <vincent.whitchurch@axis.com>,
"'Ilpo Järvinen'" <ilpo.jarvinen@linux.intel.com>,
linux-samsung-soc@vger.kernel.org, linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: RE: [PATCH v3] tty: serial: samsung_tty: loopback mode support
Date: Tue, 12 Jul 2022 09:44:42 +0900 [thread overview]
Message-ID: <000001d89588$936d14c0$ba473e40$@samsung.com> (raw)
In-Reply-To: <4fb8c922-08aa-2ee3-8073-95b8a26bf5db@samsung.com>
> > + if (mctrl & TIOCM_LOOP)
> > + ucon |= S3C2410_UCON_LOOPBACK;
> > + else
> > + ucon &= ~S3C2410_UCON_LOOPBACK;
> > +
> > + wr_regl(port, S3C2410_UCON, ucon);
>
> S3C2410_UCON must be modified at least under the local_irq_save() or port
> lock, otherwise it breaks kernel console operation on older Exynos SoCs
> (especially when DMA mode is used).
>
> The above read-modify-write sequence should be replaced with the following
> pattern:
>
> if (mctrl & TIOCM_LOOP)
> s3c24xx_set_bit(port, S3C2410_UCON_LOOPBACK, S3C2410_UCON);
> else
> s3c24xx_clear_bit(port, S3C2410_UCON_LOOPBACK, S3C2410_UCON);
All the set_mctrl() call can be protected by spin_[un]lock_irq[save/restore] with port->lock.
So, I think it is not required.
Best Regards,
Chanho Park
next prev parent reply other threads:[~2022-07-12 0:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220629004356epcas2p408afcd3d19d926a86d98e887e25e93bc@epcas2p4.samsung.com>
2022-06-29 0:41 ` [PATCH v3] tty: serial: samsung_tty: loopback mode support Chanho Park
2022-07-11 12:31 ` Marek Szyprowski
2022-07-12 0:44 ` Chanho Park [this message]
2022-07-12 13:58 ` Marek Szyprowski
2022-07-12 23:55 ` Chanho Park
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='000001d89588$936d14c0$ba473e40$@samsung.com' \
--to=chanho61.park@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jaewon02.kim@samsung.com \
--cc=jirislaby@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=marcan@marcan.st \
--cc=vincent.whitchurch@axis.com \
/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).