linux/drivers/remoteproc/stm32_rproc.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) STMicroelectronics 2018 - All Rights Reserved
 * Authors: Ludovic Barre <[email protected]> for STMicroelectronics.
 *          Fabien Dessenne <[email protected]> for STMicroelectronics.
 */

#include <linux/arm-smccc.h>
#include <linux/dma-mapping.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/mailbox_client.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_reserved_mem.h>
#include <linux/platform_device.h>
#include <linux/pm_wakeirq.h>
#include <linux/regmap.h>
#include <linux/remoteproc.h>
#include <linux/reset.h>
#include <linux/slab.h>
#include <linux/workqueue.h>

#include "remoteproc_internal.h"

#define HOLD_BOOT
#define RELEASE_BOOT

#define MBOX_NB_VQ
#define MBOX_NB_MBX

#define STM32_SMC_RCC
#define STM32_SMC_REG_WRITE

#define STM32_MBX_VQ0
#define STM32_MBX_VQ0_ID
#define STM32_MBX_VQ1
#define STM32_MBX_VQ1_ID
#define STM32_MBX_SHUTDOWN
#define STM32_MBX_DETACH

#define RSC_TBL_SIZE

#define M4_STATE_OFF
#define M4_STATE_INI
#define M4_STATE_CRUN
#define M4_STATE_CSTOP
#define M4_STATE_STANDBY
#define M4_STATE_CRASH

struct stm32_syscon {};

struct stm32_rproc_mem {};

struct stm32_rproc_mem_ranges {};

struct stm32_mbox {};

struct stm32_rproc {};

static int stm32_rproc_pa_to_da(struct rproc *rproc, phys_addr_t pa, u64 *da)
{}

static int stm32_rproc_mem_alloc(struct rproc *rproc,
				 struct rproc_mem_entry *mem)
{}

static int stm32_rproc_mem_release(struct rproc *rproc,
				   struct rproc_mem_entry *mem)
{}

static int stm32_rproc_of_memory_translations(struct platform_device *pdev,
					      struct stm32_rproc *ddata)
{}

static int stm32_rproc_mbox_idx(struct rproc *rproc, const unsigned char *name)
{}

static int stm32_rproc_prepare(struct rproc *rproc)
{}

static int stm32_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw)
{}

static irqreturn_t stm32_rproc_wdg(int irq, void *data)
{}

static void stm32_rproc_mb_vq_work(struct work_struct *work)
{}

static void stm32_rproc_mb_callback(struct mbox_client *cl, void *data)
{}

static void stm32_rproc_free_mbox(struct rproc *rproc)
{}

static const struct stm32_mbox stm32_rproc_mbox[MBOX_NB_MBX] =;

static int stm32_rproc_request_mbox(struct rproc *rproc)
{}

static int stm32_rproc_set_hold_boot(struct rproc *rproc, bool hold)
{}

static void stm32_rproc_add_coredump_trace(struct rproc *rproc)
{}

static int stm32_rproc_start(struct rproc *rproc)
{}

static int stm32_rproc_attach(struct rproc *rproc)
{}

static int stm32_rproc_detach(struct rproc *rproc)
{}

static int stm32_rproc_stop(struct rproc *rproc)
{}

static void stm32_rproc_kick(struct rproc *rproc, int vqid)
{}

static int stm32_rproc_da_to_pa(struct rproc *rproc,
				u64 da, phys_addr_t *pa)
{}

static struct resource_table *
stm32_rproc_get_loaded_rsc_table(struct rproc *rproc, size_t *table_sz)
{}

static const struct rproc_ops st_rproc_ops =;

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

static int stm32_rproc_get_syscon(struct device_node *np, const char *prop,
				  struct stm32_syscon *syscon)
{}

static int stm32_rproc_parse_dt(struct platform_device *pdev,
				struct stm32_rproc *ddata, bool *auto_boot)
{}

static int stm32_rproc_get_m4_status(struct stm32_rproc *ddata,
				     unsigned int *state)
{}

static int stm32_rproc_probe(struct platform_device *pdev)
{}

static void stm32_rproc_remove(struct platform_device *pdev)
{}

static int stm32_rproc_suspend(struct device *dev)
{}

static int stm32_rproc_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(stm32_rproc_pm_ops,
				stm32_rproc_suspend, stm32_rproc_resume);

static struct platform_driver stm32_rproc_driver =;
module_platform_driver();

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