diff options
| author | Tom Rini <[email protected]> | 2018-12-15 17:49:49 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2018-12-15 17:49:57 -0500 |
| commit | 401c2540445aad08816382c0dc208d2516d90d89 (patch) | |
| tree | 89c26f23edfb8da3d7a517d07fedd61fa5faf769 /include | |
| parent | 0dc526d98eb216003ea884739abc17f6eb05c0df (diff) | |
| parent | 46a3f276549f3e5720b6e80278cda354c7fa859f (diff) | |
Merge branch 'master' of git://git.denx.de/u-boot-usb
- Second half of the USB Gadget DM conversion
Diffstat (limited to 'include')
| -rw-r--r-- | include/configs/am335x_evm.h | 1 | ||||
| -rw-r--r-- | include/configs/ti_armv7_keystone2.h | 17 | ||||
| -rw-r--r-- | include/linux/bitmap.h | 23 | ||||
| -rw-r--r-- | include/linux/types.h | 3 | ||||
| -rw-r--r-- | include/linux/usb/composite.h | 2 | ||||
| -rw-r--r-- | include/usb/lin_gadget_compat.h | 35 |
6 files changed, 38 insertions, 43 deletions
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 5d5b09bbd1e..3bd96b921b7 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -253,7 +253,6 @@ #ifdef CONFIG_SPL_BUILD #undef CONFIG_DM_MMC #undef CONFIG_TIMER -#undef CONFIG_DM_USB #endif #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USB_ETHER) diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index 5e504f6d3d2..0c7d6648683 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -169,12 +169,16 @@ #define CONFIG_SYS_NAND_MAX_CHIPS 1 #define CONFIG_SYS_NAND_NO_SUBPAGE_WRITE -/* USB Configuration */ -#define CONFIG_USB_XHCI_KEYSTONE -#define CONFIG_USB_SS_BASE KS2_USB_SS_BASE -#define CONFIG_USB_HOST_XHCI_BASE KS2_USB_HOST_XHCI_BASE -#define CONFIG_DEV_USB_PHY_BASE KS2_DEV_USB_PHY_BASE -#define CONFIG_USB_PHY_CFG_BASE KS2_USB_PHY_CFG_BASE +#define DFU_ALT_INFO_MMC \ + "dfu_alt_info_mmc=" \ + "MLO fat 0 1;" \ + "u-boot.img fat 0 1;" \ + "uEnv.txt fat 0 1\0" + +/* DFU settings */ +#define DFUARGS \ + "dfu_bufsiz=0x10000\0" \ + DFU_ALT_INFO_MMC \ /* U-Boot general configuration */ #define CONFIG_MX_CYCLIC @@ -214,6 +218,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ + DFUARGS \ "bootdir=/boot\0" \ "tftp_root=/\0" \ "nfs_root=/export\0" \ diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h new file mode 100644 index 00000000000..4a54ae05091 --- /dev/null +++ b/include/linux/bitmap.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 */ diff --git a/include/linux/types.h b/include/linux/types.h index 1f3cd63b8f2..cc6f7cb39ee 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -158,4 +158,7 @@ struct ustat { char f_fpack[6]; }; +#define DECLARE_BITMAP(name, bits) \ + unsigned long name[BITS_TO_LONGS(bits)] + #endif /* _LINUX_TYPES_H */ diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 30c464ce39d..a49a66f2f82 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h @@ -24,7 +24,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 diff --git a/include/usb/lin_gadget_compat.h b/include/usb/lin_gadget_compat.h deleted file mode 100644 index e5dba473b7a..00000000000 --- a/include/usb/lin_gadget_compat.h +++ /dev/null @@ -1,35 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (c) 2011 Samsung Electronics - * Lukasz Majewski <[email protected]> - * - * This is a Linux kernel compatibility layer for USB Gadget - */ - -#ifndef __LIN_COMPAT_H__ -#define __LIN_COMPAT_H__ - -#include <linux/bitops.h> -#include <linux/compat.h> - -/* common */ -#define DECLARE_BITMAP(name, bits) \ - unsigned long name[BITS_TO_LONGS(bits)] - -#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); - } -} - -#define dma_cache_maint(addr, size, mode) cache_flush() -void cache_flush(void); - -#endif /* __LIN_COMPAT_H__ */ |
