]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
drivers/pl011: Rename `libukconsole_pl011` to `libpl011`
authorSimon Kuenzer <simon@unikraft.io>
Thu, 19 Sep 2024 15:40:40 +0000 (17:40 +0200)
committerUnikraft Bot <monkey@unikraft.io>
Sat, 14 Dec 2024 10:47:46 +0000 (10:47 +0000)
Rename the driver library and driver directory to `libpl011` to provide
a naming scheme that is more appropriate for general purpose devices. The
name `pl011` is considered a precise description of the driver as it is
the name of the actual serial I/O controller.
Configuration options are adopted accordingly.

Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
Reviewed-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Michalis Pappas <michalis@unikraft.io>
GitHub-Closes: #1501

drivers/ukconsole/pl011/Config.uk
drivers/ukconsole/pl011/Makefile.uk
drivers/ukconsole/pl011/pl011.c
plat/kvm/Config.uk

index 735ce48b2ddb6241294435c71be6a8ab374c0215..a0d8b9c934d365eac73c333ac0c9dd8cecc31c0b 100644 (file)
@@ -1,12 +1,12 @@
-menuconfig LIBUKCONSOLE_PL011
+menuconfig LIBPL011
        bool "PrimeCell UART (PL011)"
        depends on ARCH_ARM_64
        depends on LIBUKCONSOLE
        select LIBUKOFW
 
-if LIBUKCONSOLE_PL011
+if LIBPL011
 
-config LIBUKCONSOLE_PL011_EARLY_CONSOLE
+config LIBPL011_EARLY_CONSOLE
        bool "Early console"
        select LIBUKBOOT
        help
index a5fb8290685865a180eb999b0da8e41a0d526d47..03e3a561b2f97c7201b11d96003061014eab0462 100644 (file)
@@ -1,7 +1,7 @@
-$(eval $(call addlib_s,libukconsole_pl011,$(CONFIG_LIBUKCONSOLE_PL011)))
-$(eval $(call addlib_paramprefix,libukconsole_pl011,pl011))
+$(eval $(call addlib_s,libpl011,$(CONFIG_LIBPL011)))
+$(eval $(call addlib_paramprefix,libpl011,pl011))
 
-# TODO Remove as soon as plat dependencies go away
-LIBUKCONSOLE_PL011_CINCLUDES-y  += -I$(UK_PLAT_COMMON_BASE)/include
+# TODO: Remove as soon as plat dependencies go away
+LIBPL011_CINCLUDES-y  += -I$(UK_PLAT_COMMON_BASE)/include
 
-LIBUKCONSOLE_PL011_SRCS-y += $(LIBUKCONSOLE_PL011_BASE)/pl011.c|isr
+LIBPL011_SRCS-y += $(LIBPL011_BASE)/pl011.c|isr
index 8ed2149475dbbf9e7c5b877492b8743c8bc23c5d..2c7badaf5852d5d8ec83c02d3796b4f612424026 100644 (file)
@@ -38,9 +38,9 @@
 #include <uk/errptr.h>
 #endif /* CONFIG_PAGING */
 
-#if CONFIG_LIBUKCONSOLE_PL011_EARLY_CONSOLE
+#if CONFIG_LIBPL011_EARLY_CONSOLE
 #include <uk/boot/earlytab.h>
-#endif /* CONFIG_LIBUKCONSOLE_PL011_EARLY_CONSOLE */
+#endif /* CONFIG_LIBPL011_EARLY_CONSOLE */
 
 /* PL011 UART registers and masks*/
 /* Data register */
@@ -90,11 +90,11 @@ struct pl011_device {
        __u64 base, size;
 };
 
-#if CONFIG_LIBUKCONSOLE_PL011_EARLY_CONSOLE
+#if CONFIG_LIBPL011_EARLY_CONSOLE
 static struct pl011_device earlycon;
 
 UK_LIBPARAM_PARAM_ALIAS(base, &earlycon.base, __u64, "pl011 base");
-#endif /* CONFIG_LIBUKCONSOLE_PL011_EARLY_CONSOLE */
+#endif /* CONFIG_LIBPL011_EARLY_CONSOLE */
 
 /* Macros to access PL011 Registers with base address */
 #define PL011_REG(base, r)             ((__u16 *)((base) + (r)))
@@ -183,7 +183,7 @@ static int pl011_setup(__u64 base)
        return 0;
 }
 
-#if CONFIG_LIBUKCONSOLE_PL011_EARLY_CONSOLE
+#if CONFIG_LIBPL011_EARLY_CONSOLE
 static inline int config_fdt_chosen_stdout(const void *dtb)
 {
        __u64 base, size;
@@ -262,7 +262,7 @@ static int early_init(struct ukplat_bootinfo *bi)
 
        return 0;
 }
-#endif /* CONFIG_LIBUKCONSOLE_PL011_EARLY_CONSOLE */
+#endif /* CONFIG_LIBPL011_EARLY_CONSOLE */
 
 #if CONFIG_LIBUKALLOC
 static int fdt_get_device(struct pl011_device *dev, const void *dtb,
@@ -360,7 +360,7 @@ static int init(struct uk_init_ctx *ictx __unused)
                }
 #endif /* !CONFIG_PAGING */
 
-#if CONFIG_LIBUKCONSOLE_PL011_EARLY_CONSOLE
+#if CONFIG_LIBPL011_EARLY_CONSOLE
                /* `ukconsole` mandates that there is only a single
                 * `struct uk_console` registered per device.
                 */
@@ -368,7 +368,7 @@ static int init(struct uk_init_ctx *ictx __unused)
                        uk_pr_info("Skipping pl011 device\n");
                        continue;
                }
-#endif /* CONFIG_LIBUKCONSOLE_PL011_EARLY_CONSOLE */
+#endif /* CONFIG_LIBPL011_EARLY_CONSOLE */
 
                rc = pl011_setup(dev.base);
                if (unlikely(rc)) {
@@ -386,9 +386,9 @@ static int init(struct uk_init_ctx *ictx __unused)
        return 0;
 }
 
-#if CONFIG_LIBUKCONSOLE_PL011_EARLY_CONSOLE
+#if CONFIG_LIBPL011_EARLY_CONSOLE
 UK_BOOT_EARLYTAB_ENTRY(early_init, UK_PRIO_AFTER(UK_PRIO_EARLIEST));
-#endif /* CONFIG_LIBUKCONSOLE_PL011_EARLY_CONSOLE */
+#endif /* CONFIG_LIBPL011_EARLY_CONSOLE */
 
 /* UK_PRIO_EARLIEST reserved for cmdline */
 uk_plat_initcall_prio(init, 0, UK_PRIO_AFTER(UK_PRIO_EARLIEST));
index 79fb687cb2fd221873673edc46b498fe0ac099c9..7f01d549e7d6c8d555e033d9584c8cfdeeea5e62 100644 (file)
@@ -95,8 +95,8 @@ choice
 
 config KVM_VMM_QEMU
        bool "QEMU"
-       imply LIBUKCONSOLE_PL011 if LIBUKCONSOLE && ARCH_ARM_64
-       imply LIBUKCONSOLE_PL011_EARLY_CONSOLE if LIBUKCONSOLE && ARCH_ARM_64
+       imply LIBPL011 if LIBUKCONSOLE && ARCH_ARM_64
+       imply LIBPL011_EARLY_CONSOLE if LIBUKCONSOLE && ARCH_ARM_64
        imply LIBNS16550 if LIBUKCONSOLE && ARCH_X86_64
        imply LIBNS16550_EARLY_CONSOLE if LIBUKCONSOLE && ARCH_X86_64
        imply LIBNS16550_COM1 if LIBUKCONSOLE && ARCH_X86_64