Skip to content

Commit

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

* 'ieee1394-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  ieee1394: remove the old IEEE 1394 driver stack
  ieee1394: move init_ohci1394_dma to drivers/firewire/

Fix trivial change/delete conflict: drivers/ieee1394/eth1394.c is
getting removed, but was modified by the networking merge.
  • Loading branch information
torvalds committed Oct 25, 2010
2 parents da47c19 + 66fa12c commit b7d41a9
Show file tree
Hide file tree
Showing 52 changed files with 96 additions and 29,325 deletions.
9 changes: 0 additions & 9 deletions Documentation/ABI/obsolete/dv1394

This file was deleted.

14 changes: 14 additions & 0 deletions Documentation/ABI/removed/dv1394
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
What: dv1394 (a.k.a. "OHCI-DV I/O support" for FireWire)
Date: May 2010 (scheduled), finally removed in kernel v2.6.37
Contact: [email protected]
Description:
/dev/dv1394/* were character device files, one for each FireWire
controller and for NTSC and PAL respectively, from which DV data
could be received by read() or transmitted by write(). A few
ioctl()s allowed limited control.
This special-purpose interface has been superseded by libraw1394 +
libiec61883 which are functionally equivalent, support HDV, and
transparently work on top of the newer firewire kernel drivers.

Users:
ffmpeg/libavformat (if configured for DV1394)
15 changes: 15 additions & 0 deletions Documentation/ABI/removed/raw1394
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
What: raw1394 (a.k.a. "Raw IEEE1394 I/O support" for FireWire)
Date: May 2010 (scheduled), finally removed in kernel v2.6.37
Contact: [email protected]
Description:
/dev/raw1394 was a character device file that allowed low-level
access to FireWire buses. Its major drawbacks were its inability
to implement sensible device security policies, and its low level
of abstraction that required userspace clients do duplicate much
of the kernel's ieee1394 core functionality.
Replaced by /dev/fw*, i.e. the <linux/firewire-cdev.h> ABI of
firewire-core.

Users:
libraw1394 (works with firewire-cdev too, transparent to library ABI
users)
16 changes: 0 additions & 16 deletions Documentation/ABI/removed/raw1394_legacy_isochronous

This file was deleted.

16 changes: 16 additions & 0 deletions Documentation/ABI/removed/video1394
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
What: video1394 (a.k.a. "OHCI-1394 Video support" for FireWire)
Date: May 2010 (scheduled), finally removed in kernel v2.6.37
Contact: [email protected]
Description:
/dev/video1394/* were character device files, one for each FireWire
controller, which were used for isochronous I/O. It was added as an
alternative to raw1394's isochronous I/O functionality which had
performance issues in its first generation. Any video1394 user had
to use raw1394 + libraw1394 too because video1394 did not provide
asynchronous I/O for device discovery and configuration.
Replaced by /dev/fw*, i.e. the <linux/firewire-cdev.h> ABI of
firewire-core.

Users:
libdc1394 (works with firewire-cdev too, transparent to library ABI
users)
10 changes: 0 additions & 10 deletions Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -502,16 +502,6 @@ Who: Thomas Gleixner <[email protected]>

----------------------------

What: old ieee1394 subsystem (CONFIG_IEEE1394)
When: 2.6.37
Files: drivers/ieee1394/ except init_ohci1394_dma.c
Why: superseded by drivers/firewire/ (CONFIG_FIREWIRE) which offers more
features, better performance, and better security, all with smaller
and more modern code base
Who: Stefan Richter <[email protected]>

----------------------------

What: The acpi_sleep=s4_nonvs command line option
When: 2.6.37
Files: arch/x86/kernel/acpi/sleep.c
Expand Down
1 change: 0 additions & 1 deletion drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ obj-y += net/
obj-$(CONFIG_ATM) += atm/
obj-$(CONFIG_FUSION) += message/
obj-y += firewire/
obj-y += ieee1394/
obj-$(CONFIG_UIO) += uio/
obj-y += cdrom/
obj-y += auxdisplay/
Expand Down
5 changes: 0 additions & 5 deletions drivers/firewire/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ menu "IEEE 1394 (FireWire) support"
# firewire-core does not depend on PCI but is
# not useful without PCI controller driver

comment "You can enable one or both FireWire driver stacks."
comment "The newer stack is recommended."

config FIREWIRE
tristate "FireWire driver stack"
select CRC_ITU_T
Expand Down Expand Up @@ -64,8 +61,6 @@ config FIREWIRE_NET
To compile this driver as a module, say M here: The module will be
called firewire-net.

source "drivers/ieee1394/Kconfig"

config FIREWIRE_NOSY
tristate "Nosy - a FireWire traffic sniffer for PCILynx cards"
depends on PCI
Expand Down
1 change: 1 addition & 0 deletions drivers/firewire/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ obj-$(CONFIG_FIREWIRE_OHCI) += firewire-ohci.o
obj-$(CONFIG_FIREWIRE_SBP2) += firewire-sbp2.o
obj-$(CONFIG_FIREWIRE_NET) += firewire-net.o
obj-$(CONFIG_FIREWIRE_NOSY) += nosy.o
obj-$(CONFIG_PROVIDE_OHCI1394_DMA_INIT) += init_ohci1394_dma.o
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,41 @@
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <linux/interrupt.h> /* for ohci1394.h */
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/pci.h> /* for PCI defines */
#include <linux/init_ohci1394_dma.h>
#include <linux/string.h>

#include <asm/pci-direct.h> /* for direct PCI config space access */
#include <asm/fixmap.h>

#include "ieee1394_types.h"
#include "ohci1394.h"
#include <linux/init_ohci1394_dma.h>
#include "ohci.h"

int __initdata init_ohci1394_dma_early;

struct ohci {
void __iomem *registers;
};

static inline void reg_write(const struct ohci *ohci, int offset, u32 data)
{
writel(data, ohci->registers + offset);
}

static inline u32 reg_read(const struct ohci *ohci, int offset)
{
return readl(ohci->registers + offset);
}

#define OHCI_LOOP_COUNT 100 /* Number of loops for reg read waits */

/* Reads a PHY register of an OHCI-1394 controller */
static inline u8 __init get_phy_reg(struct ti_ohci *ohci, u8 addr)
static inline u8 __init get_phy_reg(struct ohci *ohci, u8 addr)
{
int i;
quadlet_t r;
u32 r;

reg_write(ohci, OHCI1394_PhyControl, (addr << 8) | 0x00008000);

Expand All @@ -63,22 +81,22 @@ static inline u8 __init get_phy_reg(struct ti_ohci *ohci, u8 addr)
}

/* Writes to a PHY register of an OHCI-1394 controller */
static inline void __init set_phy_reg(struct ti_ohci *ohci, u8 addr, u8 data)
static inline void __init set_phy_reg(struct ohci *ohci, u8 addr, u8 data)
{
int i;

reg_write(ohci, OHCI1394_PhyControl, (addr << 8) | data | 0x00004000);

for (i = 0; i < OHCI_LOOP_COUNT; i++) {
u32 r = reg_read(ohci, OHCI1394_PhyControl);
if (!(r & 0x00004000))
if (!(reg_read(ohci, OHCI1394_PhyControl) & 0x00004000))
break;
mdelay(1);
}
}

/* Resets an OHCI-1394 controller (for sane state before initialization) */
static inline void __init init_ohci1394_soft_reset(struct ti_ohci *ohci) {
static inline void __init init_ohci1394_soft_reset(struct ohci *ohci)
{
int i;

reg_write(ohci, OHCI1394_HCControlSet, OHCI1394_HCControl_softReset);
Expand All @@ -91,10 +109,14 @@ static inline void __init init_ohci1394_soft_reset(struct ti_ohci *ohci) {
}
}

#define OHCI1394_MAX_AT_REQ_RETRIES 0xf
#define OHCI1394_MAX_AT_RESP_RETRIES 0x2
#define OHCI1394_MAX_PHYS_RESP_RETRIES 0x8

/* Basic OHCI-1394 register and port inititalization */
static inline void __init init_ohci1394_initialize(struct ti_ohci *ohci)
static inline void __init init_ohci1394_initialize(struct ohci *ohci)
{
quadlet_t bus_options;
u32 bus_options;
int num_ports, i;

/* Put some defaults to these undefined bus options */
Expand All @@ -116,7 +138,7 @@ static inline void __init init_ohci1394_initialize(struct ti_ohci *ohci)

/* enable phys */
reg_write(ohci, OHCI1394_LinkControlSet,
OHCI1394_LinkControl_RcvPhyPkt);
OHCI1394_LinkControl_rcvPhyPkt);

/* Don't accept phy packets into AR request context */
reg_write(ohci, OHCI1394_LinkControlClear, 0x00000400);
Expand All @@ -128,7 +150,7 @@ static inline void __init init_ohci1394_initialize(struct ti_ohci *ohci)
reg_write(ohci, OHCI1394_IsoXmitIntEventClear, 0xffffffff);

/* Accept asyncronous transfer requests from all nodes for now */
reg_write(ohci,OHCI1394_AsReqFilterHiSet, 0x80000000);
reg_write(ohci, OHCI1394_AsReqFilterHiSet, 0x80000000);

/* Specify asyncronous transfer retries */
reg_write(ohci, OHCI1394_ATRetries,
Expand All @@ -137,7 +159,8 @@ static inline void __init init_ohci1394_initialize(struct ti_ohci *ohci)
(OHCI1394_MAX_PHYS_RESP_RETRIES<<8));

/* We don't want hardware swapping */
reg_write(ohci, OHCI1394_HCControlClear, OHCI1394_HCControl_noByteSwap);
reg_write(ohci, OHCI1394_HCControlClear,
OHCI1394_HCControl_noByteSwapData);

/* Enable link */
reg_write(ohci, OHCI1394_HCControlSet, OHCI1394_HCControl_linkEnable);
Expand All @@ -164,11 +187,11 @@ static inline void __init init_ohci1394_initialize(struct ti_ohci *ohci)
* has to be enabled after each bus reset when needed. We resort
* to polling here because on early boot, we have no interrupts.
*/
static inline void __init init_ohci1394_wait_for_busresets(struct ti_ohci *ohci)
static inline void __init init_ohci1394_wait_for_busresets(struct ohci *ohci)
{
int i, events;

for (i=0; i < 9; i++) {
for (i = 0; i < 9; i++) {
mdelay(200);
events = reg_read(ohci, OHCI1394_IntEventSet);
if (events & OHCI1394_busReset)
Expand All @@ -182,18 +205,18 @@ static inline void __init init_ohci1394_wait_for_busresets(struct ti_ohci *ohci)
* This enables remote DMA access over IEEE1394 from every host for the low
* 4GB of address space. DMA accesses above 4GB are not available currently.
*/
static inline void __init init_ohci1394_enable_physical_dma(struct ti_ohci *hci)
static inline void __init init_ohci1394_enable_physical_dma(struct ohci *ohci)
{
reg_write(hci, OHCI1394_PhyReqFilterHiSet, 0xffffffff);
reg_write(hci, OHCI1394_PhyReqFilterLoSet, 0xffffffff);
reg_write(hci, OHCI1394_PhyUpperBound, 0xffff0000);
reg_write(ohci, OHCI1394_PhyReqFilterHiSet, 0xffffffff);
reg_write(ohci, OHCI1394_PhyReqFilterLoSet, 0xffffffff);
reg_write(ohci, OHCI1394_PhyUpperBound, 0xffff0000);
}

/**
* init_ohci1394_reset_and_init_dma - init controller and enable DMA
* This initializes the given controller and enables physical DMA engine in it.
*/
static inline void __init init_ohci1394_reset_and_init_dma(struct ti_ohci *ohci)
static inline void __init init_ohci1394_reset_and_init_dma(struct ohci *ohci)
{
/* Start off with a soft reset, clears everything to a sane state. */
init_ohci1394_soft_reset(ohci);
Expand Down Expand Up @@ -225,7 +248,7 @@ static inline void __init init_ohci1394_reset_and_init_dma(struct ti_ohci *ohci)
static inline void __init init_ohci1394_controller(int num, int slot, int func)
{
unsigned long ohci_base;
struct ti_ohci ohci;
struct ohci ohci;

printk(KERN_INFO "init_ohci1394_dma: initializing OHCI-1394"
" at %02x:%02x.%x\n", num, slot, func);
Expand All @@ -235,7 +258,7 @@ static inline void __init init_ohci1394_controller(int num, int slot, int func)

set_fixmap_nocache(FIX_OHCI1394_BASE, ohci_base);

ohci.registers = (void *)fix_to_virt(FIX_OHCI1394_BASE);
ohci.registers = (void __iomem *)fix_to_virt(FIX_OHCI1394_BASE);

init_ohci1394_reset_and_init_dma(&ohci);
}
Expand All @@ -247,6 +270,7 @@ static inline void __init init_ohci1394_controller(int num, int slot, int func)
void __init init_ohci1394_dma_on_all_controllers(void)
{
int num, slot, func;
u32 class;

if (!early_pci_allowed())
return;
Expand All @@ -255,9 +279,9 @@ void __init init_ohci1394_dma_on_all_controllers(void)
for (num = 0; num < 32; num++) {
for (slot = 0; slot < 32; slot++) {
for (func = 0; func < 8; func++) {
u32 class = read_pci_config(num,slot,func,
class = read_pci_config(num, slot, func,
PCI_CLASS_REVISION);
if ((class == 0xffffffff))
if (class == 0xffffffff)
continue; /* No device at this func */

if (class>>8 != PCI_CLASS_SERIAL_FIREWIRE_OHCI)
Expand Down
Loading

0 comments on commit b7d41a9

Please sign in to comment.