tg3: Add NVRAM support for 5762
Detect NVRAM types for 5762 and read OTP firmware version. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
c65a17f4f5
commit
c86a8560e2
@@ -1859,6 +1859,7 @@
|
||||
#define FLASH_VENDOR_SST_SMALL 0x00000001
|
||||
#define FLASH_VENDOR_SST_LARGE 0x02000001
|
||||
#define NVRAM_CFG1_5752VENDOR_MASK 0x03c00003
|
||||
#define NVRAM_CFG1_5762VENDOR_MASK 0x03e00003
|
||||
#define FLASH_5752VENDOR_ATMEL_EEPROM_64KHZ 0x00000000
|
||||
#define FLASH_5752VENDOR_ATMEL_EEPROM_376KHZ 0x02000000
|
||||
#define FLASH_5752VENDOR_ATMEL_FLASH_BUFFERED 0x02000003
|
||||
@@ -2376,6 +2377,20 @@
|
||||
#define APE_LOCK_REQ_DRIVER 0x00001000
|
||||
#define TG3_APE_LOCK_GRANT 0x004c
|
||||
#define APE_LOCK_GRANT_DRIVER 0x00001000
|
||||
#define TG3_APE_OTP_CTRL 0x00e8
|
||||
#define APE_OTP_CTRL_PROG_EN 0x200000
|
||||
#define APE_OTP_CTRL_CMD_RD 0x000000
|
||||
#define APE_OTP_CTRL_START 0x000001
|
||||
#define TG3_APE_OTP_STATUS 0x00ec
|
||||
#define APE_OTP_STATUS_CMD_DONE 0x000001
|
||||
#define TG3_APE_OTP_ADDR 0x00f0
|
||||
#define APE_OTP_ADDR_CPU_ENABLE 0x80000000
|
||||
#define TG3_APE_OTP_RD_DATA 0x00f8
|
||||
|
||||
#define OTP_ADDRESS_MAGIC0 0x00000050
|
||||
#define TG3_OTP_MAGIC0_VALID(val) \
|
||||
((((val) & 0xf0000000) == 0xa0000000) ||\
|
||||
(((val) & 0x0f000000) == 0x0a000000))
|
||||
|
||||
/* APE shared memory. Accessible through BAR1 */
|
||||
#define TG3_APE_SHMEM_BASE 0x4000
|
||||
|
Reference in New Issue
Block a user