DM368 IPNC uboot代码

由于sd卡启动报错“NOT PHY DETECT!!!”,所以尝试编译uboot

http://blog.sina.com.cn/s/blog_5e330a280100oowk.html

I have been using DVSDK2.0 that comes with  DM365IPNC for a while, I even spent some time to add MMC/SD boot support myself. But it's time to move on to newer development kit.

1. Download DVSDK4.01 for DM365EVM

2. For uboot to work on IPNC you need to change:
2.1 include/configs/davinci_dm365evm.h, change serial output to port 1:
#define CONFIG_SYS_NS16550_COM2        0x01d06000
#define CONFIG_CONS_INDEX        2
#define CONFIG_SYS_NS16550_CLK        121500000
2.2 After recompiling uboot, you might be puzzled by the scrambled output. It looks like baudrate error. If you spend a couple of days digging into the source code,eventually you will find a bug in include/ns16650.h
change to #define dll msr
change to #define dlm spr
Now after recompiling, the uboot got output on serial console!
2.3 Then you will find out your network doesn't work, because the PHY is not detected.
include/configs/davinci_dm365evm.h, change
#define CONFIG_EMAC_MDIO_PHY_NUM   1

3. Modify the kernel source
That's also related to changing serial port from 0 to 1
3.1 arch/arm/mach-davinci/include/mach/serial.h change uart1 base address to
#define DAVINCI_UART1_BASE (IO_PHYS + 0x106000)
3.2 arch/arm/mach-davinci/dm365.c
MUX_CFG(DM365,    UART1_RXD,    4,   14,    3,    3,     false)
MUX_CFG(DM365,    UART1_TXD,    3,   29,    3,    3,     false)
3.3 arch/arm/mach-davinci/board-dm365-evm.c
in function dm365_evm_init()
change: .enabled_uarts = (1 << 1),
comment out dm365_init_spi0() function call, since on IPNC spi0 is muxed with UART1.
3.4 arch/arm/mach-davinci/common.c
add support of reading MAC from bootargs:

static int davinci_get_mac_addr_from_bootargs(char *str)
{
       int temp[6],i;     
       unsigned char *mac_addr = davinci_soc_info.emac_pdata->mac_addr;
     
       printk("TI DaVinci EMAC: kernel boot params Ethernet address: %s\n",str+1);
  sscanf(str+1,"x:x:x:x:x:x",&temp[0],&temp[1],&temp[2],&temp[3],&temp[4],&temp[5]);
       for(i=0;i<6;i++) mac_addr[i]=temp[i];
       return 1;
}
__setup("eth", davinci_get_mac_addr_from_bootargs);

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值