Age | Commit message (Collapse) | Author |
|
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
|
|
description
This provides a 'mapping' driver which allows the NOR Flash and
ROM driver code to communicate with chips which are mapped
physically into the CPU's memory. The mapping description here is
taken from DSDT ACPI table.
This code was "inspired" by physmap_of.c
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
|
|
Adapt code written for AMBA acpi driver to generic case for fetching
key/value pairs from _DSM method.
Signed-off-by: Brandon Anderson <brandon.anderson@amd.com>
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
Acked-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
|
|
Neither Foundation nor RTSM have a SPI device, but here are the necessary driver
changes as an example of how to use acpi_amba_dsm_lookup() to get non-standard
parameters from ACPI.
This was tested by wiring up a SPI device into an RTSM Fast Model.
Signed-off-by: Brandon Anderson <brandon.anderson@amd.com>
Reviewed-by: Naresh Bhat <naresh.bhat@linaro.org>
|
|
This AMBA bus ACPI module provides a generic handler for compatible
devices.
It uses the same common code as the device tree method to probe for a hardware
ID and match up a driver for each device.
Signed-off-by: Brandon Anderson <brandon.anderson@amd.com>
Reviewed-by: Naresh Bhat <naresh.bhat@linaro.org>
|
|
Add the ACPI driver for fixed clock.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Reviewed-by: Naresh Bhat <naresh.bhat@linaro.org>
|
|
Add platform driver for fixed clock which makes the
initialization of fixed clock visible and for easy
understand.
TODO: maybe introduce a fixed-clock.c and its corresponding
Kconfig is better.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Reviewed-by: Naresh Bhat <naresh.bhat@linaro.org>
|
|
Add match table and pointers for ACPI probing into vexpress-sysreg driver.
Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
|
|
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
|
|
Added the match table and pointers for ACPI probing to the driver.
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
|
|
Add device ID LINA0003 for this device and add the match table.
As its a platform device it needs no other code and will be probed in by
acpi_platform once device ID is added.
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
|
|
hardcode the conduit to smc until such time as a table update is
available.
set the psci 2.0 functions in the ACPI case.
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
|
|
This document describes the data format and interfaces of ACPI device
specific properties.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
In order to support extracting Device Tree style properties from ACPI
devices a new method _PRP was introduced. This method, when present, is
expected to return a package containing packages with name-value pairs
analogous to their Device Tree counterparts.
A sample _PRP method migh look like this:
Method (_PRP, 0, NotSerialized)
{
Return (Package () {
Package () { "integer-property", 10 },
Package () { "string-property", "mystring" },
})
}
Calling acpi_get_properties() will evaluate the _PRP method, validate the
result and return it to the caller if everything went fine.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
Device Tree is used in many embedded systems to describe the system
configuration to the OS. It supports attaching properties or name-value
pairs to the devices it describe. With these properties one can pass
additional information to the drivers that would not be available
otherwise.
ACPI is another configuration mechanism (among other things) typically
seen on but not limited to x86 machines. ACPI allows passing arbitrary
data from methods but there is nothing like Device Tree properties in
the ACPI specification.
In order to facilitate ACPI usage in systems where Device Tree is
typically used, it would be beneficial to standardize a way to retrieve
Device Tree style properties from ACPI devices, which is what we do in
this patch.
If a given device described in ACPI namespace wants to export properties
it must implement _PRP method that returns the properties in a package
of packages. For example:
Method (_PRP, 0, NotSerialized)
{
Return (Package () {
Package () { "name1", <VALUE1> },
Package () { "name2", <VALUE2> },
...
})
}
Name must be string but there are no limitations for the value itself.
We add several helper functions that can be used to extract these
properties and convert them to different Linux data types.
The ultimate goal is that we only have one device property API that
retrieves the requested properties from Device Tree or from ACPI
transparent to the caller.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
Except for getting the enable_method, the rest
of the operations are similar for DT and ACPI and
thus can be unified.
Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Acked-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
|
|
Include the correct definitions for gic_acpi_init()
when building with CONFIG_ACPI=n.
Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Acked-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
|
|
ACPI SMP initialization needs to setup cpu_logical_map (ARM specific) and
cpu_physical_id (ACPI specific) maps anyway. So we can kill two birds with
one stone by doing it in acpi_smp_init_cpus. acpi_smp_init_cpus() uses
logic similar to of_smp_init_cpus() taking into account MADT data:
- fill in cpu_logical_map with processor UID
- make sure cpu_logical_map array's value are unique
- fill in cpu_physical_id with APIC ID
- make sure MADT contain cpu boot as first entry
- figure out and call CPU initialization method
- setup possible cpu mask
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
|
|
PSCI method will be used for booting secondary CPUs, so
acpi_get_cpu_release_address() is useless now.
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
|
|
Listed changes:
1. Find out enable method for CPU0 (similar to OF way).
2. It seems like acpi_get_enable_method() belongs to cpu_ops.c,
simplify and rename to cpu_acpi_get_enable_method() while we are here.
3. Use new features during acpi_smp_init_cpus() as well.
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
|
|
This commit allows us to initialize the ACPI core on ARM64 using the GIC
IRQ controller. Due to current MADT specification, the GIC is the only
controller we can use for ARM64 in ACPI initialization.
Listed changes:
1. Move all functions related to GIC structures to GIC driver.
2. Make BAD_MADT_ENTRY accessible from other files as well, future usage.
3. Move gic prototypes to ACPI arch specific header.
4. Rename acpi_gic_init to gic_acpi_init to be aligned with GIC drivers
function names.
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
|
|
Since early_acpi_boot_init() does the same job as acpi_boot_init(),
we can collapse the redundant parts into a single acpi_boot_init()
function, and move the remaining code obtaining the boot CPU ID to
where it is actually needed.
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
|
|
If the early boot methods of acpi are happy that we have valid ACPI tables
and acpi=off has not been passed. Then do not unflatted devicetree
effectively disabling further hardware probing from DT.
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
|
|
ACPI 5.0a+ spec defines a generic mode of communication
between the OS and a platform such as the BMC. This medium
(PCC) is typically used by CPPC (ACPI CPU Performance management),
RAS (ACPI reliability protocol) and MPST (ACPI Memory power
states).
This patch adds initial support for PCC to be usable by the
aforementioned PCC clients.
Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
|
|
PSCIv0.2 adds a new function called AFFINITY_INFO, which
can be used to query if a specified CPU has actually gone
offline. Calling this function via cpu_kill ensures that
a CPU has quiesced after a call to cpu_die.
Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
|
|
The PSCI v0.2+ spec defines standard values for PSCI function IDs.
Add a new binding entry so that pre v0.2 implementations can
use DT entries for function IDs and v0.2+ implementations use
standard entries as defined by the PSCIv0.2 specification.
Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
|
|
The PSCIv0.2 spec defines standard values of function IDs
and introduces a few new functions. Detect version of PSCI
and appropriately select the right PSCI functions.
Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
|
|
ARM64/ACPI patchet has not caught up with the "Prepare for running ACPI on
!x86 and !ia64" yet, temporary fix until both patchsets are fully in sync
again.
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
|
|
Use clocksource_acpi_init() on ARM64 to initialise timers
in ACPI way when DT is not available.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
CLOCKSOURCE_ACPI_DECLARE
acpi_table_parse() will find table with table id and run handler
on it. So we use CLOCKSOURCE_ACPI_DECLARE to decalare timer tables
and glue its handler, then initialize them in clocksource_acpi_init().
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
|
|
This macro does the same job as CLOCKSOURCE_OF_DECLARE. The device
name from the ACPI timer table is matched with all the registered
timer controllers and matching initialisation routine is invoked.
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
ACPI GTDT (Generic Timer Description Table) contains information for
arch timer initialization, this patch use this table to probe arm timer.
GTDT table is used for ARM/ARM64 only, please refer to chapter 5.2.24
of ACPI 5.0 spec for detailed inforamtion
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
In MADT table, there are GIC cpu interface base address and
GIC distributor base address, use them to convert GIC to ACPI.
Only GICC and GICD are described in ACPI 5.0, and only one GIC
is supported at now.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
This API is similar to DT based irq_of_parse_and_map but does link
parent/child IRQ controllers. This is tested for primary GIC PPI and GIC SPI
interrupts and not for secondary child irq controllers.
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
|
|
Only one GIC is supported in ACPI 5.0, even cascade GIC is not supported.
So if we set the GIC as the default domain then we can access it for IRQ
mapping within the ACPI code.
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
Needed because arm uses GIC which is defined in ACPI 5.0 spec.
Signed-off-by: Al Stone <al.stone@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
initialisation
Parked Address in GIC structure can be used as cpu release address
for spin table SMP initialisation.
This patch gets parked address from MADT and use it for SMP
initialisation when DT is not available.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
ACPI has no flag to indicate different enable methods for SMP
initialization, but it indicates that spin-table is supported
at now because of the Parked Protocol shows that there is
parked address in GIC structure.
In order to boot the system with ACPI if DT is not available,
we set the default enable method as spin-table since PSCI is
not available in ACPI spec at now.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
APIC id
When boot the kernel with MADT, the cpu possible and present sets should
be enumerated for later smp initialization.
The logic cpu id maps to APIC id (GIC id) is also implemented, it is
needed for acpi processor drivers.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
Implement core functions for parsing MADT table to get the information
about GIC cpu interface and GIC distributor to prepare for SMP and GIC
initialization.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
ACPI reduced hardware mode is disabled by default, but ARM64 can
only run properly in ACPI hardware reduced mode at now, so select
ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on ARM64.
Signed-off-by: Al Stone <al.stone@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
Add Kconfigs to build ACPI on ARM64, and make ACPI runable on ARM64.
acpi_idle driver is x86/IA64 dependent now, so make CONFIG_ACPI_PROCESSOR
depends on X86 || IA64, and implement it on ARM/ARM64 in the furture.
In order to make arm-core.c can both run on ARM and ARM64, introduce
CONFIG_ACPI_ARM to support it.
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
Signed-off-by: Al Stone <al.stone@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
Introduce some PCI functions to make ACPI can be compiled when
CONFIG_PCI is enabled, these functions should be revisited when
implemented on ARM64.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
Lowlevel suspend function is needed for ACPI based suspend/resume,
introduce ARM related lowlevel function in this patch.
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
Introduce arm_core.c and its related head file, after this patch,
we can get ACPI tables from firmware on ARM64 now.
Signed-off-by: Al Stone <al.stone@linaro.org>
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
The _PDC (Processor Driver Capabilities) object provides OSPM a
mechanism to convey to the platform the capabilities supported
by OSPM for processor power management.
OSPM evaluates _PDC prior to evaluating any other processor
power management objects returning configuration information.
This patch introduces the skeleton of _PDC related file to make
ACPI core can be compiled on ARM64.
Signed-off-by: Al Stone <al.stone@linaro.org>
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
ACPI requires a cpu.h, add a dummy one copied from arm. This will need
updated or replaced as ACPI based cpu hotplug or cpu topology for armv8
is worked out.
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
Not all the ARM64 targets that are using ACPI have PCI, so introduce
some stub functions to make PCI optional for ACPI, and make ACPI core
run without CONFIG_PCI on ARM64.
pcibios_penalize_isa_irq() is arch dependent, introduce asm/pci.h to
include it.
Since ACPI on X86 and IA64 depends on PCI, it will not break X86 and
IA64 with this patch.
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
Signed-off-by: Al Stone <al.stone@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
Get apic id from MADT or _MAT method is not implemented on arm/arm64,
and ACPI 5.0 introduces GIC Structure for it, so this patch introduces
map_gic_id() to get apic id followed the ACPI 5.0 spec.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
|
|
arch-independent
_PDC related stuff in processor_core.c is little bit X86/IA64 dependent,
rework the code to make it more arch-independent, no functional change
in this patch.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
|