Re: [PATCH 14/14] MIPS: OCTEON: Handle OCTEON III in csrc-octeon.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, Dec 15, 2014 at 09:03:20PM +0300, Aleksey Makarov wrote:
>  	if (current_cpu_type() == CPU_CAVIUM_OCTEON2) {
>  		union cvmx_mio_rst_boot rst_boot;
> +
>  		rst_boot.u64 = cvmx_read_csr(CVMX_MIO_RST_BOOT);
>  		rdiv = rst_boot.s.c_mul;	/* CPU clock */
>  		sdiv = rst_boot.s.pnr_mul;	/* I/O clock */
>  		f = (0x8000000000000000ull / sdiv) * 2;
> +	} else if (current_cpu_type() == CPU_CAVIUM_OCTEON3) {
> +		union cvmx_rst_boot rst_boot;
> +
> +		rst_boot.u64 = cvmx_read_csr(CVMX_RST_BOOT);
> +		rdiv = rst_boot.s.c_mul;	/* CPU clock */
> +		sdiv = rst_boot.s.pnr_mul;	/* I/O clock */
> +		f = (0x8000000000000000ull / sdiv) * 2;
>  	}

The f = ... part could be moved outside the if blocks to avoid copy paste.

A.





[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux