[PATCH u-boot 4/4] eth/r8152: support RTL8153B/RTL8154B

Hayes Wang hayeswang at realtek.com
Mon Jun 15 08:52:18 CEST 2020


Marek Vasut [mailto:marex at denx.de]
> Sent: Friday, June 12, 2020 7:53 PM
[...]
> Try this:
> 
> 	ocp_data = r8152_efuse_read(tp, 0x7d);
> 	ocp_data = (ocp_data & 0x1fff0) >> 1) | (ocp_data & 0x7);
> 	if (data != 0xffff)
> 		ocp_reg_write(tp, OCP_ADC_IOFFSET, data);

I think you mean

	ocp_data = r8152_efuse_read(tp, 0x7d);
	ocp_data = ((ocp_data & 0x1fff0) >> 1) | (ocp_data & 0x7);
	if (ocp_data != 0xffff)
		ocp_reg_write(tp, OCP_ADC_IOFFSET, ocp_data);

> That should work, no ? Or does it generate compiler warnings ?

It shows no warning.

Best Regards,
Hayes



More information about the U-Boot mailing list