summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2003-11-14 11:42:04 +0000
committerMichael Hunold <devnull@localhost>2003-11-14 11:42:04 +0000
commitc05e45a15c46a2269ef3dfc38e6fef219a7edaa4 (patch)
tree5cfc5c3ae21c8f16432d38d3f678f0644856b87d /linux/drivers/media
parent3279255983a55caff933d0615483aa8874427bbf (diff)
downloadmediapointer-dvb-s2-c05e45a15c46a2269ef3dfc38e6fef219a7edaa4.tar.gz
mediapointer-dvb-s2-c05e45a15c46a2269ef3dfc38e6fef219a7edaa4.tar.bz2
- sanitize enabling of video input pins and i2c pins
- use some default values, so the hardware is always in a sane state
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/common/saa7146_core.c8
-rw-r--r--linux/drivers/media/common/saa7146_fops.c6
-rw-r--r--linux/drivers/media/common/saa7146_i2c.c3
3 files changed, 13 insertions, 4 deletions
diff --git a/linux/drivers/media/common/saa7146_core.c b/linux/drivers/media/common/saa7146_core.c
index 574b785be..452137925 100644
--- a/linux/drivers/media/common/saa7146_core.c
+++ b/linux/drivers/media/common/saa7146_core.c
@@ -321,7 +321,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
saa7146_write(dev, MC1, MASK_31);
*/
- /* disable alle irqs */
+ /* disable all irqs */
saa7146_write(dev, IER, 0);
/* shut down all dma transfers */
@@ -362,7 +362,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
memset(dev->d_i2c.cpu_addr, 0x0, SAA7146_RPS_MEM);
/* the rest + print status message */
-
+
/* create a nice device name */
sprintf(&dev->name[0], "saa7146 (%d)",saa7146_num);
@@ -380,8 +380,8 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
dev->module = THIS_MODULE;
init_waitqueue_head(&dev->i2c_wq);
- /* set some default values */
- saa7146_write(dev, BCS_CTRL, 0x80400040);
+ /* set some sane pci arbitrition values */
+ saa7146_write(dev, PCI_BT_V1, 0x1c00101f);
if( 0 != ext->probe) {
if( 0 != ext->probe(dev) ) {
diff --git a/linux/drivers/media/common/saa7146_fops.c b/linux/drivers/media/common/saa7146_fops.c
index 4bcb34f8d..8eb253bd8 100644
--- a/linux/drivers/media/common/saa7146_fops.c
+++ b/linux/drivers/media/common/saa7146_fops.c
@@ -410,6 +410,12 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
DEB_EE(("dev:%p\n",dev));
+ /* set default values for video parts of the saa7146 */
+ saa7146_write(dev, BCS_CTRL, 0x80400040);
+
+ /* enable video-port pins */
+ saa7146_write(dev, MC1, (MASK_10 | MASK_26));
+
/* save per-device extension data (one extension can
handle different devices that might need different
configuration data) */
diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c
index bd2022120..06f56531a 100644
--- a/linux/drivers/media/common/saa7146_i2c.c
+++ b/linux/drivers/media/common/saa7146_i2c.c
@@ -403,6 +403,9 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c
{
DEB_EE(("bitrate: 0x%08x\n",bitrate));
+ /* enable i2c-port pins */
+ saa7146_write(dev, MC1, (MASK_08 | MASK_24));
+
dev->i2c_bitrate = bitrate;
saa7146_i2c_reset(dev);