Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174181
b: refs/heads/master
c: 568efaa
h: refs/heads/master
i:
  174179: ada0127
v: v3
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent b13a204 commit 975dc49
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c21c2db414bb38086f99c586ffdf019eedb9cad8
refs/heads/master: 568efaa2f704f72eef9b70ac0f895e9b961f15a6
14 changes: 9 additions & 5 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-debugifc.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,15 @@ static int pvr2_debugifc_do1cmd(struct pvr2_hdw *hdw,const char *buf,
scnt = debugifc_isolate_word(buf,count,&wptr,&wlen);
if (scnt && wptr) {
count -= scnt; buf += scnt;
if (debugifc_match_keyword(wptr,wlen,"prom")) {
pvr2_hdw_cpufw_set_enabled(hdw,!0,!0);
} else if (debugifc_match_keyword(wptr,wlen,
"ram")) {
pvr2_hdw_cpufw_set_enabled(hdw,0,!0);
if (debugifc_match_keyword(wptr, wlen,
"prom")) {
pvr2_hdw_cpufw_set_enabled(hdw, 2, !0);
} else if (debugifc_match_keyword(wptr, wlen,
"ram8k")) {
pvr2_hdw_cpufw_set_enabled(hdw, 0, !0);
} else if (debugifc_match_keyword(wptr, wlen,
"ram16k")) {
pvr2_hdw_cpufw_set_enabled(hdw, 1, !0);
} else {
return -EINVAL;
}
Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3514,7 +3514,7 @@ static u8 *pvr2_full_eeprom_fetch(struct pvr2_hdw *hdw)


void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw,
int prom_flag,
int mode,
int enable_flag)
{
int ret;
Expand All @@ -3537,11 +3537,12 @@ void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw,
break;
}

hdw->fw_cpu_flag = (prom_flag == 0);
hdw->fw_cpu_flag = (mode != 2);
if (hdw->fw_cpu_flag) {
hdw->fw_size = (mode == 1) ? 0x4000 : 0x2000;
pvr2_trace(PVR2_TRACE_FIRMWARE,
"Preparing to suck out CPU firmware");
hdw->fw_size = 0x2000;
"Preparing to suck out CPU firmware"
" (size=%u)", hdw->fw_size);
hdw->fw_buffer = kzalloc(hdw->fw_size,GFP_KERNEL);
if (!hdw->fw_buffer) {
hdw->fw_size = 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ int pvr2_hdw_get_stdenum_value(struct pvr2_hdw *hdw,struct v4l2_standard *std,
this may prevent the device from running (and leaving this mode may
imply a device reset). */
void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *,
int prom_flag,
int mode, /* 0=8KB FX2, 1=16KB FX2, 2=PROM */
int enable_flag);

/* Return true if we're in a mode for retrieval CPU firmware */
Expand Down

0 comments on commit 975dc49

Please sign in to comment.