[PATCH] nvmem: imx-ocotp-ele: fix MAC2 layout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The MAC address layout for MAC address 2 implemented in the
imx-ocotp-ele driver matches the one described in the Security Reference
manual. This contradicts the description in the fusemap though.
According to the fusemap the layout for MAC2 is the same as for MAC1.
It's not clear which one is correct, but at least the TQMA93 board has
MAC2 programmed matching the fusemap, so change the layout accordingly.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/nvmem/imx-ocotp-ele.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/nvmem/imx-ocotp-ele.c b/drivers/nvmem/imx-ocotp-ele.c
index e4e60ed6af..58d3e62abf 100644
--- a/drivers/nvmem/imx-ocotp-ele.c
+++ b/drivers/nvmem/imx-ocotp-ele.c
@@ -116,14 +116,10 @@ static int imx_ocotp_cell_pp(void *context, const char *id, unsigned int offset,
 	if (id && !strcmp(id, "mac-address")) {
 		u8 *buf = data;
 
-		if (offset == 0x4ec) {
+		if (offset == 0x4ec || offset == 0x4f2) {
 			swap(buf[0], buf[5]);
 			swap(buf[1], buf[4]);
 			swap(buf[2], buf[3]);
-		} else if (offset == 0x4f2) {
-			swap(buf[0], buf[1]);
-			swap(buf[2], buf[5]);
-			swap(buf[3], buf[4]);
 		} else {
 			return -EINVAL;
 		}
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux