Files
operating-system/buildroot-external/package/generic_raw_uart/0004-Linux-6.11-uart_remove.patch
T
fbd5c2c751 Update generic-x86-64 Linux kernel to 6.12 (#3767)
* Linux: Update kernel to 6.12.6

* Linux 6.12

* https://github.com/home-assistant/operating-system/pull/3767#discussion_r1899169881

* https://github.com/home-assistant/operating-system/pull/3767#discussion_r1899170543

* Add patch descriptions, kernel ver conditionals

Signed-off-by: Nick Venenga <nick@venenga.com>

* Remove extra zram compression algos

* Undo fragment files config change

...for platforms that didn't receive kernel updates

* Sort Dockerfile apt packages

* Add Upstream refs to patches

* Re-enable TC

* Restore v6.6.y kernel fragments

* Update buildroot to rebased branch

* Apply 6.12 migration only to generic-x86-64

* package/eq3_char_loop: port patch from RaspberryMatic by @jens-maus

* package/generic_raw_uart: port patch from RaspberryMatic by @jens-maus

* Restore buildroot-external/board/pc/patches/linux

It's used in ova and generic-aarch64 defconfigs. Keep the path removed from
generic-x86-64 defconfig.

* Split linux patches to be version-specific

The IPv6 reachability patch needs different context on 6.6.y and 6.12.y -
introduce version-specific linux directories. To avoid the need for extra
directory for version used in RPi, copy those patches to its patches directory.

* Replace removed Intel Skylake audio driver with Intel AVS

The Skylake driver was removed and should be now replaced either by Intel HD
Audio or Intel AVS. Remove the old options and enable AVS.

SND_SOC_INTEL_SKYLAKE=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:63)
SND_SOC_INTEL_SKL=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:64)
SND_SOC_INTEL_APL=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:65)
SND_SOC_INTEL_KBL=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:66)
SND_SOC_INTEL_GLK=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:67)
SND_SOC_INTEL_CNL=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:68)
SND_SOC_INTEL_CFL=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:69)
SND_SOC_INTEL_CML_H=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:70)
SND_SOC_INTEL_CML_LP=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:71)
SND_SOC_INTEL_SKYLAKE_FAMILY=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:72)
SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=y not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:73)
SND_SOC_INTEL_SKYLAKE_COMMON=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:74)
-> https://github.com/torvalds/linux/commit/a882f4d750ee0ec7e264c015019d0d642e136ff6

SND_SOC_INTEL_SST=m requested, actual = n (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:58)
-> https://github.com/torvalds/linux/commit/970d299b0a0a29b7fa1a36a05f561cd932ee4149

* Remove I2C_COMPAT option

I2C_COMPAT=y not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:163)
-> https://github.com/torvalds/linux/commit/7e722083fcc3e148838fc3dc2486c498908c4677

* Correctly disable module compression after Kconfig change

The Kconfig structure was changed, there's now a top-level bool:
https://github.com/torvalds/linux/commit/c7ff693fa2094ba0a9d0a20feb4ab1658eff9c33

---------

Signed-off-by: Nick Venenga <nick@venenga.com>
Co-authored-by: Jan Čermák <sairon@sairon.cz>
2025-01-28 14:57:07 +01:00

88 lines
6.3 KiB
Diff

Change raw_uart_driver remove macro to define the function as void as in kernel 6.11
the platform_device remove function was changed to void (0edb555).
Upstream: Not applicable
Signed-off-by: Jens Maus <mail@jens-maus.de>
diff --git a/kernel/generic_raw_uart.h b/kernel/generic_raw_uart.h
index b865e22..791e5d0 100644
--- a/kernel/generic_raw_uart.h 2025-01-10 13:19:08.697184514 +0100
+++ b/kernel/generic_raw_uart.h 2025-01-10 13:28:43.311159893 +0100
@@ -93,6 +93,8 @@
extern bool generic_raw_uart_verify_dkey(struct device *dev, unsigned char *dkey, int dkey_len, unsigned char *skey, uint32_t *pkey, int bytes);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
+
#define module_raw_uart_driver(__module_name, __raw_uart_driver, __of_match) \
static struct generic_raw_uart *__raw_uart_driver##_raw_uart; \
static int __##__raw_uart_driver##_probe(struct platform_device *pdev) \
@@ -121,7 +123,7 @@
int err; \
struct device *dev = &pdev->dev; \
\
- err = generic_raw_uart_remove(__raw_uart_driver##_raw_uart); \
+ err = generic_raw_uart_remove(__raw_uart_driver##_raw_uart); \
if (err) \
{ \
dev_err(dev, "failed to remove generic_raw_uart module"); \
@@ -143,3 +145,57 @@
\
module_platform_driver(__raw_uart_driver_platform_driver); \
MODULE_DEVICE_TABLE(of, __of_match);
+
+#else
+
+#define module_raw_uart_driver(__module_name, __raw_uart_driver, __of_match) \
+ static struct generic_raw_uart *__raw_uart_driver##_raw_uart; \
+ static int __##__raw_uart_driver##_probe(struct platform_device *pdev) \
+ { \
+ struct device *dev = &pdev->dev; \
+ int err = __raw_uart_driver##_probe(pdev); \
+ \
+ if (err) \
+ { \
+ dev_err(dev, "failed to initialize generic_raw_uart module"); \
+ return err; \
+ } \
+ \
+ __raw_uart_driver##_raw_uart = generic_raw_uart_probe(dev, &__raw_uart_driver, NULL); \
+ if (IS_ERR_OR_NULL(__raw_uart_driver##_raw_uart)) \
+ { \
+ dev_err(dev, "failed to initialize generic_raw_uart module"); \
+ return PTR_ERR(__raw_uart_driver##_raw_uart); \
+ } \
+ \
+ return 0; \
+ } \
+ \
+ static void __##__raw_uart_driver##_remove(struct platform_device *pdev) \
+ { \
+ int err; \
+ struct device *dev = &pdev->dev; \
+ \
+ err = generic_raw_uart_remove(__raw_uart_driver##_raw_uart); \
+ if (err) \
+ { \
+ dev_err(dev, "failed to remove generic_raw_uart module"); \
+ } \
+ \
+ __raw_uart_driver##_remove(pdev); \
+ } \
+ \
+ static struct platform_driver __raw_uart_driver_platform_driver = { \
+ .probe = __##__raw_uart_driver##_probe, \
+ .remove = __##__raw_uart_driver##_remove, \
+ .driver = { \
+ .owner = THIS_MODULE, \
+ .name = __module_name, \
+ .of_match_table = __of_match, \
+ }, \
+ }; \
+ \
+ module_platform_driver(__raw_uart_driver_platform_driver); \
+ MODULE_DEVICE_TABLE(of, __of_match);
+
+#endif