From patchwork Mon Apr 27 15:53:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1277761 X-Patchwork-Delegate: sbabic@denx.de 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=N/KRYJub; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 499q7W670sz9sP7 for ; Tue, 28 Apr 2020 01:53:27 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 562C081EA1; Mon, 27 Apr 2020 17:53:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="N/KRYJub"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 011A881E60; Mon, 27 Apr 2020 17:53:13 +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,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from smtpcmd0641.aruba.it (smtpcmd0641.aruba.it [62.149.156.41]) by phobos.denx.de (Postfix) with ESMTP id 2E1EA81E58 for ; Mon, 27 Apr 2020 17:53:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([146.241.0.34]) by smtpcmd06.ad.aruba.it with bizsmtp id Xrt72200X0k18fm01rt8Um; Mon, 27 Apr 2020 17:53:08 +0200 From: Giulio Benetti To: Stefano Babic Cc: Fabio Estevam , "NXP i.MX U-Boot Team" , Lukasz Majewski , Anatolij Gustschin , u-boot@lists.denx.de, Giulio Benetti Subject: [PATCH v3 3/4] video: mxsfb: add clk_enable() Date: Mon, 27 Apr 2020 17:53:05 +0200 Message-Id: <20200427155306.105284-4-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200427155306.105284-1-giulio.benetti@benettiengineering.com> References: <20200427155306.105284-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1588002788; bh=E4JBgNRl0ckXfAaXxvdboo0ZCPBIQdvfPKQb8etPCKk=; h=From:To:Subject:Date:MIME-Version; b=N/KRYJubnehVWRBcZUq36Dt97IKdhCVm5MPSAjHWr7bXwAvr3n7TpAE7bpBsUWXQo DJ7KhTZOmR+cJTIJrzMdH5csP7KExwbEMERysRJZC2rOo+ZHgi2b21elkVaB3gvHHC u/c+BQLRFnQb05co+AjizQrsaik1Et+4cS/ojfc1hgR+Vds1NM9Y/5f0PB2SqOggml oiO31O+J6LOeE8ucnvrTc5aqRm3H/HBipDvpKBak+XVfM4Md7AeISW9x8VifrMQXJl QHF8LWju0UNtaFIEAhXiSpurwvK5OcijYf7NCUUDpIK2nIDnedqraxE0iyXfXxgZlc jakrEdcYBRC/w== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.2 at phobos.denx.de X-Virus-Status: Clean BROM doesn't enable lcdif by default so add clk_enable() after clk_set_rate(). Signed-off-by: Giulio Benetti Reviewed-by: Anatolij Gustschin Reviewed-by: Fabio Estevam --- V1->V2: * call clk_enable() after clk_set_rate() as suggested by Fabio --- drivers/video/mxsfb.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 8a5a61c9fb..12d00b4689 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -77,6 +77,12 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr, dev_err(dev, "Failed to set mxs clk: %d\n", ret); return; } + + ret = clk_enable(&per_clk); + if (ret < 0) { + dev_err(dev, "Failed to enable mxs clk: %d\n", ret); + return; + } #else /* Kick in the LCDIF clock */ mxs_set_lcdclk(MXS_LCDIF_BASE, timings->pixelclock.typ / 1000);