public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Martin Cerveny <m.cerveny@computer.org>
To: u-boot@lists.denx.de
Subject: [PATCH 1/5] sunxi: video: No double clock on DE2
Date: Wed, 16 Sep 2020 16:10:48 +0200	[thread overview]
Message-ID: <20200916141052.4808-2-m.cerveny@computer.org> (raw)
In-Reply-To: <20200916141052.4808-1-m.cerveny@computer.org>

Weird code or comment. This is variant is tested on V3s.

Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
---
 drivers/video/sunxi/lcdc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/video/sunxi/lcdc.c b/drivers/video/sunxi/lcdc.c
index 73033c3b85..b772947a6b 100644
--- a/drivers/video/sunxi/lcdc.c
+++ b/drivers/video/sunxi/lcdc.c
@@ -244,7 +244,6 @@ void lcdc_pll_set(struct sunxi_ccm_reg *ccm, int tcon, int dotclock,
 	 * not sync to higher frequencies.
 	 */
 	for (m = min_m; m <= max_m; m++) {
-#ifndef CONFIG_SUNXI_DE2
 		n = (m * dotclock) / step;
 
 		if ((n >= 9) && (n <= 127)) {
@@ -261,8 +260,8 @@ void lcdc_pll_set(struct sunxi_ccm_reg *ccm, int tcon, int dotclock,
 		/* These are just duplicates */
 		if (!(m & 1))
 			continue;
-#endif
 
+#ifndef CONFIG_SUNXI_DE2
 		/* No double clock on DE2 */
 		n = (m * dotclock) / (step * 2);
 		if ((n >= 9) && (n <= 127)) {
@@ -275,6 +274,7 @@ void lcdc_pll_set(struct sunxi_ccm_reg *ccm, int tcon, int dotclock,
 				best_double = 1;
 			}
 		}
+#endif
 	}
 
 #ifdef CONFIG_MACH_SUN6I
@@ -315,8 +315,7 @@ void lcdc_pll_set(struct sunxi_ccm_reg *ccm, int tcon, int dotclock,
 		writel(CCM_LCD_CH0_CTRL_GATE | CCM_LCD_CH0_CTRL_RST | pll,
 		       &ccm->lcd0_ch0_clk_cfg);
 #else
-		writel(CCM_LCD_CH0_CTRL_GATE | CCM_LCD_CH0_CTRL_RST | pll,
-		       &ccm->lcd0_clk_cfg);
+		writel(CCM_LCD0_CTRL_GATE | pll, &ccm->lcd0_clk_cfg);
 #endif
 	}
 #ifndef CONFIG_SUNXI_DE2
-- 
2.17.1

  reply	other threads:[~2020-09-16 14:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 14:10 [PATCH 0/5] sunxi: video: Add V3S simple-framebuffer Martin Cerveny
2020-09-16 14:10 ` Martin Cerveny [this message]
2020-09-16 14:48   ` [PATCH 1/5] sunxi: video: No double clock on DE2 Maxime Ripard
2020-09-16 16:25     ` Martin Cerveny
2020-09-16 20:32       ` Vasily Khoruzhick
2020-09-16 14:10 ` [PATCH 2/5] pwm: sunxi: v3s: Enable PWM0 Martin Cerveny
2020-09-16 14:10 ` [PATCH 3/5] sunxi: video: v3s: Enable LCD support Martin Cerveny
2020-09-16 14:10 ` [PATCH 4/5] arm: dts: v3s: Add support for simple-framebuffer with DE2/TCON Martin Cerveny
2020-09-16 14:50   ` Maxime Ripard
2020-09-16 15:53     ` Martin Cerveny
2020-09-21 13:05       ` Maxime Ripard
2020-09-16 14:10 ` [PATCH 5/5] sunxi: add drivers and configs needed for LCD display Martin Cerveny
2020-09-16 14:51   ` Maxime Ripard
2020-09-16 15:44     ` Martin Cerveny
2020-09-21 12:59       ` Maxime Ripard

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=20200916141052.4808-2-m.cerveny@computer.org \
    --to=m.cerveny@computer.org \
    --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