2
0

813-v6.5-0002-nvmem-imx-ocotp-Reverse-MAC-addresses-on-all-i.MX-de.patch 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. From 8a00fc606312c68b98add8fe8e6f7a013ce29e78 Mon Sep 17 00:00:00 2001
  2. From: Alexander Stein <[email protected]>
  3. Date: Sun, 11 Jun 2023 15:03:06 +0100
  4. Subject: [PATCH] nvmem: imx-ocotp: Reverse MAC addresses on all i.MX derivates
  5. Not just i.MX8M, but all i.MX6/7 (and subtypes) need to reverse the
  6. MAC address read from fuses. Exceptions are i.MX6SLL and i.MX7ULP which
  7. do not support ethernet at all.
  8. Fixes: d0221a780cbc ("nvmem: imx-ocotp: add support for post processing")
  9. Signed-off-by: Alexander Stein <[email protected]>
  10. Tested-by: Richard Leitner <[email protected]> # imx6q
  11. Signed-off-by: Srinivas Kandagatla <[email protected]>
  12. Message-ID: <[email protected]>
  13. Signed-off-by: Greg Kroah-Hartman <[email protected]>
  14. ---
  15. drivers/nvmem/imx-ocotp.c | 8 +-------
  16. 1 file changed, 1 insertion(+), 7 deletions(-)
  17. --- a/drivers/nvmem/imx-ocotp.c
  18. +++ b/drivers/nvmem/imx-ocotp.c
  19. @@ -97,7 +97,6 @@ struct ocotp_params {
  20. unsigned int bank_address_words;
  21. void (*set_timing)(struct ocotp_priv *priv);
  22. struct ocotp_ctrl_reg ctrl;
  23. - bool reverse_mac_address;
  24. };
  25. static int imx_ocotp_wait_for_busy(struct ocotp_priv *priv, u32 flags)
  26. @@ -545,7 +544,6 @@ static const struct ocotp_params imx8mq_
  27. .bank_address_words = 0,
  28. .set_timing = imx_ocotp_set_imx6_timing,
  29. .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
  30. - .reverse_mac_address = true,
  31. };
  32. static const struct ocotp_params imx8mm_params = {
  33. @@ -553,7 +551,6 @@ static const struct ocotp_params imx8mm_
  34. .bank_address_words = 0,
  35. .set_timing = imx_ocotp_set_imx6_timing,
  36. .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
  37. - .reverse_mac_address = true,
  38. };
  39. static const struct ocotp_params imx8mn_params = {
  40. @@ -561,7 +558,6 @@ static const struct ocotp_params imx8mn_
  41. .bank_address_words = 0,
  42. .set_timing = imx_ocotp_set_imx6_timing,
  43. .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
  44. - .reverse_mac_address = true,
  45. };
  46. static const struct ocotp_params imx8mp_params = {
  47. @@ -569,7 +565,6 @@ static const struct ocotp_params imx8mp_
  48. .bank_address_words = 0,
  49. .set_timing = imx_ocotp_set_imx6_timing,
  50. .ctrl = IMX_OCOTP_BM_CTRL_8MP,
  51. - .reverse_mac_address = true,
  52. };
  53. static const struct of_device_id imx_ocotp_dt_ids[] = {
  54. @@ -624,8 +619,7 @@ static int imx_ocotp_probe(struct platfo
  55. imx_ocotp_nvmem_config.size = 4 * priv->params->nregs;
  56. imx_ocotp_nvmem_config.dev = dev;
  57. imx_ocotp_nvmem_config.priv = priv;
  58. - if (priv->params->reverse_mac_address)
  59. - imx_ocotp_nvmem_config.layout = &imx_ocotp_layout;
  60. + imx_ocotp_nvmem_config.layout = &imx_ocotp_layout;
  61. priv->config = &imx_ocotp_nvmem_config;