I assumed that the MAC is held in extended memory like the Atmel parts (otherwise, not much in the previous email makes sense).

    183   /* Put the AT24 back in normal memory access mode */
    184
    185   ret = at24->ioctl(at24, MTDIOC_EXTENDED, 0);
    186   if (ret < 0)
    187     {
    188       nerr("ERROR: AT24 ioctl(MTDIOC_EXTENDED) failed: %d\n",
    ret);
    189     }
    ...

Then the normal memory should be accessible to applications via the AT24 character driver as Alan discussed.

The MAC address could also be obtained and set in the application (vs. board bring-up) using a special IOCTL command support by the AT24xx.c serial driver at drivers/mtd:

638 #ifdef CONFIG_AT24XX_EXTENDED
639       case MTDIOC_EXTENDED:
640         priv->extended = (arg != 0);
641         ret = OK;
642         break;
643 #endif

Reply via email to