From: Al Stone <ahs3(a)redhat.com>
I should have sent these out for comment much sooner. Once these are
in good shape, the next steps are to send patches for verifying that
the pinconf code is working properly, connecting up the GPIO interrupts
using ACPI, and then conversion of all of the pin controllers for
Arndale (this patch converts one of four).
This patch puts most of the infrastructure in place so that in the
3.11 kernel the Arndale pin controllers can be converted from FDT to
ACPI. The changes in ASL are included in a separate patch. What this
allows is for the pin controllers to be described in either FDT or ACPI
for Arndale and -- in conjunction with the ASL changes -- shows how to
describe a Samsung controller in ACPI.
Al Stone (5):
ACPI: ARM: arndale: remove GPZ GPIO definition from DT so it can be in
ACPI
ACPI: ARM: arndale: whitelist the samsung-pinctrl driver for ACPI
ACPI: make an error message a little clearer
ACPI: improve acpi_extract_package() utility
ACPI: ARM: arndale: enable ACPI in the Samsung pinctrl driver
arch/arm/boot/dts/exynos5250-pinctrl.dtsi | 2 +
arch/arm/boot/dts/exynos5250.dtsi | 6 +-
drivers/acpi/acpi_platform.c | 3 +
drivers/acpi/osl.c | 2 +-
drivers/acpi/utils.c | 17 +-
drivers/pinctrl/pinctrl-samsung.c | 507 +++++++++++++++++++++++++++++-
drivers/pinctrl/pinctrl-samsung.h | 3 +
7 files changed, 526 insertions(+), 14 deletions(-)
--
1.8.3.1
ACPI spec is x86 oriented thus it use NMI for error reporting as low latency
error signalling way. Fast response to error occurrence is what ARM trying to
satisfy using interrupt prioritization since there is no NMI direct equivalent
for ARM architecture.
Patch set are divided into three step:
1. Create generic code responsible for setting interrupt priority.
2. Use it in interrupt setup.
3. Example of interrupt controller priority mapping for GIC platform dependent
code.
Patch set tries to meet requirements like:
- not breaking existing code
- easy to expand to new priority levels
- easy to map generic priority levels to platform dependent priority values
See commit logs for more detailed explanation.
ACPI spec is x86 oriented thus it use NMI for error reporting as low latency
error signalling way. Fast response to error occurrance is what ARM trying to
satisfy using interrupt prioritization since there is no NMI direct equivalent
for ARM architecture.
Patch set are divided into three step:
1. Create generic code responsible for setting interrupt priority.
2. Use it in interrupt setup.
3. Example of interrupt controller priority mapping for GIC platform dependent
code.
Patch set tries to meet requirements like:
- not breaking existing code
- easy to expand to new priority levels
- easy to map generic priority levels to platform dependent priority values
See commit logs for more detailed explanation.
From: Al Stone <ahs3(a)redhat.com>
This is the first in a series to eventually convert all of the Arndale
GPIO controllers to ACPI. This is the proposed ACPI description meant
to match what is done in DT, but is very specific to the Samsung driver.
Signed-off-by: Al Stone <al.stone(a)linaro.org>
---
platforms/exynos5250-arndale.acpi/ssdt0.asl | 64 ++++++++++++++++++++++++++++-
1 file changed, 63 insertions(+), 1 deletion(-)
diff --git a/platforms/exynos5250-arndale.acpi/ssdt0.asl b/platforms/exynos5250-arndale.acpi/ssdt0.asl
index 69dce10..8b8efc7 100644
--- a/platforms/exynos5250-arndale.acpi/ssdt0.asl
+++ b/platforms/exynos5250-arndale.acpi/ssdt0.asl
@@ -12,6 +12,68 @@ DefinitionBlock (
2, // SSDT compliance revision
"LINARO", // OEM ID
"ARNDALE ", // table ID
- 0x00000001) // OEM revision
+ 0x00000003) // OEM revision
{
+ Scope (\_SB)
+ {
+ // Base Address: 0x03860000
+ Device (SPC3) // Samsung pin controller
+ {
+ Name (_HID, "LINA0002")
+ Name (_UID, 0x3)
+
+ Name (BNKS, 0x1) // number of pin banks
+ Name (NGRP, 0x1) // number of pin groups
+ Name (NFUN, 0x1) // number of pinmux functions
+
+ Method (_CRS, 0x0, Serialized)
+ {
+ // Base address for the pin controller
+ Name (RBUF, ResourceTemplate ()
+ {
+ Memory32Fixed (ReadWrite,
+ 0x03860000,
+ 0x20)
+ })
+ Return (RBUF)
+ }
+
+ Device (GPZ) // GPIO chip GPZ -- first bank
+ {
+ Name (TAG, "gpz") // human-readable name
+ Name (BASE, 0x0) // base pin number
+ Name (NPIN, 0x7) // number of pins
+
+ // We need _CRS here in order to provide
+ // the actual registers for this part of
+ // the controller
+ Method (_CRS, 0x0, Serialized)
+ {
+ Name (RBUF, ResourceTemplate ()
+ {
+ Memory32Fixed (ReadWrite,
+ 0x03860000,
+ 0x20)
+ })
+ Return (RBUF)
+ }
+ }
+
+ Device (I2S0) // First Pin Group
+ {
+ Name (NPIN, 0x7) // number of pins
+ Name (FUNC, 0x2) // function number
+ Name (PUD, 0x0) // direction
+ Name (DRV, 0x0) // drive
+ Method (PINS, 0x0, NotSerialized)
+ {
+ Return (Package () {
+ "gpz-0", "gpz-1", "gpz-2",
+ "gpz-3", "gpz-4", "gpz-5",
+ "gpz-6"
+ })
+ }
+ }
+ }
+ }
}
--
1.8.3.1
From: Al Stone <ahs3(a)redhat.com>
While trying to figure out some problems I was having with my ACPI
blobs, I ran into several things that needed fixing in mab. Some of
these are innocuous, but some -- like using both 32- and 64-bit addresses
in the FACS, and the RSDP checksums -- are actually in violation of the
spec.
While I was there, I added a little more info in the verbose output,
and corrected what was being printed out.
The new feature is that one can now use -H to produce a blob that does
not have the header we've been using so far.
Changes from v1:
-- This time, I actually _remembered_ to run checkpatch, so cleaned
up the extra whitespace in patch 7/7.
Al Stone (7):
mab: Makefile needs to rebuild if .h changes and use CFLAGS properly
mab: use 32- or 64-bit FACS addresses in the FADT, not both
mab: set both checksums in the RSDP, not just one
mab: print out the correct offset in the blob
mab: add option to NOT use a blob header, if needed
mab: print out physical address when being verbose
mab: update Changelog and version number for this patch series
tools/mab/Changelog | 19 +++++++++
tools/mab/Makefile | 6 +--
tools/mab/mab.c | 109 +++++++++++++++++++++++++++++++---------------------
tools/mab/mab.h | 5 ++-
4 files changed, 91 insertions(+), 48 deletions(-)
--
1.8.3.1