mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-13 20:36:02 +01:00
remoteproc: Clean up some junk
Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
parent
ce3a98ed92
commit
86fff09443
@ -20,7 +20,6 @@ static int print_remoteproc_list(void)
|
||||
struct udevice *dev;
|
||||
struct uclass *uc;
|
||||
int ret;
|
||||
char *type;
|
||||
|
||||
ret = uclass_get(UCLASS_REMOTEPROC, &uc);
|
||||
if (ret) {
|
||||
@ -38,18 +37,9 @@ static int print_remoteproc_list(void)
|
||||
if (!(dev_get_flags(dev) & DM_FLAG_ACTIVATED))
|
||||
continue;
|
||||
|
||||
switch (uc_pdata->mem_type) {
|
||||
case RPROC_INTERNAL_MEMORY_MAPPED:
|
||||
type = "internal memory mapped";
|
||||
break;
|
||||
default:
|
||||
type = "unknown";
|
||||
break;
|
||||
}
|
||||
printf("%d - Name:'%s' type:'%s' supports: %s%s%s%s%s%s\n",
|
||||
printf("%d - Name:'%s' supports: %s%s%s%s%s%s\n",
|
||||
dev_seq(dev),
|
||||
uc_pdata->name,
|
||||
type,
|
||||
ops->load ? "load " : "",
|
||||
ops->start ? "start " : "",
|
||||
ops->stop ? "stop " : "",
|
||||
|
@ -106,36 +106,6 @@ provide a load and start function. We assume here that the device
|
||||
needs to be loaded and started, else, there is no real purpose of
|
||||
using the remoteproc framework.
|
||||
|
||||
Describing the device using platform data
|
||||
-----------------------------------------
|
||||
|
||||
*IMPORTANT* NOTE: THIS SUPPORT IS NOT MEANT FOR USE WITH NEWER PLATFORM
|
||||
SUPPORT. THIS IS ONLY FOR LEGACY DEVICES. THIS MODE OF INITIALIZATION
|
||||
*WILL* BE EVENTUALLY REMOVED ONCE ALL NECESSARY PLATFORMS HAVE MOVED
|
||||
TO DM/FDT.
|
||||
|
||||
Considering that many platforms are yet to move to device-tree model,
|
||||
a simplified definition of a device is as follows:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
struct dm_rproc_uclass_pdata proc_3_test = {
|
||||
.name = "proc_3_legacy",
|
||||
.mem_type = RPROC_INTERNAL_MEMORY_MAPPED,
|
||||
.driver_plat_data = &mydriver_data;
|
||||
};
|
||||
|
||||
U_BOOT_DRVINFO(proc_3_demo) = {
|
||||
.name = "sandbox_test_proc",
|
||||
.plat = &proc_3_test,
|
||||
};
|
||||
|
||||
There can be additional data that may be desired depending on the
|
||||
remoteproc driver specific needs (for example: SoC integration
|
||||
details such as clock handle or something similar). See appropriate
|
||||
documentation for specific remoteproc driver for further details.
|
||||
These are passed via driver_plat_data.
|
||||
|
||||
Describing the device using device tree
|
||||
---------------------------------------
|
||||
|
||||
|
@ -145,6 +145,8 @@ unsigned long mem_count;
|
||||
unsigned int pgtable_l2_map[MAX_NUM_L2_PAGE_TABLES];
|
||||
unsigned int pgtable_l2_cnt;
|
||||
|
||||
static struct rproc *rproc_cfg_arr[2];
|
||||
|
||||
void *ipu_alloc_mem(struct udevice *dev, unsigned long len, unsigned long align)
|
||||
{
|
||||
unsigned long mask;
|
||||
@ -597,7 +599,7 @@ struct rproc ipu2_config = {
|
||||
.intmem_to_l3_mapping = &ipu2_intmem_to_l3_mapping
|
||||
};
|
||||
|
||||
struct rproc *rproc_cfg_arr[2] = {
|
||||
static struct rproc *rproc_cfg_arr[2] = {
|
||||
[IPU2] = &ipu2_config,
|
||||
[IPU1] = &ipu1_config,
|
||||
};
|
||||
|
@ -131,32 +131,9 @@ static int rproc_pre_probe(struct udevice *dev)
|
||||
|
||||
/* See if we need to populate via fdt */
|
||||
|
||||
if (!dev_get_plat(dev)) {
|
||||
#if CONFIG_IS_ENABLED(OF_CONTROL)
|
||||
bool tmp;
|
||||
debug("'%s': using fdt\n", dev->name);
|
||||
if (dev_has_ofnode(dev))
|
||||
uc_pdata->name = dev_read_string(dev, "remoteproc-name");
|
||||
|
||||
/* Default is internal memory mapped */
|
||||
uc_pdata->mem_type = RPROC_INTERNAL_MEMORY_MAPPED;
|
||||
tmp = dev_read_bool(dev, "remoteproc-internal-memory-mapped");
|
||||
if (tmp)
|
||||
uc_pdata->mem_type = RPROC_INTERNAL_MEMORY_MAPPED;
|
||||
#else
|
||||
/* Nothing much we can do about this, can we? */
|
||||
return -EINVAL;
|
||||
#endif
|
||||
|
||||
} else {
|
||||
struct dm_rproc_uclass_pdata *pdata = dev_get_plat(dev);
|
||||
|
||||
debug("'%s': using legacy data\n", dev->name);
|
||||
if (pdata->name)
|
||||
uc_pdata->name = pdata->name;
|
||||
uc_pdata->mem_type = pdata->mem_type;
|
||||
uc_pdata->driver_plat_data = pdata->driver_plat_data;
|
||||
}
|
||||
|
||||
/* Else try using device Name */
|
||||
if (!uc_pdata->name)
|
||||
uc_pdata->name = dev->name;
|
||||
|
@ -383,20 +383,6 @@ struct rproc {
|
||||
u32 trace_len;
|
||||
};
|
||||
|
||||
extern struct rproc *rproc_cfg_arr[2];
|
||||
/**
|
||||
* enum rproc_mem_type - What type of memory model does the rproc use
|
||||
* @RPROC_INTERNAL_MEMORY_MAPPED: Remote processor uses own memory and is memory
|
||||
* mapped to the host processor over an address range.
|
||||
*
|
||||
* Please note that this is an enumeration of memory model of different types
|
||||
* of remote processors. Few of the remote processors do have own internal
|
||||
* memories, while others use external memory for instruction and data.
|
||||
*/
|
||||
enum rproc_mem_type {
|
||||
RPROC_INTERNAL_MEMORY_MAPPED = 0,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dm_rproc_uclass_pdata - platform data for a CPU
|
||||
* @name: Platform-specific way of naming the Remote proc
|
||||
@ -409,8 +395,6 @@ enum rproc_mem_type {
|
||||
*/
|
||||
struct dm_rproc_uclass_pdata {
|
||||
const char *name;
|
||||
enum rproc_mem_type mem_type;
|
||||
void *driver_plat_data;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user