From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Matt Redfearn <matt.redfearn@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
James Hogan <jhogan@kernel.org>,
Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>,
linux-serial@vger.kernel.org, linux-mips@linux-mips.org,
"stable # 4 . 14" <stable@vger.kernel.org>,
linux-kernel@vger.kernel.org, Paul Burton <paul.burton@mips.com>,
Ingo Molnar <mingo@kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH 2/2] MIPS: Add custom serial.h with BASE_BAUD override for generic kernel
Date: Tue, 28 Nov 2017 15:35:02 +0100 [thread overview]
Message-ID: <20171128143502.GA17699@kroah.com> (raw)
In-Reply-To: <1511344649-27612-2-git-send-email-matt.redfearn@mips.com>
On Wed, Nov 22, 2017 at 09:57:29AM +0000, Matt Redfearn wrote:
> Add a custom serial.h header for MIPS, allowing platforms to override
> the asm-generic version if required.
>
> The generic platform uses this header to set BASE_BAUD to 0. The
> generic platform supports multiple boards, which may have different
> UART clocks. Also one of the boards supported is the Boston FPGA board,
> where the UART clock depends on the loaded FPGA bitfile. As such there
> is no way that the generic kernel can set a compile time default
> BASE_BAUD.
>
> Commit 31cb9a8575ca ("earlycon: initialise baud field of earlycon device
> structure") changed the behavior of of_setup_earlycon such that any baud
> rate set in the device tree is now set in the earlycon structure. The
> UART driver will then calculate a divisor based on BASE_BAUD and set it.
> With MIPS generic kernels this resulted in garbage output due to the
> incorrect uart clock rate being used to calculate a divisor. This
> commit, combined with "serial: 8250_early: Only set divisor if valid clk
> & baud" prevents the earlycon code setting a bad divisor and restores
> earlycon output.
>
> Fixes: 31cb9a8575ca ("earlycon: initialise baud field of earlycon device structure")
> Cc: stable <stable@vger.kernel.org> # 4.14
> Signed-off-by: Matt Redfearn <matt.redfearn@mips.com>
>
> ---
>
> arch/mips/include/asm/Kbuild | 1 -
> arch/mips/include/asm/serial.h | 21 +++++++++++++++++++++
> 2 files changed, 21 insertions(+), 1 deletion(-)
> create mode 100644 arch/mips/include/asm/serial.h
>
> diff --git a/arch/mips/include/asm/Kbuild b/arch/mips/include/asm/Kbuild
> index 7c8aab23bce8..b1f66699677d 100644
> --- a/arch/mips/include/asm/Kbuild
> +++ b/arch/mips/include/asm/Kbuild
> @@ -16,7 +16,6 @@ generic-y += qrwlock.h
> generic-y += qspinlock.h
> generic-y += sections.h
> generic-y += segment.h
> -generic-y += serial.h
> generic-y += trace_clock.h
> generic-y += unaligned.h
> generic-y += user.h
> diff --git a/arch/mips/include/asm/serial.h b/arch/mips/include/asm/serial.h
> new file mode 100644
> index 000000000000..30be5cd8efdb
> --- /dev/null
> +++ b/arch/mips/include/asm/serial.h
> @@ -0,0 +1,21 @@
> +/*
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License. See the file "COPYING" in the main directory of this archive
> + * for more details.
Which version of the GPL? As it is, this means "GPL v1 and all others".
I doubt you want that :)
thanks,
greg k-h
next prev parent reply other threads:[~2017-11-28 14:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-22 9:57 [PATCH 1/2] serial: 8250_early: Only set divisor if valid clk & baud Matt Redfearn
2017-11-22 9:57 ` Matt Redfearn
2017-11-22 9:57 ` [PATCH 2/2] MIPS: Add custom serial.h with BASE_BAUD override for generic kernel Matt Redfearn
2017-11-22 9:57 ` Matt Redfearn
2017-11-28 14:35 ` Greg Kroah-Hartman [this message]
2017-11-28 15:20 ` Matt Redfearn
2017-11-28 15:20 ` Matt Redfearn
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=20171128143502.GA17699@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Eugeniy.Paltsev@synopsys.com \
--cc=fweisbec@gmail.com \
--cc=jhogan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-serial@vger.kernel.org \
--cc=matt.redfearn@mips.com \
--cc=mingo@kernel.org \
--cc=paul.burton@mips.com \
--cc=ralf@linux-mips.org \
--cc=stable@vger.kernel.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 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.