All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] ACPI: parse the SPCR table
@ 2016-02-15 18:05 ` Aleksey Makarov
  0 siblings, 0 replies; 86+ messages in thread
From: Aleksey Makarov @ 2016-02-15 18:05 UTC (permalink / raw)
  To: linux-acpi
  Cc: linux-serial, linux-kernel, linux-arm-kernel, Aleksey Makarov,
	Russell King, Greg Kroah-Hartman, Rafael J . Wysocki,
	Leif Lindholm, Graeme Gregory, Al Stone, Christopher Covington

This patchset is based on the patchset by Leif Lindholm [1]

'ARM Server Base Boot Requirements' [2] mentions SPCR (Serial Port
Console Redirection Table) [3] as a mandatory ACPI table that
specifies the configuration of serial console.

SPCR support is included in QEMU's ARM mach-virt since 2.4 release.

Introduce a new function acpi_console_check().  At the uart port
registration, this function checks if the ACPI SPCR table specifies
its argument of type struct uart_port to be a console
and if so calls add_preferred_console().

Use SPCR to tell if SBSA serial driver should use 32-bit access to registers.

To be able to access SPCR table each time any console is registered
change __init to __ref for early_acpi_os_unmap_memory().

The patchset should be applied to tty-next.

v3:
Greg Kroah-Hartman did not like v2 so I have rewritten this patchset:

- drop acpi_match() member of struct console
- drop implementations of this member for pl011 and 8250
- drop the patch that renames some vars in printk.c as it is not needed anymore
- drpo patch that introduces system wide acpi_table_parse2().
  Instead introduce a custom acpi_table_parse_spcr() in spcr.c

Instead of introducing a new match_acpi() member of struct console,
this patchset introduces a new function acpi_console_check().
This function is called when a new uart is registered at serial_core.c
the same way OF code checks for console.  If the registered uart is the
console specified by SPCR table, this function calls add_preferred_console()

The restrictions of this approach are:

- only serial consoles can be set up
- only consoles specified by the memory/io address can be set up
  (SPCR can specify devices by PCI id/PCI address)

v2:
https://lkml.kernel.org/g/1455299022-11641-1-git-send-email-aleksey.makarov@linaro.org
- don't use SPCR if user specified console in command line
- fix initialization order of newcon->index = 0
- rename some variables at printk.c (Joe Perches, Peter Hurley)
- enable ACPI_SPCR_TABLE in a separate patch (Andy Shevchenko)
- remove the retry loop for console registering (Peter Hurley).
  Instead, obtain SPCR with acpi_get_table().  That works after
  call to acpi_early_init() i. e. in any *_initcall()
- describe design decision behind introducing acpi_match() (Peter Hurley)
- fix compilation for x86 + ACPI (Graeme Gregory)
- introduce DBG2 constants in a separate patch (Andy Shevchenko)
- fix a typo in DBG2 constants (Andy Shevchenko)
- add ACPI_DBG2_ARM_SBSA_32BIT constant (Christopher Covington)
- add support for ACPI_DBG2_ARM_SBSA_* consoles (Christopher Covington)
- add documentation for functions
- add a patch that uses SPCR to find if SBSA serial driver should use 32-bit
  accessor functions (Christopher Covington)
- change __init to __ref for early_acpi_os_unmap_memory() in a separate patch
- introduce acpi_table_parse2() in a separate patch
- fix fetching the SPCR table early (Mark Salter)
- add a patch from Mark Salter that introduces support for matching 8250-based
  consoles

v1:
https://lkml.kernel.org/g/1453722324-22407-1-git-send-email-aleksey.makarov@linaro.org

[1] https://lkml.kernel.org/g/1441716217-23786-1-git-send-email-leif.lindholm@linaro.org
[2] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0044a/index.html
[3] https://msdn.microsoft.com/en-us/library/windows/hardware/dn639132(v=vs.85).aspx

Aleksey Makarov (5):
  ACPI: change __init to __ref for early_acpi_os_unmap_memory()
  ACPI: parse SPCR and enable matching console
  ACPI: enable ACPI_SPCR_TABLE on ARM64
  ACPI: add definition of DBG2 subtypes
  serial: pl011: use SPCR to setup 32-bit access

 arch/arm64/Kconfig               |   1 +
 drivers/acpi/Kconfig             |   3 +
 drivers/acpi/Makefile            |   1 +
 drivers/acpi/osl.c               |   6 +-
 drivers/acpi/spcr.c              | 122 +++++++++++++++++++++++++++++++++++++++
 drivers/tty/serial/amba-pl011.c  |   2 +
 drivers/tty/serial/serial_core.c |  14 ++++-
 include/acpi/actbl2.h            |   5 ++
 include/linux/acpi.h             |  15 +++++
 9 files changed, 166 insertions(+), 3 deletions(-)
 create mode 100644 drivers/acpi/spcr.c

-- 
2.7.1

^ permalink raw reply	[flat|nested] 86+ messages in thread

end of thread, other threads:[~2016-03-01 15:24 UTC | newest]

Thread overview: 86+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15 18:05 [PATCH v3 0/5] ACPI: parse the SPCR table Aleksey Makarov
2016-02-15 18:05 ` Aleksey Makarov
2016-02-15 18:05 ` [PATCH v3 1/5] ACPI: change __init to __ref for early_acpi_os_unmap_memory() Aleksey Makarov
2016-02-15 18:05   ` Aleksey Makarov
2016-02-17  2:44   ` Zheng, Lv
2016-02-17  2:44     ` Zheng, Lv
2016-02-17  2:44     ` Zheng, Lv
2016-02-17  2:51     ` Zheng, Lv
2016-02-17  2:51       ` Zheng, Lv
2016-02-17  2:51       ` Zheng, Lv
2016-02-17 13:08       ` Aleksey Makarov
2016-02-17 13:08         ` Aleksey Makarov
2016-02-17 13:08         ` Aleksey Makarov
2016-02-18  3:36         ` Zheng, Lv
2016-02-18  3:36           ` Zheng, Lv
2016-02-18  3:36           ` Zheng, Lv
2016-02-18 22:03           ` Peter Hurley
2016-02-18 22:03             ` Peter Hurley
2016-02-18 22:03             ` Peter Hurley
2016-02-19  2:58             ` Zheng, Lv
2016-02-19  2:58               ` Zheng, Lv
2016-02-19  2:58               ` Zheng, Lv
2016-02-19 11:02               ` Aleksey Makarov
2016-02-19 11:02                 ` Aleksey Makarov
2016-02-19 11:02                 ` Aleksey Makarov
2016-02-22  2:24                 ` Zheng, Lv
2016-02-22  2:24                   ` Zheng, Lv
2016-02-22  2:24                   ` Zheng, Lv
2016-02-22 14:58                   ` Aleksey Makarov
2016-02-22 14:58                     ` Aleksey Makarov
2016-02-22 14:58                     ` Aleksey Makarov
2016-02-23  0:19                     ` Zheng, Lv
2016-02-23  0:19                       ` Zheng, Lv
2016-02-23  0:19                       ` Zheng, Lv
2016-02-26  6:39                     ` Zheng, Lv
2016-02-26  6:39                       ` Zheng, Lv
2016-02-26  6:39                       ` Zheng, Lv
2016-02-26 10:33                       ` Aleksey Makarov
2016-02-26 10:33                         ` Aleksey Makarov
2016-02-26 10:33                         ` Aleksey Makarov
2016-02-19 10:42             ` Aleksey Makarov
2016-02-19 10:42               ` Aleksey Makarov
2016-02-19 10:42               ` Aleksey Makarov
2016-02-19 15:25               ` Peter Hurley
2016-02-19 15:25                 ` Peter Hurley
2016-02-19 15:25                 ` Peter Hurley
2016-02-19 17:20                 ` Christopher Covington
2016-02-19 17:20                   ` Christopher Covington
2016-02-19 17:20                   ` Christopher Covington
2016-02-22  5:37                   ` Peter Hurley
2016-02-22  5:37                     ` Peter Hurley
2016-02-22  5:37                     ` Peter Hurley
2016-02-22 14:43                   ` Aleksey Makarov
2016-02-22 14:43                     ` Aleksey Makarov
2016-02-22 14:43                     ` Aleksey Makarov
2016-02-22 14:35                 ` Aleksey Makarov
2016-02-22 14:35                   ` Aleksey Makarov
2016-02-22 14:35                   ` Aleksey Makarov
2016-03-01 15:24                   ` Peter Hurley
2016-03-01 15:24                     ` Peter Hurley
2016-03-01 15:24                     ` Peter Hurley
2016-02-15 18:05 ` [PATCH v3 2/5] ACPI: parse SPCR and enable matching console Aleksey Makarov
2016-02-15 18:05   ` Aleksey Makarov
2016-02-18 22:19   ` Peter Hurley
2016-02-18 22:19     ` Peter Hurley
2016-02-19 10:47     ` Aleksey Makarov
2016-02-19 10:47       ` Aleksey Makarov
2016-02-19 16:13       ` Peter Hurley
2016-02-19 16:13         ` Peter Hurley
2016-02-21  9:42   ` Yury Norov
2016-02-21  9:42     ` Yury Norov
2016-02-21  9:42     ` Yury Norov
2016-02-22 15:03     ` Aleksey Makarov
2016-02-22 15:03       ` Aleksey Makarov
2016-02-15 18:05 ` [PATCH v3 3/5] ACPI: enable ACPI_SPCR_TABLE on ARM64 Aleksey Makarov
2016-02-15 18:05   ` Aleksey Makarov
2016-02-15 18:05 ` [PATCH v3 4/5] ACPI: add definition of DBG2 subtypes Aleksey Makarov
2016-02-15 18:05   ` Aleksey Makarov
2016-02-15 18:05 ` [PATCH v3 5/5] serial: pl011: use SPCR to setup 32-bit access Aleksey Makarov
2016-02-15 18:05   ` Aleksey Makarov
2016-02-16 19:11 ` [PATCH v3 0/5] ACPI: parse the SPCR table Mark Salter
2016-02-16 19:11   ` Mark Salter
2016-02-17  2:36 ` Christopher Covington
2016-02-17  2:36   ` Christopher Covington
2016-02-18 21:15 ` Jeremy Linton
2016-02-18 21:15   ` Jeremy Linton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.