UPSTREAM: usb: composite: Move bitmap related operations to ./include/linux/bitmap.h
The BITMAP related operations can now be moved to ./include/linux/bitmap.h file to mimic the Linux kernel directory tree. This change also allows to remove the lin_gadget_compat.h header file (which is a legacy code only for composite U-boot layer). It was also possible to remove #includes from several USB gadget drivers. Conflicts: include/usb/lin_gadget_compat.h Change-Id: Id61d6f9cef89ca238f082f430f6d01ac1009aa07 Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 916fa097997a5e1b70768ce944de28e038d4bebf)
This commit is contained in:
parent
8379698a1f
commit
57521aaaf8
|
|
@ -17,7 +17,6 @@
|
|||
#include <common.h>
|
||||
#include <malloc.h>
|
||||
#include <asm/dma-mapping.h>
|
||||
#include <usb/lin_gadget_compat.h>
|
||||
#include <linux/bug.h>
|
||||
#include <linux/list.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include <common.h>
|
||||
#include <malloc.h>
|
||||
#include <ti-usb-phy-uboot.h>
|
||||
#include <usb/lin_gadget_compat.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
#include <malloc.h>
|
||||
#include <memalign.h>
|
||||
#include <usb.h>
|
||||
#include <usb/lin_gadget_compat.h>
|
||||
#include <linux/mii.h>
|
||||
#include <linux/bitops.h>
|
||||
#include "usb_ether.h"
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include <linux/usb/gadget.h>
|
||||
#include <linux/usb/at91_udc.h>
|
||||
#include <malloc.h>
|
||||
#include <usb/lin_gadget_compat.h>
|
||||
|
||||
#include "at91_udc.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
#include <linux/usb/gadget.h>
|
||||
#include <linux/usb/atmel_usba_udc.h>
|
||||
#include <malloc.h>
|
||||
#include <usb/lin_gadget_compat.h>
|
||||
|
||||
#include "atmel_usba_udc.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
|
||||
#include "dwc2_udc_otg_regs.h"
|
||||
#include "dwc2_udc_otg_priv.h"
|
||||
#include <usb/lin_gadget_compat.h>
|
||||
|
||||
/***********************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
|
||||
#include "dwc2_udc_otg_regs.h"
|
||||
#include "dwc2_udc_otg_priv.h"
|
||||
#include <usb/lin_gadget_compat.h>
|
||||
|
||||
#include <usb/dwc2_udc.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include <linux/usb/ch9.h>
|
||||
#include <linux/usb/gadget.h>
|
||||
#include <linux/list.h>
|
||||
#include <usb/lin_gadget_compat.h>
|
||||
#include <usb/dwc2_udc.h>
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@
|
|||
#include <linux/usb/gadget.h>
|
||||
#include <linux/usb/gadget.h>
|
||||
#include <linux/usb/composite.h>
|
||||
#include <usb/lin_gadget_compat.h>
|
||||
#include <linux/bitmap.h>
|
||||
#include <g_dnl.h>
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
#include <linux/usb/ch9.h>
|
||||
#include <linux/usb/gadget.h>
|
||||
#include <usb/lin_gadget_compat.h>
|
||||
#include <asm/arch/pxa-regs.h>
|
||||
|
||||
#include "pxa25x_udc.h"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+
|
||||
#ifndef __LINUX_BITMAP_H
|
||||
#define __LINUX_BITMAP_H
|
||||
|
||||
#include <asm/types.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/bitops.h>
|
||||
|
||||
#define small_const_nbits(nbits) \
|
||||
(__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG)
|
||||
|
||||
static inline void bitmap_zero(unsigned long *dst, int nbits)
|
||||
{
|
||||
if (small_const_nbits(nbits)) {
|
||||
*dst = 0UL;
|
||||
} else {
|
||||
int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long);
|
||||
|
||||
memset(dst, 0, len);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __LINUX_BITMAP_H */
|
||||
|
|
@ -165,4 +165,7 @@ struct ustat {
|
|||
char f_fpack[6];
|
||||
};
|
||||
|
||||
#define DECLARE_BITMAP(name, bits) \
|
||||
unsigned long name[BITS_TO_LONGS(bits)]
|
||||
|
||||
#endif /* _LINUX_TYPES_H */
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include <common.h>
|
||||
#include <linux/usb/ch9.h>
|
||||
#include <linux/usb/gadget.h>
|
||||
#include <usb/lin_gadget_compat.h>
|
||||
#include <linux/bitmap.h>
|
||||
|
||||
/*
|
||||
* USB function drivers should return USB_GADGET_DELAYED_STATUS if they
|
||||
|
|
|
|||
Loading…
Reference in New Issue