aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2009-04-02 21:24:38 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 17:21:06 -0400
commitbae7b7d73da0e42169aeb7c697e2c9549929300b (patch)
tree7c4ef58ad7619ae9ee1d30f75d088a524d760155 /drivers/media/common
parentb25ed9c5352ed338376481d45525392a75d40e33 (diff)
V4L/DVB (11795): xc5000: add build version to debug info
Expose the firmware build number along with the other version info Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/tuners/xc5000.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c
index c956c82524ec..8d3e31b6effc 100644
--- a/drivers/media/common/tuners/xc5000.c
+++ b/drivers/media/common/tuners/xc5000.c
@@ -100,6 +100,7 @@ struct xc5000_priv {
100#define XREG_VERSION 0x07 100#define XREG_VERSION 0x07
101#define XREG_PRODUCT_ID 0x08 101#define XREG_PRODUCT_ID 0x08
102#define XREG_BUSY 0x09 102#define XREG_BUSY 0x09
103#define XREG_BUILD 0x0D
103 104
104/* 105/*
105 Basic firmware description. This will remain with 106 Basic firmware description. This will remain with
@@ -452,6 +453,11 @@ static int xc_get_version(struct xc5000_priv *priv,
452 return 0; 453 return 0;
453} 454}
454 455
456static int xc_get_buildversion(struct xc5000_priv *priv, u16 *buildrev)
457{
458 return xc5000_readreg(priv, XREG_BUILD, buildrev);
459}
460
455static int xc_get_hsync_freq(struct xc5000_priv *priv, u32 *hsync_freq_hz) 461static int xc_get_hsync_freq(struct xc5000_priv *priv, u32 *hsync_freq_hz)
456{ 462{
457 u16 regData; 463 u16 regData;
@@ -574,6 +580,7 @@ static void xc_debug_dump(struct xc5000_priv *priv)
574 u16 quality; 580 u16 quality;
575 u8 hw_majorversion = 0, hw_minorversion = 0; 581 u8 hw_majorversion = 0, hw_minorversion = 0;
576 u8 fw_majorversion = 0, fw_minorversion = 0; 582 u8 fw_majorversion = 0, fw_minorversion = 0;
583 u16 fw_buildversion = 0;
577 584
578 /* Wait for stats to stabilize. 585 /* Wait for stats to stabilize.
579 * Frame Lines needs two frame times after initial lock 586 * Frame Lines needs two frame times after initial lock
@@ -593,9 +600,10 @@ static void xc_debug_dump(struct xc5000_priv *priv)
593 600
594 xc_get_version(priv, &hw_majorversion, &hw_minorversion, 601 xc_get_version(priv, &hw_majorversion, &hw_minorversion,
595 &fw_majorversion, &fw_minorversion); 602 &fw_majorversion, &fw_minorversion);
596 dprintk(1, "*** HW: V%02x.%02x, FW: V%02x.%02x\n", 603 xc_get_buildversion(priv, &fw_buildversion);
604 dprintk(1, "*** HW: V%02x.%02x, FW: V%02x.%02x.%04x\n",
597 hw_majorversion, hw_minorversion, 605 hw_majorversion, hw_minorversion,
598 fw_majorversion, fw_minorversion); 606 fw_majorversion, fw_minorversion, fw_buildversion);
599 607
600 xc_get_hsync_freq(priv, &hsync_freq_hz); 608 xc_get_hsync_freq(priv, &hsync_freq_hz);
601 dprintk(1, "*** Horizontal sync frequency = %d Hz\n", hsync_freq_hz); 609 dprintk(1, "*** Horizontal sync frequency = %d Hz\n", hsync_freq_hz);