[U-Boot] net: fec_mxc: not access reserved register on i.MX8
diff mbox series

Message ID 20190415053134.30108-1-peng.fan@nxp.com
State New
Delegated to: Stefano Babic
Headers show
Series
  • [U-Boot] net: fec_mxc: not access reserved register on i.MX8
Related show

Commit Message

Peng Fan April 15, 2019, 5:18 a.m. UTC
We should not access reserved register on i.MX8, otherwise met SERROR

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/net/fec_mxc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joe Hershberger April 15, 2019, 9:19 p.m. UTC | #1
On Mon, Apr 15, 2019 at 12:18 AM Peng Fan <peng.fan@nxp.com> wrote:
>
> We should not access reserved register on i.MX8, otherwise met SERROR
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Peng Fan May 6, 2019, 6:31 a.m. UTC | #2
Hi Stefano,

I do not see this patch applied to your tree, would you pick it up?
Patchwork: https://patchwork.ozlabs.org/patch/1085432/

Thanks,
Peng.

> Subject: [PATCH] net: fec_mxc: not access reserved register on i.MX8
> 
> We should not access reserved register on i.MX8, otherwise met SERROR
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/net/fec_mxc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index
> 84f010d805..097bbd090f 100644
> --- a/drivers/net/fec_mxc.c
> +++ b/drivers/net/fec_mxc.c
> @@ -604,7 +604,7 @@ static int fec_init(struct eth_device *dev, bd_t *bd)
>  	writel(0x00000000, &fec->eth->gaddr2);
> 
>  	/* Do not access reserved register */
> -	if (!is_mx6ul() && !is_mx6ull() && !is_imx8m()) {
> +	if (!is_mx6ul() && !is_mx6ull() && !is_imx8() && !is_imx8m()) {
>  		/* clear MIB RAM */
>  		for (i = mib_ptr; i <= mib_ptr + 0xfc; i += 4)
>  			writel(0, i);
> --
> 2.16.4
Anatolij Gustschin June 10, 2019, 11:24 a.m. UTC | #3
On Mon, 15 Apr 2019 05:18:33 +0000
Peng Fan peng.fan@nxp.com wrote:

> We should not access reserved register on i.MX8, otherwise met SERROR
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/net/fec_mxc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-staging/agust@denx.de, thanks!

--
Anatolij
Stefano Babic June 10, 2019, 1:02 p.m. UTC | #4
Hi Anatolji,

On 10/06/19 13:24, Anatolij Gustschin wrote:
> On Mon, 15 Apr 2019 05:18:33 +0000
> Peng Fan peng.fan@nxp.com wrote:
> 
>> We should not access reserved register on i.MX8, otherwise met SERROR
>>
>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>> ---
>>  drivers/net/fec_mxc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Applied to u-boot-staging/agust@denx.de, thanks!
> 

I have this in u-boot-imx, too, but I do not think it is a problem when
we send PR to Tom.

Stefano
Anatolij Gustschin June 10, 2019, 1:12 p.m. UTC | #5
Hi Stefano,

On Mon, 10 Jun 2019 15:02:37 +0200
Stefano Babic sbabic@denx.de wrote:
... 
> I have this in u-boot-imx, too, but I do not think it is a problem when
> we send PR to Tom.

OK, thanks! Yes, it shouldn't be a problem.

--
Anatolij

Patch
diff mbox series

diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 84f010d805..097bbd090f 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -604,7 +604,7 @@  static int fec_init(struct eth_device *dev, bd_t *bd)
 	writel(0x00000000, &fec->eth->gaddr2);
 
 	/* Do not access reserved register */
-	if (!is_mx6ul() && !is_mx6ull() && !is_imx8m()) {
+	if (!is_mx6ul() && !is_mx6ull() && !is_imx8() && !is_imx8m()) {
 		/* clear MIB RAM */
 		for (i = mib_ptr; i <= mib_ptr + 0xfc; i += 4)
 			writel(0, i);