From patchwork Wed Sep 16 14:10:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Cerveny X-Patchwork-Id: 1366089 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=computer.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BscDt5CHpz9sSC for ; Thu, 17 Sep 2020 22:47:26 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 27B3482396; Thu, 17 Sep 2020 14:47:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=computer.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 2970D82351; Wed, 16 Sep 2020 16:11:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from dmz.c-home.cz (gw.c-home.cz [89.24.150.100]) by phobos.denx.de (Postfix) with ESMTP id 7BE9182329 for ; Wed, 16 Sep 2020 16:11:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=computer.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=m.cerveny@computer.org Received: from ubuntu1804.c-home.cz (unifi.c-home.cz [192.168.1.239]) by dmz.c-home.cz (8.14.4+Sun/8.14.4) with ESMTP id 08GEB1MN009756; Wed, 16 Sep 2020 16:11:11 +0200 (CEST) From: Martin Cerveny To: Maxime Ripard Cc: Martin Cerveny , Anatolij Gustschin , Heinrich Schuchardt , Icenowy Zheng , Jagan Teki , Mark Kettenis , Masahiro Yamada , Michael Walle , Simon Glass , 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 Message-Id: <20200916141052.4808-2-m.cerveny@computer.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200916141052.4808-1-m.cerveny@computer.org> References: <20200916141052.4808-1-m.cerveny@computer.org> X-Mailman-Approved-At: Thu, 17 Sep 2020 14:47:20 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Weird code or comment. This is variant is tested on V3s. Signed-off-by: Martin Cerveny --- 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