Re: [PATCH -mm 3/5] Blackfin: on-chip ethernet MAC controller driver

2007-03-02 Thread Wu, Bryan
On Thu, 2007-03-01 at 10:52 -0500, Stephen Hemminger wrote:
> 
> Please do not use mixed case for function or structure member names
> (see  
> Coding Style)
> 

Here is the updated version of this driver. 
a) Change to follow kernel coding style
b) rename some functions and structures
c) change '//' to '/* */'
d) use pr_debug()

[PATCH] Blackfin: on-chip ethernet MAC controller driver

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

Signed-off-by: Bryan Wu <[EMAIL PROTECTED]>
---

 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(+)

Index: linux-2.6/drivers/net/Kconfig
===
--- linux-2.6.orig/drivers/net/Kconfig  2007-03-02 13:39:00.0 +0800
+++ linux-2.6/drivers/net/Kconfig   2007-03-02 13:39:00.0 +0800
@@ -836,6 +836,50 @@
  module, say M here and read  as well
  as .
 
+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)
Index: linux-2.6/drivers/net/Makefile
===
--- linux-2.6.orig/drivers/net/Makefile 2007-03-02 13:38:59.0 +0800
+++ linux-2.6/drivers/net/Makefile  2007-03-02 13:39:00.0 +0800
@@ -195,6 +195,7 @@
 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
Index: linux-2.6/drivers/net/bfin_mac.c
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ linux-2.6/drivers/net/bfin_mac.c2007-03-02 13:52:39.0 +0800
@@ -0,0 +1,981 @@
+/*
+ * File: drivers/net/bfin_mac.c
+ * Based on:
+ * Author:   Luke Yang <[EMAIL PROTECTED]>
+ *
+ * Created:
+ * Description:
+ *
+ * Modified:
+ *   Copyright 2004-2006 Analog Devices Inc.
+ *
+ * Bugs: Enter bugs at http://blackfin.uclinux.org/
+ *
+ * This program is free software ;  you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation ;  either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY ;  without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program ;  see the file COPYING.
+ * If not, write to the Free Software Foundation,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include "bfin_mac.h"
+
+#define CARDNAME "bfin_mac"
+
+MODULE_L

Re: [PATCH -mm 3/5] Blackfin: on-chip ethernet MAC controller driver

2007-03-01 Thread Robin Getz
On Thu 1 Mar 2007 10:52, Stephen Hemminger pondered:
> Wu, Bryan wrote:
> > Hi folks,
> >
> > Here is the blackfin on-chip ethernet MAC controller driver for Linux.
> >
> > Index: linux-2.6/drivers/net/Kconfig
> > ===
> > --- linux-2.6.orig/drivers/net/Kconfig  2007-03-01 11:39:14.0
> > +0800 +++ linux-2.6/drivers/net/Kconfig 2007-03-01 11:39:19.0
> > +0800 @@ -836,6 +836,50 @@
> >   module, say M here and read  as well
> >   as .
> >
> > +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
>
> The regular practice is to put these in a device include file, and not
> make them kernel configurable.
> Why would you want to make it tuneable at compile time?

It is to attempt to make it easier for our end users to configure&use.

Most people who use it, want to make some tweaks to the configuration based on 
their embedded platform. Rather than forcing everyone to make changes to a .c 
or .h file, we let them manage it in the .config (which is platforms specific 
anyway).

-Robin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH -mm 3/5] Blackfin: on-chip ethernet MAC controller driver

2007-03-01 Thread Mike Frysinger

On 3/1/07, Stephen Hemminger <[EMAIL PROTECTED]> wrote:

Wu, Bryan wrote:
> +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
>
The regular practice is to put these in a device include file, and not
make them kernel configurable.


we're working on moving some of this stuff into the board files rather
than Kconfig


Why would you want to make it tuneable at compile time?


because it was easier to implement and deploy the first time around ;)
-mike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH -mm 3/5] Blackfin: on-chip ethernet MAC controller driver

2007-03-01 Thread Stephen Hemminger

Wu, Bryan wrote:

Hi folks,

Here is the blackfin on-chip ethernet MAC controller driver for Linux.

It's name is blackfin-driver-net-stamp537.patch

[PATCH] Blackfin: on-chip ethernet MAC controller driver

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

Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> 
---


 drivers/net/Kconfig|   44 ++
 drivers/net/Makefile   |1
 drivers/net/bfin_mac.c |  988 
+
 drivers/net/bfin_mac.h |  146 +
 4 files changed, 1179 insertions(+)

Index: linux-2.6/drivers/net/Kconfig
===
--- linux-2.6.orig/drivers/net/Kconfig  2007-03-01 11:39:14.0 +0800
+++ linux-2.6/drivers/net/Kconfig   2007-03-01 11:39:19.0 +0800
@@ -836,6 +836,50 @@
  module, say M here and read  as well
  as .
 
+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
  
The regular practice is to put these in a device include file, and not 
make them kernel configurable.

Why would you want to make it tuneable at compile time?

+
+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)
Index: linux-2.6/drivers/net/Makefile
===
--- linux-2.6.orig/drivers/net/Makefile 2007-03-01 11:33:24.0 +0800
+++ linux-2.6/drivers/net/Makefile  2007-03-01 11:39:19.0 +0800
@@ -195,6 +195,7 @@
 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
Index: linux-2.6/drivers/net/bfin_mac.c
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ linux-2.6/drivers/net/bfin_mac.c2007-03-01 11:39:19.0 +0800
@@ -0,0 +1,988 @@
+/*
+ * File: drivers/net/bfin_mac.c
+ * Based on:
+ * Author:   Luke Yang <[EMAIL PROTECTED]>
+ *
+ * Created:
+ * Description:
+ *
+ * Rev:  $Id: bfin_mac.c,v 1.60 2006/12/16 11:23:56 hennerich Exp $
+ *
+ * Modified:
+ *   Copyright 2004-2006 Analog Devices Inc.
+ *
+ * Bugs: Enter bugs at http://blackfin.uclinux.org/
+ *
+ * This program is free software ;  you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation ;  either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY ;  without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program ;  see the file COPYING.
+ * If not, write to the Free Software Foundation,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#i

Re: [PATCH -mm 3/5] Blackfin: on-chip ethernet MAC controller driver

2007-03-01 Thread Andrew Morton
On Thu, 01 Mar 2007 12:15:14 +0800 "Wu, Bryan" <[EMAIL PROTECTED]> wrote:

> Hi folks,
> 
> Here is the blackfin on-chip ethernet MAC controller driver for Linux.
> 
> It's name is blackfin-driver-net-stamp537.patch
> 
> [PATCH] Blackfin: on-chip ethernet MAC controller driver
> 
> This patch implements the driver necessary use the Analog Devices
> Blackfin processor's on-chip ethernet MAC controller.
> 
> ...
>
> +
> +extern void get_bf537_ether_addr(char *addr);

Please don't put extern declarations in .c code.  Put them in a header file
which is included by the file which provides the definition and by all
files which refer to the symbol.

Please review the entire blackfin patchset for more occurrences of this
mistake.

> +static int bf537mac_hard_start_xmit(struct sk_buff *skb, struct net_device 
> *dev)
> +{
> + struct bf537mac_local *lp = netdev_priv(dev);
> + unsigned int data;
> +
> + current_tx_ptr->skb = skb;
> + // Is skb->data always 16-bit aligned? Do we need to memcpy((char 
> *)(tail->packet + 2),skb->data,len)?
> + if unsigned int)(skb->data)) & 0x02) == 2) {
> + //move skb->data to current_tx_ptr payload
> + data = (unsigned int)(skb->data) - 2;
> + *((unsigned short *)data) = (unsigned short)(skb->len);
> + current_tx_ptr->desc_a.start_addr = (unsigned long)data;
> + blackfin_dcache_flush_range(data, (data + (skb->len)) + 2); 
> //this is important!
> +
> + } else {
> + *((unsigned short *)(current_tx_ptr->packet)) =
> + (unsigned short)(skb->len);
> + memcpy((char *)(current_tx_ptr->packet + 2), skb->data,
> +(skb->len));
> + current_tx_ptr->desc_a.start_addr =
> + (unsigned long)current_tx_ptr->packet;
> + if (current_tx_ptr->status.status_word != 0)
> + current_tx_ptr->status.status_word = 0;
> + blackfin_dcache_flush_range((unsigned int)current_tx_ptr->
> + packet,
> + (unsigned int)(current_tx_ptr->
> +packet + skb->len) +
> + 2);
> + }

hm, I'd have thought that networking provided a way of avoiding that
memcpy, but it has been too long..


> + current_tx_ptr->desc_a.config.b_DMA_EN = 1; //enable this packet's 
> dma
> +
> + if (bfin_read_DMA2_IRQ_STATUS() & 0x08) {   //tx dma is running, 
> just return
> + goto out;
> + } else {//tx dma is not running
> + bfin_write_DMA2_NEXT_DESC_PTR(&(current_tx_ptr->desc_a));
> + bfin_write_DMA2_CONFIG(*((unsigned short 
> *)(&(current_tx_ptr->desc_a.config;// dma enabled, read from 
> memory, size is 6
> + // Turn on the EMAC tx
> + bfin_write_EMAC_OPMODE(bfin_read_EMAC_OPMODE() | TE);
> + }
> +
> +  out:
> + adjust_tx_list();
> + current_tx_ptr = current_tx_ptr->next;
> + dev->trans_start = jiffies;
> + lp->stats.tx_packets++;
> + lp->stats.tx_bytes += (skb->len);
> + return 0;
> +}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH -mm 3/5] Blackfin: on-chip ethernet MAC controller driver

2007-02-28 Thread Wu, Bryan
Hi folks,

Here is the blackfin on-chip ethernet MAC controller driver for Linux.

It's name is blackfin-driver-net-stamp537.patch

[PATCH] Blackfin: on-chip ethernet MAC controller driver

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

Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> 
---

 drivers/net/Kconfig|   44 ++
 drivers/net/Makefile   |1
 drivers/net/bfin_mac.c |  988 
+
 drivers/net/bfin_mac.h |  146 +
 4 files changed, 1179 insertions(+)

Index: linux-2.6/drivers/net/Kconfig
===
--- linux-2.6.orig/drivers/net/Kconfig  2007-03-01 11:39:14.0 +0800
+++ linux-2.6/drivers/net/Kconfig   2007-03-01 11:39:19.0 +0800
@@ -836,6 +836,50 @@
  module, say M here and read  as well
  as .
 
+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)
Index: linux-2.6/drivers/net/Makefile
===
--- linux-2.6.orig/drivers/net/Makefile 2007-03-01 11:33:24.0 +0800
+++ linux-2.6/drivers/net/Makefile  2007-03-01 11:39:19.0 +0800
@@ -195,6 +195,7 @@
 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
Index: linux-2.6/drivers/net/bfin_mac.c
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ linux-2.6/drivers/net/bfin_mac.c2007-03-01 11:39:19.0 +0800
@@ -0,0 +1,988 @@
+/*
+ * File: drivers/net/bfin_mac.c
+ * Based on:
+ * Author:   Luke Yang <[EMAIL PROTECTED]>
+ *
+ * Created:
+ * Description:
+ *
+ * Rev:  $Id: bfin_mac.c,v 1.60 2006/12/16 11:23:56 hennerich Exp $
+ *
+ * Modified:
+ *   Copyright 2004-2006 Analog Devices Inc.
+ *
+ * Bugs: Enter bugs at http://blackfin.uclinux.org/
+ *
+ * This program is free software ;  you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation ;  either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY ;  without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program ;  see the file COPYING.
+ * If not, write to the Free Software Foundation,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include "bfin_mac.h"
+
+#define CARDNAME "bfin_mac"
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Luke Yang");
+MODULE_DESCRIPTION("Blackfin MAC Driver");
+
+#if defined(CONFIG_BFIN_MAC_USE