From patchwork Tue Nov 8 16:38:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olliver Schinagl X-Patchwork-Id: 692379 X-Patchwork-Delegate: joe.hershberger@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3tCw6d685Pz9t2T for ; Wed, 9 Nov 2016 03:40:57 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=schinagl.nl header.i=@schinagl.nl header.b="fr3GLLmk"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6FC72B38AE; Tue, 8 Nov 2016 17:39:28 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id keJ6w9Am3TNS; Tue, 8 Nov 2016 17:39:28 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E2CA4B38B6; Tue, 8 Nov 2016 17:39:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 91B84A75D2 for ; Tue, 8 Nov 2016 17:39:09 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u8kM6Gkxufgz for ; Tue, 8 Nov 2016 17:39:09 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from 7of9.schinagl.nl (7of9.schinagl.nl [88.159.158.68]) by theia.denx.de (Postfix) with ESMTPS id 1D86AA75A9 for ; Tue, 8 Nov 2016 17:39:05 +0100 (CET) Received: from localhost.localdomain (static-98-101-100-159.thenetworkfactory.nl [159.100.101.98]) by 7of9.schinagl.nl (Postfix) with ESMTPA id B5999575497; Tue, 8 Nov 2016 17:39:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=schinagl.nl; s=7of9; t=1478623144; bh=Uklhe8TuoTCCVtNd0uyR8N3hTWyR8H3W2V1EAtQ98fc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=fr3GLLmkmSMhPpIhI0EjxcswWlOjk+u2qANLqv7RE9tRaKvX+g6pfUYYGZp/UEjcM SlkNFGykvDmyJlD9j+Hik2ORg5ED150mOVdBhmh8LoabdfyiV6jegdLHZP7AVWGRHy I3tte3KiWRz7+KlC6idLct8Lw+1/DF0IZxyJZvVg= From: Olliver Schinagl To: Joe Hershberger , Olliver Schinagl , Michal Simek , Stephen Warren , Hans de Goede , Michael Haas , Karsten Merker Date: Tue, 8 Nov 2016 17:38:57 +0100 Message-Id: <20161108163859.14760-2-oliver@schinagl.nl> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161108163859.14760-1-oliver@schinagl.nl> References: <20161108163859.14760-1-oliver@schinagl.nl> Cc: dev@linux-sunxi.org, u-boot@lists.denx.de Subject: [U-Boot] [PATCH 1/3] net: phy: realtek: Use the BIT() macro X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The BIT macro is the preferred method to set bits. This patch adds the bit macro and converts bit invocations. Signed-off-by: Olliver Schinagl Acked-by: Joe Hershberger --- drivers/net/phy/realtek.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 7a99cb0..35b934b 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -9,13 +9,14 @@ */ #include #include +#include #include #define PHY_AUTONEGOTIATE_TIMEOUT 5000 /* RTL8211x 1000BASE-T Control Register */ -#define MIIM_RTL8211x_CTRL1000T_MSCE (1 << 12); -#define MIIM_RTL8211X_CTRL1000T_MASTER (1 << 11); +#define MIIM_RTL8211x_CTRL1000T_MSCE BIT(12); +#define MIIM_RTL8211X_CTRL1000T_MASTER BIT(11); /* RTL8211x PHY Status Register */ #define MIIM_RTL8211x_PHY_STATUS 0x11