From: Dario Binacchi <dariobin@libero.it>
To: u-boot@lists.denx.de
Subject: [PATCH 04/11] video: omap: fix bitfields order
Date: Sun, 9 Feb 2020 19:47:37 +0100 [thread overview]
Message-ID: <20200209184745.20473-5-dariobin@libero.it> (raw)
In-Reply-To: <20200209184745.20473-1-dariobin@libero.it>
Arrange the bitfields of each register in the ascending order.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
---
drivers/video/am335x-fb.c | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/drivers/video/am335x-fb.c b/drivers/video/am335x-fb.c
index 17476f5b72..2facac986a 100644
--- a/drivers/video/am335x-fb.c
+++ b/drivers/video/am335x-fb.c
@@ -26,8 +26,8 @@
#define LCDC_FMAX 200000000
/* LCD Control Register */
-#define LCD_CLK_DIVISOR(x) (((x) & 0xFF) << 8)
#define LCD_RASTER_MODE BIT(0)
+#define LCD_CLK_DIVISOR(x) (((x) & 0xFF) << 8)
/* LCD Clock Enable Register */
#define LCD_CORECLKEN BIT(0)
#define LCD_LIDDCLKEN BIT(1)
@@ -40,29 +40,28 @@
#define LCD_DMA_BURST_8 0x3
#define LCD_DMA_BURST_16 0x4
/* LCD Timing_0 Register */
-#define LCD_HBPLSB(x) ((((x) - 1) & 0xFF) << 24)
-#define LCD_HFPLSB(x) ((((x) - 1) & 0xFF) << 16)
-#define LCD_HSWLSB(x) ((((x) - 1) & 0x3F) << 10)
-#define LCD_HORLSB(x) (((((x) >> 4) - 1) & 0x3F) << 4)
#define LCD_HORMSB(x) (((((x) >> 4) - 1) & 0x40) >> 4)
+#define LCD_HORLSB(x) (((((x) >> 4) - 1) & 0x3F) << 4)
+#define LCD_HSWLSB(x) ((((x) - 1) & 0x3F) << 10)
+#define LCD_HFPLSB(x) ((((x) - 1) & 0xFF) << 16)
+#define LCD_HBPLSB(x) ((((x) - 1) & 0xFF) << 24)
/* LCD Timing_1 Register */
-#define LCD_VBP(x) (((x) & 0xFF) << 24)
-#define LCD_VFP(x) (((x) & 0xFF) << 16)
-#define LCD_VSW(x) ((((x) - 1) & 0x3F) << 10)
#define LCD_VERLSB(x) (((x) - 1) & 0x3FF)
+#define LCD_VSW(x) ((((x) - 1) & 0x3F) << 10)
+#define LCD_VFP(x) (((x) & 0xFF) << 16)
+#define LCD_VBP(x) (((x) & 0xFF) << 24)
/* LCD Timing_2 Register */
-#define LCD_HSWMSB(x) ((((x) - 1) & 0x3C0) << 21)
-#define LCD_VERMSB(x) ((((x) - 1) & 0x400) << 16)
-#define LCD_HBPMSB(x) ((((x) - 1) & 0x300) >> 4)
#define LCD_HFPMSB(x) ((((x) - 1) & 0x300) >> 8)
+#define LCD_HBPMSB(x) ((((x) - 1) & 0x300) >> 4)
#define LCD_INVMASK(x) ((x) & 0x3F00000)
+#define LCD_VERMSB(x) ((((x) - 1) & 0x400) << 16)
+#define LCD_HSWMSB(x) ((((x) - 1) & 0x3C0) << 21)
/* LCD Raster Ctrl Register */
+#define LCD_RASTER_ENABLE BIT(0)
+#define LCD_TFT_MODE BIT(7)
+#define LCD_PALMODE_RAWDATA (0x02 << 20)
#define LCD_TFT_24BPP_MODE BIT(25)
#define LCD_TFT_24BPP_UNPACK BIT(26)
-#define LCD_PALMODE_RAWDATA (0x02 << 20)
-#define LCD_TFT_MODE BIT(7)
-#define LCD_RASTER_ENABLE BIT(0)
-
/* Macro definitions */
#define FBSIZE(x) ((x->hactive * x->vactive * x->bpp) >> 3)
--
2.24.0
next prev parent reply other threads:[~2020-02-09 18:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-09 18:47 [PATCH 00/11] Add DM/DTS support for omap video driver Dario Binacchi
2020-02-09 18:47 ` [PATCH 01/11] video: omap: use BIT() macro Dario Binacchi
2020-02-10 4:08 ` Lokesh Vutla
2020-02-09 18:47 ` [PATCH 02/11] video: omap: add missing bitfield masks Dario Binacchi
2020-02-10 4:06 ` Lokesh Vutla
2020-02-09 18:47 ` [PATCH 03/11] video: omap: fix coding style on use of spaces Dario Binacchi
2020-02-09 18:47 ` Dario Binacchi [this message]
2020-02-09 18:47 ` [PATCH 05/11] video: omap: rename LCD controller registers Dario Binacchi
2020-02-09 18:47 ` [PATCH 06/11] video: omap: fix debug message Dario Binacchi
2020-02-10 4:09 ` Lokesh Vutla
2020-02-09 18:47 ` [PATCH 07/11] video: omap: add loop exit conditions to the dpll setup Dario Binacchi
2020-02-10 4:10 ` Lokesh Vutla
2020-02-09 18:47 ` [PATCH 08/11] video: omap: create two routines to set the pixel clock rate Dario Binacchi
2020-02-09 18:47 ` [PATCH 09/11] video: omap: add support for DM/DTS Dario Binacchi
2020-02-10 4:20 ` Lokesh Vutla
2020-02-09 18:47 ` [PATCH 10/11] arm: fdt: omap: update dts panel node Dario Binacchi
2020-02-10 4:22 ` Lokesh Vutla
2020-02-10 15:15 ` Tom Rini
2020-02-10 16:04 ` Tom Rini
[not found] ` <948333446.1041134.1581365999202@mail1.libero.it>
[not found] ` <6d060e0d-dcba-e94c-7078-1e461a9c5b8b@ti.com>
2020-02-11 20:06 ` dariobin at libero.it
2020-02-09 18:47 ` [PATCH 11/11] fdt: video: omap: add framebuffer and panel bindings Dario Binacchi
2020-02-10 23:13 ` Simon Glass
2020-02-10 11:25 ` [PATCH 00/11] Add DM/DTS support for omap video driver Adam Ford
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=20200209184745.20473-5-dariobin@libero.it \
--to=dariobin@libero.it \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.