/* Fixup the SD timeout frequency */
mtdcrx(CCTL0_MCO4, 0x1);
/* Disable SD high-speed mode (which seems to be broken) */
reg = mfdcrx(CCTL0_MCO2) & ~0x2;
mtdcrx(CCTL0_MCO2, reg);
/* Set the MAC address */
emac = finddevice("/plb/opb/ethernet"); if (emac > 0) { if (mac_addr)
setprop(emac, "local-mac-address",
((u8 *) &mac_addr) + 2 , 6);
}
}
void platform_init(char *userdata)
{ unsignedlong end_of_ram, avail_ram;
u32 pir_reg; int node, size; const u32 *timebase; int len, i, userdata_len; char *end;
userdata[USERDATA_LEN - 1] = '\0';
userdata_len = strlen(userdata); for (i = 0; i < userdata_len - 15; i++) { if (strncmp(&userdata[i], "local-mac-addr=", 15) == 0) { if (i > 0 && userdata[i - 1] != ' ') { /* We've only found a substring ending * with local-mac-addr so this isn't
* our mac address. */ continue;
}
mac_addr = strtoull(&userdata[i + 15], &end, 16);
/* Remove the "local-mac-addr=<...>" from the kernel * command line, including the tailing space if
* present. */ if (*end == ' ')
end++;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.