Skip to contentSkip to conversation

: tsi108 on chip Ether [...]

PATCH New DENX Support System 1 participant 1 message Jul 30, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 4/8 : tsi108 on chip Ether [...]

Hello list,

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

<snip>

Quoted 92 lines · On Jul 28, 2006, at 4:53 AM, Zang Roy-r61911 wrote:
Quoted 10 lines

Tundra tsi108 on chip Ethernet controller support

---
 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

Quoted 73 lines
board/mpc7448hpc2/tsi108_eth.c new file +1 -0
new file mode 100644
index 0000000..196c4b4
@@ -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) +
Quoted 8 lines

board/mpc7448hpc2/tsi108_eth.c

Quoted 8 lines

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

</snip>

Your U-Boot support team