Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b4e2fa4 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branch 'acpi-lpss' into acpi-cleanup

The following commits depend on the 'acpi-lpss' material.
parents 64e94e7e e375325c
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -52,10 +52,6 @@

/* Asm macros */

#define ACPI_ASM_MACROS
#define BREAKPOINT3
#define ACPI_DISABLE_IRQS() local_irq_disable()
#define ACPI_ENABLE_IRQS()  local_irq_enable()
#define ACPI_FLUSH_CPU_CACHE()

static inline int
+10 −0
Original line number Diff line number Diff line
@@ -454,6 +454,16 @@ config X86_MDFLD

endif

config X86_INTEL_LPSS
	bool "Intel Low Power Subsystem Support"
	depends on ACPI
	select COMMON_CLK
	---help---
	  Select to build support for Intel Low Power Subsystem such as
	  found on Intel Lynxpoint PCH. Selecting this option enables
	  things like clock tree (common clock framework) which are needed
	  by the LPSS peripheral drivers.

config X86_RDC321X
	bool "RDC R-321x SoC"
	depends on X86_32
+0 −4
Original line number Diff line number Diff line
@@ -49,10 +49,6 @@

/* Asm macros */

#define ACPI_ASM_MACROS
#define BREAKPOINT3
#define ACPI_DISABLE_IRQS() local_irq_disable()
#define ACPI_ENABLE_IRQS()  local_irq_enable()
#define ACPI_FLUSH_CPU_CACHE()	wbinvd()

int __acpi_acquire_global_lock(unsigned int *lock);
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ acpi-y += processor_core.o
acpi-y				+= ec.o
acpi-$(CONFIG_ACPI_DOCK)	+= dock.o
acpi-y				+= pci_root.o pci_link.o pci_irq.o
acpi-y				+= csrt.o
acpi-y				+= acpi_platform.o
acpi-y				+= power.o
acpi-y				+= event.o
+25 −2
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@

#include <linux/acpi.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
@@ -21,17 +22,34 @@

ACPI_MODULE_NAME("platform");

static int acpi_create_platform_clks(struct acpi_device *adev)
{
	static struct platform_device *pdev;

	/* Create Lynxpoint LPSS clocks */
	if (!pdev && !strncmp(acpi_device_hid(adev), "INT33C", 6)) {
		pdev = platform_device_register_simple("clk-lpt", -1, NULL, 0);
		if (IS_ERR(pdev))
			return PTR_ERR(pdev);
	}

	return 0;
}

/**
 * acpi_create_platform_device - Create platform device for ACPI device node
 * @adev: ACPI device node to create a platform device for.
 * @flags: ACPI_PLATFORM_* flags that affect the creation of the platform
 *	   devices.
 *
 * Check if the given @adev can be represented as a platform device and, if
 * that's the case, create and register a platform device, populate its common
 * resources and returns a pointer to it.  Otherwise, return %NULL.
 *
 * The platform device's name will be taken from the @adev's _HID and _UID.
 * Name of the platform device will be the same as @adev's.
 */
struct platform_device *acpi_create_platform_device(struct acpi_device *adev)
struct platform_device *acpi_create_platform_device(struct acpi_device *adev,
						    unsigned long flags)
{
	struct platform_device *pdev = NULL;
	struct acpi_device *acpi_parent;
@@ -41,6 +59,11 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev)
	struct resource *resources;
	int count;

	if ((flags & ACPI_PLATFORM_CLK) && acpi_create_platform_clks(adev)) {
		dev_err(&adev->dev, "failed to create clocks\n");
		return NULL;
	}

	/* If the ACPI node already has a physical device attached, skip it. */
	if (adev->physical_node_count)
		return NULL;
Loading