请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:DRA722 您好!
默认情况下,早期引导用例支持 SD 引导模式,因此我是否知道添加 QSPI 早期引导所做的更改?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好!
默认情况下,早期引导用例支持 SD 引导模式,因此我是否知道添加 QSPI 早期引导所做的更改?
您好!
将以下更改添加到 u-boot 源码、以支持 QSPI 早期启动。
@@@@-git a/common/spl/spi.c b/common/spl/spl_spi.c OLD 模式100644新模式100755索引 c826df2591..e73e53fcda -- a/common/spl/spl_spi.c ++ b/common/spl/spl/spl/spl #13、50 μ s
include #13、9 μ s
#include
#include
+#include
decl_global_data_ptr;
+u32 spl_spi_load_core (struct rproc * cfg_arg)
+{
+} struct spi_flash * flash;
+ struct rproc * cfg = cfg_arg;
+ struct image_header*头文件;
+ u32 temp_load_addr、temp_load_size;
+
调试("spl:正在加载远程核心映像%s\n"、cfg->firmware_name);
+
闪存= SPI_FLASH_PROBE (CONFIG_SF_DEFAULT_BUS、
+ CONFIG_SF_DEFAULT_CS
、+ CONFIG_SF_DEFAULT_SPEED
、+ CONFIG_SF_DEFAULT_MODE);
+ 如果(!FLASH){
+ 放置("SPI 探测器失败。\n");
+ hang();
+}
+++ if (cfg->SPI_OFFSET =0)
+ 返回1;
+
标头=(struct image_header *)(CONFIG_SYS_TEXT_base);
+
SPI_FLASH_READ (FLASH、cfg->SPI_OFFSET
、+ 128、(void *)标头);
+ if (image_get_magic (header)!= IH_magic){
+ printf ("mkimage signature not found \n");
+ 返回1;
+}
+++ temp_load_addr =(u32)(cfg->load_addr)- sizeof (struct image_headER);
+
temp_load_size = image_get_data_size (标头)+
+ sizeof (struct image_header);
+ SPI_FLASH_READ (FLASH、cfg->SPI_OFFSET
、+ temp_load_size、(void *) temp_load_addr);
+
return 0;
+}
+
#ifdef CONFIG_SPL_OS_BOOT
//
*加载内核,检查我们可以解析的有效标头,如果发现加载
diff --git a/drivers/remoteproc/DSP_rproc.c b/drivers/remoteproc/DSP_r644.c
old mode 100proc
new mode 100e157e1572
、dsp+ dsp/remote8+dsp/rproc
= dsp/remote5675+ dsp/rproc @@@@ dsp_rproc
.start_core = DSP_start_core、
CONFIG_MMU = DSP_CONFIG_MMU、
config_peripherals = dsp1_config_peripherals、
- .intmem_TO_L3_MAPPING =&dsp1_intmem_TO_L3_MAPPING
+ .intmem_TO_L3_MAPPING =&dsp1_intmem_TO_L3_MAPPING、
+ .spi_offset = configs_SYS_SPI_DSP1_offs
};
struct rproc dsp2_config ={
@@-578,7+579,8 @@ struct rproc dsp2_config ={
.start_core = DSP_start_core、
CONFIG_MMU = DSP_CONFIG_MMU、
config_peripherals = dsp2_config_peripherals、
- .intmem_TO_L3_MAPPING =&dsp2_intmem_TO_L3_MAPPING
+ .intmem_TO_L3_MAPPING =&dsp2_intmem_TO_L3_MAPPING
、+ .spi_offset = configs_SYS_SPI_DSP2_offs
};
struct rproc * dsp_rproc_cfg_arr[RPROC_END_ENums]=
@@-708、6 +710、24 @@ static int dsp_probe (struct udevice * dev)
cfg = dsp_rproc_cfg_arr[dsp -> id];
loadaddr = cfg->load_addr;
+
#ifdef CONFIG_SPL_Build
+ if (boot_device_SPI = spl_boot_device ()
)+ {
+ RET = spl_spi_load_core (cfg);
+ if (ret){
+ dev_err (dev、"固件%s 加载失败\n"、cfg->firmware_name);
+}
+ 否则
+ {
+ init_list_head (&DSP->映射);
+ RET = spl_pre_boot_dsp_core (dev、dsp->id);
+}
+ 返回转台
;+}
++#endif
+
size = load_firmware (cfg->firmware_name、loadaddr);
如果(!size){
DEV_ERR (dev、"固件加载失败\n");
diff -git a/drivers/remoteproc/ipu_rproc.c b/drivers/structeproc/ipu_rproc.c
INDEX 963897018b.8a174447e4 100644
-- a/drivers/remoteproc/ipu_rproc.c INDEX
@@ 963897018b.8a174447e4e4 100644-r5+ ripu_rproc/remote_drivers/rproc.c =+ r525、rt/r5pu_rproc.c @@+ r5+ r5+ rtub+ r5
firmware_name ="dra7-ipu1-fw.lzop"、
CONFIG_MMU = IPU_CONFIG_MMU、
config_peripherals = ipu1_config_peripherals、
- .intmem_TO_L3_MAPPING =&ipu1_intmem_TO_L3_MAPPING
+ .intmem_TO_L3_MAPPING =&ipu1_intmem_TO_L3_MAPPING
、+ .spi_offset = configs_SYS_SPI_IPU1_offs
};
struct rproc ipu2_config ={
@@-539,7 +540,8 @@ struct rproc ipu2_config ={
firmware_name ="dra7-ipu2-fw.lzop"、
CONFIG_MMU = IPU_CONFIG_MMU、
config_peripherals = ipu2_config_peripherals、
- .intmem_TO_L3_MAPPING =&ipu2_intmem_TO_L3_MAPPING
+ .intmem_TO_L3_MAPPING =&ipu2_intmem_TO_L3_MAPPING
、+ .spi_offset = configs_SYS_SPI_IPU2_offs
};
struct rproc * rproc_cfg_arr[2]=
@@-69912 +701,29 @@ static int IPU_probe (struct udevice * dev)
cfg = rproc_cfg_arr[priv->id];
loadaddr = cfg->load_addr;
+
#ifdef CONFIG_SPL_Build
+ if (boot_device_SPI = spl_boot_device ()
)+ {
+ RET = spl_spi_load_core (cfg);
+ if (ret){
+ dev_err (dev、"固件%s 加载失败\n"、cfg->firmware_name);
+}
+ 否则
+ {
+ init_list_head (&priv->mapping);
+ RET = spl_pre_boot_core (dev、priv->id);
+}
+ 返回转台
;+}
++#endif
+
size = load_firmware (cfg->firmware_name、loadaddr);
如果(!size){
DEV_ERR (dev、"固件加载失败\n");
返回-EINVAL;
}
-
init_list_head (&priv->mapping);
RET = spl_pre_boot_core (dev、priv->id);
diff -git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 51dcae3d29..8ac8b312b9 100644
-- a/include/configs/dra7xx_evm.h
++ b/include/configs/dra7xx_evm.h index
@@@@ 5ca_core_configs/#85,6_define #8ac8_core_configs_c在内
核#85,284 0x1E0000
#define CONFIG_SYS_SPI_args_偏移 0x140000
#define CONFIG_SYS_SPI_args_size 0x80000
+
+#define CONFIGS_SYS_SPI_kernel_size 0x800000
+#define CONFIGS_SYS_SPI_LOG_FUSS (configs_SYS_SPI_kernel_size +\
+ (0x1E0000)
)+#define CONFIGS_SYS_SPI_LOG_SIZE 0x80000
+#define CONFIGS_SYS_SPI_RPROC_BIN_F偏移(CONFIGS_SYS_SPI_LOG_FLOGO +\
+ CONFIGS_SYS_SPI_LOGO)
+
#define CONFIGS_SYS_SPI_RPROC_BIM_SIZE 0x1000000
+#define CONFIGS_SYS_SPI_IPU1_BIT_SIZE 0x400000
+#define CONFIGS_SYS_SPI_IPU2_BIN_SIZE 0x400000
+ CONFIGS_SYS_SPI_BIT_SION_SIT_SIZE 0x400000
+ CONFIG_SIT_BIT_BIT_BIT_BINDS_SIT_SIT_SION_SIT_SIZE 0x400000 + CONFIG_CONFIG_CONFIG_CONFIG_SIT_CONFIG_SIT_SIT_SIT_SIT_SIT_SI (CONFIGS_SYS_SPI_RPROC_BIN_OUS)
+#define CONFIGS_SYS_SPI_IPU2_OUS (CONFIGS_SYS_SPI_IPU1_FLUs +\
+ CONFIGS_SYS_SPI_IPU1_BIM_SIZE)
+#define CONFIGS_SYS_SPI_DSP1_FLUS (CONFIGS_SYS_SPI_IPU2_OUS +\
+ CONFIGS_SYS_SPI_IPU2_BIM_SIZE)
+#define CONFIGS_SYS_SPI_DSP2_FLUS (CONFIGS_SYS_SPI_DSP1_Fs +\
+ CONFIGS_SYS_SPI_DSP1_BIN_SIZE)
+
++#if defined (CONFIG_QSPI_BOOT)
#define CONFIG_SYS_REDUNDAND_environment
#define CONFIG_ENV_SPI_MAX_Hz CONFIG_SF_DEFAULT_SPEED
DIFF --git a/include/remoteproc.h b/include/remoteproc.h
旧模式100644
新模式100755
索引4193618d5f.d7a7a7649c86
-- a/include/remoteproc.h
++ b/include/remoteproc.h
@@-415、6 +415、7 @@ struct rproc{
struct rproc_intmem_TO_L3_MAPPING * intmem_TO_L3_MAPPING;
u32 TRACE_PA;
u32 trace_len;
+ u32 spi_offset;
};
extern struct rproc * rproc_cfg_arr[2];
diff -git a/include/spl.h b/include/spl.h
index fcbbbb6035fe.faaef30fdf 100644
-- ainclude/spl.h
++ b/include/spl.h
@@-12、6 + 12、7 @@
include
#include
#include
+#include
r0中的/*值表示我们从 U-Boot 引导*/
#define uBoot_NOT_LOADD_FROM SPL 0x13578642
@@-399,6 +400、8 @@ int spl_spi_load (struct spl_image_info * spl_image、
unsigned int n脱落_override、
void * buffer);
+u32 spl_spi_load_core (struct rproc * cfg_arg);
+
/**
* spl_invoke_ATF -使用 ARM 可信固件映像进行引导
*/
请参考以下主题、将映像刷写到 QSPI 存储器中。
谢谢
加维拉尤