Skip to contentSkip to conversation

net: add calxeda xgmac ethernet driver

PATCH Applied Rob Herring 2 participants 2 messages Nov 23, 2011 – Nov 29, 2011 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 net: add calxeda xgmac ethernet driver

From: Rob Herring <[email protected]>

Add support for the XGMAC 10Gb ethernet device in the Calxeda Highbank SOC.

---
v4:
- remove use of SZ_8K
- Implement review comments from Ben Hutchings:
- clean-up/rename of some statistics counters
- freeze h/w counters on reading to avoid rollovers and protect with spinlock. Also, fixed the size on some counters which are only 32-bit.
- Return CHECKSUM_NONE on IP receive errors
- s/mc_filter/hash_filter/
- Rework xgmac_release function to not hang if called multiple times.
- Rename xgmac_release to xgmac_stop.
- fix some ethtool return values
- add netif_napi_del calls on probe err path and remove function.

v3:
- rebase to 3.2-rc2
- add dma_unmap_page for frags
- use module_platform_driver

v2:
- use __le32 for descriptor fields and cpu_to_le32/le32_to_cpu to access
- use u32 instead of dma_addr_t for descriptor phys addresses
- improve allocation error handling for descriptor ring allocations
- convert all prints to netdev_XXX
- rebase to current Linus master
- move into drivers/net/ethernet

 .../devicetree/bindings/net/calxeda-xgmac.txt      |   16 +
 drivers/net/ethernet/Kconfig                       |    1 +
 drivers/net/ethernet/Makefile                      |    1 +
 drivers/net/ethernet/calxeda/Kconfig               |    7 +
 drivers/net/ethernet/calxeda/Makefile              |    2 +
 drivers/net/ethernet/calxeda/xgmac.c               | 1928 ++++++++++++++++++++
 6 files changed, 1955 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/calxeda-xgmac.txt
 create mode 100644 drivers/net/ethernet/calxeda/Kconfig
 create mode 100644 drivers/net/ethernet/calxeda/Makefile
 create mode 100644 drivers/net/ethernet/calxeda/xgmac.c
Documentation/devicetree/bindings/net/calxeda-xgmac.txt new file +16 -0
new file mode 100644
index 0000000..c03a7bc
@@ -0,0 +1,16 @@
+* Calxeda Highbank 10Gb XGMAC Ethernet
+
+Required properties:
+- compatible : Should be "calxeda,hb-xgmac"
+- reg : Address and length of the register set for the device
+- interrupts : Should contain 3 xgmac interrupts. The 1st is main interrupt.
+  The 2nd is pwr mgt interrupt. The 3rd is low power state interrupt.
+
+Example:
+
+ethernet@fff50000 {
+        compatible = "calxeda,hb-xgmac";
+        reg = <0xfff50000 0x1000>;
+        interrupts = <0 77 4  0 78 4  0 79 4>;
+};
+
drivers/net/ethernet/Kconfig +1 -0
index 597f4d4..3474a61 100644
@@ -28,6 +28,7 @@ source "drivers/net/ethernet/cadence/Kconfig"
 source "drivers/net/ethernet/adi/Kconfig"
 source "drivers/net/ethernet/broadcom/Kconfig"
 source "drivers/net/ethernet/brocade/Kconfig"
+source "drivers/net/ethernet/calxeda/Kconfig"
 source "drivers/net/ethernet/chelsio/Kconfig"
 source "drivers/net/ethernet/cirrus/Kconfig"
 source "drivers/net/ethernet/cisco/Kconfig"
drivers/net/ethernet/Makefile +1 -0
index be5dde0..cd6d69a 100644
@@ -14,6 +14,7 @@ obj-$(CONFIG_NET_ATMEL) += cadence/
 obj-$(CONFIG_NET_BFIN) += adi/
 obj-$(CONFIG_NET_VENDOR_BROADCOM) += broadcom/
 obj-$(CONFIG_NET_VENDOR_BROCADE) += brocade/
+obj-$(CONFIG_NET_CALXEDA_XGMAC) += calxeda/
 obj-$(CONFIG_NET_VENDOR_CHELSIO) += chelsio/
 obj-$(CONFIG_NET_VENDOR_CIRRUS) += cirrus/
 obj-$(CONFIG_NET_VENDOR_CISCO) += cisco/
drivers/net/ethernet/calxeda/Kconfig new file +7 -0
new file mode 100644
index 0000000..a52e725
@@ -0,0 +1,7 @@
+config NET_CALXEDA_XGMAC
+	tristate "Calxeda 1G/10G XGMAC Ethernet driver"
+
+	select CRC32
+	help
+	  This is the driver for the XGMAC Ethernet IP block found on Calxeda
+	  Highbank platforms.
drivers/net/ethernet/calxeda/Makefile new file +2 -0
new file mode 100644
index 0000000..5057cd2
@@ -0,0 +1,2 @@
+obj-$(CONFIG_NET_CALXEDA_XGMAC) += xgmac.o
+
drivers/net/ethernet/calxeda/xgmac.c new file +1928 -0

1,928 lines not on this page · raw message

Signature · 1 line
1.7.5.4

A message that is not in the archive (sent off-list or not yet received): 1322018299-30970-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org