mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-14 00:47:26 +00:00
Merge branch 'master' of git://git.denx.de/u-boot-usb
- DFU and Cadence USB 3 fixes
This commit is contained in:
commit
31a790bee9
3 changed files with 17 additions and 1 deletions
|
@ -42,6 +42,13 @@ config DFU_NAND
|
||||||
This option enables using DFU to read and write to NAND based
|
This option enables using DFU to read and write to NAND based
|
||||||
storage.
|
storage.
|
||||||
|
|
||||||
|
config DFU_NAND_TRIMFFS
|
||||||
|
bool "Skip empty pages when flashing UBI images to NAND"
|
||||||
|
depends on DFU_NAND
|
||||||
|
help
|
||||||
|
When flashing UBI images to NAND, enable the DROP_FFS flag to drop
|
||||||
|
trailing all-0xff pages.
|
||||||
|
|
||||||
config DFU_RAM
|
config DFU_RAM
|
||||||
bool "RAM back end for DFU"
|
bool "RAM back end for DFU"
|
||||||
help
|
help
|
||||||
|
|
|
@ -50,6 +50,7 @@ static int nand_block_op(enum dfu_op op, struct dfu_entity *dfu,
|
||||||
lim, buf);
|
lim, buf);
|
||||||
} else {
|
} else {
|
||||||
nand_erase_options_t opts;
|
nand_erase_options_t opts;
|
||||||
|
int write_flags = WITH_WR_VERIFY;
|
||||||
|
|
||||||
memset(&opts, 0, sizeof(opts));
|
memset(&opts, 0, sizeof(opts));
|
||||||
opts.offset = start;
|
opts.offset = start;
|
||||||
|
@ -62,8 +63,12 @@ static int nand_block_op(enum dfu_op op, struct dfu_entity *dfu,
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
/* then write */
|
/* then write */
|
||||||
|
#ifdef CONFIG_DFU_NAND_TRIMFFS
|
||||||
|
if (dfu->data.nand.ubi)
|
||||||
|
write_flags |= WITH_DROP_FFS;
|
||||||
|
#endif
|
||||||
ret = nand_write_skip_bad(mtd, start, &count, &actual,
|
ret = nand_write_skip_bad(mtd, start, &count, &actual,
|
||||||
lim, buf, WITH_WR_VERIFY);
|
lim, buf, write_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
|
|
@ -562,6 +562,10 @@ static void cdns3_ep0_setup_phase(struct cdns3_device *priv_dev)
|
||||||
struct cdns3_endpoint *priv_ep = priv_dev->eps[0];
|
struct cdns3_endpoint *priv_ep = priv_dev->eps[0];
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
|
/* Invalidate Setup Packet received */
|
||||||
|
invalidate_dcache_range(priv_dev->setup_dma,
|
||||||
|
priv_dev->setup_dma + ARCH_DMA_MINALIGN);
|
||||||
|
|
||||||
priv_dev->ep0_data_dir = ctrl->bRequestType & USB_DIR_IN;
|
priv_dev->ep0_data_dir = ctrl->bRequestType & USB_DIR_IN;
|
||||||
|
|
||||||
trace_cdns3_ctrl_req(ctrl);
|
trace_cdns3_ctrl_req(ctrl);
|
||||||
|
|
Loading…
Reference in a new issue