Skip to contentSkip to conversation

f_thor: Dont perform reset at the end of thor

PATCH Superseded Michal Simek 4 participants 8 messages Apr 16, 2015 – Aug 12, 2015 USB

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 f_thor: Dont perform reset at the end of thor

From: Siva Durga Prasad Paladugu <[email protected]>

Dont perform reset at the end of thor download
if configured to do reset off.
Reset may not be required in all cases and hence
provided an option to do so.

The case would be to download the images to DDR instead of flash device.

---

Changes in v2:
- Update commit message with additional description

 drivers/usb/gadget/f_thor.c | 7 +++++++
 drivers/usb/gadget/f_thor.h | 3 +++
 2 files changed, 10 insertions(+)
drivers/usb/gadget/f_thor.c +7 -0
index e9a690eff5f1..5c8f6768519c 100644
@@ -123,6 +123,9 @@ static int process_rqt_cmd(const struct rqt_box *rqt)
 		send_rsp(rsp);
 		g_dnl_unregister();
 		dfu_free_entities();
+#ifdef CONFIG_THOR_RESET_OFF
+		return RESET_DONE;
+#endif
 		run_command("reset", 0);
 		break;
 	case RQT_CMD_POWEROFF:
@@ -728,6 +731,10 @@ int thor_handle(void)
 
 		if (ret > 0) {
 			ret = process_data();
+#ifdef CONFIG_THOR_RESET_OFF
+			if (ret == RESET_DONE)
+				break;
+#endif
 			if (ret < 0)
 				return ret;
 		} else {
drivers/usb/gadget/f_thor.h +3 -0
index 833a9d24ae7e..83412851dd17 100644
@@ -121,4 +121,7 @@ struct f_thor {
 #define F_NAME_BUF_SIZE 32
 #define THOR_PACKET_SIZE SZ_1M      /* 1 MiB */
 #define THOR_STORE_UNIT_SIZE SZ_32M /* 32 MiB */
+#ifdef CONFIG_THOR_RESET_OFF
+#define RESET_DONE 0xFFFFFFFF
+#endif
 #endif /* _USB_THOR_H_ */
Signature · 1 line
2.3.5
#1 lore raw

PATCH v2 1/1 f_thor: Dont perform reset at the end of thor

Quoted 7 lines · Michal Simek

From: Siva Durga Prasad Paladugu <[email protected]>

Dont perform reset at the end of thor download
if configured to do reset off.
Reset may not be required in all cases and hence
provided an option to do so.

Quoted 5 lines

The case would be to download the images to DDR instead of flash device.

And the documentation for this new config option is where exactly ? ;-)

Best regards,
Marek Vasut

#2 lore raw

PATCH v2 1/1 f_thor: Dont perform reset at the end of thor

Hi,

Quoted 8 lines · Marek Vasut
Quoted 7 lines · Michal Simek

From: Siva Durga Prasad Paladugu <[email protected]>

Dont perform reset at the end of thor download
if configured to do reset off.
Reset may not be required in all cases and hence
provided an option to do so.

Quoted 7 lines
Quoted 5 lines

The case would be to download the images to DDR instead of flash device.

And the documentation for this new config option is where exactly ? ;-)

ok. We will write it. It means there is no problem from your point of view about adding this feature to u-boot. It is great to know it.

Thanks,
Michal

#3 lore raw

PATCH v2 1/1 f_thor: Dont perform reset at the end of thor

Quoted 14 lines · Michal Simek

Hi,

Quoted 11 lines · Marek Vasut
Quoted 10 lines · Michal Simek

From: Siva Durga Prasad Paladugu <[email protected]>

Dont perform reset at the end of thor download
if configured to do reset off.
Reset may not be required in all cases and hence
provided an option to do so.

The case would be to download the images to DDR instead of flash device.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

And the documentation for this new config option is where exactly ? ;-)

ok. We will write it. It means there is no problem from your point of view about adding this feature to u-boot. It is great to know it.

You need ACK from Lukasz on these kinds of patches.

Best regards,
Marek Vasut

#4 lore raw

PATCH v2 1/1 f_thor: Dont perform reset at the end of thor

Hi Lukasz,

Quoted 18 lines · Marek Vasut
Quoted 17 lines · Michal Simek

Hi,

Quoted 14 lines · Marek Vasut
Quoted 12 lines · Michal Simek

From: Siva Durga Prasad Paladugu <[email protected]>

Dont perform reset at the end of thor download
if configured to do reset off.
Reset may not be required in all cases and hence
provided an option to do so.

The case would be to download the images to DDR instead of flash device.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

And the documentation for this new config option is where exactly ? ;-)

ok. We will write it. It means there is no problem from your point of view about adding this feature to u-boot. It is great to know it.

You need ACK from Lukasz on these kinds of patches.

Can you please give me your ACK on this one?

Thanks,
Michal

#5 lore raw

PATCH v2 1/1 f_thor: Dont perform reset at the end of thor

In reply to Michal Simek

Hi Michal,

Quoted 51 lines

From: Siva Durga Prasad Paladugu <[email protected]>

Dont perform reset at the end of thor download
if configured to do reset off.
Reset may not be required in all cases and hence
provided an option to do so.

The case would be to download the images to DDR instead of flash device.

---

Changes in v2:
- Update commit message with additional description

 drivers/usb/gadget/f_thor.c | 7 +++++++
 drivers/usb/gadget/f_thor.h | 3 +++
 2 files changed, 10 insertions(+)
drivers/usb/gadget/f_thor.c +7 -0
index e9a690eff5f1..5c8f6768519c 100644
@@ -123,6 +123,9 @@ static int process_rqt_cmd(const struct rqt_box
 *rqt) send_rsp(rsp);
 		g_dnl_unregister();
 		dfu_free_entities();
+#ifdef CONFIG_THOR_RESET_OFF
+		return RESET_DONE;
+#endif
 		run_command("reset", 0);
 		break;
 	case RQT_CMD_POWEROFF:
@@ -728,6 +731,10 @@ int thor_handle(void)
 
 		if (ret > 0) {
 			ret = process_data();
+#ifdef CONFIG_THOR_RESET_OFF
+			if (ret == RESET_DONE)
+				break;
+#endif
 			if (ret < 0)
 				return ret;
 		} else {
drivers/usb/gadget/f_thor.h +0 -0
index 833a9d24ae7e..83412851dd17 100644

drivers/usb/gadget/f_thor.h struct f_thor { · line 127

Quoted 7 lines
drivers/usb/gadget/f_thor.h +3 -0
@@ -121,4 +121,7 @@ struct f_thor {
 #define F_NAME_BUF_SIZE 32
 #define THOR_PACKET_SIZE SZ_1M      /* 1 MiB */
 #define THOR_STORE_UNIT_SIZE SZ_32M /* 32 MiB */
+#ifdef CONFIG_THOR_RESET_OFF
+#define RESET_DONE 0xFFFFFFFF
+#endif
 #endif /* _USB_THOR_H_ */

Applied to u-boot-dfu. Thanks

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
#6 lore raw

PATCH v2 1/1 f_thor: Dont perform reset at the end of thor

Hi Lukasz,

Quoted 54 lines · Lukasz Majewski

Hi Michal,

Quoted 52 lines

From: Siva Durga Prasad Paladugu <[email protected]>

Dont perform reset at the end of thor download
if configured to do reset off.
Reset may not be required in all cases and hence
provided an option to do so.

The case would be to download the images to DDR instead of flash device.

---

Changes in v2:
- Update commit message with additional description

 drivers/usb/gadget/f_thor.c | 7 +++++++
 drivers/usb/gadget/f_thor.h | 3 +++
 2 files changed, 10 insertions(+)
drivers/usb/gadget/f_thor.c +7 -0
index e9a690eff5f1..5c8f6768519c 100644
@@ -123,6 +123,9 @@ static int process_rqt_cmd(const struct rqt_box
 *rqt) send_rsp(rsp);
 		g_dnl_unregister();
 		dfu_free_entities();
+#ifdef CONFIG_THOR_RESET_OFF
+		return RESET_DONE;
+#endif
 		run_command("reset", 0);
 		break;
 	case RQT_CMD_POWEROFF:
@@ -728,6 +731,10 @@ int thor_handle(void)
 
 		if (ret > 0) {
 			ret = process_data();
+#ifdef CONFIG_THOR_RESET_OFF
+			if (ret == RESET_DONE)
+				break;
+#endif
 			if (ret < 0)
 				return ret;
 		} else {
drivers/usb/gadget/f_thor.h +0 -0
index 833a9d24ae7e..83412851dd17 100644
@@ -121,4 +121,7 @@ struct f_thor {
 #define F_NAME_BUF_SIZE 32
Quoted 9 lines

drivers/usb/gadget/f_thor.h struct f_thor { · line 127

Quoted 6 lines
drivers/usb/gadget/f_thor.h +3 -0
 #define THOR_PACKET_SIZE SZ_1M      /* 1 MiB */
 #define THOR_STORE_UNIT_SIZE SZ_32M /* 32 MiB */
+#ifdef CONFIG_THOR_RESET_OFF
+#define RESET_DONE 0xFFFFFFFF
+#endif
 #endif /* _USB_THOR_H_ */

Applied to u-boot-dfu. Thanks

Did you applied this patch?
And also
"usb: gadget: f_thor: Allocate request up to THOR_PACKET_SIZE"

I can't see that patches in you DFU tree.

Thanks,
Michal

Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150727/de27050c/attachment.sig>
#7 lore raw

PATCH v2 1/1 f_thor: Dont perform reset at the end of thor

Hi Lukasz,

Quoted 67 lines · Michal Simek

Hi Lukasz,

Quoted 54 lines · Lukasz Majewski

Hi Michal,

Quoted 52 lines

From: Siva Durga Prasad Paladugu <[email protected]>

Dont perform reset at the end of thor download
if configured to do reset off.
Reset may not be required in all cases and hence
provided an option to do so.

The case would be to download the images to DDR instead of flash device.

---

Changes in v2:
- Update commit message with additional description

 drivers/usb/gadget/f_thor.c | 7 +++++++
 drivers/usb/gadget/f_thor.h | 3 +++
 2 files changed, 10 insertions(+)
drivers/usb/gadget/f_thor.c +7 -0
index e9a690eff5f1..5c8f6768519c 100644
@@ -123,6 +123,9 @@ static int process_rqt_cmd(const struct rqt_box
 *rqt) send_rsp(rsp);
 		g_dnl_unregister();
 		dfu_free_entities();
+#ifdef CONFIG_THOR_RESET_OFF
+		return RESET_DONE;
+#endif
 		run_command("reset", 0);
 		break;
 	case RQT_CMD_POWEROFF:
@@ -728,6 +731,10 @@ int thor_handle(void)
 
 		if (ret > 0) {
 			ret = process_data();
+#ifdef CONFIG_THOR_RESET_OFF
+			if (ret == RESET_DONE)
+				break;
+#endif
 			if (ret < 0)
 				return ret;
 		} else {
drivers/usb/gadget/f_thor.h +0 -0
index 833a9d24ae7e..83412851dd17 100644
@@ -121,4 +121,7 @@ struct f_thor {
 #define F_NAME_BUF_SIZE 32
Quoted 9 lines

drivers/usb/gadget/f_thor.h struct f_thor { · line 127

Quoted 6 lines
drivers/usb/gadget/f_thor.h +3 -0
 #define THOR_PACKET_SIZE SZ_1M      /* 1 MiB */
 #define THOR_STORE_UNIT_SIZE SZ_32M /* 32 MiB */
+#ifdef CONFIG_THOR_RESET_OFF
+#define RESET_DONE 0xFFFFFFFF
+#endif
 #endif /* _USB_THOR_H_ */

Applied to u-boot-dfu. Thanks

Quoted 5 lines

Did you applied this patch?
And also
"usb: gadget: f_thor: Allocate request up to THOR_PACKET_SIZE"

I can't see that patches in you DFU tree.

Any update on this one?

Thanks,
Michal

Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150812/3c693aa2/attachment.sig>