From patchwork Thu Oct 22 20:50:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 534602 X-Patchwork-Delegate: jagannadh.teki@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 883C9141316 for ; Fri, 23 Oct 2015 07:53:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 19D85A7495; Thu, 22 Oct 2015 22:52:31 +0200 (CEST) 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 9y55Qvfb5qix; Thu, 22 Oct 2015 22:52:31 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 821C2A752F; Thu, 22 Oct 2015 22:52:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AB110A750E for ; Thu, 22 Oct 2015 22:51:56 +0200 (CEST) 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 JoGbjKgin9Tv for ; Thu, 22 Oct 2015 22:51:56 +0200 (CEST) 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 mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by theia.denx.de (Postfix) with ESMTPS id A86C5A74FB for ; Thu, 22 Oct 2015 22:51:44 +0200 (CEST) Received: by pacfv9 with SMTP id fv9so100689729pac.3 for ; Thu, 22 Oct 2015 13:51:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/+mLJy6rrOYGnKqBTeq7j0dWusO5mRI1LW8Fq5qOb8E=; b=mkC/lJc3c96FOAdIOB1EP2uobYy2b3oQRXF1ypG0l52Oqt2XtIhMQ4avyNYvZsLtxL MO3TH9mygHqh9EPNbw7lOF7WLbqOGvm2AjMbYWwQ+IPsDXgWX2a/fAtgKVuwUhSO6iOU tlDdQIBk9ZZ/hVcHaaEPcADeaYjOrUA1Tu5PLCtm9TCyJaGJD3BRvHbUWWnW3O6d7pGw cNJKEPwyZxOMYwhhZ/wi3T+aYdt0Z/J0Jc3C3Xrsenh3WqjLbuiUNdn28Rx0cdQAsrwK jFlY6X67o3gUjZr5eArdKWZzg/a4UNvUB7rD87O6YPYH59V6XI0lSe3bE5GK6qIQI4A7 bcKA== X-Received: by 10.66.141.12 with SMTP id rk12mr304509pab.84.1445547103438; Thu, 22 Oct 2015 13:51:43 -0700 (PDT) Received: from localhost.localdomain ([123.236.183.133]) by smtp.gmail.com with ESMTPSA id we9sm15351124pab.3.2015.10.22.13.51.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Oct 2015 13:51:41 -0700 (PDT) From: Jagan Teki To: u-boot@lists.denx.de Date: Fri, 23 Oct 2015 02:20:11 +0530 Message-Id: <1445547024-7774-12-git-send-email-jteki@openedev.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445547024-7774-1-git-send-email-jteki@openedev.com> References: <1445547024-7774-1-git-send-email-jteki@openedev.com> Cc: Jagan Teki Subject: [U-Boot] [PATCH v4 11/24] spi: mpc8xxx_spi: Use 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" Replace numerical bit shift with BIT macro in mpc8xxx_spi :%s/(1 << nr)/BIT(nr)/g where nr = 0, 1, 2 .... 31 Signed-off-by: Jagan Teki Reviewed-by: Tom Rini --- drivers/spi/mpc8xxx_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c index 0d59c36..00cbcbf 100644 --- a/drivers/spi/mpc8xxx_spi.c +++ b/drivers/spi/mpc8xxx_spi.c @@ -55,7 +55,7 @@ void spi_init(void) * some registers */ spi->mode = SPI_MODE_REV | SPI_MODE_MS | SPI_MODE_EN; - spi->mode = (spi->mode & 0xfff0ffff) | (1 << 16); /* Use SYSCLK / 8 + spi->mode = (spi->mode & 0xfff0ffff) | BIT(16); /* Use SYSCLK / 8 (16.67MHz typ.) */ spi->event = 0xffffffff; /* Clear all SPI events */ spi->mask = 0x00000000; /* Mask all SPI interrupts */