PROTO: ACPI: hacks to allow compilation on arm

Some hacks that will allow compilation of drivers/acpi on arm. These will
need to be replaced with proper solutions.

Signed-off-by: Al Stone <al.stone@linaro.org>
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
ACPI/scan: #if the PCI dependent parts

Not all platforms that are using ACPI have PCI so don't try and initialise
non existent PCI stuff.

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
ACPI_APEI: Fix compilation issue

Fix compilation issue with AEPI (Platform Error Interface)

Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
ACPI: Added basic ACPI arm initialization calls

Start to add ACPI initialisation calls to the arch/arm files.

This does not yet perform an actual ACPI initialisation.

Signed-off-by: Al Stone <al.stone@linaro.org>
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
ACPI: Define ACPI_IRQ_MODEL_GIC needed for arm

Needed because arm uses GIC which is defined in ACPI 5.0 spec.

Signed-off-by: Al Stone <al.stone@linaro.org>
ARM: ACPI: Remove unused ACPI dsdt_dmi_decode struct

This is not needed by ARM compile so disable to remove compile error messages.

Signed-off-by: Al Stone <al.stone@linaro.org>
arm64: add dummy cpu.h

ACPI requires a cpu.h, add a dummy one copied from arm. This will need
updated or replaced as cpu hotplug for armv8 is worked out.

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
ACPI: only use PCI when it is enabled

Not all platforms with ACPI have PCI so only try and call pci based
functions when CONFIG_PCI is set.

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
ARM64: ACPI: add ACPI initialiasation for arm64

armv8 servers will use ACPI for initialisation in the same manner that
current x86/x86_64 ones do. Add the calls to initialise the ACPI tables
and load devices using the drivers/acpi subsytem.

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
ACPI: enable arm and arm64 in Kconfig/Makefile

Add Kconfig and Makefile magic to build acpi on arm and arm64 platforms.

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
Signed-off-by: Al Stone <al.stone@linaro.org>
ARM64: ACPI remove unused assembler optimisations

Modern linux systems all define ACPI_USE_NATIVE_DIVIDE as they support
64bit maths natively. So these assembly versions are never used. Remove
them to save confusion.

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
ARM64: ACPI: fix email address for Al Stone

Change to @linaro.org for Al Stone email address

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
ARM64: ACPI: move to a common platform to share with ARM

There is little difference between ARM and ARM64 initialisation code for
ACPI so move the code to common directory outside arch/* so we can share
the code between both.

New location is drivers/acpi/plat/arm.

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
ARM64: ACPI: move ACPI menu into power management menu

To match other platform ACPI option should not be top level but should
be in Power Management menu. Fix this.

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
ARM: ACPI: add arm support for ACPI using common code

Using the already committed common code previously used for 64bit arm
now add the initialisation and support files for 32bit arm.

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
Signed-off-by: Al Stone <al.stone@linaro.org>
ARM: ACPI: remove 64bit divide replace with do_div

I some situations custom 64bit by 32bit divide was giving the wrong
values so replace it with the internal kernel do_div function instead.

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
ARM:ACPI: introduce arch_fix_phys_package_id() for armv7

arch_fix_phys_package_id() will use the slot number provided
by ACPI, then we can get the right value in the "physical id"
field of /proc/cpuinfo.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
ARM:ACPI: move topology_init() to arch/arm/kernel/topology.c

move topology_init() to where it belongs.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
ARM:ACPI: introduce arch_register_cpu() and arch_unregister_cpu()

Introduce arch_register_cpu() and arch_unregister_cpu() for ACPI
processor driver.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
ARM64: ACPI: Skeleton topology.c hack to make arm64 compile

This is just a null do nothing topology.c in order to make
acpi_processor driver compile on arm64. It will need to be replaced by
fully functional driver at later date.

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>