linux/drivers/bus/stm32_rifsc.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2023, STMicroelectronics - All Rights Reserved
 */

#include <linux/bitfield.h>
#include <linux/bits.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/types.h>

#include "stm32_firewall.h"

/*
 * RIFSC offset register
 */
#define RIFSC_RISC_SECCFGR0
#define RIFSC_RISC_PRIVCFGR0
#define RIFSC_RISC_PER0_CIDCFGR
#define RIFSC_RISC_PER0_SEMCR
#define RIFSC_RISC_HWCFGR2

/*
 * SEMCR register
 */
#define SEMCR_MUTEX

/*
 * HWCFGR2 register
 */
#define HWCFGR2_CONF1_MASK
#define HWCFGR2_CONF2_MASK
#define HWCFGR2_CONF3_MASK

/*
 * RIFSC miscellaneous
 */
#define RIFSC_RISC_CFEN_MASK
#define RIFSC_RISC_SEM_EN_MASK
#define RIFSC_RISC_SCID_MASK
#define RIFSC_RISC_SEML_SHIFT
#define RIFSC_RISC_SEMWL_MASK
#define RIFSC_RISC_PER_ID_MASK

#define RIFSC_RISC_PERx_CID_MASK

#define IDS_PER_RISC_SEC_PRIV_REGS

/* RIF miscellaneous */
/*
 * CIDCFGR register fields
 */
#define CIDCFGR_CFEN
#define CIDCFGR_SEMEN
#define CIDCFGR_SEMWL(x)

#define SEMWL_SHIFT

/* Compartiment IDs */
#define RIF_CID0
#define RIF_CID1

static bool stm32_rifsc_is_semaphore_available(void __iomem *addr)
{}

static int stm32_rif_acquire_semaphore(struct stm32_firewall_controller *stm32_firewall_controller,
				       int id)
{}

static void stm32_rif_release_semaphore(struct stm32_firewall_controller *stm32_firewall_controller,
					int id)
{}

static int stm32_rifsc_grant_access(struct stm32_firewall_controller *ctrl, u32 firewall_id)
{}

static void stm32_rifsc_release_access(struct stm32_firewall_controller *ctrl, u32 firewall_id)
{}

static int stm32_rifsc_probe(struct platform_device *pdev)
{}

static const struct of_device_id stm32_rifsc_of_match[] =;
MODULE_DEVICE_TABLE(of, stm32_rifsc_of_match);

static struct platform_driver stm32_rifsc_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();