diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-21 05:57:06 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-21 10:46:39 -0500 |
commit | d585681374ed23a707b572a1199d510e518d7522 (patch) | |
tree | 04777e1b2e9c5fd3a78890e19bb1a64a476d2966 | |
parent | 6fb65a66a227013ba1825efcf47e3c5df1a39131 (diff) |
[media] drxk: Allow enabling MERR/MVAL cfg
Those two settings are different when used with az6007. Add
a config option to enable it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb/dvb-usb/az6007.c | 1 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/drxk.h | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/drxk_hard.c | 11 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/drxk_hard.h | 1 |
4 files changed, 13 insertions, 2 deletions
diff --git a/drivers/media/dvb/dvb-usb/az6007.c b/drivers/media/dvb/dvb-usb/az6007.c index bf8d20151b05..81fdc90be449 100644 --- a/drivers/media/dvb/dvb-usb/az6007.c +++ b/drivers/media/dvb/dvb-usb/az6007.c | |||
@@ -67,6 +67,7 @@ static struct drxk_config terratec_h7_drxk = { | |||
67 | .parallel_ts = true, | 67 | .parallel_ts = true, |
68 | .dynamic_clk = true, | 68 | .dynamic_clk = true, |
69 | .single_master = true, | 69 | .single_master = true, |
70 | .enable_merr_cfg = true, | ||
70 | .no_i2c_bridge = false, | 71 | .no_i2c_bridge = false, |
71 | .chunk_size = 64, | 72 | .chunk_size = 64, |
72 | .mpeg_out_clk_strength = 0x02, | 73 | .mpeg_out_clk_strength = 0x02, |
diff --git a/drivers/media/dvb/frontends/drxk.h b/drivers/media/dvb/frontends/drxk.h index ca921c77f71f..9d64e4fea066 100644 --- a/drivers/media/dvb/frontends/drxk.h +++ b/drivers/media/dvb/frontends/drxk.h | |||
@@ -12,6 +12,7 @@ | |||
12 | * Serial otherwise. | 12 | * Serial otherwise. |
13 | * @dynamic_clk: True means that the clock will be dynamically | 13 | * @dynamic_clk: True means that the clock will be dynamically |
14 | * adjusted. Static clock otherwise. | 14 | * adjusted. Static clock otherwise. |
15 | * @enable_merr_cfg: Enable SIO_PDR_PERR_CFG/SIO_PDR_MVAL_CFG. | ||
15 | * @single_master: Device is on the single master mode | 16 | * @single_master: Device is on the single master mode |
16 | * @no_i2c_bridge: Don't switch the I2C bridge to talk with tuner | 17 | * @no_i2c_bridge: Don't switch the I2C bridge to talk with tuner |
17 | * @antenna_gpio: GPIO bit used to control the antenna | 18 | * @antenna_gpio: GPIO bit used to control the antenna |
@@ -29,6 +30,7 @@ struct drxk_config { | |||
29 | bool no_i2c_bridge; | 30 | bool no_i2c_bridge; |
30 | bool parallel_ts; | 31 | bool parallel_ts; |
31 | bool dynamic_clk; | 32 | bool dynamic_clk; |
33 | bool enable_merr_cfg; | ||
32 | 34 | ||
33 | bool antenna_dvbt; | 35 | bool antenna_dvbt; |
34 | u16 antenna_gpio; | 36 | u16 antenna_gpio; |
diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c index d25b0d20038b..5fa192731fcd 100644 --- a/drivers/media/dvb/frontends/drxk_hard.c +++ b/drivers/media/dvb/frontends/drxk_hard.c | |||
@@ -1179,6 +1179,7 @@ static int MPEGTSConfigurePins(struct drxk_state *state, bool mpegEnable) | |||
1179 | int status = -1; | 1179 | int status = -1; |
1180 | u16 sioPdrMclkCfg = 0; | 1180 | u16 sioPdrMclkCfg = 0; |
1181 | u16 sioPdrMdxCfg = 0; | 1181 | u16 sioPdrMdxCfg = 0; |
1182 | u16 err_cfg = 0; | ||
1182 | 1183 | ||
1183 | dprintk(1, ": mpeg %s, %s mode\n", | 1184 | dprintk(1, ": mpeg %s, %s mode\n", |
1184 | mpegEnable ? "enable" : "disable", | 1185 | mpegEnable ? "enable" : "disable", |
@@ -1244,12 +1245,17 @@ static int MPEGTSConfigurePins(struct drxk_state *state, bool mpegEnable) | |||
1244 | status = write16(state, SIO_PDR_MSTRT_CFG__A, sioPdrMdxCfg); | 1245 | status = write16(state, SIO_PDR_MSTRT_CFG__A, sioPdrMdxCfg); |
1245 | if (status < 0) | 1246 | if (status < 0) |
1246 | goto error; | 1247 | goto error; |
1247 | status = write16(state, SIO_PDR_MERR_CFG__A, 0x0000); /* Disable */ | 1248 | |
1249 | if (state->enable_merr_cfg) | ||
1250 | err_cfg = sioPdrMdxCfg; | ||
1251 | |||
1252 | status = write16(state, SIO_PDR_MERR_CFG__A, err_cfg); | ||
1248 | if (status < 0) | 1253 | if (status < 0) |
1249 | goto error; | 1254 | goto error; |
1250 | status = write16(state, SIO_PDR_MVAL_CFG__A, 0x0000); /* Disable */ | 1255 | status = write16(state, SIO_PDR_MVAL_CFG__A, err_cfg); |
1251 | if (status < 0) | 1256 | if (status < 0) |
1252 | goto error; | 1257 | goto error; |
1258 | |||
1253 | if (state->m_enableParallel == true) { | 1259 | if (state->m_enableParallel == true) { |
1254 | /* paralel -> enable MD1 to MD7 */ | 1260 | /* paralel -> enable MD1 to MD7 */ |
1255 | status = write16(state, SIO_PDR_MD1_CFG__A, sioPdrMdxCfg); | 1261 | status = write16(state, SIO_PDR_MD1_CFG__A, sioPdrMdxCfg); |
@@ -6379,6 +6385,7 @@ struct dvb_frontend *drxk_attach(const struct drxk_config *config, | |||
6379 | state->antenna_gpio = config->antenna_gpio; | 6385 | state->antenna_gpio = config->antenna_gpio; |
6380 | state->antenna_dvbt = config->antenna_dvbt; | 6386 | state->antenna_dvbt = config->antenna_dvbt; |
6381 | state->m_ChunkSize = config->chunk_size; | 6387 | state->m_ChunkSize = config->chunk_size; |
6388 | state->enable_merr_cfg = config->enable_merr_cfg; | ||
6382 | 6389 | ||
6383 | if (config->dynamic_clk) { | 6390 | if (config->dynamic_clk) { |
6384 | state->m_DVBTStaticCLK = 0; | 6391 | state->m_DVBTStaticCLK = 0; |
diff --git a/drivers/media/dvb/frontends/drxk_hard.h b/drivers/media/dvb/frontends/drxk_hard.h index 3a58b73eb9b9..4bbf841de83a 100644 --- a/drivers/media/dvb/frontends/drxk_hard.h +++ b/drivers/media/dvb/frontends/drxk_hard.h | |||
@@ -332,6 +332,7 @@ struct drxk_state { | |||
332 | 332 | ||
333 | u16 UIO_mask; /* Bits used by UIO */ | 333 | u16 UIO_mask; /* Bits used by UIO */ |
334 | 334 | ||
335 | bool enable_merr_cfg; | ||
335 | bool single_master; | 336 | bool single_master; |
336 | bool no_i2c_bridge; | 337 | bool no_i2c_bridge; |
337 | bool antenna_dvbt; | 338 | bool antenna_dvbt; |