dm: Disable all SPI and SPI flash tests
PATCH 1/3 dm: Disable all SPI and SPI flash tests
This subsystem has been broken since commit:
4efad20a sf: Update status reg check in spi_flash_cmd_wait_ready
There has so far been no response from the maintainer, and a release is imminent. For now, let's just disable the tests.
---
test/dm/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
test/dm/Makefile +2 -2
@@ -27,8 +27,8 @@ obj-y += regmap.o obj-$(CONFIG_REMOTEPROC) += remoteproc.o obj-$(CONFIG_RESET) += reset.o obj-$(CONFIG_DM_RTC) += rtc.o -obj-$(CONFIG_DM_SPI_FLASH) += sf.o -obj-$(CONFIG_DM_SPI) += spi.o +#obj-$(CONFIG_DM_SPI_FLASH) += sf.o +#obj-$(CONFIG_DM_SPI) += spi.o obj-y += syscon.o obj-$(CONFIG_DM_USB) += usb.o obj-$(CONFIG_DM_PMIC) += pmic.o
Signature · 1 line
2.6.0.rc2.230.g3dd15c0
PATCH 1/3 dm: Disable all SPI and SPI flash tests
Quoted 4 lines · Simon Glass
This subsystem has been broken since commit:
4efad20asf: Update status reg check inspi_flash_cmd_wait_ready
Quoted 8 lines
There has so far been no response from the maintainer, and a release is imminent. For now, let's just disable the tests.
Signed-off-by Simon Glass <[email protected]>---
test/dm/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to u-boot-dm/master.
PATCH 2/3 usb: Allow up to 7 storage devices
In reply to Simon GlassThe current limit of 5 is not enough for the driver model USB tests. Really we should not have a limit but the driver model code still uses the usb_dev_desc[] array, which has a limit.
Increasing the limit by 2 should not bother anyone. Adjust it.
---
common/usb_storage.c | 2 +- include/usb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
common/usb_storage.c +1 -1
@@ -65,7 +65,7 @@ static const unsigned char us_direction[256/8] = { static ccb usb_ccb __attribute__((aligned(ARCH_DMA_MINALIGN)));static __u32 CBWTag; -#define USB_MAX_STOR_DEV 5 +#define USB_MAX_STOR_DEV 7static int usb_max_devs;/* number of highest available usb device */ static block_dev_desc_t usb_dev_desc[USB_MAX_STOR_DEV ];
include/usb.h +1 -1
@@ -227,7 +227,7 @@ int board_usb_cleanup(int index, enum usb_init_type init);#ifdef CONFIG_USB_STORAGE -#define USB_MAX_STOR_DEV 5 +#define USB_MAX_STOR_DEV 7block_dev_desc_t *usb_stor_get_dev (int index);int usb_stor_scan (int mode);int usb_stor_info (void );
Signature · 1 line
2.6.0.rc2.230.g3dd15c0
PATCH 2/3 usb: Allow up to 7 storage devices
Quoted 7 lines · Simon Glass
The current limit of 5 is not enough for the driver model USB tests. Really we should not have a limit but the driver model code still uses the usb_dev_desc[] array, which has a limit.
Increasing the limit by 2 should not bother anyone. Adjust it.
Signed-off-by Simon Glass <[email protected]>
btw moving this constant to one place would be nice ;)
Quoted 32 lines
---
common/usb_storage.c | 2 +- include/usb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)common/usb_storage.c +1
-1@@ -65,7 +65,7 @@ static const unsigned char us_direction[256/8] = { static ccb usb_ccb __attribute__((aligned(ARCH_DMA_MINALIGN)));static __u32 CBWTag; -#define USB_MAX_STOR_DEV 5 +#define USB_MAX_STOR_DEV 7static int usb_max_devs;/* number of highest available usb device */ static block_dev_desc_t usb_dev_desc[USB_MAX_STOR_DEV ];include/usb.h +1
-1@@ -227,7 +227,7 @@ int board_usb_cleanup(int index, enum usb_init_type init);#ifdef CONFIG_USB_STORAGE -#define USB_MAX_STOR_DEV 5 +#define USB_MAX_STOR_DEV 7block_dev_desc_t *usb_stor_get_dev (int index);int usb_stor_scan (int mode);
Quoted 1 line
int
usb_stor_info(void);
Best regards,
Marek Vasut
PATCH 2/3 usb: Allow up to 7 storage devices
Quoted 41 lines · Marek Vasut
Quoted 7 lines · Simon Glass
The current limit of 5 is not enough for the driver model USB tests. Really we should not have a limit but the driver model code still uses the usb_dev_desc[] array, which has a limit.
Increasing the limit by 2 should not bother anyone. Adjust it.
Signed-off-by Simon Glass <[email protected]>Reviewed-by Marek Vasut <[email protected]>btw moving this constant to one place would be nice ;)
Quoted 28 lines
---
common/usb_storage.c | 2 +- include/usb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)common/usb_storage.c +1
-1@@ -65,7 +65,7 @@ static const unsigned char us_direction[256/8] = { static ccb usb_ccb __attribute__((aligned(ARCH_DMA_MINALIGN)));static __u32 CBWTag; -#define USB_MAX_STOR_DEV 5 +#define USB_MAX_STOR_DEV 7static int usb_max_devs;/* number of highest available usb device */ static block_dev_desc_t usb_dev_desc[USB_MAX_STOR_DEV ];include/usb.h +0
-0@@ -227,7 +227,7 @@ int board_usb_cleanup(int index, enum usb_init_type init);#ifdef CONFIG_USB_STORAGE
Quoted 8 lines
Quoted 5 lines
include/usb.h +1
-1-#define USB_MAX_STOR_DEV 5 +#define USB_MAX_STOR_DEV 7block_dev_desc_t *usb_stor_get_dev (int index);int usb_stor_scan (int mode);int
usb_stor_info(void);Best regards,
Marek Vasut
Applied to u-boot-dm/master.
PATCH 2/3 usb: Allow up to 7 storage devices
In reply to Marek VasutQuoted 5 lines · Marek Vasut
Quoted 4 lines · Simon Glass
The current limit of 5 is not enough for the driver model USB tests. Really we should not have a limit but the driver model code still uses the usb_dev_desc[] array, which has a limit.
Quoted 7 lines
Quoted 3 lines
Increasing the limit by 2 should not bother anyone. Adjust it.
Signed-off-by Simon Glass <[email protected]>Reviewed-by Marek Vasut <[email protected]>btw moving this constant to one place would be nice ;)
OK, how about this:
http://patchwork.ozlabs.org/patch/564474/
Quoted 37 lines
Quoted 33 lines
---
common/usb_storage.c | 2 +- include/usb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)common/usb_storage.c +1
-1@@ -65,7 +65,7 @@ static const unsigned char us_direction[256/8] = { static ccb usb_ccb __attribute__((aligned(ARCH_DMA_MINALIGN)));static __u32 CBWTag; -#define USB_MAX_STOR_DEV 5 +#define USB_MAX_STOR_DEV 7static int usb_max_devs;/* number of highest available usb device */ static block_dev_desc_t usb_dev_desc[USB_MAX_STOR_DEV ];include/usb.h +1
-1@@ -227,7 +227,7 @@ int board_usb_cleanup(int index, enum usb_init_type init);#ifdef CONFIG_USB_STORAGE -#define USB_MAX_STOR_DEV 5 +#define USB_MAX_STOR_DEV 7block_dev_desc_t *usb_stor_get_dev (int index);int usb_stor_scan (int mode);Quoted 1 line
int
usb_stor_info(void);Best regards,
Marek Vasut
PATCH 2/3 usb: Allow up to 7 storage devices
Quoted 10 lines · Simon Glass
Quoted 9 lines · Marek Vasut
Quoted 7 lines · Simon Glass
The current limit of 5 is not enough for the driver model USB tests. Really we should not have a limit but the driver model code still uses the usb_dev_desc[] array, which has a limit.
Increasing the limit by 2 should not bother anyone. Adjust it.
Signed-off-by Simon Glass <[email protected]>
Quoted 7 lines
Quoted 3 lines
Reviewed-by Marek Vasut <[email protected]>btw moving this constant to one place would be nice ;)
OK, how about this:
That's fine, thanks!
Best regards,
Marek Vasut
PATCH 3/3 dm: usb: Add a remove() method for USB keyboards
In reply to Simon GlassAt present USB keyboards are not properly removed with driver model. Add the code to handle this.
---
common/usb_kbd.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
common/usb_kbd.c +36 -0
@@ -611,6 +611,41 @@ static int usb_kbd_probe(struct udevice *dev)return ret; } +static int usb_kbd_remove (struct udevice *dev) +{ +struct usb_device *udev =dev_get_parent_priv (dev); +struct usb_kbd_pdata *data; +struct stdio_dev *sdev; +int ret; + + sdev =stdio_get_by_name (DEVNAME ); +if (!sdev) { + ret = -ENXIO ; + goto err; + } + data = udev->privptr; +if (stdio_deregister_dev (sdev, true)) { + ret = -EPERM ; + goto err; + } +#ifdef CONFIG_CONSOLE_MUX +if (iomux_doenv (stdin,getenv ("stdin" ))) { + ret = -ENOLINK ; + goto err; + } +#endif +#ifdef CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE +destroy_int_queue (usb_kbd_dev, data->intq); +#endif +free (data->new); +free (data); + +return 0 ; +err: +printf ("%s: warning, ret=%d" , __func__, ret); +return ret; +} +static const struct udevice_id usb_kbd_ids[] = { { .compatible ="usb-keyboard" }, { }
@@ -621,6 +656,7 @@ U_BOOT_DRIVER(usb_kbd) = { .id = UCLASS_KEYBOARD, .of_match = usb_kbd_ids, .probe = usb_kbd_probe, + .remove = usb_kbd_remove, };static const struct usb_device_id kbd_id_table[] = {
Signature · 1 line
2.6.0.rc2.230.g3dd15c0
PATCH 3/3 dm: usb: Add a remove() method for USB keyboards
Quoted 4 lines · Simon Glass
At present USB keyboards are not properly removed with driver model. Add the code to handle this.
Signed-off-by Simon Glass <[email protected]>
Best regards,
Marek Vasut
PATCH 3/3 dm: usb: Add a remove() method for USB keyboards
In reply to Simon GlassHi Simon,
Quoted 4 lines · Simon Glass
At present USB keyboards are not properly removed with driver model. Add the code to handle this.
Signed-off-by Simon Glass <[email protected]>
Is this supposed to fix the crash that I was reporting details about in the USB keyboard sandbox tests?
-Joe
PATCH 3/3 dm: usb: Add a remove() method for USB keyboards
Hi Joe,
Quoted 5 lines · Joe Hershberger
Hi Simon,
Quoted 1 line · Simon Glass
At present USB keyboards are not properly removed with driver model.
Add the
Quoted 6 lines
Quoted 3 lines
code to handle this.
Signed-off-by Simon Glass <[email protected]>Is this supposed to fix the crash that I was reporting details about in the USB keyboard sandbox tests?
Yes, with the other patches.
Quoted 2 lines
-Joe
Regards,
Simon
PATCH 3/3 dm: usb: Add a remove() method for USB keyboards
Quoted 11 lines · Simon Glass
Hi Joe,
Quoted 8 lines · Joe Hershberger
Hi Simon,
Quoted 4 lines · Simon Glass
At present USB keyboards are not properly removed with driver model. Add the
code to handle this.
Quoted 9 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Simon Glass <[email protected]>Is this supposed to fix the crash that I was reporting details about in the USB keyboard sandbox tests?
Yes, with the other patches.
Quoted 2 lines
-Joe
Fixed up a typo and:
Applied to u-boot-dm/master.