Skip to content

Commit

Permalink
atm: [fore200e] convert to use request_firmware()
Browse files Browse the repository at this point in the history
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Chas Williams authored and davem330 committed Jun 17, 2008
1 parent 7255ca3 commit e92481f
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 3,047 deletions.
77 changes: 6 additions & 71 deletions drivers/atm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -325,81 +325,22 @@ config ATM_IA_DEBUG
speed of the driver, and the size of your syslog files! When
inactive, they will have only a modest impact on performance.

config ATM_FORE200E_MAYBE
config ATM_FORE200E
tristate "FORE Systems 200E-series"
depends on PCI || SBUS
depends on (PCI || SBUS)
select FW_LOADER
---help---
This is a driver for the FORE Systems 200E-series ATM adapter
cards. It simultaneously supports PCA-200E and SBA-200E models
on PCI and SBUS hosts. Say Y (or M to compile as a module
named fore_200e) here if you have one of these ATM adapters.

Note that the driver will actually be compiled only if you
additionally enable the support for PCA-200E and/or SBA-200E
cards.

See the file <file:Documentation/networking/fore200e.txt> for
further details.

config ATM_FORE200E_PCA
bool "PCA-200E support"
depends on ATM_FORE200E_MAYBE && PCI
help
Say Y here if you want your PCA-200E cards to be probed.

config ATM_FORE200E_PCA_DEFAULT_FW
bool "Use default PCA-200E firmware (normally enabled)"
depends on ATM_FORE200E_PCA
help
Use the default PCA-200E firmware data shipped with the driver.

Normal users do not have to deal with the firmware stuff, so
they should say Y here.

config ATM_FORE200E_PCA_FW
string "Pathname of user-supplied binary firmware"
depends on ATM_FORE200E_PCA && !ATM_FORE200E_PCA_DEFAULT_FW
default ""
help
This defines the pathname of an alternative PCA-200E binary
firmware image supplied by the user. This pathname may be
absolute or relative to the drivers/atm directory.

The driver comes with an adequate firmware image, so normal users do
not have to supply an alternative one. They just say Y to "Use
default PCA-200E firmware" instead.

config ATM_FORE200E_SBA
bool "SBA-200E support"
depends on ATM_FORE200E_MAYBE && SBUS
help
Say Y here if you want your SBA-200E cards to be probed.

config ATM_FORE200E_SBA_DEFAULT_FW
bool "Use default SBA-200E firmware (normally enabled)"
depends on ATM_FORE200E_SBA
help
Use the default SBA-200E firmware data shipped with the driver.

Normal users do not have to deal with the firmware stuff, so
they should say Y here.

config ATM_FORE200E_SBA_FW
string "Pathname of user-supplied binary firmware"
depends on ATM_FORE200E_SBA && !ATM_FORE200E_SBA_DEFAULT_FW
default ""
help
This defines the pathname of an alternative SBA-200E binary
firmware image supplied by the user. This pathname may be
absolute or relative to the drivers/atm directory.

The driver comes with an adequate firmware image, so normal users do
not have to supply an alternative one. They just say Y to "Use
default SBA-200E firmware", above.

config ATM_FORE200E_USE_TASKLET
bool "Defer interrupt work to a tasklet"
depends on (PCI || SBUS) && (ATM_FORE200E_PCA || ATM_FORE200E_SBA)
depends on ATM_FORE200E
default n
help
This defers work to be done by the interrupt handler to a
Expand All @@ -408,7 +349,7 @@ config ATM_FORE200E_USE_TASKLET

config ATM_FORE200E_TX_RETRY
int "Maximum number of tx retries"
depends on (PCI || SBUS) && (ATM_FORE200E_PCA || ATM_FORE200E_SBA)
depends on ATM_FORE200E
default "16"
---help---
Specifies the number of times the driver attempts to transmit
Expand All @@ -425,7 +366,7 @@ config ATM_FORE200E_TX_RETRY

config ATM_FORE200E_DEBUG
int "Debugging level (0-3)"
depends on (PCI || SBUS) && (ATM_FORE200E_PCA || ATM_FORE200E_SBA)
depends on ATM_FORE200E
default "0"
help
Specifies the level of debugging messages issued by the driver.
Expand All @@ -436,12 +377,6 @@ config ATM_FORE200E_DEBUG
the performances of the driver, and the size of your syslog files!
Keep the debugging level to 0 during normal operations.

config ATM_FORE200E
tristate
depends on (PCI || SBUS) && (ATM_FORE200E_PCA || ATM_FORE200E_SBA)
default m if ATM_FORE200E_MAYBE!=y
default y if ATM_FORE200E_MAYBE=y

config ATM_HE
tristate "ForeRunner HE Series"
depends on PCI
Expand Down
39 changes: 0 additions & 39 deletions drivers/atm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
#

fore_200e-objs := fore200e.o
hostprogs-y := fore200e_mkfirm

# Files generated that shall be removed upon make clean
clean-files := atmsar11.bin atmsar11.bin1 atmsar11.bin2 pca200e.bin \
pca200e.bin1 pca200e.bin2 pca200e_ecd.bin pca200e_ecd.bin1 \
pca200e_ecd.bin2 sba200e_ecd.bin sba200e_ecd.bin1 sba200e_ecd.bin2
# Firmware generated that shall be removed upon make clean
clean-files += fore200e_pca_fw.c fore200e_sba_fw.c

obj-$(CONFIG_ATM_ZATM) += zatm.o uPD98402.o
obj-$(CONFIG_ATM_NICSTAR) += nicstar.o
Expand All @@ -36,38 +28,7 @@ obj-$(CONFIG_ATM_TCP) += atmtcp.o
obj-$(CONFIG_ATM_FIRESTREAM) += firestream.o
obj-$(CONFIG_ATM_LANAI) += lanai.o

ifeq ($(CONFIG_ATM_FORE200E_PCA),y)
fore_200e-objs += fore200e_pca_fw.o
# guess the target endianess to choose the right PCA-200E firmware image
ifeq ($(CONFIG_ATM_FORE200E_PCA_DEFAULT_FW),y)
byteorder.h := include$(if $(patsubst $(srctree),,$(objtree)),2)/asm/byteorder.h
CONFIG_ATM_FORE200E_PCA_FW := $(obj)/pca200e$(if $(shell $(CC) $(KBUILD_CPPFLAGS) -E -dM $(byteorder.h) | grep ' __LITTLE_ENDIAN '),.bin,_ecd.bin2)
endif
endif

ifeq ($(CONFIG_ATM_FORE200E_SBA),y)
fore_200e-objs += fore200e_sba_fw.o
ifeq ($(CONFIG_ATM_FORE200E_SBA_DEFAULT_FW),y)
CONFIG_ATM_FORE200E_SBA_FW := $(obj)/sba200e_ecd.bin2
endif
endif
obj-$(CONFIG_ATM_HE) += he.o
ifeq ($(CONFIG_ATM_HE_USE_SUNI),y)
obj-$(CONFIG_ATM_HE) += suni.o
endif

# FORE Systems 200E-series firmware magic
$(obj)/fore200e_pca_fw.c: $(patsubst "%", %, $(CONFIG_ATM_FORE200E_PCA_FW)) \
$(obj)/fore200e_mkfirm
$(obj)/fore200e_mkfirm -k -b _fore200e_pca_fw \
-i $(CONFIG_ATM_FORE200E_PCA_FW) -o $@

$(obj)/fore200e_sba_fw.c: $(patsubst "%", %, $(CONFIG_ATM_FORE200E_SBA_FW)) \
$(obj)/fore200e_mkfirm
$(obj)/fore200e_mkfirm -k -b _fore200e_sba_fw \
-i $(CONFIG_ATM_FORE200E_SBA_FW) -o $@

# deal with the various suffixes of the binary firmware images
$(obj)/%.bin $(obj)/%.bin1 $(obj)/%.bin2: $(src)/%.data
objcopy -Iihex $< -Obinary $@.gz
gzip -n -df $@.gz
Loading

0 comments on commit e92481f

Please sign in to comment.