diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-debugifc.c | 14 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 9 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.h | 2 |
3 files changed, 15 insertions, 10 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c b/drivers/media/video/pvrusb2/pvrusb2-debugifc.c index 010018bc8383..ae977668c496 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c +++ b/drivers/media/video/pvrusb2/pvrusb2-debugifc.c | |||
@@ -252,11 +252,15 @@ static int pvr2_debugifc_do1cmd(struct pvr2_hdw *hdw,const char *buf, | |||
252 | scnt = debugifc_isolate_word(buf,count,&wptr,&wlen); | 252 | scnt = debugifc_isolate_word(buf,count,&wptr,&wlen); |
253 | if (scnt && wptr) { | 253 | if (scnt && wptr) { |
254 | count -= scnt; buf += scnt; | 254 | count -= scnt; buf += scnt; |
255 | if (debugifc_match_keyword(wptr,wlen,"prom")) { | 255 | if (debugifc_match_keyword(wptr, wlen, |
256 | pvr2_hdw_cpufw_set_enabled(hdw,!0,!0); | 256 | "prom")) { |
257 | } else if (debugifc_match_keyword(wptr,wlen, | 257 | pvr2_hdw_cpufw_set_enabled(hdw, 2, !0); |
258 | "ram")) { | 258 | } else if (debugifc_match_keyword(wptr, wlen, |
259 | pvr2_hdw_cpufw_set_enabled(hdw,0,!0); | 259 | "ram8k")) { |
260 | pvr2_hdw_cpufw_set_enabled(hdw, 0, !0); | ||
261 | } else if (debugifc_match_keyword(wptr, wlen, | ||
262 | "ram16k")) { | ||
263 | pvr2_hdw_cpufw_set_enabled(hdw, 1, !0); | ||
260 | } else { | 264 | } else { |
261 | return -EINVAL; | 265 | return -EINVAL; |
262 | } | 266 | } |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 9be04772c723..bd05ec7b1cbe 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -3514,7 +3514,7 @@ static u8 *pvr2_full_eeprom_fetch(struct pvr2_hdw *hdw) | |||
3514 | 3514 | ||
3515 | 3515 | ||
3516 | void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw, | 3516 | void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw, |
3517 | int prom_flag, | 3517 | int mode, |
3518 | int enable_flag) | 3518 | int enable_flag) |
3519 | { | 3519 | { |
3520 | int ret; | 3520 | int ret; |
@@ -3537,11 +3537,12 @@ void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw, | |||
3537 | break; | 3537 | break; |
3538 | } | 3538 | } |
3539 | 3539 | ||
3540 | hdw->fw_cpu_flag = (prom_flag == 0); | 3540 | hdw->fw_cpu_flag = (mode != 2); |
3541 | if (hdw->fw_cpu_flag) { | 3541 | if (hdw->fw_cpu_flag) { |
3542 | hdw->fw_size = (mode == 1) ? 0x4000 : 0x2000; | ||
3542 | pvr2_trace(PVR2_TRACE_FIRMWARE, | 3543 | pvr2_trace(PVR2_TRACE_FIRMWARE, |
3543 | "Preparing to suck out CPU firmware"); | 3544 | "Preparing to suck out CPU firmware" |
3544 | hdw->fw_size = 0x2000; | 3545 | " (size=%u)", hdw->fw_size); |
3545 | hdw->fw_buffer = kzalloc(hdw->fw_size,GFP_KERNEL); | 3546 | hdw->fw_buffer = kzalloc(hdw->fw_size,GFP_KERNEL); |
3546 | if (!hdw->fw_buffer) { | 3547 | if (!hdw->fw_buffer) { |
3547 | hdw->fw_size = 0; | 3548 | hdw->fw_size = 0; |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.h b/drivers/media/video/pvrusb2/pvrusb2-hdw.h index 7b6940554e9a..56e70eae20c1 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.h +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.h | |||
@@ -219,7 +219,7 @@ int pvr2_hdw_get_stdenum_value(struct pvr2_hdw *hdw,struct v4l2_standard *std, | |||
219 | this may prevent the device from running (and leaving this mode may | 219 | this may prevent the device from running (and leaving this mode may |
220 | imply a device reset). */ | 220 | imply a device reset). */ |
221 | void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *, | 221 | void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *, |
222 | int prom_flag, | 222 | int mode, /* 0=8KB FX2, 1=16KB FX2, 2=PROM */ |
223 | int enable_flag); | 223 | int enable_flag); |
224 | 224 | ||
225 | /* Return true if we're in a mode for retrieval CPU firmware */ | 225 | /* Return true if we're in a mode for retrieval CPU firmware */ |