mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 21:21:37 +00:00
Merge branch 'master' of /home/wd/git/u-boot/master/
This commit is contained in:
commit
fb98f94fcb
13 changed files with 68 additions and 28 deletions
8
Makefile
8
Makefile
|
@ -352,11 +352,9 @@ $(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin $(obj)include/autoconf.mk
|
|||
cat $(obj)onenand_ipl/onenand-ipl-4k.bin $(obj)u-boot.bin > $(obj)u-boot-flexonenand.bin
|
||||
|
||||
$(VERSION_FILE):
|
||||
@( echo -n "#define U_BOOT_VERSION \"U-Boot " ; \
|
||||
echo -n "$(U_BOOT_VERSION)" ; \
|
||||
echo -n $(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion \
|
||||
$(TOPDIR)) ; \
|
||||
echo "\"" ) > $@.tmp
|
||||
@( printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' "$(U_BOOT_VERSION)" \
|
||||
'$(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion $(TOPDIR))' \
|
||||
) > $@.tmp
|
||||
@cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
|
||||
|
||||
gdbtools:
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <common.h>
|
||||
#include <command.h>
|
||||
|
||||
static unsigned char srom[128];
|
||||
extern u16 read_srom_word(int);
|
||||
extern void write_srom_word(int offset, u16 val);
|
||||
|
||||
|
|
|
@ -378,7 +378,9 @@ void env_relocate_spec (void)
|
|||
puts ("*** Warning - some problems detected "
|
||||
"reading environment; recovered successfully\n\n");
|
||||
#endif /* CFG_ENV_ADDR_REDUND */
|
||||
#ifdef CMD_SAVEENV
|
||||
memcpy (env_ptr, (void*)flash_addr, CFG_ENV_SIZE);
|
||||
#endif
|
||||
#endif /* ! ENV_IS_EMBEDDED || CFG_ENV_ADDR_REDUND */
|
||||
}
|
||||
|
||||
|
|
|
@ -285,6 +285,22 @@ LEAF(dcache_disable)
|
|||
jr ra
|
||||
END(dcache_disable)
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* dcache_enable - enable cache
|
||||
*
|
||||
* RETURNS: N/A
|
||||
*
|
||||
*/
|
||||
LEAF(dcache_enable)
|
||||
mfc0 t0, CP0_CONFIG
|
||||
ori t0, CONF_CM_CMASK
|
||||
xori t0, CONF_CM_CMASK
|
||||
ori t0, CONF_CM_CACHABLE_NONCOHERENT
|
||||
mtc0 t0, CP0_CONFIG
|
||||
jr ra
|
||||
END(dcache_enable)
|
||||
|
||||
#ifdef CFG_INIT_RAM_LOCK_MIPS
|
||||
/*******************************************************************************
|
||||
*
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
v=$(shell $(AS) --version |grep "GNU assembler" |cut -d. -f2)
|
||||
v=$(shell $(AS) --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+' | cut -d. -f2)
|
||||
MIPSFLAGS:=$(shell \
|
||||
if [ "$v" -lt "14" ]; then \
|
||||
echo "-mcpu=4kc"; \
|
||||
|
|
18
doc/README.qemu_mips
Normal file
18
doc/README.qemu_mips
Normal file
|
@ -0,0 +1,18 @@
|
|||
|
||||
Notes for the Qemu MIPS port
|
||||
|
||||
Example usage:
|
||||
|
||||
# ln -s u-boot.bin mips_bios.bin
|
||||
start it:
|
||||
qemu-system-mips -L . /dev/null -nographic
|
||||
|
||||
or
|
||||
|
||||
if you use a qemu version after commit 4224
|
||||
|
||||
create image:
|
||||
# dd of=flash bs=1k count=4k if=/dev/zero
|
||||
# dd of=flash bs=1k conv=notrunc if=u-boot.bin
|
||||
start it:
|
||||
# qemu-system-mips -pflash flash -monitor null -nographic
|
|
@ -1277,6 +1277,12 @@ struct phy_info phy_info_VSC8601 = {
|
|||
{MIIM_CONTROL, MIIM_CONTROL_INIT, &mii_cr_init},
|
||||
#ifdef CFG_VSC8601_SKEWFIX
|
||||
{MIIM_VSC8601_EPHY_CON,MIIM_VSC8601_EPHY_CON_INIT_SKEW,NULL},
|
||||
#if defined(CFG_VSC8601_SKEW_TX) && defined(CFG_VSC8601_SKEW_RX)
|
||||
{MIIM_EXT_PAGE_ACCESS,1,NULL},
|
||||
#define VSC8101_SKEW (CFG_VSC8601_SKEW_TX<<14)|(CFG_VSC8601_SKEW_RX<<12)
|
||||
{MIIM_VSC8601_SKEW_CTRL,VSC8101_SKEW,NULL},
|
||||
{MIIM_EXT_PAGE_ACCESS,0,NULL},
|
||||
#endif
|
||||
#endif
|
||||
{miim_end,}
|
||||
},
|
||||
|
|
|
@ -112,6 +112,8 @@
|
|||
#define MIIM_GBIT_CONTROL 0x9
|
||||
#define MIIM_GBIT_CONTROL_INIT 0xe00
|
||||
|
||||
#define MIIM_EXT_PAGE_ACCESS 0x1f
|
||||
|
||||
/* Broadcom BCM54xx -- taken from linux sungem_phy */
|
||||
#define MIIM_BCM54xx_AUXSTATUS 0x19
|
||||
#define MIIM_BCM54xx_AUXSTATUS_LINKMODE_MASK 0x0700
|
||||
|
@ -161,8 +163,9 @@
|
|||
|
||||
/* Entry for Vitesse VSC8601 regs starts here (Not complete) */
|
||||
/* Vitesse VSC8601 Extended PHY Control Register 1 */
|
||||
#define MIIM_VSC8601_EPHY_CON 0x17
|
||||
#define MIIM_VSC8601_EPHY_CON 0x17
|
||||
#define MIIM_VSC8601_EPHY_CON_INIT_SKEW 0x1120
|
||||
#define MIIM_VSC8601_SKEW_CTRL 0x1c
|
||||
|
||||
/* 88E1011 PHY Status Register */
|
||||
#define MIIM_88E1011_PHY_STATUS 0x11
|
||||
|
@ -177,9 +180,9 @@
|
|||
#define MIIM_88E1011_PHY_MDI_X_AUTO 0x0060
|
||||
|
||||
/* 88E1111 PHY LED Control Register */
|
||||
#define MIIM_88E1111_PHY_LED_CONTROL 24
|
||||
#define MIIM_88E1111_PHY_LED_DIRECT 0x4100
|
||||
#define MIIM_88E1111_PHY_LED_COMBINE 0x411C
|
||||
#define MIIM_88E1111_PHY_LED_CONTROL 24
|
||||
#define MIIM_88E1111_PHY_LED_DIRECT 0x4100
|
||||
#define MIIM_88E1111_PHY_LED_COMBINE 0x411C
|
||||
|
||||
/* 88E1145 Extended PHY Specific Control Register */
|
||||
#define MIIM_88E1145_PHY_EXT_CR 20
|
||||
|
|
|
@ -123,7 +123,7 @@ extern void __raw_readsl(unsigned int addr, void *data, int longlen);
|
|||
* only. Their primary purpose is to access PCI and ISA peripherals.
|
||||
*
|
||||
* Note that for a big endian machine, this implies that the following
|
||||
* big endian mode connectivity is in place, as described by numerious
|
||||
* big endian mode connectivity is in place, as described by numerous
|
||||
* ARM documents:
|
||||
*
|
||||
* PCI: D0-D7 D8-D15 D16-D23 D24-D31
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
* 1111 1111 1000 0000 0110 1110 0110 0101 = ff806e65 OR0
|
||||
*
|
||||
* OR6:
|
||||
* Addr Mask = 64M = OR6[0:16] = 1111 1100 0000 0000 0
|
||||
* Addr Mask = 64M = OR6[0:16] = 1111 1000 0000 0000 0
|
||||
* XAM = OR6[17:18] = 11
|
||||
* CSNT = OR6[20] = 1
|
||||
* ACS = half cycle delay = OR6[21:22] = 11
|
||||
|
@ -157,7 +157,7 @@
|
|||
* EAD = use external address latch delay = OR6[31] = 1
|
||||
*
|
||||
* 0 4 8 12 16 20 24 28
|
||||
* 1111 1100 0000 0000 0110 1110 0110 0101 = fc006e65 OR6
|
||||
* 1111 1000 0000 0000 0110 1110 0110 0101 = f8006e65 OR6
|
||||
*/
|
||||
|
||||
#define CFG_BOOT_BLOCK 0xff800000 /* start of 8MB Flash */
|
||||
|
@ -167,7 +167,7 @@
|
|||
#define CFG_BR6_PRELIM 0xfb801801
|
||||
|
||||
#define CFG_OR0_PRELIM 0xff806e65
|
||||
#define CFG_OR6_PRELIM 0xfc006e65
|
||||
#define CFG_OR6_PRELIM 0xf8006e65
|
||||
|
||||
#define CFG_FLASH_BANKS_LIST {CFG_FLASH_BASE}
|
||||
#define CFG_MAX_FLASH_BANKS 1 /* number of banks */
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include <devices.h>
|
||||
#include <version.h>
|
||||
#include <net.h>
|
||||
#include <serial.h>
|
||||
|
||||
#ifdef CONFIG_DRIVER_SMC91111
|
||||
#include "../drivers/net/smc91111.h"
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include <status_led.h>
|
||||
#endif
|
||||
#include <net.h>
|
||||
#include <serial.h>
|
||||
#if defined(CONFIG_CMD_BEDBUG)
|
||||
#include <cmd_bedbug.h>
|
||||
#endif
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
extern int errno;
|
||||
|
||||
#ifndef MAP_FAILED
|
||||
#define MAP_FAILED (-1)
|
||||
#define MAP_FAILED (void *)(-1)
|
||||
#endif
|
||||
|
||||
extern unsigned long crc32 (unsigned long crc, const char *buf, unsigned int len);
|
||||
|
@ -218,9 +218,8 @@ NXTARG: ;
|
|||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
ptr = (unsigned char *)mmap(0, sbuf.st_size,
|
||||
PROT_READ, MAP_SHARED, ifd, 0);
|
||||
if ((caddr_t)ptr == (caddr_t)-1) {
|
||||
ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, ifd, 0);
|
||||
if (ptr == MAP_FAILED) {
|
||||
fprintf (stderr, "%s: Can't read %s: %s\n",
|
||||
cmdname, imagefile, strerror(errno));
|
||||
exit (EXIT_FAILURE);
|
||||
|
@ -330,9 +329,8 @@ NXTARG: ;
|
|||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
ptr = (unsigned char *)mmap(0, sbuf.st_size,
|
||||
PROT_READ|PROT_WRITE, MAP_SHARED, ifd, 0);
|
||||
if (ptr == (unsigned char *)MAP_FAILED) {
|
||||
ptr = mmap(0, sbuf.st_size, PROT_READ|PROT_WRITE, MAP_SHARED, ifd, 0);
|
||||
if (ptr == MAP_FAILED) {
|
||||
fprintf (stderr, "%s: Can't map %s: %s\n",
|
||||
cmdname, imagefile, strerror(errno));
|
||||
exit (EXIT_FAILURE);
|
||||
|
@ -410,9 +408,8 @@ copy_file (int ifd, const char *datafile, int pad)
|
|||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
ptr = (unsigned char *)mmap(0, sbuf.st_size,
|
||||
PROT_READ, MAP_SHARED, dfd, 0);
|
||||
if (ptr == (unsigned char *)MAP_FAILED) {
|
||||
ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, dfd, 0);
|
||||
if (ptr == MAP_FAILED) {
|
||||
fprintf (stderr, "%s: Can't read %s: %s\n",
|
||||
cmdname, datafile, strerror(errno));
|
||||
exit (EXIT_FAILURE);
|
||||
|
@ -594,9 +591,8 @@ static void fit_handle_file (void)
|
|||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
ptr = (unsigned char *)mmap (0, sbuf.st_size,
|
||||
PROT_READ|PROT_WRITE, MAP_SHARED, tfd, 0);
|
||||
if ((caddr_t)ptr == (caddr_t)-1) {
|
||||
ptr = mmap (0, sbuf.st_size, PROT_READ|PROT_WRITE, MAP_SHARED, tfd, 0);
|
||||
if (ptr == MAP_FAILED) {
|
||||
fprintf (stderr, "%s: Can't read %s: %s\n",
|
||||
cmdname, tmpfile, strerror(errno));
|
||||
unlink (tmpfile);
|
||||
|
|
Loading…
Add table
Reference in a new issue