• Home
  • Raw
  • Download

Lines Matching refs:smac

34 #define FIRM_ADDR1 (0x200 - sizeof(smac))
35 #define FIRM_ADDR2 (0x400 - sizeof(smac))
36 #define FIRM_ADDR3 (CONFIG_ENV_SECT_SIZE + 0x200 - sizeof(smac))
37 #define FIRM_ADDR4 (CONFIG_ENV_SECT_SIZE + 0x400 - sizeof(smac))
40 char smac[4][18]; variable
70 strcpy(smac[3], argv[1]); in set_arc_product()
71 strcpy(smac[2], argv[2]); in set_arc_product()
72 strcpy(smac[1], argv[3]); in set_arc_product()
73 strcpy(smac[0], argv[4]); in set_arc_product()
82 if (spi_flash_write(flash, FIRM_ADDR1, sizeof(smac), smac)) { in set_arc_product()
86 if (spi_flash_write(flash, FIRM_ADDR2, sizeof(smac), smac)) { in set_arc_product()
91 if (spi_flash_write(flash, FIRM_ADDR3, sizeof(smac), smac)) { in set_arc_product()
96 if (spi_flash_write(flash, FIRM_ADDR4, sizeof(smac), smac)) { in set_arc_product()
117 if (spi_flash_read(flash, FIRM_ADDR1, sizeof(smac), smac)) { in get_arc_info()
119 if (spi_flash_read(flash, FIRM_ADDR2, sizeof(smac), smac)) { in get_arc_info()
121 if (spi_flash_read(flash, FIRM_ADDR3, sizeof(smac), in get_arc_info()
122 smac)) { in get_arc_info()
125 sizeof(smac), smac)) { in get_arc_info()
132 if (smac[3][0] != 0) { in get_arc_info()
136 if (smac[3][0] == 0xFF) { in get_arc_info()
139 printf("\t%s\n", smac[3]); in get_arc_info()
140 env_set("SERIAL", smac[3]); in get_arc_info()
144 if (strcmp(smac[2], "00:00:00:00:00:00") == 0) in get_arc_info()
148 if (smac[2][0] == 0xFF) { in get_arc_info()
154 env_set("ethaddr", smac[2]); in get_arc_info()
155 printf("\t%s (factory)\n", smac[2]); in get_arc_info()
161 if (strcmp(smac[1], "00:00:00:00:00:00") == 0) { in get_arc_info()
162 env_set("eth1addr", smac[2]); in get_arc_info()
163 env_set("eth2addr", smac[2]); in get_arc_info()
168 if (smac[1][0] == 0xFF) { in get_arc_info()
174 env_set("eth1addr", smac[1]); in get_arc_info()
175 printf("\t%s (factory)\n", smac[1]); in get_arc_info()
181 if (strcmp(smac[0], "00:00:00:00:00:00") == 0) { in get_arc_info()
182 env_set("eth2addr", smac[1]); in get_arc_info()
187 if (smac[0][0] == 0xFF) { in get_arc_info()
193 env_set("eth2addr", smac[0]); in get_arc_info()
194 printf("\t%s (factory)\n", smac[0]); in get_arc_info()