Subject: Re: [Patch] Micrel KS8695 integrated ethernet driver

From: Ben Hutchings <[email-masked]>
Date: Tue, 09 Dec 2008 18:10:20 +0000

On Tue, 2008-12-09 at 17:30 +0000, Daniel Silverstone wrote:
[...]
> KS8695: Add support for the KS8695 ethernet devices.
> 
> Implements the KS8695 ethernet device (ks8695net).
> 
> This driver is only of use on the KS8695 which is an ARM9 based SoC. The
> documentation on this SoC is sparse and poor, with barely a register
> description and a rough outline of how the ethernet works, this driver was
> therefore written with strong reference to the Micrel supplied Linux 2.6.9
> port, and to Andrew Victor's ks8695eth driver.
> 
> Signed-off-by: Daniel Silverstone <[email-masked]>
> Signed-off-by: Vincent Sanders <[email-masked]>
> Acked-by: Ben Dooks <[email-masked]>
Reviewed-by: Ben Hutchings <[email-masked]>

>  Kconfig     |    8 
>  Makefile    |    1 
>  ks8695net.c | 1674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  ks8695net.h |  107 +++
>  4 files changed, 1790 insertions(+)
> 
> Index: net-next-2.6/drivers/net/arm/Kconfig
> ===================================================================
> --- net-next-2.6.orig/drivers/net/arm/Kconfig   2008-12-08 12:55:46.817658739 +0000
> +++ net-next-2.6/drivers/net/arm/Kconfig        2008-12-08 12:56:10.213660241 +0000
> @@ -40,6 +40,14 @@
>           If you wish to compile a kernel for the AT91RM9200 and enable
>           ethernet support, then you should always answer Y to this.
>  
> +config ARM_KS8695_ETHER
> +       tristate "KS8695 Ethernet support"
> +       depends on ARM && ARCH_KS8695
> +       select MII
> +       help
> +         If you wish to compile a kernel for the KS8695 and want to
> +         use the internal ethernet then you should answer Y to this.
> +
>  config EP93XX_ETH
>         tristate "EP93xx Ethernet support"
>         depends on ARM && ARCH_EP93XX
> Index: net-next-2.6/drivers/net/arm/Makefile
> ===================================================================
> --- net-next-2.6.orig/drivers/net/arm/Makefile  2008-12-08 12:55:46.841662533 +0000
> +++ net-next-2.6/drivers/net/arm/Makefile       2008-12-08 12:56:10.213660241 +0000
> @@ -8,5 +8,6 @@
>  obj-$(CONFIG_ARM_ETHER3)       += ether3.o
>  obj-$(CONFIG_ARM_ETHER1)       += ether1.o
>  obj-$(CONFIG_ARM_AT91_ETHER)   += at91_ether.o
> +obj-$(CONFIG_ARM_KS8695_ETHER) += ks8695net.o
>  obj-$(CONFIG_EP93XX_ETH)       += ep93xx_eth.o
>  obj-$(CONFIG_IXP4XX_ETH)       += ixp4xx_eth.o
> Index: net-next-2.6/drivers/net/arm/ks8695net.c
> ===================================================================
> --- /dev/null   1970-01-01 00:00:00.000000000 +0000
> +++ net-next-2.6/drivers/net/arm/ks8695net.c    2008-12-09 17:26:28.469658828 +0000
> @@ -0,0 +1,1674 @@
> +/*
> + * Micrel KS8695 (Centaur) Ethernet.
> + *
> + * 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 of the
> + * License, 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.
> + *
> + * Copyright 2008 Simtec Electronics
> + *               Daniel Silverstone <[email-masked]>
> + *               Vincent Sanders <[email-masked]>
> + */
> +
> +#include <linux/module.h>
> +#include <linux/ioport.h>
> +#include <linux/netdevice.h>
> +#include <linux/etherdevice.h>
> +#include <linux/init.h>
> +#include <linux/skbuff.h>
> +#include <linux/spinlock.h>
> +#include <linux/crc32.h>
> +#include <linux/mii.h>
> +#include <linux/ethtool.h>
> +#include <linux/delay.h>
> +#include <linux/platform_device.h>
> +#include <linux/irq.h>
> +#include <linux/delay.h>
> +#include <linux/io.h>
> +
> +#include <asm/irq.h>
> +
> +#include <mach/regs-switch.h>
> +#include <mach/regs-misc.h>
> +
> +#include "ks8695net.h"
> +
> +#define MODULENAME     "ks8695_ether"
> +#define MODULEVERSION  "1.01"
[...]

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.