Hi experts,
I’m working on two boards LS1028ARDB and our custom LS1028A based board developing a bare-metal driver for ENETC. The issue is the same on both boards so lets focus on RDB.
TX BDR consumer seems not to be triggered. I can see in debugger that producer index increments correctely but consumer doesn’t process any descriptor (consumer index = 0) till TX ring gets full.
Basically the driver is an adaptation of fsl_enetc.c from LSDK u-boot.
PCIe ECAM is working. I’m able to read/write external devices connected through MDIO on both boards. On RDB I can poll link up on 1G MAC0 interface by Reading PHY registers.
BDR are statically allocated in RAM with __attribute__((aligned(128)))
I tried several approaches with no success (cache enabled / cache disabled) with SICAR0 set accordingly but I don’t really trust SICAR0 value when cache is disabled.
1/ With cache enabled I used SDK setup :
/* write cache cfg: snoop, no allocate, data & BD coherent */
#define ENETC_SICAR_WR_CFG 0x6767
/* read cache cfg: coherent copy, look up, don't alloc in cache */
#define ENETC_SICAR_RD_CFG 0x27270000
2/ With cache disabled I tried two configs :
#ifdef NOCACHE_DEV
/* Non-cacheable noncoherent/register space access */
#define ENETC_SICAR_WR_CFG 0x3030
/* Non-cacheable noncoherent/register space access */
#define ENETC_SICAR_RD_CFG 0x30300000
#elif (defined(NONCOH_MEM))
/* Non-coherent write of cacheable memory, look up in downstream cache, allocate on miss */
#define ENETC_SICAR_WR_CFG 0x0303
/* Non-coherent copy of cacheable memory, do not look up or allocate in downstream cache*/
#define ENETC_SICAR_RD_CFG 0x03030000
Any Idea to force TX ring to transmit packets at least for hardware testing would be welcome.
RX path doesn’t work better…
Best regards