Merged(+ some changes, see below).
On Wed, Dec 8, 2010 at 7:55 AM, Peter Stuge <[email protected]> wrote:
> Øyvind Harboe wrote:
>> If the JTAG speed has not been set, then it has no defined
>> value, add code to propagate the error.
>>
>> Signed-off-by: Øyvind Harboe <[email protected]>
> ..
>> +++ b/src/jtag/core.c
>> @@ -1384,9 +1384,13 @@ int adapter_init(struct command_context *cmd_ctx)
>>
>> int requested_khz = jtag_get_speed_khz();
>> int actual_khz = requested_khz;
>> - int retval = jtag_get_speed_readable(&actual_khz);
>> + int jtag_speed_t;
>
> I'm not very happy with _t at the end of a variable name; that's
> usually for types.
I've switched to jtag_speed_var.
>> + int retval = jtag_get_speed(&jtag_speed_t);
>> + if (retval != ERROR_OK)
>> + return retval;
>> + retval = jtag_get_speed_readable(&actual_khz);
>> if (ERROR_OK != retval)
>> - LOG_INFO("adapter-specific clock speed value %d",
>> jtag_get_speed());
>> + LOG_INFO("adapter-specific clock speed value %d",
>> jtag_speed_t);
>
> Why not also print actual_khz here?
Perhaps, but that would be another patch.
--
Øyvind Harboe
Can Zylin Consulting help on your project?
US toll free 1-866-980-3434 / International +47 51 63 25 00
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development