arm-trusted-firmware/plat/qti/common/inc/spmi_arb.h
Julius Werner f40008a4be qti: Add SPMI PMIC arbitrator driver
This patch adds a very rudimentary driver for the SPMI arbitrator used
to access the PMIC. It doesn't support all the controller's actual
arbitration features, so it should probably not be used concurrently
with a running kernel (and it's also not optimized for performance). But
it can be used to set a few registers during boot or on shutdown to
control reset handling, which is all we need it for.

Change-Id: I8631c34a2a89ac71aa1ec9b8266e818c922fe34a
Signed-off-by: Julius Werner <jwerner@chromium.org>
2020-08-24 18:38:47 -07:00

23 lines
711 B
C

/*
* Copyright (c) 2020, Google LLC. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef SPMI_ARB_H
#define SPMI_ARB_H
#include <stdint.h>
/*******************************************************************************
* WARNING: This driver does not arbitrate access with the kernel. These APIs
* must only be called when the kernel is known to be quiesced (such as before
* boot or while the system is shutting down).
******************************************************************************/
/* 32-bit addresses combine (U)SID, PID and register address. */
int spmi_arb_read8(uint32_t addr);
int spmi_arb_write8(uint32_t addr, uint8_t data);
#endif /* SPMI_ARB_H */