[U-Boot-Users] [DNX#2006101142000031] [PATCH 1/2] Adding support for KS8993, KS8893, KS8 [...]

DENX Support System support at denx.de
Wed Oct 11 14:30:17 CEST 2006


Hello list,

inside the automatic U-Boot patch tracking system a new ticket
[DNX#2006101142000031] was created:

<snip>
> Hi, 
> 
> this patch adds support for Micrel's switches KS8893 and KS8993 and for
> Micrel's PHYs KS8721 and KS8001. The drivers can be used with AT91RM9200
> based boards.
> 
> Using these drivers requires to apply the CONFIG_PHY_ADDR patch that was
> send to the list on 11.08.06.
> 
> Best Regards
> Mirco
> 
> Signed-off-by: Mirco Fuchs mircofuchs at web.de
> 
> CHANGELOG:
> 	- Add support for Micrel's switches (KS8893 and KS8993) und Micrel's
> PHYs (KS8721, KS8001) for AT91RM9200 based boards.
> 
> diff --git a/cpu/arm920t/at91rm9200/Makefile
> b/cpu/arm920t/at91rm9200/Makefile
> index 8d4e478..7d50c22 100644
> --- a/cpu/arm920t/at91rm9200/Makefile
> +++ b/cpu/arm920t/at91rm9200/Makefile
> @@ -25,8 +25,8 @@ include $(TOPDIR)/config.mk
>  
>  LIB	= $(obj)lib$(SOC).a
>  
> -COBJS	= bcm5221.o dm9161.o ether.o i2c.o interrupts.o \
> -	  lxt972.o serial.o usb_ohci.o
> +COBJS	= bcm5221.o dm9161.o ether.o i2c.o interrupts.o ks8893.o \
> +	  ks8993.o ks8xx1.o lxt972.o serial.o usb_ohci.o
>  SOBJS	= lowlevel_init.o
>  
>  SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
> diff --git a/cpu/arm920t/at91rm9200/ks8893.c
> b/cpu/arm920t/at91rm9200/ks8893.c
> new file mode 100644
> index 0000000..d79d064
> --- /dev/null
> +++ b/cpu/arm920t/at91rm9200/ks8893.c
> @@ -0,0 +1,272 @@
> +/*
> + * Driver for Micrel's KS8893 ethernet switch. The configuration of the
> switch
> + * uses the Serial Management Interface (SMI), modification of the
> + * MII-Management Interface.
> + * 
> + * (C) Copyright 2006
> + * Authors :
> + *	Udo Jakobza (jakobza at ftz-leipzig.de)
> + *	Mirco Fuchs (fuchs at ftz-leipzig.de)
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> + 
> +#include <at91rm9200_net.h>
> +#include <net.h>
> +#include <ks8893.h>
> +
> +#ifdef CONFIG_DRIVER_ETHER
> +
> +#if (CONFIG_COMMANDS & CFG_CMD_NET)
> +
> +/*
> + * Name:
> + *	ks8893_SmiReadPhy
> + * Description:ETHER_MD_CA_ADDR_MSK
> + *	Reads data from the PHY register
> + * Arguments:
> + *	dev - pointer to struct net_device
> + *	RegisterAddress - unsigned char
> + * 	pInput - pointer to value read from register
> + * Return value:
> + *	TRUE - if data read successfully
> + */
> +UCHAR ks8893_SmiReadPhy (AT91PS_EMAC p_mac,
> +			unsigned char regadd,
> +			unsigned short *pInput)
> +{
> +	p_mac->EMAC_MAN = (AT91C_EMAC_HIGH & ~AT91C_EMAC_LOW) |
> +		(!AT91C_EMAC_RW) |
> +		(((((regadd >> 5) & 0x7) | 0x10) << 23) & AT91C_EMAC_PHYA) |
> +		((regadd << 18) & AT91C_EMAC_REGA) |
> +		(AT91C_EMAC_CODE_802_3) | 
</snip>

Your U-Boot support team




More information about the U-Boot mailing list