Staging: Netlogic XLR/XLS GMAC driver
PATCH 2/2 MIPS: Netlogic: Platform changes for XLR/XLS gmac
In reply to [email protected]From: Ganesan Ramalingam <[email protected]>
Add platform code to create network interface (xlr-net) for XLR/XLS boards.
---
This patch has be merged via linux-mips tree.
This patch depends on [PATCH 1/2] Staging: Netlogic XLR/XLS GMAC driver.
arch/mips/include/asm/netlogic/xlr/platform_net.h | 46 +++++ arch/mips/netlogic/xlr/Makefile | 3 +- arch/mips/netlogic/xlr/fmn.c | 2 + arch/mips/netlogic/xlr/platform_net.c | 222 +++++++++++++++++++++ 4 files changed, 272 insertions(+), 1 deletions(-) create mode 100644 arch/mips/include/asm/netlogic/xlr/platform_net.h create mode 100644 arch/mips/netlogic/xlr/platform_net.c
arch/mips/include/asm/netlogic/xlr/platform_net.h new file +46 -0
@@ -0,0 +1,46 @@ +/* +* Copyright (c) 2003-2012 Broadcom Corporation +* All Rights Reserved +* +* This software is available to you under a choice of one of two +* licenses. You may choose to be licensed under the terms of the GNU +* General Public License (GPL) Version 2, available from the file +* COPYING in the main directory of this source tree, or the Broadcom +* license below: +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* 2. Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* +* THIS SOFTWARE IS PROVIDED BY BROADCOM ``AS IS'' AND ANY EXPRESS OR +* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM OR CONTRIBUTORS BE LIABLE +* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +struct xlr_net_data { +int cpu_mask; +u32 __iomem *mii_addr; +u32 __iomem *serdes_addr; +u32 __iomem *pcs_addr; +u32 __iomem *gpio_addr; +int phy_interface; +int rfr_station; +int tx_stnid; +int *bucket_size; +int phy_addr; +struct xlr_fmn_info *gmac_fmn_info; +};
arch/mips/netlogic/xlr/Makefile +2 -1
@@ -1,2 +1,3 @@ -obj-y += fmn.o fmn-config.o setup.o platform.o platform-flash.o +obj-y += fmn.o fmn-config.o setup.o platform.o \ + platform-flash.o platform_net.o obj-$(CONFIG_SMP) += wakeup.o
arch/mips/netlogic/xlr/fmn.c +2 -0
@@ -33,6 +33,7 @@*/ #include <linux/kernel.h> +#include <linux/export.h> #include <linux/irqreturn.h> #include <linux/irq.h> #include <linux/interrupt.h>
@@ -190,6 +191,7 @@ int nlm_register_fmn_handler(int start_stnid, int end_stnid, start_stnid, end_stnid);return 0 ; } +EXPORT_SYMBOL (nlm_register_fmn_handler);void nlm_setup_fmn_irq (void ) {
arch/mips/netlogic/xlr/platform_net.c new file +222 -0
222 lines not on this page · raw message
Signature · 1 line
1.7.6
PATCH 1/2 Staging: Netlogic XLR/XLS GMAC driver
From: Ganesan Ramalingam <[email protected]>
Add support for the Network Accelerator Engine on Netlogic XLR/XLS MIPS SoCs. The XLR/XLS NAE blocks can be configured as one 10G interface or four 1G interfaces. This driver supports blocks with 1G ports.
---
This patch has to be merged via staging tree.
The second patch adding platform support for this driver, which would be merged via mips tree.
MIPS: Netlogic: Platform changes for XLR/XLS gmac
drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/netlogic/Kconfig | 7 + drivers/staging/netlogic/Makefile | 1 + drivers/staging/netlogic/xlr_net.c | 1109 ++++++++++++++++++++++++++++++++++++ drivers/staging/netlogic/xlr_net.h | 1099 +++++++++++++++++++++++++++++++++++ 6 files changed, 2219 insertions(+), 0 deletions(-) create mode 100644 drivers/staging/netlogic/Kconfig create mode 100644 drivers/staging/netlogic/Makefile create mode 100644 drivers/staging/netlogic/xlr_net.c create mode 100644 drivers/staging/netlogic/xlr_net.h
drivers/staging/Kconfig +2 -0
@@ -140,4 +140,6 @@ source "drivers/staging/zcache/Kconfig" source "drivers/staging/goldfish/Kconfig" +source "drivers/staging/netlogic/Kconfig" + endif # STAGING
drivers/staging/Makefile +1 -0
@@ -23,6 +23,7 @@ obj-$(CONFIG_RTS5139) += rts5139/ obj-$(CONFIG_TRANZPORT) += frontier/ obj-$(CONFIG_IDE_PHISON) += phison/ obj-$(CONFIG_LINE6_USB) += line6/ +obj-$(CONFIG_NETLOGIC_XLR_NET) += netlogic/ obj-$(CONFIG_USB_SERIAL_QUATECH2) += serqt_usb2/ obj-$(CONFIG_OCTEON_ETHERNET) += octeon/ obj-$(CONFIG_VT6655) += vt6655/
drivers/staging/netlogic/Kconfig new file +7 -0
@@ -0,0 +1,7 @@ +config NETLOGIC_XLR_NET + tristate "Netlogic XLR/XLS network device" + depends on CPU_XLR + select PHYLIB + ---help--- + This driver support Netlogic XLR/XLS on chip gigabit + Ethernet.
drivers/staging/netlogic/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_NETLOGIC_XLR_NET) += xlr_net.o
drivers/staging/netlogic/xlr_net.c new file +1109 -0
1,109 lines not on this page · raw message
drivers/staging/netlogic/xlr_net.h new file +1099 -0
1,099 lines not on this page · raw message
Signature · 1 line
1.7.6
Greg Kroah-Hartman
maintainerQuoted 10 lines · On Sun, Mar 03, 2013 at 12:06:13AM +0530, [email protected] wrote:
From: Ganesan Ramalingam <[email protected]>
Add support for the Network Accelerator Engine on Netlogic XLR/XLS MIPS SoCs. The XLR/XLS NAE blocks can be configured as one 10G interface or four 1G interfaces. This driver supports blocks with 1G ports.
Signed-off-by Ganesan Ramalingam <[email protected]>---
This patch has to be merged via staging tree.
Why is this a staging driver?
I need a TODO file listing the remaining things left to fix up in this driver to get it merged to the "correct" location in the kernel, along with some email addresses and names of who to send the patches to for review, before I can accept this.
thanks,
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 2/2] MIPS: Netlogic: Platform changes for XLR/XLS gmac
In reply to [email protected]Quoted 11 lines · On Sun, Mar 03, 2013 at 12:06:14AM +0530, [email protected] wrote:
From: Ganesan Ramalingam <[email protected]>
Add platform code to create network interface (xlr-net) for XLR/XLS boards.
Signed-off-by Ganesan Ramalingam <[email protected]>---
This patch has be merged via linux-mips tree.This patch depends on [PATCH 1/2] Staging: Netlogic XLR/XLS GMAC driver.
Quoted 7 lines
arch/mips/include/asm/netlogic/xlr/platform_net.h | 46 +++++ arch/mips/netlogic/xlr/Makefile | 3 +- arch/mips/netlogic/xlr/fmn.c | 2 + arch/mips/netlogic/xlr/platform_net.c | 222 +++++++++++++++++++++ 4 files changed, 272 insertions(+), 1 deletions(-) create mode 100644 arch/mips/include/asm/netlogic/xlr/platform_net.h create mode 100644 arch/mips/netlogic/xlr/platform_net.c
Staging drivers should be stand-alone, not depending on changes elsewhere in the tree. Why not either merge these into the staging driver, or move the driver to the correct place to start with?
thanks,
greg k-h
Quoted 14 lines · Greg Kroah-Hartman
Quoted 10 lines · On Sun, Mar 03, 2013 at 12:06:13AM +0530, [email protected] wrote:
From: Ganesan Ramalingam <[email protected]>
Add support for the Network Accelerator Engine on Netlogic XLR/XLS MIPS SoCs. The XLR/XLS NAE blocks can be configured as one 10G interface or four 1G interfaces. This driver supports blocks with 1G ports.
Signed-off-by Ganesan Ramalingam <[email protected]>---
This patch has to be merged via staging tree.Why is this a staging driver?
Quoted 9 lines
I need a TODO file listing the remaining things left to fix up in this driver to get it merged to the "correct" location in the kernel, along with some email addresses and names of who to send the patches to for review, before I can accept this.
thanks,
greg k-h
This driver has been submitted to netdev tree and reviewed, there are comments and those are listed in TODO list. I will address those TODO list in next cycle, till that time I want this driver to be in staging tree.
Will add TODO list and merge the "[PATCH 2/2] MIPS: Netlogic: Platform changes for XLR/XLS gmac" patch with driver patch and submit as a stand-alone driver.
Thanks
Ganesan