Skip to content

Commit

Permalink
Merge branch 'firedtv-merge' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/ieee1394/linux1394-2.6

* 'firedtv-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firedtv: dvb_frontend_info for FireDTV S2, fix "frequency limits undefined" error
  firedtv: massive refactoring
  firedtv: rename files, variables, functions from firesat to firedtv
  firedtv: Use DEFINE_SPINLOCK
  firedtv: fix registration - adapter number could only be zero
  firedtv: use length_field() of PMT as length
  firedtv: fix returned struct for ca_info
  firedtv: cleanups and minor fixes
  ieee1394: remove superfluous assertions
  ieee1394: inherit ud vendor_id from node vendor_id
  ieee1394: add hpsb_node_read() and hpsb_node_lock()
  ieee1394: use correct barrier types between accesses of nodeid and generation
  firesat: copyrights, rename to firedtv, API conversions, fix remote control input
  firesat: avc resend
  firesat: update isochronous interface, add CI support
  firesat: add DVB-S support for DVB-S2 devices
  firesat: fix DVB-S2 device recognition
  DVB: add firesat driver
  • Loading branch information
Linus Torvalds committed Feb 24, 2009
2 parents 4daa068 + e73bf9f commit a792cd1
Show file tree
Hide file tree
Showing 18 changed files with 2,936 additions and 7 deletions.
1 change: 1 addition & 0 deletions drivers/ieee1394/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <asm/types.h>

struct file;
struct pci_dev;
struct scatterlist;
struct vm_area_struct;
Expand Down
1 change: 1 addition & 0 deletions drivers/ieee1394/ieee1394_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1314,6 +1314,7 @@ EXPORT_SYMBOL(hpsb_make_lock64packet);
EXPORT_SYMBOL(hpsb_make_phypacket);
EXPORT_SYMBOL(hpsb_read);
EXPORT_SYMBOL(hpsb_write);
EXPORT_SYMBOL(hpsb_lock);
EXPORT_SYMBOL(hpsb_packet_success);

/** highlevel.c **/
Expand Down
31 changes: 27 additions & 4 deletions drivers/ieee1394/ieee1394_transactions.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,6 @@ int hpsb_read(struct hpsb_host *host, nodeid_t node, unsigned int generation,
if (length == 0)
return -EINVAL;

BUG_ON(in_interrupt()); // We can't be called in an interrupt, yet

packet = hpsb_make_readpacket(host, node, addr, length);

if (!packet) {
Expand Down Expand Up @@ -550,8 +548,6 @@ int hpsb_write(struct hpsb_host *host, nodeid_t node, unsigned int generation,
if (length == 0)
return -EINVAL;

BUG_ON(in_interrupt()); // We can't be called in an interrupt, yet

packet = hpsb_make_writepacket(host, node, addr, buffer, length);

if (!packet)
Expand All @@ -570,3 +566,30 @@ int hpsb_write(struct hpsb_host *host, nodeid_t node, unsigned int generation,

return retval;
}

int hpsb_lock(struct hpsb_host *host, nodeid_t node, unsigned int generation,
u64 addr, int extcode, quadlet_t *data, quadlet_t arg)
{
struct hpsb_packet *packet;
int retval = 0;

packet = hpsb_make_lockpacket(host, node, addr, extcode, data, arg);
if (!packet)
return -ENOMEM;

packet->generation = generation;
retval = hpsb_send_packet_and_wait(packet);
if (retval < 0)
goto hpsb_lock_fail;

retval = hpsb_packet_success(packet);

if (retval == 0)
*data = packet->data[0];

hpsb_lock_fail:
hpsb_free_tlabel(packet);
hpsb_free_packet(packet);

return retval;
}
2 changes: 2 additions & 0 deletions drivers/ieee1394/ieee1394_transactions.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ int hpsb_read(struct hpsb_host *host, nodeid_t node, unsigned int generation,
u64 addr, quadlet_t *buffer, size_t length);
int hpsb_write(struct hpsb_host *host, nodeid_t node, unsigned int generation,
u64 addr, quadlet_t *buffer, size_t length);
int hpsb_lock(struct hpsb_host *host, nodeid_t node, unsigned int generation,
u64 addr, int extcode, quadlet_t *data, quadlet_t arg);

#ifdef HPSB_DEBUG_TLABELS
extern spinlock_t hpsb_tlabel_lock;
Expand Down
1 change: 1 addition & 0 deletions drivers/ieee1394/iso.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define IEEE1394_ISO_H

#include <linux/spinlock_types.h>
#include <linux/wait.h>
#include <asm/atomic.h>
#include <asm/types.h>

Expand Down
10 changes: 7 additions & 3 deletions drivers/ieee1394/nodemgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,9 @@ static struct unit_directory *nodemgr_process_unit_directory
ud->ud_kv = ud_kv;
ud->id = (*id)++;

/* inherit vendor_id from root directory if none exists in unit dir */
ud->vendor_id = ne->vendor_id;

csr1212_for_each_dir_entry(ne->csr, kv, ud_kv, dentry) {
switch (kv->key.id) {
case CSR1212_KV_ID_VENDOR:
Expand Down Expand Up @@ -1265,7 +1268,8 @@ static void nodemgr_update_node(struct node_entry *ne, struct csr1212_csr *csr,
csr1212_destroy_csr(csr);
}

/* Mark the node current */
/* Finally, mark the node current */
smp_wmb();
ne->generation = generation;

if (ne->in_limbo) {
Expand Down Expand Up @@ -1798,7 +1802,7 @@ void hpsb_node_fill_packet(struct node_entry *ne, struct hpsb_packet *packet)
{
packet->host = ne->host;
packet->generation = ne->generation;
barrier();
smp_rmb();
packet->node_id = ne->nodeid;
}

Expand All @@ -1807,7 +1811,7 @@ int hpsb_node_write(struct node_entry *ne, u64 addr,
{
unsigned int generation = ne->generation;

barrier();
smp_rmb();
return hpsb_write(ne->host, ne->nodeid, generation,
addr, buffer, length);
}
Expand Down
18 changes: 18 additions & 0 deletions drivers/ieee1394/nodemgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
#define _IEEE1394_NODEMGR_H

#include <linux/device.h>
#include <asm/system.h>
#include <asm/types.h>

#include "ieee1394_core.h"
#include "ieee1394_transactions.h"
#include "ieee1394_types.h"

struct csr1212_csr;
Expand Down Expand Up @@ -154,6 +156,22 @@ static inline int hpsb_node_entry_valid(struct node_entry *ne)
void hpsb_node_fill_packet(struct node_entry *ne, struct hpsb_packet *packet);
int hpsb_node_write(struct node_entry *ne, u64 addr,
quadlet_t *buffer, size_t length);
static inline int hpsb_node_read(struct node_entry *ne, u64 addr,
quadlet_t *buffer, size_t length)
{
unsigned int g = ne->generation;

smp_rmb();
return hpsb_read(ne->host, ne->nodeid, g, addr, buffer, length);
}
static inline int hpsb_node_lock(struct node_entry *ne, u64 addr, int extcode,
quadlet_t *buffer, quadlet_t arg)
{
unsigned int g = ne->generation;

smp_rmb();
return hpsb_lock(ne->host, ne->nodeid, g, addr, extcode, buffer, arg);
}
int nodemgr_for_each_host(void *data, int (*cb)(struct hpsb_host *, void *));

int init_ieee1394_nodemgr(void);
Expand Down
4 changes: 4 additions & 0 deletions drivers/media/dvb/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ comment "Supported SDMC DM1105 Adapters"
depends on DVB_CORE && PCI && I2C
source "drivers/media/dvb/dm1105/Kconfig"

comment "Supported FireWire (IEEE 1394) Adapters"
depends on DVB_CORE && IEEE1394
source "drivers/media/dvb/firewire/Kconfig"

comment "Supported DVB Frontends"
depends on DVB_CORE
source "drivers/media/dvb/frontends/Kconfig"
Expand Down
2 changes: 2 additions & 0 deletions drivers/media/dvb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
#

obj-y := dvb-core/ frontends/ ttpci/ ttusb-dec/ ttusb-budget/ b2c2/ bt8xx/ dvb-usb/ pluto2/ siano/ dm1105/

obj-$(CONFIG_DVB_FIREDTV) += firewire/
22 changes: 22 additions & 0 deletions drivers/media/dvb/firewire/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
config DVB_FIREDTV
tristate "FireDTV and FloppyDTV"
depends on DVB_CORE && IEEE1394
help
Support for DVB receivers from Digital Everywhere
which are connected via IEEE 1394 (FireWire).

These devices don't have an MPEG decoder built in,
so you need an external software decoder to watch TV.

To compile this driver as a module, say M here:
the module will be called firedtv.

if DVB_FIREDTV

config DVB_FIREDTV_IEEE1394
def_bool IEEE1394

config DVB_FIREDTV_INPUT
def_bool INPUT = y || (INPUT = m && DVB_FIREDTV = m)

endif # DVB_FIREDTV
8 changes: 8 additions & 0 deletions drivers/media/dvb/firewire/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
obj-$(CONFIG_DVB_FIREDTV) += firedtv.o

firedtv-y := firedtv-avc.o firedtv-ci.o firedtv-dvb.o firedtv-fe.o
firedtv-$(CONFIG_DVB_FIREDTV_IEEE1394) += firedtv-1394.o
firedtv-$(CONFIG_DVB_FIREDTV_INPUT) += firedtv-rc.o

ccflags-y += -Idrivers/media/dvb/dvb-core
ccflags-$(CONFIG_DVB_FIREDTV_IEEE1394) += -Idrivers/ieee1394
Loading

0 comments on commit a792cd1

Please sign in to comment.