]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
video: tegra20: consolidate DC header
authorSvyatoslav Ryhel <clamor95@gmail.com>
Tue, 23 Jan 2024 17:16:18 +0000 (19:16 +0200)
committerAnatolij Gustschin <agust@denx.de>
Sun, 21 Apr 2024 07:07:01 +0000 (09:07 +0200)
Consolidate HD headers and place the result into video/tegra20
since it is used only by devices from this directory.

Tested-by: Agneli <poczt@protonmail.ch> # Toshiba AC100 T20
Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101
Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS Grouper E1565
Tested-by: Ion Agorria <ion@agorria.com> # HTC One X
Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # Nvidia Tegratab T114
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
arch/arm/include/asm/arch-tegra/dc.h
arch/arm/include/asm/arch-tegra114/display.h [deleted file]
arch/arm/include/asm/arch-tegra20/display.h [deleted file]
arch/arm/include/asm/arch-tegra30/display.h [deleted file]
drivers/video/tegra20/tegra-dc.c
drivers/video/tegra20/tegra-dc.h [new file with mode: 0644]
drivers/video/tegra20/tegra-dsi.c
drivers/video/tegra20/tegra-pwm-backlight.c

index 7613d84f221fd9e626fff598541fc63f0b4dd22a..6444af2993a033de27285102bc66be9b3b551a39 100644 (file)
@@ -569,12 +569,4 @@ enum {
 #define DC_N_WINDOWS                   5
 #define DC_REG_SAVE_SPACE              (DC_N_WINDOWS + 5)
 
-#define TEGRA_DSI_A            "dsi@54300000"
-#define TEGRA_DSI_B            "dsi@54400000"
-
-struct tegra_dc_plat {
-       struct udevice *dev;            /* Display controller device */
-       struct dc_ctlr *dc;             /* Display controller regmap */
-};
-
 #endif /* __ASM_ARCH_TEGRA_DC_H */
diff --git a/arch/arm/include/asm/arch-tegra114/display.h b/arch/arm/include/asm/arch-tegra114/display.h
deleted file mode 100644 (file)
index 9411525..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- *  (C) Copyright 2010
- *  NVIDIA Corporation <www.nvidia.com>
- */
-
-#ifndef __ASM_ARCH_TEGRA_DISPLAY_H
-#define __ASM_ARCH_TEGRA_DISPLAY_H
-
-#include <asm/arch-tegra/dc.h>
-
-/* This holds information about a window which can be displayed */
-struct disp_ctl_win {
-       enum win_color_depth_id fmt;    /* Color depth/format */
-       unsigned int    bpp;            /* Bits per pixel */
-       phys_addr_t     phys_addr;      /* Physical address in memory */
-       unsigned int    x;              /* Horizontal address offset (bytes) */
-       unsigned int    y;              /* Veritical address offset (bytes) */
-       unsigned int    w;              /* Width of source window */
-       unsigned int    h;              /* Height of source window */
-       unsigned int    stride;         /* Number of bytes per line */
-       unsigned int    out_x;          /* Left edge of output window (col) */
-       unsigned int    out_y;          /* Top edge of output window (row) */
-       unsigned int    out_w;          /* Width of output window in pixels */
-       unsigned int    out_h;          /* Height of output window in pixels */
-};
-
-#endif /*__ASM_ARCH_TEGRA_DISPLAY_H*/
diff --git a/arch/arm/include/asm/arch-tegra20/display.h b/arch/arm/include/asm/arch-tegra20/display.h
deleted file mode 100644 (file)
index e7b3cff..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- *  (C) Copyright 2010
- *  NVIDIA Corporation <www.nvidia.com>
- */
-
-#ifndef __ASM_ARCH_TEGRA_DISPLAY_H
-#define __ASM_ARCH_TEGRA_DISPLAY_H
-
-#include <asm/arch-tegra/dc.h>
-
-/* This holds information about a window which can be displayed */
-struct disp_ctl_win {
-       enum win_color_depth_id fmt;    /* Color depth/format */
-       unsigned        bpp;            /* Bits per pixel */
-       phys_addr_t     phys_addr;      /* Physical address in memory */
-       unsigned        x;              /* Horizontal address offset (bytes) */
-       unsigned        y;              /* Veritical address offset (bytes) */
-       unsigned        w;              /* Width of source window */
-       unsigned        h;              /* Height of source window */
-       unsigned        stride;         /* Number of bytes per line */
-       unsigned        out_x;          /* Left edge of output window (col) */
-       unsigned        out_y;          /* Top edge of output window (row) */
-       unsigned        out_w;          /* Width of output window in pixels */
-       unsigned        out_h;          /* Height of output window in pixels */
-};
-
-#endif /*__ASM_ARCH_TEGRA_DISPLAY_H*/
diff --git a/arch/arm/include/asm/arch-tegra30/display.h b/arch/arm/include/asm/arch-tegra30/display.h
deleted file mode 100644 (file)
index 9411525..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- *  (C) Copyright 2010
- *  NVIDIA Corporation <www.nvidia.com>
- */
-
-#ifndef __ASM_ARCH_TEGRA_DISPLAY_H
-#define __ASM_ARCH_TEGRA_DISPLAY_H
-
-#include <asm/arch-tegra/dc.h>
-
-/* This holds information about a window which can be displayed */
-struct disp_ctl_win {
-       enum win_color_depth_id fmt;    /* Color depth/format */
-       unsigned int    bpp;            /* Bits per pixel */
-       phys_addr_t     phys_addr;      /* Physical address in memory */
-       unsigned int    x;              /* Horizontal address offset (bytes) */
-       unsigned int    y;              /* Veritical address offset (bytes) */
-       unsigned int    w;              /* Width of source window */
-       unsigned int    h;              /* Height of source window */
-       unsigned int    stride;         /* Number of bytes per line */
-       unsigned int    out_x;          /* Left edge of output window (col) */
-       unsigned int    out_y;          /* Top edge of output window (row) */
-       unsigned int    out_w;          /* Width of output window in pixels */
-       unsigned int    out_h;          /* Height of output window in pixels */
-};
-
-#endif /*__ASM_ARCH_TEGRA_DISPLAY_H*/
index bcc274862389589013b3af16d31dba672749b059..5d8874f323abb14e39c85f036866e4db88a94982 100644 (file)
@@ -21,7 +21,8 @@
 #include <asm/arch/funcmux.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch/pwm.h>
-#include <asm/arch/display.h>
+
+#include "tegra-dc.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/video/tegra20/tegra-dc.h b/drivers/video/tegra20/tegra-dc.h
new file mode 100644 (file)
index 0000000..5c05221
--- /dev/null
@@ -0,0 +1,41 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ *  (C) Copyright 2010
+ *  NVIDIA Corporation <www.nvidia.com>
+ */
+
+#ifndef _TEGRA_DC_H
+#define _TEGRA_DC_H
+
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
+/* arch-tegra/dc exists only because T124 uses it */
+#include <asm/arch-tegra/dc.h>
+
+#define TEGRA_DSI_A            "dsi@54300000"
+#define TEGRA_DSI_B            "dsi@54400000"
+
+struct tegra_dc_plat {
+       struct udevice *dev;            /* Display controller device */
+       struct dc_ctlr *dc;             /* Display controller regmap */
+};
+
+/* This holds information about a window which can be displayed */
+struct disp_ctl_win {
+       enum win_color_depth_id fmt;    /* Color depth/format */
+       unsigned int bpp;               /* Bits per pixel */
+       phys_addr_t phys_addr;          /* Physical address in memory */
+       unsigned int x;                 /* Horizontal address offset (bytes) */
+       unsigned int y;                 /* Veritical address offset (bytes) */
+       unsigned int w;                 /* Width of source window */
+       unsigned int h;                 /* Height of source window */
+       unsigned int stride;            /* Number of bytes per line */
+       unsigned int out_x;             /* Left edge of output window (col) */
+       unsigned int out_y;             /* Top edge of output window (row) */
+       unsigned int out_w;             /* Width of output window in pixels */
+       unsigned int out_h;             /* Height of output window in pixels */
+};
+
+#endif /* _TEGRA_DC_H */
index a48f9c85d0fdced5b882509feec16545ea4fe3b5..72b91ed26bfb1e5fb3f5b1e3965614914b82cd14 100644 (file)
@@ -20,9 +20,9 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
-#include <asm/arch/display.h>
 #include <asm/arch-tegra30/dsi.h>
 
+#include "tegra-dc.h"
 #include "mipi-phy.h"
 
 struct tegra_dsi_priv {
index bb677daa8a1b305dbf20248edc11224a9ada155a..5f93f57fe9086bf2a55f9cf5a82727edcb01b2bd 100644 (file)
@@ -15,7 +15,8 @@
 
 #include <asm/io.h>
 #include <asm/gpio.h>
-#include <asm/arch/display.h>
+
+#include "tegra-dc.h"
 
 #define TEGRA_DISPLAY_A_BASE           0x54200000
 #define TEGRA_DISPLAY_B_BASE           0x54240000