summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2007-10-25 07:05:38 +0000
committerimp <imp@FreeBSD.org>2007-10-25 07:05:38 +0000
commit7205d51f8d46369ba85c9260a36b421a72cfedbf (patch)
treedf70ba4ca5509dfd48713be29068b1c04141b11b /sys/boot
parent721d6387149d786f2055931927ff58594563bf98 (diff)
downloadFreeBSD-src-7205d51f8d46369ba85c9260a36b421a72cfedbf.zip
FreeBSD-src-7205d51f8d46369ba85c9260a36b421a72cfedbf.tar.gz
Load the bytes into the EMAC's MAC address register in the proper
order. The kernel used to shuffle them around to get things right, but that was recently fixed. This makes our boot loader match the behavior of most other boot loaders for the atmel parts. This bug was inherited from the Kwikbyte loader that we started from. This bug was discovered by Bj.ANvrn KNvnig back in June, but fell on the floor. He provided patches to the kernel, include backwards compatibility options that were similar to Olivier's if_ate.c commit.
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/arm/at91/libat91/emac_init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/boot/arm/at91/libat91/emac_init.c b/sys/boot/arm/at91/libat91/emac_init.c
index 32f4563..3024622 100644
--- a/sys/boot/arm/at91/libat91/emac_init.c
+++ b/sys/boot/arm/at91/libat91/emac_init.c
@@ -79,8 +79,8 @@ EMAC_SetMACAddress(unsigned char mac[6])
pPMC->PMC_PCER = ((unsigned) 1 << AT91C_ID_EMAC);
memcpy(localMACAddr, mac, 6);
- localMAClow = (mac[2] << 24) | (mac[3] << 16) | (mac[4] << 8) | mac[5];
- localMAChigh = (mac[0] << 8) | mac[1];
+ localMAClow = (mac[3] << 24) | (mac[2] << 16) | (mac[1] << 8) | mac[0];
+ localMAChigh = (mac[5] << 8) | mac[4];
localMACSet = 1;
AT91C_BASE_PMC->PMC_PCER = 1u << AT91C_ID_EMAC;
OpenPOWER on IntegriCloud