: tsi108 on chip Ethernet support
PATCH 4/8 : tsi108 on chip Ethernet support
Hello list,
inside the automatic U-Boot patch tracking system a new ticket [DNX#2006072842000033] was created:
<snip>
Quoted 90 lines
Tundra tsi108 on chip Ethernet controller support
Signed-off-by Alexandre Bounine <[email protected]>Signed-off-by Roy Zang <[email protected]>--- board/mpc7448hpc2/tsi108_eth.c | 1042 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 1042 insertions(+), 0 deletions(-)board/mpc7448hpc2/tsi108_eth.c new file +1
-0@@ -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
+ *
+ ***********************************************************************/board/mpc7448hpc2/tsi108_eth.c new file +7
-0+ +#include <common.h> + +#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)board/mpc7448hpc2/tsi108_eth.c new file +15
-0+#error "CONFIG_TSI108_ETH_NUM_PORTS must be defined as 1 or 2" +#endif + +#include <malloc.h> +#include <net.h> +#include <asm/cache.h> + +#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)board/mpc7448hpc2/tsi108_eth.c new file +12
-0+#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))))
board/mpc7448hpc2/tsi108_eth.c new file +2
-0+ +#define reg_MAC_CONFIG_1 (base) __REG32(base,
0x00000000)board/mpc7448hpc2/tsi108_eth.c new file +5
-0+#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) +#define MAC_CONFIG_1_TX_FLOW_CONTROL (0x00000010)
board/mpc7448hpc2/tsi108_eth.c
Quoted 10 lines
board/mpc7448hpc2/tsi108_eth.c new file +10
-0+#define MAC_CONFIG_1_RX_FLOW_CONTROL (0x00000020) +#define MAC_CONFIG_1_LOOP_BACK (0x00000100) +#define MAC_CONFIG_1_RESET_TX_FUNCTION (0x00010000) +#define MAC_CONFIG_1_RESET_RX_FUNCTION (0x00020000) +#define MAC_CONFIG_1_RESET_TX_MAC (0x00040000) +#define MAC_CONFIG_1_RESET_RX_MAC (0x00080000) +#define MAC_CONFIG_1_SIM_RESET (0x40000000) +#define MAC_CONFIG_1_SOFT_RESET (0x80000000) + +#define reg_MAC_CONFIG_2 (base) __REG32(base,
</snip>
Your U-Boot support team