Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168418
b: refs/heads/master
c: 7bbf8ef
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Nov 11, 2009
1 parent cb7be6e commit dbca580
Show file tree
Hide file tree
Showing 32 changed files with 194 additions and 104 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1efd374d78834a793663414402911765bcdda6eb
refs/heads/master: 7bbf8ef6902d1e0102a91d22c035622443fd20ca
12 changes: 2 additions & 10 deletions trunk/arch/arm/mach-s3c6400/include/mach/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,13 @@ enum dma_ch {
DMACH_MAX /* the end */
};

static __inline__ int s3c_dma_has_circular(void)
static __inline__ bool s3c_dma_has_circular(void)
{
/* we will be supporting ciruclar buffers as soon as we have DMA
* engine support.
*/
return 1;
return true;
}

#define S3C2410_DMAF_CIRCULAR (1 << 0)

static inline bool s3c_dma_has_circular(void)
{
return false;
}

#include <plat/dma.h>

#endif /* __ASM_ARCH_IRQ_H */
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-s3c6410/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ config SMDK6410_WM1190_EV1
depends on MACH_SMDK6410
select REGULATOR
select REGULATOR_WM8350
select S3C24XX_GPIO_EXTRA64
select MFD_WM8350_I2C
select MFD_WM8350_CONFIG_MODE_0
select MFD_WM8350_CONFIG_MODE_3
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/arm/mach-s3c6410/mach-smdk6410.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ static int __init smdk6410_wm8350_init(struct wm8350 *wm8350)
{
int i;

/* Configure the IRQ line */
s3c_gpio_setpull(S3C64XX_GPN(12), S3C_GPIO_PULL_UP);

/* Instantiate the regulators */
for (i = 0; i < ARRAY_SIZE(wm1190_regulators); i++)
wm8350_register_regulator(wm8350,
Expand Down
76 changes: 52 additions & 24 deletions trunk/arch/arm/plat-s3c64xx/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,13 @@ static void s3c64xx_dma_fill_lli(struct s3c2410_dma_chan *chan,
src = chan->dev_addr;
dst = data;
control0 = PL080_CONTROL_SRC_AHB2;
control0 |= (u32)chan->hw_width << PL080_CONTROL_SWIDTH_SHIFT;
control0 |= 2 << PL080_CONTROL_DWIDTH_SHIFT;
control0 |= PL080_CONTROL_DST_INCR;
break;

case S3C2410_DMASRC_MEM:
src = data;
dst = chan->dev_addr;
control0 = PL080_CONTROL_DST_AHB2;
control0 |= (u32)chan->hw_width << PL080_CONTROL_DWIDTH_SHIFT;
control0 |= 2 << PL080_CONTROL_SWIDTH_SHIFT;
control0 |= PL080_CONTROL_SRC_INCR;
break;
default:
Expand All @@ -173,6 +169,8 @@ static void s3c64xx_dma_fill_lli(struct s3c2410_dma_chan *chan,
control1 = size >> chan->hw_width; /* size in no of xfers */
control0 |= PL080_CONTROL_PROT_SYS; /* always in priv. mode */
control0 |= PL080_CONTROL_TC_IRQ_EN; /* always fire IRQ */
control0 |= (u32)chan->hw_width << PL080_CONTROL_DWIDTH_SHIFT;
control0 |= (u32)chan->hw_width << PL080_CONTROL_SWIDTH_SHIFT;

lli->src_addr = src;
lli->dst_addr = dst;
Expand Down Expand Up @@ -339,6 +337,7 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id,
struct s3c64xx_dma_buff *next;
struct s3c64xx_dma_buff *buff;
struct pl080s_lli *lli;
unsigned long flags;
int ret;

WARN_ON(!chan);
Expand Down Expand Up @@ -366,6 +365,8 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id,

s3c64xx_dma_fill_lli(chan, lli, data, size);

local_irq_save(flags);

if ((next = chan->next) != NULL) {
struct s3c64xx_dma_buff *end = chan->end;
struct pl080s_lli *endlli = end->lli;
Expand Down Expand Up @@ -397,6 +398,8 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id,
s3c64xx_lli_to_regs(chan, lli);
}

local_irq_restore(flags);

show_lli(lli);

dbg_showchan(chan);
Expand Down Expand Up @@ -560,26 +563,11 @@ int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client)

EXPORT_SYMBOL(s3c2410_dma_free);


static void s3c64xx_dma_tcirq(struct s3c64xx_dmac *dmac, int offs)
{
struct s3c2410_dma_chan *chan = dmac->channels + offs;

/* note, we currently do not bother to work out which buffer
* or buffers have been completed since the last tc-irq. */

if (chan->callback_fn)
(chan->callback_fn)(chan, chan->curr->pw, 0, S3C2410_RES_OK);
}

static void s3c64xx_dma_errirq(struct s3c64xx_dmac *dmac, int offs)
{
printk(KERN_DEBUG "%s: offs %d\n", __func__, offs);
}

static irqreturn_t s3c64xx_dma_irq(int irq, void *pw)
{
struct s3c64xx_dmac *dmac = pw;
struct s3c2410_dma_chan *chan;
enum s3c2410_dma_buffresult res;
u32 tcstat, errstat;
u32 bit;
int offs;
Expand All @@ -588,14 +576,54 @@ static irqreturn_t s3c64xx_dma_irq(int irq, void *pw)
errstat = readl(dmac->regs + PL080_ERR_STATUS);

for (offs = 0, bit = 1; offs < 8; offs++, bit <<= 1) {
struct s3c64xx_dma_buff *buff;

if (!(errstat & bit) && !(tcstat & bit))
continue;

chan = dmac->channels + offs;
res = S3C2410_RES_ERR;

if (tcstat & bit) {
writel(bit, dmac->regs + PL080_TC_CLEAR);
s3c64xx_dma_tcirq(dmac, offs);
res = S3C2410_RES_OK;
}

if (errstat & bit) {
s3c64xx_dma_errirq(dmac, offs);
if (errstat & bit)
writel(bit, dmac->regs + PL080_ERR_CLEAR);

/* 'next' points to the buffer that is next to the
* currently active buffer.
* For CIRCULAR queues, 'next' will be same as 'curr'
* when 'end' is the active buffer.
*/
buff = chan->curr;
while (buff && buff != chan->next
&& buff->next != chan->next)
buff = buff->next;

if (!buff)
BUG();

if (buff == chan->next)
buff = chan->end;

s3c64xx_dma_bufffdone(chan, buff, res);

/* Free the node and update curr, if non-circular queue */
if (!(chan->flags & S3C2410_DMAF_CIRCULAR)) {
chan->curr = buff->next;
s3c64xx_dma_freebuff(buff);
}

/* Update 'next' */
buff = chan->next;
if (chan->next == chan->end) {
chan->next = chan->curr;
if (!(chan->flags & S3C2410_DMAF_CIRCULAR))
chan->end = NULL;
} else {
chan->next = buff->next;
}
}

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/media/common/tuners/tda18271-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,13 +616,13 @@ static int tda18271_rf_tracking_filters_init(struct dvb_frontend *fe, u32 freq)
case RF2:
map[i].rf_a1 = (prog_cal[RF2] - prog_tab[RF2] -
prog_cal[RF1] + prog_tab[RF1]) /
((rf_freq[RF2] - rf_freq[RF1]) / 1000);
(s32)((rf_freq[RF2] - rf_freq[RF1]) / 1000);
map[i].rf2 = rf_freq[RF2] / 1000;
break;
case RF3:
map[i].rf_a2 = (prog_cal[RF3] - prog_tab[RF3] -
prog_cal[RF2] + prog_tab[RF2]) /
((rf_freq[RF3] - rf_freq[RF2]) / 1000);
(s32)((rf_freq[RF3] - rf_freq[RF2]) / 1000);
map[i].rf_b2 = prog_cal[RF2] - prog_tab[RF2];
map[i].rf3 = rf_freq[RF3] / 1000;
break;
Expand Down Expand Up @@ -1000,12 +1000,12 @@ static int tda18271_set_analog_params(struct dvb_frontend *fe,
struct tda18271_std_map_item *map;
char *mode;
int ret;
u32 freq = params->frequency * 62500;
u32 freq = params->frequency * 125 *
((params->mode == V4L2_TUNER_RADIO) ? 1 : 1000) / 2;

priv->mode = TDA18271_ANALOG;

if (params->mode == V4L2_TUNER_RADIO) {
freq = freq / 1000;
map = &std_map->fm_radio;
mode = "fm";
} else if (params->std & V4L2_STD_MN) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/dvb/dvb-usb/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ config DVB_USB_DIB0700
select DVB_DIB3000MC if !DVB_FE_CUSTOMISE
select DVB_S5H1411 if !DVB_FE_CUSTOMISE
select DVB_LGDT3305 if !DVB_FE_CUSTOMISE
select DVB_TUNER_DIB0070
select DVB_TUNER_DIB0070 if !DVB_FE_CUSTOMISE
select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMISE
select MEDIA_TUNER_MT2266 if !MEDIA_TUNER_CUSTOMISE
select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMISE
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/dvb/dvb-usb/ce6230.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static int ce6230_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
int i = 0;
struct req_t req;
int ret = 0;
memset(&req, 0, sizeof(&req));
memset(&req, 0, sizeof(req));

if (num > 2)
return -EINVAL;
Expand Down
15 changes: 6 additions & 9 deletions trunk/drivers/media/dvb/dvb-usb/dib0700_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -1925,7 +1925,7 @@ struct dvb_usb_device_properties dib0700_devices[] = {
{ NULL },
},
{ "Leadtek Winfast DTV Dongle (STK7700P based)",
{ &dib0700_usb_id_table[8] },
{ &dib0700_usb_id_table[8], &dib0700_usb_id_table[34] },
{ NULL },
},
{ "AVerMedia AVerTV DVB-T Express",
Expand Down Expand Up @@ -2064,7 +2064,7 @@ struct dvb_usb_device_properties dib0700_devices[] = {
},
},

.num_device_descs = 12,
.num_device_descs = 11,
.devices = {
{ "DiBcom STK7070P reference design",
{ &dib0700_usb_id_table[15], NULL },
Expand Down Expand Up @@ -2098,11 +2098,6 @@ struct dvb_usb_device_properties dib0700_devices[] = {
{ &dib0700_usb_id_table[30], NULL },
{ NULL },
},
{ "Terratec Cinergy T USB XXS/ T3",
{ &dib0700_usb_id_table[33],
&dib0700_usb_id_table[52], NULL },
{ NULL },
},
{ "Elgato EyeTV DTT",
{ &dib0700_usb_id_table[49], NULL },
{ NULL },
Expand Down Expand Up @@ -2343,8 +2338,10 @@ struct dvb_usb_device_properties dib0700_devices[] = {
{ &dib0700_usb_id_table[59], NULL },
{ NULL },
},
{ "Terratec Cinergy T USB XXS (HD)",
{ &dib0700_usb_id_table[34], &dib0700_usb_id_table[60] },
{ "Terratec Cinergy T USB XXS (HD)/ T3",
{ &dib0700_usb_id_table[33],
&dib0700_usb_id_table[52],
&dib0700_usb_id_table[60], NULL},
{ NULL },
},
},
Expand Down
38 changes: 20 additions & 18 deletions trunk/drivers/media/dvb/firewire/firedtv-avc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1050,28 +1050,28 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length)
c->operand[4] = 0; /* slot */
c->operand[5] = SFE_VENDOR_TAG_CA_PMT; /* ca tag */
c->operand[6] = 0; /* more/last */
/* c->operand[7] = XXXprogram_info_length + 17; */ /* length */
c->operand[8] = list_management;
c->operand[9] = 0x01; /* pmt_cmd=OK_descramble */
/* Use three bytes for length field in case length > 127 */
c->operand[10] = list_management;
c->operand[11] = 0x01; /* pmt_cmd=OK_descramble */

/* TS program map table */

c->operand[10] = 0x02; /* Table id=2 */
c->operand[11] = 0x80; /* Section syntax + length */
/* c->operand[12] = XXXprogram_info_length + 12; */
c->operand[13] = msg[1]; /* Program number */
c->operand[14] = msg[2];
c->operand[15] = 0x01; /* Version number=0 + current/next=1 */
c->operand[16] = 0x00; /* Section number=0 */
c->operand[17] = 0x00; /* Last section number=0 */
c->operand[18] = 0x1f; /* PCR_PID=1FFF */
c->operand[19] = 0xff;
c->operand[20] = (program_info_length >> 8); /* Program info length */
c->operand[21] = (program_info_length & 0xff);
c->operand[12] = 0x02; /* Table id=2 */
c->operand[13] = 0x80; /* Section syntax + length */
/* c->operand[14] = XXXprogram_info_length + 12; */
c->operand[15] = msg[1]; /* Program number */
c->operand[16] = msg[2];
c->operand[17] = 0x01; /* Version number=0 + current/next=1 */
c->operand[18] = 0x00; /* Section number=0 */
c->operand[19] = 0x00; /* Last section number=0 */
c->operand[20] = 0x1f; /* PCR_PID=1FFF */
c->operand[21] = 0xff;
c->operand[22] = (program_info_length >> 8); /* Program info length */
c->operand[23] = (program_info_length & 0xff);

/* CA descriptors at programme level */
read_pos = 6;
write_pos = 22;
write_pos = 24;
if (program_info_length > 0) {
pmt_cmd_id = msg[read_pos++];
if (pmt_cmd_id != 1 && pmt_cmd_id != 4)
Expand Down Expand Up @@ -1113,8 +1113,10 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length)
c->operand[write_pos++] = 0x00;
c->operand[write_pos++] = 0x00;

c->operand[7] = write_pos - 8;
c->operand[12] = write_pos - 13;
c->operand[7] = 0x82;
c->operand[8] = (write_pos - 10) >> 8;
c->operand[9] = (write_pos - 10) & 0xff;
c->operand[14] = write_pos - 15;

crc32_csum = crc32_be(0, &c->operand[10], c->operand[12] - 1);
c->operand[write_pos - 4] = (crc32_csum >> 24) & 0xff;
Expand Down
8 changes: 1 addition & 7 deletions trunk/drivers/media/dvb/firewire/firedtv-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,12 @@ static int fdtv_read_uncorrected_blocks(struct dvb_frontend *fe, u32 *ucblocks)
return -EOPNOTSUPP;
}

#define ACCEPTED 0x9

static int fdtv_set_frontend(struct dvb_frontend *fe,
struct dvb_frontend_parameters *params)
{
struct firedtv *fdtv = fe->sec_priv;

/* FIXME: avc_tuner_dsd never returns ACCEPTED. Check status? */
if (avc_tuner_dsd(fdtv, params) != ACCEPTED)
return -EINVAL;
else
return 0; /* not sure of this... */
return avc_tuner_dsd(fdtv, params);
}

static int fdtv_get_frontend(struct dvb_frontend *fe,
Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/media/dvb/frontends/dib0070.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ struct dib0070_config {
#if defined(CONFIG_DVB_TUNER_DIB0070) || (defined(CONFIG_DVB_TUNER_DIB0070_MODULE) && defined(MODULE))
extern struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0070_config *cfg);
extern u16 dib0070_wbd_offset(struct dvb_frontend *);
extern void dib0070_ctrl_agc_filter(struct dvb_frontend *, u8 open);
#else
static inline struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0070_config *cfg)
{
Expand All @@ -63,7 +64,11 @@ static inline u16 dib0070_wbd_offset(struct dvb_frontend *fe)
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return -ENODEV;
}

static inline void dib0070_ctrl_agc_filter(struct dvb_frontend *fe, u8 open)
{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
}
#endif
extern void dib0070_ctrl_agc_filter(struct dvb_frontend *, u8 open);

#endif
5 changes: 5 additions & 0 deletions trunk/drivers/media/dvb/frontends/dib7000p.c
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,11 @@ struct dvb_frontend * dib7000p_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr,
if (dib7000p_identify(st) != 0)
goto error;

/* FIXME: make sure the dev.parent field is initialized, or else
request_firmware() will hit an OOPS (this should be moved somewhere
more common) */
st->i2c_master.gated_tuner_i2c_adap.dev.parent = i2c_adap->dev.parent;

dibx000_init_i2c_master(&st->i2c_master, DIB7000P, st->i2c_adap, st->i2c_addr);

dib7000p_demod_reset(st);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/dvb/pt1/pt1.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/pci.h>
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <linux/vmalloc.h>

#include "dvbdev.h"
#include "dvb_demux.h"
Expand Down
Loading

0 comments on commit dbca580

Please sign in to comment.