diff options
author | Benjamin Larsson <benjamin@southpole.se> | 2015-03-15 19:57:52 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-02 21:52:56 -0300 |
commit | 0f21ac7f92e8a014a3c653337fbae7af4c240c3a (patch) | |
tree | df71a1eb29010066e5543af7b96561f4677e4f37 /drivers/staging/media | |
parent | 307e95c92257fe2602b457ab6df56d9ef9a7444e (diff) |
[media] mn88473: implement firmware parity check
Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/mn88473/mn88473.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/staging/media/mn88473/mn88473.c b/drivers/staging/media/mn88473/mn88473.c index 84bd4fa3c627..607ce4d3b12f 100644 --- a/drivers/staging/media/mn88473/mn88473.c +++ b/drivers/staging/media/mn88473/mn88473.c @@ -192,6 +192,7 @@ static int mn88473_init(struct dvb_frontend *fe) int ret, len, remaining; const struct firmware *fw = NULL; u8 *fw_file = MN88473_FIRMWARE; + unsigned int tmp; dev_dbg(&client->dev, "\n"); @@ -227,6 +228,20 @@ static int mn88473_init(struct dvb_frontend *fe) } } + /* parity check of firmware */ + ret = regmap_read(dev->regmap[0], 0xf8, &tmp); + if (ret) { + dev_err(&client->dev, + "parity reg read failed=%d\n", ret); + goto err; + } + if (tmp & 0x10) { + dev_err(&client->dev, + "firmware parity check failed=0x%x\n", tmp); + goto err; + } + dev_err(&client->dev, "firmware parity check succeeded=0x%x\n", tmp); + ret = regmap_write(dev->regmap[0], 0xf5, 0x00); if (ret) goto err; |