Hi Experts:
In linux latest mainline's iMX6 fec driver, the bufdesc structure use the first 2 bytes as Control and Status info, but from the SDK L3.0.35_4.0.0_130424, it use the first two bytes as Data length, which one is right?
From SDK 3.0.35, it add a patch:
/***************************************/
/*
* Define the buffer descriptor structure.
*/
-#if defined(CONFIG_ARCH_MXC) || defined(CONFIG_SOC_IMX28)
+#if defined(CONFIG_ARCH_MXC) || defined(CONFIG_SOC_IMX28) || \
+ defined(CONFIG_ARCH_MX6)
/***************************************/
The specific codes is here listed:
/************************************************************************************/
/*
* Define the buffer descriptor structure.
*/
#if defined(CONFIG_ARCH_MXC) || defined(CONFIG_SOC_IMX28) || \
defined(CONFIG_ARCH_MX6)
struct bufdesc {
unsigned short cbd_datlen; /* Data length */
unsigned short cbd_sc; /* Control and status info */
unsigned long cbd_bufaddr; /* Buffer address */
#ifdef CONFIG_ENHANCED_BD
unsigned long cbd_esc;
unsigned long cbd_prot;
unsigned long cbd_bdu;
unsigned long ts;
unsigned short res0[4];
#endif
};
#else
struct bufdesc {
unsigned short cbd_sc; /* Control and status info */
unsigned short cbd_datlen; /* Data length */
unsigned long cbd_bufaddr; /* Buffer address */
};
#endif
/************************************************************************************/
When we build MX6 project, it will use deferent bufdesc with before.
You can found this structure in drivers/net/ethernet/freescale/fec.h, why this modification happened, and which one is right(latest mainline and SDK)?
And iMX6 have several EVM, if all of them are little endian?
Thanks a lot!!
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------