[PATCH u-boot 3/4] eth/r8152: modify rtl_clear_bp function

Marek Vasut marex at denx.de
Tue Jun 9 16:23:51 CEST 2020


On 6/9/20 10:53 AM, Hayes Wang wrote:
> The original rtl_clear_bp() is used to clear the firmware of both
> PLA and USB MCU. The new one could clear the firmware of PLA or
> USB independently. It is unnecessary to clear firmware, if there
> is no one to be updated.
> 
> Signed-off-by: Hayes Wang <hayeswang at realtek.com>
> ---
>  drivers/usb/eth/r8152.h    | 20 ++++++------
>  drivers/usb/eth/r8152_fw.c | 63 +++++++++++++++++++++++---------------
>  2 files changed, 48 insertions(+), 35 deletions(-)
> 
> diff --git a/drivers/usb/eth/r8152.h b/drivers/usb/eth/r8152.h
> index 4daf4ee87d..ff4262d68d 100644
> --- a/drivers/usb/eth/r8152.h
> +++ b/drivers/usb/eth/r8152.h
> @@ -95,16 +95,16 @@
>  #define USB_MISC_0		0xd81a
>  #define USB_AFE_CTRL2		0xd824
>  #define USB_WDT11_CTRL		0xe43c
> -#define USB_BP_BA		0xfc26
> -#define USB_BP_0		0xfc28
> -#define USB_BP_1		0xfc2a
> -#define USB_BP_2		0xfc2c
> -#define USB_BP_3		0xfc2e
> -#define USB_BP_4		0xfc30
> -#define USB_BP_5		0xfc32
> -#define USB_BP_6		0xfc34
> -#define USB_BP_7		0xfc36
> -#define USB_BP_EN		0xfc38
> +#define USB_BP_BA		PLA_BP_BA
> +#define USB_BP_0		PLA_BP_0
> +#define USB_BP_1		PLA_BP_1
> +#define USB_BP_2		PLA_BP_2
> +#define USB_BP_3		PLA_BP_3
> +#define USB_BP_4		PLA_BP_4
> +#define USB_BP_5		PLA_BP_5
> +#define USB_BP_6		PLA_BP_6
> +#define USB_BP_7		PLA_BP_7
> +#define USB_BP_EN		PLA_BP_EN

Can you make this into USB_BP(n) (0xfc28 + 2 * (n)) ?

[...]


More information about the U-Boot mailing list