Firestream: Multi-phy.
PATCH 1/1 Firestream: Multi-phy.
Hi Linus, Alan, others,
The Firestream ATM SAR can be connected to multiple Physical interface chips over the "utopia-2" bus. So far the driver would always address the PHY at address 0. This patch allows the driver to address multiple PHY devices.
When instructed to do so, the driver will present itself as multiple cards. This was the cleanest way that I could find to fit this into the "scheme of things".
Somehow, the Makefile entry for the firestream driver was lost in the standard line of the kernels.
Roger Wolff.
P.S. I created the patch on 2.4.6, but it has been tested & applies cleanly on 2.4.9 .
#-------------------------------------------------------------------
drivers/atm/Makefile +1 -0
@@ -25,6 +25,7 @@ obj-$(CONFIG_ATM_AMBASSADOR) += ambassador.o obj-$(CONFIG_ATM_TCP) += atmtcp.o obj-$(CONFIG_ATM_IA) += iphase.o suni.o +obj-$(CONFIG_ATM_FIRESTREAM) += firestream.o ifeq ($(CONFIG_ATM_FORE200E_PCA),y) FORE200E_FW_OBJS += fore200e_pca_fw.o
drivers/atm/firestream.c +42 -19
148 lines not on this page · raw message
drivers/atm/firestream.h +14 -2
@@ -345,13 +345,15 @@#define CELLOSCONF_COST (0x1 << 0)/* Bits? */ -#define RAS0 0x1bc#define RAS0_DCD_XHLT (0x1 << 31)#define RAS0_VPSEL (0x1 << 16)#define RAS0_VCSEL (0x1 << 0) +#define RAS1 0x1c0 +#define RAS1_UTREG (0x1 << 5) +#define DMAMR 0x1cc#define DMAMR_TX_MODE_FULL (0x0 << 0)
@@ -360,6 +362,14 @@ +#define RAS2 0x280 + +#define RAS2_NNI (0x1 << 0) +#define RAS2_USEL (0x1 << 1) +#define RAS2_UBS (0x1 << 2) + + +struct fs_transmit_config {u32 flags;u32 atm_hdr;
@@ -456,6 +466,7 @@int n; }; +#define MAX_PHY 0x20struct fs_dev {struct fs_dev *next;/* other FS devices */
@@ -463,8 +474,9 @@unsigned char irq;/* IRQ */ struct pci_dev *pci_dev;/* PCI stuff */ -struct atm_dev *atm_dev; +struct atm_dev *atm_dev[MAX_PHY ];struct timer_list timer; +int start_number;unsigned long hw_base;/* mem base address */ unsigned long base;/* Mapping of base address */
Signature · 4 lines
** [email protected] ** http://www.BitWizard.nl/ ** +31-15-2137555 ** *-- BitWizard writes Linux device drivers for any device you may have! --* * There are old pilots, and there are bold pilots. * There are also old, bald pilots.