Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 45B1DC6FA8E for ; Sun, 26 Feb 2023 18:21:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 857DD859B6; Sun, 26 Feb 2023 19:20:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="IDe+5oly"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9A5058591C; Sun, 26 Feb 2023 19:20:38 +0100 (CET) Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3230685997 for ; Sun, 26 Feb 2023 19:20:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=clamor95@gmail.com Received: by mail-lf1-x132.google.com with SMTP id m6so5707755lfq.5 for ; Sun, 26 Feb 2023 10:20:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zCtc74Y6YiPzkH5mMpiQ1oDdcynzo0UYVH4esSCPExA=; b=IDe+5olyvvzP9CM9EsjI/DoRWCl8p2cfxD0p5ChRJhpnlTbNFJZlaq8YuhGSj4Xwqu gNaV/LbQ2JbqFiyvLrAodLx4sNiOqEqq5TXSCgVPa3niceAVEaV7yq9+B5yEved6t5jV zEg3XfdmVt6FMplVWXbJI1HPDL+rZe/e4p0EL0VM7vA8rVipWjG+WyXu8xwPqT7fFSyl 9H4Sm0qQfW0n5DMSTeRhfv6HViNI62H8LfEdvgSmnGmBtJ0cXzwtwulIWPoUKbRly/wl ctr/J0Nyj3i+A3F9WkmcHyz9hP5ldzhasT9Z5h7mdA688f0a5f5YRWRCPPELXa88prgS 73aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zCtc74Y6YiPzkH5mMpiQ1oDdcynzo0UYVH4esSCPExA=; b=yCjAbiXbLJpgsyZAmoH2EGWztzU0N3kogulRYQilTKmC//CyyoKhGInEexTh0uQ4SM +z+2d7df7BRSlya4SmdrXD4PypG7K9RjTrVBQNv+QHZveRDnVA+o93jFR2QYYNq8uVPx WRygMTH6jI0GD5eRy9oC0stXUXhFiuJnVaTbqx8vUbm4Be7nSKIeMZdHE4kYMsgTkVhR xMfDD6dYDIzkSMi7XH608QsQITVUo3z+Wv74t4pGYi3wiFX2bpigLZwP9SGlWblvSnaa In49sGUNfElV78uCgE1TdPoGGTlSc3hSnoAfI5svyR9pHrsUuqmmVPJRZX2nwgvpC7En edtw== X-Gm-Message-State: AO0yUKXRZBci6wp7Oogr6OS/BBjjPit7ACkKqaZgpvoTtU/RuruSqf9B tGnOH3Jm/GU0glX/u98PP7uRkNl4hys= X-Google-Smtp-Source: AK7set9nAYukGi+QOfhlEU/TtobXxEtJdpCqamOwG/uvUykgPvSwoUUUliMNmWqxdzyin6ehsh2+PQ== X-Received: by 2002:a19:ad48:0:b0:4b5:b46d:e60 with SMTP id s8-20020a19ad48000000b004b5b46d0e60mr6671645lfd.27.1677435634448; Sun, 26 Feb 2023 10:20:34 -0800 (PST) Received: from xeon.. ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id x25-20020ac259d9000000b004dc4d984911sm619421lfn.271.2023.02.26.10.20.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 10:20:34 -0800 (PST) From: Svyatoslav Ryhel To: Tom Warren , Anatolij Gustschin , Simon Glass , Svyatoslav Ryhel , Marcel Ziswiler , Thierry Reding , Maxim Schwalm , Dmitry Osipenko , Nicolas Chauvet Cc: u-boot@lists.denx.de Subject: [PATCH v2 05/11] video: tegra-dc: assign regmap directly Date: Sun, 26 Feb 2023 20:19:59 +0200 Message-Id: <20230226182005.27291-6-clamor95@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230226182005.27291-1-clamor95@gmail.com> References: <20230226182005.27291-1-clamor95@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean Tested-by: Robert Eckelmann # ASUS TF101 T20 Tested-by: Nicolas Chauvet # Paz00 Tested-by: Andreas Westman Dorcsak # ASUS TF T30 Tested-by: Svyatoslav Ryhel # LG P895 T30 Signed-off-by: Svyatoslav Ryhel --- drivers/video/tegra20/tegra-dc.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/video/tegra20/tegra-dc.c b/drivers/video/tegra20/tegra-dc.c index 91298b7b7f..e004ee362f 100644 --- a/drivers/video/tegra20/tegra-dc.c +++ b/drivers/video/tegra20/tegra-dc.c @@ -33,7 +33,7 @@ struct tegra_lcd_priv { enum video_log2_bpp log2_bpp; /* colour depth */ struct display_timing timing; struct udevice *panel; - struct disp_ctlr *disp; /* Display controller to use */ + struct dc_ctlr *dc; /* Display controller regmap */ fdt_addr_t frame_buffer; /* Address of frame buffer */ unsigned pixel_clock; /* Pixel clock in Hz */ int dc_clk[2]; /* Contains clk and its parent */ @@ -269,13 +269,10 @@ static int tegra_display_probe(const void *blob, struct tegra_lcd_priv *priv, void *default_lcd_base) { struct disp_ctl_win window; - struct dc_ctlr *dc; unsigned long rate = clock_get_rate(priv->dc_clk[1]); priv->frame_buffer = (u32)default_lcd_base; - dc = (struct dc_ctlr *)priv->disp; - /* * We halve the rate if DISP1 paret is PLLD, since actual parent * is plld_out0 which is PLLD divided by 2. @@ -291,17 +288,17 @@ static int tegra_display_probe(const void *blob, struct tegra_lcd_priv *priv, clock_start_periph_pll(priv->dc_clk[0], priv->dc_clk[1], rate); - basic_init(&dc->cmd); - basic_init_timer(&dc->disp); - rgb_enable(&dc->com); + basic_init(&priv->dc->cmd); + basic_init_timer(&priv->dc->disp); + rgb_enable(&priv->dc->com); if (priv->pixel_clock) - update_display_mode(&dc->disp, priv); + update_display_mode(&priv->dc->disp, priv); if (setup_window(&window, priv)) return -1; - update_window(dc, &window); + update_window(priv->dc, &window); return 0; } @@ -360,8 +357,8 @@ static int tegra_lcd_of_to_plat(struct udevice *dev) int rgb; int ret; - priv->disp = dev_read_addr_ptr(dev); - if (!priv->disp) { + priv->dc = (struct dc_ctlr *)dev_read_addr_ptr(dev); + if (!priv->dc) { debug("%s: No display controller address\n", __func__); return -EINVAL; } -- 2.37.2