]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
video: Move HP PARISC STI core code to shared location
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 17 Apr 2023 12:56:43 +0000 (14:56 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 20 Apr 2023 08:04:51 +0000 (10:04 +0200)
STI core files have been located in console and fbdev code. Move
the source code and header to the directories for video helpers.
Also update the config and build rules such that the code depends
on the config symbol CONFIG_STI_CORE, which STI console and STI
framebuffer select automatically.

Cleans up the console makefile and prepares PARISC to implement
fb_is_primary_device() within the arch/ directory. No functional
changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230417125651.25126-12-tzimmermann@suse.de
drivers/video/Kconfig
drivers/video/Makefile
drivers/video/console/Kconfig
drivers/video/console/Makefile
drivers/video/console/sticon.c
drivers/video/fbdev/Kconfig
drivers/video/fbdev/stifb.c
drivers/video/sticore.c [moved from drivers/video/console/sticore.c with 99% similarity]
include/video/sticore.h [moved from drivers/video/fbdev/sticore.h with 100% similarity]

index bf05363d890626485617a9f917dba92fd7351464..8b2b9ac37c3df5e4184bb46320993d1c4ad2472e 100644 (file)
@@ -11,6 +11,13 @@ config APERTURE_HELPERS
          Support tracking and hand-over of aperture ownership. Required
          by graphics drivers for firmware-provided framebuffers.
 
+config STI_CORE
+       bool
+       depends on PARISC
+       help
+         STI refers to the HP "Standard Text Interface" which is a set of
+         BIOS routines contained in a ROM chip in HP PA-RISC based machines.
+
 config VIDEO_CMDLINE
        bool
 
index 831c9fa57a6c94f0a9f61a2eb13cc34f05bfa302..6bbc039508995ee9b027ab19571d9db53c75e6d9 100644 (file)
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_APERTURE_HELPERS)    += aperture.o
+obj-$(CONFIG_STI_CORE)            += sticore.o
 obj-$(CONFIG_VGASTATE)            += vgastate.o
 obj-$(CONFIG_VIDEO_CMDLINE)       += cmdline.o
 obj-$(CONFIG_VIDEO_NOMODESET)     += nomodeset.o
index 22cea5082ac4610ba5a248b47bceb8dec3630e8d..a2a88d42edf0cdaef1354856f58c7488dff070e2 100644 (file)
@@ -141,6 +141,7 @@ config STI_CONSOLE
        depends on PARISC && HAS_IOMEM
        select FONT_SUPPORT
        select CRC32
+       select STI_CORE
        default y
        help
          The STI console is the builtin display/keyboard on HP-PARISC
index db07b784bd2ccdcbffde933926ed5cee2bbbc7d4..fd79016a0d95b41cbbd0411a2c8c2b183e36db69 100644 (file)
@@ -5,8 +5,6 @@
 
 obj-$(CONFIG_DUMMY_CONSOLE)       += dummycon.o
 obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o
-obj-$(CONFIG_STI_CONSOLE)         += sticon.o sticore.o
+obj-$(CONFIG_STI_CONSOLE)         += sticon.o
 obj-$(CONFIG_VGA_CONSOLE)         += vgacon.o
 obj-$(CONFIG_MDA_CONSOLE)         += mdacon.o
-
-obj-$(CONFIG_FB_STI)              += sticore.o
index 89ad7ade6cf9fb5c72b81a6e7ced40eface7fcaa..d11cfd2d68b54fd2271628a643394927f66b740d 100644 (file)
@@ -50,7 +50,7 @@
 
 #include <asm/io.h>
 
-#include "../fbdev/sticore.h"
+#include <video/sticore.h>
 
 /* switching to graphics mode */
 #define BLANK 0
index 96e91570cdd3294041c79b25edb62df08331538c..485e8c35d5c683021278e8f6d545942ef3575116 100644 (file)
@@ -551,10 +551,9 @@ config FB_STI
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
+       select STI_CORE
        default y
        help
-         STI refers to the HP "Standard Text Interface" which is a set of
-         BIOS routines contained in a ROM chip in HP PA-RISC based machines.
          Enabling this option will implement the linux framebuffer device
          using calls to the STI BIOS routines for initialisation.
 
index 99996bc7e6d97f90779c74df81bee69b58c8d6b0..baca6974e288ee1acefc99d126cda57b5a3c982b 100644 (file)
@@ -69,7 +69,7 @@
 #include <asm/grfioctl.h>      /* for HP-UX compatibility */
 #include <linux/uaccess.h>
 
-#include "sticore.h"
+#include <video/sticore.h>
 
 /* REGION_BASE(fb_info, index) returns the virtual address for region <index> */
 #define REGION_BASE(fb_info, index) \
similarity index 99%
rename from drivers/video/console/sticore.c
rename to drivers/video/sticore.c
index 6ea9596a3c4b05c1cba5d41c12ebf52082d886f9..f8aaedea437d1d0023a80916f1fb41588ae0377b 100644 (file)
@@ -32,7 +32,7 @@
 #include <asm/grfioctl.h>
 #include <asm/fb.h>
 
-#include "../fbdev/sticore.h"
+#include <video/sticore.h>
 
 #define STI_DRIVERVERSION "Version 0.9c"