From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anup Patel Date: Sat, 9 Feb 2019 06:32:23 +0000 Subject: [U-Boot] [PATCH v6 08/16] net: macb: Fix GEM hardware detection In-Reply-To: <20190209063052.29092-1-anup.patel@wdc.com> References: <20190209063052.29092-1-anup.patel@wdc.com> Message-ID: <20190209063052.29092-9-anup.patel@wdc.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Atish Patra Fix MID bit field check to correctly identify all GEM hardwares. The check is updated as per macb driver in Linux location: /drivers/net/ethernet/cadence/macb_main.c:259 Signed-off-by: Atish Patra Signed-off-by: Anup Patel Reviewed-by: Alexander Graf Reviewed-by: Lukas Auer Acked-by: Joe Hershberger --- drivers/net/macb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/macb.c b/drivers/net/macb.c index a5d21731b6..117f54c1b1 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -143,7 +143,7 @@ struct macb_device { static int macb_is_gem(struct macb_device *macb) { - return MACB_BFEXT(IDNUM, macb_readl(macb, MID)) == 0x2; + return MACB_BFEXT(IDNUM, macb_readl(macb, MID)) >= 0x2; } #ifndef cpu_is_sama5d2 -- 2.17.1