uclinux-2008R1-RC8(bf561)到VDSP5的移植(9):bf53x_relocate_l1_mem

 
  
在uclinux初始化的时候有一段代码:
       /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */
       call _bf53x_relocate_l1_mem;
bf53x_relocate_l1_mem这个函数的实现在arch/blackfin/kernel/setup.c中,其作用是将设置SDRAM和PLL的代码从SDRAM或者Flash复制到L1中,如下所示:
 
void __init bf53x_relocate_l1_mem(void)
{
     unsigned long l1_code_length;
     unsigned long l1_data_a_length;
     unsigned long l1_data_b_length;
 
     l1_code_length = _etext_l1 - _stext_l1;
     if (l1_code_length > L1_CODE_LENGTH)
         l1_code_length = L1_CODE_LENGTH;
     /* cannot complain as printk is not available as yet.
      * But we can continue booting and complain later!
      */
 
     /* Copy _stext_l1 to _etext_l1 to L1 instruction SRAM */
     dma_memcpy(_stext_l1, _l1_lma_start, l1_code_length);
 
     l1_data_a_length = _ebss_l1 - _sdata_l1;
     if (l1_data_a_length > L1_DATA_A_LENGTH)
         l1_data_a_length = L1_DATA_A_LENGTH;
 
     /* Copy _sdata_l1 to _ebss_l1 to L1 data bank A SRAM */
     dma_memcpy(_sdata_l1, _l1_lma_start + l1_code_length, l1_data_a_length);
 
     l1_data_b_length = _ebss_b_l1 - _sdata_b_l1;
     if (l1_data_b_length > L1_DATA_B_LENGTH)
         l1_data_b_length = L1_DATA_B_LENGTH;
 
     /* Copy _sdata_b_l1 to _ebss_b_l1 to L1 data bank B SRAM */
     dma_memcpy(_sdata_b_l1, _l1_lma_start + l1_code_length +
              l1_data_a_length, l1_data_b_length);
 
}
 
但是由于我使用了方式1进行启动,且在LDF文件中直接将这部分代码放在了L1中,因此并不需要再复制一次,所以直接注释掉这行语句,即不调用bf53x_relocate_l1_mem这个函数。
阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lights_joy/article/details/2350511
文章标签: flash
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭