arm_adi_v5: parse ROM tables behind SoC-600 APv1 adapter
[fw/openocd] / src / target / hla_target.c
index 3e359b950eed923a3dcc2e80b93bda743ba68fe4..487ffe7c9970439482f1d5545df0714457e0859f 100644 (file)
@@ -203,7 +203,7 @@ static int adapter_target_create(struct target *target,
 {
        LOG_DEBUG("%s", __func__);
        struct adiv5_private_config *pc = target->private_config;
-       if (pc && pc->ap_num > 0) {
+       if (pc && pc->ap_num != DP_APSEL_INVALID && pc->ap_num != 0) {
                LOG_ERROR("hla_target: invalid parameter -ap-num (> 0)");
                return ERROR_COMMAND_SYNTAX_ERROR;
        }