[PATCH 5/6] tty: serial: Add RDA Micro UART driver
Add "rda" earlycon driver for RDA8810PL UART. Signed-off-by: Andreas Färber --- Documentation/admin-guide/kernel-parameters.txt | 6 ++ drivers/tty/serial/Kconfig | 19 drivers/tty/serial/Makefile | 1 + drivers/tty/serial/rda-uart.c | 117 4 files changed, 143 insertions(+) create mode 100644 drivers/tty/serial/rda-uart.c diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 0e2091c6fa6b..c97f8b64b3f1 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -967,6 +967,12 @@ specified address. The serial port must already be setup and configured. Options are not yet supported. + rda, + Start an early, polled-mode console on a serial port + of an RDA Micro SoC, such as RDA8810PL, at the + specified address. The serial port must already be + setup and configured. Options are not yet supported. + smh Use ARM semihosting calls for early console. s3c2410, diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index 1f096e2bb398..25e106a62e06 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -1707,6 +1707,25 @@ config SERIAL_OWL_CONSOLE Say 'Y' here if you wish to use Actions Semiconductor S500/S900 UART as the system console. Only earlycon is implemented currently. +config SERIAL_RDA + bool "RDA Micro serial port support" + depends on ARCH_RDA || COMPILE_TEST + select SERIAL_CORE + help + This driver is for RDA8810PL SoC's UART. + Say 'Y' here if you wish to use the on-board serial port. + Otherwise, say 'N'. + +config SERIAL_RDA_CONSOLE + bool "Console on RDA Micro serial port" + depends on SERIAL_RDA=y + select SERIAL_CORE_CONSOLE + select SERIAL_EARLYCON + default y + help + Say 'Y' here if you wish to use the RDA8810PL UART as the system + console. Only earlycon is implemented currently. + endmenu config SERIAL_MCTRL_GPIO diff --git a/drivers/tty/serial/Makefile b/drivers/tty/serial/Makefile index fe88a75d9a59..87f5a6e1e2d4 100644 --- a/drivers/tty/serial/Makefile +++ b/drivers/tty/serial/Makefile @@ -93,6 +93,7 @@ obj-$(CONFIG_SERIAL_MVEBU_UART) += mvebu-uart.o obj-$(CONFIG_SERIAL_PIC32) += pic32_uart.o obj-$(CONFIG_SERIAL_MPS2_UART) += mps2-uart.o obj-$(CONFIG_SERIAL_OWL) += owl-uart.o +obj-$(CONFIG_SERIAL_RDA) += rda-uart.o # GPIOLIB helpers for modem control lines obj-$(CONFIG_SERIAL_MCTRL_GPIO)+= serial_mctrl_gpio.o diff --git a/drivers/tty/serial/rda-uart.c b/drivers/tty/serial/rda-uart.c new file mode 100644 index ..c3c9cf1df015 --- /dev/null +++ b/drivers/tty/serial/rda-uart.c @@ -0,0 +1,117 @@ +/* + * RDA8810PL serial console + * + * Copyright RDA Microelectronics Company Limited + * Copyright (c) 2017 Andreas Färber + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define RDA_UART_CTRL 0x00 +#define RDA_UART_STATUS0x04 +#define RDA_UART_RXTX_BUFFER 0x08 +#define RDA_UART_IRQ_MASK 0x0c + +#define RDA_UART_STATUS_TX_FIFO_SPACE_MASK (0x1f << 8) + +static inline void rda_uart_write(struct uart_port *port, u32 val, unsigned int off) +{ + writel(val, port->membase + off); +} + +static inline u32 rda_uart_read(struct uart_port *port, unsigned int off) +{ + return readl(port->membase + off); +} + +#ifdef CONFIG_SERIAL_RDA_CONSOLE + +static void rda_console_putchar(struct uart_port *port, int ch) +{ + if (!port->membase) + return; + + while (!(rda_uart_read(port, RDA_UART_STATUS) & RDA_UART_STATUS_TX_FIFO_SPACE_MASK)) + cpu_relax(); + + rda_uart_write(port, ch, RDA_UART_RXTX_BUFFER); +} + +static void rda_uart_port_write(struct uart_port *port, const char *s, +
[PATCH v5 08/26] tty: serial: Add Actions Semi Owl UART earlycon
This implements an earlycon for Actions Semi S500/S900 SoCs. Based on LeMaker linux-actions tree. Signed-off-by: Andreas Färber --- v4 -> v5: * Squashed documentation (Greg) v3 -> v4: Unchanged v2 -> v3: * Adopted BIT() macro v1 -> v2: * Extended Kconfig help to mention earlycon (Arnd) * Spelled out Actions Semiconductor in Kconfig help * Adopted "actions" vendor prefix Documentation/admin-guide/kernel-parameters.txt | 6 ++ drivers/tty/serial/Kconfig | 19 drivers/tty/serial/Makefile | 1 + drivers/tty/serial/owl-uart.c | 135 4 files changed, 161 insertions(+) create mode 100644 drivers/tty/serial/owl-uart.c diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index fb311bdccb7b..cc8a6bfcb299 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -961,6 +961,12 @@ must already be setup and configured. Options are not yet supported. + owl, + Start an early, polled-mode console on a serial port + of an Actions Semi SoC, such as S500 or S900, at the + specified address. The serial port must already be + setup and configured. Options are not yet supported. + smh Use ARM semihosting calls for early console. s3c2410, diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index 07812a7ea2a4..1f096e2bb398 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -1688,6 +1688,25 @@ config SERIAL_MVEBU_CONSOLE and warnings and which allows logins in single user mode) Otherwise, say 'N'. +config SERIAL_OWL + bool "Actions Semi Owl serial port support" + depends on ARCH_ACTIONS || COMPILE_TEST + select SERIAL_CORE + help + This driver is for Actions Semiconductor S500/S900 SoC's UART. + Say 'Y' here if you wish to use the on-board serial port. + Otherwise, say 'N'. + +config SERIAL_OWL_CONSOLE + bool "Console on Actions Semi Owl serial port" + depends on SERIAL_OWL=y + select SERIAL_CORE_CONSOLE + select SERIAL_EARLYCON + default y + help + Say 'Y' here if you wish to use Actions Semiconductor S500/S900 UART + as the system console. Only earlycon is implemented currently. + endmenu config SERIAL_MCTRL_GPIO diff --git a/drivers/tty/serial/Makefile b/drivers/tty/serial/Makefile index 53c03e005132..fe88a75d9a59 100644 --- a/drivers/tty/serial/Makefile +++ b/drivers/tty/serial/Makefile @@ -92,6 +92,7 @@ obj-$(CONFIG_SERIAL_STM32)+= stm32-usart.o obj-$(CONFIG_SERIAL_MVEBU_UART)+= mvebu-uart.o obj-$(CONFIG_SERIAL_PIC32) += pic32_uart.o obj-$(CONFIG_SERIAL_MPS2_UART) += mps2-uart.o +obj-$(CONFIG_SERIAL_OWL) += owl-uart.o # GPIOLIB helpers for modem control lines obj-$(CONFIG_SERIAL_MCTRL_GPIO)+= serial_mctrl_gpio.o diff --git a/drivers/tty/serial/owl-uart.c b/drivers/tty/serial/owl-uart.c new file mode 100644 index ..1b8008797a1b --- /dev/null +++ b/drivers/tty/serial/owl-uart.c @@ -0,0 +1,135 @@ +/* + * Actions Semi Owl family serial console + * + * Copyright 2013 Actions Semi Inc. + * Author: Actions Semi, Inc. + * + * Copyright (c) 2016-2017 Andreas Färber + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define OWL_UART_CTL 0x000 +#define OWL_UART_TXDAT 0x008 +#define OWL_UART_STAT 0x00c + +#define OWL_UART_CTL_TRFS_TX BIT(14) +#define OWL_UART_CTL_ENBIT(15) +#define OWL_UART_CTL_RXIE BIT(18) +#define OWL_UART_CTL_TXIE BIT(19) + +#define OWL_UART_STAT_RIP BIT(0) +#define OWL_UART_STAT_TIP BIT(1) +#define OWL_UART_STAT_TFFU BIT(6) +#define OWL_UART_STAT_TRFL_MASK(0x1f << 11) +#define OWL_UART_STAT_UTBB BIT(17) + +static inline void owl_uart_write(struct uart_port *por
[PATCH v4 00/28] ARM: Initial Actions Semi S500 and S900 enablement
Hello, This patch series adds initial support for Actions Semiconductor S500 (ARMv7) and S900 (ARMv8) SoCs. v4 refactors the clocksource driver again and fixes power-gating for CPU2/CPU3. With this v4 I would like to start applying initial patches to my tree for 4.13. @Actions:Last call for comments on vendor prefix and SoC bindings! @uCRobotics: Last call for comments on vendor prefix and board bindings! @LeMaker:Last call for comments on module and board bindings! Work branch for testing: https://github.com/afaerber/linux/commits/bg96-next Booting from U-Boot to initrd is straightforward on both boards: https://en.opensuse.org/HCL:Guitar https://en.opensuse.org/HCL:Bubblegum-96 Have a lot of fun! Cheers, Andreas v3 -> v4: * Revert to hardcoded TIMER0/1 in clocksource (Daniel) * Make power domains CPU2 and CPU3 always-on * Clean up SMP vs. PM domains code duplication * Extend earlycon documentation (Jonathan) * Update MAINTAINERS with SPS files v2 -> v3: * Clocksource fix * Clocksource cleanups (Daniel) * Serial cleanups * Add S500 CPU enable-method * Add power domain driver * Rework clocksource for S900 compatibility v1 -> v2: * S900 DT fixes (Mark) * Kconfig name changes (Arnd) * Bubblegum-96 .dts rename * Vendor prefix rename * Minor cleanups * Add serial driver * Add MAINTAINERS section * Use SPDX-License-Identifier in DT (Rob) * Add clocksource driver Cc: Arnd Bergmann Cc: Olof Johansson Cc: Rob Herring Cc: Mark Rutland Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: mp...@actions-semi.com Cc: Thomas Liau Cc: 96boa...@ucrobotics.com Cc: supp...@lemaker.org Cc: linux-ser...@vger.kernel.org Cc: Greg Kroah-Hartman Cc: linux...@vger.kernel.org Cc: Rafael J. Wysocki Cc: Kevin Hilman Cc: Ulf Hansson Cc: linux-doc@vger.kernel.org Cc: Jonathan Corbet Cc: devicet...@vger.kernel.org Andreas Färber (28): dt-bindings: Add vendor prefix for Actions Semi dt-bindings: arm: Document Actions Semi S500 dt-bindings: timer: Document Owl timer clocksource: Add Owl timer clocksource: owl: Add S900 support ARM: Prepare Actions Semi S500 ARM64: Prepare Actions Semi S900 dt-bindings: serial: Document Actions Semi Owl UARTs tty: serial: Add Actions Semi Owl UART earlycon Documentation: kernel-parameters: Document owl earlycon ARM: dts: Add Actions Semi S500 and LeMaker Guitar dt-bindings: Add vendor prefix for uCRobotics dt-bindings: arm: Document Actions Semi S900 ARM64: dts: Add Actions Semi S900 and Bubblegum-96 MAINTAINERS: Add Actions Semi Owl section tty: serial: owl: Implement console driver ARM64: dts: actions: s900-bubblegum-96: Add fake uart5 clock ARM: dts: s500-guitar-bb-rev-b: Add fake uart3 clock dt-bindings: arm: cpus: Add S500 enable-method ARM: owl: Implement CPU enable-method for S500 ARM: dts: s500: Set CPU enable-method dt-bindings: power: Add Owl SPS power domains soc: actions: Add Owl SPS MAINTAINERS: Update Actions Semi section with SPS ARM: dts: s500: Add SPS node ARM: dts: s500: Set power domains for CPU2 and CPU3 soc: actions: owl-sps: Factor out owl_sps_set_pg() for power-gating ARM: owl: smp: Implement SPS power-gating for CPU2 and CPU3 Documentation/admin-guide/kernel-parameters.txt| 6 + Documentation/devicetree/bindings/arm/actions.txt | 39 ++ Documentation/devicetree/bindings/arm/cpus.txt | 1 + .../devicetree/bindings/power/actions,owl-sps.txt | 17 + .../bindings/serial/actions,owl-uart.txt | 16 + .../bindings/timer/actions,owl-timer.txt | 20 + .../devicetree/bindings/vendor-prefixes.txt| 2 + MAINTAINERS| 13 + arch/arm/Kconfig | 2 + arch/arm/Makefile | 1 + arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/s500-guitar-bb-rev-b.dts | 33 + arch/arm/boot/dts/s500-guitar.dtsi | 22 + arch/arm/boot/dts/s500.dtsi| 189 ++ arch/arm/mach-actions/Kconfig | 16 + arch/arm/mach-actions/Makefile | 4 + arch/arm/mach-actions/headsmp.S| 68 ++ arch/arm/mach-actions/owl.c| 28 + arch/arm/mach-actions/platsmp.c| 198 ++ arch/arm64/Kconfig.platforms | 6 + arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/actions/Makefile | 5 + arch/arm64/boot/dts/actions/s900-bubblegum-96.dts | 42 ++ arch/arm64/boot/dts/actions/s900.dtsi | 164 + drivers/clocksource/Kconfig| 7 + drivers/clocksource/Makefile | 1 + drivers/clocksource/owl-timer.c| 172 + drivers/soc/Kconfig| 1 + drivers/soc/Makefile | 1 + drivers/soc/action
[PATCH v4 10/28] Documentation: kernel-parameters: Document owl earlycon
Add the "owl" earlycon option to kernel-parameters.txt. Signed-off-by: Andreas Färber --- v3 -> v4: * Extended help text and commit message (Jonathan) v1 -> v2 -> v3: unchanged Documentation/admin-guide/kernel-parameters.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 042aa5e9c47d..e2fb7a87bc84 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -961,6 +961,12 @@ must already be setup and configured. Options are not yet supported. + owl, + Start an early, polled-mode console on a serial port + of an Actions Semi SoC, such as S500 or S900, at the + specified address. The serial port must already be + setup and configured. Options are not yet supported. + smh Use ARM semihosting calls for early console. s3c2410, -- 2.12.3 -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 09/17] Documentation: kernel-parameters: Document owl earlycon
Am 03.03.2017 um 23:46 schrieb Jonathan Corbet: > On Fri, 24 Feb 2017 04:40:47 +0100 > Andreas Färber wrote: > >> +owl, >> +Start an early, polled-mode console on an Owl serial >> +port at the specified address. The serial port must >> +already be setup and configured. Options are not yet >> +supported. >> + > > Apologies, I'm just getting around to looking at this. > > Is there any chance of getting a version of it that (1) has a proper > changelog, and (2) better describes the applicability of this option. > Presumably if I don't know what an "Owl serial port" is I don't need it, > but maybe a phrase saying where such ports might be found would be helpful > here? Note that there is already a v3 of this patch. Both v2 and v3 do have a changelog, indicating that nothing changed here between versions. Did you mean commit message, and if so what would you like to see added exactly? Did you notice that most earlycon options are described like this? pl011, my meson, msm, lantiq all just repeat the driver name. In this case Owl is a family of Actions Semiconductor SoCs that are newly being enabled in this series - I can add the vendor name to the text, but no idea what else to say about "applicability"... While at it, it is really ugly for both users and contributors that there is no consistent (e.g., alphabetical) order of these options. Regards, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 00/25] ARM: Initial Actions Semi S500 and S900 enablement
Hello, This series adds initial support for Actions Semiconductor S500 (ARMv7) and S900 (ARMv8) SoCs. v3 has the serial driver working almost equally for both, still glitch on S900. SMP support and power-gating for S500 are implemented, so both get 4 CPUs up. https://github.com/afaerber/linux/commits/bg96-next Booting from U-Boot is straightforward on both boards: https://en.opensuse.org/HCL:Guitar https://en.opensuse.org/HCL:Bubblegum-96 Have a lot of fun! Cheers, Andreas v2 -> v3: * Clocksource fix * Clocksource cleanups (Daniel) * Serial cleanups * Add S500 CPU enable-method * Add power domain driver * Rework clocksource for S900 compatibility v1 -> v2: * S900 DT fixes (Mark) * Kconfig name changes (Arnd) * Bubblegum-96 .dts rename * Vendor prefix rename * Minor cleanups * Add serial driver * Add MAINTAINERS section * Use SPDX-License-Identifier in DT (Rob) * Add clocksource driver Cc: Mark Rutland Cc: Arnd Bergmann Cc: Rob Herring Cc: Daniel Lezcano Cc: mp...@actions-semi.com Cc: 96boa...@ucrobotics.com Cc: supp...@lemaker.org Cc: linux-ser...@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: devicet...@vger.kernel.org Andreas Färber (25): dt-bindings: Add vendor prefix for Actions Semi dt-bindings: arm: Document Actions Semi S500 dt-bindings: timer: Document Owl timer clocksource: Add Owl timer clocksource: owl: Add S900 support ARM: Prepare Actions Semi S500 ARM64: Prepare Actions Semi S900 dt-bindings: serial: Document Actions Semi Owl UARTs tty: serial: Add Actions Semi Owl UART earlycon Documentation: kernel-parameters: Document owl earlycon ARM: dts: Add Actions Semi S500 and LeMaker Guitar dt-bindings: Add vendor prefix for uCRobotics dt-bindings: arm: Document Actions Semi S900 ARM64: dts: Add Actions Semi S900 and Bubblegum-96 MAINTAINERS: Add Actions Semi Owl section tty: serial: owl: Implement console driver ARM64: dts: actions: s900-bubblegum-96: Add fake uart5 clock ARM: dts: s500-guitar-bb-rev-b: Add fake uart3 clock dt-bindings: arm: cpus: Add S500 enable-method ARM: owl: Implement CPU enable-method for S500 ARM: dts: s500: Set CPU enable-method dt-bindings: power: Add Owl SPS power domains soc: actions: Add Owl SPS ARM: dts: s500: Add SPS node ARM: owl: smp: Reimplement SPS power-gating for CPU2 and CPU3 Documentation/admin-guide/kernel-parameters.txt| 6 + Documentation/devicetree/bindings/arm/actions.txt | 39 ++ Documentation/devicetree/bindings/arm/cpus.txt | 1 + .../devicetree/bindings/power/actions,owl-sps.txt | 17 + .../bindings/serial/actions,owl-uart.txt | 16 + .../bindings/timer/actions,owl-timer.txt | 20 + .../devicetree/bindings/vendor-prefixes.txt| 2 + MAINTAINERS| 10 + arch/arm/Kconfig | 2 + arch/arm/Makefile | 1 + arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/s500-guitar-bb-rev-b.dts | 33 + arch/arm/boot/dts/s500-guitar.dtsi | 24 + arch/arm/boot/dts/s500.dtsi| 183 ++ arch/arm/mach-actions/Kconfig | 15 + arch/arm/mach-actions/Makefile | 2 + arch/arm/mach-actions/headsmp.S| 68 ++ arch/arm/mach-actions/owl.c| 28 + arch/arm/mach-actions/platsmp.c| 229 +++ arch/arm64/Kconfig.platforms | 6 + arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/actions/Makefile | 5 + arch/arm64/boot/dts/actions/s900-bubblegum-96.dts | 42 ++ arch/arm64/boot/dts/actions/s900.dtsi | 164 + drivers/clocksource/Kconfig| 7 + drivers/clocksource/Makefile | 1 + drivers/clocksource/owl-timer.c| 205 ++ drivers/soc/Kconfig| 1 + drivers/soc/Makefile | 1 + drivers/soc/actions/Kconfig| 12 + drivers/soc/actions/Makefile | 1 + drivers/soc/actions/owl-sps.c | 245 +++ drivers/tty/serial/Kconfig | 19 + drivers/tty/serial/Makefile| 1 + drivers/tty/serial/owl-uart.c | 724 + include/dt-bindings/power/s500-powergate.h | 19 + include/uapi/linux/serial_core.h | 3 + 37 files changed, 2155 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/actions.txt create mode 100644 Documentation/devicetree/bindings/power/actions,owl-sps.txt create mode 100644 Documentation/devicetree/bindings/serial/actions,owl-uart.txt create mode 100644 Documentation/devicetree/bindings/timer/actions,owl-timer.txt create mode 100644 arch/arm/boot/dt
[PATCH v3 10/25] Documentation: kernel-parameters: Document owl earlycon
Signed-off-by: Andreas Färber --- v1 -> v2 -> v3: unchanged Documentation/admin-guide/kernel-parameters.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 986e443..f48a142 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -943,6 +943,12 @@ must already be setup and configured. Options are not yet supported. + owl, + Start an early, polled-mode console on an Owl serial + port at the specified address. The serial port must + already be setup and configured. Options are not yet + supported. + smh Use ARM semihosting calls for early console. s3c2410, -- 2.10.2 -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 09/17] Documentation: kernel-parameters: Document owl earlycon
Signed-off-by: Andreas Färber --- v1 -> v2: unchanged Documentation/admin-guide/kernel-parameters.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 986e443..f48a142 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -943,6 +943,12 @@ must already be setup and configured. Options are not yet supported. + owl, + Start an early, polled-mode console on an Owl serial + port at the specified address. The serial port must + already be setup and configured. Options are not yet + supported. + smh Use ARM semihosting calls for early console. s3c2410, -- 2.10.2 -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 1/8] Documentation: arm: Marvell: Document IAP140
IAP140 is either based on or was renamed from PXA1908. Signed-off-by: Andreas Färber --- v2: new (Thomas) Documentation/arm/Marvell/README | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Documentation/arm/Marvell/README b/Documentation/arm/Marvell/README index b5bb7f5..e9d4873 100644 --- a/Documentation/arm/Marvell/README +++ b/Documentation/arm/Marvell/README @@ -243,7 +243,7 @@ PXA 2xx/3xx/93x/95x family Linux kernel plat directory: arch/arm/plat-pxa MMP/MMP2/MMP3 family (communication processor) -- +-- Flavors: PXA168, a.k.a Armada 168 @@ -295,6 +295,16 @@ MMP/MMP2/MMP3 family (communication processor) Linux kernel mach directory: arch/arm/mach-mmp Linux kernel plat directory: arch/arm/plat-pxa +MMP ARMv8 family (application processor) + + + Flavors: +IAP140 + Product brief: http://www.marvell.com/application-processors/assets/Marvell-IAP140-Platform-Brief-20160601.pdf + Core: quad-core ARMv8 Cortex-A53 + + Homepage: http://www.marvell.com/application-processors/ + Berlin family (Multimedia Solutions) - -- 2.10.2 -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 07/11] Documentation: kernel-parameters: Document owl earlycon
Signed-off-by: Andreas Färber --- Documentation/admin-guide/kernel-parameters.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 01f5788..c741166 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -952,6 +952,12 @@ must already be setup and configured. Options are not yet supported. + owl, + Start an early, polled-mode console on an Owl serial + port at the specified address. The serial port must + already be setup and configured. Options are not yet + supported. + smh Use ARM semihosting calls for early console. s3c2410, -- 2.10.2 -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 6/6] net: smmac: allow configuring lower pbl values
Hi, In subject: s/smmac/stmmac/ Regards, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4] tty: serial: meson: Implement earlycon support
Am 06.03.2016 um 12:21 schrieb Andreas Färber: > Split off the bulk of the existing meson_serial_console_write() > implementation into meson_serial_port_write() for implementing > meson_serial_early_console_write(). > > Use "meson" as the earlycon driver name, courtesy of Nicolas. > > Signed-off-by: Nicolas Saenz Julienne > Acked-by: Carlo Caione > Signed-off-by: Andreas Färber > --- > v3 -> v4: > * Select SERIAL_EARLYCON (Arnd) Ping? Andreas > > v2 -> v3: > * Rename from "meson_serial" to just "meson" (Nicolas) > > v1 -> v2: > * Implement meson_serial_early_console_write() instead of reusing >meson_serial_console_write() (Peter) > > Documentation/kernel-parameters.txt | 6 ++ > drivers/tty/serial/Kconfig | 1 + > drivers/tty/serial/meson_uart.c | 42 > ++--- > 3 files changed, 42 insertions(+), 7 deletions(-) > > diff --git a/Documentation/kernel-parameters.txt > b/Documentation/kernel-parameters.txt > index e0a21e4556a6..a7c1377fd80f 100644 > --- a/Documentation/kernel-parameters.txt > +++ b/Documentation/kernel-parameters.txt > @@ -1039,6 +1039,12 @@ bytes respectively. Such letter suffixes can also be > entirely omitted. > the driver will use only 32-bit accessors to read/write > the device registers. > > + meson, > + Start an early, polled-mode console on a meson serial > + port at the specified address. The serial port must > + already be setup and configured. Options are not yet > + supported. > + > msm_serial, > Start an early, polled-mode console on an msm serial > port at the specified address. The serial port > diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig > index bdbe1c533c6a..ad7538e8a4e8 100644 > --- a/drivers/tty/serial/Kconfig > +++ b/drivers/tty/serial/Kconfig > @@ -213,6 +213,7 @@ config SERIAL_MESON_CONSOLE > bool "Support for console on meson" > depends on SERIAL_MESON=y > select SERIAL_CORE_CONSOLE > + select SERIAL_EARLYCON > help > Say Y here if you wish to use a Amlogic MesonX UART as the > system console (the system console is the device which > diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c > index 024445aa0521..6aea0f4a9165 100644 > --- a/drivers/tty/serial/meson_uart.c > +++ b/drivers/tty/serial/meson_uart.c > @@ -481,18 +481,13 @@ static void meson_console_putchar(struct uart_port > *port, int ch) > writel(ch, port->membase + AML_UART_WFIFO); > } > > -static void meson_serial_console_write(struct console *co, const char *s, > -u_int count) > +static void meson_serial_port_write(struct uart_port *port, const char *s, > + u_int count) > { > - struct uart_port *port; > unsigned long flags; > int locked; > u32 val, tmp; > > - port = meson_ports[co->index]; > - if (!port) > - return; > - > local_irq_save(flags); > if (port->sysrq) { > locked = 0; > @@ -516,6 +511,18 @@ static void meson_serial_console_write(struct console > *co, const char *s, > local_irq_restore(flags); > } > > +static void meson_serial_console_write(struct console *co, const char *s, > +u_int count) > +{ > + struct uart_port *port; > + > + port = meson_ports[co->index]; > + if (!port) > + return; > + > + meson_serial_port_write(port, s, count); > +} > + > static int meson_serial_console_setup(struct console *co, char *options) > { > struct uart_port *port; > @@ -554,6 +561,27 @@ static int __init meson_serial_console_init(void) > } > console_initcall(meson_serial_console_init); > > +static void meson_serial_early_console_write(struct console *co, > + const char *s, > + u_int count) > +{ > + struct earlycon_device *dev = co->data; > + > + meson_serial_port_write(&dev->port, s, count); > +} > + > +static int __init > +meson_serial_early_console_setup(struct earlycon_device *device, const char > *opt) > +{ > + if (!device->port.membase) > + return -ENODEV; > + > + device->con->write = meson_serial_early_console_write; > + return 0; > +} >
[PATCH v4] tty: serial: meson: Implement earlycon support
Split off the bulk of the existing meson_serial_console_write() implementation into meson_serial_port_write() for implementing meson_serial_early_console_write(). Use "meson" as the earlycon driver name, courtesy of Nicolas. Signed-off-by: Nicolas Saenz Julienne Acked-by: Carlo Caione Signed-off-by: Andreas Färber --- v3 -> v4: * Select SERIAL_EARLYCON (Arnd) v2 -> v3: * Rename from "meson_serial" to just "meson" (Nicolas) v1 -> v2: * Implement meson_serial_early_console_write() instead of reusing meson_serial_console_write() (Peter) Documentation/kernel-parameters.txt | 6 ++ drivers/tty/serial/Kconfig | 1 + drivers/tty/serial/meson_uart.c | 42 ++--- 3 files changed, 42 insertions(+), 7 deletions(-) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index e0a21e4556a6..a7c1377fd80f 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -1039,6 +1039,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. the driver will use only 32-bit accessors to read/write the device registers. + meson, + Start an early, polled-mode console on a meson serial + port at the specified address. The serial port must + already be setup and configured. Options are not yet + supported. + msm_serial, Start an early, polled-mode console on an msm serial port at the specified address. The serial port diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index bdbe1c533c6a..ad7538e8a4e8 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -213,6 +213,7 @@ config SERIAL_MESON_CONSOLE bool "Support for console on meson" depends on SERIAL_MESON=y select SERIAL_CORE_CONSOLE + select SERIAL_EARLYCON help Say Y here if you wish to use a Amlogic MesonX UART as the system console (the system console is the device which diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index 024445aa0521..6aea0f4a9165 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -481,18 +481,13 @@ static void meson_console_putchar(struct uart_port *port, int ch) writel(ch, port->membase + AML_UART_WFIFO); } -static void meson_serial_console_write(struct console *co, const char *s, - u_int count) +static void meson_serial_port_write(struct uart_port *port, const char *s, + u_int count) { - struct uart_port *port; unsigned long flags; int locked; u32 val, tmp; - port = meson_ports[co->index]; - if (!port) - return; - local_irq_save(flags); if (port->sysrq) { locked = 0; @@ -516,6 +511,18 @@ static void meson_serial_console_write(struct console *co, const char *s, local_irq_restore(flags); } +static void meson_serial_console_write(struct console *co, const char *s, + u_int count) +{ + struct uart_port *port; + + port = meson_ports[co->index]; + if (!port) + return; + + meson_serial_port_write(port, s, count); +} + static int meson_serial_console_setup(struct console *co, char *options) { struct uart_port *port; @@ -554,6 +561,27 @@ static int __init meson_serial_console_init(void) } console_initcall(meson_serial_console_init); +static void meson_serial_early_console_write(struct console *co, +const char *s, +u_int count) +{ + struct earlycon_device *dev = co->data; + + meson_serial_port_write(&dev->port, s, count); +} + +static int __init +meson_serial_early_console_setup(struct earlycon_device *device, const char *opt) +{ + if (!device->port.membase) + return -ENODEV; + + device->con->write = meson_serial_early_console_write; + return 0; +} +OF_EARLYCON_DECLARE(meson, "amlogic,meson-uart", + meson_serial_early_console_setup); + #define MESON_SERIAL_CONSOLE (&meson_serial_console) #else #define MESON_SERIAL_CONSOLE NULL -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] tty: serial: meson: Implement earlycon support
Split off the bulk of the existing meson_serial_console_write() implementation into meson_serial_port_write() for implementing meson_serial_early_console_write(). Use "meson" as the earlycon driver name, courtesy of Nicolas. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Andreas Färber --- v2 -> v3: * Rename from "meson_serial" to just "meson" (Nicolas) v1 -> v2: * Implement meson_serial_early_console_write() instead of reusing meson_serial_console_write() (Peter) Documentation/kernel-parameters.txt | 6 ++ drivers/tty/serial/meson_uart.c | 42 ++--- 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index e0a21e4556a6..a7c1377fd80f 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -1039,6 +1039,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. the driver will use only 32-bit accessors to read/write the device registers. + meson, + Start an early, polled-mode console on a meson serial + port at the specified address. The serial port must + already be setup and configured. Options are not yet + supported. + msm_serial, Start an early, polled-mode console on an msm serial port at the specified address. The serial port diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index 024445aa0521..6aea0f4a9165 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -481,18 +481,13 @@ static void meson_console_putchar(struct uart_port *port, int ch) writel(ch, port->membase + AML_UART_WFIFO); } -static void meson_serial_console_write(struct console *co, const char *s, - u_int count) +static void meson_serial_port_write(struct uart_port *port, const char *s, + u_int count) { - struct uart_port *port; unsigned long flags; int locked; u32 val, tmp; - port = meson_ports[co->index]; - if (!port) - return; - local_irq_save(flags); if (port->sysrq) { locked = 0; @@ -516,6 +511,18 @@ static void meson_serial_console_write(struct console *co, const char *s, local_irq_restore(flags); } +static void meson_serial_console_write(struct console *co, const char *s, + u_int count) +{ + struct uart_port *port; + + port = meson_ports[co->index]; + if (!port) + return; + + meson_serial_port_write(port, s, count); +} + static int meson_serial_console_setup(struct console *co, char *options) { struct uart_port *port; @@ -554,6 +561,27 @@ static int __init meson_serial_console_init(void) } console_initcall(meson_serial_console_init); +static void meson_serial_early_console_write(struct console *co, +const char *s, +u_int count) +{ + struct earlycon_device *dev = co->data; + + meson_serial_port_write(&dev->port, s, count); +} + +static int __init +meson_serial_early_console_setup(struct earlycon_device *device, const char *opt) +{ + if (!device->port.membase) + return -ENODEV; + + device->con->write = meson_serial_early_console_write; + return 0; +} +OF_EARLYCON_DECLARE(meson, "amlogic,meson-uart", + meson_serial_early_console_setup); + #define MESON_SERIAL_CONSOLE (&meson_serial_console) #else #define MESON_SERIAL_CONSOLE NULL -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] tty: serial: meson: Implement earlycon support
Split off the bulk of the existing meson_serial_console_write() implementation into meson_serial_port_write() for implementing meson_serial_early_console_write(). Signed-off-by: Andreas Färber --- v1 -> v2: * Implement meson_serial_early_console_write() instead of reusing meson_serial_console_write() (Peter) Documentation/kernel-parameters.txt | 6 ++ drivers/tty/serial/meson_uart.c | 42 ++--- 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 59e15150a9d8..237f0ee20afb 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -1025,6 +1025,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. the driver will use only 32-bit accessors to read/write the device registers. + meson_serial, + Start an early, polled-mode console on a meson serial + port at the specified address. The serial port must + already be setup and configured. Options are not yet + supported. + msm_serial, Start an early, polled-mode console on an msm serial port at the specified address. The serial port diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index b12a37bd37b6..9efcfa2de31e 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -475,18 +475,13 @@ static void meson_console_putchar(struct uart_port *port, int ch) writel(ch, port->membase + AML_UART_WFIFO); } -static void meson_serial_console_write(struct console *co, const char *s, - u_int count) +static void meson_serial_port_write(struct uart_port *port, const char *s, + u_int count) { - struct uart_port *port; unsigned long flags; int locked; u32 val, tmp; - port = meson_ports[co->index]; - if (!port) - return; - local_irq_save(flags); if (port->sysrq) { locked = 0; @@ -510,6 +505,18 @@ static void meson_serial_console_write(struct console *co, const char *s, local_irq_restore(flags); } +static void meson_serial_console_write(struct console *co, const char *s, + u_int count) +{ + struct uart_port *port; + + port = meson_ports[co->index]; + if (!port) + return; + + meson_serial_port_write(port, s, count); +} + static int meson_serial_console_setup(struct console *co, char *options) { struct uart_port *port; @@ -548,6 +555,27 @@ static int __init meson_serial_console_init(void) } console_initcall(meson_serial_console_init); +static void meson_serial_early_console_write(struct console *co, +const char *s, +u_int count) +{ + struct earlycon_device *dev = co->data; + + meson_serial_port_write(&dev->port, s, count); +} + +static int __init +meson_serial_early_console_setup(struct earlycon_device *device, const char *opt) +{ + if (!device->port.membase) + return -ENODEV; + + device->con->write = meson_serial_early_console_write; + return 0; +} +OF_EARLYCON_DECLARE(meson_serial, "amlogic,meson-uart", + meson_serial_early_console_setup); + #define MESON_SERIAL_CONSOLE (&meson_serial_console) #else #define MESON_SERIAL_CONSOLE NULL -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] tty: serial: meson: Implement earlycon support
Hi Peter, Am 08.02.2016 um 05:22 schrieb Peter Hurley: > On 02/07/2016 12:57 PM, Andreas Färber wrote: >> Reuse the existing console write implementation for implementing >> DT-based and command-line-based earlycon support. >> >> Signed-off-by: Andreas Färber >> --- >> Documentation/kernel-parameters.txt | 6 ++ >> drivers/tty/serial/meson_uart.c | 13 + >> 2 files changed, 19 insertions(+) >> >> diff --git a/Documentation/kernel-parameters.txt >> b/Documentation/kernel-parameters.txt >> index 602065c..90801ac 100644 >> --- a/Documentation/kernel-parameters.txt >> +++ b/Documentation/kernel-parameters.txt >> @@ -1030,6 +1030,12 @@ Such letter suffixes can also be entirely omitted. >> the driver will use only 32-bit accessors to read/write >> the device registers. >> >> +meson_serial, >> +Start an early, polled-mode console on a meson serial >> +port at the specified address. The serial port must >> +already be setup and configured. Options are not yet >> +supported. >> + >> msm_serial, >> Start an early, polled-mode console on an msm serial >> port at the specified address. The serial port >> diff --git a/drivers/tty/serial/meson_uart.c >> b/drivers/tty/serial/meson_uart.c >> index b12a37b..6f89567 100644 >> --- a/drivers/tty/serial/meson_uart.c >> +++ b/drivers/tty/serial/meson_uart.c >> @@ -548,6 +548,19 @@ static int __init meson_serial_console_init(void) >> } >> console_initcall(meson_serial_console_init); >> >> +static int __init >> +meson_serial_early_console_setup(struct earlycon_device *device, const char >> *opt) >> +{ >> +if (!device->port.membase) >> +return -ENODEV; >> + >> +device->con->write = meson_serial_console_write; > > meson_serial_console_write() is not appropriate for earlycon; it assumes the > earlycon port is the same as the driver port (it isn't). Thanks for spotting that. I forgot to mention that I tested this on arm64, where there is no earlyprintk any more, seemingly successfully getting a bootconsole uart0. Using co->data instead of co->index I now get meson_serial0 instead, doh. This probably slipped though because another patch is necessary for fixing the baudrate calculation on my device. >> +return 0; >> +} >> +EARLYCON_DECLARE(meson_serial, meson_serial_early_console_setup); >> +OF_EARLYCON_DECLARE(meson_serial, "amlogic,meson-uart", >> +meson_serial_early_console_setup); > > With today's linux-next (or Greg's tty-next tree), it is no longer necessary > to > declare separate earlycon's when you want both; OF_EARLYCON_DECLARE() declares > both a devicetree-enabled earlycon and automatically provides for a command > line > earlycon of the same name. Thanks for the hint, it was based on linux-next from a couple days ago. Is there any guidance wrt naming? I noticed that msm uses -uart in the compatible string and _serial for earlycon, so I copied that; should it rather be meson_uart or just meson? Regards, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] tty: serial: meson: Implement earlycon support
Reuse the existing console write implementation for implementing DT-based and command-line-based earlycon support. Signed-off-by: Andreas Färber --- Documentation/kernel-parameters.txt | 6 ++ drivers/tty/serial/meson_uart.c | 13 + 2 files changed, 19 insertions(+) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 602065c..90801ac 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -1030,6 +1030,12 @@ Such letter suffixes can also be entirely omitted. the driver will use only 32-bit accessors to read/write the device registers. + meson_serial, + Start an early, polled-mode console on a meson serial + port at the specified address. The serial port must + already be setup and configured. Options are not yet + supported. + msm_serial, Start an early, polled-mode console on an msm serial port at the specified address. The serial port diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index b12a37b..6f89567 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -548,6 +548,19 @@ static int __init meson_serial_console_init(void) } console_initcall(meson_serial_console_init); +static int __init +meson_serial_early_console_setup(struct earlycon_device *device, const char *opt) +{ + if (!device->port.membase) + return -ENODEV; + + device->con->write = meson_serial_console_write; + return 0; +} +EARLYCON_DECLARE(meson_serial, meson_serial_early_console_setup); +OF_EARLYCON_DECLARE(meson_serial, "amlogic,meson-uart", + meson_serial_early_console_setup); + #define MESON_SERIAL_CONSOLE (&meson_serial_console) #else #define MESON_SERIAL_CONSOLE NULL -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html