~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise-security

« back to all changes in this revision

Viewing changes to drivers/media/dvb/ngene/ngene-core.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2011-12-06 15:56:07 UTC
  • Revision ID: package-import@ubuntu.com-20111206155607-pcf44kv5fmhk564f
Tags: 3.2.0-1401.1
[ Paolo Pisati ]

* Rebased on top of Ubuntu-3.2.0-3.8
* Tilt-tracking @ ef2487af4bb15bdd0689631774b5a5e3a59f74e2
* Delete debian.ti-omap4/control, it shoudln't be tracked
* Fix architecture spelling (s/armel/armhf/)
* [Config] Update configs following 3.2 import
* [Config] Fix compilation: disable CODA and ARCH_OMAP3
* [Config] Fix compilation: disable Ethernet Faraday
* Update series to precise

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 
42
42
#include "ngene.h"
43
43
 
44
 
static int one_adapter = 1;
 
44
static int one_adapter;
45
45
module_param(one_adapter, int, 0444);
46
46
MODULE_PARM_DESC(one_adapter, "Use only one adapter.");
47
47
 
461
461
        0x42, 0x00, 0x00, 0x02, 0x02, 0xbc, 0x00, 0x00,
462
462
        0x40, 0x06, 0x00, 0x02, 0x02, 0xbc, 0x00, 0x00, /* DRXH */
463
463
        0x71, 0x07, 0x00, 0x02, 0x02, 0xbc, 0x00, 0x00, /* DRXHser */
464
 
        0x72, 0x06, 0x00, 0x02, 0x02, 0xbc, 0x00, 0x00, /* S2ser */
 
464
        0x72, 0x00, 0x00, 0x02, 0x02, 0xbc, 0x00, 0x00, /* S2ser */
465
465
        0x40, 0x07, 0x00, 0x02, 0x02, 0xbc, 0x00, 0x00, /* LGDT3303 */
466
466
};
467
467
 
507
507
{
508
508
        u32 *ptr = Buffer;
509
509
 
510
 
        memset(Buffer, 0xff, Length);
 
510
        memset(Buffer, TS_FILLER, Length);
511
511
        while (Length > 0) {
512
512
                if (Flags & DF_SWAP32)
513
513
                        *ptr = 0x471FFF10;
1443
1443
                chan->ci_dev = NULL;
1444
1444
        }
1445
1445
 
 
1446
        if (chan->fe2)
 
1447
                dvb_unregister_frontend(chan->fe2);
 
1448
 
1446
1449
        if (chan->fe) {
1447
1450
                dvb_unregister_frontend(chan->fe);
1448
1451
                dvb_frontend_detach(chan->fe);
1534
1537
                        goto err;
1535
1538
                chan->has_demux = true;
1536
1539
        }
 
1540
        if (chan->fe2) {
 
1541
                if (dvb_register_frontend(adapter, chan->fe2) < 0)
 
1542
                        goto err;
 
1543
                chan->fe2->tuner_priv = chan->fe->tuner_priv;
 
1544
                memcpy(&chan->fe2->ops.tuner_ops,
 
1545
                       &chan->fe->ops.tuner_ops,
 
1546
                       sizeof(struct dvb_tuner_ops));
 
1547
        }
1537
1548
 
1538
1549
        if (chan->has_demux) {
1539
1550
                ret = my_dvb_dmx_ts_card_init(dvbdemux, "SW demux",
1571
1582
        return 0;
1572
1583
}
1573
1584
 
 
1585
static struct cxd2099_cfg cxd_cfg = {
 
1586
        .bitrate = 62000,
 
1587
        .adr = 0x40,
 
1588
        .polarity = 0,
 
1589
        .clock_mode = 0,
 
1590
};
 
1591
 
1574
1592
static void cxd_attach(struct ngene *dev)
1575
1593
{
1576
1594
        struct ngene_ci *ci = &dev->ci;
1577
1595
 
1578
 
        ci->en = cxd2099_attach(0x40, dev, &dev->channel[0].i2c_adapter);
 
1596
        ci->en = cxd2099_attach(&cxd_cfg, dev, &dev->channel[0].i2c_adapter);
1579
1597
        ci->dev = dev;
1580
1598
        return;
1581
1599
}