* Re: [PATCH 00/47] arch-removal: device drivers
From: Boris Brezillon @ 2018-03-15 5:32 UTC (permalink / raw)
To: Arnd Bergmann
Cc: ulf.hansson, linux-usb, wsa, linux-iio, viresh.kumar,
linus.walleij, alexandre.belloni, linux-ide, netdev, linux-mtd,
linux-i2c, linux-rtc, lars, herbert, corbet, linux-doc, stern,
linux-serial, jslaby, linux-mmc, shli, wg, linux-crypto,
linux-pwm, linux-watchdog, alsa-devel, b.zolnierkie, linux-input,
linux-can, linux-raid, linux-gpio, broonie, bp, linux-fbdev,
mchehab
In-Reply-To: <20180314153603.3127932-1-arnd@arndb.de>
Hi Arnd,
On Wed, 14 Mar 2018 16:35:13 +0100
Arnd Bergmann <arnd@arndb.de> wrote:
> Hi driver maintainers,
>
> I just posted one series with the removal of eight architectures,
> see https://lkml.org/lkml/2018/3/14/505 for details, or
> https://lwn.net/Articles/748074/ for more background.
>
> These are the device drivers that go along with them. I have already
> picked up the drivers for arch/metag/ into my tree, they were reviewed
> earlier.
>
> Please let me know if you have any concerns with the patch, or if you
> prefer to pick up the patches in your respective trees. I created
> the patches with 'git format-patch -D', so they will not apply without
> manually removing those files.
>
> For anything else, I'd keep the removal patches in my asm-generic tree
> and will send a pull request for 4.17 along with the actual arch removal.
>
> Arnd
>
> Arnd Bergmann
> edac: remove tile driver
> net: tile: remove ethernet drivers
> net: adi: remove blackfin ethernet drivers
> net: 8390: remove m32r specific bits
> net: remove cris etrax ethernet driver
> net: smsc: remove m32r specific smc91x configuration
> raid: remove tile specific raid6 implementation
> rtc: remove tile driver
> rtc: remove bfin driver
> char: remove obsolete ds1302 rtc driver
> char: remove tile-srom.c
> char: remove blackfin OTP driver
> pcmcia: remove m32r drivers
> pcmcia: remove blackfin driver
> ASoC: remove blackfin drivers
> video/logo: remove obsolete logo files
> fbdev: remove blackfin drivers
> fbdev: s1d13xxxfb: remove m32r specific hacks
> crypto: remove blackfin CRC driver
> media: platform: remove blackfin capture driver
> media: platform: remove m32r specific arv driver
> cpufreq: remove blackfin driver
> cpufreq: remove cris specific drivers
> gpio: remove etraxfs driver
> pinctrl: remove adi2/blackfin drivers
> ata: remove bf54x driver
> input: keyboard: remove bf54x driver
> input: misc: remove blackfin rotary driver
> mmc: remove bfin_sdh driver
> can: remove bfin_can driver
> watchdog: remove bfin_wdt driver
> mtd: maps: remove bfin-async-flash driver
> mtd: nand: remove bf5xx_nand driver
If you don't mind, I'd like to take the mtd patches through the MTD
tree. As you've probably noticed, nand code has been moved around and
it's easier for me to carry those 2 simple changes in my tree than
creating an immutable branch.
Let me know if this is a problem.
Regards,
Boris
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply
* Re: [PATCH v2] earlycon: Fix __earlycon_table stride... again
From: Randy Dunlap @ 2018-03-15 2:33 UTC (permalink / raw)
To: Daniel Kurtz, Peter Hurley, Rob Herring
Cc: adurbin, Greg Kroah-Hartman, linux-kernel, Grant Likely,
Rob Herring, Frank Rowand, Jiri Slaby, Arnd Bergmann,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE,
open list:SERIAL DRIVERS,
open list:GENERIC INCLUDE/ASM HEADER FILES
In-Reply-To: <20180315014817.142930-1-djkurtz@chromium.org>
On 03/14/2018 06:48 PM, Daniel Kurtz wrote:
> Commit 470ca0de69fe ("serial: earlycon: Enable earlycon without command
> line param") added EARLYCON_TABLE().
>
> Commit 99492c39f39f ("earlycon: Fix __earlycon_table stride") referenced
> commit 07fca0e57fca92 ("tracing: Properly align linker defined symbols")
> and tried to fix EARLYCON_TABLE() using __aligned(32).
>
> However, the fix copied just works around compiler behavior. In fact, it
> was subsequently re-implemented for tracing using a table of pointers in
> commit 3d56e331b653 ("tracing: Replace syscall_meta_data struct array with
> pointer array"), commit 654986462939 ("tracepoints: Fix section alignment
> using pointer array") and commit e4a9ea5ee7c8 ("tracing: Replace
> trace_event struct array with pointer array").
>
> Let's do the same "array of pointers to structs" approach for
> EARLYCON_TABLE.
Please describe what the problem is instead of just what the fix is.
Thanks.
> Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
> ---
> Changes since v1:
> * Change __earlycon_table to an array of pointers.
>
> Note: I do not have a convenient system to test the of/fdt.c part of this
> patch, so would apreciate help verifying it. Thanks!
>
> drivers/of/fdt.c | 7 +++++--
> drivers/tty/serial/earlycon.c | 6 ++++--
> include/asm-generic/vmlinux.lds.h | 2 +-
> include/linux/serial_core.h | 21 ++++++++++++++-------
> 4 files changed, 24 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index 84aa9d676375..6da20b9688f7 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -942,7 +942,7 @@ int __init early_init_dt_scan_chosen_stdout(void)
> int offset;
> const char *p, *q, *options = NULL;
> int l;
> - const struct earlycon_id *match;
> + const struct earlycon_id **p_match;
> const void *fdt = initial_boot_params;
>
> offset = fdt_path_offset(fdt, "/chosen");
> @@ -969,7 +969,10 @@ int __init early_init_dt_scan_chosen_stdout(void)
> return 0;
> }
>
> - for (match = __earlycon_table; match < __earlycon_table_end; match++) {
> + for (p_match = __earlycon_table; p_match < __earlycon_table_end;
> + p_match++) {
> + const struct earlycon_id *match = *p_match;
> +
> if (!match->compatible[0])
> continue;
>
> diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
> index a24278380fec..22683393a0f2 100644
> --- a/drivers/tty/serial/earlycon.c
> +++ b/drivers/tty/serial/earlycon.c
> @@ -169,7 +169,7 @@ static int __init register_earlycon(char *buf, const struct earlycon_id *match)
> */
> int __init setup_earlycon(char *buf)
> {
> - const struct earlycon_id *match;
> + const struct earlycon_id **p_match;
>
> if (!buf || !buf[0])
> return -EINVAL;
> @@ -177,7 +177,9 @@ int __init setup_earlycon(char *buf)
> if (early_con.flags & CON_ENABLED)
> return -EALREADY;
>
> - for (match = __earlycon_table; match < __earlycon_table_end; match++) {
> + for (p_match = __earlycon_table; p_match < __earlycon_table_end;
> + p_match++) {
> + const struct earlycon_id *match = *p_match;
> size_t len = strlen(match->name);
>
> if (strncmp(buf, match->name, len))
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 1ab0e520d6fc..e17de55c2542 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -179,7 +179,7 @@
> #endif
>
> #ifdef CONFIG_SERIAL_EARLYCON
> -#define EARLYCON_TABLE() STRUCT_ALIGN(); \
> +#define EARLYCON_TABLE() . = ALIGN(8); \
> VMLINUX_SYMBOL(__earlycon_table) = .; \
> KEEP(*(__earlycon_table)) \
> VMLINUX_SYMBOL(__earlycon_table_end) = .;
> diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
> index b32df49a3bd5..93b7add47087 100644
> --- a/include/linux/serial_core.h
> +++ b/include/linux/serial_core.h
> @@ -351,10 +351,10 @@ struct earlycon_id {
> char name[16];
> char compatible[128];
> int (*setup)(struct earlycon_device *, const char *options);
> -} __aligned(32);
> +};
>
> -extern const struct earlycon_id __earlycon_table[];
> -extern const struct earlycon_id __earlycon_table_end[];
> +extern const struct earlycon_id *__earlycon_table[];
> +extern const struct earlycon_id *__earlycon_table_end[];
>
> #if defined(CONFIG_SERIAL_EARLYCON) && !defined(MODULE)
> #define EARLYCON_USED_OR_UNUSED __used
> @@ -362,12 +362,19 @@ extern const struct earlycon_id __earlycon_table_end[];
> #define EARLYCON_USED_OR_UNUSED __maybe_unused
> #endif
>
> -#define OF_EARLYCON_DECLARE(_name, compat, fn) \
> - static const struct earlycon_id __UNIQUE_ID(__earlycon_##_name) \
> - EARLYCON_USED_OR_UNUSED __section(__earlycon_table) \
> +#define _OF_EARLYCON_DECLARE(_name, compat, fn, unique_id) \
> + static const struct earlycon_id unique_id \
> + EARLYCON_USED_OR_UNUSED __initdata \
> = { .name = __stringify(_name), \
> .compatible = compat, \
> - .setup = fn }
> + .setup = fn }; \
> + static const struct earlycon_id EARLYCON_USED_OR_UNUSED \
> + __section(__earlycon_table) \
> + * const __PASTE(__p, unique_id) = &unique_id
> +
> +#define OF_EARLYCON_DECLARE(_name, compat, fn) \
> + _OF_EARLYCON_DECLARE(_name, compat, fn, \
> + __UNIQUE_ID(__earlycon_##_name))
>
> #define EARLYCON_DECLARE(_name, fn) OF_EARLYCON_DECLARE(_name, "", fn)
>
>
--
~Randy
^ permalink raw reply
* [PATCH v3 3/3] serial: core: Allow skipping old serial port initialization
From: Daniel Kurtz @ 2018-03-15 2:04 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: adurbin, linux-kernel, Daniel Kurtz, Rafael J. Wysocki, Len Brown,
Jiri Slaby, Andy Shevchenko, Kees Cook, Matthias Brugger,
David Howells, Allen Pais, Sean Young, Douglas Anderson,
Matt Redfearn, Jeffy Chen, Marc Gonzalez, open list:ACPI,
open list:SERIAL DRIVERS
In-Reply-To: <20180315020445.150604-1-djkurtz@chromium.org>
The old_serial_port global array in 8250_core is supposed to hold an entry
for each serial port on the system that cannot be discovered via a
standard enumeration mechanism (aka ACPI/PCI/DTS). The array is populated
at compile-time from the value specified in the SERIAL_PORT_DFNS macro.
This macro is defined in arch/serial.h.
For x86, this macro is currently unconditionally initialized to supply
four ioport UARTs (0x3F8, 0x2F8, 0x3E8, 0x2E8).
However, not all x86 CPUs have these four ioport UARTs. For example, the
UARTs on AMD Carrizo and later are separate memory mapped Designware IP
blocks.
Fairly early in boot the console_initcall univ8250_console_init iterates
over this array and installs these old UARTs into the global array
serial8250_ports. Further, it attempts to register them for use as
the console. In other words, if, for example, the kernel commandline has
console=ttyS0, the console will be switched over to one of these
non-existent UARTs. Only later, when the real UART drivers are probed
and their devices are instantiated will the console switch back over to
the proper UART.
This is noticeable when using earlycon, since part of the serial console
log will appear to disappear (when the bogus old takes over) and then
re-appear (when the real UART finally gets registered for the console).
The problem is even more noticable when *not* using earlycon, since in
this case the entire console output is missing, having been incorrectly
played back to the non-existing serial port.
Create a global variable to allow skipping old serial port initialization
and wire it up to the AMDCZ ACPI SPCR quirk and the special amdcz earlycon
setup handler.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
---
Changes since v1:
* Rename variable to serial8250_skip_old_ports
* Also set variable in acpi/spcr to support no-earlycon case.
Changes since v2:
* Added IS_ENABLED(CONFIG_SERIAL_825) and removed the .h #ifdef as suggested
by Kees Cook.
drivers/acpi/spcr.c | 3 +++
drivers/tty/serial/8250/8250_core.c | 6 ++++++
drivers/tty/serial/8250/8250_early.c | 1 +
include/linux/serial_8250.h | 2 ++
4 files changed, 12 insertions(+)
diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c
index 52d840d0e05b..d1affdf2bc37 100644
--- a/drivers/acpi/spcr.c
+++ b/drivers/acpi/spcr.c
@@ -14,6 +14,7 @@
#include <linux/acpi.h>
#include <linux/console.h>
#include <linux/kernel.h>
+#include <linux/serial_8250.h>
#include <linux/serial_core.h>
/*
@@ -208,6 +209,8 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
}
if (amdcz_present(table)) {
+ if (IS_ENABLED(CONFIG_SERIAL_8250))
+ serial8250_skip_old_ports = true;
if (enable_earlycon)
uart = "amdcz";
}
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 9342fc2ee7df..a04da392a251 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -66,6 +66,9 @@ static unsigned int skip_txen_test; /* force skip of txen test at init time */
#define SERIAL_PORT_DFNS
#endif
+bool serial8250_skip_old_ports;
+EXPORT_SYMBOL(serial8250_skip_old_ports);
+
static const struct old_serial_port old_serial_port[] = {
SERIAL_PORT_DFNS /* defined in asm/serial.h */
};
@@ -537,6 +540,9 @@ static void __init serial8250_isa_init_ports(void)
if (share_irqs)
irqflag = IRQF_SHARED;
+ if (serial8250_skip_old_ports)
+ return;
+
for (i = 0, up = serial8250_ports;
i < ARRAY_SIZE(old_serial_port) && i < nr_uarts;
i++, up++) {
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index c6bf971a6038..288d2be82990 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -202,6 +202,7 @@ static int __init early_amdcz_setup(struct earlycon_device *dev,
{
struct uart_port *port = &dev->port;
+ serial8250_skip_old_ports = true;
port->uartclk = 48000000;
return early_serial8250_setup(dev, opt);
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index a27ef5f56431..ae739c34546f 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -136,6 +136,8 @@ struct uart_8250_port {
struct uart_8250_em485 *em485;
};
+extern bool serial8250_skip_old_ports;
+
static inline struct uart_8250_port *up_to_u8250p(struct uart_port *up)
{
return container_of(up, struct uart_8250_port, port);
--
2.16.2.804.g6dcf76e118-goog
^ permalink raw reply related
* [PATCH v3 1/3] serial: 8250_early: Add earlycon support for AMD Carrizo / Stoneyridge
From: Daniel Kurtz @ 2018-03-15 2:04 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: adurbin, linux-kernel, Daniel Kurtz, Jiri Slaby, Marc Gonzalez,
Jeffy Chen, Douglas Anderson, Matt Redfearn,
open list:SERIAL DRIVERS
In-Reply-To: <20180315020445.150604-1-djkurtz@chromium.org>
AMD Carrizo / Stoneyridge use a DesignWare 8250 UART that uses a 48 MHz
input clock.
Allow these platforms to set up this clock by specifying a kernel command
line like:
earlycon=amdcz,mmio32,0xfedc6000,115200
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
Changes since v1:
* added Reviewed-by & Suggested-by
drivers/tty/serial/8250/8250_early.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index ae6a256524d8..c6bf971a6038 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -195,3 +195,18 @@ static int __init early_au_setup(struct earlycon_device *dev, const char *opt)
OF_EARLYCON_DECLARE(palmchip, "ralink,rt2880-uart", early_au_setup);
#endif
+
+#ifdef CONFIG_SERIAL_8250_DW
+static int __init early_amdcz_setup(struct earlycon_device *dev,
+ const char *opt)
+{
+ struct uart_port *port = &dev->port;
+
+ port->uartclk = 48000000;
+
+ return early_serial8250_setup(dev, opt);
+}
+
+EARLYCON_DECLARE(amdcz, early_amdcz_setup);
+
+#endif
--
2.16.2.804.g6dcf76e118-goog
^ permalink raw reply related
* Re: [PATCH v2] earlycon: Fix __earlycon_table stride... again
From: Daniel Kurtz @ 2018-03-15 1:57 UTC (permalink / raw)
To: peter, Rob Herring
Cc: adurbin, Greg Kroah-Hartman, linux-kernel, Grant Likely,
Rob Herring, frowand.list, jslaby, Arnd Bergmann,
open list:OPEN FIRMWARE AND..., linux-serial, linux-arch
In-Reply-To: <20180315014817.142930-1-djkurtz@chromium.org>
On Wed, Mar 14, 2018 at 7:48 PM Daniel Kurtz <djkurtz@chromium.org> wrote:
> Commit 470ca0de69fe ("serial: earlycon: Enable earlycon without command
> line param") added EARLYCON_TABLE().
> Commit 99492c39f39f ("earlycon: Fix __earlycon_table stride") referenced
> commit 07fca0e57fca92 ("tracing: Properly align linker defined symbols")
> and tried to fix EARLYCON_TABLE() using __aligned(32).
> However, the fix copied just works around compiler behavior. In fact, it
> was subsequently re-implemented for tracing using a table of pointers in
> commit 3d56e331b653 ("tracing: Replace syscall_meta_data struct array with
> pointer array"), commit 654986462939 ("tracepoints: Fix section alignment
> using pointer array") and commit e4a9ea5ee7c8 ("tracing: Replace
> trace_event struct array with pointer array").
> Let's do the same "array of pointers to structs" approach for
> EARLYCON_TABLE.
> Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Oops, I forgot to add:
Suggested-by: Aaron Durbin <adurbin@chromium.org>
> ---
> Changes since v1:
> * Change __earlycon_table to an array of pointers.
> Note: I do not have a convenient system to test the of/fdt.c part of this
> patch, so would apreciate help verifying it. Thanks!
> drivers/of/fdt.c | 7 +++++--
> drivers/tty/serial/earlycon.c | 6 ++++--
> include/asm-generic/vmlinux.lds.h | 2 +-
> include/linux/serial_core.h | 21 ++++++++++++++-------
> 4 files changed, 24 insertions(+), 12 deletions(-)
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index 84aa9d676375..6da20b9688f7 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -942,7 +942,7 @@ int __init early_init_dt_scan_chosen_stdout(void)
> int offset;
> const char *p, *q, *options = NULL;
> int l;
> - const struct earlycon_id *match;
> + const struct earlycon_id **p_match;
> const void *fdt = initial_boot_params;
> offset = fdt_path_offset(fdt, "/chosen");
> @@ -969,7 +969,10 @@ int __init early_init_dt_scan_chosen_stdout(void)
> return 0;
> }
> - for (match = __earlycon_table; match < __earlycon_table_end;
match++) {
> + for (p_match = __earlycon_table; p_match < __earlycon_table_end;
> + p_match++) {
> + const struct earlycon_id *match = *p_match;
> +
> if (!match->compatible[0])
> continue;
> diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
> index a24278380fec..22683393a0f2 100644
> --- a/drivers/tty/serial/earlycon.c
> +++ b/drivers/tty/serial/earlycon.c
> @@ -169,7 +169,7 @@ static int __init register_earlycon(char *buf, const
struct earlycon_id *match)
> */
> int __init setup_earlycon(char *buf)
> {
> - const struct earlycon_id *match;
> + const struct earlycon_id **p_match;
> if (!buf || !buf[0])
> return -EINVAL;
> @@ -177,7 +177,9 @@ int __init setup_earlycon(char *buf)
> if (early_con.flags & CON_ENABLED)
> return -EALREADY;
> - for (match = __earlycon_table; match < __earlycon_table_end;
match++) {
> + for (p_match = __earlycon_table; p_match < __earlycon_table_end;
> + p_match++) {
> + const struct earlycon_id *match = *p_match;
> size_t len = strlen(match->name);
> if (strncmp(buf, match->name, len))
> diff --git a/include/asm-generic/vmlinux.lds.h
b/include/asm-generic/vmlinux.lds.h
> index 1ab0e520d6fc..e17de55c2542 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -179,7 +179,7 @@
> #endif
> #ifdef CONFIG_SERIAL_EARLYCON
> -#define EARLYCON_TABLE() STRUCT_ALIGN(); \
> +#define EARLYCON_TABLE() . = ALIGN(8); \
> VMLINUX_SYMBOL(__earlycon_table) = .; \
> KEEP(*(__earlycon_table)) \
> VMLINUX_SYMBOL(__earlycon_table_end) = .;
> diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
> index b32df49a3bd5..93b7add47087 100644
> --- a/include/linux/serial_core.h
> +++ b/include/linux/serial_core.h
> @@ -351,10 +351,10 @@ struct earlycon_id {
> char name[16];
> char compatible[128];
> int (*setup)(struct earlycon_device *, const char *options);
> -} __aligned(32);
> +};
> -extern const struct earlycon_id __earlycon_table[];
> -extern const struct earlycon_id __earlycon_table_end[];
> +extern const struct earlycon_id *__earlycon_table[];
> +extern const struct earlycon_id *__earlycon_table_end[];
> #if defined(CONFIG_SERIAL_EARLYCON) && !defined(MODULE)
> #define EARLYCON_USED_OR_UNUSED __used
> @@ -362,12 +362,19 @@ extern const struct earlycon_id
__earlycon_table_end[];
> #define EARLYCON_USED_OR_UNUSED __maybe_unused
> #endif
> -#define OF_EARLYCON_DECLARE(_name, compat, fn) \
> - static const struct earlycon_id __UNIQUE_ID(__earlycon_##_name) \
> - EARLYCON_USED_OR_UNUSED __section(__earlycon_table) \
> +#define _OF_EARLYCON_DECLARE(_name, compat, fn, unique_id) \
> + static const struct earlycon_id unique_id \
> + EARLYCON_USED_OR_UNUSED __initdata \
> = { .name = __stringify(_name), \
> .compatible = compat, \
> - .setup = fn }
> + .setup = fn }; \
> + static const struct earlycon_id EARLYCON_USED_OR_UNUSED \
> + __section(__earlycon_table) \
> + * const __PASTE(__p, unique_id) = &unique_id
> +
> +#define OF_EARLYCON_DECLARE(_name, compat, fn) \
> + _OF_EARLYCON_DECLARE(_name, compat, fn, \
> + __UNIQUE_ID(__earlycon_##_name))
> #define EARLYCON_DECLARE(_name, fn) OF_EARLYCON_DECLARE(_name, "", fn)
> --
> 2.16.2.804.g6dcf76e118-goog
^ permalink raw reply
* [PATCH v2] earlycon: Fix __earlycon_table stride... again
From: Daniel Kurtz @ 2018-03-15 1:48 UTC (permalink / raw)
To: Peter Hurley, Rob Herring
Cc: adurbin, Greg Kroah-Hartman, linux-kernel, Grant Likely,
Daniel Kurtz, Rob Herring, Frank Rowand, Jiri Slaby,
Arnd Bergmann, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE,
open list:SERIAL DRIVERS,
open list:GENERIC INCLUDE/ASM HEADER FILES
Commit 470ca0de69fe ("serial: earlycon: Enable earlycon without command
line param") added EARLYCON_TABLE().
Commit 99492c39f39f ("earlycon: Fix __earlycon_table stride") referenced
commit 07fca0e57fca92 ("tracing: Properly align linker defined symbols")
and tried to fix EARLYCON_TABLE() using __aligned(32).
However, the fix copied just works around compiler behavior. In fact, it
was subsequently re-implemented for tracing using a table of pointers in
commit 3d56e331b653 ("tracing: Replace syscall_meta_data struct array with
pointer array"), commit 654986462939 ("tracepoints: Fix section alignment
using pointer array") and commit e4a9ea5ee7c8 ("tracing: Replace
trace_event struct array with pointer array").
Let's do the same "array of pointers to structs" approach for
EARLYCON_TABLE.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
---
Changes since v1:
* Change __earlycon_table to an array of pointers.
Note: I do not have a convenient system to test the of/fdt.c part of this
patch, so would apreciate help verifying it. Thanks!
drivers/of/fdt.c | 7 +++++--
drivers/tty/serial/earlycon.c | 6 ++++--
include/asm-generic/vmlinux.lds.h | 2 +-
include/linux/serial_core.h | 21 ++++++++++++++-------
4 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 84aa9d676375..6da20b9688f7 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -942,7 +942,7 @@ int __init early_init_dt_scan_chosen_stdout(void)
int offset;
const char *p, *q, *options = NULL;
int l;
- const struct earlycon_id *match;
+ const struct earlycon_id **p_match;
const void *fdt = initial_boot_params;
offset = fdt_path_offset(fdt, "/chosen");
@@ -969,7 +969,10 @@ int __init early_init_dt_scan_chosen_stdout(void)
return 0;
}
- for (match = __earlycon_table; match < __earlycon_table_end; match++) {
+ for (p_match = __earlycon_table; p_match < __earlycon_table_end;
+ p_match++) {
+ const struct earlycon_id *match = *p_match;
+
if (!match->compatible[0])
continue;
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index a24278380fec..22683393a0f2 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -169,7 +169,7 @@ static int __init register_earlycon(char *buf, const struct earlycon_id *match)
*/
int __init setup_earlycon(char *buf)
{
- const struct earlycon_id *match;
+ const struct earlycon_id **p_match;
if (!buf || !buf[0])
return -EINVAL;
@@ -177,7 +177,9 @@ int __init setup_earlycon(char *buf)
if (early_con.flags & CON_ENABLED)
return -EALREADY;
- for (match = __earlycon_table; match < __earlycon_table_end; match++) {
+ for (p_match = __earlycon_table; p_match < __earlycon_table_end;
+ p_match++) {
+ const struct earlycon_id *match = *p_match;
size_t len = strlen(match->name);
if (strncmp(buf, match->name, len))
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 1ab0e520d6fc..e17de55c2542 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -179,7 +179,7 @@
#endif
#ifdef CONFIG_SERIAL_EARLYCON
-#define EARLYCON_TABLE() STRUCT_ALIGN(); \
+#define EARLYCON_TABLE() . = ALIGN(8); \
VMLINUX_SYMBOL(__earlycon_table) = .; \
KEEP(*(__earlycon_table)) \
VMLINUX_SYMBOL(__earlycon_table_end) = .;
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index b32df49a3bd5..93b7add47087 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -351,10 +351,10 @@ struct earlycon_id {
char name[16];
char compatible[128];
int (*setup)(struct earlycon_device *, const char *options);
-} __aligned(32);
+};
-extern const struct earlycon_id __earlycon_table[];
-extern const struct earlycon_id __earlycon_table_end[];
+extern const struct earlycon_id *__earlycon_table[];
+extern const struct earlycon_id *__earlycon_table_end[];
#if defined(CONFIG_SERIAL_EARLYCON) && !defined(MODULE)
#define EARLYCON_USED_OR_UNUSED __used
@@ -362,12 +362,19 @@ extern const struct earlycon_id __earlycon_table_end[];
#define EARLYCON_USED_OR_UNUSED __maybe_unused
#endif
-#define OF_EARLYCON_DECLARE(_name, compat, fn) \
- static const struct earlycon_id __UNIQUE_ID(__earlycon_##_name) \
- EARLYCON_USED_OR_UNUSED __section(__earlycon_table) \
+#define _OF_EARLYCON_DECLARE(_name, compat, fn, unique_id) \
+ static const struct earlycon_id unique_id \
+ EARLYCON_USED_OR_UNUSED __initdata \
= { .name = __stringify(_name), \
.compatible = compat, \
- .setup = fn }
+ .setup = fn }; \
+ static const struct earlycon_id EARLYCON_USED_OR_UNUSED \
+ __section(__earlycon_table) \
+ * const __PASTE(__p, unique_id) = &unique_id
+
+#define OF_EARLYCON_DECLARE(_name, compat, fn) \
+ _OF_EARLYCON_DECLARE(_name, compat, fn, \
+ __UNIQUE_ID(__earlycon_##_name))
#define EARLYCON_DECLARE(_name, fn) OF_EARLYCON_DECLARE(_name, "", fn)
--
2.16.2.804.g6dcf76e118-goog
^ permalink raw reply related
* Re: [PATCH v2 3/3] serial: core: Allow skipping old serial port initialization
From: Daniel Kurtz @ 2018-03-15 1:08 UTC (permalink / raw)
To: Kees Cook
Cc: Greg Kroah-Hartman, adurbin, linux-kernel, Rafael J. Wysocki,
Len Brown, jslaby, Andy Shevchenko, mbrugger, dhowells, vigneshr,
sean, Jeffy, Doug Anderson, matt.redfearn, marc_gonzalez,
linux-acpi, linux-serial
In-Reply-To: <CAGXu5j+cOZXCTx3SZT2u5rVv4zDpEhX6hjdp+4DUtN=kE+Q-PQ@mail.gmail.com>
On Wed, Mar 14, 2018 at 6:55 PM Kees Cook <keescook@chromium.org> wrote:
> On Wed, Mar 14, 2018 at 5:23 PM, Daniel Kurtz <djkurtz@chromium.org>
wrote:
> > On Wed, Mar 14, 2018 at 5:00 PM Kees Cook <keescook@chromium.org> wrote:
> >
> >> On Wed, Mar 14, 2018 at 3:58 PM, Kees Cook <keescook@chromium.org>
wrote:
> >> > On Wed, Mar 14, 2018 at 2:44 PM, Daniel Kurtz <djkurtz@chromium.org>
> > wrote:
> >> > Sorry for being dense. What tree is this against? I can't find
mention
> >> > of amdcz in Linus's tree nor linux-next.
> >
> >> As I watched this email send, I noticed the "3/3" in the Subject. ;) I
> >> see the amdcz support now. :P
> >> https://patchwork.kernel.org/project/LKML/list/?submitter=18441
> >
> >> >> diff --git a/include/linux/serial_8250.h
b/include/linux/serial_8250.h
> >> >> index a27ef5f56431..02570edaddd8 100644
> >> >> --- a/include/linux/serial_8250.h
> >> >> +++ b/include/linux/serial_8250.h
> >> >> @@ -136,6 +136,12 @@ struct uart_8250_port {
> >> >> struct uart_8250_em485 *em485;
> >> >> };
> >> >>
> >> >> +#ifdef CONFIG_SERIAL_8250
> >> >> +extern bool serial8250_skip_old_ports;
> >> >> +#else
> >> >> +static const bool serial8250_skip_old_ports;
> >> >> +#endif
> >> >
> >> > Where does serial8250_skip_old_ports get used where
CONFIG_SERIAL_8250
> >> > isn't defined? (i.e. why is the #ifdef needed here?)
> >
> >> This question still stands, though.
> >
> > From the same patch: https://patchwork.kernel.org/patch/10283641/
> >
> > if (CONFIG_ACPI_SPCR_TABLE && !CONFIG_SERIAL_8250)
> >
> > in other words, if serial ports are disabled, but we still want to parse
> > the APCI_SPCR_TABLE, which "defaults y if X86".
> > Perhaps that logic should be changed (no need to parse ACPI SPCR table
if
> > we are going to disable serial anyway)?
> But won't this break? "static const bool ..." but the code tries to
> set a value but I'd expect the compiler to still yet about it?
er... yeah.
> I think you could drop the .h #ifdef and use:
> if (IS_ENABLED(CONFIG_SERIAL_825) && amdcz_present(...)) {
oooohhh... nice. I like it, will change.
> -Kees
> --
> Kees Cook
> Pixel Security
^ permalink raw reply
* Re: [PATCH v2 3/3] serial: core: Allow skipping old serial port initialization
From: Kees Cook @ 2018-03-15 0:55 UTC (permalink / raw)
To: Daniel Kurtz
Cc: Greg Kroah-Hartman, Aaron Durbin, LKML, Rafael J. Wysocki,
Len Brown, Jiri Slaby, Andy Shevchenko, Matthias Brugger,
David Howells, Vignesh R, Sean Young, Jeffy, Doug Anderson,
Matt Redfearn, Marc Gonzalez, ACPI Devel Maling List,
open list:SERIAL DRIVERS
In-Reply-To: <CAGS+omCkKT9WHApnG+i+2Sn0zihBFV1ufuQn5+jfE3asuoTAEQ@mail.gmail.com>
On Wed, Mar 14, 2018 at 5:23 PM, Daniel Kurtz <djkurtz@chromium.org> wrote:
> On Wed, Mar 14, 2018 at 5:00 PM Kees Cook <keescook@chromium.org> wrote:
>
>> On Wed, Mar 14, 2018 at 3:58 PM, Kees Cook <keescook@chromium.org> wrote:
>> > On Wed, Mar 14, 2018 at 2:44 PM, Daniel Kurtz <djkurtz@chromium.org>
> wrote:
>> > Sorry for being dense. What tree is this against? I can't find mention
>> > of amdcz in Linus's tree nor linux-next.
>
>> As I watched this email send, I noticed the "3/3" in the Subject. ;) I
>> see the amdcz support now. :P
>> https://patchwork.kernel.org/project/LKML/list/?submitter=18441
>
>> >> diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
>> >> index a27ef5f56431..02570edaddd8 100644
>> >> --- a/include/linux/serial_8250.h
>> >> +++ b/include/linux/serial_8250.h
>> >> @@ -136,6 +136,12 @@ struct uart_8250_port {
>> >> struct uart_8250_em485 *em485;
>> >> };
>> >>
>> >> +#ifdef CONFIG_SERIAL_8250
>> >> +extern bool serial8250_skip_old_ports;
>> >> +#else
>> >> +static const bool serial8250_skip_old_ports;
>> >> +#endif
>> >
>> > Where does serial8250_skip_old_ports get used where CONFIG_SERIAL_8250
>> > isn't defined? (i.e. why is the #ifdef needed here?)
>
>> This question still stands, though.
>
> From the same patch: https://patchwork.kernel.org/patch/10283641/
>
> if (CONFIG_ACPI_SPCR_TABLE && !CONFIG_SERIAL_8250)
>
> in other words, if serial ports are disabled, but we still want to parse
> the APCI_SPCR_TABLE, which "defaults y if X86".
> Perhaps that logic should be changed (no need to parse ACPI SPCR table if
> we are going to disable serial anyway)?
But won't this break? "static const bool ..." but the code tries to
set a value but I'd expect the compiler to still yet about it?
I think you could drop the .h #ifdef and use:
if (IS_ENABLED(CONFIG_SERIAL_825) && amdcz_present(...)) {
-Kees
--
Kees Cook
Pixel Security
^ permalink raw reply
* Re: [PATCH v2 3/3] serial: core: Allow skipping old serial port initialization
From: Daniel Kurtz @ 2018-03-15 0:23 UTC (permalink / raw)
To: Kees Cook
Cc: Greg Kroah-Hartman, adurbin, linux-kernel, Rafael J. Wysocki,
Len Brown, jslaby, Andy Shevchenko, mbrugger, dhowells, vigneshr,
sean, Jeffy, Doug Anderson, matt.redfearn, marc_gonzalez,
linux-acpi, linux-serial
In-Reply-To: <CAGXu5jJXNK3h5P-YzRJ3hxBer305ik4FHuhcixzprnRnefU7Qw@mail.gmail.com>
On Wed, Mar 14, 2018 at 5:00 PM Kees Cook <keescook@chromium.org> wrote:
> On Wed, Mar 14, 2018 at 3:58 PM, Kees Cook <keescook@chromium.org> wrote:
> > On Wed, Mar 14, 2018 at 2:44 PM, Daniel Kurtz <djkurtz@chromium.org>
wrote:
> > Sorry for being dense. What tree is this against? I can't find mention
> > of amdcz in Linus's tree nor linux-next.
> As I watched this email send, I noticed the "3/3" in the Subject. ;) I
> see the amdcz support now. :P
> https://patchwork.kernel.org/project/LKML/list/?submitter=18441
> >> diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
> >> index a27ef5f56431..02570edaddd8 100644
> >> --- a/include/linux/serial_8250.h
> >> +++ b/include/linux/serial_8250.h
> >> @@ -136,6 +136,12 @@ struct uart_8250_port {
> >> struct uart_8250_em485 *em485;
> >> };
> >>
> >> +#ifdef CONFIG_SERIAL_8250
> >> +extern bool serial8250_skip_old_ports;
> >> +#else
> >> +static const bool serial8250_skip_old_ports;
> >> +#endif
> >
> > Where does serial8250_skip_old_ports get used where CONFIG_SERIAL_8250
> > isn't defined? (i.e. why is the #ifdef needed here?)
> This question still stands, though.
From the same patch: https://patchwork.kernel.org/patch/10283641/
if (CONFIG_ACPI_SPCR_TABLE && !CONFIG_SERIAL_8250)
in other words, if serial ports are disabled, but we still want to parse
the APCI_SPCR_TABLE, which "defaults y if X86".
Perhaps that logic should be changed (no need to parse ACPI SPCR table if
we are going to disable serial anyway)?
> -Kees
> --
> Kees Cook
> Pixel Security
^ permalink raw reply
* Re: [PATCH v2 3/3] serial: core: Allow skipping old serial port initialization
From: Kees Cook @ 2018-03-14 23:00 UTC (permalink / raw)
To: Daniel Kurtz
Cc: Greg Kroah-Hartman, Aaron Durbin, LKML, Rafael J. Wysocki,
Len Brown, Jiri Slaby, Andy Shevchenko, Matthias Brugger,
David Howells, Vignesh R, Sean Young, Jeffy Chen,
Douglas Anderson, Matt Redfearn, Marc Gonzalez, open list:ACPI,
open list:SERIAL DRIVERS
In-Reply-To: <CAGXu5jK4QdG83FGAx94GAmU=tpuhN1dypTh5n_Pes8n7shEZuw@mail.gmail.com>
On Wed, Mar 14, 2018 at 3:58 PM, Kees Cook <keescook@chromium.org> wrote:
> On Wed, Mar 14, 2018 at 2:44 PM, Daniel Kurtz <djkurtz@chromium.org> wrote:
> Sorry for being dense. What tree is this against? I can't find mention
> of amdcz in Linus's tree nor linux-next.
As I watched this email send, I noticed the "3/3" in the Subject. ;) I
see the amdcz support now. :P
https://patchwork.kernel.org/project/LKML/list/?submitter=18441
>> diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
>> index a27ef5f56431..02570edaddd8 100644
>> --- a/include/linux/serial_8250.h
>> +++ b/include/linux/serial_8250.h
>> @@ -136,6 +136,12 @@ struct uart_8250_port {
>> struct uart_8250_em485 *em485;
>> };
>>
>> +#ifdef CONFIG_SERIAL_8250
>> +extern bool serial8250_skip_old_ports;
>> +#else
>> +static const bool serial8250_skip_old_ports;
>> +#endif
>
> Where does serial8250_skip_old_ports get used where CONFIG_SERIAL_8250
> isn't defined? (i.e. why is the #ifdef needed here?)
This question still stands, though.
-Kees
--
Kees Cook
Pixel Security
^ permalink raw reply
* Re: [PATCH v2 3/3] serial: core: Allow skipping old serial port initialization
From: Kees Cook @ 2018-03-14 22:58 UTC (permalink / raw)
To: Daniel Kurtz
Cc: Greg Kroah-Hartman, Aaron Durbin, LKML, Rafael J. Wysocki,
Len Brown, Jiri Slaby, Andy Shevchenko, Matthias Brugger,
David Howells, Vignesh R, Sean Young, Jeffy Chen,
Douglas Anderson, Matt Redfearn, Marc Gonzalez, open list:ACPI,
open list:SERIAL DRIVERS
In-Reply-To: <20180314214439.27806-4-djkurtz@chromium.org>
On Wed, Mar 14, 2018 at 2:44 PM, Daniel Kurtz <djkurtz@chromium.org> wrote:
> The old_serial_port global array in 8250_core is supposed to hold an entry
> for each serial port on the system that cannot be discovered via a
> standard enumeration mechanism (aka ACPI/PCI/DTS). The array is populated
> at compile-time from the value specified in the SERIAL_PORT_DFNS macro.
> This macro is defined in arch/serial.h.
>
> For x86, this macro is currently unconditionally initialized to supply
> four ioport UARTs (0x3F8, 0x2F8, 0x3E8, 0x2E8).
>
> However, not all x86 CPUs have these four ioport UARTs. For example, the
> UARTs on AMD Carrizo and later are separate memory mapped Designware IP
> blocks.
>
> Fairly early in boot the console_initcall univ8250_console_init iterates
> over this array and installs these old UARTs into the global array
> serial8250_ports. Further, it attempts to register them for use as
> the console. In other words, if, for example, the kernel commandline has
> console=ttyS0, the console will be switched over to one of these
> non-existent UARTs. Only later, when the real UART drivers are probed
> and their devices are instantiated will the console switch back over to
> the proper UART.
>
> This is noticeable when using earlycon, since part of the serial console
> log will appear to disappear (when the bogus old takes over) and then
> re-appear (when the real UART finally gets registered for the console).
>
> The problem is even more noticable when *not* using earlycon, since in
> this case the entire console output is missing, having been incorrectly
> played back to the non-existing serial port.
>
> Create a global variable to allow skipping old serial port initialization
> and wire it up to the AMDCZ ACPI SPCR quirk and the special amdcz earlycon
> setup handler.
>
> Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
> ---
> Changes since v1:
> * Rename variable to serial8250_skip_old_ports
> * Also set variable in acpi/spcr. to support no-earlycon case.
>
> drivers/acpi/spcr.c | 2 ++
> drivers/tty/serial/8250/8250_core.c | 6 ++++++
> drivers/tty/serial/8250/8250_early.c | 1 +
> include/linux/serial_8250.h | 6 ++++++
> 4 files changed, 15 insertions(+)
>
> diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c
> index 52d840d0e05b..f59591283410 100644
> --- a/drivers/acpi/spcr.c
> +++ b/drivers/acpi/spcr.c
> @@ -14,6 +14,7 @@
> #include <linux/acpi.h>
> #include <linux/console.h>
> #include <linux/kernel.h>
> +#include <linux/serial_8250.h>
> #include <linux/serial_core.h>
>
> /*
> @@ -208,6 +209,7 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
> }
>
> if (amdcz_present(table)) {
> + serial8250_skip_old_ports = true;
> if (enable_earlycon)
> uart = "amdcz";
> }
Sorry for being dense. What tree is this against? I can't find mention
of amdcz in Linus's tree nor linux-next.
> diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
> index 9342fc2ee7df..a04da392a251 100644
> --- a/drivers/tty/serial/8250/8250_core.c
> +++ b/drivers/tty/serial/8250/8250_core.c
> @@ -66,6 +66,9 @@ static unsigned int skip_txen_test; /* force skip of txen test at init time */
> #define SERIAL_PORT_DFNS
> #endif
>
> +bool serial8250_skip_old_ports;
> +EXPORT_SYMBOL(serial8250_skip_old_ports);
> +
> static const struct old_serial_port old_serial_port[] = {
> SERIAL_PORT_DFNS /* defined in asm/serial.h */
> };
> @@ -537,6 +540,9 @@ static void __init serial8250_isa_init_ports(void)
> if (share_irqs)
> irqflag = IRQF_SHARED;
>
> + if (serial8250_skip_old_ports)
> + return;
> +
> for (i = 0, up = serial8250_ports;
> i < ARRAY_SIZE(old_serial_port) && i < nr_uarts;
> i++, up++) {
> diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
> index c6bf971a6038..288d2be82990 100644
> --- a/drivers/tty/serial/8250/8250_early.c
> +++ b/drivers/tty/serial/8250/8250_early.c
> @@ -202,6 +202,7 @@ static int __init early_amdcz_setup(struct earlycon_device *dev,
> {
> struct uart_port *port = &dev->port;
>
> + serial8250_skip_old_ports = true;
> port->uartclk = 48000000;
>
> return early_serial8250_setup(dev, opt);
> diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
> index a27ef5f56431..02570edaddd8 100644
> --- a/include/linux/serial_8250.h
> +++ b/include/linux/serial_8250.h
> @@ -136,6 +136,12 @@ struct uart_8250_port {
> struct uart_8250_em485 *em485;
> };
>
> +#ifdef CONFIG_SERIAL_8250
> +extern bool serial8250_skip_old_ports;
> +#else
> +static const bool serial8250_skip_old_ports;
> +#endif
Where does serial8250_skip_old_ports get used where CONFIG_SERIAL_8250
isn't defined? (i.e. why is the #ifdef needed here?)
> +
> static inline struct uart_8250_port *up_to_u8250p(struct uart_port *up)
> {
> return container_of(up, struct uart_8250_port, port);
> --
> 2.16.2.804.g6dcf76e118-goog
>
Otherwise, sure, sounds good. :)
-Kees
--
Kees Cook
Pixel Security
^ permalink raw reply
* Re: [PATCH 00/47] arch-removal: device drivers
From: Rafael J. Wysocki @ 2018-03-14 22:45 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Ulf Hansson, open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:,
Wolfram Sang, linux-iio, Viresh Kumar, Linus Walleij,
alexandre.belloni, linux-ide, netdev, linux-mtd, linux-i2c,
linux-rtc, Lars-Peter Clausen, Herbert Xu, Jonathan Corbet,
open list:DOCUMENTATION, Alan Stern, linux-serial, Jiri Slaby,
linux-mmc, shli, wg, linux-crypto, Linux PWM List, linux-watchdog
In-Reply-To: <20180314153603.3127932-1-arnd@arndb.de>
On Wed, Mar 14, 2018 at 4:35 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> Hi driver maintainers,
>
> I just posted one series with the removal of eight architectures,
> see https://lkml.org/lkml/2018/3/14/505 for details, or
> https://lwn.net/Articles/748074/ for more background.
>
> These are the device drivers that go along with them. I have already
> picked up the drivers for arch/metag/ into my tree, they were reviewed
> earlier.
>
> Please let me know if you have any concerns with the patch, or if you
> prefer to pick up the patches in your respective trees. I created
> the patches with 'git format-patch -D', so they will not apply without
> manually removing those files.
>
> For anything else, I'd keep the removal patches in my asm-generic tree
> and will send a pull request for 4.17 along with the actual arch removal.
Please include the cpufreq patches into that and you can add ACKs from
me on them if that helps.
Thanks!
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply
* [PATCH v2 3/3] serial: core: Allow skipping old serial port initialization
From: Daniel Kurtz @ 2018-03-14 21:44 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: adurbin, linux-kernel, Daniel Kurtz, Rafael J. Wysocki, Len Brown,
Jiri Slaby, Andy Shevchenko, Matthias Brugger, Kees Cook,
David Howells, Vignesh R, Sean Young, Jeffy Chen,
Douglas Anderson, Matt Redfearn, Marc Gonzalez, open list:ACPI,
open list:SERIAL DRIVERS
In-Reply-To: <20180314214439.27806-1-djkurtz@chromium.org>
The old_serial_port global array in 8250_core is supposed to hold an entry
for each serial port on the system that cannot be discovered via a
standard enumeration mechanism (aka ACPI/PCI/DTS). The array is populated
at compile-time from the value specified in the SERIAL_PORT_DFNS macro.
This macro is defined in arch/serial.h.
For x86, this macro is currently unconditionally initialized to supply
four ioport UARTs (0x3F8, 0x2F8, 0x3E8, 0x2E8).
However, not all x86 CPUs have these four ioport UARTs. For example, the
UARTs on AMD Carrizo and later are separate memory mapped Designware IP
blocks.
Fairly early in boot the console_initcall univ8250_console_init iterates
over this array and installs these old UARTs into the global array
serial8250_ports. Further, it attempts to register them for use as
the console. In other words, if, for example, the kernel commandline has
console=ttyS0, the console will be switched over to one of these
non-existent UARTs. Only later, when the real UART drivers are probed
and their devices are instantiated will the console switch back over to
the proper UART.
This is noticeable when using earlycon, since part of the serial console
log will appear to disappear (when the bogus old takes over) and then
re-appear (when the real UART finally gets registered for the console).
The problem is even more noticable when *not* using earlycon, since in
this case the entire console output is missing, having been incorrectly
played back to the non-existing serial port.
Create a global variable to allow skipping old serial port initialization
and wire it up to the AMDCZ ACPI SPCR quirk and the special amdcz earlycon
setup handler.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
---
Changes since v1:
* Rename variable to serial8250_skip_old_ports
* Also set variable in acpi/spcr. to support no-earlycon case.
drivers/acpi/spcr.c | 2 ++
drivers/tty/serial/8250/8250_core.c | 6 ++++++
drivers/tty/serial/8250/8250_early.c | 1 +
include/linux/serial_8250.h | 6 ++++++
4 files changed, 15 insertions(+)
diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c
index 52d840d0e05b..f59591283410 100644
--- a/drivers/acpi/spcr.c
+++ b/drivers/acpi/spcr.c
@@ -14,6 +14,7 @@
#include <linux/acpi.h>
#include <linux/console.h>
#include <linux/kernel.h>
+#include <linux/serial_8250.h>
#include <linux/serial_core.h>
/*
@@ -208,6 +209,7 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
}
if (amdcz_present(table)) {
+ serial8250_skip_old_ports = true;
if (enable_earlycon)
uart = "amdcz";
}
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 9342fc2ee7df..a04da392a251 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -66,6 +66,9 @@ static unsigned int skip_txen_test; /* force skip of txen test at init time */
#define SERIAL_PORT_DFNS
#endif
+bool serial8250_skip_old_ports;
+EXPORT_SYMBOL(serial8250_skip_old_ports);
+
static const struct old_serial_port old_serial_port[] = {
SERIAL_PORT_DFNS /* defined in asm/serial.h */
};
@@ -537,6 +540,9 @@ static void __init serial8250_isa_init_ports(void)
if (share_irqs)
irqflag = IRQF_SHARED;
+ if (serial8250_skip_old_ports)
+ return;
+
for (i = 0, up = serial8250_ports;
i < ARRAY_SIZE(old_serial_port) && i < nr_uarts;
i++, up++) {
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index c6bf971a6038..288d2be82990 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -202,6 +202,7 @@ static int __init early_amdcz_setup(struct earlycon_device *dev,
{
struct uart_port *port = &dev->port;
+ serial8250_skip_old_ports = true;
port->uartclk = 48000000;
return early_serial8250_setup(dev, opt);
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index a27ef5f56431..02570edaddd8 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -136,6 +136,12 @@ struct uart_8250_port {
struct uart_8250_em485 *em485;
};
+#ifdef CONFIG_SERIAL_8250
+extern bool serial8250_skip_old_ports;
+#else
+static const bool serial8250_skip_old_ports;
+#endif
+
static inline struct uart_8250_port *up_to_u8250p(struct uart_port *up)
{
return container_of(up, struct uart_8250_port, port);
--
2.16.2.804.g6dcf76e118-goog
^ permalink raw reply related
* [PATCH v2 1/3] serial: 8250_early: Add earlycon support for AMD Carrizo / Stoneyridge
From: Daniel Kurtz @ 2018-03-14 21:44 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: adurbin, linux-kernel, Daniel Kurtz, Jiri Slaby, Douglas Anderson,
Matt Redfearn, Marc Gonzalez, Jeffy Chen,
open list:SERIAL DRIVERS
In-Reply-To: <20180314214439.27806-1-djkurtz@chromium.org>
AMD Carrizo / Stoneyridge use a DesignWare 8250 UART that uses a 48 MHz
input clock.
Allow these platforms to set up this clock by specifying a kernel command
line like:
earlycon=amdcz,mmio32,0xfedc6000,115200
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
drivers/tty/serial/8250/8250_early.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index ae6a256524d8..c6bf971a6038 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -195,3 +195,18 @@ static int __init early_au_setup(struct earlycon_device *dev, const char *opt)
OF_EARLYCON_DECLARE(palmchip, "ralink,rt2880-uart", early_au_setup);
#endif
+
+#ifdef CONFIG_SERIAL_8250_DW
+static int __init early_amdcz_setup(struct earlycon_device *dev,
+ const char *opt)
+{
+ struct uart_port *port = &dev->port;
+
+ port->uartclk = 48000000;
+
+ return early_serial8250_setup(dev, opt);
+}
+
+EARLYCON_DECLARE(amdcz, early_amdcz_setup);
+
+#endif
--
2.16.2.804.g6dcf76e118-goog
^ permalink raw reply related
* Re: [PATCH 1/3] serial: 8250_early: Add earlycon support for AMD Carrizo / Stoneyridge
From: Andy Shevchenko @ 2018-03-14 17:31 UTC (permalink / raw)
To: Aaron Durbin
Cc: Daniel Kurtz, Ricardo Ribalda Delgado, Greg Kroah-Hartman,
Jiri Slaby, Marc Gonzalez, Doug Anderson, Matt Redfearn, Jeffy,
open list:SERIAL DRIVERS, Linux Kernel Mailing List
In-Reply-To: <CAE2855tGe0i9XoEPe9iLFpCds3fXyj9uGhDACvK06KaqvhvYBg@mail.gmail.com>
On Wed, Mar 14, 2018 at 7:12 PM, Aaron Durbin <adurbin@chromium.org> wrote:
> On Wed, Mar 14, 2018 at 10:38 AM, Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
>> On Wed, Mar 14, 2018 at 6:29 PM, Daniel Kurtz <djkurtz@chromium.org> wrote:
>>> On Wed, Mar 14, 2018 at 4:54 AM Ricardo Ribalda Delgado <
>>> ricardo.ribalda@gmail.com> wrote:
>>>> On Wed, Mar 14, 2018 at 1:36 AM, Daniel Kurtz <djkurtz@chromium.org>
>>> wrote:
>>
>>> In fact, the recommended way is to have firmware specify an ACPI SPCR table
>>> with OEMID="AMDCZ " (see https://patchwork.kernel.org/patch/10281307/) to
>>> configure proper access and address.
>>
>> Hmm... I was thinking it's already there. And thus, this is just a
>> quirk for *existing* firmware that doesn't correctly configured
>> hardware.
>> (Yes, I'm aware about one nuance in SPCR specification I'm trying to
>> address via official ways)
>>
>>> With an SPCR table in place, the
>>> kernel command line just becomes "earlycon", with no parameters.
>>
>> SPCR *provides* an address of UART (required by specification).
>
> What is "it's" in your first sentence? The access method?
*SPCR table* itself on the platforms in question.
> There is hardware all over that does
> not meet the current assumptions being made in the early uart drivers
> within the kernel.
I know, that's why I'm working now on a proposal to SPCR specification
to make our life slightly easier in that sense.
P.S. In case you are interested, I have crafted SPCR in U-Boot for
Intel Edison (ACPI case) where UART clock is also non-standard and did
some tests. It works quite nicely when firmware, **iff written
properly**, configures UART beforehand. In this case no clock
information is needed, no code needs to be added into the kernel.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* [RESEND PATCH v4 3/3]] ARM: dts: STi: Remove "console=ttyASN" from bootargs for STi boards
From: patrice.chotard @ 2018-03-14 17:22 UTC (permalink / raw)
To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel,
devicetree, gregkh, jslaby, linux-serial
Cc: patrice.chotard
From: Patrice Chotard <patrice.chotard@st.com>
As serial interface is already specified into stdout-path property,
"console=ttyASN,115200" from bootargs can be removed.
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---
arch/arm/boot/dts/stih407-b2120.dts | 2 +-
arch/arm/boot/dts/stih410-b2120.dts | 2 +-
arch/arm/boot/dts/stih410-b2260.dts | 2 +-
arch/arm/boot/dts/stih418-b2199.dts | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/stih407-b2120.dts b/arch/arm/boot/dts/stih407-b2120.dts
index 37f2ddbfa099..a7a0f76e9cbc 100644
--- a/arch/arm/boot/dts/stih407-b2120.dts
+++ b/arch/arm/boot/dts/stih407-b2120.dts
@@ -14,7 +14,7 @@
compatible = "st,stih407-b2120", "st,stih407";
chosen {
- bootargs = "console=ttyAS0,115200 clk_ignore_unused";
+ bootargs = "clk_ignore_unused";
linux,stdout-path = &sbc_serial0;
};
diff --git a/arch/arm/boot/dts/stih410-b2120.dts b/arch/arm/boot/dts/stih410-b2120.dts
index a6f00a6687a9..6c6b4cc37e97 100644
--- a/arch/arm/boot/dts/stih410-b2120.dts
+++ b/arch/arm/boot/dts/stih410-b2120.dts
@@ -14,7 +14,7 @@
compatible = "st,stih410-b2120", "st,stih410";
chosen {
- bootargs = "console=ttyAS0,115200 clk_ignore_unused";
+ bootargs = "clk_ignore_unused";
linux,stdout-path = &sbc_serial0;
};
diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts
index 62770496e328..50d36758391c 100644
--- a/arch/arm/boot/dts/stih410-b2260.dts
+++ b/arch/arm/boot/dts/stih410-b2260.dts
@@ -15,7 +15,7 @@
compatible = "st,stih410-b2260", "st,stih410";
chosen {
- bootargs = "console=ttyAS1,115200 clk_ignore_unused";
+ bootargs = "clk_ignore_unused";
linux,stdout-path = &uart1;
};
diff --git a/arch/arm/boot/dts/stih418-b2199.dts b/arch/arm/boot/dts/stih418-b2199.dts
index 36f40f58155d..7f5f3252bfc7 100644
--- a/arch/arm/boot/dts/stih418-b2199.dts
+++ b/arch/arm/boot/dts/stih418-b2199.dts
@@ -14,7 +14,7 @@
compatible = "st,stih418-b2199", "st,stih418";
chosen {
- bootargs = "console=ttyAS0,115200 clk_ignore_unused";
+ bootargs = "clk_ignore_unused";
linux,stdout-path = &sbc_serial0;
};
--
1.9.1
^ permalink raw reply related
* Re: [RESEND PATCH v4 3/3] ARM: dts: STi: Remove console=ttyASN from bootargs for STi boards] ARM: dts: STi: Remove "console=ttyASN" from bootargs for STi boards
From: Patrice CHOTARD @ 2018-03-14 17:19 UTC (permalink / raw)
To: robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
gregkh@linuxfoundation.org, jslaby@suse.com,
linux-serial@vger.kernel.org
In-Reply-To: <1521039159-16655-1-git-send-email-patrice.chotard@st.com>
Sorry
I just noticed that the commit header is corrupted
I will resend this patch
Patrice
On 03/14/2018 03:52 PM, patrice.chotard@st.com wrote:
> From: Patrice Chotard <patrice.chotard@st.com>
>
> As serial interface is already specified into stdout-path property,
> "console=ttyASN,115200" from bootargs can be removed.
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> ---
>
> v4: _ none
> v3: _ remove "console=serialN,115200" from bootargs and use prefered
> stdout-path property
> v2: _ none
>
> arch/arm/boot/dts/stih407-b2120.dts | 2 +-
> arch/arm/boot/dts/stih410-b2120.dts | 2 +-
> arch/arm/boot/dts/stih410-b2260.dts | 2 +-
> arch/arm/boot/dts/stih418-b2199.dts | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/boot/dts/stih407-b2120.dts b/arch/arm/boot/dts/stih407-b2120.dts
> index 37f2ddbfa099..a7a0f76e9cbc 100644
> --- a/arch/arm/boot/dts/stih407-b2120.dts
> +++ b/arch/arm/boot/dts/stih407-b2120.dts
> @@ -14,7 +14,7 @@
> compatible = "st,stih407-b2120", "st,stih407";
>
> chosen {
> - bootargs = "console=ttyAS0,115200 clk_ignore_unused";
> + bootargs = "clk_ignore_unused";
> linux,stdout-path = &sbc_serial0;
> };
>
> diff --git a/arch/arm/boot/dts/stih410-b2120.dts b/arch/arm/boot/dts/stih410-b2120.dts
> index a6f00a6687a9..6c6b4cc37e97 100644
> --- a/arch/arm/boot/dts/stih410-b2120.dts
> +++ b/arch/arm/boot/dts/stih410-b2120.dts
> @@ -14,7 +14,7 @@
> compatible = "st,stih410-b2120", "st,stih410";
>
> chosen {
> - bootargs = "console=ttyAS0,115200 clk_ignore_unused";
> + bootargs = "clk_ignore_unused";
> linux,stdout-path = &sbc_serial0;
> };
>
> diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts
> index 62770496e328..50d36758391c 100644
> --- a/arch/arm/boot/dts/stih410-b2260.dts
> +++ b/arch/arm/boot/dts/stih410-b2260.dts
> @@ -15,7 +15,7 @@
> compatible = "st,stih410-b2260", "st,stih410";
>
> chosen {
> - bootargs = "console=ttyAS1,115200 clk_ignore_unused";
> + bootargs = "clk_ignore_unused";
> linux,stdout-path = &uart1;
> };
>
> diff --git a/arch/arm/boot/dts/stih418-b2199.dts b/arch/arm/boot/dts/stih418-b2199.dts
> index 36f40f58155d..7f5f3252bfc7 100644
> --- a/arch/arm/boot/dts/stih418-b2199.dts
> +++ b/arch/arm/boot/dts/stih418-b2199.dts
> @@ -14,7 +14,7 @@
> compatible = "st,stih418-b2199", "st,stih418";
>
> chosen {
> - bootargs = "console=ttyAS0,115200 clk_ignore_unused";
> + bootargs = "clk_ignore_unused";
> linux,stdout-path = &sbc_serial0;
> };
>
>
^ permalink raw reply
* Re: [PATCH 1/3] serial: 8250_early: Add earlycon support for AMD Carrizo / Stoneyridge
From: Aaron Durbin @ 2018-03-14 17:12 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Daniel Kurtz, Ricardo Ribalda Delgado, Aaron Durbin,
Greg Kroah-Hartman, Jiri Slaby, Marc Gonzalez, Doug Anderson,
Matt Redfearn, Jeffy, open list:SERIAL DRIVERS,
Linux Kernel Mailing List
In-Reply-To: <CAHp75VehhNv6pPrRiM9jBAK9FsqZ2Defo8HKhutwn+GPnCFp3w@mail.gmail.com>
On Wed, Mar 14, 2018 at 10:38 AM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Wed, Mar 14, 2018 at 6:29 PM, Daniel Kurtz <djkurtz@chromium.org> wrote:
>> On Wed, Mar 14, 2018 at 4:54 AM Ricardo Ribalda Delgado <
>> ricardo.ribalda@gmail.com> wrote:
>>> On Wed, Mar 14, 2018 at 1:36 AM, Daniel Kurtz <djkurtz@chromium.org>
>> wrote:
>
>> In fact, the recommended way is to have firmware specify an ACPI SPCR table
>> with OEMID="AMDCZ " (see https://patchwork.kernel.org/patch/10281307/) to
>> configure proper access and address.
>
> Hmm... I was thinking it's already there. And thus, this is just a
> quirk for *existing* firmware that doesn't correctly configured
> hardware.
> (Yes, I'm aware about one nuance in SPCR specification I'm trying to
> address via official ways)
>
>> With an SPCR table in place, the
>> kernel command line just becomes "earlycon", with no parameters.
>
> SPCR *provides* an address of UART (required by specification).
What is "it's" in your first sentence? The access method? Baud rate
can't be configured ever in the kernel w/o knowing the input clock to
the uart block. That's already been brought up, and it is inherently a
requirement to know that to recalculate the divisor. These patches are
doing early OOB binding to set the proper input clock because: 1. SPCR
doesn't have that information 2. you nak'd the generic way of
specifying the input clock on the command line. Sadly, this situation
is not unique to this hardware. There is hardware all over that does
not meet the current assumptions being made in the early uart drivers
within the kernel.
^ permalink raw reply
* Re: [PATCH 1/3] serial: 8250_early: Add earlycon support for AMD Carrizo / Stoneyridge
From: Andy Shevchenko @ 2018-03-14 16:38 UTC (permalink / raw)
To: Daniel Kurtz
Cc: Ricardo Ribalda Delgado, Aaron Durbin, Greg Kroah-Hartman,
Jiri Slaby, Marc Gonzalez, Doug Anderson, Matt Redfearn, Jeffy,
open list:SERIAL DRIVERS, Linux Kernel Mailing List
In-Reply-To: <CAGS+omCuEYSHFPmknvvvjUpCWFP_rCmwa9utQiO=aEmdm-anwg@mail.gmail.com>
On Wed, Mar 14, 2018 at 6:29 PM, Daniel Kurtz <djkurtz@chromium.org> wrote:
> On Wed, Mar 14, 2018 at 4:54 AM Ricardo Ribalda Delgado <
> ricardo.ribalda@gmail.com> wrote:
>> On Wed, Mar 14, 2018 at 1:36 AM, Daniel Kurtz <djkurtz@chromium.org>
> wrote:
> In fact, the recommended way is to have firmware specify an ACPI SPCR table
> with OEMID="AMDCZ " (see https://patchwork.kernel.org/patch/10281307/) to
> configure proper access and address.
Hmm... I was thinking it's already there. And thus, this is just a
quirk for *existing* firmware that doesn't correctly configured
hardware.
(Yes, I'm aware about one nuance in SPCR specification I'm trying to
address via official ways)
> With an SPCR table in place, the
> kernel command line just becomes "earlycon", with no parameters.
SPCR *provides* an address of UART (required by specification).
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH 40/47] serial: remove cris/etrax uart drivers
From: Greg Kroah-Hartman @ 2018-03-14 16:33 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel, Jiri Slaby, linux-serial
In-Reply-To: <20180314153603.3127932-41-arnd@arndb.de>
On Wed, Mar 14, 2018 at 04:35:53PM +0100, Arnd Bergmann wrote:
> The cris architecture is getting removed, so we don't need the
> uart driver any more.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> .../bindings/serial/axis,etraxfs-uart.txt | 22 -
> drivers/tty/serial/Kconfig | 11 -
> drivers/tty/serial/Makefile | 2 -
> drivers/tty/serial/crisv10.c | 4248 --------------------
> drivers/tty/serial/crisv10.h | 133 -
> drivers/tty/serial/etraxfs-uart.c | 960 -----
> 6 files changed, 5376 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/serial/axis,etraxfs-uart.txt
> delete mode 100644 drivers/tty/serial/crisv10.c
> delete mode 100644 drivers/tty/serial/crisv10.h
> delete mode 100644 drivers/tty/serial/etraxfs-uart.c
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply
* Re: [PATCH 41/47] serial: remove blackfin drivers
From: Greg Kroah-Hartman @ 2018-03-14 16:33 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel, Jiri Slaby, linux-serial
In-Reply-To: <20180314153603.3127932-42-arnd@arndb.de>
On Wed, Mar 14, 2018 at 04:35:54PM +0100, Arnd Bergmann wrote:
> The blackfin architecture is getting removed, so both the bfin_uart
> and bfin_sport_uart can be removed as well.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/tty/serial/Kconfig | 149 ----
> drivers/tty/serial/Makefile | 2 -
> drivers/tty/serial/bfin_sport_uart.c | 937 --------------------
> drivers/tty/serial/bfin_sport_uart.h | 86 --
> drivers/tty/serial/bfin_uart.c | 1551 ----------------------------------
> 5 files changed, 2725 deletions(-)
> delete mode 100644 drivers/tty/serial/bfin_sport_uart.c
> delete mode 100644 drivers/tty/serial/bfin_sport_uart.h
> delete mode 100644 drivers/tty/serial/bfin_uart.c
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply
* Re: [PATCH 42/47] serial: remove m32r_sio driver
From: Greg Kroah-Hartman @ 2018-03-14 16:33 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel, Jiri Slaby, linux-serial
In-Reply-To: <20180314153603.3127932-43-arnd@arndb.de>
On Wed, Mar 14, 2018 at 04:35:55PM +0100, Arnd Bergmann wrote:
> The m32r architecture is getting removed, so we don't need this
> any more.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/tty/serial/Kconfig | 29 -
> drivers/tty/serial/Makefile | 1 -
> drivers/tty/serial/m32r_sio.c | 1053 -------------------------------------
> drivers/tty/serial/m32r_sio_reg.h | 150 ------
> 4 files changed, 1233 deletions(-)
> delete mode 100644 drivers/tty/serial/m32r_sio.c
> delete mode 100644 drivers/tty/serial/m32r_sio_reg.h
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply
* Re: [PATCH 43/47] serial: remove tile uart driver
From: Greg Kroah-Hartman @ 2018-03-14 16:32 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel, Jiri Slaby, linux-serial
In-Reply-To: <20180314153603.3127932-44-arnd@arndb.de>
On Wed, Mar 14, 2018 at 04:35:56PM +0100, Arnd Bergmann wrote:
> The tile architecture is getting removed, and this driver is
> useless without it.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/tty/serial/Kconfig | 9 -
> drivers/tty/serial/Makefile | 1 -
> drivers/tty/serial/tilegx.c | 689 --------------------------------------------
> 3 files changed, 699 deletions(-)
> delete mode 100644 drivers/tty/serial/tilegx.c
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply
* Re: [PATCH 1/3] serial: 8250_early: Add earlycon support for AMD Carrizo / Stoneyridge
From: Daniel Kurtz @ 2018-03-14 16:29 UTC (permalink / raw)
To: ricardo.ribalda
Cc: adurbin, Greg Kroah-Hartman, jslaby, marc_gonzalez, Doug Anderson,
matt.redfearn, Jeffy, linux-serial, linux-kernel
In-Reply-To: <CAPybu_0uLNz=tRvwqnMfoogJ=A4b5SgMecE9ZihrZdFrbRvcEw@mail.gmail.com>
Hi Ricardo,
On Wed, Mar 14, 2018 at 4:54 AM Ricardo Ribalda Delgado <
ricardo.ribalda@gmail.com> wrote:
> Hi Daniel
> On Wed, Mar 14, 2018 at 1:36 AM, Daniel Kurtz <djkurtz@chromium.org>
wrote:
> >
> > AMD Carrizo / Stoneyridge use a DesignWare 8250 UART that uses a 48 MHz
> > input clock.
> >
> > Allow these platforms to set up this clock by specifying a kernel
command
> > line like:
> > earlycon=amdcz,mmio32,0xfedc6000,115200
> If the port and the mode (mmio32) is always fixed, couldn't we just
> add those two into
> early_amdcz_setup?
There are multiple memory mapped UARTs on at least the one chip I am aware
of, specifying the address here chooses which port to use as the early
console.
In fact, the recommended way is to have firmware specify an ACPI SPCR table
with OEMID="AMDCZ " (see https://patchwork.kernel.org/patch/10281307/) to
configure proper access and address. With an SPCR table in place, the
kernel command line just becomes "earlycon", with no parameters.
-Dan
^ permalink raw reply
* [PATCH 43/47] serial: remove tile uart driver
From: Arnd Bergmann @ 2018-03-14 15:35 UTC (permalink / raw)
To: linux-kernel; +Cc: Arnd Bergmann, Greg Kroah-Hartman, Jiri Slaby, linux-serial
In-Reply-To: <20180314153603.3127932-1-arnd@arndb.de>
The tile architecture is getting removed, and this driver is
useless without it.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/tty/serial/Kconfig | 9 -
drivers/tty/serial/Makefile | 1 -
drivers/tty/serial/tilegx.c | 689 --------------------------------------------
3 files changed, 699 deletions(-)
delete mode 100644 drivers/tty/serial/tilegx.c
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 1a48ae6abb2c..736720a8d84f 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -1330,15 +1330,6 @@ config SERIAL_EFM32_UART_CONSOLE
depends on SERIAL_EFM32_UART=y
select SERIAL_CORE_CONSOLE
-config SERIAL_TILEGX
- tristate "TILE-Gx on-chip serial port support"
- depends on TILEGX
- select TILE_GXIO_UART
- select SERIAL_CORE
- ---help---
- This device provides access to the on-chip UARTs on the TILE-Gx
- processor.
-
config SERIAL_ARC
tristate "ARC UART driver support"
select SERIAL_CORE
diff --git a/drivers/tty/serial/Makefile b/drivers/tty/serial/Makefile
index 606e746b61f1..b30ee2e5d518 100644
--- a/drivers/tty/serial/Makefile
+++ b/drivers/tty/serial/Makefile
@@ -63,7 +63,6 @@ obj-$(CONFIG_SERIAL_KS8695) += serial_ks8695.o
obj-$(CONFIG_SERIAL_OMAP) += omap-serial.o
obj-$(CONFIG_SERIAL_ALTERA_UART) += altera_uart.o
obj-$(CONFIG_SERIAL_ST_ASC) += st-asc.o
-obj-$(CONFIG_SERIAL_TILEGX) += tilegx.o
obj-$(CONFIG_SERIAL_QE) += ucc_uart.o
obj-$(CONFIG_SERIAL_TIMBERDALE) += timbuart.o
obj-$(CONFIG_SERIAL_GRLIB_GAISLER_APBUART) += apbuart.o
diff --git a/drivers/tty/serial/tilegx.c b/drivers/tty/serial/tilegx.c
deleted file mode 100644
index f0a3ae57f881..000000000000
--
2.9.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox