• D
    stmmac: Define MDC clock selection macros · faeae3fa
    Deepak SIKRI 提交于
    The patch adds the macros to be used for MDC clock selection. The MDC clock
    frequency is based on scaled system clock, and has to be confined to a range
    of 1-2.5 MHz. Based on the input CSR clock, the scaling factor has to be
    selected.
    The platform specific code will provide the default value of this scaling
    factor, based on the input CSR clock.
    There is an option to set MDC clock higher than the IEEE 802.3 specified
    frequency limit of 2.5 MHz. This applies for the interfacing chips that
    support higher MDC clocks. The resultant higher clock of 12.5 MHz requires
    additional Macros to be defined for the clock divider corresponding to the
    to the following selection.
    -----------------------------------------
    	Selection	MDC Clock
    -----------------------------------------
    	1000 		clk_csr_i/4
    	1001 		clk_csr_i/6
    	1010 		clk_csr_i/8
    	1011 		clk_csr_i/10
    	1100 		clk_csr_i/12
    	1101	 	clk_csr_i/14
    	1110 		clk_csr_i/16
    	1111 		clk_csr_i/18
    
    This support has to be added both in the include file, as well as driver. The
    driver need to program the registers based on the interfacing chips. This would
    be more board specific information and needs to be passed through the platform
    code to the driver. This work would be carried out in the future patch set
    release.
    Signed-off-by: NDeepak Sikri <deepak.sikri@st.com>
    Acked-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    faeae3fa
stmmac.h 3.0 KB