On Mon, Aug 05, 2024 at 05:36:30PM -0700, Jitendra Vegiraju wrote: > Hi Andrew, > On Fri, Aug 2, 2024 at 3:59 PM Andrew Lunn <andrew@xxxxxxx> wrote: > > > > > + user_ver = stmmac_get_user_version(priv, GMAC4_VERSION); > > > + if (priv->synopsys_id == DWXGMAC_CORE_4_00 && > > > + user_ver == DWXGMAC_USER_VER_X22) > > > + mac->dma = &dwxgmac400_dma_ops; > > > > I know nothing about this hardware.... > > > > Does priv->synopsys_id == DWXGMAC_CORE_4_0 not imply > > dwxgmac400_dma_ops? > > > > Could a user synthesise DWXGMAC_CORE_4_00 without using > > dwxgmac400_dma_ops? Could dwxgmac500_dma_ops or dwxgmac100_dma_ops be > > used? > Yes, the user can choose between Enhanced DMA , Hyper DMA , Normal DMA. > This SoC support has chosen Hyper DMA for future expandability. Is there a register which describes the synthesis configuration? It is much better that the hardware tells us what it is, rather than having to expand this condition for every new devices which gets added. Also, what is the definition of user_ver. Can we guarantee this is unique and can actually be used to determine what DMA variant has been synthesised? Andrew