--avalon8-freq-sel
{
int val[AVA8_DEFAULT_PLL_CNT];
char *colon, *data;
int i;
if (!(*arg))
return NULL;
data = arg;
memset(val, 0, sizeof(val));
for (i = 0; i < AVA8_DEFAULT_PLL_CNT; i++) {
colon = strchr(data, ':');
if (colon)
*(colon++) = '\0';
else {
/* last value */
if (*data) {
val[i] = atoi(data);
if (val[i] > AVA8_DEFAULT_FREQUENCY_MAX)
return "Invalid value passed to avalon8-freq";
}
break;
}
if (*data) {
val[i] = atoi(data);
if (val[i] > AVA8_DEFAULT_FREQUENCY_MAX)
return "Invalid value passed to avalon8-freq";
}
data = colon;
}
for (i = 0; i < AVA8_DEFAULT_PLL_CNT; i++)
opt_avalon8_freq[i] = val[i];
return NULL;
}
I'm so confused, can you give me some clue? Thank you.