linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Mukesh, Savaliya" <msavaliy@codeaurora.org>
Cc: akashast@codeaurora.org, linux-serial@vger.kernel.org,
	saravanak@google.com, sspatil@google.com, tkjos@google.com
Subject: Re: [PATCH] serial: msm_geni_serial_console : Add Earlycon support
Date: Wed, 6 May 2020 13:46:12 +0200	[thread overview]
Message-ID: <20200506114612.GA3024358@kroah.com> (raw)
In-Reply-To: <9dd11375-7f6e-8e3d-6243-89089a938f01@codeaurora.org>

On Wed, May 06, 2020 at 05:01:52PM +0530, Mukesh, Savaliya wrote:
> 
> On 4/29/2020 11:08 PM, Greg KH wrote:
> > On Wed, Apr 29, 2020 at 10:49:34PM +0530, Mukesh, Savaliya wrote:
> > > From: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
> > > 
> > > This change enables earlyconsole support as static driver for geni
> > > based UART. Kernel space UART console driver will be generic for
> > > console and other usecases of UART.
> > > 
> > > Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
> > > ---
> > >   drivers/tty/serial/Kconfig                   |  15 +
> > >   drivers/tty/serial/Makefile                  |   1 +
> > >   drivers/tty/serial/msm_geni_serial_console.c | 525 +++++++++++++++++++
> > >   3 files changed, 541 insertions(+)
> > >   create mode 100644 drivers/tty/serial/msm_geni_serial_console.c
> > > 
> > > diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
> > > index 0aea76cd67ff..ded19d80e696 100644
> > > --- a/drivers/tty/serial/Kconfig
> > > +++ b/drivers/tty/serial/Kconfig
> > > @@ -956,6 +956,21 @@ config SERIAL_MSM_CONSOLE
> > >   	select SERIAL_CORE_CONSOLE
> > >   	select SERIAL_EARLYCON
> > > +config SERIAL_MSM_GENI_HALF_SAMPLING
> > > +	bool "Changes clock divider which impacts sampling rate for QUP HW ver greater than 2.5.0"
> > > +	help
> > > +	  Clock divider value should be doubled for QUP hardware version
> > > +	  greater than 2.5.0.
> > How do we know this?  Can't this be dynamically determined at runtime?
> > What about kernels that want to be built for both types of hardware at
> > the same time?
> 
> This will vary for different hardware only if QUP version is lower than
> this.
> 
> We can not determine this dynamically because register address space to read
> QUP version is in QUP wrapper space and that also keep varying per target.
> 
> we only  get internal SE address base in cmdline arg.

I don't understand.  So does this mean we can not build a single kernel
image with support for both?

Why can't you detect "version 2.5.0 or greater" at runtime?  How do you
know this at kernel build time and not at runtime?

We can't add options that prevent generic versions of the kernel from
being able to be built, as that means you just broke kernels that did
work, right?



> 
> > 
> > > +	  As earlycon can't have HW version awareness, decision is taken
> > > +	  based on the configuration.
> > > +
> > > +config SERIAL_MSM_GENI_EARLY_CONSOLE
> > > +	bool "MSM on-chip GENI HW based early console support"
> > > +	select SERIAL_MSM_GENI_HALF_SAMPLING
> > > +	help
> > > +	  Serial early console driver for Qualcomm Technologies Inc's GENI
> > > +	  based QUP hardware.
> > Why can't we have early console without SERIAL_MSM_GENI_HALF_SAMPLING?
> > 
> > Why are these tied directly to each other?  Do you really need 2
> > options?
> HALF_SAMPLING controlls the sampling rate of UART HW, if not then logs come
> garbled due to wrong sampling.

I do not understand what you mean here.  Again, why can this not be
detected at runtime?

Can you split this into two patches, one for the console driver, and one
for the crazy new hardware for newer systems?

thanks,

greg k-h

      reply	other threads:[~2020-05-06 11:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 17:19 [PATCH] serial: msm_geni_serial_console : Add Earlycon support Mukesh, Savaliya
2020-04-29 17:38 ` Greg KH
2020-05-06 11:31   ` Mukesh, Savaliya
2020-05-06 11:46     ` Greg KH [this message]

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=20200506114612.GA3024358@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=akashast@codeaurora.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=msavaliy@codeaurora.org \
    --cc=saravanak@google.com \
    --cc=sspatil@google.com \
    --cc=tkjos@google.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).