Skip to contentSkip to conversation

Blackfin ethernet driver: on chip ethernet MAC controller driver

PATCH In review Bryan Wu 2 participants 2 messages May 23, 2007 – Jun 13, 2007

Subsystems (2)
lore
Share & tools
lore

Bryan Wu

author
#0 lore raw

PATCH 1/1 Blackfin ethernet driver: on chip ethernet MAC controller driver

From: "Wu, Bryan" <[email protected]>

This patch implements the driver necessary use the Analog Devices Blackfin processor's on-chip ethernet MAC controller.

---

 drivers/net/Kconfig    |   44 +
 drivers/net/Makefile   |    1 
 drivers/net/bfin_mac.c |  981 +++++++++++++++++++++++++++++++++++++++
 drivers/net/bfin_mac.h |  147 +++++
 4 files changed, 1173 insertions(+)
drivers/net/Kconfig renamed from drivers/net/Kconfig~blackfin-on-chip-ethernet-mac-controller-driver +44 -0
diff -puN drivers/net/Kconfig~blackfin-on-chip-ethernet-mac-controller-driver drivers/net/Kconfig
@@ -836,6 +836,50 @@ config SMC91X
 	  module, say M here and read <file:Documentation/kbuild/modules.txt>
 	  as well as <file:Documentation/networking/net-modules.txt>.
 
+config BFIN_MAC
+	tristate "Blackfin 536/537 on-chip mac support"
+	depends on NET_ETHERNET && (BF537 || BF536) && (!BF537_PORT_H)
+	select CRC32
+	select BFIN_MAC_USE_L1 if DMA_UNCACHED_NONE
+	help
+	  This is the driver for blackfin on-chip mac device. Say Y if you want it
+	  compiled into the kernel. This driver is also available as a module
+	  ( = code which can be inserted in and removed from the running kernel
+	  whenever you want). The module will be called bfin_mac.
+
+config BFIN_MAC_USE_L1
+	bool "Use L1 memory for rx/tx packets"
+	depends on BFIN_MAC && BF537
+	default y
+	help
+	  To get maximum network performace, you should use L1 memory as rx/tx buffers.
+	  Say N here if you want to reserve L1 memory for other uses.
+
+config BFIN_TX_DESC_NUM
+	int "Number of transmit buffer packets"
+	depends on BFIN_MAC
+	range 6 10 if BFIN_MAC_USE_L1
+	range 10 100
+	default "10"
+	help
+	  Set the number of buffer packets used in driver.
+
+config BFIN_RX_DESC_NUM
+	int "Number of receive buffer packets"
+	depends on BFIN_MAC
+	range 20 100 if BFIN_MAC_USE_L1
+	range 20 800
+	default "20"
+	help
+	  Set the number of buffer packets used in driver.
+
+config BFIN_MAC_RMII
+	bool "RMII PHY Interface (EXPERIMENTAL)"
+	depends on BFIN_MAC && EXPERIMENTAL
+	default n
+	help
+	  Use Reduced PHY MII Interface
+
 config SMC9194
 	tristate "SMC 9194 support"
 	depends on NET_VENDOR_SMC && (ISA || MAC && BROKEN)
drivers/net/Makefile renamed from drivers/net/Makefile~blackfin-on-chip-ethernet-mac-controller-driver +1 -0
diff -puN drivers/net/Makefile~blackfin-on-chip-ethernet-mac-controller-driver drivers/net/Makefile
@@ -194,6 +194,7 @@ obj-$(CONFIG_S2IO) += s2io.o
 obj-$(CONFIG_MYRI10GE) += myri10ge/
 obj-$(CONFIG_SMC91X) += smc91x.o
 obj-$(CONFIG_SMC911X) += smc911x.o
+obj-$(CONFIG_BFIN_MAC) += bfin_mac.o
 obj-$(CONFIG_DM9000) += dm9000.o
 obj-$(CONFIG_FEC_8XX) += fec_8xx/
 obj-$(CONFIG_PASEMI_MAC) += pasemi_mac.o
drivers/net/bfin_mac.c new file +981 -0

981 lines not on this page · raw message

drivers/net/bfin_mac.h new file +147 -0

147 lines not on this page · raw message

_

#1 lore raw
Quoted 8 lines · Bryan Wu

From: "Wu, Bryan" <[email protected]>

This patch implements the driver necessary use the Analog Devices Blackfin processor's on-chip ethernet MAC controller.

Quoted 7 lines

---

 drivers/net/Kconfig    |   44 +
 drivers/net/Makefile   |    1 
 drivers/net/bfin_mac.c |  981 +++++++++++++++++++++++++++++++++++++++
 drivers/net/bfin_mac.h |  147 +++++
 4 files changed, 1173 insertions(+)

Finally got back to this. Please run this patch through scripts/checkpatch.pl (found in latest linux-2.6.git upstream kernel tree), and follow most of the recommendations.

Personally I would ignore the lines slightly over 80 columns, but the other warnings look like real issues.

Jeff