Date:2009-08-21 12:07:08 (10 years 9 months ago)
Author:Xiangfu Liu
Commit:efed24a9a28f689590c207801add80956a490240
Message:let strtoul auto deal '0x' and decimal string correct the request type in usb_control_msg should USB_ENDPOINT_IN

Signed-off-by: Xiangfu Liu <xiangfu.z@gmail.com>
Files: xbboot/host-app/host_main.c (2 diffs)
xbboot/scripts/boot-echo.sh (1 diff)

Change Details

xbboot/host-app/host_main.c
203203                fprintf(stderr, "Error - number of %s parameters %i\n", argv[1], argc);
204204                goto xout_xburst_interface;
205205            }
206            if (argv[2][0] == '0' && argv[2][1] == 'x')
207                u32_param = strtoul(&argv[2][2], 0 /* endptr */, 16 /* base */);
208            else
209                u32_param = strtoul(argv[2], 0 /* endptr */, 10 /* base */);
206            u32_param = strtoul(argv[2], 0 /* endptr */, 0 /* base */);
210207
211208            usb_status = usb_control_msg(xburst_h,
212                /* requesttype */ USB_ENDPOINT_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
209                /* requesttype */ USB_ENDPOINT_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
213210                /* request */ request_type,
214211                /* value */ HIWORD(u32_param),
215212                /* index */ LOWORD(u32_param),
...... 
225222        }
226223        case VR_FLUSH_CACHES: {
227224            usb_status = usb_control_msg(xburst_h,
228                /* requesttype */ USB_ENDPOINT_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
225                /* requesttype */ USB_ENDPOINT_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
229226                /* request */ VR_FLUSH_CACHES,
230227                /* value */ 0,
231228                /* index */ 0,
xbboot/scripts/boot-echo.sh
22../host-app/xbboot set_addr 0x80002000
33../host-app/xbboot bulk_write ../target-stage1/stage1.bin
44../host-app/xbboot start1 0x80002000
5../host-app/xbboot get_info
56../host-app/xbboot set_addr 0x81c00000
67../host-app/xbboot bulk_write ../target-echokernel/echo-kernel.bin
78../host-app/xbboot flush_cache

Archive Download the corresponding diff file



interactive