[PATCH u-boot 1/4] eth/r8152: reset bmu after disabling Tx/Rx
Marek Vasut
marex at denx.de
Wed Jun 10 13:04:43 CEST 2020
On 6/10/20 11:27 AM, Hayes Wang wrote:
> Marek Vasut [mailto:marex at denx.de]
>> Sent: Tuesday, June 09, 2020 10:21 PM
> [...]
>>> +static void rtl_reset_bmu(struct r8152 *tp)
>>> +{
>>> + u32 ocp_data;
>>
>> You're writing a byte, shouldn't that be u8 ?
>
> The minimum length which is used to read or write
> the register of the device through control transfer
> is 4-byte. Therefore, I always use "u32" to access
> 1, 2, or 4 bytes data. Then, I don't need another
> variable to deal with it.
ocp_read_byte() returns u8, and while ocp_write_byte() expects u32 as
data, it masks away all but the LSByte, so it should be OK to use u8?
More information about the U-Boot
mailing list