linux/drivers/acpi/acpi_apd.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * AMD ACPI support for ACPI2platform device.
 *
 * Copyright (c) 2014,2015 AMD Corporation.
 * Authors: Ken Xue <[email protected]>
 *	Wu, Jeff <[email protected]>
 */

#include <linux/acpi.h>
#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/platform_data/clk-fch.h>
#include <linux/platform_device.h>

#include "internal.h"

struct apd_private_data;

/**
 * struct apd_device_desc - a descriptor for apd device
 * @fixed_clk_rate: fixed rate input clock source for acpi device;
 *			0 means no fixed rate input clock source
 * @properties: build-in properties of the device such as UART
 * @setup: a hook routine to set device resource during create platform device
 *
 * Device description defined as acpi_device_id.driver_data
 */
struct apd_device_desc {};

struct apd_private_data {};

#if defined(CONFIG_X86_AMD_PLATFORM_DEVICE) || defined(CONFIG_ARM64)
#define APD_ADDR(desc)

static int acpi_apd_setup(struct apd_private_data *pdata)
{}

#ifdef CONFIG_X86_AMD_PLATFORM_DEVICE

static int fch_misc_setup(struct apd_private_data *pdata)
{}

static const struct apd_device_desc cz_i2c_desc =;

static const struct apd_device_desc wt_i2c_desc =;

static const struct apd_device_desc wt_i3c_desc =;

static struct property_entry uart_properties[] =;

static const struct apd_device_desc cz_uart_desc =;

static const struct apd_device_desc fch_misc_desc =;
#endif /* CONFIG_X86_AMD_PLATFORM_DEVICE */

#ifdef CONFIG_ARM64
static const struct apd_device_desc xgene_i2c_desc = {
	.setup = acpi_apd_setup,
	.fixed_clk_rate = 100000000,
};

static const struct apd_device_desc vulcan_spi_desc = {
	.setup = acpi_apd_setup,
	.fixed_clk_rate = 133000000,
};

static const struct apd_device_desc hip07_i2c_desc = {
	.setup = acpi_apd_setup,
	.fixed_clk_rate = 200000000,
};

static const struct apd_device_desc hip08_i2c_desc = {
	.setup = acpi_apd_setup,
	.fixed_clk_rate = 250000000,
};

static const struct apd_device_desc hip08_lite_i2c_desc = {
	.setup = acpi_apd_setup,
	.fixed_clk_rate = 125000000,
};

static const struct apd_device_desc thunderx2_i2c_desc = {
	.setup = acpi_apd_setup,
	.fixed_clk_rate = 125000000,
};

static const struct apd_device_desc nxp_i2c_desc = {
	.setup = acpi_apd_setup,
	.fixed_clk_rate = 350000000,
};

static const struct apd_device_desc hip08_spi_desc = {
	.setup = acpi_apd_setup,
	.fixed_clk_rate = 250000000,
};
#endif /* CONFIG_ARM64 */

#endif

/*
 * Create platform device during acpi scan attach handle.
 * Return value > 0 on success of creating device.
 */
static int acpi_apd_create_device(struct acpi_device *adev,
				   const struct acpi_device_id *id)
{}

static const struct acpi_device_id acpi_apd_device_ids[] =;

static struct acpi_scan_handler apd_handler =;

void __init acpi_apd_init(void)
{}