summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG9
-rw-r--r--README2
-rw-r--r--board/mpc8260ads/config.mk8
-rw-r--r--board/mpc8260ads/mpc8260ads.c41
-rw-r--r--board/mpc8260ads/u-boot.lds8
-rw-r--r--drivers/Makefile1
-rw-r--r--drivers/rtl8019.c282
-rw-r--r--drivers/rtl8019.h135
-rw-r--r--include/configs/MPC8260ADS.h23
-rw-r--r--lib_arm/board.c4
10 files changed, 476 insertions, 37 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 5848e115af9..9969b549461 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,15 @@
Changes since U-Boot 1.0.0:
======================================================================
+* Patch by Xue Ligong (Joe), 13 Nov 2003:
+ add Realtek 8019 ethernet driver
+
+* Patch by Yuli Barcohen, 13 Nov 2003:
+ MPC826xADS/PQ2FADS cleanup
+
+* Patch by Anders Larsen, 12 Nov 2003:
+ Update README to mark the PORTIO commands non-standard
+
* Patch by Nicolas Lacressonnière, 12 Nov 2003:
update for for Atmel AT91RM9200DK development kit:
- support for environment variables in DataFlash
diff --git a/README b/README
index 681038ec4bc..53ef19ef4d5 100644
--- a/README
+++ b/README
@@ -634,7 +634,7 @@ The following options need to be configured:
CFG_CMD_PCI * pciinfo
CFG_CMD_PCMCIA * PCMCIA support
CFG_CMD_PING * send ICMP ECHO_REQUEST to network host
- CFG_CMD_PORTIO Port I/O
+ CFG_CMD_PORTIO * Port I/O
CFG_CMD_REGINFO * Register dump
CFG_CMD_RUN run command in env variable
CFG_CMD_SAVES save S record dump
diff --git a/board/mpc8260ads/config.mk b/board/mpc8260ads/config.mk
index 9d555982646..3dca6da9394 100644
--- a/board/mpc8260ads/config.mk
+++ b/board/mpc8260ads/config.mk
@@ -1,9 +1,11 @@
#
-# (C) Copyright 2001
+# (C) Copyright 2001-2003
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# Modified by, Stuart Hughes, Lineo Inc, stuarth@lineo.com
#
+# Modified by, Yuli Barcohen, Arabella Software Ltd., yuli@arabellasw.com
+#
# See file CREDITS for list of people who contributed to this
# project.
#
@@ -24,9 +26,7 @@
#
#
-# mpc8260ads board
+# MPC8260ADS, MPC8266ADS, and PQ2FADS-ZU/VR boards
#
TEXT_BASE = 0xfff00000
-
-PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -I$(TOPDIR)/board
diff --git a/board/mpc8260ads/mpc8260ads.c b/board/mpc8260ads/mpc8260ads.c
index 14a93be0983..3de0387321b 100644
--- a/board/mpc8260ads/mpc8260ads.c
+++ b/board/mpc8260ads/mpc8260ads.c
@@ -231,6 +231,20 @@ int board_pre_init (void)
bcsr[1] = ~FETHIEN1 & ~RS232EN_1;
+#if CONFIG_ADSTYPE != CFG_8260ADS /* PCI mode can be selected */
+#if CONFIG_ADSTYPE == CFG_PQ2FADS
+ if ((bcsr[3] & BCSR_PCI_MODE) == 0) /* PCI mode selected by JP9 */
+#endif /* CONFIG_ADSTYPE == CFG_PQ2FADS */
+ {
+ volatile immap_t *immap = (immap_t *) CFG_IMMR;
+
+ immap->im_clkrst.car_sccr |= M826X_SCCR_PCI_MODE_EN;
+ immap->im_siu_conf.sc_siumcr =
+ (immap->im_siu_conf.sc_siumcr & ~SIUMCR_LBPC11)
+ | SIUMCR_LBPC01;
+ }
+#endif /* CONFIG_ADSTYPE != CFG_8260ADS */
+
return 0;
}
@@ -239,32 +253,25 @@ int board_pre_init (void)
long int initdram (int board_type)
{
#if CONFIG_ADSTYPE == CFG_PQ2FADS
- vu_long *bcsr = (vu_long *)CFG_BCSR;
+ long int msize = 32;
+#else
+ long int msize = 16;
#endif
+
+#ifndef CFG_RAMBOOT
volatile immap_t *immap = (immap_t *) CFG_IMMR;
volatile memctl8260_t *memctl = &immap->im_memctl;
volatile uchar *ramaddr, c = 0xff;
- long int msize;
uint or;
uint psdmr;
uint psrt;
int i;
-#ifndef CFG_RAMBOOT
immap->im_siu_conf.sc_ppc_acr = 0x00000002;
immap->im_siu_conf.sc_ppc_alrh = 0x01267893;
immap->im_siu_conf.sc_tescr1 = 0x00004000;
-#if CONFIG_ADSTYPE == CFG_PQ2FADS
- if ((bcsr[3] & BCSR_PCI_MODE) == 0) { /* PCI mode selected by JP9 */
- immap->im_clkrst.car_sccr |= M826X_SCCR_PCI_MODE_EN;
- immap->im_siu_conf.sc_siumcr =
- (immap->im_siu_conf.sc_siumcr & ~SIUMCR_LBPC11)
- | SIUMCR_LBPC01;
- }
-#endif /* CONFIG_ADSTYPE == CFG_PQ2FADS */
-
memctl->memc_mptpr = CFG_MPTPR;
#ifdef CFG_LSDRAM_BASE
/*
@@ -431,13 +438,7 @@ long int initdram (int board_type)
#endif /* SPD_DEBUG */
}
#else /* !CONFIG_SPD_EEPROM */
-#if CONFIG_ADSTYPE == CFG_PQ2FADS
- msize = 32;
- or = 0xFE002EC0;
-#else
- msize = 16;
- or = 0xFF000CA0;
-#endif /* CONFIG_ADSTYPE == CFG_PQ2FADS */
+ or = CFG_OR2;
psdmr = CFG_PSDMR;
psrt = CFG_PSRT;
#endif /* CONFIG_SPD_EEPROM */
@@ -455,7 +456,7 @@ long int initdram (int board_type)
*ramaddr = c;
memctl->memc_psdmr = psdmr | 0x40000000; /* Refresh enable */
*ramaddr = c;
-#endif
+#endif /* CFG_RAMBOOT */
/* return total 60x bus SDRAM size */
return (msize * 1024 * 1024);
diff --git a/board/mpc8260ads/u-boot.lds b/board/mpc8260ads/u-boot.lds
index 61fb15c6a67..098c0464cc8 100644
--- a/board/mpc8260ads/u-boot.lds
+++ b/board/mpc8260ads/u-boot.lds
@@ -1,7 +1,9 @@
/*
- * (C) Copyright 2001
+ * (C) Copyright 2001-2003
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
+ * Modified by Yuli Barcohen <yuli@arabellasw.com>
+ *
* See file CREDITS for list of people who contributed to this
* project.
*
@@ -22,9 +24,6 @@
*/
OUTPUT_ARCH(powerpc)
-SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
-/* Do we need any of these for elf?
- __DYNAMIC = 0; */
SECTIONS
{
/* Read-only sections, merged into text segment: */
@@ -120,3 +119,4 @@ SECTIONS
_end = . ;
PROVIDE (end = .);
}
+ENTRY(_start)
diff --git a/drivers/Makefile b/drivers/Makefile
index f1ea1178e28..1ee520f2a2a 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -36,6 +36,7 @@ OBJS = 3c589.o 5701rls.o ali512x.o \
ns16550.o ns8382x.o ns87308.o \
pci.o pci_auto.o pci_indirect.o \
pcnet.o plb2800_eth.o \
+ rtl8019.o \
s3c24x0_i2c.o sed13806.o serial.o \
serial_max3100.o \
smc91111.o smiLynxEM.o sym53c8xx.o \
diff --git a/drivers/rtl8019.c b/drivers/rtl8019.c
new file mode 100644
index 00000000000..62b9245517b
--- /dev/null
+++ b/drivers/rtl8019.c
@@ -0,0 +1,282 @@
+/*
+ * Realtek 8019AS Ethernet
+ * (C) Copyright 2002-2003
+ * Xue Ligong(lgxue@hotmail.com),Wang Kehao, ESLAB, whut.edu.cn
+ *
+ * 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
+ */
+
+/*
+ * This code works in 8bit mode.
+ * If you need to work in 16bit mode, PLS change it!
+ */
+
+#include <common.h>
+#include <command.h>
+#include "rtl8019.h"
+#include <net.h>
+
+#ifdef CONFIG_DRIVER_RTL8019
+
+#if (CONFIG_COMMANDS & CFG_CMD_NET)
+
+
+/* packet page register access functions */
+
+
+static unsigned char get_reg (unsigned int regno)
+{
+ return (*(unsigned char *) regno);
+}
+
+
+static void put_reg (unsigned int regno, unsigned char val)
+{
+ *(volatile unsigned char *) regno = val;
+}
+
+static void eth_reset (void)
+{
+ unsigned char ucTemp;
+
+ /* reset NIC */
+ ucTemp = get_reg (RTL8019_RESET);
+ put_reg (RTL8019_RESET, ucTemp);
+ put_reg (RTL8019_INTERRUPTSTATUS, 0xff);
+ udelay (2000); /* wait for 2ms */
+}
+
+void rtl8019_get_enetaddr (uchar * addr)
+{
+ unsigned char i;
+ unsigned char temp;
+
+ eth_reset ();
+
+ put_reg (RTL8019_COMMAND, RTL8019_REMOTEDMARD);
+ put_reg (RTL8019_DATACONFIGURATION, 0x48);
+ put_reg (RTL8019_REMOTESTARTADDRESS0, 0x00);
+ put_reg (RTL8019_REMOTESTARTADDRESS1, 0x00);
+ put_reg (RTL8019_REMOTEBYTECOUNT0, 12);
+ put_reg (RTL8019_REMOTEBYTECOUNT1, 0x00);
+ put_reg (RTL8019_COMMAND, RTL8019_REMOTEDMARD);
+ printf ("MAC: ");
+ for (i = 0; i < 6; i++) {
+ temp = get_reg (RTL8019_DMA_DATA);
+ *addr++ = temp;
+ temp = get_reg (RTL8019_DMA_DATA);
+ printf ("%x:", temp);
+ }
+
+ while ((!get_reg (RTL8019_INTERRUPTSTATUS) & 0x40));
+ printf ("\b \n");
+ put_reg (RTL8019_REMOTEBYTECOUNT0, 0x00);
+ put_reg (RTL8019_REMOTEBYTECOUNT1, 0x00);
+ put_reg (RTL8019_COMMAND, RTL8019_PAGE0);
+}
+
+
+void eth_halt (void)
+{
+ put_reg (RTL8019_COMMAND, 0x01);
+}
+
+int eth_init (bd_t * bd)
+{
+ eth_reset ();
+ put_reg (RTL8019_COMMAND, RTL8019_PAGE0STOP);
+ put_reg (RTL8019_DATACONFIGURATION, 0x48);
+ put_reg (RTL8019_REMOTEBYTECOUNT0, 0x00);
+ put_reg (RTL8019_REMOTEBYTECOUNT1, 0x00);
+ put_reg (RTL8019_RECEIVECONFIGURATION, 0x00); /*00; */
+ put_reg (RTL8019_TRANSMITPAGE, RTL8019_TPSTART);
+ put_reg (RTL8019_TRANSMITCONFIGURATION, 0x02);
+ put_reg (RTL8019_PAGESTART, RTL8019_PSTART);
+ put_reg (RTL8019_BOUNDARY, RTL8019_PSTART);
+ put_reg (RTL8019_PAGESTOP, RTL8019_PSTOP);
+ put_reg (RTL8019_INTERRUPTSTATUS, 0xff);
+ put_reg (RTL8019_INTERRUPTMASK, 0x11); /*b; */
+ put_reg (RTL8019_COMMAND, RTL8019_PAGE1STOP);
+ put_reg (RTL8019_PHYSICALADDRESS0, bd->bi_enetaddr[0]);
+ put_reg (RTL8019_PHYSICALADDRESS1, bd->bi_enetaddr[1]);
+ put_reg (RTL8019_PHYSICALADDRESS2, bd->bi_enetaddr[2]);
+ put_reg (RTL8019_PHYSICALADDRESS3, bd->bi_enetaddr[3]);
+ put_reg (RTL8019_PHYSICALADDRESS4, bd->bi_enetaddr[4]);
+ put_reg (RTL8019_PHYSICALADDRESS5, bd->bi_enetaddr[5]);
+ put_reg (RTL8019_MULTIADDRESS0, 0x00);
+ put_reg (RTL8019_MULTIADDRESS1, 0x00);
+ put_reg (RTL8019_MULTIADDRESS2, 0x00);
+ put_reg (RTL8019_MULTIADDRESS3, 0x00);
+ put_reg (RTL8019_MULTIADDRESS4, 0x00);
+ put_reg (RTL8019_MULTIADDRESS5, 0x00);
+ put_reg (RTL8019_MULTIADDRESS6, 0x00);
+ put_reg (RTL8019_MULTIADDRESS7, 0x00);
+ put_reg (RTL8019_CURRENT, RTL8019_PSTART);
+ put_reg (RTL8019_COMMAND, RTL8019_PAGE0);
+ put_reg (RTL8019_TRANSMITCONFIGURATION, 0xe0); /*58; */
+
+ return 0;
+}
+
+
+static unsigned char nic_to_pc (void)
+{
+ unsigned char rec_head_status;
+ unsigned char next_packet_pointer;
+ unsigned char packet_length0;
+ unsigned char packet_length1;
+ unsigned short rxlen = 0;
+ unsigned int i = 4;
+ unsigned char current_point;
+ unsigned char *addr;
+
+ /*
+ * The RTL8019's first 4B is packet status,page of next packet
+ * and packet length(2B).So we receive the fist 4B.
+ */
+ put_reg (RTL8019_REMOTESTARTADDRESS1, get_reg (RTL8019_BOUNDARY));
+ put_reg (RTL8019_REMOTESTARTADDRESS0, 0x00);
+ put_reg (RTL8019_REMOTEBYTECOUNT1, 0x00);
+ put_reg (RTL8019_REMOTEBYTECOUNT0, 0x04);
+
+ put_reg (RTL8019_COMMAND, RTL8019_REMOTEDMARD);
+
+ rec_head_status = get_reg (RTL8019_DMA_DATA);
+ next_packet_pointer = get_reg (RTL8019_DMA_DATA);
+ packet_length0 = get_reg (RTL8019_DMA_DATA);
+ packet_length1 = get_reg (RTL8019_DMA_DATA);
+
+ put_reg (RTL8019_COMMAND, RTL8019_PAGE0);
+ /*Packet length is in two 8bit registers */
+ rxlen = packet_length1;
+ rxlen = (((rxlen << 8) & 0xff00) + packet_length0);
+ rxlen -= 4;
+
+ if (rxlen > PKTSIZE_ALIGN + PKTALIGN)
+ printf ("packet too big!\n");
+
+ /*Receive the packet */
+ put_reg (RTL8019_REMOTESTARTADDRESS0, 0x04);
+ put_reg (RTL8019_REMOTESTARTADDRESS1, get_reg (RTL8019_BOUNDARY));
+
+ put_reg (RTL8019_REMOTEBYTECOUNT0, (rxlen & 0xff));
+ put_reg (RTL8019_REMOTEBYTECOUNT1, ((rxlen >> 8) & 0xff));
+
+
+ put_reg (RTL8019_COMMAND, RTL8019_REMOTEDMARD);
+
+ for (addr = (unsigned char *) NetRxPackets[0], i = rxlen; i > 0; i--)
+ *addr++ = get_reg (RTL8019_DMA_DATA);
+ /* Pass the packet up to the protocol layers. */
+ NetReceive (NetRxPackets[0], rxlen);
+
+ while (!(get_reg (RTL8019_INTERRUPTSTATUS)) & 0x40); /* wait for the op. */
+
+ /*
+ * To test whether the packets are all received,get the
+ * location of current point
+ */
+ put_reg (RTL8019_COMMAND, RTL8019_PAGE1);
+ current_point = get_reg (RTL8019_CURRENT);
+ put_reg (RTL8019_COMMAND, RTL8019_PAGE0);
+ put_reg (RTL8019_BOUNDARY, next_packet_pointer);
+ return current_point;
+}
+
+/* Get a data block via Ethernet */
+extern int eth_rx (void)
+{
+ unsigned char temp, current_point;
+
+ put_reg (RTL8019_COMMAND, RTL8019_PAGE0);
+
+ while (1) {
+ temp = get_reg (RTL8019_INTERRUPTSTATUS);
+
+ if (temp & 0x90) {
+ /*overflow */
+ put_reg (RTL8019_COMMAND, RTL8019_PAGE0STOP);
+ udelay (2000);
+ put_reg (RTL8019_REMOTEBYTECOUNT0, 0);
+ put_reg (RTL8019_REMOTEBYTECOUNT1, 0);
+ put_reg (RTL8019_TRANSMITCONFIGURATION, 2);
+ do {
+ current_point = nic_to_pc ();
+ } while (get_reg (RTL8019_BOUNDARY) != current_point);
+
+ put_reg (RTL8019_TRANSMITCONFIGURATION, 0xe0);
+ }
+
+ if (temp & 0x1) {
+ /*packet received */
+ do {
+ put_reg (RTL8019_INTERRUPTSTATUS, 0x01);
+ current_point = nic_to_pc ();
+ } while (get_reg (RTL8019_BOUNDARY) != current_point);
+ }
+
+ if (!(temp & 0x1))
+ return 0;
+ /* done and exit. */
+ }
+}
+
+/* Send a data block via Ethernet. */
+extern int eth_send (volatile void *packet, int length)
+{
+ volatile unsigned char *p;
+ unsigned int pn;
+
+ pn = length;
+ p = (volatile unsigned char *) packet;
+
+ while (get_reg (RTL8019_COMMAND) == RTL8019_TRANSMIT);
+
+ put_reg (RTL8019_REMOTESTARTADDRESS0, 0);
+ put_reg (RTL8019_REMOTESTARTADDRESS1, RTL8019_TPSTART);
+ put_reg (RTL8019_REMOTEBYTECOUNT0, (pn & 0xff));
+ put_reg (RTL8019_REMOTEBYTECOUNT1, ((pn >> 8) & 0xff));
+
+ put_reg (RTL8019_COMMAND, RTL8019_REMOTEDMAWR);
+ while (pn > 0) {
+ put_reg (RTL8019_DMA_DATA, *p++);
+ pn--;
+ }
+
+ pn = length;
+
+ while (pn < 60) { /*Padding */
+ put_reg (RTL8019_DMA_DATA, 0);
+ pn++;
+ }
+
+ while (!(get_reg (RTL8019_INTERRUPTSTATUS)) & 0x40);
+
+ put_reg (RTL8019_INTERRUPTSTATUS, 0x40);
+ put_reg (RTL8019_TRANSMITPAGE, RTL8019_TPSTART);
+ put_reg (RTL8019_TRANSMITBYTECOUNT0, (pn & 0xff));
+ put_reg (RTL8019_TRANSMITBYTECOUNT1, ((pn >> 8 & 0xff)));
+ put_reg (RTL8019_COMMAND, RTL8019_TRANSMIT);
+
+ return 0;
+}
+
+#endif /* COMMANDS & CFG_NET */
+
+#endif /* CONFIG_DRIVER_RTL8019 */
diff --git a/drivers/rtl8019.h b/drivers/rtl8019.h
new file mode 100644
index 00000000000..b53e1428233
--- /dev/null
+++ b/drivers/rtl8019.h
@@ -0,0 +1,135 @@
+/*
+ * Realtek 8019AS Ethernet
+ * (C) Copyright 2002-2003
+ * Xue Ligong(lgxue@hotmail.com),Wang Kehao, ESLAB, whut.edu.cn
+ *
+ * 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
+ */
+
+/*
+ * This code works in 8bit mode.
+ * If you need to work in 16bit mode, PLS change it!
+ */
+
+#include <asm/types.h>
+#include <config.h>
+
+
+#ifdef CONFIG_DRIVER_RTL8019
+
+#define RTL8019_REG_00 (RTL8019_BASE + 0x00)
+#define RTL8019_REG_01 (RTL8019_BASE + 0x01)
+#define RTL8019_REG_02 (RTL8019_BASE + 0x02)
+#define RTL8019_REG_03 (RTL8019_BASE + 0x03)
+#define RTL8019_REG_04 (RTL8019_BASE + 0x04)
+#define RTL8019_REG_05 (RTL8019_BASE + 0x05)
+#define RTL8019_REG_06 (RTL8019_BASE + 0x06)
+#define RTL8019_REG_07 (RTL8019_BASE + 0x07)
+#define RTL8019_REG_08 (RTL8019_BASE + 0x08)
+#define RTL8019_REG_09 (RTL8019_BASE + 0x09)
+#define RTL8019_REG_0a (RTL8019_BASE + 0x0a)
+#define RTL8019_REG_0b (RTL8019_BASE + 0x0b)
+#define RTL8019_REG_0c (RTL8019_BASE + 0x0c)
+#define RTL8019_REG_0d (RTL8019_BASE + 0x0d)
+#define RTL8019_REG_0e (RTL8019_BASE + 0x0e)
+#define RTL8019_REG_0f (RTL8019_BASE + 0x0f)
+#define RTL8019_REG_10 (RTL8019_BASE + 0x10)
+#define RTL8019_REG_1f (RTL8019_BASE + 0x1f)
+
+#define RTL8019_COMMAND RTL8019_REG_00
+#define RTL8019_PAGESTART RTL8019_REG_01
+#define RTL8019_PAGESTOP RTL8019_REG_02
+#define RTL8019_BOUNDARY RTL8019_REG_03
+#define RTL8019_TRANSMITSTATUS RTL8019_REG_04
+#define RTL8019_TRANSMITPAGE RTL8019_REG_04
+#define RTL8019_TRANSMITBYTECOUNT0 RTL8019_REG_05
+#define RTL8019_NCR RTL8019_REG_05
+#define RTL8019_TRANSMITBYTECOUNT1 RTL8019_REG_06
+#define RTL8019_INTERRUPTSTATUS RTL8019_REG_07
+#define RTL8019_CURRENT RTL8019_REG_07
+#define RTL8019_REMOTESTARTADDRESS0 RTL8019_REG_08
+#define RTL8019_CRDMA0 RTL8019_REG_08
+#define RTL8019_REMOTESTARTADDRESS1 RTL8019_REG_09
+#define RTL8019_CRDMA1 RTL8019_REG_09
+#define RTL8019_REMOTEBYTECOUNT0 RTL8019_REG_0a
+#define RTL8019_REMOTEBYTECOUNT1 RTL8019_REG_0b
+#define RTL8019_RECEIVESTATUS RTL8019_REG_0c
+#define RTL8019_RECEIVECONFIGURATION RTL8019_REG_0c
+#define RTL8019_TRANSMITCONFIGURATION RTL8019_REG_0d
+#define RTL8019_FAE_TALLY RTL8019_REG_0d
+#define RTL8019_DATACONFIGURATION RTL8019_REG_0e
+#define RTL8019_CRC_TALLY RTL8019_REG_0e
+#define RTL8019_INTERRUPTMASK RTL8019_REG_0f
+#define RTL8019_MISS_PKT_TALLY RTL8019_REG_0f
+#define RTL8019_PHYSICALADDRESS0 RTL8019_REG_01
+#define RTL8019_PHYSICALADDRESS1 RTL8019_REG_02
+#define RTL8019_PHYSICALADDRESS2 RTL8019_REG_03
+#define RTL8019_PHYSICALADDRESS3 RTL8019_REG_04
+#define RTL8019_PHYSICALADDRESS4 RTL8019_REG_05
+#define RTL8019_PHYSICALADDRESS5 RTL8019_REG_06
+#define RTL8019_MULTIADDRESS0 RTL8019_REG_08
+#define RTL8019_MULTIADDRESS1 RTL8019_REG_09
+#define RTL8019_MULTIADDRESS2 RTL8019_REG_0a
+#define RTL8019_MULTIADDRESS3 RTL8019_REG_0b
+#define RTL8019_MULTIADDRESS4 RTL8019_REG_0c
+#define RTL8019_MULTIADDRESS5 RTL8019_REG_0d
+#define RTL8019_MULTIADDRESS6 RTL8019_REG_0e
+#define RTL8019_MULTIADDRESS7 RTL8019_REG_0f
+#define RTL8019_DMA_DATA RTL8019_REG_10
+#define RTL8019_RESET RTL8019_REG_1f
+
+
+#define RTL8019_PAGE0 0x22
+#define RTL8019_PAGE1 0x62
+#define RTL8019_PAGE0DMAWRITE 0x12
+#define RTL8019_PAGE2DMAWRITE 0x92
+#define RTL8019_REMOTEDMAWR 0x12
+#define RTL8019_REMOTEDMARD 0x0A
+#define RTL8019_ABORTDMAWR 0x32
+#define RTL8019_ABORTDMARD 0x2A
+#define RTL8019_PAGE0STOP 0x21
+#define RTL8019_PAGE1STOP 0x61
+#define RTL8019_TRANSMIT 0x26
+#define RTL8019_TXINPROGRESS 0x04
+#define RTL8019_SEND 0x1A
+
+#define RTL8019_PSTART 0x4c
+#define RTL8019_PSTOP 0x80
+#define RTL8019_TPSTART 0x40
+
+
+#endif /*end of CONFIG_DRIVER_RTL8019*/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/include/configs/MPC8260ADS.h b/include/configs/MPC8260ADS.h
index 254ec46f175..9625cdf1765 100644
--- a/include/configs/MPC8260ADS.h
+++ b/include/configs/MPC8260ADS.h
@@ -10,7 +10,7 @@
* (C) Copyright 2003 Arabella Software Ltd.
* Yuli Barcohen <yuli@arabellasw.com>
* Added support for SDRAM DIMMs SPD EEPROM, MII, JFFS2.
- * Ported to PQ2FADS-ZU board.
+ * Ported to PQ2FADS-ZU and PQ2FADS-VR boards.
*
* See file CREDITS for list of people who contributed to this
* project.
@@ -45,7 +45,7 @@
/* ADS flavours */
#define CFG_8260ADS 1 /* MPC8260ADS */
#define CFG_8266ADS 2 /* MPC8266ADS */
-#define CFG_PQ2FADS 3 /* PQ2FADS-ZU */
+#define CFG_PQ2FADS 3 /* PQ2FADS-ZU or PQ2FADS-VR */
#ifndef CONFIG_ADSTYPE
#define CONFIG_ADSTYPE CFG_8260ADS
@@ -130,7 +130,7 @@
#undef CONFIG_SPD_EEPROM /* On PQ2FADS-ZU, SDRAM is soldered */
#else
#define CONFIG_HARD_I2C 1 /* To enable I2C support */
-#define CFG_I2C_SPEED 400000 /* I2C speed and slave address */
+#define CFG_I2C_SPEED 100000 /* I2C speed and slave address */
#define CFG_I2C_SLAVE 0x7F
#if defined(CONFIG_SPD_EEPROM) && !defined(CONFIG_SPD_ADDR)
@@ -139,14 +139,14 @@
#endif /* CONFIG_ADSTYPE == CFG_PQ2FADS */
#ifndef CONFIG_SDRAM_PBI
-#define CONFIG_SDRAM_PBI 1 /* By default, use page-based interleaving */
+#define CONFIG_SDRAM_PBI 0 /* By default, use bank-based interleaving */
#endif
#ifndef CONFIG_8260_CLKIN
#if CONFIG_ADSTYPE == CFG_PQ2FADS
#define CONFIG_8260_CLKIN 100000000 /* in Hz */
#else
-#define CONFIG_8260_CLKIN 66666666 /* in Hz */
+#define CONFIG_8260_CLKIN 66000000 /* in Hz */
#endif
#endif
@@ -188,7 +188,6 @@
/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
#include <cmd_confdefs.h>
-
#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
#define CONFIG_BOOTCOMMAND "bootm 100000" /* autoboot command */
#define CONFIG_BOOTARGS "root=/dev/ram rw"
@@ -201,7 +200,8 @@
#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port at */
#endif
-#undef CONFIG_WATCHDOG /* disable platform specific watchdog */
+#define CONFIG_BZIP2 /* include support for bzip2 compressed images */
+#undef CONFIG_WATCHDOG /* disable platform specific watchdog */
/*
* Miscellaneous configurable options
@@ -291,9 +291,14 @@
#endif
#define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
-#define CFG_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
#define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
+#ifdef CONFIG_BZIP2
+#define CFG_MALLOC_LEN (4096 << 10) /* Reserve 4 MB for malloc() */
+#else
+#define CFG_MALLOC_LEN (128 << 10) /* Reserve 128 KB for malloc() */
+#endif /* CONFIG_BZIP2 */
+
#ifndef CFG_RAMBOOT
# define CFG_ENV_IS_IN_FLASH 1
# define CFG_ENV_SECT_SIZE 0x40000
@@ -335,12 +340,14 @@
#endif /* CONFIG_ADSTYPE == CFG_8266ADS */
#if CONFIG_ADSTYPE == CFG_PQ2FADS
+#define CFG_OR2 0xFE002EC0
#define CFG_PSDMR 0x824B36A3
#define CFG_PSRT 0x13
#define CFG_LSDMR 0x828737A3
#define CFG_LSRT 0x13
#define CFG_MPTPR 0x2800
#else
+#define CFG_OR2 0xFF000CA0
#define CFG_PSDMR 0x016EB452
#define CFG_PSRT 0x21
#define CFG_LSDMR 0x0086A522
diff --git a/lib_arm/board.c b/lib_arm/board.c
index 16e1575ed51..cca708cfb2c 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -54,6 +54,10 @@ const char version_string[] =
extern void cs8900_get_enetaddr (uchar * addr);
#endif
+#ifdef CONFIG_DRIVER_CS8900
+extern void rtl8019_get_enetaddr (uchar * addr);
+#endif
+
#ifdef CONFIG_DRIVER_LAN91C96
#include "../drivers/lan91c96.h"
#endif