public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Vignesh R <vigneshr@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 14/23] spi: ti_qspi: Use BIT macro
Date: Mon, 26 Oct 2015 16:29:43 +0530	[thread overview]
Message-ID: <562E079F.6010106@ti.com> (raw)
In-Reply-To: <1445657950-7117-15-git-send-email-jteki@openedev.com>



On 10/24/2015 09:09 AM, Jagan Teki wrote:
> Replace numerical bit shift with BIT macro
> in ti_qspi
> 
> :%s/(1 << nr)/BIT(nr)/g
> where nr = 0, 1, 2 .... 31
> 
> Cc: Vignesh R <vigneshr@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Jagan Teki <jteki@openedev.com>
> ---

Acked-by: Vignesh R <vigneshr@ti.com>

>  drivers/spi/ti_qspi.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
> index bd63db8..ecd9d78 100644
> --- a/drivers/spi/ti_qspi.c
> +++ b/drivers/spi/ti_qspi.c
> @@ -20,13 +20,13 @@
>  #define QSPI_TIMEOUT                    2000000
>  #define QSPI_FCLK                       192000000
>  /* clock control */
> -#define QSPI_CLK_EN                     (1 << 31)
> +#define QSPI_CLK_EN                     BIT(31)
>  #define QSPI_CLK_DIV_MAX                0xffff
>  /* command */
>  #define QSPI_EN_CS(n)                   (n << 28)
>  #define QSPI_WLEN(n)                    ((n-1) << 19)
> -#define QSPI_3_PIN                      (1 << 18)
> -#define QSPI_RD_SNGL                    (1 << 16)
> +#define QSPI_3_PIN                      BIT(18)
> +#define QSPI_RD_SNGL                    BIT(16)
>  #define QSPI_WR_SNGL                    (2 << 16)
>  #define QSPI_INVAL                      (4 << 16)
>  #define QSPI_RD_QUAD                    (7 << 16)
> @@ -36,8 +36,8 @@
>  #define QSPI_CSPOL(n)                   (1 << (1 + n*8))
>  #define QSPI_CKPOL(n)                   (1 << (n*8))
>  /* status */
> -#define QSPI_WC                         (1 << 1)
> -#define QSPI_BUSY                       (1 << 0)
> +#define QSPI_WC                         BIT(1)
> +#define QSPI_BUSY                       BIT(0)
>  #define QSPI_WC_BUSY                    (QSPI_WC | QSPI_BUSY)
>  #define QSPI_XFER_DONE                  QSPI_WC
>  #define MM_SWITCH                       0x01
> 

-- 
Regards
Vignesh

  reply	other threads:[~2015-10-26 10:59 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-24  3:38 [U-Boot] [PATCH v5 00/23] spi: Use BIT and GENMASK Jagan Teki
2015-10-24  3:38 ` [U-Boot] [PATCH v5 01/23] spi: zynq_[q]spi: Use BIT macro Jagan Teki
2015-10-26  4:45   ` Siva Durga Prasad Paladugu
2015-10-24  3:38 ` [U-Boot] [PATCH v5 02/23] spi: zynq_[q]spi: Use GENMASK macro Jagan Teki
2015-10-26  4:45   ` Siva Durga Prasad Paladugu
2015-10-24  3:38 ` [U-Boot] [PATCH v5 03/23] spi: altera_spi: Use BIT macro Jagan Teki
2015-10-27  2:45   ` Thomas Chou
2015-10-24  3:38 ` [U-Boot] [PATCH v5 04/23] spi: atmel_spi: " Jagan Teki
2015-10-24  3:38 ` [U-Boot] [PATCH v5 05/23] spi: bfin_spi6xx: " Jagan Teki
2015-10-24  3:38 ` [U-Boot] [PATCH v5 06/23] spi: cadence_qspi_apb: " Jagan Teki
2015-10-24  3:38 ` [U-Boot] [PATCH v5 07/23] spi: designware_spi: " Jagan Teki
2015-10-24 23:24   ` Tom Rini
2015-10-24  3:38 ` [U-Boot] [PATCH v5 08/23] spi: fsl: " Jagan Teki
2015-10-24  3:38 ` [U-Boot] [PATCH v5 09/23] spi: ich: " Jagan Teki
2015-10-26 14:08   ` Simon Glass
2015-10-24  3:38 ` [U-Boot] [PATCH v5 10/23] spi: mpc8xxx_spi: " Jagan Teki
2015-10-24  3:38 ` [U-Boot] [PATCH v5 11/23] spi: omap3_spi: " Jagan Teki
2015-10-24  3:38 ` [U-Boot] [PATCH v5 12/23] spi: sh_qspi: " Jagan Teki
2015-10-24  3:39 ` [U-Boot] [PATCH v5 13/23] spi: tegra: " Jagan Teki
2015-10-24  3:39 ` [U-Boot] [PATCH v5 14/23] spi: ti_qspi: " Jagan Teki
2015-10-26 10:59   ` Vignesh R [this message]
2015-10-24  3:39 ` [U-Boot] [PATCH v5 15/23] spi: xilinx_spi: " Jagan Teki
2015-10-24  3:39 ` [U-Boot] [PATCH v5 16/23] spi: atmel_spi: Use GENMASK Jagan Teki
2015-10-24  3:39 ` [U-Boot] [PATCH v5 17/23] spi: cadence_qspi_apb: " Jagan Teki
2015-10-24 12:41   ` Marek Vasut
2015-10-24 21:51     ` Tom Rini
2015-10-24 22:13       ` Marek Vasut
2015-10-24 22:25         ` Tom Rini
2015-10-24 23:02           ` Marek Vasut
2015-10-26  5:54           ` Stefan Roese
2015-10-26  7:21             ` Jagan Teki
2015-10-26  7:29               ` Stefan Roese
2015-10-26  7:39                 ` Jagan Teki
2015-10-24  3:39 ` [U-Boot] [PATCH v5 18/23] spi: designware_spi: " Jagan Teki
2015-10-24  3:39 ` [U-Boot] [PATCH v5 19/23] spi: fsl_qspi: " Jagan Teki
2015-10-24  3:39 ` [U-Boot] [PATCH v5 20/23] spi: mxs_spi: " Jagan Teki
2015-10-24 12:40   ` Marek Vasut
2015-10-24 13:42     ` Jagan Teki
2015-10-24 13:48       ` Marek Vasut
2015-10-24 21:49         ` Tom Rini
2015-10-24 22:12           ` Marek Vasut
2015-10-24 22:26             ` Tom Rini
2015-10-24  3:39 ` [U-Boot] [PATCH v5 21/23] spi: omap3_spi: " Jagan Teki
2015-10-24  3:39 ` [U-Boot] [PATCH v5 22/23] spi: tegra: " Jagan Teki
2015-10-24  3:39 ` [U-Boot] [PATCH v5 23/23] spi: xilinx_spi: " Jagan Teki
2015-10-25  6:59 ` [U-Boot] [PATCH v5 00/23] spi: Use BIT and GENMASK Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=562E079F.6010106@ti.com \
    --to=vigneshr@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox