fix: fix and add ums gadget(usb mass storage gadget)
authorchainsx <chainsx@outlook.com>
Mon, 3 Jul 2023 17:31:28 +0000 (01:31 +0800)
committerHan Gao <rabenda.cn@gmail.com>
Fri, 7 Jul 2023 03:55:19 +0000 (11:55 +0800)
arch/riscv/include/asm/bitops.h
configs/light_lpi4a_defconfig

index 536629bbecb3571322fc679d8ef7972d6013db34..57556c37b48048f6d4d2ffdac5346191cb90668d 100644 (file)
@@ -90,6 +90,16 @@ static inline int __test_and_clear_bit(int nr, void *addr)
        return retval;
 }
 
+static inline int test_and_clear_bit(int nr, volatile void * addr)
+{
+       unsigned long flags = 0;
+       int out;
+
+       out = __test_and_clear_bit(nr, addr);
+
+       return out;
+}
+
 static inline int __test_and_change_bit(int nr, void *addr)
 {
        int mask, retval;
index 047dd9463b40f4bbf28e05a682946d8cc4f720c9..8d0cf4acfadaffb721e746a58188fbb1f888bf66 100644 (file)
@@ -63,6 +63,7 @@ CONFIG_MMC_SDHCI_SNPS=y
 CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_MMC_RPMB=y
+CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_SUPPORT_EMMC_RPMB=y
 CONFIG_DM_MTD=y
 CONFIG_MTD_SPI_NAND=y
@@ -82,6 +83,7 @@ CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_MANUFACTURER="U-Boot-THEAD"
 CONFIG_USB_GADGET_VENDOR_NUM=0x1234
 CONFIG_USB_GADGET_PRODUCT_NUM=0x8888
+CONFIG_USB_FUNCTION_MASS_STORAGE=y
 # CONFIG_SPL_USE_TINY_PRINTF is not set
 # CONFIG_EFI_LOADER is not set
 # CONFIG_LIGHT_SEC_BOOT is not set