mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-11-20 10:32:19 +00:00
Currently, the fdt_mpxy_rpmi.h has lot things which are not used by any of MPXY RPMI drivers so simplify fdt_mpxy_rpmi.h by moving such things to fdt_mpxy_rpmi.c. Signed-off-by: Anup Patel <anup.patel@oss.qualcomm.com> Reviewed-by: Pawandeep Oza <pawandeep.oza@oss.qualcomm.com> Tested-by: Pawandeep Oza <pawandeep.oza@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260923032359.4041876-7-anup.patel@oss.qualcomm.com Signed-off-by: Anup Patel <anup@brainfault.org>
58 lines
1.5 KiB
C
58 lines
1.5 KiB
C
/*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*
|
|
* Copyright (c) 2024 Ventana Micro Systems Inc.
|
|
*
|
|
* Authors:
|
|
* Anup Patel <apatel@ventanamicro.com>
|
|
*/
|
|
|
|
#ifndef __FDT_MPXY_RPMI_H__
|
|
#define __FDT_MPXY_RPMI_H__
|
|
|
|
#include <sbi_utils/mailbox/rpmi_msgprot.h>
|
|
|
|
struct mbox_chan;
|
|
struct mbox_xfer;
|
|
|
|
/** MPXY RPMI service data for each service group */
|
|
struct mpxy_rpmi_service_data {
|
|
u8 id;
|
|
u32 min_tx_len;
|
|
u32 max_tx_len;
|
|
u32 min_rx_len;
|
|
u32 max_rx_len;
|
|
};
|
|
|
|
/** MPXY RPMI data for each service group */
|
|
struct mpxy_rpmi_data {
|
|
u32 servicegrp_id;
|
|
u32 num_services;
|
|
struct mpxy_rpmi_service_data *service_data;
|
|
|
|
/** Get RPMI service group attribute */
|
|
int (*get_attribute_group)(void *context, struct mbox_chan *chan,
|
|
enum rpmi_channel_attribute_id attr_id,
|
|
u32 *out_value);
|
|
|
|
/** Transfer RPMI service group message */
|
|
int (*xfer_group)(void *context, struct mbox_chan *chan,
|
|
struct mbox_xfer *xfer);
|
|
|
|
/** Setup RPMI service group context for MPXY */
|
|
int (*setup_group)(void **context, struct mbox_chan *chan,
|
|
const struct mpxy_rpmi_data *data);
|
|
|
|
/** Cleanup RPMI service group context for MPXY */
|
|
void (*cleanup_group)(void *context);
|
|
};
|
|
|
|
/** Function to instantiate MPXY RPMI channel */
|
|
int mpxy_rpmi_no_mbox_init(const struct mpxy_rpmi_data *data, u32 mpxy_channel_id,
|
|
const char *dom_name);
|
|
|
|
/** FDT probe function to instantiate MPXY RPMI channel */
|
|
int fdt_mpxy_rpmi_init(const void *fdt, int nodeoff, const struct fdt_match *match);
|
|
|
|
#endif
|