aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-debugifc.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2007-09-08 21:16:27 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 21:14:34 -0400
commit4db666cc3d199a8b837174bb0ad00d6b8f6115d6 (patch)
treefbc661aca967d62f814ea2e3667fefc3fd386cea /drivers/media/video/pvrusb2/pvrusb2-debugifc.c
parent401c27ce96382b3bdbc7a9c7e7303fd1b3af9ef0 (diff)
V4L/DVB (6208): pvrusb2: Implement programmatic means to extract prom contents
The pvrusb2 driver already has a method for extracting the FX2's program memory back out to a user application; this ability is used to facilitate manual firmware extraction as per the procedure documented on the pvrusb2 web site. This change follows that pattern and implements a corresponding method to grab the binary contents of the PVR USB2 prom (which for PVR USB2 devices can contain information in addition to the usual Hauppauge metadata). Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-debugifc.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-debugifc.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c b/drivers/media/video/pvrusb2/pvrusb2-debugifc.c
index e9da9bb8f8de..6f135f4a2497 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-debugifc.c
@@ -397,10 +397,22 @@ static int pvr2_debugifc_do1cmd(struct pvr2_hdw *hdw,const char *buf,
397 count -= scnt; buf += scnt; 397 count -= scnt; buf += scnt;
398 if (!wptr) return -EINVAL; 398 if (!wptr) return -EINVAL;
399 if (debugifc_match_keyword(wptr,wlen,"fetch")) { 399 if (debugifc_match_keyword(wptr,wlen,"fetch")) {
400 pvr2_hdw_cpufw_set_enabled(hdw,!0); 400 scnt = debugifc_isolate_word(buf,count,&wptr,&wlen);
401 if (scnt && wptr) {
402 count -= scnt; buf += scnt;
403 if (debugifc_match_keyword(wptr,wlen,"prom")) {
404 pvr2_hdw_cpufw_set_enabled(hdw,!0,!0);
405 } else if (debugifc_match_keyword(wptr,wlen,
406 "ram")) {
407 pvr2_hdw_cpufw_set_enabled(hdw,0,!0);
408 } else {
409 return -EINVAL;
410 }
411 }
412 pvr2_hdw_cpufw_set_enabled(hdw,0,!0);
401 return 0; 413 return 0;
402 } else if (debugifc_match_keyword(wptr,wlen,"done")) { 414 } else if (debugifc_match_keyword(wptr,wlen,"done")) {
403 pvr2_hdw_cpufw_set_enabled(hdw,0); 415 pvr2_hdw_cpufw_set_enabled(hdw,0,0);
404 return 0; 416 return 0;
405 } else { 417 } else {
406 return -EINVAL; 418 return -EINVAL;