From patchwork Tue Jun 9 20:04:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 187705 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp859363ilo; Tue, 9 Jun 2020 13:08:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2kK4lBDGENuWb9DoPuaVpjRiAJ7z+sE/WUa0EGW3toznamLjXtIai1Z6cYAb51nnNty+B X-Received: by 2002:a63:689:: with SMTP id 131mr23406851pgg.401.1591733295602; Tue, 09 Jun 2020 13:08:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591733295; cv=none; d=google.com; s=arc-20160816; b=qV2kDlAweyO+xB9jTR3OEsaiqOM0f9zTbvizVxx67nJ6t8crrGBa/E9ntwK5w1F+kg LoxVnIq4jGWwgs/Oh2iAFrn8mmFxVs89cRIaohmZkqq2zd6NjMCw4gJd5DVgOyDQl1p8 OBtQZ36e67aKdPHDfi/uKwxgtIO683VtwNzTTC5zt/BcDWPaiDQqHZcJq8eYs6WyfVKT M/Qbe+nyhnTA8PZubcwIjn0eOLjVFp/Kh+xP6VtaFCrNXnJR8ZxlVbtarPvAMF6sOdVw ukZ+WqtZs6fpprZsGQSIg0+ruH3eM6gM7R7obijx5jBK0ncnWdGf6BNJaBh+tSuhp3SS +xag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=HCNFdtYZsj6b+DkRUtCOvhEofcwXiR4Q8gbBIU/btW4=; b=c8pAqboujvol9QWuA2vmcUs19DWWdVFNmn2FLik0O+NF89r70K+Q+g8X2vpuekrv3R GZIgFIa7ouBomGpQaKHzLxThUoXiljOpktUCQJBm5a84/WB0lWj7/P1WL8tRW2gLCVSA CuYb6BsUTHYmxqDAqL5WPSpaDn/Yp4YWVtDKCkvIyx5XnB4FcJUOqw0h8AzzI7aBULih Xrq5iGN/EpXdMakiNvKHer7wd9u/VTSj5+HEFmgeF39t9pp1mFZ1MbUKlWHtdPJteMHG 9VF2EMXF8oGRZSDGHWkGP+uw4lRKQ7IUfs+Os2GYjp6N5PPv2Y2bIF/p77fk2sfKkwQH mguw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=sl706ULm; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id j197si8161893pgc.87.2020.06.09.13.08.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 13:08:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=sl706ULm; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CDF28897B4; Tue, 9 Jun 2020 20:08:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id A7A28896FA for ; Tue, 9 Jun 2020 20:08:09 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id q19so3992622lji.2 for ; Tue, 09 Jun 2020 13:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GRhNHIEn/ofCyr7rDVzfcw/M3Z+1q2HFWwIyPzEBsHo=; b=sl706ULmQRRB6ijvUJm4R63nyXBJWpbbhjZYSRZBueNSmr1q95llpoY8V+z4KdgP9F i1gDPi9yKjIVuoz1A0/bthrZifxAGn5leEllUrV4R63TiAjdgebPziehX1UVei1HVUWr nxrWSDNScu41YJu1Be+Q3AQ/q21ruJ/45z700iRaGEXa6xnAjQLgrwGRz5RyFtUCTWGo +86dO8kpn7E4Qwuf8+viCqp/uxNpLlfcp4fyqLVsvRDxPl1guKRDhcGB6dww1MIFXK8q XLTAdvRC56T90S9oGVFUIq+Tn32eWWrT1Vn5hLWwL6/PuCvCFtAdj1QbahWqG6lUCxH1 mJ+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GRhNHIEn/ofCyr7rDVzfcw/M3Z+1q2HFWwIyPzEBsHo=; b=uG6qff+TzbR/rM0RGcPWoUOKXDdSy25DXjL+DT2Rxm4C0M6JW05SvR8yFkFdvP3Ee1 q7FOemkYvGBNVP7xeLAtUdj/OV5zndvIIJsNtEnK7wG6x40AT0NmL/XnAWg8Mx3YtB6b M4iBli0jFLuWGVTt/qJPZuS/rT0wVooczlEF301EYOGpXRdzJaj8c43X2DPRn/aPwQel n+W0kSmhFZGIKHk3BZF+6Mfi86pUeKmA1mOaIjjI64tKBgyNPSvzFsbU4Mg9xeLGxlJO FA6toyZc7d+QWKvZZU3P5bd6VHV6WwL23syPz/r6U1eZXMw0zzDGm+9cv/OlUSZHRRrC s7Lg== X-Gm-Message-State: AOAM531BvbBT0pq+dMtlYj/4PPdrqqM56Jcn3T2AgLY0WWzQ/92rUlib BacgZNr+aXEd1h06g6DhCw9mrv4GG4I= X-Received: by 2002:a2e:8e94:: with SMTP id z20mr13149877ljk.21.1591733287664; Tue, 09 Jun 2020 13:08:07 -0700 (PDT) Received: from localhost.localdomain (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id 66sm6038579lfk.54.2020.06.09.13.08.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 13:08:06 -0700 (PDT) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Sean Paul , Eric Anholt , Russell King Subject: [PATCH 3/4] drm: pl111: Absorb the external register header Date: Tue, 9 Jun 2020 22:04:45 +0200 Message-Id: <20200609200446.153209-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200609200446.153209-1-linus.walleij@linaro.org> References: <20200609200446.153209-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The PL111 DRM driver is now the sole user of the external CLCD registers header file, so let's absorb that into the pl111_drm.h file and save the external include. Cc: Russell King Signed-off-by: Linus Walleij --- drivers/gpu/drm/pl111/pl111_debugfs.c | 1 - drivers/gpu/drm/pl111/pl111_display.c | 1 - drivers/gpu/drm/pl111/pl111_drm.h | 73 +++++++++++++++++++++ drivers/gpu/drm/pl111/pl111_drv.c | 1 - drivers/gpu/drm/pl111/pl111_versatile.c | 1 - include/linux/amba/clcd-regs.h | 87 ------------------------- 6 files changed, 73 insertions(+), 91 deletions(-) delete mode 100644 include/linux/amba/clcd-regs.h diff --git a/drivers/gpu/drm/pl111/pl111_debugfs.c b/drivers/gpu/drm/pl111/pl111_debugfs.c index 26ca8cdf3e60..317f68abf18b 100644 --- a/drivers/gpu/drm/pl111/pl111_debugfs.c +++ b/drivers/gpu/drm/pl111/pl111_debugfs.c @@ -3,7 +3,6 @@ * Copyright © 2017 Broadcom */ -#include #include #include diff --git a/drivers/gpu/drm/pl111/pl111_display.c b/drivers/gpu/drm/pl111/pl111_display.c index 703ddc803c55..b3e8697cafcf 100644 --- a/drivers/gpu/drm/pl111/pl111_display.c +++ b/drivers/gpu/drm/pl111/pl111_display.c @@ -9,7 +9,6 @@ * Copyright (C) 2011 Texas Instruments */ -#include #include #include #include diff --git a/drivers/gpu/drm/pl111/pl111_drm.h b/drivers/gpu/drm/pl111/pl111_drm.h index ba399bcb792f..24df72afeb0d 100644 --- a/drivers/gpu/drm/pl111/pl111_drm.h +++ b/drivers/gpu/drm/pl111/pl111_drm.h @@ -23,6 +23,79 @@ #include #include +/* + * CLCD Controller Internal Register addresses + */ +#define CLCD_TIM0 0x00000000 +#define CLCD_TIM1 0x00000004 +#define CLCD_TIM2 0x00000008 +#define CLCD_TIM3 0x0000000c +#define CLCD_UBAS 0x00000010 +#define CLCD_LBAS 0x00000014 + +#define CLCD_PL110_IENB 0x00000018 +#define CLCD_PL110_CNTL 0x0000001c +#define CLCD_PL110_STAT 0x00000020 +#define CLCD_PL110_INTR 0x00000024 +#define CLCD_PL110_UCUR 0x00000028 +#define CLCD_PL110_LCUR 0x0000002C + +#define CLCD_PL111_CNTL 0x00000018 +#define CLCD_PL111_IENB 0x0000001c +#define CLCD_PL111_RIS 0x00000020 +#define CLCD_PL111_MIS 0x00000024 +#define CLCD_PL111_ICR 0x00000028 +#define CLCD_PL111_UCUR 0x0000002c +#define CLCD_PL111_LCUR 0x00000030 + +#define CLCD_PALL 0x00000200 +#define CLCD_PALETTE 0x00000200 + +#define TIM2_PCD_LO_MASK GENMASK(4, 0) +#define TIM2_PCD_LO_BITS 5 +#define TIM2_CLKSEL (1 << 5) +#define TIM2_ACB_MASK GENMASK(10, 6) +#define TIM2_IVS (1 << 11) +#define TIM2_IHS (1 << 12) +#define TIM2_IPC (1 << 13) +#define TIM2_IOE (1 << 14) +#define TIM2_BCD (1 << 26) +#define TIM2_PCD_HI_MASK GENMASK(31, 27) +#define TIM2_PCD_HI_BITS 5 +#define TIM2_PCD_HI_SHIFT 27 + +#define CNTL_LCDEN (1 << 0) +#define CNTL_LCDBPP1 (0 << 1) +#define CNTL_LCDBPP2 (1 << 1) +#define CNTL_LCDBPP4 (2 << 1) +#define CNTL_LCDBPP8 (3 << 1) +#define CNTL_LCDBPP16 (4 << 1) +#define CNTL_LCDBPP16_565 (6 << 1) +#define CNTL_LCDBPP16_444 (7 << 1) +#define CNTL_LCDBPP24 (5 << 1) +#define CNTL_LCDBW (1 << 4) +#define CNTL_LCDTFT (1 << 5) +#define CNTL_LCDMONO8 (1 << 6) +#define CNTL_LCDDUAL (1 << 7) +#define CNTL_BGR (1 << 8) +#define CNTL_BEBO (1 << 9) +#define CNTL_BEPO (1 << 10) +#define CNTL_LCDPWR (1 << 11) +#define CNTL_LCDVCOMP(x) ((x) << 12) +#define CNTL_LDMAFIFOTIME (1 << 15) +#define CNTL_WATERMARK (1 << 16) + +/* ST Microelectronics variant bits */ +#define CNTL_ST_1XBPP_444 0x0 +#define CNTL_ST_1XBPP_5551 (1 << 17) +#define CNTL_ST_1XBPP_565 (1 << 18) +#define CNTL_ST_CDWID_12 0x0 +#define CNTL_ST_CDWID_16 (1 << 19) +#define CNTL_ST_CDWID_18 (1 << 20) +#define CNTL_ST_CDWID_24 ((1 << 19)|(1 << 20)) +#define CNTL_ST_CEAEN (1 << 21) +#define CNTL_ST_LCDBPP24_PACKED (6 << 1) + #define CLCD_IRQ_NEXTBASE_UPDATE BIT(2) struct drm_minor; diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c index da0c39dae874..96e58fda75d8 100644 --- a/drivers/gpu/drm/pl111/pl111_drv.c +++ b/drivers/gpu/drm/pl111/pl111_drv.c @@ -47,7 +47,6 @@ */ #include -#include #include #include #include diff --git a/drivers/gpu/drm/pl111/pl111_versatile.c b/drivers/gpu/drm/pl111/pl111_versatile.c index 1127082e9a60..bdd883f4f0da 100644 --- a/drivers/gpu/drm/pl111/pl111_versatile.c +++ b/drivers/gpu/drm/pl111/pl111_versatile.c @@ -9,7 +9,6 @@ * Major contributions and discoveries by Russell King. */ -#include #include #include #include diff --git a/include/linux/amba/clcd-regs.h b/include/linux/amba/clcd-regs.h deleted file mode 100644 index 421b0fa90d6a..000000000000 --- a/include/linux/amba/clcd-regs.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * David A Rusling - * - * Copyright (C) 2001 ARM Limited - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - */ - -#ifndef AMBA_CLCD_REGS_H -#define AMBA_CLCD_REGS_H - -/* - * CLCD Controller Internal Register addresses - */ -#define CLCD_TIM0 0x00000000 -#define CLCD_TIM1 0x00000004 -#define CLCD_TIM2 0x00000008 -#define CLCD_TIM3 0x0000000c -#define CLCD_UBAS 0x00000010 -#define CLCD_LBAS 0x00000014 - -#define CLCD_PL110_IENB 0x00000018 -#define CLCD_PL110_CNTL 0x0000001c -#define CLCD_PL110_STAT 0x00000020 -#define CLCD_PL110_INTR 0x00000024 -#define CLCD_PL110_UCUR 0x00000028 -#define CLCD_PL110_LCUR 0x0000002C - -#define CLCD_PL111_CNTL 0x00000018 -#define CLCD_PL111_IENB 0x0000001c -#define CLCD_PL111_RIS 0x00000020 -#define CLCD_PL111_MIS 0x00000024 -#define CLCD_PL111_ICR 0x00000028 -#define CLCD_PL111_UCUR 0x0000002c -#define CLCD_PL111_LCUR 0x00000030 - -#define CLCD_PALL 0x00000200 -#define CLCD_PALETTE 0x00000200 - -#define TIM2_PCD_LO_MASK GENMASK(4, 0) -#define TIM2_PCD_LO_BITS 5 -#define TIM2_CLKSEL (1 << 5) -#define TIM2_ACB_MASK GENMASK(10, 6) -#define TIM2_IVS (1 << 11) -#define TIM2_IHS (1 << 12) -#define TIM2_IPC (1 << 13) -#define TIM2_IOE (1 << 14) -#define TIM2_BCD (1 << 26) -#define TIM2_PCD_HI_MASK GENMASK(31, 27) -#define TIM2_PCD_HI_BITS 5 -#define TIM2_PCD_HI_SHIFT 27 - -#define CNTL_LCDEN (1 << 0) -#define CNTL_LCDBPP1 (0 << 1) -#define CNTL_LCDBPP2 (1 << 1) -#define CNTL_LCDBPP4 (2 << 1) -#define CNTL_LCDBPP8 (3 << 1) -#define CNTL_LCDBPP16 (4 << 1) -#define CNTL_LCDBPP16_565 (6 << 1) -#define CNTL_LCDBPP16_444 (7 << 1) -#define CNTL_LCDBPP24 (5 << 1) -#define CNTL_LCDBW (1 << 4) -#define CNTL_LCDTFT (1 << 5) -#define CNTL_LCDMONO8 (1 << 6) -#define CNTL_LCDDUAL (1 << 7) -#define CNTL_BGR (1 << 8) -#define CNTL_BEBO (1 << 9) -#define CNTL_BEPO (1 << 10) -#define CNTL_LCDPWR (1 << 11) -#define CNTL_LCDVCOMP(x) ((x) << 12) -#define CNTL_LDMAFIFOTIME (1 << 15) -#define CNTL_WATERMARK (1 << 16) - -/* ST Microelectronics variant bits */ -#define CNTL_ST_1XBPP_444 0x0 -#define CNTL_ST_1XBPP_5551 (1 << 17) -#define CNTL_ST_1XBPP_565 (1 << 18) -#define CNTL_ST_CDWID_12 0x0 -#define CNTL_ST_CDWID_16 (1 << 19) -#define CNTL_ST_CDWID_18 (1 << 20) -#define CNTL_ST_CDWID_24 ((1 << 19)|(1 << 20)) -#define CNTL_ST_CEAEN (1 << 21) -#define CNTL_ST_LCDBPP24_PACKED (6 << 1) - -#endif /* AMBA_CLCD_REGS_H */