From: DENX Support System Date: Sun, 30 Jul 2006 19:00:02 +0200 Subject: [U-Boot-Users] [DNX#2006073042000029] [PATCH 04/08]: tsi108 on chip Ether [...] Message-ID: <1154278802.106604.311504881@castor.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello list, inside the automatic U-Boot patch tracking system a new ticket [DNX#2006073042000029] was created: > > On Jul 28, 2006, at 4:53 AM, Zang Roy-r61911 wrote: > > > Tundra tsi108 on chip Ethernet controller support > > > > Signed-off-by: Alexandre Bounine > > Signed-off-by: Roy Zang > > > > --- > > board/mpc7448hpc2/tsi108_eth.c | 1042 > > ++++++++++++++++++++++++++++++++++++++++ > > 1 files changed, 1042 insertions(+), 0 deletions(-) > > It seems limiting to have drivers for a chipset under a board dir. > What happens if/when future boards using the same chipset start to > show up? > > - k > > > diff --git a/board/mpc7448hpc2/tsi108_eth.c > > b/board/mpc7448hpc2/tsi108_eth.c > > new file mode 100644 > > index 0000000..196c4b4 > > --- /dev/null > > +++ b/board/mpc7448hpc2/tsi108_eth.c > > @@ -0,0 +1,1042 @@ > > +/ > > ********************************************************************** > > * > > + * > > + * Copyright (c) 2005 Freescale Semiconductor, Inc. > > + * > > + * 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 > > + * > > + * Description: > > + * Ethernet interface for Tundra TSI108 bridge chip > > + * > > + > > ********************************************************************** > > */ > > + > > +#include > > + > > +#if (CONFIG_COMMANDS & CFG_CMD_NET) && defined(CONFIG_NET_MULTI) \ > > + && defined(CONFIG_TSI108_ETH) > > + > > +#if !defined(CONFIG_TSI108_ETH_NUM_PORTS) || > > (CONFIG_TSI108_ETH_NUM_PORTS > 2) > > +#error "CONFIG_TSI108_ETH_NUM_PORTS must be defined as 1 or 2" > > +#endif > > + > > +#include > > +#include > > +#include > > + > > +#ifdef DEBUG > > +#define TSI108_ETH_DEBUG 7 > > +#else > > +#define TSI108_ETH_DEBUG 0 > > +#endif > > + > > +#if TSI108_ETH_DEBUG > 0 > > +#define debug_lev(lev, fmt, args...) if (lev <= TSI108_ETH_DEBUG) > > printf("%s %d: " fmt, __FUNCTION__, __LINE__, ##args) > > +#else > > +#define debug_lev(lev, fmt, args...) do{}while(0) > > +#endif > > + > > +#define RX_PRINT_ERRORS > > +#define TX_PRINT_ERRORS > > + > > +#define ETH_BASE (CFG_TSI108_CSR_BASE + 0x6000) > > + > > +#define ETH_PORT_OFFSET 0x400 > > + > > +#define __REG32(base, offset) (*((volatile u32 *)((char *)(base) + > > (offset)))) > > + > > +#define reg_MAC_CONFIG_1(base) __REG32(base, > > 0x00000000) > > +#define MAC_CONFIG_1_TX_ENABLE (0x00000001) > > +#define MAC_CONFIG_1_SYNC_TX_ENABLE (0x00000002) > > +#define MAC_CONFIG_1_RX_ENABLE (0x00000004) > > +#define MAC_CONFIG_1_SYNC_RX_ENABLE (0x00000008) Your U-Boot support team