#include <linux/arm-smccc.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/nvmem-provider.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/tee_drv.h>
#include "stm32-bsec-optee-ta.h"
#define STM32_SMC_BSEC …
#define STM32_SMC_READ_SHADOW …
#define STM32_SMC_PROG_OTP …
#define STM32_SMC_WRITE_SHADOW …
#define STM32_SMC_READ_OTP …
#define STM32MP15_BSEC_DATA0 …
struct stm32_romem_cfg { … };
struct stm32_romem_priv { … };
static int stm32_romem_read(void *context, unsigned int offset, void *buf,
size_t bytes)
{ … }
static int stm32_bsec_smc(u8 op, u32 otp, u32 data, u32 *result)
{ … }
static int stm32_bsec_read(void *context, unsigned int offset, void *buf,
size_t bytes)
{ … }
static int stm32_bsec_write(void *context, unsigned int offset, void *buf,
size_t bytes)
{ … }
static int stm32_bsec_pta_read(void *context, unsigned int offset, void *buf,
size_t bytes)
{ … }
static int stm32_bsec_pta_write(void *context, unsigned int offset, void *buf,
size_t bytes)
{ … }
static bool stm32_bsec_smc_check(void)
{ … }
static bool optee_presence_check(void)
{ … }
static int stm32_romem_probe(struct platform_device *pdev)
{ … }
static const struct stm32_romem_cfg stm32mp15_bsec_cfg = …;
static const struct stm32_romem_cfg stm32mp13_bsec_cfg = …;
static const struct stm32_romem_cfg stm32mp25_bsec_cfg = …;
static const struct of_device_id stm32_romem_of_match[] __maybe_unused = …;
MODULE_DEVICE_TABLE(of, stm32_romem_of_match);
static struct platform_driver stm32_romem_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS(…) …;
MODULE_LICENSE(…) …;