brintos

brintos / linux-shallow public Read only

0
0
Text · 980 B · f5816a3 Raw
37 lines · c
1/* SPDX-License-Identifier: GPL-2.0+ */2/*3 * AMD ACP Driver4 *5 * Copyright (C) 2021 Advanced Micro Devices, Inc. All rights reserved.6 */7 8#include "rpl_acp6x_chip_offset_byte.h"9 10#define ACP_DEVICE_ID 0x15E211#define ACP6x_PHY_BASE_ADDRESS 0x124000012 13#define ACP_SOFT_RESET_SOFTRESET_AUDDONE_MASK   0x0001000114#define ACP_PGFSM_CNTL_POWER_ON_MASK    115#define ACP_PGFSM_CNTL_POWER_OFF_MASK   016#define ACP_PGFSM_STATUS_MASK           317#define ACP_POWERED_ON                  018#define ACP_POWER_ON_IN_PROGRESS        119#define ACP_POWERED_OFF                 220#define ACP_POWER_OFF_IN_PROGRESS       321 22#define DELAY_US        523#define ACP_COUNTER     2000024 25/* time in ms for runtime suspend delay */26#define ACP_SUSPEND_DELAY_MS    200027 28static inline u32 rpl_acp_readl(void __iomem *base_addr)29{30	return readl(base_addr - ACP6x_PHY_BASE_ADDRESS);31}32 33static inline void rpl_acp_writel(u32 val, void __iomem *base_addr)34{35	writel(val, base_addr - ACP6x_PHY_BASE_ADDRESS);36}37