From d6376f7ed823569acd8bb0fdfa501c040cfec36f Mon Sep 17 00:00:00 2001 From: Zixun LI Date: Thu, 25 Jul 2024 17:32:01 +0200 Subject: usb: gadget: atmel: Add DM_USB_GADGET support Add driver model support by using the uclass UCLASS_USB_GADGET_GENERIC. Disable local usb_gadget_register_driver()/usb_gadget_unregister_driver() implementation which is implemented in udc-core.c when DM_USB_GADGET is enabled. Replace dm_usb_gadget_handle_interrupts() with handle_interrupts ops when DM_USB_GADGET is enabled. Disable legacy struct usba_udc controller as controller point is extracted from udevice private data with DM. Disable legacy usba_udc_probe() to avoid conflict with DM when it's enabled. Compared to Linux driver only supported devices' DT bindings are included (sorted as Linux driver) Signed-off-by: Zixun LI Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20240725153204.358925-8-admin@hifiphile.com Signed-off-by: Mattijs Korpershoek --- include/linux/usb/atmel_usba_udc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/usb/atmel_usba_udc.h b/include/linux/usb/atmel_usba_udc.h index c1c810759c3..37c4f218493 100644 --- a/include/linux/usb/atmel_usba_udc.h +++ b/include/linux/usb/atmel_usba_udc.h @@ -20,6 +20,8 @@ struct usba_platform_data { struct usba_ep_data *ep; }; +#if !CONFIG_IS_ENABLED(DM_USB_GADGET) extern int usba_udc_probe(struct usba_platform_data *pdata); +#endif #endif /* __LINUX_USB_USBA_H */ -- cgit v1.2.3 From a29805d822c4bffe47b464e1f62fca11c6c2b481 Mon Sep 17 00:00:00 2001 From: Richard Weinberger Date: Fri, 9 Aug 2024 11:54:29 +0200 Subject: compiler: Ensure __builtin_*_overflow() support Both gcc and clang support this for a long time. Make sure the feature is present. Signed-off-by: Richard Weinberger --- include/linux/compiler_types.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux') diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index 1a3060117f1..8b6ce9c11cd 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -70,6 +70,13 @@ extern void __chk_io_ptr(const volatile void __iomem *); #error "Unknown compiler" #endif +/* + * At least gcc 5.1 or clang 8 are needed. + */ +#ifndef COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW +#error Unsupported compiler +#endif + /* * Some architectures need to provide custom definitions of macros provided * by linux/compiler-*.h, and can do so using asm/compiler.h. We include that -- cgit v1.2.3 From 9905e77edaa9b4a43285e587317c600ffa7be7ca Mon Sep 17 00:00:00 2001 From: Arseniy Krasnov Date: Mon, 26 Aug 2024 16:17:08 +0300 Subject: mtd: rawnand: nand_base: support for 'NAND_IS_BOOT_MEDIUM' flag Based on Linux kernel: commit f922bd798bb9 ("mtd: rawnand: add an option to specify NAND chip as a boot device") Allow to define a NAND chip as a boot device. This can be helpful for the selection of the ECC algorithm and strength in case the boot ROM supports only a subset of controller provided options. Signed-off-by: Arseniy Krasnov Reviewed-by: Michael Trimarchi Link: https://lore.kernel.org/r/20240826131710.29746-2-avkrasnov@salutedevices.com Signed-off-by: Neil Armstrong --- include/linux/mtd/rawnand.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux') diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h index 537c62424a1..2d85b392465 100644 --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h @@ -247,6 +247,11 @@ enum nand_ecc_algo { * kmap'ed, vmalloc'ed highmem buffers being passed from upper layers */ #define NAND_USE_BOUNCE_BUFFER 0x00100000 +/* + * Whether the NAND chip is a boot medium. Drivers might use this information + * to select ECC algorithms supported by the boot ROM or similar restrictions. + */ +#define NAND_IS_BOOT_MEDIUM 0x00400000 /* * Do not try to tweak the timings at runtime. This is needed when the -- cgit v1.2.3