Commit Graph

25 Commits (1414becf15da1701b0c45e9c82b1f120cb676a36)

Author SHA1 Message Date
Adrian Bunk 39e75cfedf V4L/DVB (6575): cx23885/: cleanups
This patch contains the following cleanups:
- make the following needlessly global code static:
  - cx23885-core.c: struct cx23885_sram_channels[]
  - cx23885-core.c: struct cx23887_sram_channels[]
  - cx23885-core.c: cx23885_wakeup()
  - cx23885-core.c: cx23885_sram_channel_setup()
  - cx23885-core.c: cx23885_sram_channel_dump()
  - cx23885-core.c: cx23885_risc_disasm()
  - cx23885-core.c: cx23885_shutdown()
  - cx23885-core.c: cx23885_reset()
  - cx23885-core.c: cx23885_dev_unregister()
  - cx23885-core.c: cx23885_risc_databuffer()
  - cx23885-core.c: cx23885_risc_stopper()
- #if 0 the following unused functions:
  - cx23885-core.c: cx23885_risc_buffer()
  - cx23885-core.c: cx23885_cancel_buffers()
- remove the following unused EXPORT_SYMBOL's:
  - cx23885-cards.c: cx23885_boards
  - cx23885-i2c.c: cx23885_call_i2c_clients

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:05 -02:00
Florin Malita fcf94c89af V4L/DVB (6325): Double-free in cx23885_initdev
Both cx23885_initdev and cx23885_dev_setup free the device in their
error path so a failure in the latter causes a double-free. Since
cx23885_dev_setup is only called from cx23885_initdev, it should be safe
to remove its deallocation and leave the cleanup up to the allocating
function.

Coverity CID 1922.

Signed-off-by: Florin Malita <fmalita@gmail.com>
CC: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-22 12:01:36 -02:00
Trent Piepho a991f44b79 V4L/DVB (6316): Change list_for_each+list_entry to list_for_each_entry
The rest of V4L files.

There is one list_for_each+list_entry in cpia_pp.c that
wasn't changed because it expects the loop iterator to remain NULL if
the list is empty.

A bug in vivi is fixed; the 'safe' version needs to be used because the loop
deletes the list entries.

Simplify a second loop in vivi and get rid if an un-used variable in that loop.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 13:35:29 -03:00
Trent Piepho 409d84f85a V4L/DVB (6284): cx23885: Update to new videobuf code
cx23885 was still uses the old video-buf includes and code, which would only
`work' if one happened to be compiling against a kernel that had the old
headers.  Even then, it wouldn't actually work, it would just compile without
errors.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:09 -03:00
Steven Toth a6a3f14035 V4L/DVB (6199): cx23885: Changes to allow demodulators on each transport bus
cx23885: Changes to allow demodulators on each transport bus.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:29 -03:00
Michael Krufky 9bc37caadf V4L/DVB (6196): cx23885: add support for DViCO FusionHDTV 5 Express
This patch adds digital ATSC / QAM support for the DViCO FusionHDTV5 Express.
Remote control is supported by ir-kbd-i2c, RTC is supported by rtc-isl1208.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:29 -03:00
Steven Toth 579f1163cd V4L/DVB (6195): Changes to support MPEG TS on VIDB
Changes to support MPEG TS on VIDB

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:28 -03:00
Steven Toth 6f074abb62 V4L/DVB (6194): Changes to support interrupts on VIDB
Changes to support interrupts on VIDB

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:28 -03:00
Steven Toth 661c7e44c5 V4L/DVB (6192): Ensure start_dma() is capable of starting dma on port VIDB
start_dma() would fail to start dma if a device used VIDB (portb).

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:28 -03:00
Steven Toth bfde287c2f V4L/DVB (6191): Removed a redundant switch()
The switch() statement is no longer required.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:28 -03:00
Steven Toth 2df9a4c2d8 V4L/DVB (6173): cx23885: Minor cleanup and important NMI comment placed in code
I wanted to document the NMI assert issue inside the code, even though
it's already documented in the patch history. If/when the next cx23887
revision appears, is may need to be enabled on that also.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:26 -03:00
Steven Toth 31bae4a620 V4L/DVB (6171): cx23885: Cleaning up defines
Moving some defines into the correct header file.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:22 -03:00
Steven Toth 2e52f215be V4L/DVB (6170): cx23885: General cleanup of old code
Removed unused code.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:21 -03:00
Steven Toth a77743bc2d V4L/DVB (6168): cx23885: Added HVR1250 ATSC support
Adding support for the Hauppauge HVR1250 PCIe ATSC board.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:20 -03:00
Steven Toth 4823e9ee9f V4L/DVB (6167): cx23885: Changed PCI quirks to after bridge detech
Changed the pci_quirks function to detech the bridge type before setting
the NMI clear bit, rather than detecting based on unique board id.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:17 -03:00
Steven Toth 426d523664 V4L/DVB (6166): cx23885: Ensure pci_quirks is called after board identification
The pci_quirks function was being called too early during initialisation,
it needs to be called after the board has been identified.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:16 -03:00
Michael Krufky 60a41d3b61 V4L/DVB (6163): cx23885: remove old comments
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:12 -03:00
Michael Krufky 44a6481dcd V4L/DVB (6162): cx23885: whitespace cleanups
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:11 -03:00
Steven Toth 047646bfbb V4L/DVB (6159): General code cleanup
Removed if 0'd code, removed cx88 references.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:09 -03:00
Steven Toth e133be0f58 V4L/DVB (6157): Removed the need to manually define .bridge for each card
Moved the field from cx23885_board to cx23885_dev and added code to
iautomatically set the bridge type based on the pci device id.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:06 -03:00
Steven Toth 3328e4fbf1 V4L/DVB (6155): Cleanup/remove code to access the sram memory maps
The cx23885 and cx23887 family use two different memory maps which govern
how the internal SRAM is configured. This patch streamlines the access to those
structures.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:02 -03:00
Steven Toth 3bd4065961 V4L/DVB (6154): NMI hang and corrupt transport packet fixes
The sram allocations for the cx23887 differ slightly from the cx23885.
This patch modifies the cx23887 specific sram memory map to reflect this.
As a result, interrupts and DMA handling have also been enabled in
cx23885_start_dma() for 887 specific boards.

ATSC streaming is now available on cx23885 and cx23887 bridges.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:01 -03:00
Steven Toth a2129af5b6 V4L/DVB (6153): I2C bus 3 register was incorrect
I2C bus 3 was being initialised with the incorrect address register.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:00 -03:00
Michael Krufky 03121f05f9 V4L/DVB (6152): cx23885: forward compatibility fixes for recent kernels
- fix #include for <media/video-buf-dvb.h>
- fix cx23885_irq declaration for 2.6.19 and later

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:00 -03:00
Steven Toth d19770e517 V4L/DVB (6150): Add CX23885/CX23887 PCIe bridge driver
This is a new framework to support boards based on the CX23885/7 PCIe
bridge. The framework supports digital (no analog yet)

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:07:56 -03:00