@ -41,7 +41,7 @@ static int check_mac_ok(void)
int nodeoffset ; /* node offset from libfdt */
int nodeoffset ; /* node offset from libfdt */
int len , id , i ; /* length of the property */
int len , id , i ; /* length of the property */
u8 mac_addr [ 6 ] = { 0x00 , 0x55 , 0x7B , 0xB5 , 0x7D , 0xF7 } ; //default mac address
u8 mac_addr [ 6 ] = { 0x00 , 0x55 , 0x7B , 0xB5 , 0x7D , 0xF7 } ; //default mac address
char ethernet_name [ 2 ] [ 25 ] = { " /soc/ethernet@0x4000 0000 " , " /soc/ethernet@0x4001 0000 " } ;
char ethernet_name [ 2 ] [ 25 ] = { " /soc/ethernet@0x4004 0000 " , " /soc/ethernet@0x4005 0000 " } ;
for ( id = 0 ; id < 2 ; id + + ) {
for ( id = 0 ; id < 2 ; id + + ) {
nodeoffset = fdt_path_offset ( working_fdt , ethernet_name [ id ] ) ;
nodeoffset = fdt_path_offset ( working_fdt , ethernet_name [ id ] ) ;
@ -216,7 +216,7 @@ static int update_mac(void * ssp, int id)
int nodeoffset , len ;
int nodeoffset , len ;
void * nodep ; /* property node pointer */
void * nodep ; /* property node pointer */
u8 mac_addr [ 6 ] = { 0x00 , 0x55 , 0x7B , 0xB5 , 0x7D , 0xF7 } ; //default mac address
u8 mac_addr [ 6 ] = { 0x00 , 0x55 , 0x7B , 0xB5 , 0x7D , 0xF7 } ; //default mac address
char ethernet_name [ 2 ] [ 25 ] = { " /soc/ethernet@0x4000 0000 " , " /soc/ethernet@0x4001 0000 " } ;
char ethernet_name [ 2 ] [ 25 ] = { " /soc/ethernet@0x4004 0000 " , " /soc/ethernet@0x4005 0000 " } ;
nodeoffset = fdt_path_offset ( ssp , ethernet_name [ id ] ) ;
nodeoffset = fdt_path_offset ( ssp , ethernet_name [ id ] ) ;
if ( nodeoffset < 0 ) {
if ( nodeoffset < 0 ) {
@ -1027,7 +1027,7 @@ warning:
printf ( " set_dtb <path> <prop> [value] \n " ) ;
printf ( " set_dtb <path> <prop> [value] \n " ) ;
printf ( " eg: set_dtb /chosen bootargs \" console=ttyS0,115200 root=/dev/sda1 \" \n " ) ;
printf ( " eg: set_dtb /chosen bootargs \" console=ttyS0,115200 root=/dev/sda1 \" \n " ) ;
printf ( " eg: set_dtb /memory reg <0 0x00200000 0 0x09e00000 1 0x10000000 1 0xd0000000> \n " ) ;
printf ( " eg: set_dtb /memory reg <0 0x00200000 0 0x09e00000 1 0x10000000 1 0xd0000000> \n " ) ;
printf ( " eg: set_dtb /soc/ethernet@0x4000 0000 mac-address [80 c1 80 c1 80 c1] \n " ) ;
printf ( " eg: set_dtb /soc/ethernet@0x4004 0000 mac-address [80 c1 80 c1 80 c1] \n " ) ;
return 0 ;
return 0 ;
}
}
@ -1143,7 +1143,7 @@ int show_fdt_cmds(int argc,char **argv)
printf ( " \t set_dtb <path> <prop> [value] \n " ) ;
printf ( " \t set_dtb <path> <prop> [value] \n " ) ;
printf ( " \t eg: set_dtb /chosen bootargs \" console=ttyS0,115200 root=/dev/sda1 \" \n " ) ;
printf ( " \t eg: set_dtb /chosen bootargs \" console=ttyS0,115200 root=/dev/sda1 \" \n " ) ;
printf ( " \t eg: set_dtb /memory reg <0 0x00200000 0 0x09e00000 1 0x10000000 1 0xd0000000> \n " ) ;
printf ( " \t eg: set_dtb /memory reg <0 0x00200000 0 0x09e00000 1 0x10000000 1 0xd0000000> \n " ) ;
printf ( " \t eg: set_dtb /soc/ethernet@0x4000 0000 mac-address [80 c1 80 c1 80 c1] \n \n " ) ;
printf ( " \t eg: set_dtb /soc/ethernet@0x4004 0000 mac-address [80 c1 80 c1 80 c1] \n \n " ) ;
printf ( " print_dtb - Print dtb \n " ) ;
printf ( " print_dtb - Print dtb \n " ) ;
printf ( " \t print_dtb <path> [prop] \n " ) ;
printf ( " \t print_dtb <path> [prop] \n " ) ;